@shumai-one/shumai 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/bin/{chunk-scfbmsy7.js → chunk-0bbhm7dp.js} +2 -2
  2. package/bin/{chunk-4153rke8.js → chunk-17bewdr0.js} +2 -2
  3. package/bin/{chunk-j2jdrmaa.js → chunk-1fqpgz02.js} +1 -1
  4. package/bin/{chunk-2pxev94x.js → chunk-21hvrvzj.js} +2 -2
  5. package/bin/chunk-23mj9p82.js +1 -0
  6. package/bin/chunk-24mag65w.js +1 -0
  7. package/bin/chunk-29203j0e.js +7 -0
  8. package/bin/{chunk-j5dejr3e.js → chunk-2jfbxefd.js} +2 -2
  9. package/bin/{chunk-cwh21vfb.js → chunk-2jv9re91.js} +1 -1
  10. package/bin/chunk-2rmceamt.js +1 -0
  11. package/bin/{chunk-h0k9zw29.js → chunk-3mprq5kb.js} +2 -2
  12. package/bin/{chunk-v5zdafv4.js → chunk-3w9vybrh.js} +2 -2
  13. package/bin/{chunk-2jnyk045.js → chunk-3ydjrkbd.js} +1 -1
  14. package/bin/{chunk-kgr3ytpb.js → chunk-43mhpb0k.js} +2 -2
  15. package/bin/{chunk-r9thyg31.js → chunk-4b8ms2ct.js} +2 -2
  16. package/bin/{chunk-05m8w09t.js → chunk-4rz2105a.js} +1 -1
  17. package/bin/{chunk-5qwzveck.js → chunk-4sdrjye2.js} +2 -2
  18. package/bin/{chunk-khc3dydj.js → chunk-52qe6z8w.js} +1 -1
  19. package/bin/{chunk-d2xrh0vv.js → chunk-54hmgj96.js} +2 -2
  20. package/bin/{chunk-75x3w5hx.js → chunk-5r55htaw.js} +1 -1
  21. package/bin/{chunk-2967rnmn.js → chunk-5yxngq5n.js} +1 -1
  22. package/bin/{chunk-1bfrnc6b.js → chunk-6j6dejtd.js} +1 -1
  23. package/bin/chunk-6kv3jyfc.js +2 -0
  24. package/bin/{chunk-2mr99scd.js → chunk-6vn44e4d.js} +2 -2
  25. package/bin/{chunk-s584wxzj.js → chunk-7jkvjm4x.js} +2 -2
  26. package/bin/{chunk-8pa1n500.js → chunk-7mkk8ahk.js} +2 -2
  27. package/bin/{chunk-ddfx823h.js → chunk-7w2tx08e.js} +2 -2
  28. package/bin/{chunk-8qe7cpbr.js → chunk-7zdmpbt6.js} +1 -1
  29. package/bin/{chunk-c9f6n4sf.js → chunk-8fsrs7mh.js} +1 -1
  30. package/bin/{chunk-bagxeg82.js → chunk-8hq6sn31.js} +2 -2
  31. package/bin/{chunk-38hp9gfh.js → chunk-8mzg29m4.js} +2 -2
  32. package/bin/{chunk-3xfhbvar.js → chunk-8na8a41a.js} +1 -1
  33. package/bin/{chunk-zned6mj8.js → chunk-8skgcmxm.js} +1 -1
  34. package/bin/{chunk-7e39zmss.js → chunk-8ttfy5yy.js} +1 -1
  35. package/bin/{chunk-6b0f3d07.js → chunk-8vc1m0kw.js} +2 -2
  36. package/bin/{chunk-5e48saab.js → chunk-8vvr1ez5.js} +1 -1
  37. package/bin/chunk-95qc4bkh.js +2 -0
  38. package/bin/{chunk-4rexdetz.js → chunk-97y52q3a.js} +3 -3
  39. package/bin/{chunk-k41vt2gq.js → chunk-9nd5m7hy.js} +1 -1
  40. package/bin/{chunk-d4sjezbk.js → chunk-afzc5eae.js} +1 -1
  41. package/bin/{chunk-n73dbqps.js → chunk-ampyjbj4.js} +1 -1
  42. package/bin/{chunk-7xfx7741.js → chunk-arxd4qb9.js} +1 -1
  43. package/bin/{chunk-nabagpah.js → chunk-avvzqqk2.js} +2 -2
  44. package/bin/{chunk-sddrv3ep.js → chunk-b93djch5.js} +1 -1
  45. package/bin/{chunk-7kdz1eng.js → chunk-bg10gwm1.js} +2 -2
  46. package/bin/{chunk-nn5qpr0q.js → chunk-bkcf4hw5.js} +1 -1
  47. package/bin/{chunk-kfbztymc.js → chunk-bv642x5z.js} +2 -2
  48. package/bin/{chunk-1apsnd7e.js → chunk-c2a5x1pk.js} +1 -1
  49. package/bin/{chunk-w3xzd86e.js → chunk-c5esphve.js} +2 -2
  50. package/bin/{chunk-ersxsrz8.js → chunk-cbjfw47x.js} +2 -2
  51. package/bin/{chunk-d4sg0z3y.js → chunk-d1zpcags.js} +2 -2
  52. package/bin/{chunk-e6rmqgzv.js → chunk-d4zx3r12.js} +1 -1
  53. package/bin/{chunk-z544s59c.js → chunk-f70xdh07.js} +2 -2
  54. package/bin/{chunk-ankkm2wz.js → chunk-f7fevgv2.js} +2 -2
  55. package/bin/{chunk-6gjn8trh.js → chunk-fcvtv783.js} +1 -1
  56. package/bin/chunk-fgda7ncw.js +2 -0
  57. package/bin/{chunk-gg1wfpm8.js → chunk-fnkrzqrn.js} +2 -2
  58. package/bin/{chunk-qw5yjhab.js → chunk-fq6emqwq.js} +3 -3
  59. package/bin/{chunk-bpb0szs5.js → chunk-fw5k0xrc.js} +2 -2
  60. package/bin/{chunk-pew69nxg.js → chunk-g0jy85re.js} +2 -2
  61. package/bin/{chunk-tbdgkpgw.js → chunk-g5mpp3nc.js} +1 -1
  62. package/bin/{chunk-8tnq43k9.js → chunk-gd1x3rgn.js} +1 -1
  63. package/bin/{chunk-7pcba64w.js → chunk-gwxzjc0m.js} +1 -1
  64. package/bin/chunk-h2tztyxs.js +1 -0
  65. package/bin/{chunk-zpq34g0w.js → chunk-hbrndqpj.js} +2 -2
  66. package/bin/{chunk-03pw611p.js → chunk-hk7a2mgn.js} +2 -2
  67. package/bin/{chunk-q2shr586.js → chunk-jf5ytqxd.js} +1 -1
  68. package/bin/{chunk-sfmhbk59.js → chunk-jkapr5we.js} +1 -1
  69. package/bin/chunk-jqyprvqd.js +1 -0
  70. package/bin/chunk-jyeyp8p3.js +1 -0
  71. package/bin/{chunk-n7cmya8k.js → chunk-kn4tnhbw.js} +2 -2
  72. package/bin/{chunk-q9tm2d21.js → chunk-ks8deg42.js} +1 -1
  73. package/bin/chunk-kwr4m6vh.js +1 -0
  74. package/bin/chunk-n62kyrh1.js +1 -0
  75. package/bin/{chunk-j5q3t199.js → chunk-n67rfv86.js} +2 -2
  76. package/bin/{chunk-cwpmf8tx.js → chunk-nh4tzzn8.js} +2 -2
  77. package/bin/{chunk-bn1sts8x.js → chunk-ntxwp6aa.js} +1 -1
  78. package/bin/{chunk-2ydhnafa.js → chunk-p33nq4pp.js} +2 -2
  79. package/bin/{chunk-8wzepzp3.js → chunk-p3k6nzhe.js} +2 -2
  80. package/bin/{chunk-jgxhv36z.js → chunk-q0znwxfe.js} +1 -1
  81. package/bin/{chunk-898hrxwq.js → chunk-qm9w9fcv.js} +2 -2
  82. package/bin/{chunk-dtjx1097.js → chunk-qxwfhv63.js} +1 -1
  83. package/bin/{chunk-c1j58ekb.js → chunk-r9s1zs4g.js} +2 -2
  84. package/bin/{chunk-3vbx3x11.js → chunk-rek85wwv.js} +2 -2
  85. package/bin/{chunk-k78m3rar.js → chunk-s0g0bc6t.js} +2 -2
  86. package/bin/{chunk-m8tnsds1.js → chunk-s0k2r6ym.js} +2 -2
  87. package/bin/{chunk-xkh6b42h.js → chunk-sx1neqgr.js} +1 -1
  88. package/bin/{chunk-gg8dmkwd.js → chunk-t58kqafx.js} +2 -2
  89. package/bin/{chunk-c4nenmry.js → chunk-th07gms7.js} +1 -1
  90. package/bin/{chunk-3t7v2de9.js → chunk-v0cdg3n6.js} +1 -1
  91. package/bin/{chunk-axe5rq99.js → chunk-v4re49f5.js} +1 -1
  92. package/bin/{chunk-9deae0n7.js → chunk-vpq224tm.js} +1 -1
  93. package/bin/{chunk-6ab9eftx.js → chunk-vvr179pz.js} +1 -1
  94. package/bin/{chunk-2y9t0qxp.js → chunk-vzb2b89p.js} +1 -1
  95. package/bin/{chunk-bhqrqt97.js → chunk-w8vk30ze.js} +2 -2
  96. package/bin/{chunk-jnx8p6kj.js → chunk-weean2ja.js} +1 -1
  97. package/bin/{chunk-89chaa11.js → chunk-wg5tjyj9.js} +2 -2
  98. package/bin/{chunk-4a185tez.js → chunk-wknqst3v.js} +3 -3
  99. package/bin/chunk-x217skr3.js +2 -0
  100. package/bin/{chunk-s5s1rk4n.js → chunk-x2z5zz01.js} +1 -1
  101. package/bin/{chunk-5dqn7egd.js → chunk-xnzyt0kq.js} +1 -1
  102. package/bin/{chunk-58y9bagr.js → chunk-xqkwpr7s.js} +2 -2
  103. package/bin/{chunk-ardp3pze.js → chunk-xt9n0y9a.js} +1 -1
  104. package/bin/{chunk-2errtbmb.js → chunk-y6aa5ee0.js} +1 -1
  105. package/bin/{chunk-vzx1r87y.js → chunk-zj1rz1s9.js} +2 -2
  106. package/bin/shumai-app.html +1 -1
  107. package/bin/shumai-app.js +214 -205
  108. package/package.json +7 -7
  109. package/bin/chunk-0ark0qrm.js +0 -1
  110. package/bin/chunk-21h9kgp5.js +0 -1
  111. package/bin/chunk-61hfhfce.js +0 -2
  112. package/bin/chunk-7h1m1e0b.js +0 -1
  113. package/bin/chunk-8btfb5g6.js +0 -2
  114. package/bin/chunk-e32bzfza.js +0 -1
  115. package/bin/chunk-gnx9g8px.js +0 -2
  116. package/bin/chunk-krpr6g8a.js +0 -1
  117. package/bin/chunk-mfmcsdd7.js +0 -1
  118. package/bin/chunk-msjv1ykh.js +0 -2
  119. package/bin/chunk-q7v8sj72.js +0 -1
  120. package/bin/chunk-twhj7h73.js +0 -1
  121. package/bin/chunk-yn7mxpmb.js +0 -7
@@ -1,4 +1,4 @@
1
- import{Bg as TJ,Cg as PZ,Pg as N5,zg as x0}from"./chunk-ersxsrz8.js";import{Jk as TZ}from"./chunk-8tnq43k9.js";var FQ=TZ(x0(),1);var b5=({onResize:J,className:Q=""})=>{let[Z,$]=FQ.useState(!1),q=FQ.useRef(0);FQ.useEffect(()=>{if(!Z)return;let K=(B)=>{let N=B.clientX-q.current;q.current=B.clientX,J(N)},X=()=>{$(!1),document.body.style.cursor=""};return document.addEventListener("mousemove",K),document.addEventListener("mouseup",X),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",X),document.body.style.cursor=""}},[Z,J]);let Y=(K)=>{K.preventDefault(),K.stopPropagation(),$(!0),q.current=K.clientX},H=()=>TJ("div",{className:"absolute inset-y-0 -left-4 -right-4 z-20 cursor-col-resize touch-none"});return PZ("div",{className:`group relative z-20 flex h-full w-[2px] cursor-col-resize items-center justify-center bg-border transition-all hover:bg-transparent ${Q}`,onMouseDown:Y,children:[TJ(H,{}),TJ("div",{className:`absolute inset-y-0 w-[2px] transition-all duration-300 ease-out
1
+ import{Ag as x0,Cg as TJ,Dg as PZ,Qg as N5}from"./chunk-cbjfw47x.js";import{Kk as TZ}from"./chunk-gd1x3rgn.js";var FQ=TZ(x0(),1);var b5=({onResize:J,className:Q=""})=>{let[Z,$]=FQ.useState(!1),q=FQ.useRef(0);FQ.useEffect(()=>{if(!Z)return;let K=(B)=>{let N=B.clientX-q.current;q.current=B.clientX,J(N)},X=()=>{$(!1),document.body.style.cursor=""};return document.addEventListener("mousemove",K),document.addEventListener("mouseup",X),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",X),document.body.style.cursor=""}},[Z,J]);let Y=(K)=>{K.preventDefault(),K.stopPropagation(),$(!0),q.current=K.clientX},H=()=>TJ("div",{className:"absolute inset-y-0 -left-4 -right-4 z-20 cursor-col-resize touch-none"});return PZ("div",{className:`group relative z-20 flex h-full w-[2px] cursor-col-resize items-center justify-center bg-border transition-all hover:bg-transparent ${Q}`,onMouseDown:Y,children:[TJ(H,{}),TJ("div",{className:`absolute inset-y-0 w-[2px] transition-all duration-300 ease-out
2
2
  ${Z?"bg-blue-600 shadow-[0_0_15px_rgba(37,99,235,0.6)] opacity-100":"bg-blue-400 opacity-0 group-hover:opacity-100 group-hover:shadow-[0_0_8px_rgba(96,165,250,0.5)]"}
3
3
  `}),TJ("div",{className:`absolute top-1/2 left-1/2 h-10 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-600 transition-all duration-300 ease-out
4
4
  ${Z?"opacity-100 scale-100 shadow-[0_0_10px_rgba(37,99,235,0.5)]":"opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100"}`})]})};var e$=Symbol.for("preact-signals");function xZ(){if(!(PJ>1)){var J,Q=!1;(function(){var q=SZ;SZ=void 0;while(q!==void 0){if(q.S.v===q.v)q.S.i=q.i;q=q.o}})();while(cQ!==void 0){var Z=cQ;cQ=void 0,EZ++;while(Z!==void 0){var $=Z.u;if(Z.u=void 0,Z.f&=-3,!(8&Z.f)&&_9(Z))try{Z.c()}catch(q){if(!Q)J=q,Q=!0}Z=$}}if(EZ=0,PJ--,Q)throw J}else PJ--}function JJ(J){if(PJ>0)return J();h0=++Jq,PJ++;try{return J()}finally{xZ()}}var k=void 0;function C(J){var Q=k;k=void 0;try{return J()}finally{k=Q}}var p9,cQ=void 0,PJ=0,EZ=0,Jq=0,h0=0,SZ=void 0,kZ=0;function d9(J){if(k!==void 0){var Q=J.n;if(Q===void 0||Q.t!==k){if(Q={i:0,S:J,p:k.s,n:void 0,t:k,e:void 0,x:void 0,r:Q},k.s!==void 0)k.s.n=Q;if(k.s=Q,J.n=Q,32&k.f)J.S(Q);return Q}else if(Q.i===-1){if(Q.i=0,Q.n!==void 0){if(Q.n.p=Q.p,Q.p!==void 0)Q.p.n=Q.n;Q.p=k.s,Q.n=void 0,k.s.n=Q,k.s=Q}return Q}}}function r(J,Q){this.v=J,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}r.prototype.brand=e$;r.prototype.h=function(){return!0};r.prototype.S=function(J){var Q=this,Z=this.t;if(Z!==J&&J.e===void 0)if(J.x=Z,this.t=J,Z!==void 0)Z.e=J;else C(function(){var $;($=Q.W)==null||$.call(Q)})};r.prototype.U=function(J){var Q=this;if(this.t!==void 0){var{e:Z,x:$}=J;if(Z!==void 0)Z.x=$,J.e=void 0;if($!==void 0)$.e=Z,J.x=void 0;if(J===this.t){if(this.t=$,$===void 0)C(function(){var q;(q=Q.Z)==null||q.call(Q)})}}};r.prototype.subscribe=function(J){var Q=this;return o(function(){var Z=Q.value,$=k;k=void 0;try{J(Z)}finally{k=$}},{name:"sub"})};r.prototype.valueOf=function(){return this.value};r.prototype.toString=function(){return this.value+""};r.prototype.toJSON=function(){return this.value};r.prototype.peek=function(){var J=this;return C(function(){return J.value})};Object.defineProperty(r.prototype,"value",{get:function(){var J=d9(this);if(J!==void 0)J.i=this.i;return this.v},set:function(J){if(J!==this.v){if(EZ>100)throw Error("Cycle detected");(function(Z){if(PJ!==0&&EZ===0){if(Z.l!==h0)Z.l=h0,SZ={S:Z,v:Z.v,i:Z.i,o:SZ}}})(this),this.v=J,this.i++,kZ++,PJ++;try{for(var Q=this.t;Q!==void 0;Q=Q.x)Q.t.N()}finally{xZ()}}}});function IJ(J,Q){return new r(J,Q)}function _9(J){for(var Q=J.s;Q!==void 0;Q=Q.n)if(Q.S.i!==Q.i||!Q.S.h()||Q.S.i!==Q.i)return!0;return!1}function c9(J){for(var Q=J.s;Q!==void 0;Q=Q.n){var Z=Q.S.n;if(Z!==void 0)Q.r=Z;if(Q.S.n=Q,Q.i=-1,Q.n===void 0){J.s=Q;break}}}function l9(J){var Q=J.s,Z=void 0;while(Q!==void 0){var $=Q.p;if(Q.i===-1){if(Q.S.U(Q),$!==void 0)$.n=Q.n;if(Q.n!==void 0)Q.n.p=$}else Z=Q;if(Q.S.n=Q.r,Q.r!==void 0)Q.r=void 0;Q=$}J.s=Z}function sJ(J,Q){r.call(this,void 0),this.x=J,this.s=void 0,this.g=kZ-1,this.f=4,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}sJ.prototype=new r;sJ.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===kZ)return!0;if(this.g=kZ,this.f|=1,this.i>0&&!_9(this))return this.f&=-2,!0;var J=k;try{c9(this),k=this;var Q=this.x();if(16&this.f||this.v!==Q||this.i===0)this.v=Q,this.f&=-17,this.i++}catch(Z){this.v=Z,this.f|=16,this.i++}return k=J,l9(this),this.f&=-2,!0};sJ.prototype.S=function(J){if(this.t===void 0){this.f|=36;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.S(Q)}r.prototype.S.call(this,J)};sJ.prototype.U=function(J){if(this.t!==void 0){if(r.prototype.U.call(this,J),this.t===void 0){this.f&=-33;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.U(Q)}}};sJ.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var J=this.t;J!==void 0;J=J.x)J.t.N()}};Object.defineProperty(sJ.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var J=d9(this);if(this.h(),J!==void 0)J.i=this.i;if(16&this.f)throw this.v;return this.v}});function y0(J,Q){return new sJ(J,Q)}function s9(J){var Q=J.m;if(J.m=void 0,typeof Q=="function"){PJ++;var Z=k;k=void 0;try{Q()}catch($){throw J.f&=-2,J.f|=8,f0(J),$}finally{k=Z,xZ()}}}function f0(J){for(var Q=J.s;Q!==void 0;Q=Q.n)Q.S.U(Q);J.x=void 0,J.s=void 0,s9(J)}function Qq(J){if(k!==this)throw Error("Out-of-order effect");if(l9(this),k=J,this.f&=-2,8&this.f)f0(this);xZ()}function zQ(J,Q){if(this.x=J,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=Q==null?void 0:Q.name,p9)p9.push(this)}zQ.prototype.c=function(){var J=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var Q=this.x();if(typeof Q=="function")this.m=Q}finally{J()}};zQ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,s9(this),c9(this),PJ++;var J=k;return k=this,Qq.bind(this,J)};zQ.prototype.N=function(){if(!(2&this.f))this.f|=2,this.u=cQ,cQ=this};zQ.prototype.d=function(){if(this.f|=8,!(1&this.f))f0(this)};zQ.prototype.dispose=function(){this.d()};function o(J,Q){var Z=new zQ(J,Q);try{Z.c()}catch(q){throw Z.d(),q}var $=Z.d.bind(Z);return $[Symbol.dispose]=$,$}var{create:Zq,defineProperty:s0,defineProperties:$q,getOwnPropertyDescriptor:qq,getOwnPropertyDescriptors:Yq,getOwnPropertySymbols:o9}=Object,Kq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,n9=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),MQ=(J)=>{throw TypeError(J)},m0=(J,Q,Z)=>(Q in J)?s0(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Xq=(J,Q)=>{for(var Z in Q||(Q={}))if(Kq.call(Q,Z))m0(J,Z,Q[Z]);if(o9){for(var Z of o9(Q))if(Hq.call(Q,Z))m0(J,Z,Q[Z])}return J},Wq=(J,Q)=>$q(J,Yq(Q)),i9=(J,Q)=>s0(J,"name",{value:Q,configurable:!0}),Bq=(J)=>{var Q;return[,,,Zq((Q=J==null?void 0:J[n9("metadata")])!=null?Q:null)]},a9=["class","method","getter","setter","accessor","field","value","get","set"],lQ=(J)=>J!==void 0&&typeof J!=="function"?MQ("Function expected"):J,Nq=(J,Q,Z,$,q)=>({kind:a9[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?MQ("Already initialized"):q.push(lQ(Y||null))}),r9=(J,Q)=>m0(Q,n9("metadata"),J[3]),oJ=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},wQ=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=a9[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&qq(W<4?q:{get[Z](){return LJ(this,Y)},set[Z](V){return vJ(this,Y,V)}},Z));W?L&&W<4&&i9(Y,(W>2?"set ":W>1?"get ":"")+Z):i9(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Nq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>Uq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?LJ:Lq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>vJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)lQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)MQ("Object expected");else lQ(H=K.get)&&(U.get=H),lQ(H=K.set)&&(U.set=H),lQ(H=K.init)&&A.unshift(H)}return W||r9(J,q),U&&s0(q,Z,U),L?W^4?Y:U:q},o0=(J,Q,Z)=>Q.has(J)||MQ("Cannot "+Z),Uq=(J,Q)=>Object(Q)!==Q?MQ('Cannot use the "in" operator on this value'):J.has(Q),LJ=(J,Q,Z)=>(o0(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),sQ=(J,Q,Z)=>Q.has(J)?MQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),vJ=(J,Q,Z,$)=>(o0(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Lq=(J,Q,Z)=>(o0(J,Q,"access private method"),Z);function AQ(J,Q){if(Q){let Z;return y0(()=>{let $=J();if($&&Z&&Q(Z,$))return Z;return Z=$,$})}return y0(J)}function EJ(J,Q){if(Object.is(J,Q))return!0;if(J===null||Q===null)return!1;if(typeof J==="function"&&typeof Q==="function")return J===Q;if(J instanceof Set&&Q instanceof Set){if(J.size!==Q.size)return!1;for(let Z of J)if(!Q.has(Z))return!1;return!0}if(Array.isArray(J)){if(!Array.isArray(Q)||J.length!==Q.length)return!1;return!J.some(($,q)=>!EJ($,Q[q]))}if(typeof J==="object"&&typeof Q==="object"){let Z=Object.keys(J),$=Object.keys(Q);if(Z.length!==$.length)return!1;return!Z.some((Y)=>!EJ(J[Y],Q[Y]))}return!1}function T({get:J},Q){return{init(Z){return IJ(Z)},get(){return J.call(this).value},set(Z){let $=J.call(this);if($.peek()===Z)return;$.value=Z}}}function h(J,Q){let Z=new WeakMap;return function(){let $=Z.get(this);if(!$)$=AQ(J.bind(this)),Z.set(this,$);return $.value}}function v0(J=!0){return function(Q,Z){Z.addInitializer(function(){let $=Z.kind==="field"?this:Z.static?this:Object.getPrototypeOf(this),q=Object.getOwnPropertyDescriptor($,Z.name);if(q)Object.defineProperty($,Z.name,Wq(Xq({},q),{enumerable:J}))})}}function nJ(...J){let Q=J.map((Z)=>o(Z));return()=>Q.forEach((Z)=>Z())}var t9,e9,J8,Q8,Z8,$8,QJ,i0,b0,p0,d0,t,n0,g0,q8,_0,a0,u0,c0,l0;$8=[T],Z8=[T],Q8=[T],J8=[v0()],e9=[v0()],t9=[v0()];var jJ=class{constructor(J,Q=Object.is){this.defaultValue=J,this.equals=Q,oJ(QJ,5,this),sQ(this,t),sQ(this,i0,oJ(QJ,8,this)),oJ(QJ,11,this),sQ(this,n0,oJ(QJ,12,this)),oJ(QJ,15,this),sQ(this,a0,oJ(QJ,16,this)),oJ(QJ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return LJ(this,t,c0)}get initial(){return LJ(this,t,p0)}get previous(){return LJ(this,t,q8)}set current(J){let Q=C(()=>LJ(this,t,c0));if(J&&Q&&this.equals(Q,J))return;JJ(()=>{if(!LJ(this,t,p0))vJ(this,t,J,d0);vJ(this,t,Q,_0),vJ(this,t,J,l0)})}reset(J=this.defaultValue){JJ(()=>{vJ(this,t,void 0,_0),vJ(this,t,J,d0),vJ(this,t,J,l0)})}};QJ=Bq(null);i0=new WeakMap;t=new WeakSet;n0=new WeakMap;a0=new WeakMap;b0=wQ(QJ,20,"#initial",$8,t,i0),p0=b0.get,d0=b0.set;g0=wQ(QJ,20,"#previous",Z8,t,n0),q8=g0.get,_0=g0.set;u0=wQ(QJ,20,"#current",Q8,t,a0),c0=u0.get,l0=u0.set;wQ(QJ,2,"current",J8,jJ);wQ(QJ,2,"initial",e9,jJ);wQ(QJ,2,"previous",t9,jJ);r9(QJ,jJ);function hZ(J){return C(()=>{let Q={};for(let Z in J)Q[Z]=J[Z];return Q})}var iJ,o5=class{constructor(){sQ(this,iJ,new WeakMap)}get(J,Q){var Z;return J?(Z=LJ(this,iJ).get(J))==null?void 0:Z.get(Q):void 0}set(J,Q,Z){var $;if(!J)return;if(!LJ(this,iJ).has(J))LJ(this,iJ).set(J,new Map);return($=LJ(this,iJ).get(J))==null?void 0:$.set(Q,Z)}clear(J){var Q;return J?(Q=LJ(this,iJ).get(J))==null?void 0:Q.clear():void 0}};iJ=new WeakMap;var{create:Gq,defineProperty:Q1,getOwnPropertyDescriptor:Vq,getOwnPropertySymbols:Y8}=Object,Fq=Object.prototype.hasOwnProperty,zq=Object.prototype.propertyIsEnumerable,X8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),IQ=(J)=>{throw TypeError(J)},K8=Math.pow,r0=(J,Q,Z)=>(Q in J)?Q1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Mq=(J,Q)=>{for(var Z in Q||(Q={}))if(Fq.call(Q,Z))r0(J,Z,Q[Z]);if(Y8){for(var Z of Y8(Q))if(zq.call(Q,Z))r0(J,Z,Q[Z])}return J},H8=(J,Q)=>Q1(J,"name",{value:Q,configurable:!0}),wq=(J)=>{var Q;return[,,,Gq((Q=J==null?void 0:J[X8("metadata")])!=null?Q:null)]},W8=["class","method","getter","setter","accessor","field","value","get","set"],oQ=(J)=>J!==void 0&&typeof J!=="function"?IQ("Function expected"):J,Aq=(J,Q,Z,$,q)=>({kind:W8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?IQ("Already initialized"):q.push(oQ(Y||null))}),B8=(J,Q)=>r0(Q,X8("metadata"),J[3]),Iq=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},N8=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=W8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Vq(W<4?q:{get[Z](){return t0(this,Y)},set[Z](V){return e0(this,Y,V)}},Z));W?L&&W<4&&H8(Y,(W>2?"set ":W>1?"get ":"")+Z):H8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Aq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>jq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?t0:Rq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>e0(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)oQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)IQ("Object expected");else oQ(H=K.get)&&(U.get=H),oQ(H=K.set)&&(U.set=H),oQ(H=K.init)&&A.unshift(H)}return W||B8(J,q),U&&Q1(q,Z,U),L?W^4?Y:U:q},Z1=(J,Q,Z)=>Q.has(J)||IQ("Cannot "+Z),jq=(J,Q)=>Object(Q)!==Q?IQ('Cannot use the "in" operator on this value'):J.has(Q),t0=(J,Q,Z)=>(Z1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),Oq=(J,Q,Z)=>Q.has(J)?IQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),e0=(J,Q,Z,$)=>(Z1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Rq=(J,Q,Z)=>(Z1(J,Q,"access private method"),Z),e=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},XJ=class J{constructor(Q,Z,$,q){this.left=Q,this.top=Z,this.width=$,this.height=q,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(Q,Z){let{top:$,left:q,width:Y,height:H,scale:K}=this,X=new J(q+Q,$+Z,Y,H);return X.scale=Mq({},K),X}get boundingRectangle(){let{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}=this;return{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}}get center(){let{left:Q,top:Z,right:$,bottom:q}=this;return new e((Q+$)/2,(Z+q)/2)}get area(){let{width:Q,height:Z}=this;return Q*Z}equals(Q){if(!(Q instanceof J))return!1;let{left:Z,top:$,width:q,height:Y}=this;return Z===Q.left&&$===Q.top&&q===Q.width&&Y===Q.height}containsPoint(Q){let{top:Z,left:$,bottom:q,right:Y}=this;return Z<=Q.y&&Q.y<=q&&$<=Q.x&&Q.x<=Y}intersectionArea(Q){if(Q instanceof J)return Dq(this,Q);return 0}intersectionRatio(Q){let{area:Z}=this,$=this.intersectionArea(Q);return $/(Q.area+Z-$)}get bottom(){let{top:Q,height:Z}=this;return Q+Z}get right(){let{left:Q,width:Z}=this;return Q+Z}get aspectRatio(){let{width:Q,height:Z}=this;return Q/Z}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:Q,left:Z,width:$,height:q}){return new J(Z,Q,$,q)}static delta(Q,Z,$={x:"center",y:"center"}){let q=(Y,H)=>{let K=$[H],X=H==="x"?Y.left:Y.top,B=H==="x"?Y.width:Y.height;if(K=="start")return X;if(K=="end")return X+B;return X+B/2};return e.delta({x:q(Q,"x"),y:q(Q,"y")},{x:q(Z,"x"),y:q(Z,"y")})}static intersectionRatio(Q,Z){return J.from(Q).intersectionRatio(J.from(Z))}};function Dq(J,Q){let Z=Math.max(Q.top,J.top),$=Math.max(Q.left,J.left),q=Math.min(Q.left+Q.width,J.left+J.width),Y=Math.min(Q.top+Q.height,J.top+J.height),H=q-$,K=Y-Z;if($<q&&Z<Y)return H*K;return 0}var U8,L8,J1,yZ,iQ,nQ=class extends(J1=jJ,L8=[h],U8=[h],J1){constructor(J){let Q=e.from(J);super(Q,(Z,$)=>e.equals(Z,$));Iq(iQ,5,this),Oq(this,yZ,0),this.velocity={x:0,y:0}}get delta(){return e.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=e.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-t0(this,yZ),H=(K)=>Math.round(K/Y*100);JJ(()=>{e0(this,yZ,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(e.from(J)),this.velocity={x:0,y:0}}};iQ=wq(J1);yZ=new WeakMap;N8(iQ,2,"delta",L8,nQ);N8(iQ,2,"direction",U8,nQ);B8(iQ,nQ);function fZ({x:J,y:Q},Z){let $=Math.abs(J),q=Math.abs(Q);if(typeof Z==="number")return Math.sqrt(K8($,2)+K8(q,2))>Z;if("x"in Z&&"y"in Z)return $>Z.x&&q>Z.y;if("x"in Z)return $>Z.x;if("y"in Z)return q>Z.y;return!1}var G8=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(G8||{}),$1=Object.values(G8);var{create:Cq,defineProperty:X1,defineProperties:Tq,getOwnPropertyDescriptor:Pq,getOwnPropertyDescriptors:Eq,getOwnPropertySymbols:dZ}=Object,M8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,A8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),TQ=(J)=>{throw TypeError(J)},Y1=(J,Q,Z)=>(Q in J)?X1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,W1=(J,Q)=>{for(var Z in Q||(Q={}))if(M8.call(Q,Z))Y1(J,Z,Q[Z]);if(dZ){for(var Z of dZ(Q))if(w8.call(Q,Z))Y1(J,Z,Q[Z])}return J},B1=(J,Q)=>Tq(J,Eq(Q)),V8=(J,Q)=>X1(J,"name",{value:Q,configurable:!0}),I8=(J,Q)=>{var Z={};for(var $ in J)if(M8.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&dZ){for(var $ of dZ(J))if(Q.indexOf($)<0&&w8.call(J,$))Z[$]=J[$]}return Z},PQ=(J)=>{var Q;return[,,,Cq((Q=J==null?void 0:J[A8("metadata")])!=null?Q:null)]},j8=["class","method","getter","setter","accessor","field","value","get","set"],aQ=(J)=>J!==void 0&&typeof J!=="function"?TQ("Function expected"):J,Sq=(J,Q,Z,$,q)=>({kind:j8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?TQ("Already initialized"):q.push(aQ(Y||null))}),rJ=(J,Q)=>Y1(Q,A8("metadata"),J[3]),O=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},P=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=j8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Pq(W<4?q:{get[Z](){return u(this,Y)},set[Z](V){return WJ(this,Y,V)}},Z));W?L&&W<4&&V8(Y,(W>2?"set ":W>1?"get ":"")+Z):V8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Sq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>kq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?u:O8)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>WJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)aQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)TQ("Object expected");else aQ(H=K.get)&&(U.get=H),aQ(H=K.set)&&(U.set=H),aQ(H=K.init)&&A.unshift(H)}return W||rJ(J,q),U&&X1(q,Z,U),L?W^4?Y:U:q},N1=(J,Q,Z)=>Q.has(J)||TQ("Cannot "+Z),kq=(J,Q)=>Object(Q)!==Q?TQ('Cannot use the "in" operator on this value'):J.has(Q),u=(J,Q,Z)=>(N1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),E=(J,Q,Z)=>Q.has(J)?TQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),WJ=(J,Q,Z,$)=>(N1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),O8=(J,Q,Z)=>(N1(J,Q,"access private method"),Z);function R8(J,Q){return{plugin:J,options:Q}}function EQ(J){return(Q)=>{return R8(J,Q)}}function CQ(J){if(typeof J==="function")return{plugin:J,options:void 0};return J}var D8,eQ,U1,bZ;D8=[T];var $J=class{constructor(J,Q){this.manager=J,this.options=Q,E(this,U1,O(eQ,8,this,!1)),O(eQ,11,this),E(this,bZ,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return C(()=>{return this.disabled})}configure(J){this.options=J}registerEffect(J){let Q=o(J.bind(this));return u(this,bZ).add(Q),Q}destroy(){u(this,bZ).forEach((J)=>J())}static configure(J){return R8(this,J)}};eQ=PQ(null);U1=new WeakMap;bZ=new WeakMap;P(eQ,4,"disabled",D8,$J,U1);rJ(eQ,$J);var SQ=class extends $J{},gZ,q1=class{constructor(J){this.manager=J,this.instances=new Map,E(this,gZ,[])}get values(){return Array.from(this.instances.values())}set values(J){let Q=J.map(CQ).reduce(($,q)=>{let Y=$.find(({plugin:H})=>H===q.plugin);if(Y)return Y.options=q.options,$;return[...$,q]},[]),Z=Q.map(({plugin:$})=>$);for(let $ of u(this,gZ))if(!Z.includes($)){if($.prototype instanceof SQ)continue;this.unregister($)}for(let{plugin:$,options:q}of Q)this.register($,q);WJ(this,gZ,Z)}get(J){return this.instances.get(J)}register(J,Q){let Z=this.instances.get(J);if(Z){if(Z.options!==Q)Z.options=Q;return Z}let $=new J(this.manager,Q);return this.instances.set(J,$),$}unregister(J){let Q=this.instances.get(J);if(Q)Q.destroy(),this.instances.delete(J)}destroy(){for(let J of this.instances.values())J.destroy();this.instances.clear()}};gZ=new WeakMap;function xq(J,Q){if(J.priority===Q.priority){if(J.type===Q.type)return Q.value-J.value;return Q.type-J.type}return Q.priority-J.priority}var vZ=[],jQ,OQ,hq=class extends $J{constructor(J){super(J);E(this,jQ),E(this,OQ),this.computeCollisions=this.computeCollisions.bind(this),WJ(this,OQ,IJ(vZ)),this.destroy=nJ(()=>{let Q=this.computeCollisions(),Z=C(()=>this.manager.dragOperation.position.current);if(Q!==vZ){let $=u(this,jQ);if(WJ(this,jQ,Z),$&&Z.x==$.x&&Z.y==$.y)return}else WJ(this,jQ,void 0);u(this,OQ).value=Q},()=>{let{dragOperation:Q}=this.manager;if(Q.status.initialized)this.forceUpdate()})}forceUpdate(J=!0){C(()=>{if(J)u(this,OQ).value=this.computeCollisions();else WJ(this,jQ,void 0)})}computeCollisions(J,Q){let{registry:Z,dragOperation:$}=this.manager,{source:q,shape:Y,status:H}=$;if(!H.initialized||!Y)return vZ;let K=[],X=[];for(let B of J!=null?J:Z.droppables){if(B.disabled)continue;if(q&&!B.accepts(q))continue;let N=Q!=null?Q:B.collisionDetector;if(!N)continue;X.push(B),B.shape;let W=C(()=>N({droppable:B,dragOperation:$}));if(W){if(B.collisionPriority!=null)W.priority=B.collisionPriority;K.push(W)}}if(X.length===0)return vZ;return K.sort(xq),K}get collisions(){return u(this,OQ).value}};jQ=new WeakMap;OQ=new WeakMap;var C8,T8,P8,L1,E8,zJ,G1,DQ,V1,F1;P8=[T],T8=[T],C8=[T];var SJ=class J{constructor(Q,Z){E(this,G1,O(zJ,8,this)),O(zJ,11,this),E(this,DQ),E(this,V1,O(zJ,12,this)),O(zJ,15,this),E(this,F1,O(zJ,16,this)),O(zJ,19,this);let{effects:$,id:q,data:Y={},disabled:H=!1,register:K=!0}=Q,X=q;if(WJ(this,DQ,IJ(q)),this.manager=Z,this.data=Y,this.disabled=H,this.effects=()=>{var B;return[()=>{let{id:N,manager:W}=this;if(N===X)return;return X=N,W==null||W.registry.register(this),()=>W==null?void 0:W.registry.unregister(this)},...(B=$==null?void 0:$())!=null?B:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),Z&&K)queueMicrotask(this.register)}get id(){var Q,Z;let $=u(this,DQ).value;return(Z=(Q=J.pendingIdChanges)==null?void 0:Q.get(this))!=null?Z:$}set id(Q){var Z,$;let q=($=(Z=J.pendingIdChanges)==null?void 0:Z.get(this))!=null?$:u(this,DQ).peek();if(Q===q)return;if(!J.pendingIdChanges)J.pendingIdChanges=new Map,queueMicrotask(()=>{var Y;return O8(Y=J,L1,E8).call(Y)});J.pendingIdChanges.set(this,Q)}register(){var Q;return(Q=this.manager)==null?void 0:Q.registry.register(this)}unregister(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}destroy(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}};zJ=PQ(null);L1=new WeakSet;E8=function(){let J=SJ.pendingIdChanges;if(SJ.pendingIdChanges=null,J)JJ(()=>{for(let[Q,Z]of J)u(Q,DQ).value=Z})};G1=new WeakMap;DQ=new WeakMap;V1=new WeakMap;F1=new WeakMap;P(zJ,4,"manager",P8,SJ,G1);P(zJ,4,"data",T8,SJ,V1);P(zJ,4,"disabled",C8,SJ,F1);E(SJ,L1);rJ(zJ,SJ);SJ.pendingIdChanges=null;var _Z=SJ,F8=class{constructor(){this.map=IJ(new Map),this.cleanupFunctions=new WeakMap,this.register=(J,Q)=>{let Z=this.map.peek(),$=Z.get(J),q=()=>this.unregister(J,Q);if($===Q)return q;if($){if($.id===J){let K=this.cleanupFunctions.get($);K==null||K(),this.cleanupFunctions.delete($)}}let Y=new Map(Z);for(let[K,X]of Z)if(X===Q&&K!==J){Y.delete(K);break}Y.set(J,Q),this.map.value=Y;let H=nJ(...Q.effects());return this.cleanupFunctions.set(Q,H),q},this.unregister=(J,Q)=>{let Z=this.map.peek();if(Z.get(J)!==Q)return;let $=this.cleanupFunctions.get(Q);$==null||$(),this.cleanupFunctions.delete(Q);let q=new Map(Z);q.delete(J),this.map.value=q}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(J){return this.map.value.has(J)}get(J){return this.map.value.get(J)}destroy(){for(let J of this){let Q=this.cleanupFunctions.get(J);Q==null||Q(),J.destroy()}this.map.value=new Map}},S8,k8,x8,h8,y8,f8,K1,ZJ,z1,M1,w1,MJ=class extends(K1=_Z,f8=[T],y8=[T],h8=[T],x8=[h],k8=[h],S8=[h],K1){constructor(J,Q){var Z=J,{modifiers:$,type:q,sensors:Y,plugins:H,effects:K}=Z,X=I8(Z,["modifiers","type","sensors","plugins","effects"]);super(B1(W1({},X),{effects:()=>{var B;return[...(B=K==null?void 0:K())!=null?B:[],()=>{let{manager:N,plugins:W}=this;if(!N||!W)return;for(let G of W){let{plugin:L}=CQ(G);N.registry.plugins.register(L)}}]}}),Q);O(ZJ,5,this),E(this,z1,O(ZJ,8,this)),O(ZJ,11,this),E(this,M1,O(ZJ,12,this)),O(ZJ,15,this),E(this,w1,O(ZJ,16,this,this.isDragSource?"dragging":"idle")),O(ZJ,19,this),this.type=q,this.sensors=Y,this.modifiers=$,this.alignment=X.alignment,this.plugins=H}pluginConfig(J){if(!this.plugins)return;for(let Q of this.plugins){let Z=CQ(Q);if(Z.plugin===J)return Z.options}return}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.source)==null?void 0:Q.id)===this.id}};ZJ=PQ(K1);z1=new WeakMap;M1=new WeakMap;w1=new WeakMap;P(ZJ,4,"type",f8,MJ,z1);P(ZJ,4,"modifiers",y8,MJ,M1);P(ZJ,4,"status",h8,MJ,w1);P(ZJ,2,"isDropping",x8,MJ);P(ZJ,2,"isDragging",k8,MJ);P(ZJ,2,"isDragSource",S8,MJ);rJ(ZJ,MJ);var v8,b8,g8,u8,m8,p8,H1,c,A1,I1,j1,O1,R1,wJ=class extends(H1=_Z,p8=[T],m8=[T],u8=[T],g8=[T],b8=[T],v8=[h],H1){constructor(J,Q){var Z=J,{accept:$,collisionDetector:q,collisionPriority:Y,type:H}=Z,K=I8(Z,["accept","collisionDetector","collisionPriority","type"]);super(K,Q);O(c,5,this),E(this,A1,O(c,8,this)),O(c,11,this),E(this,I1,O(c,12,this)),O(c,15,this),E(this,j1,O(c,16,this)),O(c,19,this),E(this,O1,O(c,20,this)),O(c,23,this),E(this,R1,O(c,24,this)),O(c,27,this),this.accept=$,this.collisionDetector=q,this.collisionPriority=Y,this.type=H}accepts(J){let{accept:Q}=this;if(!Q)return!0;if(typeof Q==="function")return Q(J);if(!J.type)return!1;if(Array.isArray(Q))return Q.includes(J.type);return J.type===Q}get isDropTarget(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.target)==null?void 0:Q.id)===this.id}};c=PQ(H1);A1=new WeakMap;I1=new WeakMap;j1=new WeakMap;O1=new WeakMap;R1=new WeakMap;P(c,4,"accept",p8,wJ,A1);P(c,4,"type",m8,wJ,I1);P(c,4,"collisionDetector",u8,wJ,j1);P(c,4,"collisionPriority",g8,wJ,O1);P(c,4,"shape",b8,wJ,R1);P(c,2,"isDropTarget",v8,wJ);rJ(c,wJ);var yq=class{constructor(){this.registry=new Map}addEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));return $.add(Q),Z.set(J,$),()=>this.removeEventListener(J,Q)}removeEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));$.delete(Q),Z.set(J,$)}dispatch(J,...Q){let{registry:Z}=this,$=Z.get(J);if(!$)return;for(let q of $)q(...Q)}},fq=class extends yq{constructor(J){super();this.manager=J}dispatch(J,Q){let Z=[Q,this.manager];super.dispatch(J,...Z)}};function uZ(J,Q=!0){let Z=!1;return B1(W1({},J),{cancelable:Q,get defaultPrevented(){return Z},preventDefault(){if(!Q)return;Z=!0}})}var vq=class extends SQ{constructor(J){super(J);let Q=($,q)=>$.map(({id:Y})=>Y).join("")===q.map(({id:Y})=>Y).join(""),Z=[];this.destroy=nJ(()=>{let{dragOperation:$,collisionObserver:q}=J;if($.status.initializing)Z=[],q.enable()},()=>{let{collisionObserver:$,monitor:q}=J,{collisions:Y}=$;if($.isDisabled())return;if(_Z.pendingIdChanges)return;let H=uZ({collisions:Y});if(q.dispatch("collision",H),H.defaultPrevented)return;if(Q(Y,Z))return;else Z=Y;let[K]=Y;C(()=>{var X;if((K==null?void 0:K.id)!==((X=J.dragOperation.target)==null?void 0:X.id))$.disable(),J.actions.setDropTarget(K==null?void 0:K.id).then(()=>{$.enable()})})})}},OJ=((J)=>{return J[J.Lowest=0]="Lowest",J[J.Low=1]="Low",J[J.Normal=2]="Normal",J[J.High=3]="High",J[J.Highest=4]="Highest",J})(OJ||{}),RJ=((J)=>{return J[J.Collision=0]="Collision",J[J.ShapeIntersection=1]="ShapeIntersection",J[J.PointerIntersection=2]="PointerIntersection",J})(RJ||{}),d8,_8,c8,l8,s8,o8,i8,GJ,D1;i8=[T],o8=[h],s8=[h],l8=[h],c8=[h],_8=[h],d8=[h];var kJ=class{constructor(){O(GJ,5,this),E(this,D1,O(GJ,8,this,"idle")),O(GJ,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){let{value:J}=this;return J!=="idle"&&J!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(J){this.value=J}};GJ=PQ(null);D1=new WeakMap;P(GJ,4,"value",i8,kJ,D1);P(GJ,2,"current",o8,kJ);P(GJ,2,"idle",s8,kJ);P(GJ,2,"initializing",l8,kJ);P(GJ,2,"initialized",c8,kJ);P(GJ,2,"dragging",_8,kJ);P(GJ,2,"dropped",d8,kJ);rJ(GJ,kJ);var bq=class{constructor(J){this.manager=J}setDragSource(J){let{dragOperation:Q}=this.manager;Q.sourceIdentifier=typeof J==="string"||typeof J==="number"?J:J.id}setDropTarget(J){return C(()=>{let{dragOperation:Q}=this.manager,Z=J!=null?J:null;if(Q.targetIdentifier===Z)return Promise.resolve(!1);Q.targetIdentifier=Z;let $=uZ({operation:Q.snapshot()});if(Q.status.dragging)this.manager.monitor.dispatch("dragover",$);return this.manager.renderer.rendering.then(()=>$.defaultPrevented)})}start(J){return C(()=>{let{dragOperation:Q}=this.manager;if(J.source!=null)this.setDragSource(J.source);if(!Q.source)throw Error("Cannot start a drag operation without a drag source");if(!Q.status.idle)throw Error("Cannot start a drag operation while another is active");let $=new AbortController,{event:q,coordinates:Y}=J;JJ(()=>{Q.status.set("initialization-pending"),Q.shape=null,Q.canceled=!1,Q.activatorEvent=q!=null?q:null,Q.position.reset(Y)});let H=uZ({operation:Q.snapshot()});if(this.manager.monitor.dispatch("beforedragstart",H),H.defaultPrevented)return Q.reset(),$.abort(),$;return Q.status.set("initializing"),Q.controller=$,this.manager.renderer.rendering.then(()=>{if($.signal.aborted)return;let{status:K}=Q;if(K.current!=="initializing")return;JJ(()=>{Q.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:q,operation:Q.snapshot(),cancelable:!1})})}),$})}move(J){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{status:q,controller:Y}=$;if(!q.dragging||!Y||Y.signal.aborted)return;let H=uZ({nativeEvent:J.event,operation:$.snapshot(),by:J.by,to:J.to},(Q=J.cancelable)!=null?Q:!0);if((Z=J.propagate)!=null?Z:!0)this.manager.monitor.dispatch("dragmove",H);queueMicrotask(()=>{var K,X,B,N,W;if(H.defaultPrevented)return;let G=(W=J.to)!=null?W:{x:$.position.current.x+((X=(K=J.by)==null?void 0:K.x)!=null?X:0),y:$.position.current.y+((N=(B=J.by)==null?void 0:B.y)!=null?N:0)};$.position.current=G})})}stop(J={}){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{controller:q}=$;if(!q||q.signal.aborted)return;let Y,H=()=>{let X={resume:()=>{},abort:()=>{}};return Y=new Promise((B,N)=>{X.resume=B,X.abort=N}),X};q.abort();let K=()=>{this.manager.renderer.rendering.then(()=>{$.status.set("dropped");let X=C(()=>{var N;return((N=$.source)==null?void 0:N.status)==="dropping"}),B=()=>{if($.controller===q)$.controller=void 0;$.reset()};if(X){let{source:N}=$,W=o(()=>{if((N==null?void 0:N.status)==="idle")W(),B()})}else this.manager.renderer.rendering.then(B)})};if($.canceled=(Q=J.canceled)!=null?Q:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:J.event,operation:$.snapshot(),canceled:(Z=J.canceled)!=null?Z:!1,suspend:H}),Y)Y.then(K).catch(()=>$.reset());else K()})}},aJ=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}},n8=class extends AbortController{constructor(J,Q){super();this.constraints=J,this.onActivate=Q,this.activated=!1;for(let Z of J!=null?J:[])Z.controller=this}onEvent(J){var Q;if(this.activated)return;if((Q=this.constraints)==null?void 0:Q.length)for(let Z of this.constraints)Z.onEvent(J);else this.activate(J)}activate(J){if(this.activated)return;this.activated=!0,this.onActivate(J)}abort(J){this.activated=!1,super.abort(J)}},mZ,C1=class{constructor(J){this.options=J,E(this,mZ)}set controller(J){WJ(this,mZ,J),J.signal.addEventListener("abort",()=>this.abort())}activate(J){var Q;(Q=u(this,mZ))==null||Q.activate(J)}};mZ=new WeakMap;var z8=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}apply(J){return J.transform}},gq=class{constructor(J){this.draggables=new F8,this.droppables=new F8,this.plugins=new q1(J),this.sensors=new q1(J),this.modifiers=new q1(J)}register(J,Q){if(J instanceof MJ)return this.draggables.register(J.id,J);if(J instanceof wJ)return this.droppables.register(J.id,J);if(J.prototype instanceof z8)return this.modifiers.register(J,Q);if(J.prototype instanceof aJ)return this.sensors.register(J,Q);if(J.prototype instanceof $J)return this.plugins.register(J,Q);throw Error("Invalid instance type")}unregister(J){if(J instanceof _Z){if(J instanceof MJ)return this.draggables.unregister(J.id,J);if(J instanceof wJ)return this.droppables.unregister(J.id,J);return()=>{}}if(J.prototype instanceof z8)return this.modifiers.unregister(J);if(J.prototype instanceof aJ)return this.sensors.unregister(J);if(J.prototype instanceof $J)return this.plugins.unregister(J);throw Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},a8,r8,t8,e8,J2,Q2,Z2,$2,q2,rQ,pZ,RQ,g,T1,P1,E1,S1,k1,tQ;q2=[h],$2=[T],Z2=[T],Q2=[T],J2=[T],e8=[T],t8=[h],r8=[h],a8=[h];var AJ=class{constructor(J){O(g,5,this),E(this,rQ),E(this,pZ),E(this,RQ,new jJ(void 0,(Q,Z)=>Q&&Z?Q.equals(Z):Q===Z)),this.status=new kJ,E(this,T1,O(g,8,this,!1)),O(g,11,this),E(this,P1,O(g,12,this,null)),O(g,15,this),E(this,E1,O(g,16,this,null)),O(g,19,this),E(this,S1,O(g,20,this,null)),O(g,23,this),E(this,k1,O(g,24,this,[])),O(g,27,this),this.position=new nQ({x:0,y:0}),E(this,tQ,{x:0,y:0}),WJ(this,rQ,J)}get shape(){let{current:J,initial:Q,previous:Z}=u(this,RQ);if(!J||!Q)return null;return{current:J,initial:Q,previous:Z}}set shape(J){if(!J)u(this,RQ).reset();else u(this,RQ).current=J}get source(){var J;let Q=this.sourceIdentifier;if(Q==null)return null;let Z=u(this,rQ).registry.draggables.get(Q);if(Z)WJ(this,pZ,Z);return(J=Z!=null?Z:u(this,pZ))!=null?J:null}get target(){var J;let Q=this.targetIdentifier;return Q!=null?(J=u(this,rQ).registry.droppables.get(Q))!=null?J:null:null}get transform(){let{x:J,y:Q}=this.position.delta,Z={x:J,y:Q};for(let $ of this.modifiers)Z=$.apply(B1(W1({},this.snapshot()),{transform:Z}));return WJ(this,tQ,Z),Z}snapshot(){return C(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:u(this,tQ),shape:this.shape?hZ(this.shape):null,position:hZ(this.position),status:hZ(this.status),canceled:this.canceled}))}reset(){JJ(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,u(this,RQ).reset(),this.position.reset({x:0,y:0}),WJ(this,tQ,{x:0,y:0}),this.modifiers=[]})}};g=PQ(null);rQ=new WeakMap;pZ=new WeakMap;RQ=new WeakMap;T1=new WeakMap;P1=new WeakMap;E1=new WeakMap;S1=new WeakMap;k1=new WeakMap;tQ=new WeakMap;P(g,2,"shape",q2,AJ);P(g,4,"canceled",$2,AJ,T1);P(g,4,"activatorEvent",Z2,AJ,P1);P(g,4,"sourceIdentifier",Q2,AJ,E1);P(g,4,"targetIdentifier",J2,AJ,S1);P(g,4,"modifiers",e8,AJ,k1);P(g,2,"source",t8,AJ);P(g,2,"target",r8,AJ);P(g,2,"transform",a8,AJ);rJ(g,AJ);var uq={get rendering(){return Promise.resolve()}};function VJ(J,Q){if(typeof J==="function")return J(Q);return J!=null?J:Q}var Y2=class{constructor(J){this.destroy=()=>{if(!this.dragOperation.status.idle)this.actions.stop({canceled:!0});this.dragOperation.modifiers.forEach((W)=>W.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var Q;let Z=J!=null?J:{},$=VJ(Z.plugins,[]),q=VJ(Z.sensors,[]),Y=VJ(Z.modifiers,[]),H=(Q=Z.renderer)!=null?Q:uq,K=new fq(this),X=new gq(this);this.registry=X,this.monitor=K,this.renderer=H,this.actions=new bq(this),this.dragOperation=new AJ(this),this.collisionObserver=new hq(this),this.plugins=[vq,...$],this.modifiers=Y,this.sensors=q;let{destroy:B}=this,N=nJ(()=>{var W,G,L;let F=C(()=>this.dragOperation.modifiers),z=this.modifiers;for(let A of F)if(!z.includes(A))A.destroy();this.dragOperation.modifiers=(L=(G=(W=this.dragOperation.source)==null?void 0:W.modifiers)==null?void 0:G.map((A)=>{let{plugin:I,options:U}=CQ(A);return new I(this,U)}))!=null?L:z});this.destroy=()=>{N(),B()}}get plugins(){return this.registry.plugins.values}set plugins(J){this.registry.plugins.values=J}get modifiers(){return this.registry.modifiers.values}set modifiers(J){this.registry.modifiers.values=J}get sensors(){return this.registry.sensors.values}set sensors(J){this.registry.sensors.values=J}};var U2=(J)=>{throw TypeError(J)},y1=(J,Q,Z)=>Q.has(J)||U2("Cannot "+Z),R=(J,Q,Z)=>(y1(J,Q,"read from private field"),Q.get(J)),YJ=(J,Q,Z)=>Q.has(J)?U2("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),BJ=(J,Q,Z,$)=>(y1(J,Q,"write to private field"),Q.set(J,Z),Z),L2=(J,Q,Z)=>(y1(J,Q,"access private method"),Z);function eZ(J){if(!J)return!1;if(J instanceof KeyframeEffect)return!0;return"getKeyframes"in J&&typeof J.getKeyframes==="function"}function f1(J,Q){let Z=J.getAnimations(),$=null;for(let q of Z){if(q.playState!=="running")continue;let{effect:Y}=q,K=(eZ(Y)?Y.getKeyframes():[]).filter(Q);if(K.length>0)$=[K[K.length-1],q]}return $}function J0(J){let{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}=J.getBoundingClientRect();return{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}}function v1(J){let Q=Object.prototype.toString.call(J);return Q==="[object Window]"||Q==="[object global]"}function KZ(J){return"nodeType"in J}function NJ(J){var Q,Z,$;if(!J)return window;if(v1(J))return J;if(!KZ(J))return window;if("defaultView"in J)return(Q=J.defaultView)!=null?Q:window;return($=(Z=J.ownerDocument)==null?void 0:Z.defaultView)!=null?$:window}function Q0(J){let{Document:Q}=NJ(J);return J instanceof Q||"nodeType"in J&&J.nodeType===Node.DOCUMENT_NODE}function xJ(J){if(!J||v1(J))return!1;return J instanceof NJ(J).HTMLElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("html")}function G2(J){return J instanceof NJ(J).SVGElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("svg")}function QQ(J){if(!J)return document;if(v1(J))return J.document;if(!KZ(J))return document;if(Q0(J))return J;if(xJ(J)||G2(J))return J.ownerDocument;return document}function mq(J){var Q,Z,$,q;let{documentElement:Y}=QQ(J),H=NJ(J).visualViewport,K=(Q=H==null?void 0:H.width)!=null?Q:Y.clientWidth,X=(Z=H==null?void 0:H.height)!=null?Z:Y.clientHeight,B=($=H==null?void 0:H.offsetTop)!=null?$:0,N=(q=H==null?void 0:H.offsetLeft)!=null?q:0;return{top:B,left:N,right:N+K,bottom:B+X,width:K,height:X}}function pq(J,Q){if(dq(J)&&J.open===!1)return!1;let{overflow:Z,overflowX:$,overflowY:q}=getComputedStyle(J);return Z==="visible"&&$==="visible"&&q==="visible"}function dq(J){return J.tagName==="DETAILS"}function iZ(J,Q=J.getBoundingClientRect(),Z=0){var $,q,Y,H,K;let X=Q,{ownerDocument:B}=J,N=($=B.defaultView)!=null?$:window,W=J.parentElement;while(W&&W!==B.documentElement){if(!pq(W)){let M=W.getBoundingClientRect(),V=Z*(M.bottom-M.top),w=Z*(M.right-M.left),f=Z*(M.bottom-M.top),j=Z*(M.right-M.left);X={top:Math.max(X.top,M.top-V),right:Math.min(X.right,M.right+w),bottom:Math.min(X.bottom,M.bottom+f),left:Math.max(X.left,M.left-j),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top}W=W.parentElement}let G=N.visualViewport,L=(q=G==null?void 0:G.offsetTop)!=null?q:0,F=(Y=G==null?void 0:G.offsetLeft)!=null?Y:0,z=(H=G==null?void 0:G.width)!=null?H:N.innerWidth,A=(K=G==null?void 0:G.height)!=null?K:N.innerHeight,I=Z*A,U=Z*z;if(X={top:Math.max(X.top,L-I),right:Math.min(X.right,F+z+U),bottom:Math.min(X.bottom,L+A+I),left:Math.max(X.left,F-U),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top,X.width<0)X.width=0;if(X.height<0)X.height=0;return X}function ZQ(J){return{x:J.clientX,y:J.clientY}}var V2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nZ(J=document,Q=new Set){if(Q.has(J))return[];Q.add(J);let Z=[J];for(let $ of Array.from(J.querySelectorAll("iframe, frame")))try{let q=$.contentDocument;if(q&&!Q.has(q))Z.push(...nZ(q,Q))}catch(q){}try{let $=J.defaultView;if($&&$!==window.top){let q=$.parent;if(q&&q.document&&q.document!==J)Z.push(...nZ(q.document,Q))}}catch($){}return Z}function Z0(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function b1(){var J,Q;let Z=Z0()?window.visualViewport:null;return{x:(J=Z==null?void 0:Z.offsetLeft)!=null?J:0,y:(Q=Z==null?void 0:Z.offsetTop)!=null?Q:0}}function $0(J){if(!J||!KZ(J))return!1;return J instanceof NJ(J).ShadowRoot}function HZ(J){if(J&&KZ(J)){let Q=J.getRootNode();if($0(Q))return Q;else if(Q instanceof Document)return Q}return QQ(J)}function g1(J){return J.matchMedia("(prefers-reduced-motion: reduce)").matches}function F2(J){let Z=J.cloneNode(!0),$=Array.from(J.querySelectorAll("input, textarea, select, canvas, [contenteditable]"));return Array.from(Z.querySelectorAll("input, textarea, select, canvas, [contenteditable]")).forEach((Y,H)=>{let K=$[H];if(K2(Y)&&K2(K)){if(Y.type!=="file")Y.value=K.value;if(Y.type==="radio"&&Y.name)Y.name=`Cloned__${Y.name}`}if(H2(Y)&&H2(K)&&K.width>0&&K.height>0){let X=Y.getContext("2d");X==null||X.drawImage(K,0,0)}}),Z}function K2(J){return"value"in J}function H2(J){return J.tagName==="CANVAS"}function u1(J,{x:Q,y:Z}){let $=J.elementFromPoint(Q,Z);if(_q($)){let{contentDocument:q}=$;if(q){let{left:Y,top:H}=$.getBoundingClientRect();return u1(q,{x:Q-Y,y:Z-H})}}return $}function _q(J){return(J==null?void 0:J.tagName)==="IFRAME"}var m1=new WeakMap;function z2(J){return Boolean(J.closest(`
@@ -68,4 +68,4 @@ import{Bg as TJ,Cg as PZ,Pg as N5,zg as x0}from"./chunk-ersxsrz8.js";import{Jk a
68
68
  visibility: hidden;
69
69
  }
70
70
  `.replace(/\n+/g," ").replace(/\s+/g," ").trim();function mY(J,Q="hidden"){return C(()=>{let{element:Z,manager:$}=J;if(!Z||!$)return;let q=pY(Z,$.registry.droppables),Y=[],H=F2(Z),{remove:K}=H;return dY(q,H,Y),_Y(H,Q),H.remove=()=>{Y.forEach((X)=>X()),K.call(H)},H})}function pY(J,Q){let Z=new Map;for(let $ of Q){if(!$.element)continue;if(J===$.element||J.contains($.element)){let q=`${AZ}${H0("dom-id")}`;$.element.setAttribute(q,""),Z.set($,q)}}return Z}function dY(J,Q,Z){for(let[$,q]of J){if(!$.element)continue;let Y=`[${q}]`,H=Q.matches(Y)?Q:Q.querySelector(Y);if($.element.removeAttribute(q),!H)continue;let K=$.element;$.proxy=H,H.removeAttribute(q),m1.set(K,H),Z.push(()=>{m1.delete(K),$.proxy=void 0})}}function _Y(J,Q="hidden"){J.setAttribute("inert","true"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),J.setAttribute(U0,Q)}function J$(J,Q){if(J===Q)return!0;return JQ(J)===JQ(Q)}function f2(J){let{target:Q}=J;if("newState"in J&&J.newState==="closed"&&gJ(Q)&&Q.hasAttribute("popover"))requestAnimationFrame(()=>$Q(Q))}function i1(J){return J.tagName==="TR"}function cY(J,Q,Z){let $=new MutationObserver((q)=>{let Y=!1;for(let H of q){if(H.target!==J){Y=!0;continue}if(H.type!=="attributes")continue;let K=H.attributeName;if(K.startsWith("aria-")||bY.includes(K))continue;let X=J.getAttribute(K);if(K==="style"){if(kQ(J)&&kQ(Q)){let B=J.style;for(let N of Array.from(Q.style))if(B.getPropertyValue(N)==="")Q.style.removeProperty(N);for(let N of Array.from(B)){if(gY.includes(N)||N.startsWith(n))continue;let W=B.getPropertyValue(N);Q.style.setProperty(N,W)}}}else if(X!==null)Q.setAttribute(K,X);else Q.removeAttribute(K)}if(Y&&Z)Q.replaceChildren(...J.cloneNode(!0).childNodes)});return $.observe(J,{attributes:!0,subtree:!0,childList:!0}),$}function lY(J,Q,Z){let $=new MutationObserver((q)=>{for(let Y of q){if(Y.addedNodes.length===0)continue;for(let H of Array.from(Y.addedNodes)){if(H.contains(J)&&J.nextElementSibling!==Q){J.insertAdjacentElement("afterend",Q),$Q(Z);return}if(H.contains(Q)&&Q.previousElementSibling!==J){Q.insertAdjacentElement("beforebegin",J),$Q(Z);return}}}if(J.isConnected&&Q.isConnected&&J.nextElementSibling!==Q)J.insertAdjacentElement("afterend",Q),$Q(Z)});return $.observe(J.ownerDocument.body,{childList:!0,subtree:!0}),$}function sY(J){return new ResizeObserver(()=>{var Q,Z,$;let q=new hJ(J.placeholder,{frameTransform:J.frameTransform,ignoreTransforms:!0}),Y=(Q=J.transformOrigin)!=null?Q:{x:1,y:1},H=(J.width-q.width)*Y.x+J.delta.x,K=(J.height-q.height)*Y.y+J.delta.y,X=b1();if(J.styles.set({width:q.width-J.widthOffset,height:q.height-J.heightOffset,top:J.top+K+X.y,left:J.left+H+X.x},n),(Z=J.getElementMutationObserver())==null||Z.takeRecords(),i1(J.element)&&i1(J.placeholder)){let z=Array.from(J.element.cells),A=Array.from(J.placeholder.cells);if(!J.getSavedCellWidths())J.setSavedCellWidths(z.map((I)=>I.style.width));for(let[I,U]of z.entries()){let M=A[I];U.style.width=`${M.getBoundingClientRect().width}px`}}let B=($=J.getTranslate())!=null?$:{x:0,y:0},N=J.left+H+X.x+B.x,W=J.top+K+X.y+B.y,G=q.width-J.widthOffset,L=q.height-J.heightOffset,F=J.frameTransform;J.dragOperation.shape=new XJ(N*F.scaleX+F.x,W*F.scaleY+F.y,G*F.scaleX,L*F.scaleY)})}var oY=250,iY="ease";function nY(J){var Q,Z,$,q;let{animation:Y}=J;if(typeof Y==="function"){let U=Y({source:J.source,element:J.element,feedbackElement:J.feedbackElement,placeholder:J.placeholder,translate:J.translate,moved:J.moved});Promise.resolve(U).then(()=>{J.cleanup(),requestAnimationFrame(J.restoreFocus)});return}let{duration:H=oY,easing:K=iY}=Y!=null?Y:{};$Q(J.feedbackElement);let[,X]=(Q=f1(J.feedbackElement,(U)=>("translate"in U)))!=null?Q:[];X==null||X.pause();let B=(Z=J.placeholder)!=null?Z:J.element,N={frameTransform:J$(J.feedbackElement,B)?null:void 0},W=new hJ(J.feedbackElement,N),G=($=xQ(DJ(J.feedbackElement).translate))!=null?$:J.translate,L=new hJ(B,N),F=XJ.delta(W,L,J.alignment),z={x:G.x-F.x,y:G.y-F.y},A=Math.round(W.intrinsicHeight)!==Math.round(L.intrinsicHeight)?{minHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`],maxHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`]}:{},I=Math.round(W.intrinsicWidth)!==Math.round(L.intrinsicWidth)?{minWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`],maxWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`]}:{};J.styles.set({transition:J.transition},n),J.feedbackElement.setAttribute(o1,""),(q=J.getElementMutationObserver())==null||q.takeRecords(),P2({element:J.feedbackElement,keyframes:$9(FZ(FZ({},A),I),{translate:[`${G.x}px ${G.y}px 0`,`${z.x}px ${z.y}px 0`]}),options:{duration:g1(NJ(J.feedbackElement))?0:J.moved||J.feedbackElement!==J.element?H:0,easing:K}}).then(()=>{J.feedbackElement.removeAttribute(o1),X==null||X.finish(),J.cleanup(),requestAnimationFrame(J.restoreFocus)})}var Q$,n1,zZ,K9,W0,Z$,$$,uQ=class extends(n1=$J,Q$=[T],n1){constructor(Q,Z){super(Q,Z);m(this,W0),m(this,K9,l(zZ,8,this)),l(zZ,11,this),this.state={initial:{},current:{}};let $=Q.registry.plugins.get(V0),q=$==null?void 0:$.register(uY);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}this.registerEffect(XQ(this,W0,Z$).bind(this,$)),this.registerEffect(XQ(this,W0,$$))}};zZ=pQ(n1);K9=new WeakMap;W0=new WeakSet;Z$=function(J){let{overlay:Q}=this;if(!Q||!J)return;let Z=HZ(Q);if(!Z)return;return J.addRoot(Z)};$$=function(){var J,Q,Z,$,q,Y,H;let{state:K,manager:X,options:B}=this,{dragOperation:N}=X,{position:W,source:G,status:L}=N;if(L.idle){K.current={},K.initial={};return}if(!G)return;let{element:F}=G,z=G.pluginConfig(uQ),A=(Q=(J=z==null?void 0:z.feedback)!=null?J:B==null?void 0:B.feedback)!=null?Q:"default",I=typeof A==="function"?A(G,X):A;if(!F||I==="none"||!L.initialized||L.initializing)return;let{initial:U}=K,M=(Z=this.overlay)!=null?Z:F,V=qQ(M),w=qQ(F),f=!J$(F,M),j=new hJ(F,{frameTransform:f?w:null,ignoreTransforms:!f}),p={x:w.scaleX/V.scaleX,y:w.scaleY/V.scaleY},{width:b,height:y,top:GQ,left:s}=j;if(f)b=b/p.x,y=y/p.y;let v=new E2(M),R0=DJ(F),{transition:A9,translate:I9,boxSizing:v$,paddingBlockStart:b$,paddingBlockEnd:g$,paddingInlineStart:u$,paddingInlineEnd:m$,borderInlineStartWidth:p$,borderInlineEndWidth:d$,borderBlockStartWidth:_$,borderBlockEndWidth:c$}=R0,OZ=A9.split(",").filter((S)=>!/^\s*(transform|translate|scale)\b/.test(S)).join(","),cJ=WZ(R0),l$=R0.transform,j9=I==="clone",O9=v$==="content-box",R9=O9?parseInt(u$)+parseInt(m$)+parseInt(p$)+parseInt(d$):0,D9=O9?parseInt(b$)+parseInt(g$)+parseInt(_$)+parseInt(c$):0,KJ=I!=="move"&&!this.overlay?mY(G,j9?"clone":"hidden"):null,D0=C(()=>K0(X.dragOperation.activatorEvent));if(!U.translate){if(this.overlay&&cJ)U.translate={x:cJ.x,y:cJ.y};else if(I9!=="none"){let S=xQ(I9);if(S)U.translate=S}}if(!U.transformOrigin){let S=C(()=>W.current),_=s+(($=cJ==null?void 0:cJ.x)!=null?$:0),HJ=GQ+((q=cJ==null?void 0:cJ.y)!=null?q:0);U.transformOrigin={x:(S.x-_*V.scaleX-V.x)/(b*V.scaleX),y:(S.y-HJ*V.scaleY-V.y)/(y*V.scaleY)}}let{transformOrigin:VQ}=U,C9=GQ*V.scaleY+V.y,T9=s*V.scaleX+V.x;if(!U.coordinates){if(U.coordinates={x:T9,y:C9},p.x!==1||p.y!==1){let{scaleX:S,scaleY:_}=w,{x:HJ,y:fJ}=VQ;U.coordinates.x+=(b*S-b)*HJ,U.coordinates.y+=(y*_-y)*fJ}}if(!U.dimensions)U.dimensions={width:b,height:y};if(!U.frameTransform)U.frameTransform=V;let P9={x:U.coordinates.x-T9,y:U.coordinates.y-C9},E9={width:(U.dimensions.width*U.frameTransform.scaleX-b*V.scaleX)*VQ.x,height:(U.dimensions.height*U.frameTransform.scaleY-y*V.scaleY)*VQ.y},C0={x:P9.x/V.scaleX+E9.width,y:P9.y/V.scaleY+E9.height},S9={left:s+C0.x,top:GQ+C0.y};M.setAttribute(CJ,"true");let k9=C(()=>N.transform),x9=(Y=U.translate)!=null?Y:{x:0,y:0},s$=k9.x*V.scaleX+x9.x,o$=k9.y*V.scaleY+x9.y,h9=b1();if(v.set({width:b-R9,height:y-D9,top:S9.top+h9.y,left:S9.left+h9.x,translate:`${s$}px ${o$}px 0`,transform:this.overlay?"none":l$,transition:OZ?`${OZ}, translate 0ms linear`:"translate 0ms linear",scale:f?`${p.x} ${p.y}`:"","transform-origin":`${VQ.x*100}% ${VQ.y*100}%`},n),KJ){if(F.insertAdjacentElement("afterend",KJ),B==null?void 0:B.rootElement)(typeof B.rootElement==="function"?B.rootElement(G):B.rootElement).appendChild(F)}if(q0(M)){if(!M.hasAttribute("popover"))M.setAttribute("popover","manual");$Q(M),M.addEventListener("beforetoggle",f2)}let lJ,T0,RZ,y9=sY({placeholder:KJ,element:F,feedbackElement:M,frameTransform:V,transformOrigin:VQ,width:b,height:y,top:GQ,left:s,widthOffset:R9,heightOffset:D9,delta:C0,styles:v,dragOperation:N,getTranslate:()=>K.current.translate,getElementMutationObserver:()=>lJ,getSavedCellWidths:()=>RZ,setSavedCellWidths:(S)=>{RZ=S}}),f9=new hJ(M);C(()=>N.shape=f9);let P0=NJ(M),v9=(S)=>{this.manager.actions.stop({event:S})},i$=g1(P0);if(D0)P0.addEventListener("resize",v9);if(C(()=>G.status)==="idle")requestAnimationFrame(()=>G.status="dragging");if(KJ)y9.observe(KJ),lJ=cY(F,KJ,j9),T0=lY(F,KJ,M);let b9=(H=X.dragOperation.source)==null?void 0:H.id,n$=()=>{var S;if(!D0||b9==null)return;let _=X.registry.draggables.get(b9),HJ=(S=_==null?void 0:_.handle)!=null?S:_==null?void 0:_.element;if(xJ(HJ))HJ.focus()},E0=()=>{var S;if(lJ==null||lJ.disconnect(),T0==null||T0.disconnect(),y9.disconnect(),P0.removeEventListener("resize",v9),q0(M))M.removeEventListener("beforetoggle",f2),M.removeAttribute("popover");if(M.removeAttribute(CJ),v.reset(),RZ&&i1(F)){let fJ=Array.from(F.cells);for(let[S0,DZ]of fJ.entries())DZ.style.width=(S=RZ[S0])!=null?S:""}G.status="idle";let _=K.current.translate!=null,HJ=N.status.dragging;if(KJ&&(!HJ&&_||KJ.parentElement!==M.parentElement)&&M.isConnected)KJ.replaceWith(M);KJ==null||KJ.remove()},a$=B==null?void 0:B.dropAnimation,g9=this,r$=nJ(()=>{var S,_,HJ;let{transform:fJ,status:S0}=N;if(!fJ.x&&!fJ.y&&!K.current.translate)return;if(S0.dragging){let DZ=(S=U.translate)!=null?S:{x:0,y:0},CZ={x:fJ.x/V.scaleX+DZ.x,y:fJ.y/V.scaleY+DZ.y},u9=K.current.translate,t$=C(()=>N.modifiers),k0=C(()=>{var _Q;return(_Q=N.shape)==null?void 0:_Q.current}),dQ=B==null?void 0:B.keyboardTransition,m9=D0&&!i$&&dQ!==null?`${(_=dQ==null?void 0:dQ.duration)!=null?_:250}ms ${(HJ=dQ==null?void 0:dQ.easing)!=null?HJ:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(v.set({transition:OZ?`${OZ}, translate ${m9}`:`translate ${m9}`,translate:`${CZ.x}px ${CZ.y}px 0`},n),lJ==null||lJ.takeRecords(),k0&&k0!==f9&&u9&&!t$.length){let _Q=e.delta(CZ,u9);N.shape=XJ.from(k0.boundingRectangle).translate(_Q.x*V.scaleX,_Q.y*V.scaleY)}else N.shape=new hJ(M);K.current.translate=CZ}},function(){if(N.status.dropped){this.dispose(),G.status="dropping";let S=(z==null?void 0:z.dropAnimation)!==void 0?z.dropAnimation:g9.dropAnimation!==void 0?g9.dropAnimation:a$,_=K.current.translate,HJ=_!=null;if(!_&&F!==M)_={x:0,y:0};if(!_||S===null){E0();return}X.renderer.rendering.then(()=>{nY({source:G,element:F,feedbackElement:M,placeholder:KJ,translate:_,moved:HJ,transition:A9,alignment:G.alignment,styles:v,animation:S!=null?S:void 0,getElementMutationObserver:()=>lJ,cleanup:E0,restoreFocus:n$})})}});return()=>{E0(),r$()}};FJ(zZ,4,"overlay",Q$,uQ,K9);WQ(zZ,uQ);uQ.configure=EQ(uQ);var F0=uQ,BZ=!0,aY=!1,q$,Y$,K$,H$,mJ,H9,X9;H$=(K$=[T],UJ.Forward),Y$=(q$=[T],UJ.Reverse);var MZ=class{constructor(){m(this,H9,l(mJ,8,this,BZ)),l(mJ,11,this),m(this,X9,l(mJ,12,this,BZ)),l(mJ,15,this)}isLocked(J){if(J===UJ.Idle)return!1;if(J==null)return this[UJ.Forward]===BZ&&this[UJ.Reverse]===BZ;return this[J]===BZ}unlock(J){if(J===UJ.Idle)return;this[J]=aY}};mJ=pQ(null);H9=new WeakMap;X9=new WeakMap;FJ(mJ,4,H$,K$,MZ,H9);FJ(mJ,4,Y$,q$,MZ,X9);WQ(mJ,MZ);var rY=[UJ.Forward,UJ.Reverse],v2=class{constructor(){this.x=new MZ,this.y=new MZ}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tY=class extends $J{constructor(J){super(J);let Q=IJ(new v2),Z=null;this.signal=Q,o(()=>{let{status:$}=J.dragOperation;if(!$.initialized){Z=null,Q.value=new v2;return}let{delta:q}=J.dragOperation.position;if(Z){let Y={x:b2(q.x,Z.x),y:b2(q.y,Z.y)},H=Q.peek();JJ(()=>{for(let K of $1)for(let X of rY)if(Y[K]===X)H[K].unlock(X);Q.value=H})}Z=q})}get current(){return this.signal.peek()}};function b2(J,Q){return Math.sign(J-Q)}var X$,a1,wZ,W9,uJ,r1,z0=class extends(a1=SQ,X$=[T],a1){constructor(J){super(J);m(this,W9,l(wZ,8,this,!1)),l(wZ,11,this),m(this,uJ),m(this,r1,()=>{if(!x(this,uJ))return;let{element:Y,by:H}=x(this,uJ);if(H.y)Y.scrollTop+=H.y;if(H.x)Y.scrollLeft+=H.x}),this.scroll=(Y,H)=>{var K;if(this.disabled)return!1;let X=this.getScrollableElements();if(!X)return qJ(this,uJ,void 0),!1;let{position:B}=this.manager.dragOperation,N=B==null?void 0:B.current;if(N){let{by:W}=Y!=null?Y:{},G=W?{x:g2(W.x),y:g2(W.y)}:void 0,L=G?void 0:this.scrollIntentTracker.current;if(L==null?void 0:L.isLocked())return!1;for(let F of X){let z=D2(F,W);if(z.x||z.y){let{speed:A,direction:I}=C2(F,N,G,H==null?void 0:H.acceleration,H==null?void 0:H.threshold);if(L){for(let U of $1)if(L[U].isLocked(I[U]))A[U]=0,I[U]=0}if(I.x||I.y){let{x:U,y:M}=W!=null?W:I,V=U*A.x,w=M*A.y;if(V||w){let f=(K=x(this,uJ))==null?void 0:K.by;if(this.autoScrolling&&f){if(f.x&&!V||f.y&&!w)continue}return qJ(this,uJ,{element:F,by:{x:V,y:w}}),XZ.schedule(x(this,r1)),!0}}}}}return qJ(this,uJ,void 0),!1};let Q=null,Z=null,$=AQ(()=>{let{position:Y,source:H}=J.dragOperation;if(!Y)return null;let K=u1(HZ(H==null?void 0:H.element),Y.current);if(K)Q=K;return K!=null?K:Q}),q=AQ(()=>{let Y=$.value,{documentElement:H}=QQ(Y);if(!Y||Y===H){let{target:K}=J.dragOperation,X=K==null?void 0:K.element;if(X){let B=Y0(X,{excludeElement:!1});return Z=B,B}}if(Y){let K=Y0(Y,{excludeElement:!1});if(this.autoScrolling&&Z&&K.size<(Z==null?void 0:Z.size))return Z;return Z=K,K}return Z=null,null},EJ);this.getScrollableElements=()=>{return q.value},this.scrollIntentTracker=new tY(J),this.destroy=J.monitor.addEventListener("dragmove",(Y)=>{if(this.disabled||Y.defaultPrevented||!K0(J.dragOperation.activatorEvent)||!Y.by)return;if(this.scroll({by:Y.by}))Y.preventDefault()})}};wZ=pQ(a1);W9=new WeakMap;uJ=new WeakMap;r1=new WeakMap;FJ(wZ,4,"autoScrolling",X$,z0,W9);WQ(wZ,z0);function g2(J){if(J>0)return UJ.Forward;if(J<0)return UJ.Reverse;return UJ.Idle}var eY=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Q,resolvers:Z}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Q)$();for(let $ of Z)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Q)=>this.resolvers.add(Q))}},J5=new eY((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),Q5=10,t1=class extends $J{constructor(Q,Z){super(Q,Z);let $=Q.registry.plugins.get(z0);if(!$)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=o(()=>{var q,Y,H;if(this.disabled)return;let{position:K,status:X}=Q.dragOperation;if(X.dragging){let B={acceleration:(q=this.options)==null?void 0:q.acceleration,threshold:typeof((Y=this.options)==null?void 0:Y.threshold)==="number"?{x:this.options.threshold,y:this.options.threshold}:(H=this.options)==null?void 0:H.threshold};if($.scroll(void 0,B)){$.autoScrolling=!0;let W=setInterval(()=>J5.schedule(()=>$.scroll(void 0,B)),Q5);return()=>{clearInterval(W)}}else $.autoScrolling=!1}})}};t1.configure=EQ(t1);var W$=t1,u2={capture:!0,passive:!0},UZ,Z5=class extends SQ{constructor(J){super(J);m(this,UZ),this.handleScroll=()=>{if(x(this,UZ)==null)qJ(this,UZ,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),qJ(this,UZ,void 0)},50))};let{dragOperation:Q}=this.manager;this.destroy=o(()=>{var Z,$,q;if(Q.status.dragging){let H=(q=($=(Z=Q.source)==null?void 0:Z.element)==null?void 0:$.ownerDocument)!=null?q:document;return H.addEventListener("scroll",this.handleScroll,u2),()=>{H.removeEventListener("scroll",this.handleScroll,u2)}}})}};UZ=new WeakMap;var $5="* { user-select: none !important; -webkit-user-select: none !important; }",q5=class extends $J{constructor(J){super(J);this.manager=J;let Q=J.registry.plugins.get(V0),Z=Q==null?void 0:Q.register($5);if(this.destroy=o(()=>{let{dragOperation:$}=this.manager;if($.status.initialized)return _1(),document.addEventListener("selectionchange",_1,{capture:!0}),()=>{document.removeEventListener("selectionchange",_1,{capture:!0})}}),Z){let $=this.destroy.bind(this);this.destroy=()=>{Z(),$()}}}};function _1(){var J;(J=document.getSelection())==null||J.removeAllRanges()}var LZ=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(J,Q){var Z;let $=(Z=Q.handle)!=null?Z:Q.element;return J.target!==$}}),yQ,L0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,yQ,[]),this.listeners=new p1,this.handleSourceKeyDown=($,q,Y)=>{if(this.disabled||$.defaultPrevented)return;if(!gJ($.target))return;if(q.disabled)return;let{keyboardCodes:H=LZ.keyboardCodes,preventActivation:K=LZ.preventActivation}=Y!=null?Y:{};if(!H.start.includes($.code))return;if(!this.manager.dragOperation.status.idle)return;if(K==null?void 0:K($,q))return;this.handleStart($,q,Y)}}bind(Q,Z=this.options){return o(()=>{var q;let Y=(q=Q.handle)!=null?q:Q.element,H=(K)=>{if(K0(K))this.handleSourceKeyDown(K,Q,Z)};if(Y)return Y.addEventListener("keydown",H),()=>{Y.removeEventListener("keydown",H)}})}handleStart(Q,Z,$){let{element:q}=Z;if(!q)throw Error("Source draggable does not have an associated element");Q.preventDefault(),Q.stopImmediatePropagation(),T2(q);let{center:Y}=new hJ(q);if(this.manager.actions.start({event:Q,coordinates:{x:Y.x,y:Y.y},source:Z}).signal.aborted)return this.cleanup();this.sideEffects();let K=QQ(q),X=[this.listeners.bind(K,[{type:"keydown",listener:(B)=>this.handleKeyDown(B,Z,$),options:{capture:!0}}])];x(this,yQ).push(...X)}handleKeyDown(Q,Z,$){let{keyboardCodes:q=LZ.keyboardCodes}=$!=null?$:{};if(hQ(Q,[...q.end,...q.cancel])){Q.preventDefault();let Y=hQ(Q,q.cancel);this.handleEnd(Q,Y);return}if(hQ(Q,q.up))this.handleMove("up",Q);else if(hQ(Q,q.down))this.handleMove("down",Q);if(hQ(Q,q.left))this.handleMove("left",Q);else if(hQ(Q,q.right))this.handleMove("right",Q)}handleEnd(Q,Z){this.manager.actions.stop({event:Q,canceled:Z}),this.cleanup()}handleMove(Q,Z){var $,q;let{shape:Y}=this.manager.dragOperation,H=Z.shiftKey?5:1,K={x:0,y:0},X=(q=($=this.options)==null?void 0:$.offset)!=null?q:LZ.offset;if(typeof X==="number")X={x:X,y:X};if(!Y)return;switch(Q){case"up":K={x:0,y:-X.y*H};break;case"down":K={x:0,y:X.y*H};break;case"left":K={x:-X.x*H,y:0};break;case"right":K={x:X.x*H,y:0};break}if(K.x||K.y)Z.preventDefault(),this.manager.actions.move({event:Z,by:K})}sideEffects(){let Q=this.manager.registry.plugins.get(W$);if((Q==null?void 0:Q.disabled)===!1)Q.disable(),x(this,yQ).push(()=>{Q.enable()})}cleanup(){x(this,yQ).forEach((Q)=>Q()),qJ(this,yQ,[])}destroy(){this.cleanup(),this.listeners.clear()}};yQ=new WeakMap;L0.configure=EQ(L0);L0.defaults=LZ;var B$=L0;function hQ(J,Q){return Q.includes(J.code)}var YQ,Y5=class extends C1{constructor(){super(...arguments);m(this,YQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,YQ,ZQ(J));break;case"pointermove":if(!x(this,YQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,YQ).x,y:Z-x(this,YQ).y},{tolerance:q}=this.options;if(q&&fZ($,q)){this.abort();return}if(fZ($,this.options.value))this.activate(J);break;case"pointerup":this.abort();break}}abort(){qJ(this,YQ,void 0)}};YQ=new WeakMap;var fQ,KQ,K5=class extends C1{constructor(){super(...arguments);m(this,fQ),m(this,KQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,KQ,ZQ(J)),qJ(this,fQ,setTimeout(()=>this.activate(J),this.options.value));break;case"pointermove":if(!x(this,KQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,KQ).x,y:Z-x(this,KQ).y};if(fZ($,this.options.tolerance))this.abort();break;case"pointerup":this.abort();break}}abort(){if(x(this,fQ))clearTimeout(x(this,fQ)),qJ(this,KQ,void 0),qJ(this,fQ,void 0)}};fQ=new WeakMap;KQ=new WeakMap;var bQ=class{};bQ.Delay=K5;bQ.Distance=Y5;var e1=Object.freeze({activationConstraints(J,Q){var Z;let{pointerType:$,target:q}=J;if($==="mouse"&&gJ(q)&&(Q.handle===q||((Z=Q.handle)==null?void 0:Z.contains(q))))return;if($==="touch")return[new bQ.Delay({value:250,tolerance:5})];if(k2(q)&&!J.defaultPrevented)return[new bQ.Delay({value:200,tolerance:0})];return[new bQ.Delay({value:200,tolerance:10}),new bQ.Distance({value:5})]},preventActivation(J,Q){var Z;let{target:$}=J;if($===Q.element)return!1;if($===Q.handle)return!1;if(!gJ($))return!1;if((Z=Q.handle)==null?void 0:Z.contains($))return!1;return z2($)}}),vQ,G0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,vQ,new Set),this.listeners=new p1,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:$,coordinates:q}=this.latest;if(!$||!q)return;this.manager.actions.move({event:$,to:q})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(Q,Z,$=this.options){let{activationConstraints:q=e1.activationConstraints}=$!=null?$:{};return typeof q==="function"?q(Q,Z):q}bind(Q,Z=this.options){return o(()=>{var q;let Y=new AbortController,{signal:H}=Y,K=(B)=>{if(S2(B))this.handlePointerDown(B,Q,Z)},X=[(q=Q.handle)!=null?q:Q.element];if(Z==null?void 0:Z.activatorElements)if(Array.isArray(Z.activatorElements))X=Z.activatorElements;else X=Z.activatorElements(Q);for(let B of X){if(!B)continue;W5(B.ownerDocument.defaultView),B.addEventListener("pointerdown",K,{signal:H})}return()=>Y.abort()})}handlePointerDown(Q,Z,$){if(this.disabled||!Q.isPrimary||Q.button!==0||!gJ(Q.target)||Z.disabled||H5(Q)||!this.manager.dragOperation.status.idle)return;let{preventActivation:q=e1.preventActivation}=$!=null?$:{};if(q==null?void 0:q(Q,Z))return;let{target:Y}=Q,H=xJ(Y)&&Y.draggable&&Y.getAttribute("draggable")==="true",K=qQ(Z.element),{x:X,y:B}=ZQ(Q);this.initialCoordinates={x:X*K.scaleX+K.x,y:B*K.scaleY+K.y};let N=this.activationConstraints(Q,Z,$);Q.sensor=this;let W=new n8(N,(z)=>this.handleStart(Z,z));W.signal.onabort=()=>this.handleCancel(Q),W.onEvent(Q),this.controller=W;let G=nZ(),L=this.listeners.bind(G,[{type:"pointermove",listener:(z)=>this.handlePointerMove(z,Z)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:H?this.handleCancel:X0,options:{capture:!0}}]),F=()=>{L(),this.initialCoordinates=void 0};x(this,vQ).add(F)}handlePointerMove(Q,Z){var $,q;if((($=this.controller)==null?void 0:$.activated)===!1){(q=this.controller)==null||q.onEvent(Q);return}if(this.manager.dragOperation.status.dragging){let Y=ZQ(Q),H=qQ(Z.element);Y.x=Y.x*H.scaleX+H.x,Y.y=Y.y*H.scaleY+H.y,Q.preventDefault(),Q.stopPropagation(),this.latest.event=Q,this.latest.coordinates=Y,XZ.schedule(this.handleMove)}}handlePointerUp(Q){let{status:Z}=this.manager.dragOperation;if(!Z.idle){Q.preventDefault(),Q.stopPropagation();let $=!Z.initialized;this.manager.actions.stop({event:Q,canceled:$})}this.cleanup()}handleKeyDown(Q){if(Q.key==="Escape")Q.preventDefault(),this.handleCancel(Q)}handleStart(Q,Z){let{manager:$,initialCoordinates:q}=this;if(!q||!$.dragOperation.status.idle)return;if(Z.defaultPrevented)return;if($.actions.start({coordinates:q,event:Z,source:Q}).signal.aborted)return this.cleanup();Z.preventDefault();let K=QQ(Z.target).body;try{K.setPointerCapture(Z.pointerId)}catch(N){this.handleCancel(Z);return}let X=gJ(Z.target)?[Z.target,K]:K,B=this.listeners.bind(X,[{type:"touchmove",listener:X0,options:{passive:!1}},{type:"click",listener:X0},{type:"contextmenu",listener:X0},{type:"keydown",listener:this.handleKeyDown}]);x(this,vQ).add(B)}handleCancel(Q){let{dragOperation:Z}=this.manager;if(Z.status.initialized)this.manager.actions.stop({event:Q,canceled:!0});this.cleanup()}cleanup(){let{controller:Q}=this;if(this.controller=void 0,Q&&!Q.signal.aborted)Q.abort();this.latest={event:void 0,coordinates:void 0},x(this,vQ).forEach((Z)=>Z()),x(this,vQ).clear()}destroy(){this.cleanup(),this.listeners.clear()}};vQ=new WeakMap;G0.configure=EQ(G0);G0.defaults=e1;var N$=G0;function H5(J){return"sensor"in J}function X0(J){J.preventDefault()}function X5(){}var m2=new WeakSet;function W5(J){if(!J||m2.has(J))return;J.addEventListener("touchmove",X5,{capture:!1,passive:!1}),m2.add(J)}var HQ={modifiers:[],plugins:[yY,W$,vY,F0,q5],sensors:[N$,B$]},B9=class extends Y2{constructor(J={}){let Q=VJ(J.plugins,HQ.plugins),Z=VJ(J.sensors,HQ.sensors),$=VJ(J.modifiers,HQ.modifiers);super($9(FZ({},J),{plugins:[Z5,z0,V0,...Q],sensors:Z,modifiers:$}))}},U$,L$,J9,pJ,N9,U9,IZ=class extends(J9=MJ,L$=[T],U$=[T],J9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[],handle:Y}=Z,H=c2(Z,["element","effects","handle"]);super(FZ({effects:()=>[...q(),()=>{var K,X;let{manager:B}=this;if(!B)return;let W=((X=(K=this.sensors)==null?void 0:K.map(CQ))!=null?X:[...B.sensors]).map((G)=>{let L=G instanceof aJ?G:B.registry.register(G.plugin),F=G instanceof aJ?void 0:G.options;return L.bind(this,F)});return function(){W.forEach((L)=>L())}}]},H),Q);m(this,N9,l(pJ,8,this)),l(pJ,11,this),m(this,U9,l(pJ,12,this)),l(pJ,15,this),this.element=$,this.handle=Y}};pJ=pQ(J9);N9=new WeakMap;U9=new WeakMap;FJ(pJ,4,"handle",L$,IZ,N9);FJ(pJ,4,"element",U$,IZ,U9);WQ(pJ,IZ);var G$,V$,Q9,dJ,L9,c1,F$,z$,VZ,G9,M0=class extends(Q9=wJ,V$=[T],G$=[T],Q9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[]}=Z,Y=c2(Z,["element","effects"]);let{collisionDetector:H=x2}=Y,K=(B)=>{let{manager:N,element:W}=this;if(!W||B===null){this.shape=void 0;return}if(!N)return;let G=new hJ(W),L=C(()=>this.shape);if(G&&(L==null?void 0:L.equals(G)))return L;return this.shape=G,G},X=IJ(!1);super($9(FZ({},Y),{collisionDetector:H,effects:()=>[...q(),()=>{let{element:B,manager:N}=this;if(!N)return;let{dragOperation:W}=N,{source:G}=W;X.value=Boolean(G&&W.status.initialized&&B&&!this.disabled&&this.accepts(G))},()=>{let{element:B}=this;if(X.value&&B){let N=new O2(B,K);return()=>{N.disconnect(),this.shape=void 0}}},()=>{var B;if((B=this.manager)==null?void 0:B.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),Q);m(this,VZ),m(this,L9,l(dJ,8,this)),l(dJ,11,this),m(this,G9,l(dJ,12,this)),l(dJ,15,this),this.element=$,this.refreshShape=()=>K()}set element(J){qJ(this,VZ,J,z$)}get element(){var J;return(J=this.proxy)!=null?J:x(this,VZ,F$)}};dJ=pQ(Q9);L9=new WeakMap;VZ=new WeakSet;G9=new WeakMap;c1=FJ(dJ,20,"#element",V$,VZ,L9),F$=c1.get,z$=c1.set;FJ(dJ,4,"proxy",G$,M0,G9);WQ(dJ,M0);var D=TZ(x0(),1);var d=TZ(x0(),1);var V9=TZ(N5(),1);function B5(J){return J!=null&&typeof J==="object"&&"current"in J}function BQ(J){var Q;if(J==null)return;if(B5(J))return(Q=J.current)!=null?Q:void 0;return J}var U5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NQ=U5?d.useLayoutEffect:d.useEffect;function M$(){let J=d.useState(0)[1];return d.useCallback(()=>{J((Q)=>Q+1)},[J])}function L5(J,Q=!1){let Z=d.useRef(J.peek()),$=d.useRef(!1),q=M$();return NQ(()=>o(()=>{let Y=Z.current,H=J.value;if(Y!==H){if(Z.current=H,!$.current)return;if(Q)V9.flushSync(q);else q()}}),[J,Q,q]),{get value(){return $.current=!0,J.peek()}}}function w$(J,Q=[],Z=!1){let $=d.useRef(J);return $.current=J,L5(d.useMemo(()=>AQ(()=>$.current()),Q),Z)}function w0(J,Q){let Z=d.useRef(new Map),$=M$();return NQ(()=>{if(!J){Z.current.clear();return}return o(()=>{var q;let Y=!1,H=!1;for(let K of Z.current){let[X]=K,B=C(()=>K[1]),N=J[X];if(B!==N)Y=!0,Z.current.set(X,N),H=(q=Q==null?void 0:Q(X,B,N))!=null?q:!1}if(Y)if(H)queueMicrotask(()=>V9.flushSync($));else $()})},[J]),d.useMemo(()=>J?new Proxy(J,{get(q,Y){let H=q[Y];return Z.current.set(Y,H),H}}):J,[J])}function NH(J,Q){J()}function UQ(J){let Q=d.useRef(J);return NQ(()=>{Q.current=J},[J]),Q}function a(J,Q,Z=d.useEffect,$=Object.is){let q=d.useRef(J);Z(()=>{let Y=q.current;if(!$(J,Y))q.current=J,Q(J,Y)},[Q,J])}function A0(J,Q){let Z=d.useRef(BQ(J));NQ(()=>{let $=BQ(J);if($!==Z.current)Z.current=$,Q($)})}var{defineProperty:G5,defineProperties:V5,getOwnPropertyDescriptors:F5,getOwnPropertySymbols:j0}=Object,I$=Object.prototype.hasOwnProperty,j$=Object.prototype.propertyIsEnumerable,A$=(J,Q,Z)=>(Q in J)?G5(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,O$=(J,Q)=>{for(var Z in Q||(Q={}))if(I$.call(Q,Z))A$(J,Z,Q[Z]);if(j0){for(var Z of j0(Q))if(j$.call(Q,Z))A$(J,Z,Q[Z])}return J},R$=(J,Q)=>V5(J,F5(Q)),z5=(J,Q)=>{var Z={};for(var $ in J)if(I$.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&j0){for(var $ of j0(J))if(Q.indexOf($)<0&&j$.call(J,$))Z[$]=J[$]}return Z},M5=new B9,M9=D.createContext(M5),w5=D.memo(D.forwardRef(({children:J},Q)=>{let[Z,$]=D.useState(0),q=D.useRef(null),Y=D.useRef(null),H=D.useMemo(()=>({renderer:{get rendering(){var K;return(K=q.current)!=null?K:Promise.resolve()}},trackRendering(K){if(!q.current)q.current=new Promise((X)=>{Y.current=X});D.startTransition(()=>{K(),$((X)=>X+1)})}}),[]);return NQ(()=>{var K;(K=Y.current)==null||K.call(Y),q.current=null},[J,Z]),D.useImperativeHandle(Q,()=>H),null})),F9=[void 0,EJ];function wH(J){var Q=J,{children:Z,onCollision:$,onBeforeDragStart:q,onDragStart:Y,onDragMove:H,onDragOver:K,onDragEnd:X}=Q,B=z5(Q,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let N=D.useRef(null),{plugins:W,modifiers:G,sensors:L}=B,F=VJ(W,HQ.plugins),z=VJ(L,HQ.sensors),A=VJ(G,HQ.modifiers),I=UQ(q),U=UQ(Y),M=UQ(K),V=UQ(H),w=UQ(X),f=UQ($),j=A5(()=>{var p;return(p=B.manager)!=null?p:new B9(B)});return D.useEffect(()=>{if(!N.current)throw Error("Renderer not found");let{renderer:p,trackRendering:b}=N.current,{monitor:y}=j;j.renderer=p;let GQ=[y.addEventListener("beforedragstart",(s)=>{let v=I.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragstart",(s)=>{var v;return(v=U.current)==null?void 0:v.call(U,s,j)}),y.addEventListener("dragover",(s)=>{let v=M.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragmove",(s)=>{let v=V.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragend",(s)=>{let v=w.current;if(v)b(()=>v(s,j))}),y.addEventListener("collision",(s)=>{var v;return(v=f.current)==null?void 0:v.call(f,s,j)})];return()=>GQ.forEach((s)=>s())},[j]),a(F,()=>j&&(j.plugins=F),...F9),a(z,()=>j&&(j.sensors=z),...F9),a(A,()=>j&&(j.modifiers=A),...F9),PZ(M9.Provider,{value:j,children:[TJ(w5,{ref:N,children:Z}),Z]})}function A5(J){let Q=D.useRef(null);if(!Q.current)Q.current=J();return D.useInsertionEffect(()=>{return()=>{var Z;return(Z=Q.current)==null?void 0:Z.destroy()}},[]),Q.current}function D$(){return D.useContext(M9)}function C$(J){var Q;let Z=(Q=D$())!=null?Q:void 0,[$]=D.useState(()=>J(Z));if($.manager!==Z)$.manager=Z;return NQ($.register,[Z,$]),$}function AH(J){let{disabled:Q,data:Z,element:$,handle:q,id:Y,modifiers:H,sensors:K,plugins:X}=J,B=C$((W)=>new IZ(R$(O$({},J),{register:!1,handle:BQ(q),element:BQ($)}),W)),N=w0(B,I5);return a(Y,()=>B.id=Y),A0(q,(W)=>B.handle=W),A0($,(W)=>B.element=W),a(Z,()=>Z&&(B.data=Z)),a(Q,()=>B.disabled=Q===!0),a(K,()=>B.sensors=K),a(H,()=>B.modifiers=H,void 0,EJ),a(X,()=>B.plugins=X,void 0,EJ),a(J.alignment,()=>B.alignment=J.alignment),{draggable:N,get isDragging(){return N.isDragging},get isDropping(){return N.isDropping},get isDragSource(){return N.isDragSource},handleRef:D.useCallback((W)=>{B.handle=W!=null?W:void 0},[B]),ref:D.useCallback((W)=>{var G,L;if(!W&&((G=B.element)==null?void 0:G.isConnected)&&!((L=B.manager)==null?void 0:L.dragOperation.status.idle))return;B.element=W!=null?W:void 0},[B])}}function I5(J,Q,Z){if(J==="isDragSource"&&!Z&&Q)return!0;return!1}function IH({children:J,className:Q,dropAnimation:Z,style:$,tag:q,disabled:Y}){var H;let K=D.useRef(null),X=D$(),B=(H=w$(()=>X==null?void 0:X.dragOperation.source,[X]).value)!=null?H:null,N=typeof Y==="function"?Y(B):Y;D.useEffect(()=>{if(!K.current||!X||N)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.overlay=K.current,()=>{L.overlay=void 0}},[X,N]),D.useEffect(()=>{if(!X)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.dropAnimation=Z,()=>{L.dropAnimation=void 0}},[X,Z]);let W=D.useMemo(()=>{if(!X)return null;let L=new Proxy(X.registry,{get(F,z){if(z==="register"||z==="unregister")return j5;return F[z]}});return new Proxy(X,{get(F,z){if(z==="registry")return L;return F[z]}})},[X]);return TJ(M9.Provider,{value:W,children:D.createElement(q||"div",{ref:K,className:Q,style:$,"data-dnd-overlay":!0},G())});function G(){if(!B||N)return null;if(typeof J==="function")return TJ(O5,{source:B,children:J});return J}}function j5(){return()=>{}}function O5({children:J,source:Q}){return J(w0(Q))}var{create:R5,defineProperty:T$,getOwnPropertyDescriptor:D5}=Object,P$=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),O0=(J)=>{throw TypeError(J)},C5=(J,Q,Z)=>(Q in J)?T$(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,T5=(J)=>{var Q;return[,,,R5((Q=J==null?void 0:J[P$("metadata")])!=null?Q:null)]},E$=["class","method","getter","setter","accessor","field","value","get","set"],S$=(J)=>J!==void 0&&typeof J!=="function"?O0("Function expected"):J,P5=(J,Q,Z,$,q)=>({kind:E$[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?O0("Already initialized"):q.push(S$(Y||null))}),E5=(J,Q)=>C5(Q,P$("metadata"),J[3]),S5=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Y[q].call(Z);return $},k$=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N=Q&7,W=!1,G=!1,L=2,F=E$[N+5],z=J[L]||(J[L]=[]),A=(q=q.prototype,D5(q,Z));for(var I=$.length-1;I>=0;I--)X=P5(N,Z,K={},J[3],z),X.static=W,X.private=G,B=X.access={has:(U)=>(Z in U)},B.get=(U)=>U[Z],H=(0,$[I])(A[F],X),K._=1,S$(H)&&(A[F]=H);return A&&T$(q,Z,A),q},x$=(J,Q,Z)=>Q.has(J)||O0("Cannot "+Z),k5=(J,Q,Z)=>(x$(J,Q,"read from private field"),Q.get(J)),x5=(J,Q,Z)=>Q.has(J)?O0("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),h5=(J,Q,Z,$)=>(x$(J,Q,"write to private field"),Q.set(J,Z),Z),LQ=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},h$,y$,z9,I0,jZ,w9=class extends(z9=jJ,y$=[h],h$=[h],z9){constructor(J){let Q=LQ.from(J);super(Q,(Z,$)=>LQ.equals(Z,$));S5(jZ,5,this),x5(this,I0,0),this.velocity={x:0,y:0}}get delta(){return LQ.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=LQ.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-k5(this,I0),H=(K)=>Math.round(K/Y*100);JJ(()=>{h5(this,I0,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(LQ.from(J)),this.velocity={x:0,y:0}}};jZ=T5(z9);I0=new WeakMap;k$(jZ,2,"delta",y$,w9);k$(jZ,2,"direction",h$,w9);E5(jZ,w9);var f$=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(f$||{});Object.values(f$);var y5=({dragOperation:J,droppable:Q})=>{let Z=J.position.current;if(!Z)return null;let{id:$}=Q;if(!Q.shape)return null;if(Q.shape.containsPoint(Z)){let q=LQ.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:OJ.High}}return null},f5=({dragOperation:J,droppable:Q})=>{let{shape:Z}=J;if(!Q.shape||!(Z==null?void 0:Z.current))return null;let $=Z.current.intersectionArea(Q.shape);if($){let{position:q}=J,Y=LQ.distance(Q.shape.center,q.current),K=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:K,type:RJ.ShapeIntersection,priority:OJ.Normal}}return null},v5=(J)=>{var Q;return(Q=y5(J))!=null?Q:f5(J)};function jH(J){let{collisionDetector:Q,data:Z,disabled:$,element:q,id:Y,accept:H,type:K}=J,X=C$((N)=>new M0(R$(O$({},J),{register:!1,element:BQ(q)}),N)),B=w0(X);return a(Y,()=>X.id=Y),A0(q,(N)=>X.element=N),a(H,()=>X.accept=H,void 0,EJ),a(Q,()=>X.collisionDetector=Q!=null?Q:v5),a(Z,()=>Z&&(X.data=Z)),a($,()=>X.disabled=$===!0),a(K,()=>X.type=K),{droppable:B,get isDropTarget(){return B.isDropTarget},ref:D.useCallback((N)=>{var W,G;if(!N&&((W=X.element)==null?void 0:W.isConnected)&&!((G=X.manager)==null?void 0:G.dragOperation.status.idle))return;X.element=N!=null?N:void 0},[X])}}
71
- export{JJ as V,C as W,o as X,EJ as Y,T as Z,o5 as _,XJ as $,EQ as aa,$J as ba,z8 as ca,VJ as da,NJ as ea,iZ as fa,g1 as ga,m1 as ha,DJ as ia,T2 as ja,P2 as ka,OK as la,hJ as ma,K0 as na,x2 as oa,gK as pa,F0 as qa,z0 as ra,B$ as sa,bQ as ta,N$ as ua,IZ as va,M0 as wa,BQ as xa,NQ as ya,w0 as za,NH as Aa,a as Ba,A0 as Ca,wH as Da,C$ as Ea,AH as Fa,IH as Ga,jH as Ha,b5 as Ia};
71
+ export{JJ as W,C as X,o as Y,EJ as Z,T as _,o5 as $,XJ as aa,EQ as ba,$J as ca,z8 as da,VJ as ea,NJ as fa,iZ as ga,g1 as ha,m1 as ia,DJ as ja,T2 as ka,P2 as la,OK as ma,hJ as na,K0 as oa,x2 as pa,gK as qa,F0 as ra,z0 as sa,B$ as ta,bQ as ua,N$ as va,IZ as wa,M0 as xa,BQ as ya,NQ as za,w0 as Aa,NH as Ba,a as Ca,A0 as Da,wH as Ea,C$ as Fa,AH as Ga,IH as Ha,jH as Ia,b5 as Ja};
@@ -1,2 +1,2 @@
1
- import{wf as f}from"./chunk-z544s59c.js";import{Bg as b,Cg as q}from"./chunk-ersxsrz8.js";function z(){return q("div",{className:"flex h-screen flex-col bg-background min-h-0",children:[q("div",{className:"flex h-14 items-center justify-between border-b px-6 shrink-0",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-4 w-24"}),b("span",{className:"text-muted-foreground",children:"/"}),b(f,{className:"h-4 w-32"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-8 w-8 rounded-md"}),b(f,{className:"h-8 w-20 rounded-md"})]})]}),q("div",{className:"flex flex-1 overflow-hidden",children:[q("div",{className:"w-[240px] border-r p-4 space-y-4 hidden md:block shrink-0",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-4 w-4 rounded"}),b(f,{className:"h-4 w-24"})]}),q("div",{className:"pl-4 space-y-3",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-3 w-3 rounded"}),b(f,{className:"h-3 w-28"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-3 w-3 rounded"}),b(f,{className:"h-3 w-20"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-3 w-3 rounded"}),b(f,{className:"h-3 w-24"})]})]})]}),q("div",{className:"flex-1 p-6 space-y-6 overflow-y-auto",children:[q("div",{className:"flex items-center justify-between border-b pb-4",children:[q("div",{className:"flex items-center gap-4",children:[b(f,{className:"h-5 w-40"}),b(f,{className:"h-4 w-20"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-8 w-8 rounded"}),b(f,{className:"h-8 w-8 rounded"}),b(f,{className:"h-8 w-32 rounded"})]})]}),q("div",{className:"space-y-4",children:[b("div",{className:"flex items-center gap-2",children:b(f,{className:"h-4 w-24"})}),b("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:Array.from({length:10}).map((w,v)=>q("div",{className:"flex flex-col rounded-lg border bg-card p-3 space-y-3",children:[b(f,{className:"aspect-square w-full rounded-md"}),q("div",{className:"space-y-2",children:[b(f,{className:"h-4 w-3/4"}),q("div",{className:"flex justify-between items-center",children:[b(f,{className:"h-3 w-1/4"}),b(f,{className:"h-3 w-1/3"})]})]})]},v))})]})]})]})]})}function A(){return q("div",{className:"h-screen flex flex-col bg-background",children:[q("div",{className:"flex h-14 items-center justify-between border-b px-6 shrink-0",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-4 w-16"}),b("span",{className:"text-muted-foreground",children:"/"}),b(f,{className:"h-4 w-28"}),b("span",{className:"text-muted-foreground",children:"/"}),b(f,{className:"h-4 w-32"})]}),b("div",{className:"flex items-center gap-2",children:b(f,{className:"h-8 w-20 rounded"})})]}),q("div",{className:"flex flex-1 overflow-hidden",children:[q("div",{className:"w-[280px] border-r p-4 flex flex-col gap-4 shrink-0 hidden md:flex",children:[b(f,{className:"h-5 w-24"}),b("div",{className:"space-y-3 flex-1 overflow-y-auto",children:Array.from({length:4}).map((w,v)=>q("div",{className:"flex gap-3 p-2 rounded border",children:[b(f,{className:"h-12 w-12 rounded bg-muted shrink-0"}),q("div",{className:"space-y-2 flex-1",children:[b(f,{className:"h-3 w-2/3"}),b(f,{className:"h-2 w-1/2"})]})]},v))})]}),q("div",{className:"flex-1 bg-muted/20 p-6 flex flex-col justify-between relative min-w-0",children:[b("div",{className:"flex-1 flex items-center justify-center",children:b(f,{className:"w-full max-w-4xl aspect-video rounded-lg shadow-lg"})}),q("div",{className:"mt-4 flex items-center justify-between shrink-0",children:[q("div",{className:"flex items-center gap-4",children:[b(f,{className:"h-8 w-8 rounded-full"}),b(f,{className:"h-4 w-32"})]}),b(f,{className:"h-4 w-24"})]})]}),q("div",{className:"w-[360px] border-l p-4 flex flex-col gap-6 shrink-0 hidden lg:flex bg-card",children:[q("div",{className:"space-y-4",children:[b(f,{className:"h-5 w-32"}),b("div",{className:"space-y-3",children:Array.from({length:3}).map((w,v)=>q("div",{className:"flex justify-between items-center py-1 border-b",children:[b(f,{className:"h-3 w-20"}),b(f,{className:"h-3 w-32"})]},v))})]}),q("div",{className:"flex-1 flex flex-col gap-4",children:[b(f,{className:"h-5 w-24"}),b("div",{className:"space-y-3 flex-1 overflow-y-auto",children:Array.from({length:3}).map((w,v)=>q("div",{className:"flex gap-3 p-3 rounded-lg border bg-muted/10",children:[b(f,{className:"h-8 w-8 rounded-full shrink-0"}),q("div",{className:"space-y-2 flex-1",children:[q("div",{className:"flex justify-between",children:[b(f,{className:"h-3 w-24"}),b(f,{className:"h-2 w-12"})]}),b(f,{className:"h-3 w-full"}),b(f,{className:"h-3 w-5/6"})]})]},v))})]})]})]})]})}
2
- export{z as Oe,A as Pe};
1
+ import{xf as f}from"./chunk-f70xdh07.js";import{Cg as b,Dg as q}from"./chunk-cbjfw47x.js";function z(){return q("div",{className:"flex h-screen flex-col bg-background min-h-0",children:[q("div",{className:"flex h-14 items-center justify-between border-b px-6 shrink-0",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-4 w-24"}),b("span",{className:"text-muted-foreground",children:"/"}),b(f,{className:"h-4 w-32"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-8 w-8 rounded-md"}),b(f,{className:"h-8 w-20 rounded-md"})]})]}),q("div",{className:"flex flex-1 overflow-hidden",children:[q("div",{className:"w-[240px] border-r p-4 space-y-4 hidden md:block shrink-0",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-4 w-4 rounded"}),b(f,{className:"h-4 w-24"})]}),q("div",{className:"pl-4 space-y-3",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-3 w-3 rounded"}),b(f,{className:"h-3 w-28"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-3 w-3 rounded"}),b(f,{className:"h-3 w-20"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-3 w-3 rounded"}),b(f,{className:"h-3 w-24"})]})]})]}),q("div",{className:"flex-1 p-6 space-y-6 overflow-y-auto",children:[q("div",{className:"flex items-center justify-between border-b pb-4",children:[q("div",{className:"flex items-center gap-4",children:[b(f,{className:"h-5 w-40"}),b(f,{className:"h-4 w-20"})]}),q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-8 w-8 rounded"}),b(f,{className:"h-8 w-8 rounded"}),b(f,{className:"h-8 w-32 rounded"})]})]}),q("div",{className:"space-y-4",children:[b("div",{className:"flex items-center gap-2",children:b(f,{className:"h-4 w-24"})}),b("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:Array.from({length:10}).map((w,v)=>q("div",{className:"flex flex-col rounded-lg border bg-card p-3 space-y-3",children:[b(f,{className:"aspect-square w-full rounded-md"}),q("div",{className:"space-y-2",children:[b(f,{className:"h-4 w-3/4"}),q("div",{className:"flex justify-between items-center",children:[b(f,{className:"h-3 w-1/4"}),b(f,{className:"h-3 w-1/3"})]})]})]},v))})]})]})]})]})}function A(){return q("div",{className:"h-screen flex flex-col bg-background",children:[q("div",{className:"flex h-14 items-center justify-between border-b px-6 shrink-0",children:[q("div",{className:"flex items-center gap-2",children:[b(f,{className:"h-4 w-16"}),b("span",{className:"text-muted-foreground",children:"/"}),b(f,{className:"h-4 w-28"}),b("span",{className:"text-muted-foreground",children:"/"}),b(f,{className:"h-4 w-32"})]}),b("div",{className:"flex items-center gap-2",children:b(f,{className:"h-8 w-20 rounded"})})]}),q("div",{className:"flex flex-1 overflow-hidden",children:[q("div",{className:"w-[280px] border-r p-4 flex flex-col gap-4 shrink-0 hidden md:flex",children:[b(f,{className:"h-5 w-24"}),b("div",{className:"space-y-3 flex-1 overflow-y-auto",children:Array.from({length:4}).map((w,v)=>q("div",{className:"flex gap-3 p-2 rounded border",children:[b(f,{className:"h-12 w-12 rounded bg-muted shrink-0"}),q("div",{className:"space-y-2 flex-1",children:[b(f,{className:"h-3 w-2/3"}),b(f,{className:"h-2 w-1/2"})]})]},v))})]}),q("div",{className:"flex-1 bg-muted/20 p-6 flex flex-col justify-between relative min-w-0",children:[b("div",{className:"flex-1 flex items-center justify-center",children:b(f,{className:"w-full max-w-4xl aspect-video rounded-lg shadow-lg"})}),q("div",{className:"mt-4 flex items-center justify-between shrink-0",children:[q("div",{className:"flex items-center gap-4",children:[b(f,{className:"h-8 w-8 rounded-full"}),b(f,{className:"h-4 w-32"})]}),b(f,{className:"h-4 w-24"})]})]}),q("div",{className:"w-[360px] border-l p-4 flex flex-col gap-6 shrink-0 hidden lg:flex bg-card",children:[q("div",{className:"space-y-4",children:[b(f,{className:"h-5 w-32"}),b("div",{className:"space-y-3",children:Array.from({length:3}).map((w,v)=>q("div",{className:"flex justify-between items-center py-1 border-b",children:[b(f,{className:"h-3 w-20"}),b(f,{className:"h-3 w-32"})]},v))})]}),q("div",{className:"flex-1 flex flex-col gap-4",children:[b(f,{className:"h-5 w-24"}),b("div",{className:"space-y-3 flex-1 overflow-y-auto",children:Array.from({length:3}).map((w,v)=>q("div",{className:"flex gap-3 p-3 rounded-lg border bg-muted/10",children:[b(f,{className:"h-8 w-8 rounded-full shrink-0"}),q("div",{className:"space-y-2 flex-1",children:[q("div",{className:"flex justify-between",children:[b(f,{className:"h-3 w-24"}),b(f,{className:"h-2 w-12"})]}),b(f,{className:"h-3 w-full"}),b(f,{className:"h-3 w-5/6"})]})]},v))})]})]})]})]})}
2
+ export{z as Pe,A as Qe};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Nj as O}from"./chunk-7xfx7741.js";import{Oj as C,Pj as E}from"./chunk-2jnyk045.js";import{Qj as y,Rj as K,Sj as P}from"./chunk-4153rke8.js";import{Tj as b}from"./chunk-s5s1rk4n.js";import"./chunk-8qe7cpbr.js";import{Vj as M}from"./chunk-sddrv3ep.js";import{Xj as H}from"./chunk-jgxhv36z.js";import{Yj as k}from"./chunk-bhqrqt97.js";import"./chunk-kgr3ytpb.js";import{lk as A,mk as N}from"./chunk-9deae0n7.js";import{rk as $,tk as S}from"./chunk-6gjn8trh.js";import"./chunk-sfmhbk59.js";import{xk as _}from"./chunk-75x3w5hx.js";import{Ek as f}from"./chunk-7kdz1eng.js";import{Fk as U}from"./chunk-6ab9eftx.js";import"./chunk-8tnq43k9.js";var g=new Set(["openai","openai-codex","opencode"]),u=16;function V(j,D){if(!j)return!1;let w=D.toLowerCase();for(let[z,F]of Object.entries(j))if(z.toLowerCase()===w&&F!==null&&F.trim().length>0)return!0;return!1}function R(j,D,w){if(D)return D;if(V(w,"authorization")||V(w,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${j}`)}function c(j){return j.provider==="openrouter"||j.baseUrl.includes("openrouter.ai")?"openrouter":"openai"}function T(j,D){if(j)return j;if(k("PI_CACHE_RETENTION",D)==="long")return"long";return"short"}function q(j){return{supportsDeveloperRole:j.compat?.supportsDeveloperRole??!0,sessionAffinityFormat:j.compat?.sessionAffinityFormat??c(j),supportsLongCacheRetention:j.compat?.supportsLongCacheRetention??!0,supportsStrictMode:j.compat?.supportsStrictMode??!1,supportsOpenAIGrammarTools:j.compat?.supportsOpenAIGrammarTools??!1,supportsToolSearch:j.compat?.supportsToolSearch??!1,supportsExplicitPromptCacheMode:j.compat?.supportsExplicitPromptCacheMode??!1}}function r(j,D){return D==="long"&&j.supportsLongCacheRetention?"24h":void 0}function d(j){return N(A(j),"OpenAI API error")}var l=(j,D,w)=>{let z=new U;return(async()=>{let F={role:"assistant",content:[],api:j.api,provider:j.provider,model:j.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let Q=R(j.provider,w?.apiKey,w?.headers),W=T(w?.cacheRetention,w?.env)==="none"?void 0:w?.sessionId,X=q(j),J=$(D.tools,X.supportsOpenAIGrammarTools),Y=a(j,D,Q,w?.headers,W),Z=m(j,D,w,X,J),B=await w?.onPayload?.(Z,j);if(B!==void 0)Z=B;let v={...w?.signal?{signal:w.signal}:{},...w?.timeoutMs!==void 0?{timeout:w.timeoutMs}:{},maxRetries:0},{data:I,response:L}=await H(()=>Y.responses.create(Z,v).withResponse(),{maxRetries:w?.maxRetries,maxRetryDelayMs:w?.maxRetryDelayMs,signal:w?.signal});if(await w?.onResponse?.({status:L.status,headers:_(L.headers)},j),z.push({type:"start",partial:F}),await P(I,F,z,j,{serviceTier:w?.serviceTier,grammarToolInputProperties:J,applyServiceTierPricing:(x,h)=>n(x,h,j)}),w?.signal?.aborted)throw Error("Request was aborted");if(F.stopReason==="aborted"||F.stopReason==="error")throw Error("An unknown error occurred");z.push({type:"done",reason:F.stopReason,message:F}),z.end()}catch(Q){for(let G of F.content)delete G.index,delete G.partialJson,delete G.customInput;F.stopReason=w?.signal?.aborted?"aborted":"error",F.errorMessage=d(Q),z.push({type:"error",reason:F.stopReason,error:F}),z.end()}})(),z},Wj=(j,D,w)=>{R(j.provider,w?.apiKey,w?.headers);let z=S(j,D,w,w?.apiKey),F=w?.reasoning?f(j,w.reasoning):void 0;return l(j,D,{...z,reasoningEffort:F==="off"?void 0:F})};function a(j,D,w,z,F){let Q=q(j),G={...j.headers};if(j.provider==="github-copilot"){let W=C(D.messages),X=E({messages:D.messages,hasImages:W});Object.assign(G,X)}if(F)if(Q.sessionAffinityFormat==="openrouter")G["x-session-id"]=F;else{if(Q.sessionAffinityFormat==="openai")G.session_id=F;G["x-client-request-id"]=F}if(z)Object.assign(G,z);return new M({apiKey:w,baseURL:j.baseUrl,dangerouslyAllowBrowser:!0,defaultHeaders:G})}function m(j,D,w,z=q(j),F=$(D.tools,z.supportsOpenAIGrammarTools)){let Q=O(D,z.supportsToolSearch),G=y(j,D,g,{grammarToolInputProperties:F,deferredTools:Q.deferred,toolOptions:{supportsStrictMode:z.supportsStrictMode,supportsOpenAIGrammarTools:z.supportsOpenAIGrammarTools}}),W=T(w?.cacheRetention,w?.env),X=W==="none"&&z.supportsExplicitPromptCacheMode,J={model:j.id,input:G,stream:!0,prompt_cache_key:W==="none"?void 0:b(w?.sessionId),prompt_cache_retention:r(z,W),prompt_cache_options:X?{mode:"explicit"}:void 0,store:!1};if(w?.maxTokens)J.max_output_tokens=Math.max(w.maxTokens,u);if(w?.temperature!==void 0)J.temperature=w?.temperature;if(w?.serviceTier!==void 0)J.service_tier=w.serviceTier;if(Q.immediate.length>0)J.tools=K(Q.immediate,{supportsStrictMode:z.supportsStrictMode,supportsOpenAIGrammarTools:z.supportsOpenAIGrammarTools});if(w?.toolChoice!==void 0)J.tool_choice=w.toolChoice;if(j.reasoning){if(w?.reasoningEffort||w?.reasoningSummary){let Y=w?.reasoningEffort?j.thinkingLevelMap?.[w.reasoningEffort]??w.reasoningEffort:"medium";J.reasoning={effort:Y,summary:w?.reasoningSummary||"auto"},J.include=["reasoning.encrypted_content"]}else if(j.provider!=="github-copilot"&&j.thinkingLevelMap?.off!==null)J.reasoning={effort:j.thinkingLevelMap?.off??"none"};if(j.provider==="xai")J.include=["reasoning.encrypted_content"]}return J}function i(j,D){switch(D){case"flex":return 0.5;case"priority":return j.id==="gpt-5.5"?2.5:2;default:return 1}}function n(j,D,w){let z=i(w,D);if(z===1)return;j.cost.input*=z,j.cost.output*=z,j.cost.cacheRead*=z,j.cost.cacheWrite*=z,j.cost.total=j.cost.input+j.cost.output+j.cost.cacheRead+j.cost.cacheWrite}export{Wj as streamSimple,l as stream};
2
+ import{Oj as O}from"./chunk-arxd4qb9.js";import{Pj as C,Qj as E}from"./chunk-3ydjrkbd.js";import{Rj as y,Sj as K,Tj as P}from"./chunk-17bewdr0.js";import{Uj as b}from"./chunk-x2z5zz01.js";import"./chunk-7zdmpbt6.js";import{Wj as M}from"./chunk-b93djch5.js";import{Yj as H}from"./chunk-q0znwxfe.js";import{Zj as k}from"./chunk-w8vk30ze.js";import"./chunk-43mhpb0k.js";import{mk as A,nk as N}from"./chunk-vpq224tm.js";import{sk as $,uk as S}from"./chunk-fcvtv783.js";import"./chunk-jkapr5we.js";import{yk as _}from"./chunk-5r55htaw.js";import{Fk as f}from"./chunk-bg10gwm1.js";import{Gk as U}from"./chunk-vvr179pz.js";import"./chunk-gd1x3rgn.js";var g=new Set(["openai","openai-codex","opencode"]),u=16;function V(j,D){if(!j)return!1;let w=D.toLowerCase();for(let[z,F]of Object.entries(j))if(z.toLowerCase()===w&&F!==null&&F.trim().length>0)return!0;return!1}function R(j,D,w){if(D)return D;if(V(w,"authorization")||V(w,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${j}`)}function c(j){return j.provider==="openrouter"||j.baseUrl.includes("openrouter.ai")?"openrouter":"openai"}function T(j,D){if(j)return j;if(k("PI_CACHE_RETENTION",D)==="long")return"long";return"short"}function q(j){return{supportsDeveloperRole:j.compat?.supportsDeveloperRole??!0,sessionAffinityFormat:j.compat?.sessionAffinityFormat??c(j),supportsLongCacheRetention:j.compat?.supportsLongCacheRetention??!0,supportsStrictMode:j.compat?.supportsStrictMode??!1,supportsOpenAIGrammarTools:j.compat?.supportsOpenAIGrammarTools??!1,supportsToolSearch:j.compat?.supportsToolSearch??!1,supportsExplicitPromptCacheMode:j.compat?.supportsExplicitPromptCacheMode??!1}}function r(j,D){return D==="long"&&j.supportsLongCacheRetention?"24h":void 0}function d(j){return N(A(j),"OpenAI API error")}var l=(j,D,w)=>{let z=new U;return(async()=>{let F={role:"assistant",content:[],api:j.api,provider:j.provider,model:j.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let Q=R(j.provider,w?.apiKey,w?.headers),W=T(w?.cacheRetention,w?.env)==="none"?void 0:w?.sessionId,X=q(j),J=$(D.tools,X.supportsOpenAIGrammarTools),Y=a(j,D,Q,w?.headers,W),Z=m(j,D,w,X,J),B=await w?.onPayload?.(Z,j);if(B!==void 0)Z=B;let v={...w?.signal?{signal:w.signal}:{},...w?.timeoutMs!==void 0?{timeout:w.timeoutMs}:{},maxRetries:0},{data:I,response:L}=await H(()=>Y.responses.create(Z,v).withResponse(),{maxRetries:w?.maxRetries,maxRetryDelayMs:w?.maxRetryDelayMs,signal:w?.signal});if(await w?.onResponse?.({status:L.status,headers:_(L.headers)},j),z.push({type:"start",partial:F}),await P(I,F,z,j,{serviceTier:w?.serviceTier,grammarToolInputProperties:J,applyServiceTierPricing:(x,h)=>n(x,h,j)}),w?.signal?.aborted)throw Error("Request was aborted");if(F.stopReason==="aborted"||F.stopReason==="error")throw Error("An unknown error occurred");z.push({type:"done",reason:F.stopReason,message:F}),z.end()}catch(Q){for(let G of F.content)delete G.index,delete G.partialJson,delete G.customInput;F.stopReason=w?.signal?.aborted?"aborted":"error",F.errorMessage=d(Q),z.push({type:"error",reason:F.stopReason,error:F}),z.end()}})(),z},Wj=(j,D,w)=>{R(j.provider,w?.apiKey,w?.headers);let z=S(j,D,w,w?.apiKey),F=w?.reasoning?f(j,w.reasoning):void 0;return l(j,D,{...z,reasoningEffort:F==="off"?void 0:F})};function a(j,D,w,z,F){let Q=q(j),G={...j.headers};if(j.provider==="github-copilot"){let W=C(D.messages),X=E({messages:D.messages,hasImages:W});Object.assign(G,X)}if(F)if(Q.sessionAffinityFormat==="openrouter")G["x-session-id"]=F;else{if(Q.sessionAffinityFormat==="openai")G.session_id=F;G["x-client-request-id"]=F}if(z)Object.assign(G,z);return new M({apiKey:w,baseURL:j.baseUrl,dangerouslyAllowBrowser:!0,defaultHeaders:G})}function m(j,D,w,z=q(j),F=$(D.tools,z.supportsOpenAIGrammarTools)){let Q=O(D,z.supportsToolSearch),G=y(j,D,g,{grammarToolInputProperties:F,deferredTools:Q.deferred,toolOptions:{supportsStrictMode:z.supportsStrictMode,supportsOpenAIGrammarTools:z.supportsOpenAIGrammarTools}}),W=T(w?.cacheRetention,w?.env),X=W==="none"&&z.supportsExplicitPromptCacheMode,J={model:j.id,input:G,stream:!0,prompt_cache_key:W==="none"?void 0:b(w?.sessionId),prompt_cache_retention:r(z,W),prompt_cache_options:X?{mode:"explicit"}:void 0,store:!1};if(w?.maxTokens)J.max_output_tokens=Math.max(w.maxTokens,u);if(w?.temperature!==void 0)J.temperature=w?.temperature;if(w?.serviceTier!==void 0)J.service_tier=w.serviceTier;if(Q.immediate.length>0)J.tools=K(Q.immediate,{supportsStrictMode:z.supportsStrictMode,supportsOpenAIGrammarTools:z.supportsOpenAIGrammarTools});if(w?.toolChoice!==void 0)J.tool_choice=w.toolChoice;if(j.reasoning){if(w?.reasoningEffort||w?.reasoningSummary){let Y=w?.reasoningEffort?j.thinkingLevelMap?.[w.reasoningEffort]??w.reasoningEffort:"medium";J.reasoning={effort:Y,summary:w?.reasoningSummary||"auto"},J.include=["reasoning.encrypted_content"]}else if(j.provider!=="github-copilot"&&j.thinkingLevelMap?.off!==null)J.reasoning={effort:j.thinkingLevelMap?.off??"none"};if(j.provider==="xai")J.include=["reasoning.encrypted_content"]}return J}function i(j,D){switch(D){case"flex":return 0.5;case"priority":return j.id==="gpt-5.5"?2.5:2;default:return 1}}function n(j,D,w){let z=i(w,D);if(z===1)return;j.cost.input*=z,j.cost.output*=z,j.cost.cacheRead*=z,j.cost.cacheWrite*=z,j.cost.total=j.cost.input+j.cost.output+j.cost.cacheRead+j.cost.cacheWrite}export{Wj as streamSimple,l as stream};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var j=Object.create;var{getPrototypeOf:k,defineProperty:f,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,s=(a,b,c)=>{var g=a!=null&&typeof a==="object";if(g){var h=b?o??=new WeakMap:p??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of l(a))if(!m.call(d,e))f(d,e,{get:n.bind(a,e),enumerable:!0});if(g)h.set(a,d);return d};var t=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var u=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var v=(a,b)=>()=>(a&&(b=a(a=0)),b);var w=(a)=>JSON.parse(a);var x=import.meta.require;
3
- export{s as Jk,t as Kk,u as Lk,v as Mk,w as Nk,x as Ok};
3
+ export{s as Kk,t as Lk,u as Mk,v as Nk,w as Ok,x as Pk};
@@ -1 +1 @@
1
- import{Ja as cz}from"./chunk-6b0f3d07.js";import"./chunk-05m8w09t.js";import{eb as r}from"./chunk-ankkm2wz.js";import{fb as Cz,gb as fz,hb as Iz,ib as gz,jb as uz,kb as lz,lb as dz,mb as pz}from"./chunk-3vbx3x11.js";import"./chunk-898hrxwq.js";import{Xf as yz}from"./chunk-j5q3t199.js";import{cg as Dz}from"./chunk-gg8dmkwd.js";import{ig as m}from"./chunk-v5zdafv4.js";import{jg as C,lg as f,mg as I,ng as w,wg as bz}from"./chunk-38hp9gfh.js";import{Ag as P,Aj as hz,Bg as z,Bj as Sz,Cg as J,Ch as Rz,Cj as wz,Dg as i,Fi as Zz,Fj as V,Gg as o,Gj as j,Hj as kz,Ig as q,Ij as qz,Jh as a,Jj as Az,Kj as Ez,Lj as Fz,Mj as Uz,Og as n,Tg as Bz,Xi as Jz,bh as Yz,cj as Kz,dh as X,eh as Vz,fh as Pz,mh as vz,oh as Gz,qh as Tz,rh as Lz,xg as Mz,xj as _z,zg as $z,zj as F}from"./chunk-ersxsrz8.js";import{Jk as Wz}from"./chunk-8tnq43k9.js";var k=Wz($z(),1);function Nz({open:Z,onOpenChange:T,mode:L,teamId:U,project:W}){let A=i(),K=n(),[H,O]=k.useState(""),[y,B]=k.useState(!0),[g,M]=k.useState(void 0),[b,N]=k.useState(void 0),[E,D]=k.useState(!1),v=k.useRef(null);k.useEffect(()=>{if(Z)if(L==="edit"&&W)O(W.name||""),M(W.coverImageKey),N(W.coverImage),B(W.enableNotification!==!1);else O(""),M(void 0),N(void 0),B(!0)},[Z,L,W]);let u=X.api.teams[":teamId"].projects.$post,{mutate:t}=q({mutationFn:async(Q)=>{let _=await u({param:{teamId:U},json:Q});if(!_.ok)throw Error(V.failed_create_project());return await _.json()},onSuccess:(Q)=>{A.invalidateQueries({queryKey:["teams",U,"projects"]}),T(!1);let _=Q;if(_&&typeof _.id==="string")K({to:"/projects/$projectId",params:{projectId:_.id}})}}),l=X.api.projects[":projectId"].$put,{mutate:s}=q({mutationFn:async(Q)=>{let _=await l({param:{projectId:W.id},json:Q});if(!_.ok)throw Error(V.failed_update_project());return await _.json()},onSuccess:()=>{A.invalidateQueries({queryKey:["teams",U,"projects"]}),T(!1)}}),e=X.api.teams[":teamId"].files.$post,{mutate:d}=q({mutationFn:async({file:Q})=>{let _=await e({param:{teamId:U},form:{file:Q}});if(!_.ok)throw Error(V.failed_upload_file());return await _.json()},onSuccess:(Q)=>{let _=Q;if(_&&typeof _.key==="string")M(_.key);D(!1)},onError:()=>{D(!1)}}),R=(Q)=>{let _=Q.target.files?.[0];if(_){D(!0);let zz=URL.createObjectURL(_);N(zz),d({file:_})}},h=()=>{v.current?.click()},p=(Q)=>{Q.stopPropagation(),M(void 0),N(void 0)},S=()=>{if(!H.trim())return;if(L==="create")t({name:H.trim(),coverImageKey:g,enableNotification:y});else if(L==="edit"&&W?.id)s({name:H.trim(),coverImageKey:g,enableNotification:y})};return z(kz,{open:Z,onOpenChange:T,children:J(qz,{className:"sm:max-w-[550px] overflow-hidden rounded-2xl border border-border/60 bg-background/95 backdrop-blur-md shadow-2xl p-0 gap-0",children:[J(Az,{className:"relative overflow-hidden bg-gradient-to-br from-primary/5 to-transparent p-6 border-b border-border/40",children:[z("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/10 rounded-full blur-2xl pointer-events-none"}),z("div",{className:"absolute bottom-0 left-10 w-32 h-12 bg-primary/5 rounded-full blur-xl pointer-events-none"}),z("div",{className:"flex items-center gap-3",children:J("div",{children:[z(Fz,{className:"text-xl font-semibold tracking-tight text-foreground",children:L==="create"?V.create_new_project():V.project_settings()}),z(Uz,{className:"text-xs text-muted-foreground/80 mt-1",children:L==="create"?V.configure_new_project_description():V.manage_project_description()})]})})]}),J("div",{className:"space-y-6 p-6 max-h-[75vh] overflow-y-auto",children:[J("div",{className:"space-y-2",children:[z(m,{htmlFor:"name",className:"text-sm font-semibold tracking-tight text-foreground",children:V.project_name()}),J("div",{className:"relative",children:[z(j,{id:"name",value:H,onChange:(Q)=>O(Q.target.value),placeholder:V.project_name_placeholder(),className:"h-11 px-4 rounded-xl border-border/80 focus-visible:ring-ring/25 focus-visible:border-primary transition-all shadow-xs pr-10"}),H.trim()&&z("div",{className:"absolute inset-y-0 right-3 flex items-center",children:z(a,{className:"w-4 h-4 text-primary"})})]}),z("p",{className:"text-[11px] text-muted-foreground",children:V.project_name_hint()})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J("div",{className:"flex items-center justify-between",children:[J(m,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Lz,{className:"w-4 h-4 text-primary"}),V.project_cover()]}),b&&J("button",{type:"button",onClick:p,className:"text-xs text-muted-foreground hover:text-destructive hover:bg-destructive/5 px-2.5 py-1 rounded-lg transition-all flex items-center gap-1 font-medium",children:[z(Kz,{className:"w-3.5 h-3.5"}),V.remove_cover()]})]}),J("div",{className:"relative aspect-square w-48 mx-auto rounded-2xl border border-dashed border-border flex items-center justify-center cursor-pointer overflow-hidden group shadow-inner bg-muted/20 transition-all duration-300 hover:border-primary/50 hover:bg-muted/40",onClick:h,children:[z("input",{type:"file",ref:v,className:"hidden",accept:"image/*",onChange:R}),E&&z("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-xs flex flex-col items-center justify-center gap-2 z-20",children:J("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-background border rounded-full shadow-lg",children:[z(Gz,{className:"w-4 h-4 animate-spin text-primary"}),z("span",{className:"text-xs font-semibold text-foreground",children:V.uploading()})]})}),b?J(P,{children:[z("img",{src:b,alt:V.cover_preview(),className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),J("div",{className:"absolute inset-0 bg-black/45 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col items-center justify-center gap-1.5 text-white z-10",children:[z(Jz,{className:"w-5 h-5 transform translate-y-1 group-hover:translate-y-0 transition-transform duration-300"}),z("span",{className:"text-xs font-semibold",children:V.upload_image()})]})]}):J("div",{className:"flex flex-col items-center gap-2 text-center p-4",children:[z("div",{className:"p-2.5 rounded-full bg-background border shadow-xs group-hover:scale-110 transition-transform duration-300",children:z(Jz,{className:"w-4 h-4 text-muted-foreground"})}),J("div",{children:[z("p",{className:"text-xs font-medium text-foreground",children:V.upload_cover()}),z("p",{className:"text-[11px] text-muted-foreground mt-0.5 max-w-[140px] mx-auto leading-normal",children:V.upload_cover_hint()})]})]})]})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J(m,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Tz,{className:"w-4 h-4 text-primary"}),V.project_preferences()]}),J("div",{className:"flex items-start justify-between rounded-xl border border-border/50 bg-muted/10 p-4 transition-all duration-300 hover:bg-muted/20",children:[J("div",{className:"space-y-1 pr-4",children:[J("div",{className:"text-sm font-semibold flex items-center gap-2 text-foreground",children:[z(Rz,{className:"w-4 h-4 text-primary"}),V.activity_notifications()]}),z("p",{className:"text-xs text-muted-foreground leading-normal",children:V.activity_notifications_description()})]}),z(r,{checked:y,onCheckedChange:B,disabled:E,className:"mt-0.5"})]})]})]}),J(Ez,{className:"flex items-center justify-end gap-3 px-6 py-4 bg-muted/20 border-t border-border/40",children:[z(F,{type:"button",variant:"ghost",onClick:()=>T(!1),disabled:E,className:"rounded-xl h-10 px-4 hover:bg-muted font-medium text-sm text-muted-foreground hover:text-foreground transition-colors",children:V.cancel()}),z(F,{type:"submit",onClick:S,disabled:!H.trim()||E,className:"rounded-xl h-10 px-5 bg-primary text-primary-foreground hover:bg-primary/90 font-semibold text-sm shadow-lg shadow-primary/10 hover:shadow-primary/20 active:scale-98 transition-all flex items-center gap-2",children:E?J(P,{children:[z(Gz,{className:"w-4 h-4 animate-spin"}),V.processing()]}):L==="create"?V.create_project():V.save_changes()})]})]})})}function Oz({sortBy:Z,sortDirection:T,onSortChange:L}){let U=(H)=>{L(H,T)},W=()=>{L(Z,T==="asc"?"desc":"asc")},A=(H)=>{switch(H){case"name":return V.sort_name();case"created_at":return V.sort_created();case"updated_at":return V.sort_updated();default:return H}},K=T==="asc";return J(C,{children:[z(f,{asChild:!0,children:J(F,{variant:"outline",className:"gap-2 bg-muted/50",children:[z("span",{className:"text-muted-foreground",children:V.sorted_by_label()}),z("span",{className:"font-medium text-foreground",children:A(Z)})]})}),J(I,{align:"end",className:"w-56 p-2",children:[z("div",{className:"text-xs font-semibold text-muted-foreground mb-2 px-2",children:V.sort_by()}),J(C,{children:[z(f,{asChild:!0,children:J(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted mb-2 border",children:[z("span",{children:A(Z)}),z(Vz,{className:"h-4 w-4 opacity-50"})]})}),z(I,{className:"w-52",children:["name","created_at","updated_at"].map((H)=>J(w,{onClick:()=>U(H),className:"justify-between",children:[A(H),Z===H&&z(a,{className:"h-4 w-4"})]},H))})]}),J(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted border",onClick:W,children:[z("span",{className:"text-muted-foreground",children:Z==="name"?K?z(P,{children:V.sort_a_to_z()}):z(P,{children:V.sort_z_to_a()}):K?z(P,{children:V.sort_oldest_to_newest()}):z(P,{children:V.sort_newest_to_oldest()})}),K?z(Pz,{className:"h-4 w-4 opacity-50"}):z(Vz,{className:"h-4 w-4 opacity-50"})]})]})]})}var $=Wz($z(),1);function JG(){let{teamId:Z}=VG.useParams(),{canEdit:T,canAdmin:L}=bz(),U=n(),W=i(),[A,K]=$.useState(null),[H,O]=$.useState(!1),[y,B]=$.useState("create"),[g,M]=$.useState(void 0),[b,N]=$.useState(!1),[E,D]=$.useState(void 0),[v,u]=$.useState(""),[t,l]=$.useState(!1),{metadata:s,setMetadata:e}=Dz(),d=`team:${Z}:projects:sort`,R=s[d],[h,p]=$.useState(()=>R?.sortBy||"name"),[S,Q]=$.useState(()=>R?.sortDirection||"asc");$.useEffect(()=>{if(R?.sortBy&&R.sortBy!==h)p(R.sortBy);if(R?.sortDirection&&R.sortDirection!==S)Q(R.sortDirection)},[R]);let _=X.api.teams[":teamId"].projects.$get,{data:zz}=o({queryKey:["teams",Z,"projects",h,S],queryFn:async()=>{let G=await _({param:{teamId:Z},query:{sortBy:h,sortDirection:S}});if(!G.ok)throw Error("Failed to fetch projects");return await G.json()},placeholderData:Mz}),{data:Hz}=o({queryKey:["teams",Z,"members"],queryFn:async()=>{let G=await X.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{}});if(!G.ok)throw Error("Failed to fetch members");return await G.json()}}),{data:Qz}=o({queryKey:["teams",Z,"me"],queryFn:async()=>{let G=await X.api.teams[":teamId"].me.$get({param:{teamId:Z}});if(!G.ok)throw Error("Failed to fetch me");return await G.json()}}),xz=X.api.teams[":teamId"].invite.$post,mz=q({mutationFn:async(G)=>{let Y=await xz(G);if(!Y.ok)throw Error("Failed to invite");return await Y.json()}}),c=q({mutationFn:async(G)=>{if(!(await X.api.projects[":projectId"].$delete({param:{projectId:G}})).ok)throw Error("Failed to delete project")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]})}}),iz=q({mutationFn:async(G)=>{let Y=await X.api.projects[":projectId"].$put({param:{projectId:G.id},json:{enableNotification:!G.enableNotification}});if(!Y.ok)throw Error("Failed to update project notification settings");return await Y.json()},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]}),Yz.success(V.project_notification_updated())},onError:(G)=>{Yz.error(G instanceof Error?G.message:V.failed_update_project_notification())}}),Xz=()=>{B("create"),M(void 0),O(!0)},nz=()=>{K("create"),setTimeout(()=>{K(null)},100),setTimeout(()=>{Xz()},200)},az=(G)=>{B("edit"),M(G),O(!0)},jz=(G)=>{D(G),u(""),N(!0)},rz=async()=>{if(E&&v==="delete")try{await c.mutateAsync(E.id),N(!1)}catch(G){console.error(G)}},oz=(G,Y)=>{if(Y.detail>1)return;K(G),setTimeout(()=>{K(null)},100),setTimeout(()=>{U({to:"/projects/$projectId",params:{projectId:G}})},200)},tz=async(G)=>{return(await mz.mutateAsync({param:{teamId:Z},json:{role:G}})).code},sz=q({mutationFn:async({userId:G,role:Y})=>{if(!(await X.api.teams[":teamId"].members[":userId"].$patch({param:{teamId:Z,userId:G},json:{role:Y}})).ok)throw Error("Failed to update member role")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),ez=q({mutationFn:async(G)=>{if(!(await X.api.teams[":teamId"].members[":userId"].$delete({param:{teamId:Z,userId:G}})).ok)throw Error("Failed to remove member")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),zG=(G)=>{if(!G)return"??";return G.split(" ").map((Y)=>Y[0]).slice(0,2).join("").toUpperCase()},GG=(G,Y)=>{p(G),Q(Y),e(Z,d,{sortBy:G,sortDirection:Y})},x=Array.isArray(Hz)?Hz:[];return J("div",{className:"flex-1 overflow-y-auto p-4",children:[J("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-4",children:[z("h1",{className:"text-2xl font-bold",children:V.projects()}),J("div",{className:"flex flex-wrap items-center gap-4",children:[J("div",{className:"flex items-center -space-x-2 cursor-pointer hover:opacity-90",onClick:()=>l(!0),"data-testid":"team-members-trigger",children:[x.slice(0,3).map((G)=>J(hz,{className:"border-2 border-background w-8 h-8",children:[G.image&&z(Sz,{src:G.image,alt:G.name,className:"object-cover"}),z(wz,{className:"text-[10px]",children:zG(G.name)})]},G.id)),x.length>3&&J("div",{className:"flex items-center justify-center w-8 h-8 rounded-full border-2 border-background bg-muted text-[10px] font-medium",children:["+",x.length-3]})]}),z(Oz,{sortBy:h,sortDirection:S,onSortChange:GG}),T&&J(F,{className:"bg-orange-600 hover:bg-orange-700 text-white gap-2",onClick:Xz,children:[z(Zz,{className:"w-4 h-4"}),V.create_project()]})]})]}),J("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:[zz?.data?.map((G)=>z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out",A===G.id?"scale-95":"scale-100"),onClick:(Y)=>oz(G.id,Y),children:J("div",{className:"flex flex-col",children:[J("div",{className:"relative w-full h-full aspect-square flex items-center justify-center bg-zinc-400/20",children:[G.coverImage?z("img",{src:G.coverImage,alt:G.name,className:"w-full h-full object-cover rounded"}):J("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 180.95 164.7",preserveAspectRatio:"xMidYMid slice",className:"w-full h-full object-cover rounded",children:[z("polygon",{fill:"#FC9F8E",points:"0 18.5 0 76.0 151.69 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FEBAB8",points:"0 0 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0"}),z("polyline",{fill:"#FAA5A5",points:"0 18.5 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0 0 0"}),z("polygon",{fill:"#EC5B6C",points:"0 76.0 0 164.7 151.69 164.7"}),z("polygon",{fill:"#E85C71",points:"180.95 18.9 110.33 63.9 117.37 68.0 117.26 73.4 180.95 113.6"}),z("polygon",{fill:"#C8405B",points:"117.26 73.4 117.37 99.0 90.53 114.9 174.35 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FFCCBE",points:"90.53 51.6 63.69 68.1 90.53 83.4"}),z("path",{fill:"#FB9991",d:"M 90.53 51.6 L 90.53 61.3 L 100.87 67.4 L 90.53 73.5 L 90.53 83.4 L 117.37 68.0 C 117.15 67.6 90.53 51.6 90.53 51.6 Z"}),z("path",{fill:"#FFEACD",d:"M 63.69 68.1 C 63.47 68.5 64.02 99.3 64.02 99.3 C 64.02 99.3 64.46 99.6 64.9 99.9 L 90.53 83.4 L 63.69 68.1 Z"}),z("polygon",{fill:"#FFCFB5",points:"64.02 99.3 90.53 114.9 90.53 83.4"}),z("path",{fill:"#F67D73",d:"M 90.53 83.4 L 90.53 114.9 L 117.37 99.0 Z"}),z("path",{fill:"#F26560",d:"M 90.53 83.4 L 117.37 99.0 L 117.37 68.0 Z"}),z("polygon",{fill:"#EB5F5B",points:"80.08 67.5 90.53 73.5 90.53 61.3"}),z("polygon",{fill:"#DB4D50",points:"90.53 61.3 90.53 73.5 100.87 67.4"})]}),z("div",{className:"absolute bottom-0 left-0 w-full h-[65%] bg-linear-to-t from-black/35 to-black/0"}),z("p",{className:"absolute left-1 bottom-2 text-white",children:G.name})]}),J("div",{className:"px-2 h-10 flex justify-between items-center",children:[J("p",{className:"truncate pr-1 text-xs text-muted-foreground",children:[V.updated_ago()," ",yz(G.updatedAt??"")]}),z("div",{onClick:(Y)=>Y.stopPropagation(),children:J(C,{modal:!1,children:[z(f,{asChild:!0,children:z("button",{className:"hover:bg-muted outline-none flex px-1",children:z(vz,{className:"w-5 h-5 text-muted-foreground"})})}),J(I,{align:"end",children:[T&&z(w,{onClick:(Y)=>{Y.stopPropagation(),az(G)},children:V.project_settings()}),J(w,{className:"flex items-center justify-between gap-4 cursor-pointer",onSelect:(Y)=>{Y.preventDefault(),iz.mutate(G)},children:[z("span",{children:V.notification()}),z(r,{checked:G.enableNotification??!0,className:"pointer-events-none"})]}),L&&z(w,{className:"text-destructive focus:text-destructive",onClick:()=>jz(G),children:V.delete()})]})]})})]})]})},G.id)),T&&z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out border-dashed hover:border-orange-600/50 group",A==="create"?"scale-95":"scale-100"),onClick:nz,children:J("div",{className:"flex flex-col",children:[z("div",{className:"relative w-full aspect-square flex items-center justify-center bg-zinc-400/5 group-hover:bg-orange-600/5 transition-colors",children:z(Zz,{className:"w-8 h-8 text-zinc-400 group-hover:text-orange-600 transition-colors"})}),z("div",{className:"px-2 h-10 flex items-center justify-center bg-zinc-400/10 border-t group-hover:bg-orange-600/10 transition-colors",children:z("p",{className:"text-sm text-muted-foreground group-hover:text-orange-600 transition-colors",children:V.create_project()})})]})})]}),z(Nz,{open:H,onOpenChange:O,mode:y,teamId:Z,project:g}),z(Cz,{open:b,onOpenChange:N,children:J(fz,{children:[J(Iz,{children:[z(uz,{children:V.are_you_sure()}),J(lz,{children:[V.delete_project_warning({name:E?.name??""}),J("div",{className:"mt-4 flex flex-col gap-2 text-foreground",children:[z("span",{className:"text-sm font-medium",children:V.type_delete_to_confirm()}),z(j,{value:v,onChange:(G)=>u(G.target.value),placeholder:V.delete_placeholder(),className:"h-9",autoFocus:!0})]})]})]}),J(gz,{children:[z(pz,{disabled:c.isPending,children:V.cancel()}),z(dz,{onClick:(G)=>{G.preventDefault(),rz()},disabled:v!=="delete"||c.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:c.isPending?V.deleting():V.delete()})]})]})}),z(cz,{open:t,onOpenChange:l,title:V.team_members(),type:"team",members:x,isOwner:Qz?.role==="owner",onInvite:tz,onUpdateRole:async(G,Y)=>{await sz.mutateAsync({userId:G,role:Y})},onRemoveMember:async(G)=>{await ez.mutateAsync(G)},currentUserId:Qz?.id})]})}var VG=Bz("/teams/$teamId/")({component:JG});export{VG as Route};
1
+ import{Ka as cz}from"./chunk-8vc1m0kw.js";import"./chunk-4rz2105a.js";import{fb as r}from"./chunk-f7fevgv2.js";import{gb as Cz,hb as fz,ib as Iz,jb as gz,kb as uz,lb as lz,mb as dz,nb as pz}from"./chunk-rek85wwv.js";import"./chunk-qm9w9fcv.js";import{Yf as yz}from"./chunk-n67rfv86.js";import{dg as Dz}from"./chunk-t58kqafx.js";import{jg as m}from"./chunk-3w9vybrh.js";import{kg as C,mg as f,ng as I,og as w,xg as bz}from"./chunk-8mzg29m4.js";import{Ag as $z,Aj as F,Bg as P,Bj as hz,Cg as z,Cj as Sz,Dg as J,Dh as Rz,Dj as wz,Eg as i,Gi as Zz,Gj as V,Hg as o,Hj as j,Ij as kz,Jg as q,Jj as qz,Kh as a,Kj as Az,Lj as Ez,Mj as Fz,Nj as Uz,Pg as n,Ug as Bz,Yi as Jz,ch as Yz,dj as Kz,eh as X,fh as Vz,gh as Pz,nh as vz,ph as Gz,rh as Tz,sh as Lz,yg as Mz,yj as _z}from"./chunk-cbjfw47x.js";import{Kk as Wz}from"./chunk-gd1x3rgn.js";var k=Wz($z(),1);function Nz({open:Z,onOpenChange:T,mode:L,teamId:U,project:W}){let A=i(),K=n(),[H,O]=k.useState(""),[y,B]=k.useState(!0),[g,M]=k.useState(void 0),[b,N]=k.useState(void 0),[E,D]=k.useState(!1),v=k.useRef(null);k.useEffect(()=>{if(Z)if(L==="edit"&&W)O(W.name||""),M(W.coverImageKey),N(W.coverImage),B(W.enableNotification!==!1);else O(""),M(void 0),N(void 0),B(!0)},[Z,L,W]);let u=X.api.teams[":teamId"].projects.$post,{mutate:t}=q({mutationFn:async(Q)=>{let _=await u({param:{teamId:U},json:Q});if(!_.ok)throw Error(V.failed_create_project());return await _.json()},onSuccess:(Q)=>{A.invalidateQueries({queryKey:["teams",U,"projects"]}),T(!1);let _=Q;if(_&&typeof _.id==="string")K({to:"/projects/$projectId",params:{projectId:_.id}})}}),l=X.api.projects[":projectId"].$put,{mutate:s}=q({mutationFn:async(Q)=>{let _=await l({param:{projectId:W.id},json:Q});if(!_.ok)throw Error(V.failed_update_project());return await _.json()},onSuccess:()=>{A.invalidateQueries({queryKey:["teams",U,"projects"]}),T(!1)}}),e=X.api.teams[":teamId"].files.$post,{mutate:d}=q({mutationFn:async({file:Q})=>{let _=await e({param:{teamId:U},form:{file:Q}});if(!_.ok)throw Error(V.failed_upload_file());return await _.json()},onSuccess:(Q)=>{let _=Q;if(_&&typeof _.key==="string")M(_.key);D(!1)},onError:()=>{D(!1)}}),R=(Q)=>{let _=Q.target.files?.[0];if(_){D(!0);let zz=URL.createObjectURL(_);N(zz),d({file:_})}},h=()=>{v.current?.click()},p=(Q)=>{Q.stopPropagation(),M(void 0),N(void 0)},S=()=>{if(!H.trim())return;if(L==="create")t({name:H.trim(),coverImageKey:g,enableNotification:y});else if(L==="edit"&&W?.id)s({name:H.trim(),coverImageKey:g,enableNotification:y})};return z(kz,{open:Z,onOpenChange:T,children:J(qz,{className:"sm:max-w-[550px] overflow-hidden rounded-2xl border border-border/60 bg-background/95 backdrop-blur-md shadow-2xl p-0 gap-0",children:[J(Az,{className:"relative overflow-hidden bg-gradient-to-br from-primary/5 to-transparent p-6 border-b border-border/40",children:[z("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/10 rounded-full blur-2xl pointer-events-none"}),z("div",{className:"absolute bottom-0 left-10 w-32 h-12 bg-primary/5 rounded-full blur-xl pointer-events-none"}),z("div",{className:"flex items-center gap-3",children:J("div",{children:[z(Fz,{className:"text-xl font-semibold tracking-tight text-foreground",children:L==="create"?V.create_new_project():V.project_settings()}),z(Uz,{className:"text-xs text-muted-foreground/80 mt-1",children:L==="create"?V.configure_new_project_description():V.manage_project_description()})]})})]}),J("div",{className:"space-y-6 p-6 max-h-[75vh] overflow-y-auto",children:[J("div",{className:"space-y-2",children:[z(m,{htmlFor:"name",className:"text-sm font-semibold tracking-tight text-foreground",children:V.project_name()}),J("div",{className:"relative",children:[z(j,{id:"name",value:H,onChange:(Q)=>O(Q.target.value),placeholder:V.project_name_placeholder(),className:"h-11 px-4 rounded-xl border-border/80 focus-visible:ring-ring/25 focus-visible:border-primary transition-all shadow-xs pr-10"}),H.trim()&&z("div",{className:"absolute inset-y-0 right-3 flex items-center",children:z(a,{className:"w-4 h-4 text-primary"})})]}),z("p",{className:"text-[11px] text-muted-foreground",children:V.project_name_hint()})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J("div",{className:"flex items-center justify-between",children:[J(m,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Lz,{className:"w-4 h-4 text-primary"}),V.project_cover()]}),b&&J("button",{type:"button",onClick:p,className:"text-xs text-muted-foreground hover:text-destructive hover:bg-destructive/5 px-2.5 py-1 rounded-lg transition-all flex items-center gap-1 font-medium",children:[z(Kz,{className:"w-3.5 h-3.5"}),V.remove_cover()]})]}),J("div",{className:"relative aspect-square w-48 mx-auto rounded-2xl border border-dashed border-border flex items-center justify-center cursor-pointer overflow-hidden group shadow-inner bg-muted/20 transition-all duration-300 hover:border-primary/50 hover:bg-muted/40",onClick:h,children:[z("input",{type:"file",ref:v,className:"hidden",accept:"image/*",onChange:R}),E&&z("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-xs flex flex-col items-center justify-center gap-2 z-20",children:J("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-background border rounded-full shadow-lg",children:[z(Gz,{className:"w-4 h-4 animate-spin text-primary"}),z("span",{className:"text-xs font-semibold text-foreground",children:V.uploading()})]})}),b?J(P,{children:[z("img",{src:b,alt:V.cover_preview(),className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),J("div",{className:"absolute inset-0 bg-black/45 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col items-center justify-center gap-1.5 text-white z-10",children:[z(Jz,{className:"w-5 h-5 transform translate-y-1 group-hover:translate-y-0 transition-transform duration-300"}),z("span",{className:"text-xs font-semibold",children:V.upload_image()})]})]}):J("div",{className:"flex flex-col items-center gap-2 text-center p-4",children:[z("div",{className:"p-2.5 rounded-full bg-background border shadow-xs group-hover:scale-110 transition-transform duration-300",children:z(Jz,{className:"w-4 h-4 text-muted-foreground"})}),J("div",{children:[z("p",{className:"text-xs font-medium text-foreground",children:V.upload_cover()}),z("p",{className:"text-[11px] text-muted-foreground mt-0.5 max-w-[140px] mx-auto leading-normal",children:V.upload_cover_hint()})]})]})]})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J(m,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Tz,{className:"w-4 h-4 text-primary"}),V.project_preferences()]}),J("div",{className:"flex items-start justify-between rounded-xl border border-border/50 bg-muted/10 p-4 transition-all duration-300 hover:bg-muted/20",children:[J("div",{className:"space-y-1 pr-4",children:[J("div",{className:"text-sm font-semibold flex items-center gap-2 text-foreground",children:[z(Rz,{className:"w-4 h-4 text-primary"}),V.activity_notifications()]}),z("p",{className:"text-xs text-muted-foreground leading-normal",children:V.activity_notifications_description()})]}),z(r,{checked:y,onCheckedChange:B,disabled:E,className:"mt-0.5"})]})]})]}),J(Ez,{className:"flex items-center justify-end gap-3 px-6 py-4 bg-muted/20 border-t border-border/40",children:[z(F,{type:"button",variant:"ghost",onClick:()=>T(!1),disabled:E,className:"rounded-xl h-10 px-4 hover:bg-muted font-medium text-sm text-muted-foreground hover:text-foreground transition-colors",children:V.cancel()}),z(F,{type:"submit",onClick:S,disabled:!H.trim()||E,className:"rounded-xl h-10 px-5 bg-primary text-primary-foreground hover:bg-primary/90 font-semibold text-sm shadow-lg shadow-primary/10 hover:shadow-primary/20 active:scale-98 transition-all flex items-center gap-2",children:E?J(P,{children:[z(Gz,{className:"w-4 h-4 animate-spin"}),V.processing()]}):L==="create"?V.create_project():V.save_changes()})]})]})})}function Oz({sortBy:Z,sortDirection:T,onSortChange:L}){let U=(H)=>{L(H,T)},W=()=>{L(Z,T==="asc"?"desc":"asc")},A=(H)=>{switch(H){case"name":return V.sort_name();case"created_at":return V.sort_created();case"updated_at":return V.sort_updated();default:return H}},K=T==="asc";return J(C,{children:[z(f,{asChild:!0,children:J(F,{variant:"outline",className:"gap-2 bg-muted/50",children:[z("span",{className:"text-muted-foreground",children:V.sorted_by_label()}),z("span",{className:"font-medium text-foreground",children:A(Z)})]})}),J(I,{align:"end",className:"w-56 p-2",children:[z("div",{className:"text-xs font-semibold text-muted-foreground mb-2 px-2",children:V.sort_by()}),J(C,{children:[z(f,{asChild:!0,children:J(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted mb-2 border",children:[z("span",{children:A(Z)}),z(Vz,{className:"h-4 w-4 opacity-50"})]})}),z(I,{className:"w-52",children:["name","created_at","updated_at"].map((H)=>J(w,{onClick:()=>U(H),className:"justify-between",children:[A(H),Z===H&&z(a,{className:"h-4 w-4"})]},H))})]}),J(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted border",onClick:W,children:[z("span",{className:"text-muted-foreground",children:Z==="name"?K?z(P,{children:V.sort_a_to_z()}):z(P,{children:V.sort_z_to_a()}):K?z(P,{children:V.sort_oldest_to_newest()}):z(P,{children:V.sort_newest_to_oldest()})}),K?z(Pz,{className:"h-4 w-4 opacity-50"}):z(Vz,{className:"h-4 w-4 opacity-50"})]})]})]})}var $=Wz($z(),1);function JG(){let{teamId:Z}=VG.useParams(),{canEdit:T,canAdmin:L}=bz(),U=n(),W=i(),[A,K]=$.useState(null),[H,O]=$.useState(!1),[y,B]=$.useState("create"),[g,M]=$.useState(void 0),[b,N]=$.useState(!1),[E,D]=$.useState(void 0),[v,u]=$.useState(""),[t,l]=$.useState(!1),{metadata:s,setMetadata:e}=Dz(),d=`team:${Z}:projects:sort`,R=s[d],[h,p]=$.useState(()=>R?.sortBy||"name"),[S,Q]=$.useState(()=>R?.sortDirection||"asc");$.useEffect(()=>{if(R?.sortBy&&R.sortBy!==h)p(R.sortBy);if(R?.sortDirection&&R.sortDirection!==S)Q(R.sortDirection)},[R]);let _=X.api.teams[":teamId"].projects.$get,{data:zz}=o({queryKey:["teams",Z,"projects",h,S],queryFn:async()=>{let G=await _({param:{teamId:Z},query:{sortBy:h,sortDirection:S}});if(!G.ok)throw Error("Failed to fetch projects");return await G.json()},placeholderData:Mz}),{data:Hz}=o({queryKey:["teams",Z,"members"],queryFn:async()=>{let G=await X.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{}});if(!G.ok)throw Error("Failed to fetch members");return await G.json()}}),{data:Qz}=o({queryKey:["teams",Z,"me"],queryFn:async()=>{let G=await X.api.teams[":teamId"].me.$get({param:{teamId:Z}});if(!G.ok)throw Error("Failed to fetch me");return await G.json()}}),xz=X.api.teams[":teamId"].invite.$post,mz=q({mutationFn:async(G)=>{let Y=await xz(G);if(!Y.ok)throw Error("Failed to invite");return await Y.json()}}),c=q({mutationFn:async(G)=>{if(!(await X.api.projects[":projectId"].$delete({param:{projectId:G}})).ok)throw Error("Failed to delete project")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]})}}),iz=q({mutationFn:async(G)=>{let Y=await X.api.projects[":projectId"].$put({param:{projectId:G.id},json:{enableNotification:!G.enableNotification}});if(!Y.ok)throw Error("Failed to update project notification settings");return await Y.json()},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]}),Yz.success(V.project_notification_updated())},onError:(G)=>{Yz.error(G instanceof Error?G.message:V.failed_update_project_notification())}}),Xz=()=>{B("create"),M(void 0),O(!0)},nz=()=>{K("create"),setTimeout(()=>{K(null)},100),setTimeout(()=>{Xz()},200)},az=(G)=>{B("edit"),M(G),O(!0)},jz=(G)=>{D(G),u(""),N(!0)},rz=async()=>{if(E&&v==="delete")try{await c.mutateAsync(E.id),N(!1)}catch(G){console.error(G)}},oz=(G,Y)=>{if(Y.detail>1)return;K(G),setTimeout(()=>{K(null)},100),setTimeout(()=>{U({to:"/projects/$projectId",params:{projectId:G}})},200)},tz=async(G)=>{return(await mz.mutateAsync({param:{teamId:Z},json:{role:G}})).code},sz=q({mutationFn:async({userId:G,role:Y})=>{if(!(await X.api.teams[":teamId"].members[":userId"].$patch({param:{teamId:Z,userId:G},json:{role:Y}})).ok)throw Error("Failed to update member role")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),ez=q({mutationFn:async(G)=>{if(!(await X.api.teams[":teamId"].members[":userId"].$delete({param:{teamId:Z,userId:G}})).ok)throw Error("Failed to remove member")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),zG=(G)=>{if(!G)return"??";return G.split(" ").map((Y)=>Y[0]).slice(0,2).join("").toUpperCase()},GG=(G,Y)=>{p(G),Q(Y),e(Z,d,{sortBy:G,sortDirection:Y})},x=Array.isArray(Hz)?Hz:[];return J("div",{className:"flex-1 overflow-y-auto p-4",children:[J("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-4",children:[z("h1",{className:"text-2xl font-bold",children:V.projects()}),J("div",{className:"flex flex-wrap items-center gap-4",children:[J("div",{className:"flex items-center -space-x-2 cursor-pointer hover:opacity-90",onClick:()=>l(!0),"data-testid":"team-members-trigger",children:[x.slice(0,3).map((G)=>J(hz,{className:"border-2 border-background w-8 h-8",children:[G.image&&z(Sz,{src:G.image,alt:G.name,className:"object-cover"}),z(wz,{className:"text-[10px]",children:zG(G.name)})]},G.id)),x.length>3&&J("div",{className:"flex items-center justify-center w-8 h-8 rounded-full border-2 border-background bg-muted text-[10px] font-medium",children:["+",x.length-3]})]}),z(Oz,{sortBy:h,sortDirection:S,onSortChange:GG}),T&&J(F,{className:"bg-orange-600 hover:bg-orange-700 text-white gap-2",onClick:Xz,children:[z(Zz,{className:"w-4 h-4"}),V.create_project()]})]})]}),J("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:[zz?.data?.map((G)=>z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out",A===G.id?"scale-95":"scale-100"),onClick:(Y)=>oz(G.id,Y),children:J("div",{className:"flex flex-col",children:[J("div",{className:"relative w-full h-full aspect-square flex items-center justify-center bg-zinc-400/20",children:[G.coverImage?z("img",{src:G.coverImage,alt:G.name,className:"w-full h-full object-cover rounded"}):J("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 180.95 164.7",preserveAspectRatio:"xMidYMid slice",className:"w-full h-full object-cover rounded",children:[z("polygon",{fill:"#FC9F8E",points:"0 18.5 0 76.0 151.69 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FEBAB8",points:"0 0 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0"}),z("polyline",{fill:"#FAA5A5",points:"0 18.5 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0 0 0"}),z("polygon",{fill:"#EC5B6C",points:"0 76.0 0 164.7 151.69 164.7"}),z("polygon",{fill:"#E85C71",points:"180.95 18.9 110.33 63.9 117.37 68.0 117.26 73.4 180.95 113.6"}),z("polygon",{fill:"#C8405B",points:"117.26 73.4 117.37 99.0 90.53 114.9 174.35 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FFCCBE",points:"90.53 51.6 63.69 68.1 90.53 83.4"}),z("path",{fill:"#FB9991",d:"M 90.53 51.6 L 90.53 61.3 L 100.87 67.4 L 90.53 73.5 L 90.53 83.4 L 117.37 68.0 C 117.15 67.6 90.53 51.6 90.53 51.6 Z"}),z("path",{fill:"#FFEACD",d:"M 63.69 68.1 C 63.47 68.5 64.02 99.3 64.02 99.3 C 64.02 99.3 64.46 99.6 64.9 99.9 L 90.53 83.4 L 63.69 68.1 Z"}),z("polygon",{fill:"#FFCFB5",points:"64.02 99.3 90.53 114.9 90.53 83.4"}),z("path",{fill:"#F67D73",d:"M 90.53 83.4 L 90.53 114.9 L 117.37 99.0 Z"}),z("path",{fill:"#F26560",d:"M 90.53 83.4 L 117.37 99.0 L 117.37 68.0 Z"}),z("polygon",{fill:"#EB5F5B",points:"80.08 67.5 90.53 73.5 90.53 61.3"}),z("polygon",{fill:"#DB4D50",points:"90.53 61.3 90.53 73.5 100.87 67.4"})]}),z("div",{className:"absolute bottom-0 left-0 w-full h-[65%] bg-linear-to-t from-black/35 to-black/0"}),z("p",{className:"absolute left-1 bottom-2 text-white",children:G.name})]}),J("div",{className:"px-2 h-10 flex justify-between items-center",children:[J("p",{className:"truncate pr-1 text-xs text-muted-foreground",children:[V.updated_ago()," ",yz(G.updatedAt??"")]}),z("div",{onClick:(Y)=>Y.stopPropagation(),children:J(C,{modal:!1,children:[z(f,{asChild:!0,children:z("button",{className:"hover:bg-muted outline-none flex px-1",children:z(vz,{className:"w-5 h-5 text-muted-foreground"})})}),J(I,{align:"end",children:[T&&z(w,{onClick:(Y)=>{Y.stopPropagation(),az(G)},children:V.project_settings()}),J(w,{className:"flex items-center justify-between gap-4 cursor-pointer",onSelect:(Y)=>{Y.preventDefault(),iz.mutate(G)},children:[z("span",{children:V.notification()}),z(r,{checked:G.enableNotification??!0,className:"pointer-events-none"})]}),L&&z(w,{className:"text-destructive focus:text-destructive",onClick:()=>jz(G),children:V.delete()})]})]})})]})]})},G.id)),T&&z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out border-dashed hover:border-orange-600/50 group",A==="create"?"scale-95":"scale-100"),onClick:nz,children:J("div",{className:"flex flex-col",children:[z("div",{className:"relative w-full aspect-square flex items-center justify-center bg-zinc-400/5 group-hover:bg-orange-600/5 transition-colors",children:z(Zz,{className:"w-8 h-8 text-zinc-400 group-hover:text-orange-600 transition-colors"})}),z("div",{className:"px-2 h-10 flex items-center justify-center bg-zinc-400/10 border-t group-hover:bg-orange-600/10 transition-colors",children:z("p",{className:"text-sm text-muted-foreground group-hover:text-orange-600 transition-colors",children:V.create_project()})})]})})]}),z(Nz,{open:H,onOpenChange:O,mode:y,teamId:Z,project:g}),z(Cz,{open:b,onOpenChange:N,children:J(fz,{children:[J(Iz,{children:[z(uz,{children:V.are_you_sure()}),J(lz,{children:[V.delete_project_warning({name:E?.name??""}),J("div",{className:"mt-4 flex flex-col gap-2 text-foreground",children:[z("span",{className:"text-sm font-medium",children:V.type_delete_to_confirm()}),z(j,{value:v,onChange:(G)=>u(G.target.value),placeholder:V.delete_placeholder(),className:"h-9",autoFocus:!0})]})]})]}),J(gz,{children:[z(pz,{disabled:c.isPending,children:V.cancel()}),z(dz,{onClick:(G)=>{G.preventDefault(),rz()},disabled:v!=="delete"||c.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:c.isPending?V.deleting():V.delete()})]})]})}),z(cz,{open:t,onOpenChange:l,title:V.team_members(),type:"team",members:x,isOwner:Qz?.role==="owner",onInvite:tz,onUpdateRole:async(G,Y)=>{await sz.mutateAsync({userId:G,role:Y})},onRemoveMember:async(G)=>{await ez.mutateAsync(G)},currentUserId:Qz?.id})]})}var VG=Bz("/teams/$teamId/")({component:JG});export{VG as Route};
@@ -0,0 +1 @@
1
+ import{a as q}from"./chunk-qxwfhv63.js";import"./chunk-2jv9re91.js";import"./chunk-v0cdg3n6.js";import"./chunk-sx1neqgr.js";import"./chunk-29203j0e.js";import"./chunk-6kv3jyfc.js";import"./chunk-d1zpcags.js";import"./chunk-s0g0bc6t.js";import"./chunk-s0k2r6ym.js";import"./chunk-fw5k0xrc.js";import"./chunk-8vc1m0kw.js";import"./chunk-nh4tzzn8.js";import"./chunk-21hvrvzj.js";import"./chunk-avvzqqk2.js";import"./chunk-4rz2105a.js";import"./chunk-f7fevgv2.js";import"./chunk-rek85wwv.js";import"./chunk-fgda7ncw.js";import"./chunk-8hq6sn31.js";import"./chunk-zj1rz1s9.js";import"./chunk-fnkrzqrn.js";import"./chunk-6vn44e4d.js";import"./chunk-f70xdh07.js";import"./chunk-qm9w9fcv.js";import"./chunk-n67rfv86.js";import"./chunk-54hmgj96.js";import"./chunk-7jkvjm4x.js";import"./chunk-r9s1zs4g.js";import"./chunk-3w9vybrh.js";import"./chunk-8mzg29m4.js";import{Cg as f,Ug as k}from"./chunk-cbjfw47x.js";import"./chunk-gd1x3rgn.js";function w(){let{shareId:v}=A.useParams();return f(q,{shareId:v})}var A=k("/share/$shareId/")({component:w});export{A as Route};
@@ -1,2 +1,2 @@
1
- import{Oe as A}from"./chunk-pew69nxg.js";import{Bg as v,Sg as w,dh as z}from"./chunk-ersxsrz8.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/collections/")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
2
- export{B as Fe,H as Ge};
1
+ import{Pe as A}from"./chunk-g0jy85re.js";import{Cg as v,Tg as w,eh as z}from"./chunk-cbjfw47x.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/collections/")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
2
+ export{B as Ge,H as He};