@alpacachen/dsh-kanban 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -2
- package/README.zh.md +35 -2
- package/index.js +544 -26
- package/lib/client.js +144 -13
- package/package.json +5 -2
package/lib/client.js
CHANGED
|
@@ -3,7 +3,7 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: function (require) {
|
|
4
4
|
var module = { exports: {} }
|
|
5
5
|
var exports = module.exports
|
|
6
|
-
"use strict";var
|
|
6
|
+
"use strict";var Bp=Object.create;var Er=Object.defineProperty;var Np=Object.getOwnPropertyDescriptor;var _p=Object.getOwnPropertyNames;var Up=Object.getPrototypeOf,Hp=Object.prototype.hasOwnProperty;var ci=e=>{throw TypeError(e)};var qp=(e,t)=>{for(var a in t)Er(e,a,{get:t[a],enumerable:!0})},fi=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _p(t))!Hp.call(e,r)&&r!==a&&Er(e,r,{get:()=>t[r],enumerable:!(o=Np(t,r))||o.enumerable});return e};var q=(e,t,a)=>(a=e!=null?Bp(Up(e)):{},fi(t||!e||!e.__esModule?Er(a,"default",{value:e,enumerable:!0}):a,e)),zp=e=>fi(Er({},"__esModule",{value:!0}),e);var pi=(e,t,a)=>t.has(e)||ci("Cannot "+a);var qe=(e,t,a)=>(pi(e,t,"read from private field"),a?a.call(e):t.get(e)),mi=(e,t,a)=>t.has(e)?ci("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),Qn=(e,t,a,o)=>(pi(e,t,"write to private field"),o?o.call(e,a):t.set(e,a),a);var fC={};qp(fC,{default:()=>cC});module.exports=zp(fC);var gi=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
7
7
|
@layer properties;
|
|
8
8
|
@layer theme, base, components, utilities;
|
|
9
9
|
@layer theme {
|
|
@@ -13,10 +13,15 @@ window.__ModuleLoader__.load({
|
|
|
13
13
|
"Segoe UI Symbol", "Noto Color Emoji";
|
|
14
14
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
15
15
|
"Courier New", monospace;
|
|
16
|
+
--color-amber-500: oklch(76.9% 0.188 70.08);
|
|
17
|
+
--color-amber-600: oklch(66.6% 0.179 58.318);
|
|
18
|
+
--color-emerald-500: oklch(69.6% 0.17 162.48);
|
|
19
|
+
--color-sky-500: oklch(68.5% 0.169 237.323);
|
|
16
20
|
--color-black: #000;
|
|
17
21
|
--spacing: 0.25rem;
|
|
18
22
|
--container-md: 28rem;
|
|
19
23
|
--container-lg: 32rem;
|
|
24
|
+
--container-xl: 36rem;
|
|
20
25
|
--text-xs: 0.75rem;
|
|
21
26
|
--text-xs--line-height: calc(1 / 0.75);
|
|
22
27
|
--text-sm: 0.875rem;
|
|
@@ -214,6 +219,9 @@ window.__ModuleLoader__.load({
|
|
|
214
219
|
.inset-0 {
|
|
215
220
|
inset: 0px;
|
|
216
221
|
}
|
|
222
|
+
.top-1\\.5 {
|
|
223
|
+
top: calc(var(--spacing) * 1.5);
|
|
224
|
+
}
|
|
217
225
|
.top-4 {
|
|
218
226
|
top: calc(var(--spacing) * 4);
|
|
219
227
|
}
|
|
@@ -226,6 +234,9 @@ window.__ModuleLoader__.load({
|
|
|
226
234
|
.right-4 {
|
|
227
235
|
right: calc(var(--spacing) * 4);
|
|
228
236
|
}
|
|
237
|
+
.-left-\\[21px\\] {
|
|
238
|
+
left: calc(21px * -1);
|
|
239
|
+
}
|
|
229
240
|
.left-\\[50\\%\\] {
|
|
230
241
|
left: 50%;
|
|
231
242
|
}
|
|
@@ -238,6 +249,12 @@ window.__ModuleLoader__.load({
|
|
|
238
249
|
.my-1 {
|
|
239
250
|
margin-block: var(--spacing);
|
|
240
251
|
}
|
|
252
|
+
.mt-0\\.5 {
|
|
253
|
+
margin-top: calc(var(--spacing) * 0.5);
|
|
254
|
+
}
|
|
255
|
+
.mt-1 {
|
|
256
|
+
margin-top: var(--spacing);
|
|
257
|
+
}
|
|
241
258
|
.mt-1\\.5 {
|
|
242
259
|
margin-top: calc(var(--spacing) * 1.5);
|
|
243
260
|
}
|
|
@@ -268,12 +285,18 @@ window.__ModuleLoader__.load({
|
|
|
268
285
|
.h-2 {
|
|
269
286
|
height: calc(var(--spacing) * 2);
|
|
270
287
|
}
|
|
288
|
+
.h-3 {
|
|
289
|
+
height: calc(var(--spacing) * 3);
|
|
290
|
+
}
|
|
271
291
|
.h-3\\.5 {
|
|
272
292
|
height: calc(var(--spacing) * 3.5);
|
|
273
293
|
}
|
|
274
294
|
.h-4 {
|
|
275
295
|
height: calc(var(--spacing) * 4);
|
|
276
296
|
}
|
|
297
|
+
.h-6 {
|
|
298
|
+
height: calc(var(--spacing) * 6);
|
|
299
|
+
}
|
|
277
300
|
.h-8 {
|
|
278
301
|
height: calc(var(--spacing) * 8);
|
|
279
302
|
}
|
|
@@ -295,6 +318,9 @@ window.__ModuleLoader__.load({
|
|
|
295
318
|
.h-px {
|
|
296
319
|
height: 1px;
|
|
297
320
|
}
|
|
321
|
+
.max-h-48 {
|
|
322
|
+
max-height: calc(var(--spacing) * 48);
|
|
323
|
+
}
|
|
298
324
|
.max-h-96 {
|
|
299
325
|
max-height: calc(var(--spacing) * 96);
|
|
300
326
|
}
|
|
@@ -316,6 +342,9 @@ window.__ModuleLoader__.load({
|
|
|
316
342
|
.w-2 {
|
|
317
343
|
width: calc(var(--spacing) * 2);
|
|
318
344
|
}
|
|
345
|
+
.w-3 {
|
|
346
|
+
width: calc(var(--spacing) * 3);
|
|
347
|
+
}
|
|
319
348
|
.w-3\\.5 {
|
|
320
349
|
width: calc(var(--spacing) * 3.5);
|
|
321
350
|
}
|
|
@@ -340,6 +369,9 @@ window.__ModuleLoader__.load({
|
|
|
340
369
|
.max-w-lg {
|
|
341
370
|
max-width: var(--container-lg);
|
|
342
371
|
}
|
|
372
|
+
.min-w-0 {
|
|
373
|
+
min-width: 0px;
|
|
374
|
+
}
|
|
343
375
|
.min-w-\\[8rem\\] {
|
|
344
376
|
min-width: 8rem;
|
|
345
377
|
}
|
|
@@ -381,6 +413,9 @@ window.__ModuleLoader__.load({
|
|
|
381
413
|
.touch-none {
|
|
382
414
|
touch-action: none;
|
|
383
415
|
}
|
|
416
|
+
.resize {
|
|
417
|
+
resize: both;
|
|
418
|
+
}
|
|
384
419
|
.flex-col {
|
|
385
420
|
flex-direction: column;
|
|
386
421
|
}
|
|
@@ -390,6 +425,9 @@ window.__ModuleLoader__.load({
|
|
|
390
425
|
.items-center {
|
|
391
426
|
align-items: center;
|
|
392
427
|
}
|
|
428
|
+
.items-start {
|
|
429
|
+
align-items: flex-start;
|
|
430
|
+
}
|
|
393
431
|
.justify-between {
|
|
394
432
|
justify-content: space-between;
|
|
395
433
|
}
|
|
@@ -416,6 +454,11 @@ window.__ModuleLoader__.load({
|
|
|
416
454
|
margin-block-start: calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));
|
|
417
455
|
margin-block-end: calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)));
|
|
418
456
|
}
|
|
457
|
+
:where(.space-y-3\\.5 > :not(:last-child)) {
|
|
458
|
+
--tw-space-y-reverse: 0;
|
|
459
|
+
margin-block-start: calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));
|
|
460
|
+
margin-block-end: calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)));
|
|
461
|
+
}
|
|
419
462
|
.self-start {
|
|
420
463
|
align-self: flex-start;
|
|
421
464
|
}
|
|
@@ -433,6 +476,9 @@ window.__ModuleLoader__.load({
|
|
|
433
476
|
.overflow-y-auto {
|
|
434
477
|
overflow-y: auto;
|
|
435
478
|
}
|
|
479
|
+
.overflow-y-hidden {
|
|
480
|
+
overflow-y: hidden;
|
|
481
|
+
}
|
|
436
482
|
.rounded-2xl {
|
|
437
483
|
border-radius: var(--radius-2xl);
|
|
438
484
|
}
|
|
@@ -455,9 +501,19 @@ window.__ModuleLoader__.load({
|
|
|
455
501
|
border-style: var(--tw-border-style);
|
|
456
502
|
border-width: 1px;
|
|
457
503
|
}
|
|
504
|
+
.border-l {
|
|
505
|
+
border-left-style: var(--tw-border-style);
|
|
506
|
+
border-left-width: 1px;
|
|
507
|
+
}
|
|
458
508
|
.border-\\[var\\(--dsw-alias-border-l2\\)\\] {
|
|
459
509
|
border-color: var(--dsw-alias-border-l2);
|
|
460
510
|
}
|
|
511
|
+
.border-amber-500\\/40 {
|
|
512
|
+
border-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 40%, transparent);
|
|
513
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
514
|
+
border-color: color-mix(in oklab, var(--color-amber-500) 40%, transparent);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
461
517
|
.border-input {
|
|
462
518
|
border-color: var(--dsw-alias-border-l1);
|
|
463
519
|
}
|
|
@@ -467,6 +523,12 @@ window.__ModuleLoader__.load({
|
|
|
467
523
|
.border-transparent {
|
|
468
524
|
border-color: transparent;
|
|
469
525
|
}
|
|
526
|
+
.bg-amber-500\\/10 {
|
|
527
|
+
background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 10%, transparent);
|
|
528
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
529
|
+
background-color: color-mix(in oklab, var(--color-amber-500) 10%, transparent);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
470
532
|
.bg-background {
|
|
471
533
|
background-color: var(--dsw-alias-bg-base);
|
|
472
534
|
}
|
|
@@ -485,6 +547,9 @@ window.__ModuleLoader__.load({
|
|
|
485
547
|
.bg-destructive {
|
|
486
548
|
background-color: var(--dsw-alias-state-error-primary);
|
|
487
549
|
}
|
|
550
|
+
.bg-emerald-500 {
|
|
551
|
+
background-color: var(--color-emerald-500);
|
|
552
|
+
}
|
|
488
553
|
.bg-muted {
|
|
489
554
|
background-color: var(--dsw-alias-bg-layer-1);
|
|
490
555
|
}
|
|
@@ -503,6 +568,9 @@ window.__ModuleLoader__.load({
|
|
|
503
568
|
background-color: color-mix(in oklab, var(--dsw-alias-bg-layer-2) 70%, transparent);
|
|
504
569
|
}
|
|
505
570
|
}
|
|
571
|
+
.bg-sky-500 {
|
|
572
|
+
background-color: var(--color-sky-500);
|
|
573
|
+
}
|
|
506
574
|
.bg-transparent {
|
|
507
575
|
background-color: transparent;
|
|
508
576
|
}
|
|
@@ -518,6 +586,9 @@ window.__ModuleLoader__.load({
|
|
|
518
586
|
.p-2\\.5 {
|
|
519
587
|
padding: calc(var(--spacing) * 2.5);
|
|
520
588
|
}
|
|
589
|
+
.p-3 {
|
|
590
|
+
padding: calc(var(--spacing) * 3);
|
|
591
|
+
}
|
|
521
592
|
.p-3\\.5 {
|
|
522
593
|
padding: calc(var(--spacing) * 3.5);
|
|
523
594
|
}
|
|
@@ -572,6 +643,9 @@ window.__ModuleLoader__.load({
|
|
|
572
643
|
.pt-1 {
|
|
573
644
|
padding-top: var(--spacing);
|
|
574
645
|
}
|
|
646
|
+
.pr-1 {
|
|
647
|
+
padding-right: var(--spacing);
|
|
648
|
+
}
|
|
575
649
|
.pr-8 {
|
|
576
650
|
padding-right: calc(var(--spacing) * 8);
|
|
577
651
|
}
|
|
@@ -584,6 +658,9 @@ window.__ModuleLoader__.load({
|
|
|
584
658
|
.pl-2 {
|
|
585
659
|
padding-left: calc(var(--spacing) * 2);
|
|
586
660
|
}
|
|
661
|
+
.pl-4 {
|
|
662
|
+
padding-left: calc(var(--spacing) * 4);
|
|
663
|
+
}
|
|
587
664
|
.pl-8 {
|
|
588
665
|
padding-left: calc(var(--spacing) * 8);
|
|
589
666
|
}
|
|
@@ -611,6 +688,9 @@ window.__ModuleLoader__.load({
|
|
|
611
688
|
.text-\\[13\\.5px\\] {
|
|
612
689
|
font-size: 13.5px;
|
|
613
690
|
}
|
|
691
|
+
.text-\\[13px\\] {
|
|
692
|
+
font-size: 13px;
|
|
693
|
+
}
|
|
614
694
|
.leading-4 {
|
|
615
695
|
--tw-leading: calc(var(--spacing) * 4);
|
|
616
696
|
line-height: calc(var(--spacing) * 4);
|
|
@@ -648,6 +728,12 @@ window.__ModuleLoader__.load({
|
|
|
648
728
|
.whitespace-pre-wrap {
|
|
649
729
|
white-space: pre-wrap;
|
|
650
730
|
}
|
|
731
|
+
.text-amber-500 {
|
|
732
|
+
color: var(--color-amber-500);
|
|
733
|
+
}
|
|
734
|
+
.text-amber-600 {
|
|
735
|
+
color: var(--color-amber-600);
|
|
736
|
+
}
|
|
651
737
|
.text-card-foreground {
|
|
652
738
|
color: var(--dsw-alias-label-primary);
|
|
653
739
|
}
|
|
@@ -657,6 +743,9 @@ window.__ModuleLoader__.load({
|
|
|
657
743
|
.text-destructive-foreground {
|
|
658
744
|
color: var(--dsw-alias-label-primary-foreground, #ffffff);
|
|
659
745
|
}
|
|
746
|
+
.text-emerald-500 {
|
|
747
|
+
color: var(--color-emerald-500);
|
|
748
|
+
}
|
|
660
749
|
.text-foreground {
|
|
661
750
|
color: var(--dsw-alias-label-primary);
|
|
662
751
|
}
|
|
@@ -687,6 +776,13 @@ window.__ModuleLoader__.load({
|
|
|
687
776
|
.text-secondary-foreground {
|
|
688
777
|
color: var(--dsw-alias-label-primary);
|
|
689
778
|
}
|
|
779
|
+
.text-sky-500 {
|
|
780
|
+
color: var(--color-sky-500);
|
|
781
|
+
}
|
|
782
|
+
.tabular-nums {
|
|
783
|
+
--tw-numeric-spacing: tabular-nums;
|
|
784
|
+
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
785
|
+
}
|
|
690
786
|
.underline-offset-4 {
|
|
691
787
|
text-underline-offset: 4px;
|
|
692
788
|
}
|
|
@@ -863,6 +959,9 @@ window.__ModuleLoader__.load({
|
|
|
863
959
|
.hover\\:text-accent-foreground:hover {
|
|
864
960
|
color: var(--dsw-alias-label-primary);
|
|
865
961
|
}
|
|
962
|
+
.hover\\:text-amber-500:hover {
|
|
963
|
+
color: var(--color-amber-500);
|
|
964
|
+
}
|
|
866
965
|
.hover\\:text-foreground:hover {
|
|
867
966
|
color: var(--dsw-alias-label-primary);
|
|
868
967
|
}
|
|
@@ -1010,6 +1109,9 @@ window.__ModuleLoader__.load({
|
|
|
1010
1109
|
.sm\\:max-w-md {
|
|
1011
1110
|
max-width: var(--container-md);
|
|
1012
1111
|
}
|
|
1112
|
+
.sm\\:max-w-xl {
|
|
1113
|
+
max-width: var(--container-xl);
|
|
1114
|
+
}
|
|
1013
1115
|
.sm\\:flex-row {
|
|
1014
1116
|
flex-direction: row;
|
|
1015
1117
|
}
|
|
@@ -1148,6 +1250,26 @@ window.__ModuleLoader__.load({
|
|
|
1148
1250
|
syntax: "*";
|
|
1149
1251
|
inherits: false;
|
|
1150
1252
|
}
|
|
1253
|
+
@property --tw-ordinal {
|
|
1254
|
+
syntax: "*";
|
|
1255
|
+
inherits: false;
|
|
1256
|
+
}
|
|
1257
|
+
@property --tw-slashed-zero {
|
|
1258
|
+
syntax: "*";
|
|
1259
|
+
inherits: false;
|
|
1260
|
+
}
|
|
1261
|
+
@property --tw-numeric-figure {
|
|
1262
|
+
syntax: "*";
|
|
1263
|
+
inherits: false;
|
|
1264
|
+
}
|
|
1265
|
+
@property --tw-numeric-spacing {
|
|
1266
|
+
syntax: "*";
|
|
1267
|
+
inherits: false;
|
|
1268
|
+
}
|
|
1269
|
+
@property --tw-numeric-fraction {
|
|
1270
|
+
syntax: "*";
|
|
1271
|
+
inherits: false;
|
|
1272
|
+
}
|
|
1151
1273
|
@property --tw-shadow {
|
|
1152
1274
|
syntax: "*";
|
|
1153
1275
|
inherits: false;
|
|
@@ -1301,6 +1423,11 @@ window.__ModuleLoader__.load({
|
|
|
1301
1423
|
--tw-leading: initial;
|
|
1302
1424
|
--tw-font-weight: initial;
|
|
1303
1425
|
--tw-tracking: initial;
|
|
1426
|
+
--tw-ordinal: initial;
|
|
1427
|
+
--tw-slashed-zero: initial;
|
|
1428
|
+
--tw-numeric-figure: initial;
|
|
1429
|
+
--tw-numeric-spacing: initial;
|
|
1430
|
+
--tw-numeric-fraction: initial;
|
|
1304
1431
|
--tw-shadow: 0 0 #0000;
|
|
1305
1432
|
--tw-shadow-color: initial;
|
|
1306
1433
|
--tw-shadow-alpha: 100%;
|
|
@@ -1334,16 +1461,16 @@ window.__ModuleLoader__.load({
|
|
|
1334
1461
|
}
|
|
1335
1462
|
}
|
|
1336
1463
|
}
|
|
1337
|
-
`;var
|
|
1464
|
+
`;var ri=require("react");var xe=require("react");var I=q(require("react")),va=require("react-dom");var be=require("react");function xi(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,be.useMemo)(()=>o=>{t.forEach(r=>r(o))},t)}var No=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fa(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Or(e){return"nodeType"in e}function ze(e){var t,a;return e?fa(e)?e:Or(e)&&(t=(a=e.ownerDocument)==null?void 0:a.defaultView)!=null?t:window:window}function Fr(e){let{Document:t}=ze(e);return e instanceof t}function eo(e){return fa(e)?!1:e instanceof ze(e).HTMLElement}function ts(e){return e instanceof ze(e).SVGElement}function pa(e){return e?fa(e)?e.document:Or(e)?Fr(e)?e:eo(e)||ts(e)?e.ownerDocument:document:document:document}var at=No?be.useLayoutEffect:be.useEffect;function _o(e){let t=(0,be.useRef)(e);return at(()=>{t.current=e}),(0,be.useCallback)(function(){for(var a=arguments.length,o=new Array(a),r=0;r<a;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}function vi(){let e=(0,be.useRef)(null),t=(0,be.useCallback)((o,r)=>{e.current=setInterval(o,r)},[]),a=(0,be.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,a]}function to(e,t){t===void 0&&(t=[e]);let a=(0,be.useRef)(e);return at(()=>{a.current!==e&&(a.current=e)},t),a}function ao(e,t){let a=(0,be.useRef)();return(0,be.useMemo)(()=>{let o=e(a.current);return a.current=o,o},[...t])}function Uo(e){let t=_o(e),a=(0,be.useRef)(null),o=(0,be.useCallback)(r=>{r!==a.current&&t?.(r,a.current),a.current=r},[]);return[a,o]}function Ho(e){let t=(0,be.useRef)();return(0,be.useEffect)(()=>{t.current=e},[e]),t.current}var es={};function ma(e,t){return(0,be.useMemo)(()=>{if(t)return t;let a=es[e]==null?0:es[e]+1;return es[e]=a,e+"-"+a},[e,t])}function wi(e){return function(t){for(var a=arguments.length,o=new Array(a>1?a-1:0),r=1;r<a;r++)o[r-1]=arguments[r];return o.reduce((n,s)=>{let l=Object.entries(s);for(let[i,u]of l){let c=n[i];c!=null&&(n[i]=c+e*u)}return n},{...t})}}var ga=wi(1),ha=wi(-1);function Gp(e){return"clientX"in e&&"clientY"in e}function oo(e){if(!e)return!1;let{KeyboardEvent:t}=ze(e.target);return t&&e instanceof t}function Wp(e){if(!e)return!1;let{TouchEvent:t}=ze(e.target);return t&&e instanceof t}function qo(e){if(Wp(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:a}=e.touches[0];return{x:t,y:a}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:a}=e.changedTouches[0];return{x:t,y:a}}}return Gp(e)?{x:e.clientX,y:e.clientY}:null}var tt=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:a}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(a?Math.round(a):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:a}=e;return"scaleX("+t+") scaleY("+a+")"}},Transform:{toString(e){if(e)return[tt.Translate.toString(e),tt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:a,easing:o}=e;return t+" "+a+"ms "+o}}}),hi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ci(e){return e.matches(hi)?e:e.querySelector(hi)}var xa=q(require("react")),jp={display:"none"};function bi(e){let{id:t,value:a}=e;return xa.default.createElement("div",{id:t,style:jp},a)}function Li(e){let{id:t,announcement:a,ariaLiveType:o="assertive"}=e,r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return xa.default.createElement("div",{id:t,style:r,role:"status","aria-live":o,"aria-atomic":!0},a)}function Ii(){let[e,t]=(0,xa.useState)("");return{announce:(0,xa.useCallback)(o=>{o!=null&&t(o)},[]),announcement:e}}var Bi=(0,I.createContext)(null);function Kp(e){let t=(0,I.useContext)(Bi);(0,I.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Xp(){let[e]=(0,I.useState)(()=>new Set),t=(0,I.useCallback)(o=>(e.add(o),()=>e.delete(o)),[e]);return[(0,I.useCallback)(o=>{let{type:r,event:n}=o;e.forEach(s=>{var l;return(l=s[r])==null?void 0:l.call(s,n)})},[e]),t]}var $p={draggable:`
|
|
1338
1465
|
To pick up a draggable item, press the space bar.
|
|
1339
1466
|
While dragging, use the arrow keys to move the item.
|
|
1340
1467
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
1341
|
-
`},Ap={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:a}=e;return a?"Draggable item "+t.id+" was moved over droppable area "+a.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:a}=e;return a?"Draggable item "+t.id+" was dropped over droppable area "+a.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Tp(e){let{announcements:t=Ap,container:a,hiddenTextDescribedById:o,screenReaderInstructions:r=kp}=e,{announce:n,announcement:s}=fi(),l=da("DndLiveRegion"),[i,u]=(0,b.useState)(!1);if((0,b.useEffect)(()=>{u(!0)},[]),Dp((0,b.useMemo)(()=>({onDragStart(d){let{active:f}=d;n(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&n(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;n(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;n(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;n(t.onDragCancel({active:f,over:h}))}}),[n,t])),!i)return null;let c=b.default.createElement(b.default.Fragment,null,b.default.createElement(di,{id:o,value:r.draggable}),b.default.createElement(ci,{id:l,announcement:s}));return a?(0,ma.createPortal)(c,a):c}var Se;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Se||(Se={}));function Mr(){}function to(e,t){return(0,b.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Ar(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,b.useMemo)(()=>[...t].filter(o=>o!=null),[...t])}var pt=Object.freeze({x:0,y:0});function ts(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ep(e,t){let a=_o(e);if(!a)return"0 0";let o={x:(a.x-t.left)/t.width*100,y:(a.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function as(e,t){let{data:{value:a}}=e,{data:{value:o}}=t;return a-o}function Op(e,t){let{data:{value:a}}=e,{data:{value:o}}=t;return o-a}function $n(e){let{left:t,top:a,height:o,width:r}=e;return[{x:t,y:a},{x:t+r,y:a},{x:t,y:a+o},{x:t+r,y:a+o}]}function Vo(e,t){if(!e||e.length===0)return null;let[a]=e;return t?a[t]:a}function pi(e,t,a){return t===void 0&&(t=e.left),a===void 0&&(a=e.top),{x:t+e.width*.5,y:a+e.height*.5}}var Ri=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:o}=e,r=pi(t,t.left,t.top),n=[];for(let s of o){let{id:l}=s,i=a.get(l);if(i){let u=ts(pi(i),r);n.push({id:l,data:{droppableContainer:s,value:u}})}}return n.sort(as)},Tr=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:o}=e,r=$n(t),n=[];for(let s of o){let{id:l}=s,i=a.get(l);if(i){let u=$n(i),c=r.reduce((f,h,g)=>f+ts(u[g],h),0),d=Number((c/4).toFixed(4));n.push({id:l,data:{droppableContainer:s,value:d}})}}return n.sort(as)};function Fp(e,t){let a=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),n=Math.min(t.top+t.height,e.top+e.height),s=r-o,l=n-a;if(o<r&&a<n){let i=t.width*t.height,u=e.width*e.height,c=s*l,d=c/(i+u-c);return Number(d.toFixed(4))}return 0}var os=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:o}=e,r=[];for(let n of o){let{id:s}=n,l=a.get(s);if(l){let i=Fp(l,t);i>0&&r.push({id:s,data:{droppableContainer:n,value:i}})}}return r.sort(Op)};function Bp(e,t){let{top:a,left:o,bottom:r,right:n}=t;return a<=e.y&&e.y<=r&&o<=e.x&&e.x<=n}var Pi=e=>{let{droppableContainers:t,droppableRects:a,pointerCoordinates:o}=e;if(!o)return[];let r=[];for(let n of t){let{id:s}=n,l=a.get(s);if(l&&Bp(o,l)){let u=$n(l).reduce((d,f)=>d+ts(o,f),0),c=Number((u/4).toFixed(4));r.push({id:s,data:{droppableContainer:n,value:c}})}}return r.sort(as)};function Np(e,t,a){return{...e,scaleX:t&&a?t.width/a.width:1,scaleY:t&&a?t.height/a.height:1}}function Di(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pt}function _p(e){return function(a){for(var o=arguments.length,r=new Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return r.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...a})}}var Up=_p(1);function Mi(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Hp(e,t,a){let o=Mi(t);if(!o)return e;let{scaleX:r,scaleY:n,x:s,y:l}=o,i=e.left-s-(1-r)*parseFloat(a),u=e.top-l-(1-n)*parseFloat(a.slice(a.indexOf(" ")+1)),c=r?e.width/r:e.width,d=n?e.height/n:e.height;return{width:c,height:d,top:u,right:i+c,bottom:u+d,left:i}}var qp={ignoreTransform:!1};function xa(e,t){t===void 0&&(t=qp);let a=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:u,transformOrigin:c}=qe(e).getComputedStyle(e);u&&(a=Hp(a,u,c))}let{top:o,left:r,width:n,height:s,bottom:l,right:i}=a;return{top:o,left:r,width:n,height:s,bottom:l,right:i}}function mi(e){return xa(e,{ignoreTransform:!0})}function zp(e){let t=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:t,bottom:a,width:t,height:a}}function Vp(e,t){return t===void 0&&(t=qe(e).getComputedStyle(e)),t.position==="fixed"}function Gp(e,t){t===void 0&&(t=qe(e).getComputedStyle(e));let a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{let n=t[r];return typeof n=="string"?a.test(n):!1})}function Go(e,t){let a=[];function o(r){if(t!=null&&a.length>=t||!r)return a;if(Pr(r)&&r.scrollingElement!=null&&!a.includes(r.scrollingElement))return a.push(r.scrollingElement),a;if(!Za(r)||Wn(r)||a.includes(r))return a;let n=qe(e).getComputedStyle(r);return r!==e&&Gp(r,n)&&a.push(r),Vp(r,n)?a:o(r.parentNode)}return e?o(e):a}function ki(e){let[t]=Go(e,1);return t??null}function jn(e){return!Oo||!e?null:ia(e)?e:Rr(e)?Pr(e)||e===ua(e).scrollingElement?window:Za(e)?e:null:null}function Ai(e){return ia(e)?e.scrollX:e.scrollLeft}function Ti(e){return ia(e)?e.scrollY:e.scrollTop}function Yn(e){return{x:Ai(e),y:Ti(e)}}var Me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Me||(Me={}));function Ei(e){return!Oo||!e?!1:e===document.scrollingElement}function Oi(e){let t={x:0,y:0},a=Ei(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},r=e.scrollTop<=t.y,n=e.scrollLeft<=t.x,s=e.scrollTop>=o.y,l=e.scrollLeft>=o.x;return{isTop:r,isLeft:n,isBottom:s,isRight:l,maxScroll:o,minScroll:t}}var Wp={x:.2,y:.2};function jp(e,t,a,o,r){let{top:n,left:s,right:l,bottom:i}=a;o===void 0&&(o=10),r===void 0&&(r=Wp);let{isTop:u,isBottom:c,isLeft:d,isRight:f}=Oi(e),h={x:0,y:0},g={x:0,y:0},p={height:t.height*r.y,width:t.width*r.x};return!u&&n<=t.top+p.height?(h.y=Me.Backward,g.y=o*Math.abs((t.top+p.height-n)/p.height)):!c&&i>=t.bottom-p.height&&(h.y=Me.Forward,g.y=o*Math.abs((t.bottom-p.height-i)/p.height)),!f&&l>=t.right-p.width?(h.x=Me.Forward,g.x=o*Math.abs((t.right-p.width-l)/p.width)):!d&&s<=t.left+p.width&&(h.x=Me.Backward,g.x=o*Math.abs((t.left+p.width-s)/p.width)),{direction:h,speed:g}}function Kp(e){if(e===document.scrollingElement){let{innerWidth:n,innerHeight:s}=window;return{top:0,left:0,right:n,bottom:s,width:n,height:s}}let{top:t,left:a,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:a,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Fi(e){return e.reduce((t,a)=>ca(t,Yn(a)),pt)}function Xp(e){return e.reduce((t,a)=>t+Ai(a),0)}function $p(e){return e.reduce((t,a)=>t+Ti(a),0)}function Bi(e,t){if(t===void 0&&(t=xa),!e)return;let{top:a,left:o,bottom:r,right:n}=t(e);ki(e)&&(r<=0||n<=0||a>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var Yp=[["x",["left","right"],Xp],["y",["top","bottom"],$p]],Ho=class{constructor(t,a){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let o=Go(a),r=Fi(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[n,s,l]of Yp)for(let i of s)Object.defineProperty(this,i,{get:()=>{let u=l(o),c=r[n]-u;return this.rect[i]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},ga=class{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...a)})},this.target=t}add(t,a,o){var r;(r=this.target)==null||r.addEventListener(t,a,o),this.listeners.push([t,a,o])}};function Zp(e){let{EventTarget:t}=qe(e);return e instanceof t?e:ua(e)}function Kn(e,t){let a=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(a**2+o**2)>t:"x"in t&&"y"in t?a>t.x&&o>t.y:"x"in t?a>t.x:"y"in t?o>t.y:!1}var lt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(lt||(lt={}));function gi(e){e.preventDefault()}function Jp(e){e.stopPropagation()}var ee;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ee||(ee={}));var Ni={start:[ee.Space,ee.Enter],cancel:[ee.Esc],end:[ee.Space,ee.Enter,ee.Tab]},Qp=(e,t)=>{let{currentCoordinates:a}=t;switch(e.code){case ee.Right:return{...a,x:a.x+25};case ee.Left:return{...a,x:a.x-25};case ee.Down:return{...a,y:a.y+25};case ee.Up:return{...a,y:a.y-25}}},Yt=class{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:a}}=t;this.props=t,this.listeners=new ga(ua(a)),this.windowListeners=new ga(qe(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(lt.Resize,this.handleCancel),this.windowListeners.add(lt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(lt.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:a}=this.props,o=t.node.current;o&&Bi(o),a(pt)}handleKeyDown(t){if(eo(t)){let{active:a,context:o,options:r}=this.props,{keyboardCodes:n=Ni,coordinateGetter:s=Qp,scrollBehavior:l="smooth"}=r,{code:i}=t;if(n.end.includes(i)){this.handleEnd(t);return}if(n.cancel.includes(i)){this.handleCancel(t);return}let{collisionRect:u}=o.current,c=u?{x:u.left,y:u.top}:pt;this.referenceCoordinates||(this.referenceCoordinates=c);let d=s(t,{active:a,context:o.current,currentCoordinates:c});if(d){let f=fa(d,c),h={x:0,y:0},{scrollableAncestors:g}=o.current;for(let p of g){let m=t.code,{isTop:x,isRight:w,isLeft:v,isBottom:C,maxScroll:I,minScroll:L}=Oi(p),y=Kp(p),R={x:Math.min(m===ee.Right?y.right-y.width/2:y.right,Math.max(m===ee.Right?y.left:y.left+y.width/2,d.x)),y:Math.min(m===ee.Down?y.bottom-y.height/2:y.bottom,Math.max(m===ee.Down?y.top:y.top+y.height/2,d.y))},P=m===ee.Right&&!w||m===ee.Left&&!v,k=m===ee.Down&&!C||m===ee.Up&&!x;if(P&&R.x!==d.x){let O=p.scrollLeft+f.x,D=m===ee.Right&&O<=I.x||m===ee.Left&&O>=L.x;if(D&&!f.y){p.scrollTo({left:O,behavior:l});return}D?h.x=p.scrollLeft-O:h.x=m===ee.Right?p.scrollLeft-I.x:p.scrollLeft-L.x,h.x&&p.scrollBy({left:-h.x,behavior:l});break}else if(k&&R.y!==d.y){let O=p.scrollTop+f.y,D=m===ee.Down&&O<=I.y||m===ee.Up&&O>=L.y;if(D&&!f.x){p.scrollTo({top:O,behavior:l});return}D?h.y=p.scrollTop-O:h.y=m===ee.Down?p.scrollTop-I.y:p.scrollTop-L.y,h.y&&p.scrollBy({top:-h.y,behavior:l});break}}this.handleMove(t,ca(fa(d,this.referenceCoordinates),h))}}}handleMove(t,a){let{onMove:o}=this.props;t.preventDefault(),o(a)}handleEnd(t){let{onEnd:a}=this.props;t.preventDefault(),this.detach(),a()}handleCancel(t){let{onCancel:a}=this.props;t.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Yt.activators=[{eventName:"onKeyDown",handler:(e,t,a)=>{let{keyboardCodes:o=Ni,onActivation:r}=t,{active:n}=a,{code:s}=e.nativeEvent;if(o.start.includes(s)){let l=n.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r?.({event:e.nativeEvent}),!0)}return!1}}];function hi(e){return!!(e&&"distance"in e)}function xi(e){return!!(e&&"delay"in e)}var qo=class{constructor(t,a,o){var r;o===void 0&&(o=Zp(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=a;let{event:n}=t,{target:s}=n;this.props=t,this.events=a,this.document=ua(s),this.documentListeners=new ga(this.document),this.listeners=new ga(o),this.windowListeners=new ga(qe(s)),this.initialCoordinates=(r=_o(n))!=null?r:pt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:a,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(lt.Resize,this.handleCancel),this.windowListeners.add(lt.DragStart,gi),this.windowListeners.add(lt.VisibilityChange,this.handleCancel),this.windowListeners.add(lt.ContextMenu,gi),this.documentListeners.add(lt.Keydown,this.handleKeydown),a){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xi(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(hi(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,a){let{active:o,onPending:r}=this.props;r(o,t,this.initialCoordinates,a)}handleStart(){let{initialCoordinates:t}=this,{onStart:a}=this.props;t&&(this.activated=!0,this.documentListeners.add(lt.Click,Jp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(lt.SelectionChange,this.removeTextSelection),a(t))}handleMove(t){var a;let{activated:o,initialCoordinates:r,props:n}=this,{onMove:s,options:{activationConstraint:l}}=n;if(!r)return;let i=(a=_o(t))!=null?a:pt,u=fa(r,i);if(!o&&l){if(hi(l)){if(l.tolerance!=null&&Kn(u,l.tolerance))return this.handleCancel();if(Kn(u,l.distance))return this.handleStart()}if(xi(l)&&Kn(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),s(i)}handleEnd(){let{onAbort:t,onEnd:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleCancel(){let{onAbort:t,onCancel:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleKeydown(t){t.code===ee.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}},em={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Zt=class extends qo{constructor(t){let{event:a}=t,o=ua(a.target);super(t,em,o)}};Zt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:o}=t;return!a.isPrimary||a.button!==0?!1:(o?.({event:a}),!0)}}];var tm={move:{name:"mousemove"},end:{name:"mouseup"}},Zn;(function(e){e[e.RightClick=2]="RightClick"})(Zn||(Zn={}));var Jn=class extends qo{constructor(t){super(t,tm,ua(t.event.target))}};Jn.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:o}=t;return a.button===Zn.RightClick?!1:(o?.({event:a}),!0)}}];var Xn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},Qn=class extends qo{constructor(t){super(t,Xn)}static setup(){return window.addEventListener(Xn.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Xn.move.name,t)};function t(){}}};Qn.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:o}=t,{touches:r}=a;return r.length>1?!1:(o?.({event:a}),!0)}}];var Uo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Uo||(Uo={}));var kr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(kr||(kr={}));function am(e){let{acceleration:t,activator:a=Uo.Pointer,canScroll:o,draggingRect:r,enabled:n,interval:s=5,order:l=kr.TreeOrder,pointerCoordinates:i,scrollableAncestors:u,scrollableAncestorRects:c,delta:d,threshold:f}=e,h=rm({delta:d,disabled:!n}),[g,p]=li(),m=(0,b.useRef)({x:0,y:0}),x=(0,b.useRef)({x:0,y:0}),w=(0,b.useMemo)(()=>{switch(a){case Uo.Pointer:return i?{top:i.y,bottom:i.y,left:i.x,right:i.x}:null;case Uo.DraggableRect:return r}},[a,r,i]),v=(0,b.useRef)(null),C=(0,b.useCallback)(()=>{let L=v.current;if(!L)return;let y=m.current.x*x.current.x,R=m.current.y*x.current.y;L.scrollBy(y,R)},[]),I=(0,b.useMemo)(()=>l===kr.TreeOrder?[...u].reverse():u,[l,u]);(0,b.useEffect)(()=>{if(!n||!u.length||!w){p();return}for(let L of I){if(o?.(L)===!1)continue;let y=u.indexOf(L),R=c[y];if(!R)continue;let{direction:P,speed:k}=jp(L,R,w,t,f);for(let O of["x","y"])h[O][P[O]]||(k[O]=0,P[O]=0);if(k.x>0||k.y>0){p(),v.current=L,g(C,s),m.current=k,x.current=P;return}}m.current={x:0,y:0},x.current={x:0,y:0},p()},[t,C,o,p,n,s,JSON.stringify(w),JSON.stringify(h),g,u,I,c,JSON.stringify(f)])}var om={x:{[Me.Backward]:!1,[Me.Forward]:!1},y:{[Me.Backward]:!1,[Me.Forward]:!1}};function rm(e){let{delta:t,disabled:a}=e,o=No(t);return Qa(r=>{if(a||!o||!r)return om;let n={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Me.Backward]:r.x[Me.Backward]||n.x===-1,[Me.Forward]:r.x[Me.Forward]||n.x===1},y:{[Me.Backward]:r.y[Me.Backward]||n.y===-1,[Me.Forward]:r.y[Me.Forward]||n.y===1}}},[a,t,o])}function nm(e,t){let a=t!=null?e.get(t):void 0,o=a?a.node.current:null;return Qa(r=>{var n;return t==null?null:(n=o??r)!=null?n:null},[o,t])}function sm(e,t){return(0,b.useMemo)(()=>e.reduce((a,o)=>{let{sensor:r}=o,n=r.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,o)}));return[...a,...n]},[]),[e,t])}var zo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(zo||(zo={}));var es;(function(e){e.Optimized="optimized"})(es||(es={}));var vi=new Map;function lm(e,t){let{dragging:a,dependencies:o,config:r}=t,[n,s]=(0,b.useState)(null),{frequency:l,measure:i,strategy:u}=r,c=(0,b.useRef)(e),d=m(),f=Ja(d),h=(0,b.useCallback)(function(x){x===void 0&&(x=[]),!f.current&&s(w=>w===null?x:w.concat(x.filter(v=>!w.includes(v))))},[f]),g=(0,b.useRef)(null),p=Qa(x=>{if(d&&!a)return vi;if(!x||x===vi||c.current!==e||n!=null){let w=new Map;for(let v of e){if(!v)continue;if(n&&n.length>0&&!n.includes(v.id)&&v.rect.current){w.set(v.id,v.rect.current);continue}let C=v.node.current,I=C?new Ho(i(C),C):null;v.rect.current=I,I&&w.set(v.id,I)}return w}return x},[e,n,a,d,i]);return(0,b.useEffect)(()=>{c.current=e},[e]),(0,b.useEffect)(()=>{d||h()},[a,d]),(0,b.useEffect)(()=>{n&&n.length>0&&s(null)},[JSON.stringify(n)]),(0,b.useEffect)(()=>{d||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{h(),g.current=null},l))},[l,d,h,...o]),{droppableRects:p,measureDroppableContainers:h,measuringScheduled:n!=null};function m(){switch(u){case zo.Always:return!1;case zo.BeforeDragging:return a;default:return!a}}}function rs(e,t){return Qa(a=>e?a||(typeof t=="function"?t(e):e):null,[t,e])}function im(e,t){return rs(e,t)}function um(e){let{callback:t,disabled:a}=e,o=Fo(t),r=(0,b.useMemo)(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:n}=window;return new n(o)},[o,a]);return(0,b.useEffect)(()=>()=>r?.disconnect(),[r]),r}function Er(e){let{callback:t,disabled:a}=e,o=Fo(t),r=(0,b.useMemo)(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:n}=window;return new n(o)},[a]);return(0,b.useEffect)(()=>()=>r?.disconnect(),[r]),r}function dm(e){return new Ho(xa(e),e)}function wi(e,t,a){t===void 0&&(t=dm);let[o,r]=(0,b.useState)(null);function n(){r(i=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=i??a)!=null?u:null}let c=t(e);return JSON.stringify(i)===JSON.stringify(c)?i:c})}let s=um({callback(i){if(e)for(let u of i){let{type:c,target:d}=u;if(c==="childList"&&d instanceof HTMLElement&&d.contains(e)){n();break}}}}),l=Er({callback:n});return et(()=>{n(),e?(l?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),s?.disconnect())},[e]),o}function cm(e){let t=rs(e);return Di(e,t)}var Ci=[];function fm(e){let t=(0,b.useRef)(e),a=Qa(o=>e?o&&o!==Ci&&e&&t.current&&e.parentNode===t.current.parentNode?o:Go(e):Ci,[e]);return(0,b.useEffect)(()=>{t.current=e},[e]),a}function pm(e){let[t,a]=(0,b.useState)(null),o=(0,b.useRef)(e),r=(0,b.useCallback)(n=>{let s=jn(n.target);s&&a(l=>l?(l.set(s,Yn(s)),new Map(l)):null)},[]);return(0,b.useEffect)(()=>{let n=o.current;if(e!==n){s(n);let l=e.map(i=>{let u=jn(i);return u?(u.addEventListener("scroll",r,{passive:!0}),[u,Yn(u)]):null}).filter(i=>i!=null);a(l.length?new Map(l):null),o.current=e}return()=>{s(e),s(n)};function s(l){l.forEach(i=>{let u=jn(i);u?.removeEventListener("scroll",r)})}},[r,e]),(0,b.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((n,s)=>ca(n,s),pt):Fi(e):pt,[e,t])}function Li(e,t){t===void 0&&(t=[]);let a=(0,b.useRef)(null);return(0,b.useEffect)(()=>{a.current=null},t),(0,b.useEffect)(()=>{let o=e!==pt;o&&!a.current&&(a.current=e),!o&&a.current&&(a.current=null)},[e]),a.current?fa(e,a.current):pt}function mm(e){(0,b.useEffect)(()=>{if(!Oo)return;let t=e.map(a=>{let{sensor:o}=a;return o.setup==null?void 0:o.setup()});return()=>{for(let a of t)a?.()}},e.map(t=>{let{sensor:a}=t;return a}))}function gm(e,t){return(0,b.useMemo)(()=>e.reduce((a,o)=>{let{eventName:r,handler:n}=o;return a[r]=s=>{n(s,t)},a},{}),[e,t])}function _i(e){return(0,b.useMemo)(()=>e?zp(e):null,[e])}var Ii=[];function hm(e,t){t===void 0&&(t=xa);let[a]=e,o=_i(a?qe(a):null),[r,n]=(0,b.useState)(Ii);function s(){n(()=>e.length?e.map(i=>Ei(i)?o:new Ho(t(i),i)):Ii)}let l=Er({callback:s});return et(()=>{l?.disconnect(),s(),e.forEach(i=>l?.observe(i))},[e]),r}function Ui(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Za(t)?t:e}function xm(e){let{measure:t}=e,[a,o]=(0,b.useState)(null),r=(0,b.useCallback)(u=>{for(let{target:c}of u)if(Za(c)){o(d=>{let f=t(c);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),n=Er({callback:r}),s=(0,b.useCallback)(u=>{let c=Ui(u);n?.disconnect(),c&&n?.observe(c),o(c?t(c):null)},[t,n]),[l,i]=Bo(s);return(0,b.useMemo)(()=>({nodeRef:l,rect:a,setRef:i}),[a,l,i])}var vm=[{sensor:Zt,options:{}},{sensor:Yt,options:{}}],wm={current:{}},Dr={draggable:{measure:mi},droppable:{measure:mi,strategy:zo.WhileDragging,frequency:es.Optimized},dragOverlay:{measure:xa}},ha=class extends Map{get(t){var a;return t!=null&&(a=super.get(t))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:a}=t;return!a})}getNodeFor(t){var a,o;return(a=(o=this.get(t))==null?void 0:o.node.current)!=null?a:void 0}},Cm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ha,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Mr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Dr,measureDroppableContainers:Mr,windowRect:null,measuringScheduled:!1},Hi={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Mr,draggableNodes:new Map,over:null,measureDroppableContainers:Mr},Wo=(0,b.createContext)(Hi),qi=(0,b.createContext)(Cm);function Lm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ha}}}function Im(e,t){switch(t.type){case Se.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Se.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Se.DragEnd:case Se.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Se.RegisterDroppable:{let{element:a}=t,{id:o}=a,r=new ha(e.droppable.containers);return r.set(o,a),{...e,droppable:{...e.droppable,containers:r}}}case Se.SetDroppableDisabled:{let{id:a,key:o,disabled:r}=t,n=e.droppable.containers.get(a);if(!n||o!==n.key)return e;let s=new ha(e.droppable.containers);return s.set(a,{...n,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case Se.UnregisterDroppable:{let{id:a,key:o}=t,r=e.droppable.containers.get(a);if(!r||o!==r.key)return e;let n=new ha(e.droppable.containers);return n.delete(a),{...e,droppable:{...e.droppable,containers:n}}}default:return e}}function bm(e){let{disabled:t}=e,{active:a,activatorEvent:o,draggableNodes:r}=(0,b.useContext)(Wo),n=No(o),s=No(a?.id);return(0,b.useEffect)(()=>{if(!t&&!o&&n&&s!=null){if(!eo(n)||document.activeElement===n.target)return;let l=r.get(s);if(!l)return;let{activatorNode:i,node:u}=l;if(!i.current&&!u.current)return;requestAnimationFrame(()=>{for(let c of[i.current,u.current]){if(!c)continue;let d=ui(c);if(d){d.focus();break}}})}},[o,t,r,s,n]),null}function zi(e,t){let{transform:a,...o}=t;return e!=null&&e.length?e.reduce((r,n)=>n({transform:r,...o}),a):a}function ym(e){return(0,b.useMemo)(()=>({draggable:{...Dr.draggable,...e?.draggable},droppable:{...Dr.droppable,...e?.droppable},dragOverlay:{...Dr.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Sm(e){let{activeNode:t,measure:a,initialRect:o,config:r=!0}=e,n=(0,b.useRef)(!1),{x:s,y:l}=typeof r=="boolean"?{x:r,y:r}:r;et(()=>{if(!s&&!l||!t){n.current=!1;return}if(n.current||!o)return;let u=t?.node.current;if(!u||u.isConnected===!1)return;let c=a(u),d=Di(c,o);if(s||(d.x=0),l||(d.y=0),n.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){let f=ki(u);f&&f.scrollBy({top:d.y,left:d.x})}},[t,s,l,o,a])}var Or=(0,b.createContext)({...pt,scaleX:1,scaleY:1}),$t;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})($t||($t={}));var Fr=(0,b.memo)(function(t){var a,o,r,n;let{id:s,accessibility:l,autoScroll:i=!0,children:u,sensors:c=vm,collisionDetection:d=os,measuring:f,modifiers:h,...g}=t,p=(0,b.useReducer)(Im,void 0,Lm),[m,x]=p,[w,v]=Mp(),[C,I]=(0,b.useState)($t.Uninitialized),L=C===$t.Initialized,{draggable:{active:y,nodes:R,translate:P},droppable:{containers:k}}=m,O=y!=null?R.get(y):null,D=(0,b.useRef)({initial:null,translated:null}),B=(0,b.useMemo)(()=>{var Ue;return y!=null?{id:y,data:(Ue=O?.data)!=null?Ue:wm,rect:D}:null},[y,O]),_=(0,b.useRef)(null),[G,S]=(0,b.useState)(null),[M,A]=(0,b.useState)(null),N=Ja(g,Object.values(g)),E=da("DndDescribedBy",s),j=(0,b.useMemo)(()=>k.getEnabled(),[k]),z=ym(f),{droppableRects:te,measureDroppableContainers:de,measuringScheduled:Pe}=lm(j,{dragging:L,dependencies:[P.x,P.y],config:z.droppable}),ge=nm(R,y),De=(0,b.useMemo)(()=>M?_o(M):null,[M]),F=hp(),Q=im(ge,z.draggable.measure);Sm({activeNode:y!=null?R.get(y):null,config:F.layoutShiftCompensation,initialRect:Q,measure:z.draggable.measure});let V=wi(ge,z.draggable.measure,Q),re=wi(ge?ge.parentElement:null),ae=(0,b.useRef)({activatorEvent:null,active:null,activeNode:ge,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),le=k.getNodeFor((a=ae.current.over)==null?void 0:a.id),be=xm({measure:z.dragOverlay.measure}),ye=(o=be.nodeRef.current)!=null?o:ge,bt=L?(r=be.rect)!=null?r:V:null,ja=!!(be.nodeRef.current&&be.rect),Ka=cm(ja?null:V),Hn=_i(ye?qe(ye):null),Gt=fm(L?le??ge:null),br=hm(Gt),yr=zi(h,{transform:{x:P.x-Ka.x,y:P.y-Ka.y,scaleX:1,scaleY:1},activatorEvent:M,active:B,activeNodeRect:V,containerNodeRect:re,draggingNodeRect:bt,over:ae.current.over,overlayNodeRect:be.rect,scrollableAncestors:Gt,scrollableAncestorRects:br,windowRect:Hn}),Xl=De?ca(De,P):null,$l=pm(Gt),up=Li($l),dp=Li($l,[V]),Xa=ca(yr,up),$a=bt?Up(bt,yr):null,ko=B&&$a?d({active:B,collisionRect:$a,droppableRects:te,droppableContainers:j,pointerCoordinates:Xl}):null,Yl=Vo(ko,"id"),[Wt,Zl]=(0,b.useState)(null),cp=ja?yr:ca(yr,dp),fp=Np(cp,(n=Wt?.rect)!=null?n:null,V),qn=(0,b.useRef)(null),Jl=(0,b.useCallback)((Ue,Ye)=>{let{sensor:Ze,options:jt}=Ye;if(_.current==null)return;let st=R.get(_.current);if(!st)return;let Je=Ue.nativeEvent,yt=new Ze({active:_.current,activeNode:st,event:Je,options:jt,context:ae,onAbort(Oe){if(!R.get(Oe))return;let{onDragAbort:St}=N.current,Ot={id:Oe};St?.(Ot),w({type:"onDragAbort",event:Ot})},onPending(Oe,Kt,St,Ot){if(!R.get(Oe))return;let{onDragPending:To}=N.current,Xt={id:Oe,constraint:Kt,initialCoordinates:St,offset:Ot};To?.(Xt),w({type:"onDragPending",event:Xt})},onStart(Oe){let Kt=_.current;if(Kt==null)return;let St=R.get(Kt);if(!St)return;let{onDragStart:Ot}=N.current,Ao={activatorEvent:Je,active:{id:Kt,data:St.data,rect:D}};(0,ma.unstable_batchedUpdates)(()=>{Ot?.(Ao),I($t.Initializing),x({type:Se.DragStart,initialCoordinates:Oe,active:Kt}),w({type:"onDragStart",event:Ao}),S(qn.current),A(Je)})},onMove(Oe){x({type:Se.DragMove,coordinates:Oe})},onEnd:Ya(Se.DragEnd),onCancel:Ya(Se.DragCancel)});qn.current=yt;function Ya(Oe){return async function(){let{active:St,collisions:Ot,over:Ao,scrollAdjustedTranslate:To}=ae.current,Xt=null;if(St&&To){let{cancelDrop:Eo}=N.current;Xt={activatorEvent:Je,active:St,collisions:Ot,delta:To,over:Ao},Oe===Se.DragEnd&&typeof Eo=="function"&&await Promise.resolve(Eo(Xt))&&(Oe=Se.DragCancel)}_.current=null,(0,ma.unstable_batchedUpdates)(()=>{x({type:Oe}),I($t.Uninitialized),Zl(null),S(null),A(null),qn.current=null;let Eo=Oe===Se.DragEnd?"onDragEnd":"onDragCancel";if(Xt){let zn=N.current[Eo];zn?.(Xt),w({type:Eo,event:Xt})}})}}},[R]),pp=(0,b.useCallback)((Ue,Ye)=>(Ze,jt)=>{let st=Ze.nativeEvent,Je=R.get(jt);if(_.current!==null||!Je||st.dndKit||st.defaultPrevented)return;let yt={active:Je};Ue(Ze,Ye.options,yt)===!0&&(st.dndKit={capturedBy:Ye.sensor},_.current=jt,Jl(Ze,Ye))},[R,Jl]),Ql=sm(c,pp);mm(c),et(()=>{V&&C===$t.Initializing&&I($t.Initialized)},[V,C]),(0,b.useEffect)(()=>{let{onDragMove:Ue}=N.current,{active:Ye,activatorEvent:Ze,collisions:jt,over:st}=ae.current;if(!Ye||!Ze)return;let Je={active:Ye,activatorEvent:Ze,collisions:jt,delta:{x:Xa.x,y:Xa.y},over:st};(0,ma.unstable_batchedUpdates)(()=>{Ue?.(Je),w({type:"onDragMove",event:Je})})},[Xa.x,Xa.y]),(0,b.useEffect)(()=>{let{active:Ue,activatorEvent:Ye,collisions:Ze,droppableContainers:jt,scrollAdjustedTranslate:st}=ae.current;if(!Ue||_.current==null||!Ye||!st)return;let{onDragOver:Je}=N.current,yt=jt.get(Yl),Ya=yt&&yt.rect.current?{id:yt.id,rect:yt.rect.current,data:yt.data,disabled:yt.disabled}:null,Oe={active:Ue,activatorEvent:Ye,collisions:Ze,delta:{x:st.x,y:st.y},over:Ya};(0,ma.unstable_batchedUpdates)(()=>{Zl(Ya),Je?.(Oe),w({type:"onDragOver",event:Oe})})},[Yl]),et(()=>{ae.current={activatorEvent:M,active:B,activeNode:ge,collisionRect:$a,collisions:ko,droppableRects:te,draggableNodes:R,draggingNode:ye,draggingNodeRect:bt,droppableContainers:k,over:Wt,scrollableAncestors:Gt,scrollAdjustedTranslate:Xa},D.current={initial:bt,translated:$a}},[B,ge,ko,$a,R,ye,bt,te,k,Wt,Gt,Xa]),am({...F,delta:P,draggingRect:$a,pointerCoordinates:Xl,scrollableAncestors:Gt,scrollableAncestorRects:br});let mp=(0,b.useMemo)(()=>({active:B,activeNode:ge,activeNodeRect:V,activatorEvent:M,collisions:ko,containerNodeRect:re,dragOverlay:be,draggableNodes:R,droppableContainers:k,droppableRects:te,over:Wt,measureDroppableContainers:de,scrollableAncestors:Gt,scrollableAncestorRects:br,measuringConfiguration:z,measuringScheduled:Pe,windowRect:Hn}),[B,ge,V,M,ko,re,be,R,k,te,Wt,de,Gt,br,z,Pe,Hn]),gp=(0,b.useMemo)(()=>({activatorEvent:M,activators:Ql,active:B,activeNodeRect:V,ariaDescribedById:{draggable:E},dispatch:x,draggableNodes:R,over:Wt,measureDroppableContainers:de}),[M,Ql,B,V,x,E,R,Wt,de]);return b.default.createElement(Si.Provider,{value:v},b.default.createElement(Wo.Provider,{value:gp},b.default.createElement(qi.Provider,{value:mp},b.default.createElement(Or.Provider,{value:fp},u)),b.default.createElement(bm,{disabled:l?.restoreFocus===!1})),b.default.createElement(Tp,{...l,hiddenTextDescribedById:E}));function hp(){let Ue=G?.autoScrollEnabled===!1,Ye=typeof i=="object"?i.enabled===!1:i===!1,Ze=L&&!Ue&&!Ye;return typeof i=="object"?{...i,enabled:Ze}:{enabled:Ze}}}),Rm=(0,b.createContext)(null),bi="button",Pm="Draggable";function Vi(e){let{id:t,data:a,disabled:o=!1,attributes:r}=e,n=da(Pm),{activators:s,activatorEvent:l,active:i,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=(0,b.useContext)(Wo),{role:h=bi,roleDescription:g="draggable",tabIndex:p=0}=r??{},m=i?.id===t,x=(0,b.useContext)(m?Or:Rm),[w,v]=Bo(),[C,I]=Bo(),L=gm(s,t),y=Ja(a);et(()=>(d.set(t,{id:t,key:n,node:w,activatorNode:C,data:y}),()=>{let P=d.get(t);P&&P.key===n&&d.delete(t)}),[d,t]);let R=(0,b.useMemo)(()=>({role:h,tabIndex:p,"aria-disabled":o,"aria-pressed":m&&h===bi?!0:void 0,"aria-roledescription":g,"aria-describedby":c.draggable}),[o,h,p,m,g,c.draggable]);return{active:i,activatorEvent:l,activeNodeRect:u,attributes:R,isDragging:m,listeners:o?void 0:L,node:w,over:f,setNodeRef:v,setActivatorNodeRef:I,transform:x}}function ns(){return(0,b.useContext)(qi)}var Dm="Droppable",Mm={timeout:25};function Br(e){let{data:t,disabled:a=!1,id:o,resizeObserverConfig:r}=e,n=da(Dm),{active:s,dispatch:l,over:i,measureDroppableContainers:u}=(0,b.useContext)(Wo),c=(0,b.useRef)({disabled:a}),d=(0,b.useRef)(!1),f=(0,b.useRef)(null),h=(0,b.useRef)(null),{disabled:g,updateMeasurementsFor:p,timeout:m}={...Mm,...r},x=Ja(p??o),w=(0,b.useCallback)(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),h.current=null},m)},[m]),v=Er({callback:w,disabled:g||!s}),C=(0,b.useCallback)((R,P)=>{v&&(P&&(v.unobserve(P),d.current=!1),R&&v.observe(R))},[v]),[I,L]=Bo(C),y=Ja(t);return(0,b.useEffect)(()=>{!v||!I.current||(v.disconnect(),d.current=!1,v.observe(I.current))},[I,v]),(0,b.useEffect)(()=>(l({type:Se.RegisterDroppable,element:{id:o,key:n,disabled:a,node:I,rect:f,data:y}}),()=>l({type:Se.UnregisterDroppable,key:n,id:o})),[o]),(0,b.useEffect)(()=>{a!==c.current.disabled&&(l({type:Se.SetDroppableDisabled,id:o,key:n,disabled:a}),c.current.disabled=a)},[o,n,a,l]),{active:s,rect:f,isOver:i?.id===o,node:I,over:i,setNodeRef:L}}function km(e){let{animation:t,children:a}=e,[o,r]=(0,b.useState)(null),[n,s]=(0,b.useState)(null),l=No(a);return!a&&!o&&l&&r(l),et(()=>{if(!n)return;let i=o?.key,u=o?.props.id;if(i==null||u==null){r(null);return}Promise.resolve(t(u,n)).then(()=>{r(null)})},[t,o,n]),b.default.createElement(b.default.Fragment,null,a,o?(0,b.cloneElement)(o,{ref:s}):null)}var Am={x:0,y:0,scaleX:1,scaleY:1};function Tm(e){let{children:t}=e;return b.default.createElement(Wo.Provider,{value:Hi},b.default.createElement(Or.Provider,{value:Am},t))}var Em={position:"fixed",touchAction:"none"},Om=e=>eo(e)?"transform 250ms ease":void 0,Fm=(0,b.forwardRef)((e,t)=>{let{as:a,activatorEvent:o,adjustScale:r,children:n,className:s,rect:l,style:i,transform:u,transition:c=Om}=e;if(!l)return null;let d=r?u:{...u,scaleX:1,scaleY:1},f={...Em,width:l.width,height:l.height,top:l.top,left:l.left,transform:Qe.Transform.toString(d),transformOrigin:r&&o?Ep(o,l):void 0,transition:typeof c=="function"?c(o):c,...i};return b.default.createElement(a,{className:s,style:f,ref:t},n)}),Bm=e=>t=>{let{active:a,dragOverlay:o}=t,r={},{styles:n,className:s}=e;if(n!=null&&n.active)for(let[l,i]of Object.entries(n.active))i!==void 0&&(r[l]=a.node.style.getPropertyValue(l),a.node.style.setProperty(l,i));if(n!=null&&n.dragOverlay)for(let[l,i]of Object.entries(n.dragOverlay))i!==void 0&&o.node.style.setProperty(l,i);return s!=null&&s.active&&a.node.classList.add(s.active),s!=null&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(let[i,u]of Object.entries(r))a.node.style.setProperty(i,u);s!=null&&s.active&&a.node.classList.remove(s.active)}},Nm=e=>{let{transform:{initial:t,final:a}}=e;return[{transform:Qe.Transform.toString(t)},{transform:Qe.Transform.toString(a)}]},_m={duration:250,easing:"ease",keyframes:Nm,sideEffects:Bm({styles:{active:{opacity:"0"}}})};function Um(e){let{config:t,draggableNodes:a,droppableContainers:o,measuringConfiguration:r}=e;return Fo((n,s)=>{if(t===null)return;let l=a.get(n);if(!l)return;let i=l.node.current;if(!i)return;let u=Ui(s);if(!u)return;let{transform:c}=qe(s).getComputedStyle(s),d=Mi(c);if(!d)return;let f=typeof t=="function"?t:Hm(t);return Bi(i,r.draggable.measure),f({active:{id:n,data:l.data,node:i,rect:r.draggable.measure(i)},draggableNodes:a,dragOverlay:{node:s,rect:r.dragOverlay.measure(u)},droppableContainers:o,measuringConfiguration:r,transform:d})})}function Hm(e){let{duration:t,easing:a,sideEffects:o,keyframes:r}={..._m,...e};return n=>{let{active:s,dragOverlay:l,transform:i,...u}=n;if(!t)return;let c={x:l.rect.left-s.rect.left,y:l.rect.top-s.rect.top},d={scaleX:i.scaleX!==1?s.rect.width*i.scaleX/l.rect.width:1,scaleY:i.scaleY!==1?s.rect.height*i.scaleY/l.rect.height:1},f={x:i.x-c.x,y:i.y-c.y,...d},h=r({...u,active:s,dragOverlay:l,transform:{initial:i,final:f}}),[g]=h,p=h[h.length-1];if(JSON.stringify(g)===JSON.stringify(p))return;let m=o?.({active:s,dragOverlay:l,...u}),x=l.node.animate(h,{duration:t,easing:a,fill:"forwards"});return new Promise(w=>{x.onfinish=()=>{m?.(),w()}})}}var yi=0;function qm(e){return(0,b.useMemo)(()=>{if(e!=null)return yi++,yi},[e])}var Gi=b.default.memo(e=>{let{adjustScale:t=!1,children:a,dropAnimation:o,style:r,transition:n,modifiers:s,wrapperElement:l="div",className:i,zIndex:u=999}=e,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggableNodes:g,droppableContainers:p,dragOverlay:m,over:x,measuringConfiguration:w,scrollableAncestors:v,scrollableAncestorRects:C,windowRect:I}=ns(),L=(0,b.useContext)(Or),y=qm(d?.id),R=zi(s,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:h,draggingNodeRect:m.rect,over:x,overlayNodeRect:m.rect,scrollableAncestors:v,scrollableAncestorRects:C,transform:L,windowRect:I}),P=rs(f),k=Um({config:o,draggableNodes:g,droppableContainers:p,measuringConfiguration:w}),O=P?m.setRef:void 0;return b.default.createElement(Tm,null,b.default.createElement(km,{animation:k},d&&y?b.default.createElement(Fm,{key:y,id:d.id,ref:O,as:l,activatorEvent:c,adjustScale:t,className:i,transition:n,rect:P,style:{zIndex:u,...r},transform:R},a):null))});var ve=U(require("react"));function Wi(e,t,a){let o=e.slice();return o.splice(a<0?o.length+a:a,0,o.splice(t,1)[0]),o}function zm(e,t){return e.reduce((a,o,r)=>{let n=t.get(o);return n&&(a[r]=n),a},Array(e.length))}function Nr(e){return e!==null&&e>=0}function Vm(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function Gm(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var ji=e=>{let{rects:t,activeIndex:a,overIndex:o,index:r}=e,n=Wi(t,o,a),s=t[r],l=n[r];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}};var _r={scaleX:1,scaleY:1},Hr=e=>{var t;let{activeIndex:a,activeNodeRect:o,index:r,rects:n,overIndex:s}=e,l=(t=n[a])!=null?t:o;if(!l)return null;if(r===a){let u=n[s];return u?{x:0,y:a<s?u.top+u.height-(l.top+l.height):u.top-l.top,..._r}:null}let i=Wm(n,r,a);return r>a&&r<=s?{x:0,y:-l.height-i,..._r}:r<a&&r>=s?{x:0,y:l.height+i,..._r}:{x:0,y:0,..._r}};function Wm(e,t,a){let o=e[t],r=e[t-1],n=e[t+1];return o?a<t?r?o.top-(r.top+r.height):n?n.top-(o.top+o.height):0:n?n.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}var Ki="Sortable",Xi=ve.default.createContext({activeIndex:-1,containerId:Ki,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ji,disabled:{draggable:!1,droppable:!1}});function qr(e){let{children:t,id:a,items:o,strategy:r=ji,disabled:n=!1}=e,{active:s,dragOverlay:l,droppableRects:i,over:u,measureDroppableContainers:c}=ns(),d=da(Ki,a),f=l.rect!==null,h=(0,ve.useMemo)(()=>o.map(L=>typeof L=="object"&&"id"in L?L.id:L),[o]),g=s!=null,p=s?h.indexOf(s.id):-1,m=u?h.indexOf(u.id):-1,x=(0,ve.useRef)(h),w=!Vm(h,x.current),v=m!==-1&&p===-1||w,C=Gm(n);et(()=>{w&&g&&c(h)},[w,h,g,c]),(0,ve.useEffect)(()=>{x.current=h},[h]);let I=(0,ve.useMemo)(()=>({activeIndex:p,containerId:d,disabled:C,disableTransforms:v,items:h,overIndex:m,useDragOverlay:f,sortedRects:zm(h,i),strategy:r}),[p,d,C.draggable,C.droppable,v,h,m,i,f,r]);return ve.default.createElement(Xi.Provider,{value:I},t)}var jm=e=>{let{id:t,items:a,activeIndex:o,overIndex:r}=e;return Wi(a,o,r).indexOf(t)},Km=e=>{let{containerId:t,isSorting:a,wasDragging:o,index:r,items:n,newIndex:s,previousItems:l,previousContainerId:i,transition:u}=e;return!u||!o||l!==n&&r===s?!1:a?!0:s!==r&&t===i},Xm={duration:200,easing:"ease"},$i="transform",$m=Qe.Transition.toString({property:$i,duration:0,easing:"linear"}),Ym={roleDescription:"sortable"};function Zm(e){let{disabled:t,index:a,node:o,rect:r}=e,[n,s]=(0,ve.useState)(null),l=(0,ve.useRef)(a);return et(()=>{if(!t&&a!==l.current&&o.current){let i=r.current;if(i){let u=xa(o.current,{ignoreTransform:!0}),c={x:i.left-u.left,y:i.top-u.top,scaleX:i.width/u.width,scaleY:i.height/u.height};(c.x||c.y)&&s(c)}}a!==l.current&&(l.current=a)},[t,a,o,r]),(0,ve.useEffect)(()=>{n&&s(null)},[n]),n}function zr(e){let{animateLayoutChanges:t=Km,attributes:a,disabled:o,data:r,getNewIndex:n=jm,id:s,strategy:l,resizeObserverConfig:i,transition:u=Xm}=e,{items:c,containerId:d,activeIndex:f,disabled:h,disableTransforms:g,sortedRects:p,overIndex:m,useDragOverlay:x,strategy:w}=(0,ve.useContext)(Xi),v=Jm(o,h),C=c.indexOf(s),I=(0,ve.useMemo)(()=>({sortable:{containerId:d,index:C,items:c},...r}),[d,r,C,c]),L=(0,ve.useMemo)(()=>c.slice(c.indexOf(s)),[c,s]),{rect:y,node:R,isOver:P,setNodeRef:k}=Br({id:s,data:I,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:L,...i}}),{active:O,activatorEvent:D,activeNodeRect:B,attributes:_,setNodeRef:G,listeners:S,isDragging:M,over:A,setActivatorNodeRef:N,transform:E}=Vi({id:s,data:I,attributes:{...Ym,...a},disabled:v.draggable}),j=si(k,G),z=!!O,te=z&&!g&&Nr(f)&&Nr(m),de=!x&&M,Pe=de&&te?E:null,De=te?Pe??(l??w)({rects:p,activeNodeRect:B,activeIndex:f,overIndex:m,index:C}):null,F=Nr(f)&&Nr(m)?n({id:s,items:c,activeIndex:f,overIndex:m}):C,Q=O?.id,V=(0,ve.useRef)({activeId:Q,items:c,newIndex:F,containerId:d}),re=c!==V.current.items,ae=t({active:O,containerId:d,isDragging:M,isSorting:z,id:s,index:C,items:c,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:u,wasDragging:V.current.activeId!=null}),le=Zm({disabled:!ae,index:C,node:R,rect:y});return(0,ve.useEffect)(()=>{z&&V.current.newIndex!==F&&(V.current.newIndex=F),d!==V.current.containerId&&(V.current.containerId=d),c!==V.current.items&&(V.current.items=c)},[z,F,d,c]),(0,ve.useEffect)(()=>{if(Q===V.current.activeId)return;if(Q&&!V.current.activeId){V.current.activeId=Q;return}let ye=setTimeout(()=>{V.current.activeId=Q},50);return()=>clearTimeout(ye)},[Q]),{active:O,activeIndex:f,attributes:_,data:I,rect:y,index:C,newIndex:F,items:c,isOver:P,isSorting:z,isDragging:M,listeners:S,node:R,overIndex:m,over:A,setNodeRef:j,setActivatorNodeRef:N,setDroppableNodeRef:k,setDraggableNodeRef:G,transform:le??De,transition:be()};function be(){if(le||re&&V.current.newIndex===C)return $m;if(!(de&&!eo(D)||!u)&&(z||ae))return Qe.Transition.toString({...u,property:$i})}}function Jm(e,t){var a,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:t.draggable,droppable:(o=e?.droppable)!=null?o:t.droppable}}function Ur(e){if(!e)return!1;let t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Qm=[ee.Down,ee.Right,ee.Up,ee.Left],Vr=(e,t)=>{let{context:{active:a,collisionRect:o,droppableRects:r,droppableContainers:n,over:s,scrollableAncestors:l}}=t;if(Qm.includes(e.code)){if(e.preventDefault(),!a||!o)return;let i=[];n.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;let f=r.get(d.id);if(f)switch(e.code){case ee.Down:o.top<f.top&&i.push(d);break;case ee.Up:o.top>f.top&&i.push(d);break;case ee.Left:o.left>f.left&&i.push(d);break;case ee.Right:o.left<f.left&&i.push(d);break}});let u=Tr({active:a,collisionRect:o,droppableRects:r,droppableContainers:i,pointerCoordinates:null}),c=Vo(u,"id");if(c===s?.id&&u.length>1&&(c=u[1].id),c!=null){let d=n.get(a.id),f=n.get(c),h=f?r.get(f.id):null,g=f?.node.current;if(g&&h&&d&&f){let m=Go(g).some((L,y)=>l[y]!==L),x=Yi(d,f),w=eg(d,f),v=m||!x?{x:0,y:0}:{x:w?o.width-h.width:0,y:w?o.height-h.height:0},C={x:h.left,y:h.top};return v.x&&v.y?C:fa(C,v)}}}};function Yi(e,t){return!Ur(e)||!Ur(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function eg(e,t){return!Ur(e)||!Ur(t)||!Yi(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Wr=require("react");var Zi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gr=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var jo=require("react");var Ji={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Qi=(0,jo.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:n,iconNode:s,...l},i)=>(0,jo.createElement)("svg",{ref:i,...Ji,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:Gr("lucide",r),...l},[...s.map(([u,c])=>(0,jo.createElement)(u,c)),...Array.isArray(n)?n:[n]]));var me=(e,t)=>{let a=(0,Wr.forwardRef)(({className:o,...r},n)=>(0,Wr.createElement)(Qi,{ref:n,iconNode:t,className:Gr(`lucide-${Zi(e)}`,o),...r}));return a.displayName=`${e}`,a};var tg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jt=me("Check",tg);var ag=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ao=me("ChevronDown",ag);var og=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ko=me("ChevronUp",og);var rg=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Xo=me("Filter",rg);var ng=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],$o=me("GripVertical",ng);var sg=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Yo=me("List",sg);var lg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ft=me("Plus",lg);var ig=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Zo=me("RefreshCw",ig);var ug=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Jo=me("Settings2",ug);var dg=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Qo=me("Tag",dg);var cg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Bt=me("Trash2",cg);var fg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],er=me("X",fg);var En=require("react");var vu=U(require("react"),1);var Fe=U(require("react"),1);var eu=U(require("react"),1),pg=Object.defineProperty,ls=(e,t)=>pg(e,"name",{value:t,configurable:!0});function ss(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ls(ss,"setRef");function tu(...e){return t=>{let a=!1,o=e.map(r=>{let n=ss(r,t);return!a&&typeof n=="function"&&(a=!0),n});if(a)return()=>{for(let r=0;r<o.length;r++){let n=o[r];typeof n=="function"?n():ss(e[r],null)}}}}ls(tu,"composeRefs");function Y(...e){return eu.useCallback(tu(...e),e)}ls(Y,"useComposedRefs");var mg=Object.defineProperty,mt=(e,t)=>mg(e,"name",{value:t,configurable:!0});function ze(e){let t=Fe.forwardRef((a,o)=>{let{children:r,...n}=a,s=null,l=!1,i=[];is(r)&&typeof jr=="function"&&(r=jr(r._payload)),Fe.Children.forEach(r,f=>{if(su(f)){l=!0;let h=f,g="child"in h.props?h.props.child:h.props.children;is(g)&&typeof jr=="function"&&(g=jr(g._payload)),s=hg(h,g),i.push(s?.props?.children)}else i.push(f)}),s?s=Fe.cloneElement(s,void 0,i):!l&&Fe.Children.count(r)===1&&Fe.isValidElement(r)&&(s=r);let u=s?nu(s):void 0,c=Y(o,u);if(!s){if(r||r===0)throw new Error(l?wg(e):vg(e));return r}let d=ru(n,s.props??{});return s.type!==Fe.Fragment&&(d.ref=o?c:u),Fe.cloneElement(s,d)});return t.displayName=`${e}.Slot`,t}mt(ze,"createSlot");var au=ze("Slot"),ou=Symbol.for("radix.slottable");function gg(e){let t=mt(a=>"child"in a?a.children(a.child):a.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ou,t}mt(gg,"createSlottable");var hg=mt((e,t)=>{if("child"in e.props){let a=e.props.child;return Fe.isValidElement(a)?Fe.cloneElement(a,void 0,e.props.children(a.props.children)):null}return Fe.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ru(e,t){let a={...t};for(let o in t){let r=e[o],n=t[o];/^on[A-Z]/.test(o)?r&&n?a[o]=(...l)=>{let i=n(...l);return r(...l),i}:r&&(a[o]=r):o==="style"?a[o]={...r,...n}:o==="className"&&(a[o]=[r,n].filter(Boolean).join(" "))}return{...e,...a}}mt(ru,"mergeProps");function nu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}mt(nu,"getElementRef");function su(e){return Fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ou}mt(su,"isSlottable");var xg=Symbol.for("react.lazy");function is(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===xg&&"_payload"in e&&lu(e._payload)}mt(is,"isLazyComponent");function lu(e){return typeof e=="object"&&e!==null&&"then"in e}mt(lu,"isPromiseLike");var vg=mt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),wg=mt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),jr=Fe[" use ".trim().toString()];function iu(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=iu(e[t]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function Kr(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=iu(e))&&(o&&(o+=" "),o+=t);return o}var uu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,du=Kr,Xr=(e,t)=>a=>{var o;if(t?.variants==null)return du(e,a?.class,a?.className);let{variants:r,defaultVariants:n}=t,s=Object.keys(r).map(u=>{let c=a?.[u],d=n?.[u];if(c===null)return null;let f=uu(c)||uu(d);return r[u][f]}),l=a&&Object.entries(a).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),i=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[p,m]=g;return Array.isArray(m)?m.includes({...n,...l}[p]):{...n,...l}[p]===m})?[...u,d,f]:u},[]);return du(e,s,i,a?.class,a?.className)};var Cg=e=>{let t=Ig(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let l=s.split("-");return l[0]===""&&l.length!==1&&l.shift(),pu(l,t)||Lg(s)},getConflictingClassGroupIds:(s,l)=>{let i=a[s]||[];return l&&o[s]?[...i,...o[s]]:i}}},pu=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?pu(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let n=e.join("-");return t.validators.find(({validator:s})=>s(n))?.classGroupId},cu=/^\[(.+)\]$/,Lg=e=>{if(cu.test(e)){let t=cu.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Ig=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return yg(Object.entries(e.classGroups),a).forEach(([n,s])=>{ds(s,o,n,t)}),o},ds=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let n=r===""?t:fu(t,r);n.classGroupId=a;return}if(typeof r=="function"){if(bg(r)){ds(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([n,s])=>{ds(s,fu(t,n),a,o)})})},fu=(e,t)=>{let a=e;return t.split("-").forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},bg=e=>e.isThemeGetter,yg=(e,t)=>t?e.map(([a,o])=>{let r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,l])=>[t+s,l])):n);return[a,r]}):e,Sg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(n,s)=>{a.set(n,s),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let s=a.get(n);if(s!==void 0)return s;if((s=o.get(n))!==void 0)return r(n,s),s},set(n,s){a.has(n)?a.set(n,s):r(n,s)}}};var Rg=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],n=t.length,s=l=>{let i=[],u=0,c=0,d;for(let m=0;m<l.length;m++){let x=l[m];if(u===0){if(x===r&&(o||l.slice(m,m+n)===t)){i.push(l.slice(c,m)),c=m+n;continue}if(x==="/"){d=m;continue}}x==="["?u++:x==="]"&&u--}let f=i.length===0?l:l.substring(c),h=f.startsWith("!"),g=h?f.substring(1):f,p=d&&d>c?d-c:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:p}};return a?l=>a({className:l,parseClassName:s}):s},Pg=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Dg=e=>({cache:Sg(e.cacheSize),parseClassName:Rg(e),...Cg(e)}),Mg=/\s+/,kg=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],s=e.trim().split(Mg),l="";for(let i=s.length-1;i>=0;i-=1){let u=s[i],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=a(u),g=!!h,p=o(g?f.substring(0,h):f);if(!p){if(!g){l=u+(l.length>0?" "+l:l);continue}if(p=o(f),!p){l=u+(l.length>0?" "+l:l);continue}g=!1}let m=Pg(c).join(":"),x=d?m+"!":m,w=x+p;if(n.includes(w))continue;n.push(w);let v=r(p,g);for(let C=0;C<v.length;++C){let I=v[C];n.push(x+I)}l=u+(l.length>0?" "+l:l)}return l};function Ag(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=mu(t))&&(o&&(o+=" "),o+=a);return o}var mu=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=mu(e[o]))&&(a&&(a+=" "),a+=t);return a};function Tg(e,...t){let a,o,r,n=s;function s(i){let u=t.reduce((c,d)=>d(c),e());return a=Dg(u),o=a.cache.get,r=a.cache.set,n=l,l(i)}function l(i){let u=o(i);if(u)return u;let c=kg(i,a);return r(i,c),c}return function(){return n(Ag.apply(null,arguments))}}var ce=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},gu=/^\[(?:([a-z-]+):)?(.+)\]$/i,Eg=/^\d+\/\d+$/,Og=new Set(["px","full","screen"]),Fg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ng=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_g=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ug=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nt=e=>oo(e)||Og.has(e)||Eg.test(e),Qt=e=>ro(e,"length",Kg),oo=e=>!!e&&!Number.isNaN(Number(e)),us=e=>ro(e,"number",oo),tr=e=>!!e&&Number.isInteger(Number(e)),Hg=e=>e.endsWith("%")&&oo(e.slice(0,-1)),$=e=>gu.test(e),ea=e=>Fg.test(e),qg=new Set(["length","size","percentage"]),zg=e=>ro(e,qg,hu),Vg=e=>ro(e,"position",hu),Gg=new Set(["image","url"]),Wg=e=>ro(e,Gg,$g),jg=e=>ro(e,"",Xg),ar=()=>!0,ro=(e,t,a)=>{let o=gu.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Kg=e=>Bg.test(e)&&!Ng.test(e),hu=()=>!1,Xg=e=>_g.test(e),$g=e=>Ug.test(e);var Yg=()=>{let e=ce("colors"),t=ce("spacing"),a=ce("blur"),o=ce("brightness"),r=ce("borderColor"),n=ce("borderRadius"),s=ce("borderSpacing"),l=ce("borderWidth"),i=ce("contrast"),u=ce("grayscale"),c=ce("hueRotate"),d=ce("invert"),f=ce("gap"),h=ce("gradientColorStops"),g=ce("gradientColorStopPositions"),p=ce("inset"),m=ce("margin"),x=ce("opacity"),w=ce("padding"),v=ce("saturate"),C=ce("scale"),I=ce("sepia"),L=ce("skew"),y=ce("space"),R=ce("translate"),P=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",$,t],D=()=>[$,t],B=()=>["",Nt,Qt],_=()=>["auto",oo,$],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",$],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[oo,$];return{cacheSize:500,separator:":",theme:{colors:[ar],spacing:[Nt,Qt],blur:["none","",ea,$],brightness:j(),borderColor:[e],borderRadius:["none","","full",ea,$],borderSpacing:D(),borderWidth:B(),contrast:j(),grayscale:N(),hueRotate:j(),invert:N(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Hg,Qt],inset:O(),margin:O(),opacity:j(),padding:D(),saturate:j(),scale:j(),sepia:N(),skew:j(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[ea]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),$]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",tr,$]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",tr,$]}],"grid-cols":[{"grid-cols":[ar]}],"col-start-end":[{col:["auto",{span:["full",tr,$]},$]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[ar]}],"row-start-end":[{row:["auto",{span:[tr,$]},$]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,t]}],"min-w":[{"min-w":[$,t,"min","max","fit"]}],"max-w":[{"max-w":[$,t,"none","full","min","max","fit","prose",{screen:[ea]},ea]}],h:[{h:[$,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ea,Qt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",us]}],"font-family":[{font:[ar]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",oo,us]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Nt,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...S(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Nt,Qt]}],"underline-offset":[{"underline-offset":["auto",Nt,$]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),Vg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",zg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Wg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...S(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:S()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...S()]}],"outline-offset":[{"outline-offset":[Nt,$]}],"outline-w":[{outline:[Nt,Qt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Nt,Qt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ea,jg]}],"shadow-color":[{shadow:[ar]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",ea,$]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[tr,$]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Nt,Qt,us]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var xu=Tg(Yg);function K(...e){return xu(Kr(e))}var wu=require("react/jsx-runtime"),Zg=Xr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-[transform,color,background-color,border-color,box-shadow] duration-150 active:scale-[0.97] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),Be=vu.forwardRef(({className:e,variant:t,size:a,asChild:o=!1,...r},n)=>(0,wu.jsx)(o?au:"button",{className:K(Zg({variant:t,size:a,className:e})),ref:n,...r}));Be.displayName="Button";var ur=U(require("react"),1);var pe=U(require("react"),1);var Jg=Object.defineProperty,no=(e,t)=>Jg(e,"name",{value:t,configurable:!0}),Cu=!!(typeof window<"u"&&window.document&&window.document.createElement);function H(e,t,{checkForDefaultPrevented:a=!0}={}){return no(function(r){if(e?.(r),a===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}no(H,"composeEventHandlers");function Qg(e){if(!Cu)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}no(Qg,"getOwnerWindow");function cs(e){if(!Cu)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}no(cs,"getOwnerDocument");function Lu(e,t=!1){let{activeElement:a}=cs(e);if(!a?.nodeName)return null;if(Iu(a)&&a.contentDocument)return Lu(a.contentDocument.body,t);if(t){let o=a.getAttribute("aria-activedescendant");if(o){let r=cs(a).getElementById(o);if(r)return r}}return a}no(Lu,"getActiveElement");function Iu(e){return e.tagName==="IFRAME"}no(Iu,"isFrame");var ut=U(require("react"),1),fs=require("react/jsx-runtime"),eh=Object.defineProperty,it=(e,t)=>eh(e,"name",{value:t,configurable:!0});function th(e,t){let a=ut.createContext(t);a.displayName=e+"Context";let o=it(n=>{let{children:s,...l}=n,i=ut.useMemo(()=>l,Object.values(l));return(0,fs.jsx)(a.Provider,{value:i,children:s})},"Provider");o.displayName=e+"Provider";function r(n,s={}){let{optional:l=!1}=s,i=ut.useContext(a);if(i)return i;if(t!==void 0)return t;if(!l)throw new Error(`\`${n}\` must be used within \`${e}\``)}return it(r,"useContext"),[o,r]}it(th,"createContext");function Ne(e,t=[]){let a=[];function o(n,s){let l=ut.createContext(s);l.displayName=n+"Context";let i=a.length;a=[...a,s];let u=it(d=>{let{scope:f,children:h,...g}=d,p=f?.[e]?.[i]||l,m=ut.useMemo(()=>g,Object.values(g));return(0,fs.jsx)(p.Provider,{value:m,children:h})},"Provider");u.displayName=n+"Provider";function c(d,f,h={}){let{optional:g=!1}=h,p=f?.[e]?.[i]||l,m=ut.useContext(p);if(m)return m;if(s!==void 0)return s;if(!g)throw new Error(`\`${d}\` must be used within \`${n}\``)}return it(c,"useContext"),[u,c]}it(o,"createContext");let r=it(()=>{let n=a.map(s=>ut.createContext(s));return it(function(l){let i=l?.[e]||n;return ut.useMemo(()=>({[`__scope${e}`]:{...l,[e]:i}}),[l,i])},"useScope")},"createScope");return r.scopeName=e,[o,bu(r,...t)]}it(Ne,"createContextScope");function bu(...e){let t=e[0];if(e.length===1)return t;let a=it(()=>{let o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return it(function(n){let s=o.reduce((l,{useScope:i,scopeName:u})=>{let d=i(n)[`__scope${u}`];return{...l,...d}},{});return ut.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return a.scopeName=t.scopeName,a}it(bu,"composeContextScopes");var ps=U(require("react"),1);var yu=U(require("react"),1),ne=globalThis?.document?yu.useLayoutEffect:()=>{};var ah=Object.defineProperty,oh=(e,t)=>ah(e,"name",{value:t,configurable:!0}),rh=ps[" useId ".trim().toString()]||(()=>{}),nh=0;function tt(e){let[t,a]=ps.useState(rh());return ne(()=>{e||a(o=>o??String(nh++))},[e]),e||(t?`radix-${t}`:"")}oh(tt,"useId");var dt=U(require("react"),1);var $r=!1;var gt=U(require("react"),1);var so=U(require("react"),1),sh=Object.defineProperty,lh=(e,t)=>sh(e,"name",{value:t,configurable:!0}),Su=so[" useEffectEvent ".trim().toString()],Ru=so[" useInsertionEffect ".trim().toString()];function ms(e){if(typeof Su=="function")return Su(e);let t=so.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ru=="function"?Ru(()=>{t.current=e}):ne(()=>{t.current=e}),so.useMemo(()=>((...a)=>t.current?.(...a)),[])}lh(ms,"useEffectEvent");var ih=Object.defineProperty,or=(e,t)=>ih(e,"name",{value:t,configurable:!0}),uh=dt[" useInsertionEffect ".trim().toString()]||ne;function Rt({prop:e,defaultProp:t,onChange:a=or(()=>{},"onChange"),caller:o}){let[r,n,s]=Du({defaultProp:t,onChange:a}),l=e!==void 0,i=l?e:r;if($r){let c=dt.useRef(e!==void 0);dt.useEffect(()=>{let d=c.current;d!==l&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=l},[l,o])}let u=dt.useCallback(c=>{if(l){let d=Mu(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[l,e,n,s]);return[i,u]}or(Rt,"useControllableState");function Du({defaultProp:e,onChange:t}){let[a,o]=dt.useState(e),r=dt.useRef(a),n=dt.useRef(t);return uh(()=>{n.current=t},[t]),dt.useEffect(()=>{r.current!==a&&(n.current?.(a),r.current=a)},[a,r]),[a,o,n]}or(Du,"useUncontrolledState");function Mu(e){return typeof e=="function"}or(Mu,"isFunction");var Pu=Symbol("RADIX:SYNC_STATE");function dh(e,t,a,o){let{prop:r,defaultProp:n,onChange:s,caller:l}=t,i=r!==void 0,u=ms(s);if($r){let m=gt.useRef(r!==void 0);gt.useEffect(()=>{let x=m.current;x!==i&&console.warn(`${l} is changing from ${x?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,l])}let c=[{...a,state:n}];o&&c.push(o);let[d,f]=gt.useReducer((m,x)=>{if(x.type===Pu)return{...m,state:x.state};let w=e(m,x);return i&&!Object.is(w.state,m.state)&&u(w.state),w},...c),h=d.state,g=gt.useRef(h);gt.useEffect(()=>{g.current!==h&&(g.current=h,i||u(h))},[h,g,i]);let p=gt.useMemo(()=>r!==void 0?{...d,state:r}:d,[d,r]);return gt.useEffect(()=>{i&&!Object.is(r,d.state)&&f({type:Pu,state:r})},[r,d.state,i]),[p,f]}or(dh,"useControllableStateReducer");var se=U(require("react"),1);var ku=U(require("react"),1),Au=U(require("react-dom"),1);var Tu=require("react/jsx-runtime"),ch=Object.defineProperty,fh=(e,t)=>ch(e,"name",{value:t,configurable:!0}),ph=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Z=ph.reduce((e,t)=>{let a=ze(`Primitive.${t}`),o=ku.forwardRef((r,n)=>{let{asChild:s,...l}=r,i=s?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,Tu.jsx)(i,{...l,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function rr(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}fh(rr,"dispatchDiscreteCustomEvent");var lo=U(require("react"),1),mh=Object.defineProperty,gh=(e,t)=>mh(e,"name",{value:t,configurable:!0});function ke(e){let t=lo.useRef(e);return lo.useEffect(()=>{t.current=e}),lo.useMemo(()=>((...a)=>t.current?.(...a)),[])}gh(ke,"useCallbackRef");var Ou=require("react/jsx-runtime"),hh=Object.defineProperty,Ae=(e,t)=>hh(e,"name",{value:t,configurable:!0}),gs="dismissableLayer.update",xh="dismissableLayer.pointerDownOutside",vh="dismissableLayer.focusOutside",Eu,Fu=se.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),io=se.forwardRef(Ae(function(t,a){let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:i,onDismiss:u,...c}=t,d=se.useContext(Fu),[f,h]=se.useState(null),g=f?.ownerDocument??globalThis?.document,[,p]=se.useState({}),m=Y(a,h),x=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=w?x.indexOf(w):-1,C=f?x.indexOf(f):-1,I=d.layersWithOutsidePointerEventsDisabled.size>0,L=C>=v,y=se.useRef(!1),R=Bu(D=>{s?.(D),i?.(D),D.defaultPrevented||u?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:y,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:se.useCallback(D=>{if(!(D instanceof Node))return!1;let B=[...d.branches].some(_=>_.contains(D));return L&&!B},[d.branches,L])}),P=Nu(D=>{if(r&&y.current)return;let B=D.target;[...d.branches].some(G=>G.contains(B))||(l?.(D),i?.(D),D.defaultPrevented||u?.())},g),k=f?C===x.length-1:!1,O=ke(D=>{D.key==="Escape"&&(n?.(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))});return se.useEffect(()=>{if(k)return g.addEventListener("keydown",O,{capture:!0}),()=>g.removeEventListener("keydown",O,{capture:!0})},[g,k,O]),se.useEffect(()=>{if(f)return o&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Eu=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),hs(),()=>{o&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=Eu))}},[f,g,o,d]),se.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),hs())},[f,d]),se.useEffect(()=>{let D=Ae(()=>p({}),"handleUpdate");return document.addEventListener(gs,D),()=>document.removeEventListener(gs,D)},[]),(0,Ou.jsx)(Z.div,{...c,ref:m,style:{pointerEvents:I?L?"auto":"none":void 0,...t.style},onFocusCapture:H(t.onFocusCapture,P.onFocusCapture),onBlurCapture:H(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:H(t.onPointerDownCapture,R.onPointerDownCapture)})},"DismissableLayer"));function xs(){let e=se.useContext(Fu),[t,a]=se.useState(null);return se.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),a}Ae(xs,"useDismissableLayerSurface");var wh=Ae(()=>!0,"IS_TRUE");function Bu(e,t){let{ownerDocument:a=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:n,shouldHandlePointerDownOutside:s=wh}=t,l=ke(e),i=se.useRef(!1),u=se.useRef(!1),c=se.useRef(new Map),d=se.useRef(()=>{});return se.useEffect(()=>{function f(){u.current=!1,r.current=!1,c.current.clear()}Ae(f,"resetOutsideInteraction");function h(){return Array.from(c.current.values()).some(Boolean)}Ae(h,"isOutsideInteractionIntercepted");function g(v){if(!u.current)return;let C=v.target;C instanceof Node&&[...n].some(L=>L.contains(C))||c.current.set(v.type,!0),v.type==="click"&&window.setTimeout(()=>{u.current&&d.current()},0)}Ae(g,"handleInteractionCapture");function p(v){u.current&&c.current.set(v.type,!1)}Ae(p,"handleInteractionBubble");let m=Ae(v=>{if(v.target&&!i.current){let I=function(){a.removeEventListener("click",d.current);let y=h();f(),y||vs(xh,l,L,{discrete:!0})};var C=I;if(Ae(I,"handleAndDispatchPointerDownOutsideEvent"),!s(v.target)){a.removeEventListener("click",d.current),f(),i.current=!1;return}let L={originalEvent:v};u.current=!0,r.current=o&&v.button===0,c.current.clear(),!o||v.button!==0?I():(a.removeEventListener("click",d.current),d.current=I,a.addEventListener("click",d.current,{once:!0}))}else a.removeEventListener("click",d.current),f();i.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let v of x)a.addEventListener(v,g,!0),a.addEventListener(v,p);let w=window.setTimeout(()=>{a.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(w),a.removeEventListener("pointerdown",m),a.removeEventListener("click",d.current);for(let v of x)a.removeEventListener(v,g,!0),a.removeEventListener(v,p)}},[a,l,o,r,n,s]),{onPointerDownCapture:Ae(()=>i.current=!0,"onPointerDownCapture")}}Ae(Bu,"usePointerDownOutside");function Nu(e,t=globalThis?.document){let a=ke(e),o=se.useRef(!1);return se.useEffect(()=>{let r=Ae(n=>{n.target&&!o.current&&vs(vh,a,{originalEvent:n},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,a]),{onFocusCapture:Ae(()=>o.current=!0,"onFocusCapture"),onBlurCapture:Ae(()=>o.current=!1,"onBlurCapture")}}Ae(Nu,"useFocusOutside");function hs(){let e=new CustomEvent(gs);document.dispatchEvent(e)}Ae(hs,"dispatchUpdate");function vs(e,t,a,{discrete:o}){let r=a.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&r.addEventListener(e,t,{once:!0}),o?rr(r,n):r.dispatchEvent(n)}Ae(vs,"handleAndDispatchCustomEvent");var ct=U(require("react"),1);var Hu=require("react/jsx-runtime"),Ch=Object.defineProperty,je=(e,t)=>Ch(e,"name",{value:t,configurable:!0}),ws="focusScope.autoFocusOnMount",Cs="focusScope.autoFocusOnUnmount",_u={bubbles:!1,cancelable:!0},uo=ct.forwardRef(je(function(t,a){let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:s,...l}=t,[i,u]=ct.useState(null),c=ke(n),d=ke(s),f=ct.useRef(null),h=Y(a,u),g=ct.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ct.useEffect(()=>{if(r){let v=function(y){if(g.paused||!i)return;let R=y.target;i.contains(R)?f.current=R:_t(f.current,{select:!0})},C=function(y){if(g.paused||!i)return;let R=y.relatedTarget;R!==null&&(i.contains(R)||_t(f.current,{select:!0}))},I=function(y){if(document.activeElement===document.body)for(let P of y)P.removedNodes.length>0&&_t(i)};var m=v,x=C,w=I;je(v,"handleFocusIn"),je(C,"handleFocusOut"),je(I,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",C);let L=new MutationObserver(I);return i&&L.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",C),L.disconnect()}}},[r,i,g.paused]),ct.useEffect(()=>{if(i){Uu.add(g);let m=document.activeElement;if(!i.contains(m)){let w=new CustomEvent(ws,_u);i.addEventListener(ws,c),i.dispatchEvent(w),w.defaultPrevented||(qu(ju(bs(i)),{select:!0}),document.activeElement===m&&_t(i))}return()=>{i.removeEventListener(ws,c),setTimeout(()=>{let w=new CustomEvent(Cs,_u);i.addEventListener(Cs,d),i.dispatchEvent(w),w.defaultPrevented||_t(m??document.body,{select:!0}),i.removeEventListener(Cs,d),Uu.remove(g)},0)}}},[i,c,d,g]);let p=ct.useCallback(m=>{if(!o&&!r||g.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(x&&w){let v=m.currentTarget,[C,I]=zu(v);C&&I?!m.shiftKey&&w===I?(m.preventDefault(),o&&_t(C,{select:!0})):m.shiftKey&&w===C&&(m.preventDefault(),o&&_t(I,{select:!0})):w===v&&m.preventDefault()}},[o,r,g.paused]);return(0,Hu.jsx)(Z.div,{tabIndex:-1,...l,ref:h,onKeyDown:p})},"FocusScope"));function qu(e,{select:t=!1}={}){let a=document.activeElement;for(let o of e)if(_t(o,{select:t}),document.activeElement!==a)return}je(qu,"focusFirst");function zu(e){let t=bs(e),a=Ls(t,e),o=Ls(t.reverse(),e);return[a,o]}je(zu,"getTabbableEdges");function bs(e){let t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:je(o=>{let r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)t.push(a.currentNode);return t}je(bs,"getTabbableCandidates");function Ls(e,t){let a=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(let o of e)if(!(a?!o.checkVisibility({checkVisibilityCSS:!0}):Vu(o,{upTo:t})))return o}je(Ls,"findVisible");function Vu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}je(Vu,"isHidden");function Gu(e){return e instanceof HTMLInputElement&&"select"in e}je(Gu,"isSelectableInput");function _t(e,{select:t=!1}={}){if(e&&e.focus){let a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&Gu(e)&&t&&e.select()}}je(_t,"focus");var Uu=Wu();function Wu(){let e=[];return{add(t){let a=e[0];t!==a&&a?.pause(),e=Is(e,t),e.unshift(t)},remove(t){e=Is(e,t),e[0]?.resume()}}}je(Wu,"createFocusScopesStack");function Is(e,t){let a=[...e],o=a.indexOf(t);return o!==-1&&a.splice(o,1),a}je(Is,"arrayRemove");function ju(e){return e.filter(t=>t.tagName!=="A")}je(ju,"removeLinks");var Yr=U(require("react"),1),Ku=U(require("react-dom"),1);var Xu=require("react/jsx-runtime"),Lh=Object.defineProperty,Ih=(e,t)=>Lh(e,"name",{value:t,configurable:!0}),co=Yr.forwardRef(Ih(function(t,a){let{container:o,...r}=t,[n,s]=Yr.useState(!1);ne(()=>s(!0),[]);let l=o||n&&globalThis?.document?.body;return l?Ku.createPortal((0,Xu.jsx)(Z.div,{...r,ref:a}),l):null},"Portal"));var _e=U(require("react"),1);var $u=U(require("react"),1),bh=Object.defineProperty,Ut=(e,t)=>bh(e,"name",{value:t,configurable:!0});function Yu(e,t){return $u.useReducer((a,o)=>t[a][o]??a,e)}Ut(Yu,"useStateMachine");var Ht=Ut(e=>{let{present:t,children:a}=e,o=Zu(t),r=typeof a=="function"?a({present:o.isPresent}):_e.Children.only(a),n=Ju(o.ref,Qu(r));return typeof a=="function"||o.isPresent?_e.cloneElement(r,{ref:n}):null},"Presence");function Zu(e){let[t,a]=_e.useState(),o=_e.useRef(null),r=_e.useRef(e),n=_e.useRef("none"),s=_e.useRef(void 0),l=e?"mounted":"unmounted",[i,u]=Yu(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _e.useEffect(()=>{i==="mounted"?(n.current=s.current??fo(o.current),s.current=void 0):n.current="none"},[i]),ne(()=>{let c=o.current,d=r.current;if(d!==e){let h=n.current,g=fo(c);e?(s.current=g,u("MOUNT")):g==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),ne(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=Ut(g=>{let m=fo(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!r.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},"handleAnimationEnd"),h=Ut(g=>{g.target===t&&(n.current=fo(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:_e.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,s.current=fo(d)}else o.current=null;a(c)},[])}}Ut(Zu,"usePresence");function ys(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Ut(ys,"setRef");function Ju(...e){let t=_e.useRef(e);return t.current=e,_e.useCallback(a=>{let o=t.current,r=!1,n=o.map(s=>{let l=ys(s,a);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let s=0;s<n.length;s++){let l=n[s];typeof l=="function"?l():ys(o[s],null)}}},[])}Ut(Ju,"useStableComposedRefs");function fo(e){return e?.animationName||"none"}Ut(fo,"getAnimationName");function Qu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}Ut(Qu,"getElementRef");var ed=U(require("react"),1),yh=Object.defineProperty,Rs=(e,t)=>yh(e,"name",{value:t,configurable:!0}),Zr=0,po=null;function Sh(e){return ta(),e.children}Rs(Sh,"FocusGuards");function ta(){ed.useEffect(()=>{po||(po={start:Ss(),end:Ss()});let{start:e,end:t}=po;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Zr++,()=>{Zr===1&&(po?.start.remove(),po?.end.remove(),po=null),Zr=Math.max(0,Zr-1)}},[])}Rs(ta,"useFocusGuards");function Ss(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Rs(Ss,"createFocusGuard");var Xe=function(){return Xe=Object.assign||function(t){for(var a,o=1,r=arguments.length;o<r;o++){a=arguments[o];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Xe.apply(this,arguments)};function Jr(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a}function td(e,t,a){if(a||arguments.length===2)for(var o=0,r=t.length,n;o<r;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var on=U(require("react"));var Ve=U(require("react"));var va="right-scroll-bar-position",wa="width-before-scroll-bar",Ps="with-scroll-bars-hidden",Ds="--removed-body-scroll-bar-size";function Qr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var ad=require("react");function od(e,t){var a=(0,ad.useState)(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(o){var r=a.value;r!==o&&(a.value=o,a.callback(o,r))}}}})[0];return a.callback=t,a.facade}var en=U(require("react"));var Rh=typeof window<"u"?en.useLayoutEffect:en.useEffect,rd=new WeakMap;function Ms(e,t){var a=od(t||null,function(o){return e.forEach(function(r){return Qr(r,o)})});return Rh(function(){var o=rd.get(a);if(o){var r=new Set(o),n=new Set(e),s=a.current;r.forEach(function(l){n.has(l)||Qr(l,null)}),n.forEach(function(l){r.has(l)||Qr(l,s)})}rd.set(a,e)},[e]),a}function Ph(e){return e}function Dh(e,t){t===void 0&&(t=Ph);var a=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(n){var s=t(n,o);return a.push(s),function(){a=a.filter(function(l){return l!==s})}},assignSyncMedium:function(n){for(o=!0;a.length;){var s=a;a=[],s.forEach(n)}a={push:function(l){return n(l)},filter:function(){return a}}},assignMedium:function(n){o=!0;var s=[];if(a.length){var l=a;a=[],l.forEach(n),s=a}var i=function(){var c=s;s=[],c.forEach(n)},u=function(){return Promise.resolve().then(i)};u(),a={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),a}}}};return r}function ks(e){e===void 0&&(e={});var t=Dh(null);return t.options=Xe({async:!0,ssr:!1},e),t}var nd=U(require("react")),sd=function(e){var t=e.sideCar,a=Jr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return nd.createElement(o,Xe({},a))};sd.isSideCarExport=!0;function As(e,t){return e.useMedium(t),sd}var tn=ks();var Ts=function(){},nr=Ve.forwardRef(function(e,t){var a=Ve.useRef(null),o=Ve.useState({onScrollCapture:Ts,onWheelCapture:Ts,onTouchMoveCapture:Ts}),r=o[0],n=o[1],s=e.forwardProps,l=e.children,i=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,g=e.noIsolation,p=e.inert,m=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,v=e.gapMode,C=Jr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=f,L=Ms([a,t]),y=Xe(Xe({},C),r);return Ve.createElement(Ve.Fragment,null,c&&Ve.createElement(I,{sideCar:tn,removeScrollBar:u,shards:d,noRelative:h,noIsolation:g,inert:p,setCallbacks:n,allowPinchZoom:!!m,lockRef:a,gapMode:v}),s?Ve.cloneElement(Ve.Children.only(l),Xe(Xe({},y),{ref:L})):Ve.createElement(w,Xe({},y,{className:i,ref:L}),l))});nr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nr.classNames={fullWidth:wa,zeroRight:va};var fe=U(require("react"));var go=U(require("react"));var ud=U(require("react"));var ld;var id=function(){if(ld)return ld;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=id();return t&&e.setAttribute("nonce",t),e}function kh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ah(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Es=function(){var e=0,t=null;return{add:function(a){e==0&&(t=Mh())&&(kh(t,a),Ah(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Os=function(){var e=Es();return function(t,a){ud.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}};var sr=function(){var e=Os(),t=function(a){var o=a.styles,r=a.dynamic;return e(o,r),null};return t};var Th={left:0,top:0,right:0,gap:0},Fs=function(e){return parseInt(e||"",10)||0},Eh=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Fs(a),Fs(o),Fs(r)]},Bs=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Th;var t=Eh(e),a=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-a+t[2]-t[0])}};var Oh=sr(),mo="data-scroll-locked",Fh=function(e,t,a,o){var r=e.left,n=e.top,s=e.right,l=e.gap;return a===void 0&&(a="margin"),`
|
|
1342
|
-
.`.concat(
|
|
1468
|
+
`},Yp={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:a}=e;return a?"Draggable item "+t.id+" was moved over droppable area "+a.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:a}=e;return a?"Draggable item "+t.id+" was dropped over droppable area "+a.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zp(e){let{announcements:t=Yp,container:a,hiddenTextDescribedById:o,screenReaderInstructions:r=$p}=e,{announce:n,announcement:s}=Ii(),l=ma("DndLiveRegion"),[i,u]=(0,I.useState)(!1);if((0,I.useEffect)(()=>{u(!0)},[]),Kp((0,I.useMemo)(()=>({onDragStart(d){let{active:f}=d;n(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:g}=d;t.onDragMove&&n(t.onDragMove({active:f,over:g}))},onDragOver(d){let{active:f,over:g}=d;n(t.onDragOver({active:f,over:g}))},onDragEnd(d){let{active:f,over:g}=d;n(t.onDragEnd({active:f,over:g}))},onDragCancel(d){let{active:f,over:g}=d;n(t.onDragCancel({active:f,over:g}))}}),[n,t])),!i)return null;let c=I.default.createElement(I.default.Fragment,null,I.default.createElement(bi,{id:o,value:r.draggable}),I.default.createElement(Li,{id:l,announcement:s}));return a?(0,va.createPortal)(c,a):c}var De;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(De||(De={}));function Nr(){}function ro(e,t){return(0,I.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Ur(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,I.useMemo)(()=>[...t].filter(o=>o!=null),[...t])}var gt=Object.freeze({x:0,y:0});function cs(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Jp(e,t){let a=qo(e);if(!a)return"0 0";let o={x:(a.x-t.left)/t.width*100,y:(a.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function fs(e,t){let{data:{value:a}}=e,{data:{value:o}}=t;return a-o}function Qp(e,t){let{data:{value:a}}=e,{data:{value:o}}=t;return o-a}function ns(e){let{left:t,top:a,height:o,width:r}=e;return[{x:t,y:a},{x:t+r,y:a},{x:t,y:a+o},{x:t+r,y:a+o}]}function jo(e,t){if(!e||e.length===0)return null;let[a]=e;return t?a[t]:a}function yi(e,t,a){return t===void 0&&(t=e.left),a===void 0&&(a=e.top),{x:t+e.width*.5,y:a+e.height*.5}}var Ni=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:o}=e,r=yi(t,t.left,t.top),n=[];for(let s of o){let{id:l}=s,i=a.get(l);if(i){let u=cs(yi(i),r);n.push({id:l,data:{droppableContainer:s,value:u}})}}return n.sort(fs)},Hr=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:o}=e,r=ns(t),n=[];for(let s of o){let{id:l}=s,i=a.get(l);if(i){let u=ns(i),c=r.reduce((f,g,h)=>f+cs(u[h],g),0),d=Number((c/4).toFixed(4));n.push({id:l,data:{droppableContainer:s,value:d}})}}return n.sort(fs)};function em(e,t){let a=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),n=Math.min(t.top+t.height,e.top+e.height),s=r-o,l=n-a;if(o<r&&a<n){let i=t.width*t.height,u=e.width*e.height,c=s*l,d=c/(i+u-c);return Number(d.toFixed(4))}return 0}var ps=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:o}=e,r=[];for(let n of o){let{id:s}=n,l=a.get(s);if(l){let i=em(l,t);i>0&&r.push({id:s,data:{droppableContainer:n,value:i}})}}return r.sort(Qp)};function tm(e,t){let{top:a,left:o,bottom:r,right:n}=t;return a<=e.y&&e.y<=r&&o<=e.x&&e.x<=n}var _i=e=>{let{droppableContainers:t,droppableRects:a,pointerCoordinates:o}=e;if(!o)return[];let r=[];for(let n of t){let{id:s}=n,l=a.get(s);if(l&&tm(o,l)){let u=ns(l).reduce((d,f)=>d+cs(o,f),0),c=Number((u/4).toFixed(4));r.push({id:s,data:{droppableContainer:n,value:c}})}}return r.sort(fs)};function am(e,t,a){return{...e,scaleX:t&&a?t.width/a.width:1,scaleY:t&&a?t.height/a.height:1}}function Ui(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:gt}function om(e){return function(a){for(var o=arguments.length,r=new Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return r.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...a})}}var rm=om(1);function Hi(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function nm(e,t,a){let o=Hi(t);if(!o)return e;let{scaleX:r,scaleY:n,x:s,y:l}=o,i=e.left-s-(1-r)*parseFloat(a),u=e.top-l-(1-n)*parseFloat(a.slice(a.indexOf(" ")+1)),c=r?e.width/r:e.width,d=n?e.height/n:e.height;return{width:c,height:d,top:u,right:i+c,bottom:u+d,left:i}}var sm={ignoreTransform:!1};function ba(e,t){t===void 0&&(t=sm);let a=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:u,transformOrigin:c}=ze(e).getComputedStyle(e);u&&(a=nm(a,u,c))}let{top:o,left:r,width:n,height:s,bottom:l,right:i}=a;return{top:o,left:r,width:n,height:s,bottom:l,right:i}}function Si(e){return ba(e,{ignoreTransform:!0})}function lm(e){let t=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:t,bottom:a,width:t,height:a}}function im(e,t){return t===void 0&&(t=ze(e).getComputedStyle(e)),t.position==="fixed"}function um(e,t){t===void 0&&(t=ze(e).getComputedStyle(e));let a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{let n=t[r];return typeof n=="string"?a.test(n):!1})}function Ko(e,t){let a=[];function o(r){if(t!=null&&a.length>=t||!r)return a;if(Fr(r)&&r.scrollingElement!=null&&!a.includes(r.scrollingElement))return a.push(r.scrollingElement),a;if(!eo(r)||ts(r)||a.includes(r))return a;let n=ze(e).getComputedStyle(r);return r!==e&&um(r,n)&&a.push(r),im(r,n)?a:o(r.parentNode)}return e?o(e):a}function qi(e){let[t]=Ko(e,1);return t??null}function as(e){return!No||!e?null:fa(e)?e:Or(e)?Fr(e)||e===pa(e).scrollingElement?window:eo(e)?e:null:null}function zi(e){return fa(e)?e.scrollX:e.scrollLeft}function Vi(e){return fa(e)?e.scrollY:e.scrollTop}function ss(e){return{x:zi(e),y:Vi(e)}}var Me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Me||(Me={}));function Gi(e){return!No||!e?!1:e===document.scrollingElement}function Wi(e){let t={x:0,y:0},a=Gi(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},r=e.scrollTop<=t.y,n=e.scrollLeft<=t.x,s=e.scrollTop>=o.y,l=e.scrollLeft>=o.x;return{isTop:r,isLeft:n,isBottom:s,isRight:l,maxScroll:o,minScroll:t}}var dm={x:.2,y:.2};function cm(e,t,a,o,r){let{top:n,left:s,right:l,bottom:i}=a;o===void 0&&(o=10),r===void 0&&(r=dm);let{isTop:u,isBottom:c,isLeft:d,isRight:f}=Wi(e),g={x:0,y:0},h={x:0,y:0},p={height:t.height*r.y,width:t.width*r.x};return!u&&n<=t.top+p.height?(g.y=Me.Backward,h.y=o*Math.abs((t.top+p.height-n)/p.height)):!c&&i>=t.bottom-p.height&&(g.y=Me.Forward,h.y=o*Math.abs((t.bottom-p.height-i)/p.height)),!f&&l>=t.right-p.width?(g.x=Me.Forward,h.x=o*Math.abs((t.right-p.width-l)/p.width)):!d&&s<=t.left+p.width&&(g.x=Me.Backward,h.x=o*Math.abs((t.left+p.width-s)/p.width)),{direction:g,speed:h}}function fm(e){if(e===document.scrollingElement){let{innerWidth:n,innerHeight:s}=window;return{top:0,left:0,right:n,bottom:s,width:n,height:s}}let{top:t,left:a,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:a,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function ji(e){return e.reduce((t,a)=>ga(t,ss(a)),gt)}function pm(e){return e.reduce((t,a)=>t+zi(a),0)}function mm(e){return e.reduce((t,a)=>t+Vi(a),0)}function Ki(e,t){if(t===void 0&&(t=ba),!e)return;let{top:a,left:o,bottom:r,right:n}=t(e);qi(e)&&(r<=0||n<=0||a>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var gm=[["x",["left","right"],pm],["y",["top","bottom"],mm]],Vo=class{constructor(t,a){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let o=Ko(a),r=ji(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[n,s,l]of gm)for(let i of s)Object.defineProperty(this,i,{get:()=>{let u=l(o),c=r[n]-u;return this.rect[i]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},wa=class{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...a)})},this.target=t}add(t,a,o){var r;(r=this.target)==null||r.addEventListener(t,a,o),this.listeners.push([t,a,o])}};function hm(e){let{EventTarget:t}=ze(e);return e instanceof t?e:pa(e)}function os(e,t){let a=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(a**2+o**2)>t:"x"in t&&"y"in t?a>t.x&&o>t.y:"x"in t?a>t.x:"y"in t?o>t.y:!1}var it;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(it||(it={}));function Ri(e){e.preventDefault()}function xm(e){e.stopPropagation()}var ne;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ne||(ne={}));var Xi={start:[ne.Space,ne.Enter],cancel:[ne.Esc],end:[ne.Space,ne.Enter,ne.Tab]},vm=(e,t)=>{let{currentCoordinates:a}=t;switch(e.code){case ne.Right:return{...a,x:a.x+25};case ne.Left:return{...a,x:a.x-25};case ne.Down:return{...a,y:a.y+25};case ne.Up:return{...a,y:a.y-25}}},ea=class{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:a}}=t;this.props=t,this.listeners=new wa(pa(a)),this.windowListeners=new wa(ze(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(it.Resize,this.handleCancel),this.windowListeners.add(it.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(it.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:a}=this.props,o=t.node.current;o&&Ki(o),a(gt)}handleKeyDown(t){if(oo(t)){let{active:a,context:o,options:r}=this.props,{keyboardCodes:n=Xi,coordinateGetter:s=vm,scrollBehavior:l="smooth"}=r,{code:i}=t;if(n.end.includes(i)){this.handleEnd(t);return}if(n.cancel.includes(i)){this.handleCancel(t);return}let{collisionRect:u}=o.current,c=u?{x:u.left,y:u.top}:gt;this.referenceCoordinates||(this.referenceCoordinates=c);let d=s(t,{active:a,context:o.current,currentCoordinates:c});if(d){let f=ha(d,c),g={x:0,y:0},{scrollableAncestors:h}=o.current;for(let p of h){let m=t.code,{isTop:x,isRight:w,isLeft:v,isBottom:C,maxScroll:b,minScroll:L}=Wi(p),y=fm(p),S={x:Math.min(m===ne.Right?y.right-y.width/2:y.right,Math.max(m===ne.Right?y.left:y.left+y.width/2,d.x)),y:Math.min(m===ne.Down?y.bottom-y.height/2:y.bottom,Math.max(m===ne.Down?y.top:y.top+y.height/2,d.y))},P=m===ne.Right&&!w||m===ne.Left&&!v,E=m===ne.Down&&!C||m===ne.Up&&!x;if(P&&S.x!==d.x){let M=p.scrollLeft+f.x,D=m===ne.Right&&M<=b.x||m===ne.Left&&M>=L.x;if(D&&!f.y){p.scrollTo({left:M,behavior:l});return}D?g.x=p.scrollLeft-M:g.x=m===ne.Right?p.scrollLeft-b.x:p.scrollLeft-L.x,g.x&&p.scrollBy({left:-g.x,behavior:l});break}else if(E&&S.y!==d.y){let M=p.scrollTop+f.y,D=m===ne.Down&&M<=b.y||m===ne.Up&&M>=L.y;if(D&&!f.x){p.scrollTo({top:M,behavior:l});return}D?g.y=p.scrollTop-M:g.y=m===ne.Down?p.scrollTop-b.y:p.scrollTop-L.y,g.y&&p.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(t,ga(ha(d,this.referenceCoordinates),g))}}}handleMove(t,a){let{onMove:o}=this.props;t.preventDefault(),o(a)}handleEnd(t){let{onEnd:a}=this.props;t.preventDefault(),this.detach(),a()}handleCancel(t){let{onCancel:a}=this.props;t.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};ea.activators=[{eventName:"onKeyDown",handler:(e,t,a)=>{let{keyboardCodes:o=Xi,onActivation:r}=t,{active:n}=a,{code:s}=e.nativeEvent;if(o.start.includes(s)){let l=n.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r?.({event:e.nativeEvent}),!0)}return!1}}];function Pi(e){return!!(e&&"distance"in e)}function Di(e){return!!(e&&"delay"in e)}var Go=class{constructor(t,a,o){var r;o===void 0&&(o=hm(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=a;let{event:n}=t,{target:s}=n;this.props=t,this.events=a,this.document=pa(s),this.documentListeners=new wa(this.document),this.listeners=new wa(o),this.windowListeners=new wa(ze(s)),this.initialCoordinates=(r=qo(n))!=null?r:gt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:a,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(it.Resize,this.handleCancel),this.windowListeners.add(it.DragStart,Ri),this.windowListeners.add(it.VisibilityChange,this.handleCancel),this.windowListeners.add(it.ContextMenu,Ri),this.documentListeners.add(it.Keydown,this.handleKeydown),a){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Di(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(Pi(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,a){let{active:o,onPending:r}=this.props;r(o,t,this.initialCoordinates,a)}handleStart(){let{initialCoordinates:t}=this,{onStart:a}=this.props;t&&(this.activated=!0,this.documentListeners.add(it.Click,xm,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(it.SelectionChange,this.removeTextSelection),a(t))}handleMove(t){var a;let{activated:o,initialCoordinates:r,props:n}=this,{onMove:s,options:{activationConstraint:l}}=n;if(!r)return;let i=(a=qo(t))!=null?a:gt,u=ha(r,i);if(!o&&l){if(Pi(l)){if(l.tolerance!=null&&os(u,l.tolerance))return this.handleCancel();if(os(u,l.distance))return this.handleStart()}if(Di(l)&&os(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),s(i)}handleEnd(){let{onAbort:t,onEnd:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleCancel(){let{onAbort:t,onCancel:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleKeydown(t){t.code===ne.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}},wm={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},ta=class extends Go{constructor(t){let{event:a}=t,o=pa(a.target);super(t,wm,o)}};ta.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:o}=t;return!a.isPrimary||a.button!==0?!1:(o?.({event:a}),!0)}}];var Cm={move:{name:"mousemove"},end:{name:"mouseup"}},ls;(function(e){e[e.RightClick=2]="RightClick"})(ls||(ls={}));var is=class extends Go{constructor(t){super(t,Cm,pa(t.event.target))}};is.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:o}=t;return a.button===ls.RightClick?!1:(o?.({event:a}),!0)}}];var rs={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},us=class extends Go{constructor(t){super(t,rs)}static setup(){return window.addEventListener(rs.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(rs.move.name,t)};function t(){}}};us.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:o}=t,{touches:r}=a;return r.length>1?!1:(o?.({event:a}),!0)}}];var zo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(zo||(zo={}));var _r;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_r||(_r={}));function bm(e){let{acceleration:t,activator:a=zo.Pointer,canScroll:o,draggingRect:r,enabled:n,interval:s=5,order:l=_r.TreeOrder,pointerCoordinates:i,scrollableAncestors:u,scrollableAncestorRects:c,delta:d,threshold:f}=e,g=Im({delta:d,disabled:!n}),[h,p]=vi(),m=(0,I.useRef)({x:0,y:0}),x=(0,I.useRef)({x:0,y:0}),w=(0,I.useMemo)(()=>{switch(a){case zo.Pointer:return i?{top:i.y,bottom:i.y,left:i.x,right:i.x}:null;case zo.DraggableRect:return r}},[a,r,i]),v=(0,I.useRef)(null),C=(0,I.useCallback)(()=>{let L=v.current;if(!L)return;let y=m.current.x*x.current.x,S=m.current.y*x.current.y;L.scrollBy(y,S)},[]),b=(0,I.useMemo)(()=>l===_r.TreeOrder?[...u].reverse():u,[l,u]);(0,I.useEffect)(()=>{if(!n||!u.length||!w){p();return}for(let L of b){if(o?.(L)===!1)continue;let y=u.indexOf(L),S=c[y];if(!S)continue;let{direction:P,speed:E}=cm(L,S,w,t,f);for(let M of["x","y"])g[M][P[M]]||(E[M]=0,P[M]=0);if(E.x>0||E.y>0){p(),v.current=L,h(C,s),m.current=E,x.current=P;return}}m.current={x:0,y:0},x.current={x:0,y:0},p()},[t,C,o,p,n,s,JSON.stringify(w),JSON.stringify(g),h,u,b,c,JSON.stringify(f)])}var Lm={x:{[Me.Backward]:!1,[Me.Forward]:!1},y:{[Me.Backward]:!1,[Me.Forward]:!1}};function Im(e){let{delta:t,disabled:a}=e,o=Ho(t);return ao(r=>{if(a||!o||!r)return Lm;let n={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Me.Backward]:r.x[Me.Backward]||n.x===-1,[Me.Forward]:r.x[Me.Forward]||n.x===1},y:{[Me.Backward]:r.y[Me.Backward]||n.y===-1,[Me.Forward]:r.y[Me.Forward]||n.y===1}}},[a,t,o])}function ym(e,t){let a=t!=null?e.get(t):void 0,o=a?a.node.current:null;return ao(r=>{var n;return t==null?null:(n=o??r)!=null?n:null},[o,t])}function Sm(e,t){return(0,I.useMemo)(()=>e.reduce((a,o)=>{let{sensor:r}=o,n=r.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,o)}));return[...a,...n]},[]),[e,t])}var Wo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Wo||(Wo={}));var ds;(function(e){e.Optimized="optimized"})(ds||(ds={}));var ki=new Map;function Rm(e,t){let{dragging:a,dependencies:o,config:r}=t,[n,s]=(0,I.useState)(null),{frequency:l,measure:i,strategy:u}=r,c=(0,I.useRef)(e),d=m(),f=to(d),g=(0,I.useCallback)(function(x){x===void 0&&(x=[]),!f.current&&s(w=>w===null?x:w.concat(x.filter(v=>!w.includes(v))))},[f]),h=(0,I.useRef)(null),p=ao(x=>{if(d&&!a)return ki;if(!x||x===ki||c.current!==e||n!=null){let w=new Map;for(let v of e){if(!v)continue;if(n&&n.length>0&&!n.includes(v.id)&&v.rect.current){w.set(v.id,v.rect.current);continue}let C=v.node.current,b=C?new Vo(i(C),C):null;v.rect.current=b,b&&w.set(v.id,b)}return w}return x},[e,n,a,d,i]);return(0,I.useEffect)(()=>{c.current=e},[e]),(0,I.useEffect)(()=>{d||g()},[a,d]),(0,I.useEffect)(()=>{n&&n.length>0&&s(null)},[JSON.stringify(n)]),(0,I.useEffect)(()=>{d||typeof l!="number"||h.current!==null||(h.current=setTimeout(()=>{g(),h.current=null},l))},[l,d,g,...o]),{droppableRects:p,measureDroppableContainers:g,measuringScheduled:n!=null};function m(){switch(u){case Wo.Always:return!1;case Wo.BeforeDragging:return a;default:return!a}}}function ms(e,t){return ao(a=>e?a||(typeof t=="function"?t(e):e):null,[t,e])}function Pm(e,t){return ms(e,t)}function Dm(e){let{callback:t,disabled:a}=e,o=_o(t),r=(0,I.useMemo)(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:n}=window;return new n(o)},[o,a]);return(0,I.useEffect)(()=>()=>r?.disconnect(),[r]),r}function qr(e){let{callback:t,disabled:a}=e,o=_o(t),r=(0,I.useMemo)(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:n}=window;return new n(o)},[a]);return(0,I.useEffect)(()=>()=>r?.disconnect(),[r]),r}function km(e){return new Vo(ba(e),e)}function Mi(e,t,a){t===void 0&&(t=km);let[o,r]=(0,I.useState)(null);function n(){r(i=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=i??a)!=null?u:null}let c=t(e);return JSON.stringify(i)===JSON.stringify(c)?i:c})}let s=Dm({callback(i){if(e)for(let u of i){let{type:c,target:d}=u;if(c==="childList"&&d instanceof HTMLElement&&d.contains(e)){n();break}}}}),l=qr({callback:n});return at(()=>{n(),e?(l?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),s?.disconnect())},[e]),o}function Mm(e){let t=ms(e);return Ui(e,t)}var Ai=[];function Am(e){let t=(0,I.useRef)(e),a=ao(o=>e?o&&o!==Ai&&e&&t.current&&e.parentNode===t.current.parentNode?o:Ko(e):Ai,[e]);return(0,I.useEffect)(()=>{t.current=e},[e]),a}function Tm(e){let[t,a]=(0,I.useState)(null),o=(0,I.useRef)(e),r=(0,I.useCallback)(n=>{let s=as(n.target);s&&a(l=>l?(l.set(s,ss(s)),new Map(l)):null)},[]);return(0,I.useEffect)(()=>{let n=o.current;if(e!==n){s(n);let l=e.map(i=>{let u=as(i);return u?(u.addEventListener("scroll",r,{passive:!0}),[u,ss(u)]):null}).filter(i=>i!=null);a(l.length?new Map(l):null),o.current=e}return()=>{s(e),s(n)};function s(l){l.forEach(i=>{let u=as(i);u?.removeEventListener("scroll",r)})}},[r,e]),(0,I.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((n,s)=>ga(n,s),gt):ji(e):gt,[e,t])}function Ti(e,t){t===void 0&&(t=[]);let a=(0,I.useRef)(null);return(0,I.useEffect)(()=>{a.current=null},t),(0,I.useEffect)(()=>{let o=e!==gt;o&&!a.current&&(a.current=e),!o&&a.current&&(a.current=null)},[e]),a.current?ha(e,a.current):gt}function Em(e){(0,I.useEffect)(()=>{if(!No)return;let t=e.map(a=>{let{sensor:o}=a;return o.setup==null?void 0:o.setup()});return()=>{for(let a of t)a?.()}},e.map(t=>{let{sensor:a}=t;return a}))}function Om(e,t){return(0,I.useMemo)(()=>e.reduce((a,o)=>{let{eventName:r,handler:n}=o;return a[r]=s=>{n(s,t)},a},{}),[e,t])}function $i(e){return(0,I.useMemo)(()=>e?lm(e):null,[e])}var Ei=[];function Fm(e,t){t===void 0&&(t=ba);let[a]=e,o=$i(a?ze(a):null),[r,n]=(0,I.useState)(Ei);function s(){n(()=>e.length?e.map(i=>Gi(i)?o:new Vo(t(i),i)):Ei)}let l=qr({callback:s});return at(()=>{l?.disconnect(),s(),e.forEach(i=>l?.observe(i))},[e]),r}function Yi(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return eo(t)?t:e}function Bm(e){let{measure:t}=e,[a,o]=(0,I.useState)(null),r=(0,I.useCallback)(u=>{for(let{target:c}of u)if(eo(c)){o(d=>{let f=t(c);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),n=qr({callback:r}),s=(0,I.useCallback)(u=>{let c=Yi(u);n?.disconnect(),c&&n?.observe(c),o(c?t(c):null)},[t,n]),[l,i]=Uo(s);return(0,I.useMemo)(()=>({nodeRef:l,rect:a,setRef:i}),[a,l,i])}var Nm=[{sensor:ta,options:{}},{sensor:ea,options:{}}],_m={current:{}},Br={draggable:{measure:Si},droppable:{measure:Si,strategy:Wo.WhileDragging,frequency:ds.Optimized},dragOverlay:{measure:ba}},Ca=class extends Map{get(t){var a;return t!=null&&(a=super.get(t))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:a}=t;return!a})}getNodeFor(t){var a,o;return(a=(o=this.get(t))==null?void 0:o.node.current)!=null?a:void 0}},Um={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ca,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Br,measureDroppableContainers:Nr,windowRect:null,measuringScheduled:!1},Zi={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nr,draggableNodes:new Map,over:null,measureDroppableContainers:Nr},Xo=(0,I.createContext)(Zi),Ji=(0,I.createContext)(Um);function Hm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ca}}}function qm(e,t){switch(t.type){case De.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case De.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case De.DragEnd:case De.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case De.RegisterDroppable:{let{element:a}=t,{id:o}=a,r=new Ca(e.droppable.containers);return r.set(o,a),{...e,droppable:{...e.droppable,containers:r}}}case De.SetDroppableDisabled:{let{id:a,key:o,disabled:r}=t,n=e.droppable.containers.get(a);if(!n||o!==n.key)return e;let s=new Ca(e.droppable.containers);return s.set(a,{...n,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case De.UnregisterDroppable:{let{id:a,key:o}=t,r=e.droppable.containers.get(a);if(!r||o!==r.key)return e;let n=new Ca(e.droppable.containers);return n.delete(a),{...e,droppable:{...e.droppable,containers:n}}}default:return e}}function zm(e){let{disabled:t}=e,{active:a,activatorEvent:o,draggableNodes:r}=(0,I.useContext)(Xo),n=Ho(o),s=Ho(a?.id);return(0,I.useEffect)(()=>{if(!t&&!o&&n&&s!=null){if(!oo(n)||document.activeElement===n.target)return;let l=r.get(s);if(!l)return;let{activatorNode:i,node:u}=l;if(!i.current&&!u.current)return;requestAnimationFrame(()=>{for(let c of[i.current,u.current]){if(!c)continue;let d=Ci(c);if(d){d.focus();break}}})}},[o,t,r,s,n]),null}function Qi(e,t){let{transform:a,...o}=t;return e!=null&&e.length?e.reduce((r,n)=>n({transform:r,...o}),a):a}function Vm(e){return(0,I.useMemo)(()=>({draggable:{...Br.draggable,...e?.draggable},droppable:{...Br.droppable,...e?.droppable},dragOverlay:{...Br.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Gm(e){let{activeNode:t,measure:a,initialRect:o,config:r=!0}=e,n=(0,I.useRef)(!1),{x:s,y:l}=typeof r=="boolean"?{x:r,y:r}:r;at(()=>{if(!s&&!l||!t){n.current=!1;return}if(n.current||!o)return;let u=t?.node.current;if(!u||u.isConnected===!1)return;let c=a(u),d=Ui(c,o);if(s||(d.x=0),l||(d.y=0),n.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){let f=qi(u);f&&f.scrollBy({top:d.y,left:d.x})}},[t,s,l,o,a])}var zr=(0,I.createContext)({...gt,scaleX:1,scaleY:1}),Qt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Qt||(Qt={}));var Vr=(0,I.memo)(function(t){var a,o,r,n;let{id:s,accessibility:l,autoScroll:i=!0,children:u,sensors:c=Nm,collisionDetection:d=ps,measuring:f,modifiers:g,...h}=t,p=(0,I.useReducer)(qm,void 0,Hm),[m,x]=p,[w,v]=Xp(),[C,b]=(0,I.useState)(Qt.Uninitialized),L=C===Qt.Initialized,{draggable:{active:y,nodes:S,translate:P},droppable:{containers:E}}=m,M=y!=null?S.get(y):null,D=(0,I.useRef)({initial:null,translated:null}),F=(0,I.useMemo)(()=>{var He;return y!=null?{id:y,data:(He=M?.data)!=null?He:_m,rect:D}:null},[y,M]),U=(0,I.useRef)(null),[Z,W]=(0,I.useState)(null),[O,B]=(0,I.useState)(null),H=to(h,Object.values(h)),T=ma("DndDescribedBy",s),le=(0,I.useMemo)(()=>E.getEnabled(),[E]),Q=Vm(f),{droppableRects:ie,measureDroppableContainers:ve,measuringScheduled:R}=Rm(le,{dragging:L,dependencies:[P.x,P.y],config:Q.droppable}),N=ym(S,y),G=(0,I.useMemo)(()=>O?qo(O):null,[O]),k=Fp(),X=Pm(N,Q.draggable.measure);Gm({activeNode:y!=null?S.get(y):null,config:k.layoutShiftCompensation,initialRect:X,measure:Q.draggable.measure});let _=Mi(N,Q.draggable.measure,X),$=Mi(N?N.parentElement:null),Y=(0,I.useRef)({activatorEvent:null,active:null,activeNode:N,collisionRect:null,collisions:null,droppableRects:ie,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=E.getNodeFor((a=Y.current.over)==null?void 0:a.id),we=Bm({measure:Q.dragOverlay.measure}),Pe=(o=we.nodeRef.current)!=null?o:N,St=L?(r=we.rect)!=null?r:_:null,$a=!!(we.nodeRef.current&&we.rect),Ya=Mm($a?null:_),Yn=$i(Pe?ze(Pe):null),Xt=Am(L?oe??N:null),Ar=Fm(Xt),Tr=Qi(g,{transform:{x:P.x-Ya.x,y:P.y-Ya.y,scaleX:1,scaleY:1},activatorEvent:O,active:F,activeNodeRect:_,containerNodeRect:$,draggingNodeRect:St,over:Y.current.over,overlayNodeRect:we.rect,scrollableAncestors:Xt,scrollableAncestorRects:Ar,windowRect:Yn}),ni=G?ga(G,P):null,si=Tm(Xt),Dp=Ti(si),kp=Ti(si,[_]),Za=ga(Tr,Dp),Ja=St?rm(St,Tr):null,Eo=F&&Ja?d({active:F,collisionRect:Ja,droppableRects:ie,droppableContainers:le,pointerCoordinates:ni}):null,li=jo(Eo,"id"),[$t,ii]=(0,I.useState)(null),Mp=$a?Tr:ga(Tr,kp),Ap=am(Mp,(n=$t?.rect)!=null?n:null,_),Zn=(0,I.useRef)(null),ui=(0,I.useCallback)((He,Je)=>{let{sensor:Qe,options:Yt}=Je;if(U.current==null)return;let lt=S.get(U.current);if(!lt)return;let et=He.nativeEvent,Rt=new Qe({active:U.current,activeNode:lt,event:et,options:Yt,context:Y,onAbort(Be){if(!S.get(Be))return;let{onDragAbort:Pt}=H.current,Bt={id:Be};Pt?.(Bt),w({type:"onDragAbort",event:Bt})},onPending(Be,Zt,Pt,Bt){if(!S.get(Be))return;let{onDragPending:Fo}=H.current,Jt={id:Be,constraint:Zt,initialCoordinates:Pt,offset:Bt};Fo?.(Jt),w({type:"onDragPending",event:Jt})},onStart(Be){let Zt=U.current;if(Zt==null)return;let Pt=S.get(Zt);if(!Pt)return;let{onDragStart:Bt}=H.current,Oo={activatorEvent:et,active:{id:Zt,data:Pt.data,rect:D}};(0,va.unstable_batchedUpdates)(()=>{Bt?.(Oo),b(Qt.Initializing),x({type:De.DragStart,initialCoordinates:Be,active:Zt}),w({type:"onDragStart",event:Oo}),W(Zn.current),B(et)})},onMove(Be){x({type:De.DragMove,coordinates:Be})},onEnd:Qa(De.DragEnd),onCancel:Qa(De.DragCancel)});Zn.current=Rt;function Qa(Be){return async function(){let{active:Pt,collisions:Bt,over:Oo,scrollAdjustedTranslate:Fo}=Y.current,Jt=null;if(Pt&&Fo){let{cancelDrop:Bo}=H.current;Jt={activatorEvent:et,active:Pt,collisions:Bt,delta:Fo,over:Oo},Be===De.DragEnd&&typeof Bo=="function"&&await Promise.resolve(Bo(Jt))&&(Be=De.DragCancel)}U.current=null,(0,va.unstable_batchedUpdates)(()=>{x({type:Be}),b(Qt.Uninitialized),ii(null),W(null),B(null),Zn.current=null;let Bo=Be===De.DragEnd?"onDragEnd":"onDragCancel";if(Jt){let Jn=H.current[Bo];Jn?.(Jt),w({type:Bo,event:Jt})}})}}},[S]),Tp=(0,I.useCallback)((He,Je)=>(Qe,Yt)=>{let lt=Qe.nativeEvent,et=S.get(Yt);if(U.current!==null||!et||lt.dndKit||lt.defaultPrevented)return;let Rt={active:et};He(Qe,Je.options,Rt)===!0&&(lt.dndKit={capturedBy:Je.sensor},U.current=Yt,ui(Qe,Je))},[S,ui]),di=Sm(c,Tp);Em(c),at(()=>{_&&C===Qt.Initializing&&b(Qt.Initialized)},[_,C]),(0,I.useEffect)(()=>{let{onDragMove:He}=H.current,{active:Je,activatorEvent:Qe,collisions:Yt,over:lt}=Y.current;if(!Je||!Qe)return;let et={active:Je,activatorEvent:Qe,collisions:Yt,delta:{x:Za.x,y:Za.y},over:lt};(0,va.unstable_batchedUpdates)(()=>{He?.(et),w({type:"onDragMove",event:et})})},[Za.x,Za.y]),(0,I.useEffect)(()=>{let{active:He,activatorEvent:Je,collisions:Qe,droppableContainers:Yt,scrollAdjustedTranslate:lt}=Y.current;if(!He||U.current==null||!Je||!lt)return;let{onDragOver:et}=H.current,Rt=Yt.get(li),Qa=Rt&&Rt.rect.current?{id:Rt.id,rect:Rt.rect.current,data:Rt.data,disabled:Rt.disabled}:null,Be={active:He,activatorEvent:Je,collisions:Qe,delta:{x:lt.x,y:lt.y},over:Qa};(0,va.unstable_batchedUpdates)(()=>{ii(Qa),et?.(Be),w({type:"onDragOver",event:Be})})},[li]),at(()=>{Y.current={activatorEvent:O,active:F,activeNode:N,collisionRect:Ja,collisions:Eo,droppableRects:ie,draggableNodes:S,draggingNode:Pe,draggingNodeRect:St,droppableContainers:E,over:$t,scrollableAncestors:Xt,scrollAdjustedTranslate:Za},D.current={initial:St,translated:Ja}},[F,N,Eo,Ja,S,Pe,St,ie,E,$t,Xt,Za]),bm({...k,delta:P,draggingRect:Ja,pointerCoordinates:ni,scrollableAncestors:Xt,scrollableAncestorRects:Ar});let Ep=(0,I.useMemo)(()=>({active:F,activeNode:N,activeNodeRect:_,activatorEvent:O,collisions:Eo,containerNodeRect:$,dragOverlay:we,draggableNodes:S,droppableContainers:E,droppableRects:ie,over:$t,measureDroppableContainers:ve,scrollableAncestors:Xt,scrollableAncestorRects:Ar,measuringConfiguration:Q,measuringScheduled:R,windowRect:Yn}),[F,N,_,O,Eo,$,we,S,E,ie,$t,ve,Xt,Ar,Q,R,Yn]),Op=(0,I.useMemo)(()=>({activatorEvent:O,activators:di,active:F,activeNodeRect:_,ariaDescribedById:{draggable:T},dispatch:x,draggableNodes:S,over:$t,measureDroppableContainers:ve}),[O,di,F,_,x,T,S,$t,ve]);return I.default.createElement(Bi.Provider,{value:v},I.default.createElement(Xo.Provider,{value:Op},I.default.createElement(Ji.Provider,{value:Ep},I.default.createElement(zr.Provider,{value:Ap},u)),I.default.createElement(zm,{disabled:l?.restoreFocus===!1})),I.default.createElement(Zp,{...l,hiddenTextDescribedById:T}));function Fp(){let He=Z?.autoScrollEnabled===!1,Je=typeof i=="object"?i.enabled===!1:i===!1,Qe=L&&!He&&!Je;return typeof i=="object"?{...i,enabled:Qe}:{enabled:Qe}}}),Wm=(0,I.createContext)(null),Oi="button",jm="Draggable";function eu(e){let{id:t,data:a,disabled:o=!1,attributes:r}=e,n=ma(jm),{activators:s,activatorEvent:l,active:i,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=(0,I.useContext)(Xo),{role:g=Oi,roleDescription:h="draggable",tabIndex:p=0}=r??{},m=i?.id===t,x=(0,I.useContext)(m?zr:Wm),[w,v]=Uo(),[C,b]=Uo(),L=Om(s,t),y=to(a);at(()=>(d.set(t,{id:t,key:n,node:w,activatorNode:C,data:y}),()=>{let P=d.get(t);P&&P.key===n&&d.delete(t)}),[d,t]);let S=(0,I.useMemo)(()=>({role:g,tabIndex:p,"aria-disabled":o,"aria-pressed":m&&g===Oi?!0:void 0,"aria-roledescription":h,"aria-describedby":c.draggable}),[o,g,p,m,h,c.draggable]);return{active:i,activatorEvent:l,activeNodeRect:u,attributes:S,isDragging:m,listeners:o?void 0:L,node:w,over:f,setNodeRef:v,setActivatorNodeRef:b,transform:x}}function gs(){return(0,I.useContext)(Ji)}var Km="Droppable",Xm={timeout:25};function Gr(e){let{data:t,disabled:a=!1,id:o,resizeObserverConfig:r}=e,n=ma(Km),{active:s,dispatch:l,over:i,measureDroppableContainers:u}=(0,I.useContext)(Xo),c=(0,I.useRef)({disabled:a}),d=(0,I.useRef)(!1),f=(0,I.useRef)(null),g=(0,I.useRef)(null),{disabled:h,updateMeasurementsFor:p,timeout:m}={...Xm,...r},x=to(p??o),w=(0,I.useCallback)(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),g.current=null},m)},[m]),v=qr({callback:w,disabled:h||!s}),C=(0,I.useCallback)((S,P)=>{v&&(P&&(v.unobserve(P),d.current=!1),S&&v.observe(S))},[v]),[b,L]=Uo(C),y=to(t);return(0,I.useEffect)(()=>{!v||!b.current||(v.disconnect(),d.current=!1,v.observe(b.current))},[b,v]),(0,I.useEffect)(()=>(l({type:De.RegisterDroppable,element:{id:o,key:n,disabled:a,node:b,rect:f,data:y}}),()=>l({type:De.UnregisterDroppable,key:n,id:o})),[o]),(0,I.useEffect)(()=>{a!==c.current.disabled&&(l({type:De.SetDroppableDisabled,id:o,key:n,disabled:a}),c.current.disabled=a)},[o,n,a,l]),{active:s,rect:f,isOver:i?.id===o,node:b,over:i,setNodeRef:L}}function $m(e){let{animation:t,children:a}=e,[o,r]=(0,I.useState)(null),[n,s]=(0,I.useState)(null),l=Ho(a);return!a&&!o&&l&&r(l),at(()=>{if(!n)return;let i=o?.key,u=o?.props.id;if(i==null||u==null){r(null);return}Promise.resolve(t(u,n)).then(()=>{r(null)})},[t,o,n]),I.default.createElement(I.default.Fragment,null,a,o?(0,I.cloneElement)(o,{ref:s}):null)}var Ym={x:0,y:0,scaleX:1,scaleY:1};function Zm(e){let{children:t}=e;return I.default.createElement(Xo.Provider,{value:Zi},I.default.createElement(zr.Provider,{value:Ym},t))}var Jm={position:"fixed",touchAction:"none"},Qm=e=>oo(e)?"transform 250ms ease":void 0,eg=(0,I.forwardRef)((e,t)=>{let{as:a,activatorEvent:o,adjustScale:r,children:n,className:s,rect:l,style:i,transform:u,transition:c=Qm}=e;if(!l)return null;let d=r?u:{...u,scaleX:1,scaleY:1},f={...Jm,width:l.width,height:l.height,top:l.top,left:l.left,transform:tt.Transform.toString(d),transformOrigin:r&&o?Jp(o,l):void 0,transition:typeof c=="function"?c(o):c,...i};return I.default.createElement(a,{className:s,style:f,ref:t},n)}),tg=e=>t=>{let{active:a,dragOverlay:o}=t,r={},{styles:n,className:s}=e;if(n!=null&&n.active)for(let[l,i]of Object.entries(n.active))i!==void 0&&(r[l]=a.node.style.getPropertyValue(l),a.node.style.setProperty(l,i));if(n!=null&&n.dragOverlay)for(let[l,i]of Object.entries(n.dragOverlay))i!==void 0&&o.node.style.setProperty(l,i);return s!=null&&s.active&&a.node.classList.add(s.active),s!=null&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(let[i,u]of Object.entries(r))a.node.style.setProperty(i,u);s!=null&&s.active&&a.node.classList.remove(s.active)}},ag=e=>{let{transform:{initial:t,final:a}}=e;return[{transform:tt.Transform.toString(t)},{transform:tt.Transform.toString(a)}]},og={duration:250,easing:"ease",keyframes:ag,sideEffects:tg({styles:{active:{opacity:"0"}}})};function rg(e){let{config:t,draggableNodes:a,droppableContainers:o,measuringConfiguration:r}=e;return _o((n,s)=>{if(t===null)return;let l=a.get(n);if(!l)return;let i=l.node.current;if(!i)return;let u=Yi(s);if(!u)return;let{transform:c}=ze(s).getComputedStyle(s),d=Hi(c);if(!d)return;let f=typeof t=="function"?t:ng(t);return Ki(i,r.draggable.measure),f({active:{id:n,data:l.data,node:i,rect:r.draggable.measure(i)},draggableNodes:a,dragOverlay:{node:s,rect:r.dragOverlay.measure(u)},droppableContainers:o,measuringConfiguration:r,transform:d})})}function ng(e){let{duration:t,easing:a,sideEffects:o,keyframes:r}={...og,...e};return n=>{let{active:s,dragOverlay:l,transform:i,...u}=n;if(!t)return;let c={x:l.rect.left-s.rect.left,y:l.rect.top-s.rect.top},d={scaleX:i.scaleX!==1?s.rect.width*i.scaleX/l.rect.width:1,scaleY:i.scaleY!==1?s.rect.height*i.scaleY/l.rect.height:1},f={x:i.x-c.x,y:i.y-c.y,...d},g=r({...u,active:s,dragOverlay:l,transform:{initial:i,final:f}}),[h]=g,p=g[g.length-1];if(JSON.stringify(h)===JSON.stringify(p))return;let m=o?.({active:s,dragOverlay:l,...u}),x=l.node.animate(g,{duration:t,easing:a,fill:"forwards"});return new Promise(w=>{x.onfinish=()=>{m?.(),w()}})}}var Fi=0;function sg(e){return(0,I.useMemo)(()=>{if(e!=null)return Fi++,Fi},[e])}var tu=I.default.memo(e=>{let{adjustScale:t=!1,children:a,dropAnimation:o,style:r,transition:n,modifiers:s,wrapperElement:l="div",className:i,zIndex:u=999}=e,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:g,draggableNodes:h,droppableContainers:p,dragOverlay:m,over:x,measuringConfiguration:w,scrollableAncestors:v,scrollableAncestorRects:C,windowRect:b}=gs(),L=(0,I.useContext)(zr),y=sg(d?.id),S=Qi(s,{activatorEvent:c,active:d,activeNodeRect:f,containerNodeRect:g,draggingNodeRect:m.rect,over:x,overlayNodeRect:m.rect,scrollableAncestors:v,scrollableAncestorRects:C,transform:L,windowRect:b}),P=ms(f),E=rg({config:o,draggableNodes:h,droppableContainers:p,measuringConfiguration:w}),M=P?m.setRef:void 0;return I.default.createElement(Zm,null,I.default.createElement($m,{animation:E},d&&y?I.default.createElement(eg,{key:y,id:d.id,ref:M,as:l,activatorEvent:c,adjustScale:t,className:i,transition:n,rect:P,style:{zIndex:u,...r},transform:S},a):null))});var Le=q(require("react"));function au(e,t,a){let o=e.slice();return o.splice(a<0?o.length+a:a,0,o.splice(t,1)[0]),o}function lg(e,t){return e.reduce((a,o,r)=>{let n=t.get(o);return n&&(a[r]=n),a},Array(e.length))}function Wr(e){return e!==null&&e>=0}function ig(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function ug(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var ou=e=>{let{rects:t,activeIndex:a,overIndex:o,index:r}=e,n=au(t,o,a),s=t[r],l=n[r];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}};var jr={scaleX:1,scaleY:1},Xr=e=>{var t;let{activeIndex:a,activeNodeRect:o,index:r,rects:n,overIndex:s}=e,l=(t=n[a])!=null?t:o;if(!l)return null;if(r===a){let u=n[s];return u?{x:0,y:a<s?u.top+u.height-(l.top+l.height):u.top-l.top,...jr}:null}let i=dg(n,r,a);return r>a&&r<=s?{x:0,y:-l.height-i,...jr}:r<a&&r>=s?{x:0,y:l.height+i,...jr}:{x:0,y:0,...jr}};function dg(e,t,a){let o=e[t],r=e[t-1],n=e[t+1];return o?a<t?r?o.top-(r.top+r.height):n?n.top-(o.top+o.height):0:n?n.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}var ru="Sortable",nu=Le.default.createContext({activeIndex:-1,containerId:ru,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ou,disabled:{draggable:!1,droppable:!1}});function $r(e){let{children:t,id:a,items:o,strategy:r=ou,disabled:n=!1}=e,{active:s,dragOverlay:l,droppableRects:i,over:u,measureDroppableContainers:c}=gs(),d=ma(ru,a),f=l.rect!==null,g=(0,Le.useMemo)(()=>o.map(L=>typeof L=="object"&&"id"in L?L.id:L),[o]),h=s!=null,p=s?g.indexOf(s.id):-1,m=u?g.indexOf(u.id):-1,x=(0,Le.useRef)(g),w=!ig(g,x.current),v=m!==-1&&p===-1||w,C=ug(n);at(()=>{w&&h&&c(g)},[w,g,h,c]),(0,Le.useEffect)(()=>{x.current=g},[g]);let b=(0,Le.useMemo)(()=>({activeIndex:p,containerId:d,disabled:C,disableTransforms:v,items:g,overIndex:m,useDragOverlay:f,sortedRects:lg(g,i),strategy:r}),[p,d,C.draggable,C.droppable,v,g,m,i,f,r]);return Le.default.createElement(nu.Provider,{value:b},t)}var cg=e=>{let{id:t,items:a,activeIndex:o,overIndex:r}=e;return au(a,o,r).indexOf(t)},fg=e=>{let{containerId:t,isSorting:a,wasDragging:o,index:r,items:n,newIndex:s,previousItems:l,previousContainerId:i,transition:u}=e;return!u||!o||l!==n&&r===s?!1:a?!0:s!==r&&t===i},pg={duration:200,easing:"ease"},su="transform",mg=tt.Transition.toString({property:su,duration:0,easing:"linear"}),gg={roleDescription:"sortable"};function hg(e){let{disabled:t,index:a,node:o,rect:r}=e,[n,s]=(0,Le.useState)(null),l=(0,Le.useRef)(a);return at(()=>{if(!t&&a!==l.current&&o.current){let i=r.current;if(i){let u=ba(o.current,{ignoreTransform:!0}),c={x:i.left-u.left,y:i.top-u.top,scaleX:i.width/u.width,scaleY:i.height/u.height};(c.x||c.y)&&s(c)}}a!==l.current&&(l.current=a)},[t,a,o,r]),(0,Le.useEffect)(()=>{n&&s(null)},[n]),n}function Yr(e){let{animateLayoutChanges:t=fg,attributes:a,disabled:o,data:r,getNewIndex:n=cg,id:s,strategy:l,resizeObserverConfig:i,transition:u=pg}=e,{items:c,containerId:d,activeIndex:f,disabled:g,disableTransforms:h,sortedRects:p,overIndex:m,useDragOverlay:x,strategy:w}=(0,Le.useContext)(nu),v=xg(o,g),C=c.indexOf(s),b=(0,Le.useMemo)(()=>({sortable:{containerId:d,index:C,items:c},...r}),[d,r,C,c]),L=(0,Le.useMemo)(()=>c.slice(c.indexOf(s)),[c,s]),{rect:y,node:S,isOver:P,setNodeRef:E}=Gr({id:s,data:b,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:L,...i}}),{active:M,activatorEvent:D,activeNodeRect:F,attributes:U,setNodeRef:Z,listeners:W,isDragging:O,over:B,setActivatorNodeRef:H,transform:T}=eu({id:s,data:b,attributes:{...gg,...a},disabled:v.draggable}),le=xi(E,Z),Q=!!M,ie=Q&&!h&&Wr(f)&&Wr(m),ve=!x&&O,R=ve&&ie?T:null,G=ie?R??(l??w)({rects:p,activeNodeRect:F,activeIndex:f,overIndex:m,index:C}):null,k=Wr(f)&&Wr(m)?n({id:s,items:c,activeIndex:f,overIndex:m}):C,X=M?.id,_=(0,Le.useRef)({activeId:X,items:c,newIndex:k,containerId:d}),$=c!==_.current.items,Y=t({active:M,containerId:d,isDragging:O,isSorting:Q,id:s,index:C,items:c,newIndex:_.current.newIndex,previousItems:_.current.items,previousContainerId:_.current.containerId,transition:u,wasDragging:_.current.activeId!=null}),oe=hg({disabled:!Y,index:C,node:S,rect:y});return(0,Le.useEffect)(()=>{Q&&_.current.newIndex!==k&&(_.current.newIndex=k),d!==_.current.containerId&&(_.current.containerId=d),c!==_.current.items&&(_.current.items=c)},[Q,k,d,c]),(0,Le.useEffect)(()=>{if(X===_.current.activeId)return;if(X&&!_.current.activeId){_.current.activeId=X;return}let Pe=setTimeout(()=>{_.current.activeId=X},50);return()=>clearTimeout(Pe)},[X]),{active:M,activeIndex:f,attributes:U,data:b,rect:y,index:C,newIndex:k,items:c,isOver:P,isSorting:Q,isDragging:O,listeners:W,node:S,overIndex:m,over:B,setNodeRef:le,setActivatorNodeRef:H,setDroppableNodeRef:E,setDraggableNodeRef:Z,transform:oe??G,transition:we()};function we(){if(oe||$&&_.current.newIndex===C)return mg;if(!(ve&&!oo(D)||!u)&&(Q||Y))return tt.Transition.toString({...u,property:su})}}function xg(e,t){var a,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:t.draggable,droppable:(o=e?.droppable)!=null?o:t.droppable}}function Kr(e){if(!e)return!1;let t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var vg=[ne.Down,ne.Right,ne.Up,ne.Left],Zr=(e,t)=>{let{context:{active:a,collisionRect:o,droppableRects:r,droppableContainers:n,over:s,scrollableAncestors:l}}=t;if(vg.includes(e.code)){if(e.preventDefault(),!a||!o)return;let i=[];n.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;let f=r.get(d.id);if(f)switch(e.code){case ne.Down:o.top<f.top&&i.push(d);break;case ne.Up:o.top>f.top&&i.push(d);break;case ne.Left:o.left>f.left&&i.push(d);break;case ne.Right:o.left<f.left&&i.push(d);break}});let u=Hr({active:a,collisionRect:o,droppableRects:r,droppableContainers:i,pointerCoordinates:null}),c=jo(u,"id");if(c===s?.id&&u.length>1&&(c=u[1].id),c!=null){let d=n.get(a.id),f=n.get(c),g=f?r.get(f.id):null,h=f?.node.current;if(h&&g&&d&&f){let m=Ko(h).some((L,y)=>l[y]!==L),x=lu(d,f),w=wg(d,f),v=m||!x?{x:0,y:0}:{x:w?o.width-g.width:0,y:w?o.height-g.height:0},C={x:g.left,y:g.top};return v.x&&v.y?C:ha(C,v)}}}};function lu(e,t){return!Kr(e)||!Kr(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function wg(e,t){return!Kr(e)||!Kr(t)||!lu(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var Qr=require("react");var iu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jr=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var $o=require("react");var uu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var du=(0,$o.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:n,iconNode:s,...l},i)=>(0,$o.createElement)("svg",{ref:i,...uu,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:Jr("lucide",r),...l},[...s.map(([u,c])=>(0,$o.createElement)(u,c)),...Array.isArray(n)?n:[n]]));var de=(e,t)=>{let a=(0,Qr.forwardRef)(({className:o,...r},n)=>(0,Qr.createElement)(du,{ref:n,iconNode:t,className:Jr(`lucide-${iu(e)}`,o),...r}));return a.displayName=`${e}`,a};var Cg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],aa=de("Check",Cg);var bg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],no=de("ChevronDown",bg);var Lg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Yo=de("ChevronUp",Lg);var Ig=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Zo=de("Clock",Ig);var yg=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Jo=de("Filter",yg);var Sg=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Qo=de("GripVertical",Sg);var Rg=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],er=de("List",Rg);var Pg=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],tr=de("MessageSquare",Pg);var Dg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Nt=de("Plus",Dg);var kg=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ar=de("RefreshCw",kg);var Mg=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],or=de("Settings2",Mg);var Ag=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],rr=de("Tag",Ag);var Tg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],_t=de("Trash2",Tg);var Eg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nr=de("X",Eg);var jn=require("react");var ku=q(require("react"),1);var Ne=q(require("react"),1);var cu=q(require("react"),1),Og=Object.defineProperty,xs=(e,t)=>Og(e,"name",{value:t,configurable:!0});function hs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}xs(hs,"setRef");function fu(...e){return t=>{let a=!1,o=e.map(r=>{let n=hs(r,t);return!a&&typeof n=="function"&&(a=!0),n});if(a)return()=>{for(let r=0;r<o.length;r++){let n=o[r];typeof n=="function"?n():hs(e[r],null)}}}}xs(fu,"composeRefs");function ae(...e){return cu.useCallback(fu(...e),e)}xs(ae,"useComposedRefs");var Fg=Object.defineProperty,ht=(e,t)=>Fg(e,"name",{value:t,configurable:!0});function Ve(e){let t=Ne.forwardRef((a,o)=>{let{children:r,...n}=a,s=null,l=!1,i=[];vs(r)&&typeof en=="function"&&(r=en(r._payload)),Ne.Children.forEach(r,f=>{if(xu(f)){l=!0;let g=f,h="child"in g.props?g.props.child:g.props.children;vs(h)&&typeof en=="function"&&(h=en(h._payload)),s=Ng(g,h),i.push(s?.props?.children)}else i.push(f)}),s?s=Ne.cloneElement(s,void 0,i):!l&&Ne.Children.count(r)===1&&Ne.isValidElement(r)&&(s=r);let u=s?hu(s):void 0,c=ae(o,u);if(!s){if(r||r===0)throw new Error(l?Hg(e):Ug(e));return r}let d=gu(n,s.props??{});return s.type!==Ne.Fragment&&(d.ref=o?c:u),Ne.cloneElement(s,d)});return t.displayName=`${e}.Slot`,t}ht(Ve,"createSlot");var pu=Ve("Slot"),mu=Symbol.for("radix.slottable");function Bg(e){let t=ht(a=>"child"in a?a.children(a.child):a.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=mu,t}ht(Bg,"createSlottable");var Ng=ht((e,t)=>{if("child"in e.props){let a=e.props.child;return Ne.isValidElement(a)?Ne.cloneElement(a,void 0,e.props.children(a.props.children)):null}return Ne.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function gu(e,t){let a={...t};for(let o in t){let r=e[o],n=t[o];/^on[A-Z]/.test(o)?r&&n?a[o]=(...l)=>{let i=n(...l);return r(...l),i}:r&&(a[o]=r):o==="style"?a[o]={...r,...n}:o==="className"&&(a[o]=[r,n].filter(Boolean).join(" "))}return{...e,...a}}ht(gu,"mergeProps");function hu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}ht(hu,"getElementRef");function xu(e){return Ne.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mu}ht(xu,"isSlottable");var _g=Symbol.for("react.lazy");function vs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===_g&&"_payload"in e&&vu(e._payload)}ht(vs,"isLazyComponent");function vu(e){return typeof e=="object"&&e!==null&&"then"in e}ht(vu,"isPromiseLike");var Ug=ht(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Hg=ht(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),en=Ne[" use ".trim().toString()];function wu(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=wu(e[t]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function tn(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=wu(e))&&(o&&(o+=" "),o+=t);return o}var Cu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bu=tn,an=(e,t)=>a=>{var o;if(t?.variants==null)return bu(e,a?.class,a?.className);let{variants:r,defaultVariants:n}=t,s=Object.keys(r).map(u=>{let c=a?.[u],d=n?.[u];if(c===null)return null;let f=Cu(c)||Cu(d);return r[u][f]}),l=a&&Object.entries(a).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),i=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:f,...g}=c;return Object.entries(g).every(h=>{let[p,m]=h;return Array.isArray(m)?m.includes({...n,...l}[p]):{...n,...l}[p]===m})?[...u,d,f]:u},[]);return bu(e,s,i,a?.class,a?.className)};var qg=e=>{let t=Vg(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let l=s.split("-");return l[0]===""&&l.length!==1&&l.shift(),yu(l,t)||zg(s)},getConflictingClassGroupIds:(s,l)=>{let i=a[s]||[];return l&&o[s]?[...i,...o[s]]:i}}},yu=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?yu(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let n=e.join("-");return t.validators.find(({validator:s})=>s(n))?.classGroupId},Lu=/^\[(.+)\]$/,zg=e=>{if(Lu.test(e)){let t=Lu.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Vg=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Wg(Object.entries(e.classGroups),a).forEach(([n,s])=>{Cs(s,o,n,t)}),o},Cs=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let n=r===""?t:Iu(t,r);n.classGroupId=a;return}if(typeof r=="function"){if(Gg(r)){Cs(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([n,s])=>{Cs(s,Iu(t,n),a,o)})})},Iu=(e,t)=>{let a=e;return t.split("-").forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Gg=e=>e.isThemeGetter,Wg=(e,t)=>t?e.map(([a,o])=>{let r=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,l])=>[t+s,l])):n);return[a,r]}):e,jg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(n,s)=>{a.set(n,s),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let s=a.get(n);if(s!==void 0)return s;if((s=o.get(n))!==void 0)return r(n,s),s},set(n,s){a.has(n)?a.set(n,s):r(n,s)}}};var Kg=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],n=t.length,s=l=>{let i=[],u=0,c=0,d;for(let m=0;m<l.length;m++){let x=l[m];if(u===0){if(x===r&&(o||l.slice(m,m+n)===t)){i.push(l.slice(c,m)),c=m+n;continue}if(x==="/"){d=m;continue}}x==="["?u++:x==="]"&&u--}let f=i.length===0?l:l.substring(c),g=f.startsWith("!"),h=g?f.substring(1):f,p=d&&d>c?d-c:void 0;return{modifiers:i,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:p}};return a?l=>a({className:l,parseClassName:s}):s},Xg=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},$g=e=>({cache:jg(e.cacheSize),parseClassName:Kg(e),...qg(e)}),Yg=/\s+/,Zg=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,n=[],s=e.trim().split(Yg),l="";for(let i=s.length-1;i>=0;i-=1){let u=s[i],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:g}=a(u),h=!!g,p=o(h?f.substring(0,g):f);if(!p){if(!h){l=u+(l.length>0?" "+l:l);continue}if(p=o(f),!p){l=u+(l.length>0?" "+l:l);continue}h=!1}let m=Xg(c).join(":"),x=d?m+"!":m,w=x+p;if(n.includes(w))continue;n.push(w);let v=r(p,h);for(let C=0;C<v.length;++C){let b=v[C];n.push(x+b)}l=u+(l.length>0?" "+l:l)}return l};function Jg(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Su(t))&&(o&&(o+=" "),o+=a);return o}var Su=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Su(e[o]))&&(a&&(a+=" "),a+=t);return a};function Qg(e,...t){let a,o,r,n=s;function s(i){let u=t.reduce((c,d)=>d(c),e());return a=$g(u),o=a.cache.get,r=a.cache.set,n=l,l(i)}function l(i){let u=o(i);if(u)return u;let c=Zg(i,a);return r(i,c),c}return function(){return n(Jg.apply(null,arguments))}}var me=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ru=/^\[(?:([a-z-]+):)?(.+)\]$/i,eh=/^\d+\/\d+$/,th=new Set(["px","full","screen"]),ah=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ut=e=>so(e)||th.has(e)||eh.test(e),oa=e=>lo(e,"length",mh),so=e=>!!e&&!Number.isNaN(Number(e)),ws=e=>lo(e,"number",so),sr=e=>!!e&&Number.isInteger(Number(e)),lh=e=>e.endsWith("%")&&so(e.slice(0,-1)),te=e=>Ru.test(e),ra=e=>ah.test(e),ih=new Set(["length","size","percentage"]),uh=e=>lo(e,ih,Pu),dh=e=>lo(e,"position",Pu),ch=new Set(["image","url"]),fh=e=>lo(e,ch,hh),ph=e=>lo(e,"",gh),lr=()=>!0,lo=(e,t,a)=>{let o=Ru.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},mh=e=>oh.test(e)&&!rh.test(e),Pu=()=>!1,gh=e=>nh.test(e),hh=e=>sh.test(e);var xh=()=>{let e=me("colors"),t=me("spacing"),a=me("blur"),o=me("brightness"),r=me("borderColor"),n=me("borderRadius"),s=me("borderSpacing"),l=me("borderWidth"),i=me("contrast"),u=me("grayscale"),c=me("hueRotate"),d=me("invert"),f=me("gap"),g=me("gradientColorStops"),h=me("gradientColorStopPositions"),p=me("inset"),m=me("margin"),x=me("opacity"),w=me("padding"),v=me("saturate"),C=me("scale"),b=me("sepia"),L=me("skew"),y=me("space"),S=me("translate"),P=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",te,t],D=()=>[te,t],F=()=>["",Ut,oa],U=()=>["auto",so,te],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",te],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[so,te];return{cacheSize:500,separator:":",theme:{colors:[lr],spacing:[Ut,oa],blur:["none","",ra,te],brightness:le(),borderColor:[e],borderRadius:["none","","full",ra,te],borderSpacing:D(),borderWidth:F(),contrast:le(),grayscale:H(),hueRotate:le(),invert:H(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[lh,oa],inset:M(),margin:M(),opacity:le(),padding:D(),saturate:le(),scale:le(),sepia:H(),skew:le(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[ra]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),te]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",sr,te]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",sr,te]}],"grid-cols":[{"grid-cols":[lr]}],"col-start-end":[{col:["auto",{span:["full",sr,te]},te]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[lr]}],"row-start-end":[{row:["auto",{span:[sr,te]},te]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[ra]},ra]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ra,oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ws]}],"font-family":[{font:[lr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",so,ws]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ut,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ut,oa]}],"underline-offset":[{"underline-offset":["auto",Ut,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),dh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:W()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Ut,te]}],"outline-w":[{outline:[Ut,oa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ut,oa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ra,ph]}],"shadow-color":[{shadow:[lr]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",ra,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[sr,te]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ut,oa,ws]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Du=Qg(xh);function ee(...e){return Du(tn(e))}var Mu=require("react/jsx-runtime"),vh=an("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-[transform,color,background-color,border-color,box-shadow] duration-150 active:scale-[0.97] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),Ae=ku.forwardRef(({className:e,variant:t,size:a,asChild:o=!1,...r},n)=>(0,Mu.jsx)(o?pu:"button",{className:ee(vh({variant:t,size:a,className:e})),ref:n,...r}));Ae.displayName="Button";var mr=q(require("react"),1);var he=q(require("react"),1);var wh=Object.defineProperty,io=(e,t)=>wh(e,"name",{value:t,configurable:!0}),Au=!!(typeof window<"u"&&window.document&&window.document.createElement);function z(e,t,{checkForDefaultPrevented:a=!0}={}){return io(function(r){if(e?.(r),a===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}io(z,"composeEventHandlers");function Ch(e){if(!Au)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}io(Ch,"getOwnerWindow");function bs(e){if(!Au)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}io(bs,"getOwnerDocument");function Tu(e,t=!1){let{activeElement:a}=bs(e);if(!a?.nodeName)return null;if(Eu(a)&&a.contentDocument)return Tu(a.contentDocument.body,t);if(t){let o=a.getAttribute("aria-activedescendant");if(o){let r=bs(a).getElementById(o);if(r)return r}}return a}io(Tu,"getActiveElement");function Eu(e){return e.tagName==="IFRAME"}io(Eu,"isFrame");var dt=q(require("react"),1),Ls=require("react/jsx-runtime"),bh=Object.defineProperty,ut=(e,t)=>bh(e,"name",{value:t,configurable:!0});function Lh(e,t){let a=dt.createContext(t);a.displayName=e+"Context";let o=ut(n=>{let{children:s,...l}=n,i=dt.useMemo(()=>l,Object.values(l));return(0,Ls.jsx)(a.Provider,{value:i,children:s})},"Provider");o.displayName=e+"Provider";function r(n,s={}){let{optional:l=!1}=s,i=dt.useContext(a);if(i)return i;if(t!==void 0)return t;if(!l)throw new Error(`\`${n}\` must be used within \`${e}\``)}return ut(r,"useContext"),[o,r]}ut(Lh,"createContext");function _e(e,t=[]){let a=[];function o(n,s){let l=dt.createContext(s);l.displayName=n+"Context";let i=a.length;a=[...a,s];let u=ut(d=>{let{scope:f,children:g,...h}=d,p=f?.[e]?.[i]||l,m=dt.useMemo(()=>h,Object.values(h));return(0,Ls.jsx)(p.Provider,{value:m,children:g})},"Provider");u.displayName=n+"Provider";function c(d,f,g={}){let{optional:h=!1}=g,p=f?.[e]?.[i]||l,m=dt.useContext(p);if(m)return m;if(s!==void 0)return s;if(!h)throw new Error(`\`${d}\` must be used within \`${n}\``)}return ut(c,"useContext"),[u,c]}ut(o,"createContext");let r=ut(()=>{let n=a.map(s=>dt.createContext(s));return ut(function(l){let i=l?.[e]||n;return dt.useMemo(()=>({[`__scope${e}`]:{...l,[e]:i}}),[l,i])},"useScope")},"createScope");return r.scopeName=e,[o,Ou(r,...t)]}ut(_e,"createContextScope");function Ou(...e){let t=e[0];if(e.length===1)return t;let a=ut(()=>{let o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return ut(function(n){let s=o.reduce((l,{useScope:i,scopeName:u})=>{let d=i(n)[`__scope${u}`];return{...l,...d}},{});return dt.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return a.scopeName=t.scopeName,a}ut(Ou,"composeContextScopes");var Is=q(require("react"),1);var Fu=q(require("react"),1),ue=globalThis?.document?Fu.useLayoutEffect:()=>{};var Ih=Object.defineProperty,yh=(e,t)=>Ih(e,"name",{value:t,configurable:!0}),Sh=Is[" useId ".trim().toString()]||(()=>{}),Rh=0;function ot(e){let[t,a]=Is.useState(Sh());return ue(()=>{e||a(o=>o??String(Rh++))},[e]),e||(t?`radix-${t}`:"")}yh(ot,"useId");var ct=q(require("react"),1);var on=!1;var xt=q(require("react"),1);var uo=q(require("react"),1),Ph=Object.defineProperty,Dh=(e,t)=>Ph(e,"name",{value:t,configurable:!0}),Bu=uo[" useEffectEvent ".trim().toString()],Nu=uo[" useInsertionEffect ".trim().toString()];function ys(e){if(typeof Bu=="function")return Bu(e);let t=uo.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Nu=="function"?Nu(()=>{t.current=e}):ue(()=>{t.current=e}),uo.useMemo(()=>((...a)=>t.current?.(...a)),[])}Dh(ys,"useEffectEvent");var kh=Object.defineProperty,ir=(e,t)=>kh(e,"name",{value:t,configurable:!0}),Mh=ct[" useInsertionEffect ".trim().toString()]||ue;function Dt({prop:e,defaultProp:t,onChange:a=ir(()=>{},"onChange"),caller:o}){let[r,n,s]=Uu({defaultProp:t,onChange:a}),l=e!==void 0,i=l?e:r;if(on){let c=ct.useRef(e!==void 0);ct.useEffect(()=>{let d=c.current;d!==l&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=l},[l,o])}let u=ct.useCallback(c=>{if(l){let d=Hu(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[l,e,n,s]);return[i,u]}ir(Dt,"useControllableState");function Uu({defaultProp:e,onChange:t}){let[a,o]=ct.useState(e),r=ct.useRef(a),n=ct.useRef(t);return Mh(()=>{n.current=t},[t]),ct.useEffect(()=>{r.current!==a&&(n.current?.(a),r.current=a)},[a,r]),[a,o,n]}ir(Uu,"useUncontrolledState");function Hu(e){return typeof e=="function"}ir(Hu,"isFunction");var _u=Symbol("RADIX:SYNC_STATE");function Ah(e,t,a,o){let{prop:r,defaultProp:n,onChange:s,caller:l}=t,i=r!==void 0,u=ys(s);if(on){let m=xt.useRef(r!==void 0);xt.useEffect(()=>{let x=m.current;x!==i&&console.warn(`${l} is changing from ${x?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,l])}let c=[{...a,state:n}];o&&c.push(o);let[d,f]=xt.useReducer((m,x)=>{if(x.type===_u)return{...m,state:x.state};let w=e(m,x);return i&&!Object.is(w.state,m.state)&&u(w.state),w},...c),g=d.state,h=xt.useRef(g);xt.useEffect(()=>{h.current!==g&&(h.current=g,i||u(g))},[g,h,i]);let p=xt.useMemo(()=>r!==void 0?{...d,state:r}:d,[d,r]);return xt.useEffect(()=>{i&&!Object.is(r,d.state)&&f({type:_u,state:r})},[r,d.state,i]),[p,f]}ir(Ah,"useControllableStateReducer");var ce=q(require("react"),1);var qu=q(require("react"),1),zu=q(require("react-dom"),1);var Vu=require("react/jsx-runtime"),Th=Object.defineProperty,Eh=(e,t)=>Th(e,"name",{value:t,configurable:!0}),Oh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=Oh.reduce((e,t)=>{let a=Ve(`Primitive.${t}`),o=qu.forwardRef((r,n)=>{let{asChild:s,...l}=r,i=s?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,Vu.jsx)(i,{...l,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function ur(e,t){e&&zu.flushSync(()=>e.dispatchEvent(t))}Eh(ur,"dispatchDiscreteCustomEvent");var co=q(require("react"),1),Fh=Object.defineProperty,Bh=(e,t)=>Fh(e,"name",{value:t,configurable:!0});function Te(e){let t=co.useRef(e);return co.useEffect(()=>{t.current=e}),co.useMemo(()=>((...a)=>t.current?.(...a)),[])}Bh(Te,"useCallbackRef");var Wu=require("react/jsx-runtime"),Nh=Object.defineProperty,Ee=(e,t)=>Nh(e,"name",{value:t,configurable:!0}),Ss="dismissableLayer.update",_h="dismissableLayer.pointerDownOutside",Uh="dismissableLayer.focusOutside",Gu,ju=ce.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),fo=ce.forwardRef(Ee(function(t,a){let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:i,onDismiss:u,...c}=t,d=ce.useContext(ju),[f,g]=ce.useState(null),h=f?.ownerDocument??globalThis?.document,[,p]=ce.useState({}),m=ae(a,g),x=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=w?x.indexOf(w):-1,C=f?x.indexOf(f):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,L=C>=v,y=ce.useRef(!1),S=Ku(D=>{s?.(D),i?.(D),D.defaultPrevented||u?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:y,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:ce.useCallback(D=>{if(!(D instanceof Node))return!1;let F=[...d.branches].some(U=>U.contains(D));return L&&!F},[d.branches,L])}),P=Xu(D=>{if(r&&y.current)return;let F=D.target;[...d.branches].some(Z=>Z.contains(F))||(l?.(D),i?.(D),D.defaultPrevented||u?.())},h),E=f?C===x.length-1:!1,M=Te(D=>{D.key==="Escape"&&(n?.(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))});return ce.useEffect(()=>{if(E)return h.addEventListener("keydown",M,{capture:!0}),()=>h.removeEventListener("keydown",M,{capture:!0})},[h,E,M]),ce.useEffect(()=>{if(f)return o&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Gu=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Rs(),()=>{o&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Gu))}},[f,h,o,d]),ce.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Rs())},[f,d]),ce.useEffect(()=>{let D=Ee(()=>p({}),"handleUpdate");return document.addEventListener(Ss,D),()=>document.removeEventListener(Ss,D)},[]),(0,Wu.jsx)(re.div,{...c,ref:m,style:{pointerEvents:b?L?"auto":"none":void 0,...t.style},onFocusCapture:z(t.onFocusCapture,P.onFocusCapture),onBlurCapture:z(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:z(t.onPointerDownCapture,S.onPointerDownCapture)})},"DismissableLayer"));function Ps(){let e=ce.useContext(ju),[t,a]=ce.useState(null);return ce.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),a}Ee(Ps,"useDismissableLayerSurface");var Hh=Ee(()=>!0,"IS_TRUE");function Ku(e,t){let{ownerDocument:a=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:n,shouldHandlePointerDownOutside:s=Hh}=t,l=Te(e),i=ce.useRef(!1),u=ce.useRef(!1),c=ce.useRef(new Map),d=ce.useRef(()=>{});return ce.useEffect(()=>{function f(){u.current=!1,r.current=!1,c.current.clear()}Ee(f,"resetOutsideInteraction");function g(){return Array.from(c.current.values()).some(Boolean)}Ee(g,"isOutsideInteractionIntercepted");function h(v){if(!u.current)return;let C=v.target;C instanceof Node&&[...n].some(L=>L.contains(C))||c.current.set(v.type,!0),v.type==="click"&&window.setTimeout(()=>{u.current&&d.current()},0)}Ee(h,"handleInteractionCapture");function p(v){u.current&&c.current.set(v.type,!1)}Ee(p,"handleInteractionBubble");let m=Ee(v=>{if(v.target&&!i.current){let b=function(){a.removeEventListener("click",d.current);let y=g();f(),y||Ds(_h,l,L,{discrete:!0})};var C=b;if(Ee(b,"handleAndDispatchPointerDownOutsideEvent"),!s(v.target)){a.removeEventListener("click",d.current),f(),i.current=!1;return}let L={originalEvent:v};u.current=!0,r.current=o&&v.button===0,c.current.clear(),!o||v.button!==0?b():(a.removeEventListener("click",d.current),d.current=b,a.addEventListener("click",d.current,{once:!0}))}else a.removeEventListener("click",d.current),f();i.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let v of x)a.addEventListener(v,h,!0),a.addEventListener(v,p);let w=window.setTimeout(()=>{a.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(w),a.removeEventListener("pointerdown",m),a.removeEventListener("click",d.current);for(let v of x)a.removeEventListener(v,h,!0),a.removeEventListener(v,p)}},[a,l,o,r,n,s]),{onPointerDownCapture:Ee(()=>i.current=!0,"onPointerDownCapture")}}Ee(Ku,"usePointerDownOutside");function Xu(e,t=globalThis?.document){let a=Te(e),o=ce.useRef(!1);return ce.useEffect(()=>{let r=Ee(n=>{n.target&&!o.current&&Ds(Uh,a,{originalEvent:n},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,a]),{onFocusCapture:Ee(()=>o.current=!0,"onFocusCapture"),onBlurCapture:Ee(()=>o.current=!1,"onBlurCapture")}}Ee(Xu,"useFocusOutside");function Rs(){let e=new CustomEvent(Ss);document.dispatchEvent(e)}Ee(Rs,"dispatchUpdate");function Ds(e,t,a,{discrete:o}){let r=a.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&r.addEventListener(e,t,{once:!0}),o?ur(r,n):r.dispatchEvent(n)}Ee(Ds,"handleAndDispatchCustomEvent");var ft=q(require("react"),1);var Zu=require("react/jsx-runtime"),qh=Object.defineProperty,Ke=(e,t)=>qh(e,"name",{value:t,configurable:!0}),ks="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",$u={bubbles:!1,cancelable:!0},po=ft.forwardRef(Ke(function(t,a){let{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:s,...l}=t,[i,u]=ft.useState(null),c=Te(n),d=Te(s),f=ft.useRef(null),g=ae(a,u),h=ft.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ft.useEffect(()=>{if(r){let v=function(y){if(h.paused||!i)return;let S=y.target;i.contains(S)?f.current=S:Ht(f.current,{select:!0})},C=function(y){if(h.paused||!i)return;let S=y.relatedTarget;S!==null&&(i.contains(S)||Ht(f.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(let P of y)P.removedNodes.length>0&&Ht(i)};var m=v,x=C,w=b;Ke(v,"handleFocusIn"),Ke(C,"handleFocusOut"),Ke(b,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",C);let L=new MutationObserver(b);return i&&L.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",C),L.disconnect()}}},[r,i,h.paused]),ft.useEffect(()=>{if(i){Yu.add(h);let m=document.activeElement;if(!i.contains(m)){let w=new CustomEvent(ks,$u);i.addEventListener(ks,c),i.dispatchEvent(w),w.defaultPrevented||(Ju(od(Es(i)),{select:!0}),document.activeElement===m&&Ht(i))}return()=>{i.removeEventListener(ks,c),setTimeout(()=>{let w=new CustomEvent(Ms,$u);i.addEventListener(Ms,d),i.dispatchEvent(w),w.defaultPrevented||Ht(m??document.body,{select:!0}),i.removeEventListener(Ms,d),Yu.remove(h)},0)}}},[i,c,d,h]);let p=ft.useCallback(m=>{if(!o&&!r||h.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(x&&w){let v=m.currentTarget,[C,b]=Qu(v);C&&b?!m.shiftKey&&w===b?(m.preventDefault(),o&&Ht(C,{select:!0})):m.shiftKey&&w===C&&(m.preventDefault(),o&&Ht(b,{select:!0})):w===v&&m.preventDefault()}},[o,r,h.paused]);return(0,Zu.jsx)(re.div,{tabIndex:-1,...l,ref:g,onKeyDown:p})},"FocusScope"));function Ju(e,{select:t=!1}={}){let a=document.activeElement;for(let o of e)if(Ht(o,{select:t}),document.activeElement!==a)return}Ke(Ju,"focusFirst");function Qu(e){let t=Es(e),a=As(t,e),o=As(t.reverse(),e);return[a,o]}Ke(Qu,"getTabbableEdges");function Es(e){let t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Ke(o=>{let r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;a.nextNode();)t.push(a.currentNode);return t}Ke(Es,"getTabbableCandidates");function As(e,t){let a=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(let o of e)if(!(a?!o.checkVisibility({checkVisibilityCSS:!0}):ed(o,{upTo:t})))return o}Ke(As,"findVisible");function ed(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Ke(ed,"isHidden");function td(e){return e instanceof HTMLInputElement&&"select"in e}Ke(td,"isSelectableInput");function Ht(e,{select:t=!1}={}){if(e&&e.focus){let a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&td(e)&&t&&e.select()}}Ke(Ht,"focus");var Yu=ad();function ad(){let e=[];return{add(t){let a=e[0];t!==a&&a?.pause(),e=Ts(e,t),e.unshift(t)},remove(t){e=Ts(e,t),e[0]?.resume()}}}Ke(ad,"createFocusScopesStack");function Ts(e,t){let a=[...e],o=a.indexOf(t);return o!==-1&&a.splice(o,1),a}Ke(Ts,"arrayRemove");function od(e){return e.filter(t=>t.tagName!=="A")}Ke(od,"removeLinks");var rn=q(require("react"),1),rd=q(require("react-dom"),1);var nd=require("react/jsx-runtime"),zh=Object.defineProperty,Vh=(e,t)=>zh(e,"name",{value:t,configurable:!0}),mo=rn.forwardRef(Vh(function(t,a){let{container:o,...r}=t,[n,s]=rn.useState(!1);ue(()=>s(!0),[]);let l=o||n&&globalThis?.document?.body;return l?rd.createPortal((0,nd.jsx)(re.div,{...r,ref:a}),l):null},"Portal"));var Ue=q(require("react"),1);var sd=q(require("react"),1),Gh=Object.defineProperty,qt=(e,t)=>Gh(e,"name",{value:t,configurable:!0});function ld(e,t){return sd.useReducer((a,o)=>t[a][o]??a,e)}qt(ld,"useStateMachine");var zt=qt(e=>{let{present:t,children:a}=e,o=id(t),r=typeof a=="function"?a({present:o.isPresent}):Ue.Children.only(a),n=ud(o.ref,dd(r));return typeof a=="function"||o.isPresent?Ue.cloneElement(r,{ref:n}):null},"Presence");function id(e){let[t,a]=Ue.useState(),o=Ue.useRef(null),r=Ue.useRef(e),n=Ue.useRef("none"),s=Ue.useRef(void 0),l=e?"mounted":"unmounted",[i,u]=ld(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ue.useEffect(()=>{i==="mounted"?(n.current=s.current??go(o.current),s.current=void 0):n.current="none"},[i]),ue(()=>{let c=o.current,d=r.current;if(d!==e){let g=n.current,h=go(c);e?(s.current=h,u("MOUNT")):h==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&g!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),ue(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=qt(h=>{let m=go(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(u("ANIMATION_END"),!r.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},"handleAnimationEnd"),g=qt(h=>{h.target===t&&(n.current=go(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:Ue.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,s.current=go(d)}else o.current=null;a(c)},[])}}qt(id,"usePresence");function Os(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}qt(Os,"setRef");function ud(...e){let t=Ue.useRef(e);return t.current=e,Ue.useCallback(a=>{let o=t.current,r=!1,n=o.map(s=>{let l=Os(s,a);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let s=0;s<n.length;s++){let l=n[s];typeof l=="function"?l():Os(o[s],null)}}},[])}qt(ud,"useStableComposedRefs");function go(e){return e?.animationName||"none"}qt(go,"getAnimationName");function dd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}qt(dd,"getElementRef");var cd=q(require("react"),1),Wh=Object.defineProperty,Bs=(e,t)=>Wh(e,"name",{value:t,configurable:!0}),nn=0,ho=null;function jh(e){return na(),e.children}Bs(jh,"FocusGuards");function na(){cd.useEffect(()=>{ho||(ho={start:Fs(),end:Fs()});let{start:e,end:t}=ho;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),nn++,()=>{nn===1&&(ho?.start.remove(),ho?.end.remove(),ho=null),nn=Math.max(0,nn-1)}},[])}Bs(na,"useFocusGuards");function Fs(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Bs(Fs,"createFocusGuard");var Ye=function(){return Ye=Object.assign||function(t){for(var a,o=1,r=arguments.length;o<r;o++){a=arguments[o];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Ye.apply(this,arguments)};function sn(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a}function fd(e,t,a){if(a||arguments.length===2)for(var o=0,r=t.length,n;o<r;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var fn=q(require("react"));var Ge=q(require("react"));var La="right-scroll-bar-position",Ia="width-before-scroll-bar",Ns="with-scroll-bars-hidden",_s="--removed-body-scroll-bar-size";function ln(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var pd=require("react");function md(e,t){var a=(0,pd.useState)(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(o){var r=a.value;r!==o&&(a.value=o,a.callback(o,r))}}}})[0];return a.callback=t,a.facade}var un=q(require("react"));var Kh=typeof window<"u"?un.useLayoutEffect:un.useEffect,gd=new WeakMap;function Us(e,t){var a=md(t||null,function(o){return e.forEach(function(r){return ln(r,o)})});return Kh(function(){var o=gd.get(a);if(o){var r=new Set(o),n=new Set(e),s=a.current;r.forEach(function(l){n.has(l)||ln(l,null)}),n.forEach(function(l){r.has(l)||ln(l,s)})}gd.set(a,e)},[e]),a}function Xh(e){return e}function $h(e,t){t===void 0&&(t=Xh);var a=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(n){var s=t(n,o);return a.push(s),function(){a=a.filter(function(l){return l!==s})}},assignSyncMedium:function(n){for(o=!0;a.length;){var s=a;a=[],s.forEach(n)}a={push:function(l){return n(l)},filter:function(){return a}}},assignMedium:function(n){o=!0;var s=[];if(a.length){var l=a;a=[],l.forEach(n),s=a}var i=function(){var c=s;s=[],c.forEach(n)},u=function(){return Promise.resolve().then(i)};u(),a={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),a}}}};return r}function Hs(e){e===void 0&&(e={});var t=$h(null);return t.options=Ye({async:!0,ssr:!1},e),t}var hd=q(require("react")),xd=function(e){var t=e.sideCar,a=sn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return hd.createElement(o,Ye({},a))};xd.isSideCarExport=!0;function qs(e,t){return e.useMedium(t),xd}var dn=Hs();var zs=function(){},dr=Ge.forwardRef(function(e,t){var a=Ge.useRef(null),o=Ge.useState({onScrollCapture:zs,onWheelCapture:zs,onTouchMoveCapture:zs}),r=o[0],n=o[1],s=e.forwardProps,l=e.children,i=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,g=e.noRelative,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,v=e.gapMode,C=sn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=f,L=Us([a,t]),y=Ye(Ye({},C),r);return Ge.createElement(Ge.Fragment,null,c&&Ge.createElement(b,{sideCar:dn,removeScrollBar:u,shards:d,noRelative:g,noIsolation:h,inert:p,setCallbacks:n,allowPinchZoom:!!m,lockRef:a,gapMode:v}),s?Ge.cloneElement(Ge.Children.only(l),Ye(Ye({},y),{ref:L})):Ge.createElement(w,Ye({},y,{className:i,ref:L}),l))});dr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dr.classNames={fullWidth:Ia,zeroRight:La};var ge=q(require("react"));var vo=q(require("react"));var Cd=q(require("react"));var vd;var wd=function(){if(vd)return vd;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wd();return t&&e.setAttribute("nonce",t),e}function Zh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vs=function(){var e=0,t=null;return{add:function(a){e==0&&(t=Yh())&&(Zh(t,a),Jh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Gs=function(){var e=Vs();return function(t,a){Cd.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}};var cr=function(){var e=Gs(),t=function(a){var o=a.styles,r=a.dynamic;return e(o,r),null};return t};var Qh={left:0,top:0,right:0,gap:0},Ws=function(e){return parseInt(e||"",10)||0},ex=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Ws(a),Ws(o),Ws(r)]},js=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qh;var t=ex(e),a=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-a+t[2]-t[0])}};var tx=cr(),xo="data-scroll-locked",ax=function(e,t,a,o){var r=e.left,n=e.top,s=e.right,l=e.gap;return a===void 0&&(a="margin"),`
|
|
1469
|
+
.`.concat(Ns,` {
|
|
1343
1470
|
overflow: hidden `).concat(o,`;
|
|
1344
1471
|
padding-right: `).concat(l,"px ").concat(o,`;
|
|
1345
1472
|
}
|
|
1346
|
-
body[`).concat(
|
|
1473
|
+
body[`).concat(xo,`] {
|
|
1347
1474
|
overflow: hidden `).concat(o,`;
|
|
1348
1475
|
overscroll-behavior: contain;
|
|
1349
1476
|
`).concat([t&&"position: relative ".concat(o,";"),a==="margin"&&`
|
|
@@ -1356,29 +1483,31 @@ window.__ModuleLoader__.load({
|
|
|
1356
1483
|
`),a==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
1357
1484
|
}
|
|
1358
1485
|
|
|
1359
|
-
.`).concat(
|
|
1486
|
+
.`).concat(La,` {
|
|
1360
1487
|
right: `).concat(l,"px ").concat(o,`;
|
|
1361
1488
|
}
|
|
1362
1489
|
|
|
1363
|
-
.`).concat(
|
|
1490
|
+
.`).concat(Ia,` {
|
|
1364
1491
|
margin-right: `).concat(l,"px ").concat(o,`;
|
|
1365
1492
|
}
|
|
1366
1493
|
|
|
1367
|
-
.`).concat(
|
|
1494
|
+
.`).concat(La," .").concat(La,` {
|
|
1368
1495
|
right: 0 `).concat(o,`;
|
|
1369
1496
|
}
|
|
1370
1497
|
|
|
1371
|
-
.`).concat(
|
|
1498
|
+
.`).concat(Ia," .").concat(Ia,` {
|
|
1372
1499
|
margin-right: 0 `).concat(o,`;
|
|
1373
1500
|
}
|
|
1374
1501
|
|
|
1375
|
-
body[`).concat(
|
|
1376
|
-
`).concat(
|
|
1502
|
+
body[`).concat(xo,`] {
|
|
1503
|
+
`).concat(_s,": ").concat(l,`px;
|
|
1377
1504
|
}
|
|
1378
|
-
`)},
|
|
1505
|
+
`)},bd=function(){var e=parseInt(document.body.getAttribute(xo)||"0",10);return isFinite(e)?e:0},ox=function(){vo.useEffect(function(){return document.body.setAttribute(xo,(bd()+1).toString()),function(){var e=bd()-1;e<=0?document.body.removeAttribute(xo):document.body.setAttribute(xo,e.toString())}},[])},Ks=function(e){var t=e.noRelative,a=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;ox();var n=vo.useMemo(function(){return js(r)},[r]);return vo.createElement(tx,{styles:ax(n,!t,r,a?"":"!important")})};var Xs=!1;if(typeof window<"u")try{fr=Object.defineProperty({},"passive",{get:function(){return Xs=!0,!0}}),window.addEventListener("test",fr,fr),window.removeEventListener("test",fr,fr)}catch{Xs=!1}var fr,ya=Xs?{passive:!1}:!1;var rx=function(e){return e.tagName==="TEXTAREA"},Ld=function(e,t){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[t]!=="hidden"&&!(a.overflowY===a.overflowX&&!rx(e)&&a[t]==="visible")},nx=function(e){return Ld(e,"overflowY")},sx=function(e){return Ld(e,"overflowX")},$s=function(e,t){var a=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Id(e,o);if(r){var n=yd(e,o),s=n[1],l=n[2];if(s>l)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},lx=function(e){var t=e.scrollTop,a=e.scrollHeight,o=e.clientHeight;return[t,a,o]},ix=function(e){var t=e.scrollLeft,a=e.scrollWidth,o=e.clientWidth;return[t,a,o]},Id=function(e,t){return e==="v"?nx(t):sx(t)},yd=function(e,t){return e==="v"?lx(t):ix(t)},ux=function(e,t){return e==="h"&&t==="rtl"?-1:1},Sd=function(e,t,a,o,r){var n=ux(e,window.getComputedStyle(t).direction),s=n*o,l=a.target,i=t.contains(l),u=!1,c=s>0,d=0,f=0;do{if(!l)break;var g=yd(e,l),h=g[0],p=g[1],m=g[2],x=p-m-n*h;(h||x)&&Id(e,l)&&(d+=x,f+=h);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!i&&l!==document.body||i&&(t.contains(l)||t===l));return(c&&(r&&Math.abs(d)<1||!r&&s>d)||!c&&(r&&Math.abs(f)<1||!r&&-s>f))&&(u=!0),u};var cn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rd=function(e){return[e.deltaX,e.deltaY]},Pd=function(e){return e&&"current"in e?e.current:e},dx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cx=function(e){return`
|
|
1379
1506
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
1380
1507
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
1381
|
-
`)},Wh=0,ho=[];function xd(e){var t=fe.useRef([]),a=fe.useRef([0,0]),o=fe.useRef(),r=fe.useState(Wh++)[0],n=fe.useState(sr)[0],s=fe.useRef(e);fe.useEffect(function(){s.current=e},[e]),fe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=td([e.lockRef.current],(e.shards||[]).map(hd),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=fe.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var x=an(p),w=a.current,v="deltaX"in p?p.deltaX:w[0]-x[0],C="deltaY"in p?p.deltaY:w[1]-x[1],I,L=p.target,y=Math.abs(v)>Math.abs(C)?"h":"v";if("touches"in p&&y==="h"&&L.type==="range")return!1;var R=window.getSelection(),P=R&&R.anchorNode,k=P?P===L||P.contains(L):!1;if(k)return!1;var O=Us(y,L);if(!O)return!0;if(O?I=y:(I=y==="v"?"h":"v",O=Us(y,L)),!O)return!1;if(!o.current&&"changedTouches"in p&&(v||C)&&(o.current=I),!I)return!0;var D=o.current||I;return md(D,m,p,D==="h"?v:C,!0)},[]),i=fe.useCallback(function(p){var m=p;if(!(!ho.length||ho[ho.length-1]!==n)){var x="deltaY"in m?gd(m):an(m),w=t.current.filter(function(I){return I.name===m.type&&(I.target===m.target||m.target===I.shadowParent)&&Vh(I.delta,x)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var v=(s.current.shards||[]).map(hd).filter(Boolean).filter(function(I){return I.contains(m.target)}),C=v.length>0?l(m,v[0]):!s.current.noIsolation;C&&m.cancelable&&m.preventDefault()}}},[]),u=fe.useCallback(function(p,m,x,w){var v={name:p,delta:m,target:x,should:w,shadowParent:jh(x)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(C){return C!==v})},1)},[]),c=fe.useCallback(function(p){a.current=an(p),o.current=void 0},[]),d=fe.useCallback(function(p){u(p.type,gd(p),p.target,l(p,e.lockRef.current))},[]),f=fe.useCallback(function(p){u(p.type,an(p),p.target,l(p,e.lockRef.current))},[]);fe.useEffect(function(){return ho.push(n),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",i,Ca),document.addEventListener("touchmove",i,Ca),document.addEventListener("touchstart",c,Ca),function(){ho=ho.filter(function(p){return p!==n}),document.removeEventListener("wheel",i,Ca),document.removeEventListener("touchmove",i,Ca),document.removeEventListener("touchstart",c,Ca)}},[]);var h=e.removeScrollBar,g=e.inert;return fe.createElement(fe.Fragment,null,g?fe.createElement(n,{styles:Gh(r)}):null,h?fe.createElement(Ns,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function jh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vd=As(tn,xd);var wd=on.forwardRef(function(e,t){return on.createElement(nr,Xe({},e,{ref:t,sideCar:vd}))});wd.classNames=nr.classNames;var La=wd;var Kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xo=new WeakMap,rn=new WeakMap,nn={},Hs=0,Cd=function(e){return e&&(e.host||Cd(e.parentNode))},Xh=function(e,t){return t.map(function(a){if(e.contains(a))return a;var o=Cd(a);return o&&e.contains(o)?o:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},$h=function(e,t,a,o){var r=Xh(t,Array.isArray(e)?e:[e]);nn[a]||(nn[a]=new WeakMap);var n=nn[a],s=[],l=new Set,i=new Set(r),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};r.forEach(u);var c=function(d){!d||i.has(d)||Array.prototype.forEach.call(d.children,function(f){if(l.has(f))c(f);else try{var h=f.getAttribute(o),g=h!==null&&h!=="false",p=(xo.get(f)||0)+1,m=(n.get(f)||0)+1;xo.set(f,p),n.set(f,m),s.push(f),p===1&&g&&rn.set(f,!0),m===1&&f.setAttribute(a,"true"),g||f.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return c(t),l.clear(),Hs++,function(){s.forEach(function(d){var f=xo.get(d)-1,h=n.get(d)-1;xo.set(d,f),n.set(d,h),f||(rn.has(d)||d.removeAttribute(o),rn.delete(d)),h||d.removeAttribute(a)}),Hs--,Hs||(xo=new WeakMap,xo=new WeakMap,rn=new WeakMap,nn={})}},vo=function(e,t,a){a===void 0&&(a="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=t||Kh(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),$h(o,r,a,"aria-hidden")):function(){return null}};var he=require("react/jsx-runtime"),Yh=Object.defineProperty,ft=(e,t)=>Yh(e,"name",{value:t,configurable:!0}),zs="Dialog",[Ld,ib]=Ne(zs),[Zh,Pt]=Ld(zs),Id=ft(e=>{let{__scopeDialog:t,children:a,open:o,defaultOpen:r,onOpenChange:n,modal:s=!0}=e,l=pe.useRef(null),i=pe.useRef(null),[u,c]=Rt({prop:o,defaultProp:r??!1,onChange:n,caller:zs}),[d,f]=pe.useState(0),[h,g]=pe.useState(0);return(0,he.jsx)(Zh,{scope:t,triggerRef:l,contentRef:i,contentId:tt(),titleId:tt(),descriptionId:tt(),titlePresent:d>0,descriptionPresent:h>0,setTitleCount:f,setDescriptionCount:g,open:u,onOpenChange:c,onOpenToggle:pe.useCallback(()=>c(p=>!p),[c]),modal:s,children:a})},"Dialog");var bd="DialogPortal",[Jh,yd]=Ld(bd,{forceMount:void 0}),Sd=ft(e=>{let{__scopeDialog:t,forceMount:a,children:o,container:r}=e,n=Pt(bd,t);return(0,he.jsx)(Jh,{scope:t,forceMount:a,children:pe.Children.map(o,s=>(0,he.jsx)(Ht,{present:a||n.open,children:(0,he.jsx)(co,{asChild:!0,container:r,children:s})}))})},"DialogPortal"),qs="DialogOverlay",Vs=pe.forwardRef(ft(function(t,a){let o=yd(qs,t.__scopeDialog),{forceMount:r=o.forceMount,...n}=t,s=Pt(qs,t.__scopeDialog);return s.modal?(0,he.jsx)(Ht,{present:r||s.open,children:(0,he.jsx)(ex,{...n,ref:a})}):null},"DialogOverlay")),Qh=ze("DialogOverlay.RemoveScroll"),ex=pe.forwardRef(ft(function(t,a){let{__scopeDialog:o,...r}=t,n=Pt(qs,o),s=xs(),l=Y(a,s);return(0,he.jsx)(La,{as:Qh,allowPinchZoom:!0,shards:[n.contentRef],children:(0,he.jsx)(Z.div,{"data-state":Ks(n.open),...r,ref:l,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),ir="DialogContent",Gs=pe.forwardRef(ft(function(t,a){let o=yd(ir,t.__scopeDialog),{forceMount:r=o.forceMount,...n}=t,s=Pt(ir,t.__scopeDialog);return(0,he.jsx)(Ht,{present:r||s.open,children:s.modal?(0,he.jsx)(tx,{...n,ref:a}):(0,he.jsx)(ax,{...n,ref:a})})},"DialogContent")),tx=pe.forwardRef(ft(function(t,a){let o=Pt(ir,t.__scopeDialog),r=pe.useRef(null),n=Y(a,o.contentRef,r);return pe.useEffect(()=>{let s=r.current;if(s)return vo(s)},[]),(0,he.jsx)(Rd,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:H(t.onCloseAutoFocus,s=>{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:H(t.onPointerDownOutside,s=>{let l=s.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&s.preventDefault()}),onFocusOutside:H(t.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),ax=pe.forwardRef(ft(function(t,a){let o=Pt(ir,t.__scopeDialog),r=pe.useRef(!1),n=pe.useRef(!1);return(0,he.jsx)(Rd,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let l=s.target;o.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})},"DialogContentNonModal")),Rd=pe.forwardRef(ft(function(t,a){let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,...l}=t,i=Pt(ir,o);return ta(),(0,he.jsx)(he.Fragment,{children:(0,he.jsx)(uo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:(0,he.jsx)(io,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionPresent?i.descriptionId:void 0,"aria-labelledby":i.titlePresent?i.titleId:void 0,"data-state":Ks(i.open),...l,ref:a,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})},"DialogContentImpl")),ox="DialogTitle",Ws=pe.forwardRef(ft(function(t,a){let{__scopeDialog:o,...r}=t,n=Pt(ox,o),{setTitleCount:s}=n;return ne(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),(0,he.jsx)(Z.h2,{id:n.titleId,...r,ref:a})},"DialogTitle")),rx="DialogDescription",js=pe.forwardRef(ft(function(t,a){let{__scopeDialog:o,...r}=t,n=Pt(rx,o),{setDescriptionCount:s}=n;return ne(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),(0,he.jsx)(Z.p,{id:n.descriptionId,...r,ref:a})},"DialogDescription")),nx="DialogClose",Pd=pe.forwardRef(ft(function(t,a){let{__scopeDialog:o,...r}=t,n=Pt(nx,o);return(0,he.jsx)(Z.button,{type:"button",...r,ref:a,onClick:H(t.onClick,()=>n.onOpenChange(!1))})},"DialogClose"));function Ks(e){return e?"open":"closed"}ft(Ks,"getState");var Md=require("react"),Xs="dsh-kanban",kd={boardTab:"\u770B\u677F",loading:"\u770B\u677F\u52A0\u8F7D\u4E2D\u2026",loadFailed:"\u770B\u677F\u52A0\u8F7D\u5931\u8D25\uFF1A",actionFailed:"\u64CD\u4F5C\u5931\u8D25\uFF1A",refresh:"\u5237\u65B0\u770B\u677F",settings:"\u8BBE\u7F6E",columnEdit:"\u5217\u7F16\u8F91",labelEdit:"\u6807\u7B7E\u7F16\u8F91",emptyColumn:"\u6682\u65E0\u5361\u7247",addCard:"\u6DFB\u52A0\u5361\u7247",dragSort:"\u62D6\u62FD\u6392\u5E8F",editCard:"\u7F16\u8F91\u5361\u7247",editCardDesc:"\u4FEE\u6539\u5361\u7247\u4FE1\u606F",newCardDesc:"\u65B0\u5EFA\u4E00\u5F20\u4EFB\u52A1\u5361\u7247",fieldTitle:"\u6807\u9898",titlePlaceholder:"\u5361\u7247\u6807\u9898",fieldLabel:"\u6807\u7B7E",noLabel:"\u65E0\u6807\u7B7E",fieldPriority:"\u4F18\u5148\u7EA7",noPriority:"\u65E0\u4F18\u5148\u7EA7",fieldNote:"\u5907\u6CE8",notePlaceholder:"\u5907\u6CE8\uFF08\u53EF\u9009\uFF09",cancel:"\u53D6\u6D88",save:"\u4FDD\u5B58",delete:"\u5220\u9664",add:"\u6DFB\u52A0",close:"\u5173\u95ED",columnEditDesc:"\u62D6\u62FD\u8C03\u6574\u5217\u7684\u987A\u5E8F\uFF0C\u6216\u91CD\u547D\u540D\u3001\u5220\u9664\u3001\u65B0\u589E\u5217\u8868",newColumnPlaceholder:"\u65B0\u5217\u8868\u540D\u79F0",labelEditDesc:"\u521B\u5EFA\u3001\u5220\u9664\u6216\u4FEE\u6539\u6807\u7B7E\uFF0C\u989C\u8272\u4E0E\u6807\u7B7E\u7ED1\u5B9A",newLabelPlaceholder:"\u65B0\u6807\u7B7E\u540D\u79F0",priorityFilter:"\u6309\u4F18\u5148\u7EA7\u7B5B\u9009",all:"\u5168\u90E8"},lx={boardTab:"Board",loading:"Loading board\u2026",loadFailed:"Failed to load board: ",actionFailed:"Action failed: ",refresh:"Refresh board",settings:"Settings",columnEdit:"Edit lists",labelEdit:"Edit labels",emptyColumn:"No cards",addCard:"Add card",dragSort:"Drag to reorder",editCard:"Edit card",editCardDesc:"Update card details",newCardDesc:"Create a new task card",fieldTitle:"Title",titlePlaceholder:"Card title",fieldLabel:"Label",noLabel:"No label",fieldPriority:"Priority",noPriority:"No priority",fieldNote:"Note",notePlaceholder:"Note (optional)",cancel:"Cancel",save:"Save",delete:"Delete",add:"Add",close:"Close",columnEditDesc:"Drag to reorder lists, or rename, delete and add lists",newColumnPlaceholder:"New list name",labelEditDesc:"Create, delete or edit labels; color is bound to the label",newLabelPlaceholder:"New label name",priorityFilter:"Filter by priority",all:"All"},Ia=null,$s=null;function Ad(e){let t=e.get("locale");if(t!==void 0){Ia=t;try{t.register(Xs,"zh",kd),t.register(Xs,"en",lx)}catch{}$s=t.bind(Xs)}}function Ys(e){return $s?$s(e):kd[e]??e}var ix=e=>Ia&&typeof Ia.subscribe=="function"?Ia.subscribe(e):()=>{},Dd=()=>Ia&&typeof Ia.getSnapshot=="function"?Ia.getSnapshot():null;function at(){return(0,Md.useSyncExternalStore)(ix,Dd,Dd),Ys}var ot=require("react/jsx-runtime"),wo=Id;var ux=Sd;var Td=ur.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(Vs,{ref:a,className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Td.displayName=Vs.displayName;var ba=ur.forwardRef(({className:e,children:t,...a},o)=>{let r=at();return(0,ot.jsxs)(ux,{children:[(0,ot.jsx)(Td,{}),(0,ot.jsxs)(Gs,{ref:o,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,ot.jsxs)(Pd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,ot.jsx)(er,{className:"h-4 w-4"}),(0,ot.jsx)("span",{className:"sr-only",children:r("close")})]})]})]})});ba.displayName=Gs.displayName;var ya=({className:e,...t})=>(0,ot.jsx)("div",{className:K("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ya.displayName="DialogHeader";var dr=({className:e,...t})=>(0,ot.jsx)("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});dr.displayName="DialogFooter";var Sa=ur.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(Ws,{ref:a,className:K("text-lg font-semibold leading-none tracking-tight",e),...t}));Sa.displayName=Ws.displayName;var Ra=ur.forwardRef(({className:e,...t},a)=>(0,ot.jsx)(js,{ref:a,className:K("text-sm text-muted-foreground",e),...t}));Ra.displayName=js.displayName;var Ed=U(require("react"),1);var Od=require("react/jsx-runtime"),qt=Ed.forwardRef(({className:e,type:t,...a},o)=>(0,Od.jsx)("input",{type:t,className:K("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));qt.displayName="Input";var Nd=U(require("react"),1);var Fd=U(require("react"),1);var Bd=require("react/jsx-runtime"),dx=Object.defineProperty,cx=(e,t)=>dx(e,"name",{value:t,configurable:!0}),fx=Fd.forwardRef(cx(function(t,a){return(0,Bd.jsx)(Z.label,{...t,ref:a,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(t.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}})},"Label")),Zs=fx;var _d=require("react/jsx-runtime"),Co=Nd.forwardRef(({className:e,...t},a)=>(0,_d.jsx)(Zs,{ref:a,className:K("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));Co.displayName=Zs.displayName;var na=U(require("react"),1);var T=U(require("react"),1),pl=U(require("react-dom"),1);var mx=Object.defineProperty,gx=(e,t)=>mx(e,"name",{value:t,configurable:!0});function sn(e,[t,a]){return Math.min(a,Math.max(t,e))}gx(sn,"clamp");var ht=U(require("react"),1);var ln=require("react/jsx-runtime"),$e=U(require("react"),1);var Pa=require("react/jsx-runtime");var hx=Object.defineProperty,Te=(e,t)=>hx(e,"name",{value:t,configurable:!0});function Da(e){let t=e+"CollectionProvider",[a,o]=Ne(t),[r,n]=a(t,{collectionRef:{current:null},itemMap:new Map}),s=Te(p=>{let{scope:m,children:x}=p,w=ht.useRef(null),v=ht.useRef(new Map).current;return(0,ln.jsx)(r,{scope:m,itemMap:v,collectionRef:w,children:x})},"CollectionProvider");s.displayName=t;let l=e+"CollectionSlot",i=ze(l),u=ht.forwardRef((p,m)=>{let{scope:x,children:w}=p,v=n(l,x),C=Y(m,v.collectionRef);return(0,ln.jsx)(i,{ref:C,children:w})});u.displayName=l;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=ze(c),h=ht.forwardRef((p,m)=>{let{scope:x,children:w,...v}=p,C=ht.useRef(null),I=Y(m,C),L=n(c,x);return ht.useEffect(()=>(L.itemMap.set(C,{ref:C,...v}),()=>{L.itemMap.delete(C)})),(0,ln.jsx)(f,{[d]:"",ref:I,children:w})});h.displayName=c;function g(p){let m=n(e+"CollectionConsumer",p);return ht.useCallback(()=>{let w=m.collectionRef.current;if(!w)return[];let v=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((L,y)=>v.indexOf(L.ref.current)-v.indexOf(y.ref.current))},[m.collectionRef,m.itemMap])}return Te(g,"useCollection"),[{Provider:s,Slot:u,ItemSlot:h},g,o]}Te(Da,"createCollection");var Ud=new WeakMap,Le,rt,Js=(rt=class extends Map{constructor(a){super(a);oi(this,Le);Vn(this,Le,[...super.keys()]),Ud.set(this,!0)}set(a,o){return Ud.get(this)&&(this.has(a)?He(this,Le)[He(this,Le).indexOf(a)]=a:He(this,Le).push(a)),super.set(a,o),this}insert(a,o,r){let n=this.has(o),s=He(this,Le).length,l=el(a),i=l>=0?l:s+l,u=i<0||i>=s?-1:i;if(u===this.size||n&&u===this.size-1||u===-1)return this.set(o,r),this;let c=this.size+(n?0:1);l<0&&i++;let d=[...He(this,Le)],f,h=!1;for(let g=i;g<c;g++)if(i===g){let p=d[g];d[g]===o&&(p=d[g+1]),n&&this.delete(o),f=this.get(p),this.set(o,r)}else{!h&&d[g-1]===o&&(h=!0);let p=d[h?g:g-1],m=f;f=this.get(p),this.delete(p),this.set(p,m)}return this}with(a,o,r){let n=new rt(this);return n.insert(a,o,r),n}before(a){let o=He(this,Le).indexOf(a)-1;if(!(o<0))return this.entryAt(o)}setBefore(a,o,r){let n=He(this,Le).indexOf(a);return n===-1?this:this.insert(n,o,r)}after(a){let o=He(this,Le).indexOf(a);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(a,o,r){let n=He(this,Le).indexOf(a);return n===-1?this:this.insert(n+1,o,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Vn(this,Le,[]),super.clear()}delete(a){let o=super.delete(a);return o&&He(this,Le).splice(He(this,Le).indexOf(a),1),o}deleteAt(a){let o=this.keyAt(a);return o!==void 0?this.delete(o):!1}at(a){let o=un(He(this,Le),a);if(o!==void 0)return this.get(o)}entryAt(a){let o=un(He(this,Le),a);if(o!==void 0)return[o,this.get(o)]}indexOf(a){return He(this,Le).indexOf(a)}keyAt(a){return un(He(this,Le),a)}from(a,o){let r=this.indexOf(a);if(r===-1)return;let n=r+o;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(a,o){let r=this.indexOf(a);if(r===-1)return;let n=r+o;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(a,o){let r=0;for(let n of this){if(Reflect.apply(a,o,[n,r,this]))return n;r++}}findIndex(a,o){let r=0;for(let n of this){if(Reflect.apply(a,o,[n,r,this]))return r;r++}return-1}filter(a,o){let r=[],n=0;for(let s of this)Reflect.apply(a,o,[s,n,this])&&r.push(s),n++;return new rt(r)}map(a,o){let r=[],n=0;for(let s of this)r.push([s[0],Reflect.apply(a,o,[s,n,this])]),n++;return new rt(r)}reduce(...a){let[o,r]=a,n=0,s=r??this.at(0);for(let l of this)n===0&&a.length===1?s=l:s=Reflect.apply(o,this,[s,l,n,this]),n++;return s}reduceRight(...a){let[o,r]=a,n=r??this.at(-1);for(let s=this.size-1;s>=0;s--){let l=this.at(s);s===this.size-1&&a.length===1?n=l:n=Reflect.apply(o,this,[n,l,s,this])}return n}toSorted(a){let o=[...this.entries()].sort(a);return new rt(o)}toReversed(){let a=new rt;for(let o=this.size-1;o>=0;o--){let r=this.keyAt(o),n=this.get(r);a.set(r,n)}return a}toSpliced(...a){let o=[...this.entries()];return o.splice(...a),new rt(o)}slice(a,o){let r=new rt,n=this.size-1;if(a===void 0)return r;a<0&&(a=a+this.size),o!==void 0&&o>0&&(n=o-1);for(let s=a;s<=n;s++){let l=this.keyAt(s),i=this.get(l);r.set(l,i)}return r}every(a,o){let r=0;for(let n of this){if(!Reflect.apply(a,o,[n,r,this]))return!1;r++}return!0}some(a,o){let r=0;for(let n of this){if(Reflect.apply(a,o,[n,r,this]))return!0;r++}return!1}},Le=new WeakMap,Te(rt,"OrderedDict"),rt);function un(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=Hd(e,t);return a===-1?void 0:e[a]}Te(un,"at");function Hd(e,t){let a=e.length,o=el(t),r=o>=0?o:a+o;return r<0||r>=a?-1:r}Te(Hd,"toSafeIndex");function el(e){return e!==e||e===0?0:Math.trunc(e)}Te(el,"toSafeInteger");function xx(e){let t=e+"CollectionProvider",[a,o]=Ne(t),[r,n]=a(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Js,setItemMap:Te(()=>{},"setItemMap")}),s=Te(({state:v,...C})=>v?(0,Pa.jsx)(i,{...C,state:v}):(0,Pa.jsx)(l,{...C}),"CollectionProvider");s.displayName=t;let l=Te(v=>{let C=m();return(0,Pa.jsx)(i,{...v,state:C})},"CollectionInit");l.displayName=t+"Init";let i=Te(v=>{let{scope:C,children:I,state:L}=v,y=$e.useRef(null),[R,P]=$e.useState(null),k=Y(y,P),[O,D]=L;return $e.useEffect(()=>{if(!R)return;let B=Vd(()=>{});return B.observe(R,{childList:!0,subtree:!0}),()=>{B.disconnect()}},[R]),(0,Pa.jsx)(r,{scope:C,itemMap:O,setItemMap:D,collectionRef:k,collectionRefObject:y,collectionElement:R,children:I})},"CollectionProviderImpl");i.displayName=t+"Impl";let u=e+"CollectionSlot",c=ze(u),d=$e.forwardRef((v,C)=>{let{scope:I,children:L}=v,y=n(u,I),R=Y(C,y.collectionRef);return(0,Pa.jsx)(c,{ref:R,children:L})});d.displayName=u;let f=e+"CollectionItemSlot",h="data-radix-collection-item",g=ze(f),p=$e.forwardRef((v,C)=>{let{scope:I,children:L,...y}=v,R=$e.useRef(null),[P,k]=$e.useState(null),O=Y(C,R,k),D=n(f,I),{setItemMap:B}=D,_=$e.useRef(y);qd(_.current,y)||(_.current=y);let G=_.current;return $e.useEffect(()=>{let S=G;return B(M=>P?M.has(P)?M.set(P,{...S,element:P}).toSorted(Qs):(M.set(P,{...S,element:P}),M.toSorted(Qs)):M),()=>{B(M=>!P||!M.has(P)?M:(M.delete(P),new Js(M)))}},[P,G,B]),(0,Pa.jsx)(g,{[h]:"",ref:O,children:L})});p.displayName=f;function m(){return $e.useState(new Js)}Te(m,"useInitCollection");function x(v){let{itemMap:C}=n(e+"CollectionConsumer",v);return C}return Te(x,"useCollection"),[{Provider:s,Slot:d,ItemSlot:p},{createCollectionScope:o,useCollection:x,useInitCollection:m}]}Te(xx,"createCollection");function qd(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Te(qd,"shallowEqual");function zd(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Te(zd,"isElementPreceding");function Qs(e,t){return!e[1].element||!t[1].element?0:zd(e[1].element,t[1].element)?-1:1}Te(Qs,"sortByDocumentPosition");function Vd(e){return new MutationObserver(a=>{for(let o of a)if(o.type==="childList"){e();return}})}Te(Vd,"getChildListObserver");var dn=U(require("react"),1),Cx=require("react/jsx-runtime"),vx=Object.defineProperty,wx=(e,t)=>vx(e,"name",{value:t,configurable:!0}),Lx=dn.createContext(void 0);function Ma(e){let t=dn.useContext(Lx);return e||t||"ltr"}wx(Ma,"useDirection");var Ge=U(require("react"),1);var jd=["top","right","bottom","left"];var Dt=Math.min,xt=Math.max,fr=Math.round,pr=Math.floor,Mt=e=>({x:e,y:e}),Ix={left:"right",right:"left",bottom:"top",top:"bottom"};function tl(e,t,a){return xt(e,Dt(t,a))}function kt(e,t){return typeof e=="function"?e(t):e}function zt(e){return e.split("-")[0]}function ka(e){return e.split("-")[1]}function fn(e){return e==="x"?"y":"x"}function pn(e){return e==="y"?"height":"width"}function vt(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function mn(e){return fn(vt(e))}function Kd(e,t,a){a===void 0&&(a=!1);let o=ka(e),r=mn(e),n=pn(r),s=r==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=cr(s)),[s,cr(s)]}function Xd(e){let t=cr(e);return[cn(e),t,cn(t)]}function cn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Gd=["left","right"],Wd=["right","left"],bx=["top","bottom"],yx=["bottom","top"];function Sx(e,t,a){switch(e){case"top":case"bottom":return a?t?Wd:Gd:t?Gd:Wd;case"left":case"right":return t?bx:yx;default:return[]}}function $d(e,t,a,o){let r=ka(e),n=Sx(zt(e),a==="start",o);return r&&(n=n.map(s=>s+"-"+r),t&&(n=n.concat(n.map(cn)))),n}function cr(e){let t=zt(e);return Ix[t]+e.slice(t.length)}function Rx(e){var t,a,o,r;return{top:(t=e.top)!=null?t:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function al(e){return typeof e!="number"?Rx(e):{top:e,right:e,bottom:e,left:e}}function Aa(e){let{x:t,y:a,width:o,height:r}=e;return{width:o,height:r,top:a,left:t,right:t+o,bottom:a+r,x:t,y:a}}function Yd(e,t,a){let{reference:o,floating:r}=e,n=vt(t),s=mn(t),l=pn(s),i=zt(t),u=n==="y",c=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[l]/2-r[l]/2,h;switch(i){case"top":h={x:c,y:o.y-r.height};break;case"bottom":h={x:c,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}let g=ka(t);return g&&(h[s]+=f*(g==="end"?1:-1)*(a&&u?-1:1)),h}async function Qd(e,t){var a;t===void 0&&(t={});let{x:o,y:r,platform:n,rects:s,elements:l,strategy:i}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=kt(t,e),g=al(h),m=l[f?d==="floating"?"reference":"floating":d],x=Aa(await n.getClippingRect({element:(a=await(n.isElement==null?void 0:n.isElement(m)))==null||a?m:m.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:i})),w=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating)),C=await(n.isElement==null?void 0:n.isElement(v))&&await(n.getScale==null?void 0:n.getScale(v))||{x:1,y:1},I=Aa(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:v,strategy:i}):w);return{top:(x.top-I.top+g.top)/C.y,bottom:(I.bottom-x.bottom+g.bottom)/C.y,left:(x.left-I.left+g.left)/C.x,right:(I.right-x.right+g.right)/C.x}}var Px=50,ec=async(e,t,a)=>{let{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:s}=a,l=s.detectOverflow?s:{...s,detectOverflow:Qd},i=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=Yd(u,o,i),f=o,h=0,g={};for(let p=0;p<n.length;p++){let m=n[p];if(!m)continue;let{name:x,fn:w}=m,{x:v,y:C,data:I,reset:L}=await w({x:c,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});c=v??c,d=C??d,g[x]={...g[x],...I},L&&h<Px&&(h++,typeof L=="object"&&(L.placement&&(f=L.placement),L.rects&&(u=L.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):L.rects),{x:c,y:d}=Yd(u,f,i)),p=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:g}},tc=e=>({name:"arrow",options:e,async fn(t){let{x:a,y:o,placement:r,rects:n,platform:s,elements:l,middlewareData:i}=t,{element:u,padding:c=0}=kt(e,t)||{};if(u==null)return{};let d=al(c),f={x:a,y:o},h=mn(r),g=pn(h),p=await s.getDimensions(u),m=h==="y",x=m?"top":"left",w=m?"bottom":"right",v=m?"clientHeight":"clientWidth",C=n.reference[g]+n.reference[h]-f[h]-n.floating[g],I=f[h]-n.reference[h],L=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),y=L?L[v]:0;(!y||!await(s.isElement==null?void 0:s.isElement(L)))&&(y=l.floating[v]||n.floating[g]);let R=C/2-I/2,P=y/2-p[g]/2-1,k=Dt(d[x],P),O=Dt(d[w],P),D=y-p[g]-O,B=y/2-p[g]/2+R,_=tl(k,B,D),G=!i.arrow&&ka(r)!=null&&B!==_&&n.reference[g]/2-(B<k?k:O)-p[g]/2<0,S=G?B<k?B-k:B-D:0;return{[h]:f[h]+S,data:{[h]:_,centerOffset:B-_-S,...G&&{alignmentOffset:S}},reset:G}}});var ac=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;let{placement:r,middlewareData:n,rects:s,initialPlacement:l,platform:i,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...m}=kt(e,t);if((a=n.arrow)!=null&&a.alignmentOffset)return{};let x=zt(r),w=vt(l),v=zt(l)===l,C=await(i.isRTL==null?void 0:i.isRTL(u.floating)),I=f||(v||!p?[cr(l)]:Xd(l)),L=g!=="none";!f&&L&&I.push(...$d(l,p,g,C));let y=[l,...I],R=await i.detectOverflow(t,m),P=[],k=((o=n.flip)==null?void 0:o.overflows)||[];if(c&&P.push(R[x]),d){let _=Kd(r,s,C);P.push(R[_[0]],R[_[1]])}if(k=[...k,{placement:r,overflows:P}],!P.every(_=>_<=0)){var O,D;let _=(((O=n.flip)==null?void 0:O.index)||0)+1,G=y[_];if(G&&(!(d==="alignment"?w!==vt(G):!1)||k.every(A=>vt(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:_,overflows:k},reset:{placement:G}};let S=(D=k.filter(M=>M.overflows[0]<=0).sort((M,A)=>M.overflows[1]-A.overflows[1])[0])==null?void 0:D.placement;if(!S)switch(h){case"bestFit":{var B;let M=(B=k.filter(A=>{if(L){let N=vt(A.placement);return N===w||N==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(N=>N>0).reduce((N,E)=>N+E,0)]).sort((A,N)=>A[1]-N[1])[0])==null?void 0:B[0];M&&(S=M);break}case"initialPlacement":S=l;break}if(r!==S)return{reset:{placement:S}}}return{}}}};function Zd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jd(e){return jd.some(t=>e[t]>=0)}var oc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:a,platform:o}=t,{strategy:r="referenceHidden",...n}=kt(e,t);switch(r){case"referenceHidden":{let s=await o.detectOverflow(t,{...n,elementContext:"reference"}),l=Zd(s,a.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Jd(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...n,altBoundary:!0}),l=Zd(s,a.floating);return{data:{escapedOffsets:l,escaped:Jd(l)}}}default:return{}}}}};var rc=new Set(["left","top"]);async function Dx(e,t){let{placement:a,platform:o,elements:r}=e,n=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=zt(a),l=ka(a),i=vt(a)==="y",u=rc.has(s)?-1:1,c=n&&i?-1:1,d=kt(t,e),{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),i?{x:h*c,y:f*u}:{x:f*u,y:h*c}}var nc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;let{x:r,y:n,placement:s,middlewareData:l}=t,i=await Dx(t,e);return s===((a=l.offset)==null?void 0:a.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+i.x,y:n+i.y,data:{...i,placement:s}}}}},sc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:a,y:o,placement:r,platform:n}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:i={fn:w=>{let{x:v,y:C}=w;return{x:v,y:C}}},...u}=kt(e,t),c={x:a,y:o},d=await n.detectOverflow(t,u),f=vt(r),h=fn(f),g=c[h],p=c[f],m=(w,v)=>tl(v+d[w==="y"?"top":"left"],v,v-d[w==="y"?"bottom":"right"]);s&&(g=m(h,g)),l&&(p=m(f,p));let x=i.fn({...t,[h]:g,[f]:p});return{...x,data:{x:x.x-a,y:x.y-o,enabled:{[h]:s,[f]:l}}}}}},lc=function(e){return e===void 0&&(e={}),{options:e,fn(t){var a,o;let{x:r,y:n,placement:s,rects:l,middlewareData:i}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=kt(e,t),f={x:r,y:n},h=vt(s),g=fn(h),p=f[g],m=f[h],x=kt(u,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(a=x.mainAxis)!=null?a:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(c){let I=g==="y"?"height":"width",L=l.reference[g]-l.floating[I]+w.mainAxis,y=l.reference[g]+l.reference[I]-w.mainAxis;p<L?p=L:p>y&&(p=y)}if(d){var v,C;let I=g==="y"?"width":"height",L=rc.has(zt(s)),y=l.reference[h]-l.floating[I]+(L&&((v=i.offset)==null?void 0:v[h])||0)+(L?0:w.crossAxis),R=l.reference[h]+l.reference[I]+(L?0:((C=i.offset)==null?void 0:C[h])||0)-(L?w.crossAxis:0);m<y?m=y:m>R&&(m=R)}return{[g]:p,[h]:m}}}},ic=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:a,rects:o,platform:r,elements:n}=t,{apply:s=()=>{},...l}=kt(e,t),i=await r.detectOverflow(t,l),u=zt(a),c=ka(a),d=vt(a)==="y",{width:f,height:h}=o.floating,g,p;u==="top"||u==="bottom"?(g=u,p=c===(await(r.isRTL==null?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"):(p=u,g=c==="end"?"top":"bottom");let m=h-i.top-i.bottom,x=f-i.left-i.right,w=Dt(h-i[g],m),v=Dt(f-i[p],x),C=t.middlewareData.shift,I=!C,L=w,y=v;C!=null&&C.enabled.x&&(y=x),C!=null&&C.enabled.y&&(L=m),I&&!c&&(d?y=f-2*xt(i.left,i.right):L=h-2*xt(i.top,i.bottom)),await s({...t,availableWidth:y,availableHeight:L});let R=await r.getDimensions(n.floating);return f!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function gn(){return typeof window<"u"}function Oa(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function At(e){var t;return(t=(dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dc(e){return gn()?e instanceof Node||e instanceof Ke(e).Node:!1}function wt(e){return gn()?e instanceof Element||e instanceof Ke(e).Element:!1}function Vt(e){return gn()?e instanceof HTMLElement||e instanceof Ke(e).HTMLElement:!1}function uc(e){return!gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ke(e).ShadowRoot}function mr(e){let{overflow:t,overflowX:a,overflowY:o,display:r}=Ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&r!=="inline"&&r!=="contents"}function cc(e){return/^(table|td|th)$/.test(Oa(e))}function gr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Mx=/transform|translate|scale|rotate|perspective|filter/,kx=/paint|layout|strict|content/,Ta=e=>!!e&&e!=="none",ol;function hn(e){let t=wt(e)?Ct(e):e;return Ta(t.transform)||Ta(t.translate)||Ta(t.scale)||Ta(t.rotate)||Ta(t.perspective)||!xn()&&(Ta(t.backdropFilter)||Ta(t.filter))||Mx.test(t.willChange||"")||kx.test(t.contain||"")}function fc(e){let t=aa(e);for(;Vt(t)&&!Lo(t);){if(hn(t))return t;if(gr(t))return null;t=aa(t)}return null}function xn(){return ol==null&&(ol=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ol}function Lo(e){return/^(html|body|#document)$/.test(Oa(e))}function Ct(e){return Ke(e).getComputedStyle(e)}function hr(e){return wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function aa(e){if(Oa(e)==="html")return e;let t=e.assignedSlot||e.parentNode||uc(e)&&e.host||At(e);return uc(t)?t.host:t}function pc(e){let t=aa(e);return Lo(t)?(e.ownerDocument||e).body:Vt(t)&&mr(t)?t:pc(t)}function Ea(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);let r=pc(e),n=r===((o=e.ownerDocument)==null?void 0:o.body),s=Ke(r);if(n){let l=vn(s);return t.concat(s,s.visualViewport||[],mr(r)?r:[],l&&a?Ea(l):[])}else return t.concat(r,Ea(r,[],a))}function vn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hc(e){let t=Ct(e),a=parseFloat(t.width)||0,o=parseFloat(t.height)||0,r=Vt(e),n=r?e.offsetWidth:a,s=r?e.offsetHeight:o,l=fr(a)!==n||fr(o)!==s;return l&&(a=n,o=s),{width:a,height:o,$:l}}function nl(e){return wt(e)?e:e.contextElement}function Io(e){let t=nl(e);if(!Vt(t))return Mt(1);let a=t.getBoundingClientRect(),{width:o,height:r,$:n}=hc(t),s=(n?fr(a.width):a.width)/o,l=(n?fr(a.height):a.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Ax=Mt(0);function xc(e){let t=Ke(e);return!xn()||!t.visualViewport?Ax:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tx(e,t,a){return t===void 0&&(t=!1),!!a&&t&&a===Ke(e)}function Fa(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);let r=e.getBoundingClientRect(),n=nl(e),s=Mt(1);t&&(o?wt(o)&&(s=Io(o)):s=Io(e));let l=Tx(n,a,o)?xc(n):Mt(0),i=(r.left+l.x)/s.x,u=(r.top+l.y)/s.y,c=r.width/s.x,d=r.height/s.y;if(n&&o){let f=Ke(n),h=wt(o)?Ke(o):o,g=f,p=vn(g);for(;p&&h!==g;){let m=Io(p),x=p.getBoundingClientRect(),w=Ct(p),v=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*m.x,C=x.top+(p.clientTop+parseFloat(w.paddingTop))*m.y;i*=m.x,u*=m.y,c*=m.x,d*=m.y,i+=v,u+=C,g=Ke(p),p=vn(g)}}return Aa({width:c,height:d,x:i,y:u})}function wn(e,t){let a=hr(e).scrollLeft;return t?t.left+a:Fa(At(e)).left+a}function vc(e,t){let a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-wn(e,a),r=a.top+t.scrollTop;return{x:o,y:r}}function Ex(e){let{elements:t,rect:a,offsetParent:o,strategy:r}=e,n=r==="fixed",s=At(o),l=t?gr(t.floating):!1;if(o===s||l&&n)return a;let i={scrollLeft:0,scrollTop:0},u=Mt(1),c=Mt(0),d=Vt(o);if((d||!n)&&((Oa(o)!=="body"||mr(s))&&(i=hr(o)),d)){let h=Fa(o);u=Io(o),c.x=h.x+o.clientLeft,c.y=h.y+o.clientTop}let f=s&&!d&&!n?vc(s,i):Mt(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-i.scrollLeft*u.x+c.x+f.x,y:a.y*u.y-i.scrollTop*u.y+c.y+f.y}}function Ox(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Fx(e){let t=hr(e),a=e.ownerDocument.body,o=xt(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),r=xt(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight),n=-t.scrollLeft+wn(e),s=-t.scrollTop;return Ct(a).direction==="rtl"&&(n+=xt(e.clientWidth,a.clientWidth)-o),{width:o,height:r,x:n,y:s}}var Bx=25;function Nx(e,t,a){a===void 0&&(a="viewport");let o=a==="layoutViewport",r=Ke(e),n=At(e),s=r.visualViewport,l=n.clientWidth,i=n.clientHeight,u=0,c=0;if(s){let f=!xn()||t==="fixed";o?f||(u=-s.offsetLeft,c=-s.offsetTop):(l=s.width,i=s.height,f&&(u=s.offsetLeft,c=s.offsetTop))}if(wn(n)<=0){let f=n.ownerDocument,h=f.body,g=getComputedStyle(h),p=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,m=Math.abs(n.clientWidth-h.clientWidth-p),x=getComputedStyle(n).scrollbarGutter==="stable both-edges"?m/2:m;x<=Bx&&(l-=x)}return{width:l,height:i,x:u,y:c}}function _x(e,t){let a=Fa(e,!0,t==="fixed"),o=a.top+e.clientTop,r=a.left+e.clientLeft,n=Io(e),s=e.clientWidth*n.x,l=e.clientHeight*n.y,i=r*n.x,u=o*n.y;return{width:s,height:l,x:i,y:u}}function mc(e,t,a){let o;if(t==="viewport"||t==="layoutViewport")o=Nx(e,a,t);else if(t==="document")o=Fx(At(e));else if(wt(t))o=_x(t,a);else{let r=xc(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Aa(o)}function Ux(e,t){let a=t.get(e);if(a)return a;let o=Ea(e,[],!1).filter(l=>wt(l)&&Oa(l)!=="body"),r=null,n=Ct(e).position==="fixed",s=n?aa(e):e;for(;wt(s)&&!Lo(s);){let l=Ct(s),i=hn(s),u=r?r.position:n?"fixed":"";!i&&(u==="fixed"||u==="absolute"&&l.position==="static")?o=o.filter(d=>d!==s):r=l,s=aa(s)}return t.set(e,o),o}function Hx(e){let{element:t,boundary:a,rootBoundary:o,strategy:r}=e,s=[...a==="clippingAncestors"?gr(t)?[]:Ux(t,this._c):[].concat(a),o],l=mc(t,s[0],r),i=l.top,u=l.right,c=l.bottom,d=l.left;for(let f=1;f<s.length;f++){let h=mc(t,s[f],r);i=xt(h.top,i),u=Dt(h.right,u),c=Dt(h.bottom,c),d=xt(h.left,d)}return{width:u-d,height:c-i,x:d,y:i}}function qx(e){let{width:t,height:a}=hc(e);return{width:t,height:a}}function zx(e,t,a){let o=Vt(t),r=At(t),n=a==="fixed",s=Fa(e,!0,n,t),l={scrollLeft:0,scrollTop:0},i=Mt(0);if((o||!n)&&((Oa(t)!=="body"||mr(r))&&(l=hr(t)),o)){let f=Fa(t,!0,n,t);i.x=f.x+t.clientLeft,i.y=f.y+t.clientTop}!o&&r&&(i.x=wn(r));let u=r&&!o&&!n?vc(r,l):Mt(0),c=s.left+l.scrollLeft-i.x-u.x,d=s.top+l.scrollTop-i.y-u.y;return{x:c,y:d,width:s.width,height:s.height}}function rl(e){return Ct(e).position==="static"}function gc(e,t){if(!Vt(e)||Ct(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return At(e)===a&&(a=a.ownerDocument.body),a}function wc(e,t){let a=Ke(e);if(gr(e))return a;if(!Vt(e)){let r=aa(e);for(;r&&!Lo(r);){if(wt(r)&&!rl(r))return r;r=aa(r)}return a}let o=gc(e,t);for(;o&&cc(o)&&rl(o);)o=gc(o,t);return o&&Lo(o)&&rl(o)&&!hn(o)?a:o||fc(e)||a}var Vx=async function(e){let t=this.getOffsetParent||wc,a=this.getDimensions,o=await a(e.floating);return{reference:zx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Gx(e){return Ct(e).direction==="rtl"}var Cc={convertOffsetParentRelativeRectToViewportRelativeRect:Ex,getDocumentElement:At,getClippingRect:Hx,getOffsetParent:wc,getElementRects:Vx,getClientRects:Ox,getDimensions:qx,getScale:Io,isElement:wt,isRTL:Gx};function Lc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wx(e,t,a){let o=null,r,n=At(e);function s(){var c;clearTimeout(r),(c=o)==null||c.disconnect(),o=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();let f=e.getBoundingClientRect(),{left:h,top:g,width:p,height:m}=f;if(c||t(),!p||!m)return;let x=pr(g),w=pr(n.clientWidth-(h+p)),v=pr(n.clientHeight-(g+m)),C=pr(h),L={rootMargin:-x+"px "+-w+"px "+-v+"px "+-C+"px",threshold:xt(0,Dt(1,d))||1},y=!0;function R(P){let k=P[0].intersectionRatio;if(!Lc(f,e.getBoundingClientRect()))return l();if(k!==d){if(!y)return l();k?l(!1,k):r=setTimeout(()=>{l(!1,1e-7)},1e3)}y=!1}try{o=new IntersectionObserver(R,{...L,root:n.ownerDocument})}catch{o=new IntersectionObserver(R,L)}o.observe(e)}let i=Ke(e),u=()=>l(a);return i.addEventListener("resize",u),l(!0),()=>{i.removeEventListener("resize",u),s()}}function sl(e,t,a,o){o===void 0&&(o={});let{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:i=!1}=o,u=nl(e),c=r||n?[...u?Ea(u):[],...t?Ea(t):[]]:[];c.forEach(x=>{r&&x.addEventListener("scroll",a),n&&x.addEventListener("resize",a)});let d=u&&l?Wx(u,a,n):null,f=-1,h=null;s&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),a()}),u&&!i&&h.observe(u),t&&h.observe(t));let g,p=i?Fa(e):null;i&&m();function m(){let x=Fa(e);p&&!Lc(p,x)&&a(),p=x,g=requestAnimationFrame(m)}return a(),()=>{var x;c.forEach(w=>{r&&w.removeEventListener("scroll",a),n&&w.removeEventListener("resize",a)}),d?.(),(x=h)==null||x.disconnect(),h=null,i&&cancelAnimationFrame(g)}}var Ic=nc;var bc=sc,yc=ac,Sc=ic,Rc=oc,ll=tc;var Pc=lc,il=(e,t,a)=>{let o=new Map,r=a??{},n={...Cc,...r.platform,_c:o};return ec(e,t,{...r,platform:n})};var Ie=U(require("react"),1),Mc=require("react"),kc=U(require("react-dom"),1),jx=typeof document<"u",Kx=function(){},Cn=jx?Mc.useLayoutEffect:Kx;function Ln(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let a,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!Ln(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),a=r.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=a;o--!==0;){let n=r[o];if(!(n==="_owner"&&e.$$typeof)&&!Ln(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ac(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dc(e,t){let a=Ac(e);return Math.round(t*a)/a}function ul(e){let t=Ie.useRef(e);return Cn(()=>{t.current=e}),t}function Tc(e){e===void 0&&(e={});let{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:r,elements:{reference:n,floating:s}={},transform:l=!0,whileElementsMounted:i,open:u}=e,[c,d]=Ie.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=Ie.useState(o);Ln(f,o)||h(o);let[g,p]=Ie.useState(null),[m,x]=Ie.useState(null),w=Ie.useCallback(A=>{A!==L.current&&(L.current=A,p(A))},[]),v=Ie.useCallback(A=>{A!==y.current&&(y.current=A,x(A))},[]),C=n||g,I=s||m,L=Ie.useRef(null),y=Ie.useRef(null),R=Ie.useRef(c),P=i!=null,k=ul(i),O=ul(r),D=ul(u),B=Ie.useCallback(()=>{if(!L.current||!y.current)return;let A={placement:t,strategy:a,middleware:f};O.current&&(A.platform=O.current),il(L.current,y.current,A).then(N=>{let E={...N,isPositioned:D.current!==!1};_.current&&!Ln(R.current,E)&&(R.current=E,kc.flushSync(()=>{d(E)}))})},[f,t,a,O,D]);Cn(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);let _=Ie.useRef(!1);Cn(()=>(_.current=!0,()=>{_.current=!1}),[]),Cn(()=>{if(C&&(L.current=C),I&&(y.current=I),C&&I){if(k.current)return k.current(C,I,B);B()}},[C,I,B,k,P]);let G=Ie.useMemo(()=>({reference:L,floating:y,setReference:w,setFloating:v}),[w,v]),S=Ie.useMemo(()=>({reference:C,floating:I}),[C,I]),M=Ie.useMemo(()=>{let A={position:a,left:0,top:0};if(!S.floating)return A;let N=Dc(S.floating,c.x),E=Dc(S.floating,c.y);return l?{...A,transform:"translate("+N+"px, "+E+"px)",...Ac(S.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:N,top:E}},[a,l,S.floating,c.x,c.y]);return Ie.useMemo(()=>({...c,update:B,refs:G,elements:S,floatingStyles:M}),[c,B,G,S,M])}var Xx=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){let{element:o,padding:r}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?ll({element:o.current,padding:r}).fn(a):{}:o?ll({element:o,padding:r}).fn(a):{}}}},Ec=(e,t)=>{let a=Ic(e);return{name:a.name,fn:a.fn,options:[e,t]}},Oc=(e,t)=>{let a=bc(e);return{name:a.name,fn:a.fn,options:[e,t]}},Fc=(e,t)=>({fn:Pc(e).fn,options:[e,t]}),Bc=(e,t)=>{let a=yc(e);return{name:a.name,fn:a.fn,options:[e,t]}},Nc=(e,t)=>{let a=Sc(e);return{name:a.name,fn:a.fn,options:[e,t]}};var _c=(e,t)=>{let a=Rc(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Uc=(e,t)=>{let a=Xx(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Hc=U(require("react"),1);var $x=Object.defineProperty,Yx=(e,t)=>$x(e,"name",{value:t,configurable:!0});function dl(e){let[t,a]=Hc.useState(void 0);return ne(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let n=r[0],s,l;if("borderBoxSize"in n){let i=n.borderBoxSize,u=Array.isArray(i)?i[0]:i;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;a({width:s,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else a(void 0)},[e]),t}Yx(dl,"useSize");var bo=require("react/jsx-runtime"),Zx=Object.defineProperty,oa=(e,t)=>Zx(e,"name",{value:t,configurable:!0});var qc="Popper",[zc,yo]=Ne(qc),[Jx,Vc]=zc(qc),Qx=oa(e=>{let{__scopePopper:t,children:a}=e,[o,r]=Ge.useState(null),[n,s]=Ge.useState(void 0);return(0,bo.jsx)(Jx,{scope:t,anchor:o,onAnchorChange:r,placementState:n,setPlacementState:s,children:a})},"Popper"),ev="PopperAnchor",tv=Ge.forwardRef(oa(function(t,a){let{__scopePopper:o,virtualRef:r,...n}=t,s=Vc(ev,o),l=Ge.useRef(null),i=s.onAnchorChange,u=Ge.useCallback(p=>{l.current=p,p&&i(p)},[i]),c=Y(a,u),d=Ge.useRef(null);Ge.useEffect(()=>{if(!r)return;let p=d.current;d.current=r.current,p!==d.current&&i(d.current)});let f=s.placementState&&In(s.placementState),h=f?.[0],g=f?.[1];return r?null:(0,bo.jsx)(Z.div,{"data-radix-popper-side":h,"data-radix-popper-align":g,...n,ref:c})},"PopperAnchor")),Gc="PopperContent",[av,oy]=zc(Gc),ov=Ge.forwardRef(oa(function(t,a){let{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:s="center",alignOffset:l=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:p,...m}=t,x=Vc(Gc,o),[w,v]=Ge.useState(null),C=Y(a,v),[I,L]=Ge.useState(null),y=dl(I),R=y?.width??0,P=y?.height??0,k=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(c)?c:[c],B=D.length>0,_={padding:O,boundary:D.filter(Wc),altBoundary:B},{refs:G,floatingStyles:S,placement:M,isPositioned:A,middlewareData:N}=Tc({strategy:"fixed",placement:k,whileElementsMounted:oa((...Q)=>sl(...Q,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[Ec({mainAxis:n+P,alignmentAxis:l}),u&&Oc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Fc():void 0,..._}),u&&Bc({..._}),Nc({..._,apply:oa(({elements:Q,rects:V,availableWidth:re,availableHeight:ae})=>{let{width:le,height:be}=V.reference,ye=Q.floating.style;ye.setProperty("--radix-popper-available-width",`${re}px`),ye.setProperty("--radix-popper-available-height",`${ae}px`),ye.setProperty("--radix-popper-anchor-width",`${le}px`),ye.setProperty("--radix-popper-anchor-height",`${be}px`)},"apply")}),I&&Uc({element:I,padding:i}),rv({arrowWidth:R,arrowHeight:P}),h&&_c({strategy:"referenceHidden",..._,boundary:B?_.boundary:void 0})]}),E=x.setPlacementState;ne(()=>(E(M),()=>{E(void 0)}),[M,E]);let[j,z]=In(M),te=ke(p);ne(()=>{A&&te?.()},[A,te]);let de=N.arrow?.x,Pe=N.arrow?.y,ge=N.arrow?.centerOffset!==0,[De,F]=Ge.useState();return ne(()=>{w&&F(window.getComputedStyle(w).zIndex)},[w]),(0,bo.jsx)("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...S,transform:A?S.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:De,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,bo.jsx)(av,{scope:o,placedSide:j,placedAlign:z,onArrowChange:L,arrowX:de,arrowY:Pe,shouldHideArrow:ge,children:(0,bo.jsx)(Z.div,{"data-side":j,"data-align":z,...m,ref:C,style:{...m.style,animation:A?m.style?.animation:"none"}})})})},"PopperContent"));function Wc(e){return e!==null}oa(Wc,"isNotNull");var rv=oa(e=>({name:"transformOrigin",options:e,fn(t){let{placement:a,rects:o,middlewareData:r}=t,s=r.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,i=s?0:e.arrowHeight,[u,c]=In(a),d={start:"0%",center:"50%",end:"100%"}[c],f=(r.arrow?.x??0)+l/2,h=(r.arrow?.y??0)+i/2,g="",p="";return u==="bottom"?(g=s?d:`${f}px`,p=`${-i}px`):u==="top"?(g=s?d:`${f}px`,p=`${o.floating.height+i}px`):u==="right"?(g=`${-i}px`,p=s?d:`${h}px`):u==="left"&&(g=`${o.floating.width+i}px`,p=s?d:`${h}px`),{data:{x:g,y:p}}}}),"transformOrigin");function In(e){let[t,a="center"]=e.split("-");return[t,a]}oa(In,"getSideAndAlignFromPlacement");var bn=Qx,yn=tv,Sn=ov;var Rn=U(require("react"),1),nv=Object.defineProperty,sv=(e,t)=>nv(e,"name",{value:t,configurable:!0});function cl(e){let t=Rn.useRef({value:e,previous:e});return Rn.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}sv(cl,"usePrevious");var lv=U(require("react"),1);var iv=require("react/jsx-runtime");var Kc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});var q=require("react/jsx-runtime"),dv=Object.defineProperty,oe=(e,t)=>dv(e,"name",{value:t,configurable:!0}),cv=[" ","Enter","ArrowUp","ArrowDown"],fv=[" ","Enter"],So="Select",[Dn,Mn,pv]=Da(So),[Na,Dy]=Ne(So,[pv,yo]),ml=yo(),[mv,ra]=Na(So),[gv,hv]=Na(So);function Jc(e){let{__scopeSelect:t,children:a,open:o,defaultOpen:r,onOpenChange:n,value:s,defaultValue:l,onValueChange:i,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:g,internal_do_not_use_render:p}=e,m=ml(t),[x,w]=T.useState(null),[v,C]=T.useState(null),[I,L]=T.useState(!1),y=Ma(u),[R,P]=Rt({prop:o,defaultProp:r??!1,onChange:n,caller:So}),[k,O]=Rt({prop:s,defaultProp:l,onChange:i,caller:So}),D=T.useRef(null),B=T.useRef(k);T.useEffect(()=>{let z=g?x?.ownerDocument.getElementById(g):x?.form;if(z instanceof HTMLFormElement){let te=oe(()=>O(B.current),"reset");return z.addEventListener("reset",te),()=>z.removeEventListener("reset",te)}},[g,x,O]);let _=x?!!g||!!x.closest("form"):!0,[G,S]=T.useState(new Set),M=tt(),A=Array.from(G).map(z=>z.props.value).join(";"),N=T.useCallback(z=>{S(te=>new Set(te).add(z))},[]),E=T.useCallback(z=>{S(te=>{let de=new Set(te);return de.delete(z),de})},[]),j={required:h,trigger:x,onTriggerChange:w,valueNode:v,onValueNodeChange:C,valueNodeHasChildren:I,onValueNodeHasChildrenChange:L,contentId:M,value:k,onValueChange:O,open:R,onOpenChange:P,dir:y,triggerPointerDownPosRef:D,disabled:f,name:c,autoComplete:d,form:g,nativeOptions:G,nativeSelectKey:A,isFormControl:_};return(0,q.jsx)(bn,{...m,children:(0,q.jsx)(mv,{scope:t,...j,children:(0,q.jsx)(Dn.Provider,{scope:t,children:(0,q.jsx)(gv,{scope:t,onNativeOptionAdd:N,onNativeOptionRemove:E,children:df(p)?p(j):a})})})})}oe(Jc,"SelectProvider");var Qc=oe(e=>{let{__scopeSelect:t,children:a,...o}=e;return(0,q.jsx)(Jc,{__scopeSelect:t,...o,internal_do_not_use_render:({isFormControl:r})=>(0,q.jsxs)(q.Fragment,{children:[a,r?(0,q.jsx)(Ev,{__scopeSelect:t}):null]})})},"Select"),xv="SelectTrigger",gl=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,disabled:r=!1,...n}=t,s=ml(o),l=ra(xv,o),i=l.disabled||r,u=Y(a,l.onTriggerChange),c=Mn(o),d=T.useRef("touch"),[f,h,g]=bl(m=>{let x=c().filter(C=>!C.disabled),w=x.find(C=>C.value===l.value),v=yl(x,m,w);v!==void 0&&l.onValueChange(v.value)}),p=oe(m=>{i||(l.onOpenChange(!0),g()),m&&(l.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},"handleOpen");return(0,q.jsx)(yn,{asChild:!0,...s,children:(0,q.jsx)(Z.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":xr(l.value)?"":void 0,...n,ref:u,onClick:H(n.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&p(m)}),onPointerDown:H(n.onPointerDown,m=>{d.current=m.pointerType;let x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(p(m),m.preventDefault())}),onKeyDown:H(n.onKeyDown,m=>{let x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(x&&m.key===" ")&&cv.includes(m.key)&&(p(),m.preventDefault())})})})},"SelectTrigger")),vv="SelectValue",ef=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,className:r,style:n,children:s,placeholder:l="",...i}=t,u=ra(vv,o),{onValueNodeHasChildrenChange:c}=u,d=s!==void 0,f=Y(a,u.onValueNodeChange);ne(()=>{c(d)},[c,d]);let h=xr(u.value);return(0,q.jsx)(Z.span,{...i,asChild:h?!1:i.asChild,ref:f,style:{pointerEvents:"none"},children:(0,q.jsx)(T.Fragment,{children:h?l:s},h?"placeholder":"value")})},"SelectValue")),tf=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,children:r,...n}=t;return(0,q.jsx)(Z.span,{"aria-hidden":!0,...n,ref:a,children:r||"\u25BC"})},"SelectIcon")),wv="SelectPortal",[Cv,Lv]=Na(wv,{forceMount:void 0}),af=oe(e=>{let{__scopeSelect:t,forceMount:a,...o}=e;return(0,q.jsx)(Cv,{scope:e.__scopeSelect,forceMount:a,children:(0,q.jsx)(co,{asChild:!0,...o})})},"SelectPortal"),Ba="SelectContent",hl=T.forwardRef(oe(function(t,a){let o=Lv(Ba,t.__scopeSelect),{forceMount:r=o.forceMount,...n}=t,s=ra(Ba,t.__scopeSelect),[l,i]=T.useState();return ne(()=>{i(new DocumentFragment)},[]),(0,q.jsx)(Ht,{present:r||s.open,children:({present:u})=>u?(0,q.jsx)(yv,{...n,ref:a}):(0,q.jsx)(Iv,{...n,fragment:l})})},"SelectContent")),Iv=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,children:r,fragment:n}=t;return n?pl.createPortal((0,q.jsx)(of,{scope:o,children:(0,q.jsx)(Dn.Slot,{scope:o,children:(0,q.jsx)("div",{ref:a,children:r})})}),n):null},"SelectContentFragment")),Lt=10,[of,_a]=Na(Ba),bv=ze("SelectContent.RemoveScroll"),yv=T.forwardRef(oe(function(t,a){let{__scopeSelect:o}=t,{position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:s,onPointerDownOutside:l,side:i,sideOffset:u,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:p,hideWhenDetached:m,avoidCollisions:x,...w}=t,v=ra(Ba,o),[C,I]=T.useState(null),[L,y]=T.useState(null),R=Y(a,I),[P,k]=T.useState(null),[O,D]=T.useState(null),B=Mn(o),[_,G]=T.useState(!1),S=T.useRef(!1);T.useEffect(()=>{if(C)return vo(C)},[C]),ta();let M=T.useCallback(F=>{let[Q,...V]=B().map(le=>le.ref.current),[re]=V.slice(-1),ae=document.activeElement;for(let le of F)if(le===ae||(le?.scrollIntoView({block:"nearest"}),le===Q&&L&&(L.scrollTop=0),le===re&&L&&(L.scrollTop=L.scrollHeight),le?.focus(),document.activeElement!==ae))return},[B,L]),A=T.useCallback(()=>M([P,C]),[M,P,C]);T.useEffect(()=>{_&&A()},[_,A]);let{onOpenChange:N,triggerPointerDownPosRef:E}=v;T.useEffect(()=>{if(C){let F={x:0,y:0},Q=oe(re=>{F={x:Math.abs(Math.round(re.pageX)-(E.current?.x??0)),y:Math.abs(Math.round(re.pageY)-(E.current?.y??0))}},"handlePointerMove"),V=oe(re=>{F.x<=10&&F.y<=10?re.preventDefault():re.composedPath().includes(C)||N(!1),document.removeEventListener("pointermove",Q),E.current=null},"handlePointerUp");return E.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",V,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",V,{capture:!0})}}},[C,N,E]),T.useEffect(()=>{let F=oe(()=>N(!1),"close");return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[N]);let[j,z]=bl(F=>{let Q=B().filter(ae=>!ae.disabled),V=Q.find(ae=>ae.ref.current===document.activeElement),re=yl(Q,F,V);re&&setTimeout(()=>re.ref.current?.focus())}),te=T.useCallback((F,Q,V)=>{let re=!S.current&&!V;(v.value!==void 0&&v.value===Q||re)&&(k(F),re&&(S.current=!0))},[v.value]),de=T.useCallback(()=>C?.focus(),[C]),Pe=T.useCallback((F,Q,V)=>{let re=!S.current&&!V;(v.value!==void 0&&v.value===Q||re)&&D(F)},[v.value]),ge=r==="popper"?Xc:Sv,De=ge===Xc?{side:i,sideOffset:u,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:p,hideWhenDetached:m,avoidCollisions:x}:{};return(0,q.jsx)(of,{scope:o,content:C,viewport:L,onViewportChange:y,itemRefCallback:te,selectedItem:P,onItemLeave:de,itemTextRefCallback:Pe,focusSelectedItem:A,selectedItemText:O,position:r,isPositioned:_,searchRef:j,children:(0,q.jsx)(La,{as:bv,allowPinchZoom:!0,children:(0,q.jsx)(uo,{asChild:!0,trapped:v.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:H(n,F=>{v.trigger?.focus({preventScroll:!0}),F.preventDefault()}),children:(0,q.jsx)(io,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,q.jsx)(ge,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:F=>F.preventDefault(),...w,...De,onPlaced:()=>G(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:H(w.onKeyDown,F=>{let Q=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Q&&F.key.length===1&&z(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let re=B().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(F.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){let ae=F.target,le=re.indexOf(ae);re=re.slice(le+1)}setTimeout(()=>M(re)),F.preventDefault()}})})})})})})},"SelectContentImpl")),Sv=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,onPlaced:r,...n}=t,s=ra(Ba,o),l=_a(Ba,o),[i,u]=T.useState(null),[c,d]=T.useState(null),f=Y(a,d),h=Mn(o),g=T.useRef(!1),p=T.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:w,focusSelectedItem:v}=l,C=T.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&c&&m&&x&&w){let R=s.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),k=s.valueNode.getBoundingClientRect(),O=w.getBoundingClientRect();if(s.dir!=="rtl"){let ae=O.left-P.left,le=k.left-ae,be=R.left-le,ye=R.width+be,bt=Math.max(ye,P.width),ja=window.innerWidth-Lt,Ka=sn(le,[Lt,Math.max(Lt,ja-bt)]);i.style.minWidth=ye+"px",i.style.left=Ka+"px"}else{let ae=P.right-O.right,le=window.innerWidth-k.right-ae,be=window.innerWidth-R.right-le,ye=R.width+be,bt=Math.max(ye,P.width),ja=window.innerWidth-Lt,Ka=sn(le,[Lt,Math.max(Lt,ja-bt)]);i.style.minWidth=ye+"px",i.style.right=Ka+"px"}let D=h(),B=window.innerHeight-Lt*2,_=m.scrollHeight,G=window.getComputedStyle(c),S=parseInt(G.borderTopWidth,10),M=parseInt(G.paddingTop,10),A=parseInt(G.borderBottomWidth,10),N=parseInt(G.paddingBottom,10),E=S+M+_+N+A,j=Math.min(x.offsetHeight*5,E),z=window.getComputedStyle(m),te=parseInt(z.paddingTop,10),de=parseInt(z.paddingBottom,10),Pe=R.top+R.height/2-Lt,ge=B-Pe,De=x.offsetHeight/2,F=x.offsetTop+De,Q=S+M+F,V=E-Q;if(Q<=Pe){let ae=D.length>0&&x===D[D.length-1].ref.current;i.style.bottom="0px";let le=c.clientHeight-m.offsetTop-m.offsetHeight,be=Math.max(ge,De+(ae?de:0)+le+A),ye=Q+be;i.style.height=ye+"px"}else{let ae=D.length>0&&x===D[0].ref.current;i.style.top="0px";let be=Math.max(Pe,S+m.offsetTop+(ae?te:0)+De)+V;i.style.height=be+"px",m.scrollTop=Q-Pe+m.offsetTop}i.style.margin=`${Lt}px 0`,i.style.minHeight=j+"px",i.style.maxHeight=B+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,i,c,m,x,w,s.dir,r]);ne(()=>C(),[C]);let[I,L]=T.useState();ne(()=>{c&&L(window.getComputedStyle(c).zIndex)},[c]);let y=T.useCallback(R=>{R&&p.current===!0&&(C(),v?.(),p.current=!1)},[C,v]);return(0,q.jsx)(Rv,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:y,children:(0,q.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:(0,q.jsx)(Z.div,{...n,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),Xc=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,align:r="start",collisionPadding:n=Lt,...s}=t,l=ml(o);return(0,q.jsx)(Sn,{...l,...s,ref:a,align:r,collisionPadding:n,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Rv,xl]=Na(Ba,{}),$c="SelectViewport",rf=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,nonce:r,...n}=t,s=_a($c,o),l=xl($c,o),i=Y(a,s.onViewportChange),u=T.useRef(0);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,q.jsx)(Dn.Slot,{scope:o,children:(0,q.jsx)(Z.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:H(n.onScroll,c=>{let d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=l;if(h?.current&&f){let g=Math.abs(u.current-d.scrollTop);if(g>0){let p=window.innerHeight-Lt*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),w=Math.max(m,x);if(w<p){let v=w+g,C=Math.min(p,v),I=v-C;f.style.height=C+"px",f.style.bottom==="0px"&&(d.scrollTop=I>0?I:0,f.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})},"SelectViewport")),Pv="SelectGroup",[My,Dv]=Na(Pv);var Mv="SelectLabel",vl=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,...r}=t,n=Dv(Mv,o);return(0,q.jsx)(Z.div,{id:n.id,...r,ref:a})},"SelectLabel")),fl="SelectItem",[kv,nf]=Na(fl),wl=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,value:r,disabled:n=!1,textValue:s,...l}=t,i=ra(fl,o),u=_a(fl,o),c=i.value===r,[d,f]=T.useState(s??""),[h,g]=T.useState(!1),p=ke(C=>u.itemRefCallback?.(C,r,n)),m=Y(a,p),x=tt(),w=T.useRef("touch"),v=oe(()=>{n||(i.onValueChange(r),i.onOpenChange(!1))},"handleSelect");return(0,q.jsx)(kv,{scope:o,value:r,disabled:n,textId:x,isSelected:c,onItemTextChange:T.useCallback(C=>{f(I=>I||(C?.textContent??"").trim())},[]),children:(0,q.jsx)(Dn.ItemSlot,{scope:o,value:r,disabled:n,textValue:d,children:(0,q.jsx)(Z.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...l,ref:m,onFocus:H(l.onFocus,()=>g(!0)),onBlur:H(l.onBlur,()=>g(!1)),onClick:H(l.onClick,()=>{w.current!=="mouse"&&v()}),onPointerUp:H(l.onPointerUp,()=>{w.current==="mouse"&&v()}),onPointerDown:H(l.onPointerDown,C=>{w.current=C.pointerType}),onPointerMove:H(l.onPointerMove,C=>{w.current=C.pointerType,n?u.onItemLeave?.():w.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:H(l.onPointerLeave,C=>{C.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:H(l.onKeyDown,C=>{n||C.target!==C.currentTarget||u.searchRef?.current!==""&&C.key===" "||(fv.includes(C.key)&&v(),C.key===" "&&C.preventDefault())})})})})},"SelectItem")),Pn="SelectItemText",sf=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,className:r,style:n,...s}=t,l=ra(Pn,o),i=_a(Pn,o),u=nf(Pn,o),c=hv(Pn,o),[d,f]=T.useState(null),h=ke(v=>i.itemTextRefCallback?.(v,u.value,u.disabled)),g=Y(a,f,u.onItemTextChange,h),p=d?.textContent,m=T.useMemo(()=>(0,q.jsx)("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:x,onNativeOptionRemove:w}=c;return ne(()=>(x(m),()=>w(m)),[x,w,m]),(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Z.span,{id:u.textId,...s,ref:g}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!xr(l.value)?pl.createPortal(s.children,l.valueNode):null]})},"SelectItemText")),Av="SelectItemIndicator",lf=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,...r}=t;return nf(Av,o).isSelected?(0,q.jsx)(Z.span,{"aria-hidden":!0,...r,ref:a}):null},"SelectItemIndicator")),Yc="SelectScrollUpButton",Cl=T.forwardRef(oe(function(t,a){let o=_a(Yc,t.__scopeSelect),r=xl(Yc,t.__scopeSelect),[n,s]=T.useState(!1),l=Y(a,r.onScrollButtonChange);return ne(()=>{if(o.viewport&&o.isPositioned){let u=function(){let d=c.scrollTop>0;s(d)};var i=u;oe(u,"handleScroll");let c=o.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[o.viewport,o.isPositioned]),n?(0,q.jsx)(uf,{...t,ref:l,onAutoScroll:()=>{let{viewport:i,selectedItem:u}=o;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null},"SelectScrollUpButton")),Zc="SelectScrollDownButton",Ll=T.forwardRef(oe(function(t,a){let o=_a(Zc,t.__scopeSelect),r=xl(Zc,t.__scopeSelect),[n,s]=T.useState(!1),l=Y(a,r.onScrollButtonChange);return ne(()=>{if(o.viewport&&o.isPositioned){let u=function(){let d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;s(f)};var i=u;oe(u,"handleScroll");let c=o.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[o.viewport,o.isPositioned]),n?(0,q.jsx)(uf,{...t,ref:l,onAutoScroll:()=>{let{viewport:i,selectedItem:u}=o;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null},"SelectScrollDownButton")),uf=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,onAutoScroll:r,...n}=t,s=_a("SelectScrollButton",o),l=T.useRef(null),i=Mn(o),u=T.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return T.useEffect(()=>()=>u(),[u]),ne(()=>{i().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),(0,q.jsx)(Z.div,{"aria-hidden":!0,...n,ref:a,style:{flexShrink:0,...n.style},onPointerDown:H(n.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:H(n.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:H(n.onPointerLeave,()=>{u()})})},"SelectScrollButtonImpl")),Il=T.forwardRef(oe(function(t,a){let{__scopeSelect:o,...r}=t;return(0,q.jsx)(Z.div,{"aria-hidden":!0,...r,ref:a})},"SelectSeparator"));var Tv="SelectBubbleInput",Ev=T.forwardRef(oe(function({__scopeSelect:t,...a},o){let r=ra(Tv,t),{value:n,onValueChange:s,required:l,disabled:i,name:u,autoComplete:c,form:d}=r,{nativeOptions:f,nativeSelectKey:h}=r,g=T.useRef(null),p=Y(o,g),m=n??"",x=cl(m),w=Array.from(f).some(v=>(v.props.value??"")==="");return T.useEffect(()=>{let v=g.current;if(!v)return;let C=window.HTMLSelectElement.prototype,L=Object.getOwnPropertyDescriptor(C,"value").set;if(x!==m&&L){let y=new Event("change",{bubbles:!0});L.call(v,m),v.dispatchEvent(y)}},[x,m]),(0,q.jsxs)(Z.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:u,autoComplete:c,disabled:i,form:d,onChange:v=>s(v.target.value),...a,style:{...Kc,...a.style},ref:p,defaultValue:m,children:[xr(n)&&!w?(0,q.jsx)("option",{value:""}):null,Array.from(f)]},h)},"SelectBubbleInput"));function df(e){return typeof e=="function"}oe(df,"isFunction");function xr(e){return e===""||e===void 0}oe(xr,"shouldShowPlaceholder");function bl(e){let t=ke(e),a=T.useRef(""),o=T.useRef(0),r=T.useCallback(s=>{let l=a.current+s;t(l),oe((function i(u){a.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))}),"updateSearch")(l)},[t]),n=T.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,r,n]}oe(bl,"useTypeaheadSearch");function yl(e,t,a){let r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=a?e.indexOf(a):-1,s=cf(e,Math.max(n,0));r.length===1&&(s=s.filter(u=>u!==a));let i=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==a?i:void 0}oe(yl,"findNextItem");function cf(e,t){return e.map((a,o)=>e[(t+o)%e.length])}oe(cf,"wrapArray");var we=require("react/jsx-runtime"),Sl=Qc;var Rl=ef,kn=na.forwardRef(({className:e,children:t,...a},o)=>(0,we.jsxs)(gl,{ref:o,className:K("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[t,(0,we.jsx)(tf,{asChild:!0,children:(0,we.jsx)(ao,{className:"h-4 w-4 opacity-50"})})]}));kn.displayName=gl.displayName;var ff=na.forwardRef(({className:e,...t},a)=>(0,we.jsx)(Cl,{ref:a,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:(0,we.jsx)(Ko,{className:"h-4 w-4"})}));ff.displayName=Cl.displayName;var pf=na.forwardRef(({className:e,...t},a)=>(0,we.jsx)(Ll,{ref:a,className:K("flex cursor-default items-center justify-center py-1",e),...t,children:(0,we.jsx)(ao,{className:"h-4 w-4"})}));pf.displayName=Ll.displayName;var An=na.forwardRef(({className:e,children:t,position:a="popper",...o},r)=>(0,we.jsx)(af,{children:(0,we.jsxs)(hl,{ref:r,className:K("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...o,children:[(0,we.jsx)(ff,{}),(0,we.jsx)(rf,{className:K("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,we.jsx)(pf,{})]})}));An.displayName=hl.displayName;var Fv=na.forwardRef(({className:e,...t},a)=>(0,we.jsx)(vl,{ref:a,className:K("px-2 py-1.5 text-sm font-semibold",e),...t}));Fv.displayName=vl.displayName;var Ro=na.forwardRef(({className:e,children:t,...a},o)=>(0,we.jsxs)(wl,{ref:o,className:K("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,we.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,we.jsx)(lf,{children:(0,we.jsx)(Jt,{className:"h-4 w-4"})})}),(0,we.jsx)(sf,{children:t})]}));Ro.displayName=wl.displayName;var Bv=na.forwardRef(({className:e,...t},a)=>(0,we.jsx)(Il,{ref:a,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));Bv.displayName=Il.displayName;var mf=U(require("react"),1);var gf=require("react/jsx-runtime"),Pl=mf.forwardRef(({className:e,...t},a)=>(0,gf.jsx)("textarea",{className:K("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Pl.displayName="Textarea";var Ua={high:{label:"P0",color:"#f87171"},medium:{label:"P1",color:"#fbbf24"},low:{label:"P2",color:"#38bdf8"}},Tn=["high","medium","low"],hf="#94a3b8";function xf(e,t){return t?e.find(a=>a.name===t)?.color??hf:hf}var J=require("react/jsx-runtime");function vf({open:e,card:t,labels:a,onOpenChange:o,onSave:r,onDelete:n}){let s=at(),[l,i]=(0,En.useState)({title:"",note:"",label:"",priority:""});(0,En.useEffect)(()=>{e&&i({title:t?.title??"",note:t?.note??"",label:t?.label??"",priority:t?.priority??""})},[e,t]);let u=c=>i(d=>({...d,...c}));return(0,J.jsx)(wo,{open:e,onOpenChange:o,children:(0,J.jsxs)(ba,{className:"sm:max-w-md",children:[(0,J.jsxs)(ya,{children:[(0,J.jsx)(Sa,{children:s(t?"editCard":"addCard")}),(0,J.jsx)(Ra,{children:s(t?"editCardDesc":"newCardDesc")})]}),(0,J.jsxs)("div",{className:"grid gap-4 py-2",children:[(0,J.jsxs)("div",{className:"grid gap-2",children:[(0,J.jsx)(Co,{htmlFor:"card-title",children:s("fieldTitle")}),(0,J.jsx)(qt,{id:"card-title",value:l.title,placeholder:s("titlePlaceholder"),onChange:c=>u({title:c.target.value})})]}),(0,J.jsxs)("div",{className:"grid gap-2",children:[(0,J.jsx)(Co,{children:s("fieldLabel")}),(0,J.jsxs)(Sl,{value:l.label||"__none__",onValueChange:c=>u({label:c==="__none__"?"":c}),children:[(0,J.jsx)(kn,{children:(0,J.jsx)(Rl,{placeholder:s("noLabel")})}),(0,J.jsxs)(An,{children:[(0,J.jsx)(Ro,{value:"__none__",children:s("noLabel")}),a.map(c=>(0,J.jsx)(Ro,{value:c.name,children:c.name},c.name))]})]})]}),(0,J.jsxs)("div",{className:"grid gap-2",children:[(0,J.jsx)(Co,{children:s("fieldPriority")}),(0,J.jsxs)(Sl,{value:l.priority||"__none__",onValueChange:c=>u({priority:c==="__none__"?"":c}),children:[(0,J.jsx)(kn,{children:(0,J.jsx)(Rl,{placeholder:s("noPriority")})}),(0,J.jsxs)(An,{children:[(0,J.jsx)(Ro,{value:"__none__",children:s("noPriority")}),Tn.map(c=>{let d=Ua[c];return(0,J.jsx)(Ro,{value:c,children:(0,J.jsxs)("span",{className:"flex items-center gap-2",children:[(0,J.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:d.color}}),d.label]})},c)})]})]})]}),(0,J.jsxs)("div",{className:"grid gap-2",children:[(0,J.jsx)(Co,{htmlFor:"card-note",children:s("fieldNote")}),(0,J.jsx)(Pl,{id:"card-note",value:l.note,placeholder:s("notePlaceholder"),rows:3,onChange:c=>u({note:c.target.value})})]})]}),(0,J.jsxs)(dr,{children:[t&&n&&(0,J.jsxs)(Be,{variant:"destructive",className:"mr-auto",onClick:()=>{n(t),o(!1)},children:[(0,J.jsx)(Bt,{className:"h-4 w-4"}),s("delete")]}),(0,J.jsx)(Be,{variant:"outline",onClick:()=>o(!1),children:s("cancel")}),(0,J.jsx)(Be,{disabled:!l.title.trim(),onClick:()=>{r(l),o(!1)},children:s("save")})]})]})})}var wf=require("react/jsx-runtime"),Nv=Xr("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Dl({className:e,variant:t,...a}){return(0,wf.jsx)("div",{className:K(Nv({variant:t}),e),...a})}var Ha=U(require("react"),1);var qa=require("react/jsx-runtime"),vr=Ha.forwardRef(({className:e,...t},a)=>(0,qa.jsx)("div",{ref:a,className:K("rounded-xl border bg-card text-card-foreground shadow",e),...t}));vr.displayName="Card";var _v=Ha.forwardRef(({className:e,...t},a)=>(0,qa.jsx)("div",{ref:a,className:K("flex flex-col space-y-1.5 p-6",e),...t}));_v.displayName="CardHeader";var Uv=Ha.forwardRef(({className:e,...t},a)=>(0,qa.jsx)("div",{ref:a,className:K("font-semibold leading-none tracking-tight",e),...t}));Uv.displayName="CardTitle";var Hv=Ha.forwardRef(({className:e,...t},a)=>(0,qa.jsx)("div",{ref:a,className:K("text-sm text-muted-foreground",e),...t}));Hv.displayName="CardDescription";var wr=Ha.forwardRef(({className:e,...t},a)=>(0,qa.jsx)("div",{ref:a,className:K("p-6 pt-0",e),...t}));wr.displayName="CardContent";var qv=Ha.forwardRef(({className:e,...t},a)=>(0,qa.jsx)("div",{ref:a,className:K("flex items-center p-6 pt-0",e),...t}));qv.displayName="CardFooter";var Tt=require("react/jsx-runtime");function Cf({card:e,labels:t,onOpen:a}){let{attributes:o,listeners:r,setNodeRef:n,transform:s,transition:l,isDragging:i}=zr({id:e.id,data:{type:"card",cardId:e.id,columnId:e.columnId}}),u=e.priority?Ua[e.priority]:null,c=xf(t,e.label);return(0,Tt.jsx)("div",{ref:n,style:{transform:Qe.Transform.toString(s),transition:l},...o,...r,onClick:()=>a(e),className:K("group cursor-grab touch-none select-none active:cursor-grabbing",i&&"opacity-40"),children:(0,Tt.jsx)(vr,{className:"pointer-events-none rounded-xl border-[var(--dsw-alias-border-l2)] shadow-card transition-shadow duration-200 group-hover:shadow-float",children:(0,Tt.jsxs)(wr,{className:"p-3.5",children:[(e.label||u)&&(0,Tt.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[e.label&&(0,Tt.jsx)(Dl,{variant:"secondary",className:"rounded-full px-2 py-0 text-[10.5px] font-medium leading-4",style:{background:c,color:"#0b1220"},children:e.label}),u&&(0,Tt.jsx)(Dl,{variant:"secondary",className:"rounded-full px-2 py-0 text-[10.5px] font-medium leading-4",style:{background:u.color,color:"#0b1220"},children:u.label})]}),(0,Tt.jsx)("p",{className:"text-[13.5px] font-medium leading-snug tracking-tight break-words",children:e.title}),e.note&&(0,Tt.jsx)("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground line-clamp-3 whitespace-pre-wrap break-words",children:e.note})]})})})}var nt=require("react/jsx-runtime");function Lf({column:e,cards:t,labels:a,onAddCard:o,onOpenCard:r}){let{setNodeRef:n,isOver:s}=Br({id:e.id,data:{type:"column"}}),l=at();return(0,nt.jsxs)("div",{ref:n,className:K("flex w-72 shrink-0 flex-col rounded-2xl border border-[var(--dsw-alias-border-l2)] bg-card shadow-column transition-colors",s&&"border-primary"),children:[(0,nt.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-3",children:[(0,nt.jsx)("h3",{className:"flex-1 truncate text-[13.5px] font-semibold tracking-tight",children:e.title}),(0,nt.jsx)("span",{className:"rounded-full bg-secondary/70 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:t.length})]}),(0,nt.jsxs)("div",{className:"kan-scroll flex min-h-[4rem] flex-1 flex-col gap-2 overflow-y-auto px-2.5 pb-2.5",children:[(0,nt.jsx)(qr,{items:t.map(i=>i.id),strategy:Hr,children:t.map(i=>(0,nt.jsx)(Cf,{card:i,labels:a,onOpen:r},i.id))}),t.length===0&&(0,nt.jsx)("p",{className:"py-5 text-center text-xs text-muted-foreground/70",children:l("emptyColumn")})]}),(0,nt.jsx)("div",{className:"p-2.5 pt-1",children:(0,nt.jsxs)(Be,{variant:"ghost",size:"sm",className:"w-full justify-start rounded-xl text-muted-foreground hover:text-foreground",onClick:()=>o(e),children:[(0,nt.jsx)(Ft,{className:"h-4 w-4"}),l("addCard")]})})]})}var Cr=require("react");var Ce=require("react/jsx-runtime");function zv({column:e,value:t,onValueChange:a,onCommit:o,onDelete:r,canDelete:n}){let{attributes:s,listeners:l,setNodeRef:i,transform:u,transition:c}=zr({id:e.id}),d=at();return(0,Ce.jsxs)("div",{ref:i,style:{transform:Qe.Transform.toString(u),transition:c},className:"flex items-center gap-1.5",children:[(0,Ce.jsx)("button",{...s,...l,className:"shrink-0 cursor-grab touch-none rounded-md p-1 text-muted-foreground/60 hover:bg-accent hover:text-foreground","aria-label":d("dragSort"),children:(0,Ce.jsx)($o,{className:"h-4 w-4"})}),(0,Ce.jsx)(qt,{value:t,onChange:f=>a(f.target.value),onBlur:o,onKeyDown:f=>{f.key==="Enter"&&f.target.blur()}}),(0,Ce.jsx)(Be,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive",disabled:!n,onClick:r,children:(0,Ce.jsx)(Bt,{className:"h-4 w-4"})})]})}function If({open:e,columns:t,onOpenChange:a,onReorder:o,onRename:r,onDelete:n,onAdd:s}){let l=at(),[i,u]=(0,Cr.useState)({}),[c,d]=(0,Cr.useState)(""),f=Ar(to(Zt,{activationConstraint:{distance:8}}),to(Yt,{coordinateGetter:Vr}));(0,Cr.useEffect)(()=>{e&&u(Object.fromEntries(t.map(p=>[p.id,p.title])))},[e,t]);let h=p=>{let m=(i[p]??"").trim(),x=t.find(w=>w.id===p);x&&m&&m!==x.title&&r(p,m)},g=p=>{let{active:m,over:x}=p;x&&m.id!==x.id&&o(String(m.id),String(x.id))};return(0,Ce.jsx)(wo,{open:e,onOpenChange:a,children:(0,Ce.jsxs)(ba,{className:"sm:max-w-md",children:[(0,Ce.jsxs)(ya,{children:[(0,Ce.jsx)(Sa,{children:l("columnEdit")}),(0,Ce.jsx)(Ra,{children:l("columnEditDesc")})]}),(0,Ce.jsx)(Fr,{sensors:f,collisionDetection:Ri,onDragEnd:g,children:(0,Ce.jsx)(qr,{items:t.map(p=>p.id),strategy:Hr,children:(0,Ce.jsx)("div",{className:"flex max-h-[60vh] flex-col gap-2 overflow-y-auto py-2",children:t.map(p=>(0,Ce.jsx)(zv,{column:p,value:i[p.id]??p.title,onValueChange:m=>u(x=>({...x,[p.id]:m})),onCommit:()=>h(p.id),onDelete:()=>n(p.id),canDelete:t.length>1},p.id))})})}),(0,Ce.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Ce.jsx)(qt,{value:c,placeholder:l("newColumnPlaceholder"),onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&c.trim()&&(s(c.trim()),d(""))}}),(0,Ce.jsxs)(Be,{size:"sm",onClick:()=>{c.trim()&&(s(c.trim()),d(""))},children:[(0,Ce.jsx)(Ft,{className:"h-4 w-4"}),l("add")]})]})]})})}var Po=require("react");var Re=require("react/jsx-runtime");function bf({open:e,labels:t,onOpenChange:a,onAdd:o,onUpdate:r,onDelete:n}){let s=at(),[l,i]=(0,Po.useState)({}),[u,c]=(0,Po.useState)(""),[d,f]=(0,Po.useState)("#38bdf8");(0,Po.useEffect)(()=>{e&&i(Object.fromEntries(t.map(g=>[g.name,{name:g.name,color:g.color}])))},[e,t]);let h=g=>{let p=l[g];if(!p)return;let m=t.find(w=>w.name===g),x=p.name.trim();m&&x&&(x!==g||p.color!==m.color)&&r(g,x,p.color)};return(0,Re.jsx)(wo,{open:e,onOpenChange:a,children:(0,Re.jsxs)(ba,{className:"sm:max-w-md",children:[(0,Re.jsxs)(ya,{children:[(0,Re.jsx)(Sa,{children:s("labelEdit")}),(0,Re.jsx)(Ra,{children:s("labelEditDesc")})]}),(0,Re.jsx)("div",{className:"flex max-h-[60vh] flex-col gap-2 overflow-y-auto py-2",children:t.map(g=>{let p=l[g.name]??{name:g.name,color:g.color};return(0,Re.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Re.jsx)("input",{type:"color",value:p.color,className:"h-8 w-8 shrink-0 cursor-pointer rounded-md border border-input bg-transparent p-0.5",onChange:m=>i(x=>({...x,[g.name]:{...p,color:m.target.value}})),onBlur:()=>h(g.name)}),(0,Re.jsx)(qt,{value:p.name,onChange:m=>i(x=>({...x,[g.name]:{...p,name:m.target.value}})),onBlur:()=>h(g.name),onKeyDown:m=>{m.key==="Enter"&&m.target.blur()}}),(0,Re.jsx)(Be,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive",onClick:()=>n(g.name),children:(0,Re.jsx)(Bt,{className:"h-4 w-4"})})]},g.name)})}),(0,Re.jsx)(dr,{className:"flex-col gap-2 sm:flex-row sm:items-center",children:(0,Re.jsxs)("div",{className:"flex flex-1 items-center gap-1.5",children:[(0,Re.jsx)("input",{type:"color",value:d,className:"h-8 w-8 shrink-0 cursor-pointer rounded-md border border-input bg-transparent p-0.5",onChange:g=>f(g.target.value)}),(0,Re.jsx)(qt,{value:u,placeholder:s("newLabelPlaceholder"),onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&u.trim()&&(o(u.trim(),d),c(""))}}),(0,Re.jsxs)(Be,{size:"sm",onClick:()=>{u.trim()&&(o(u.trim(),d),c(""))},children:[(0,Re.jsx)(Ft,{className:"h-4 w-4"}),s("add")]})]})})]})})}var Ir=U(require("react"),1);var It=U(require("react"),1);var W=U(require("react"),1);var Ee=U(require("react"),1);var Gv=U(require("react"),1),On=U(require("react"),1),Vv=Object.defineProperty,kl=(e,t)=>Vv(e,"name",{value:t,configurable:!0}),Ml=!1;function yf(){let[e,t]=On.useState(Ml);return On.useEffect(()=>{Ml||(Ml=!0,t(!0))},[]),e}kl(yf,"useIsHydrated");var Sf=Gv[" useSyncExternalStore ".trim().toString()];function Rf(){return()=>{}}kl(Rf,"subscribe");function Pf(){return Sf(Rf,()=>!0,()=>!1)}kl(Pf,"useIsHydratedModern");var Df=typeof Sf=="function"?Pf:yf;var sa=require("react/jsx-runtime"),Wv=Object.defineProperty,za=(e,t)=>Wv(e,"name",{value:t,configurable:!0}),Al="rovingFocusGroup.onEntryFocus",jv={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Tl,Mf,Kv]=Da(Fn),[Xv,El]=Ne(Fn,[Kv]),[$v,Yv]=Xv(Fn),Zv=Ee.forwardRef(za(function(t,a){return(0,sa.jsx)(Tl.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,sa.jsx)(Tl.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,sa.jsx)(Jv,{...t,ref:a})})})},"RovingFocusGroup")),Jv=Ee.forwardRef(za(function(t,a){let{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,h=Ee.useRef(null),g=Y(a,h),p=Ma(s),[m,x]=Rt({prop:l,defaultProp:i??null,onChange:u,caller:Fn}),[w,v]=Ee.useState(!1),C=ke(c),I=Mf(o),L=Ee.useRef(!1),[y,R]=Ee.useState(0);return Ee.useEffect(()=>{let P=h.current;if(P)return P.addEventListener(Al,C),()=>P.removeEventListener(Al,C)},[C]),(0,sa.jsx)($v,{scope:o,orientation:r,dir:p,loop:n,currentTabStopId:m,onItemFocus:Ee.useCallback(P=>x(P),[x]),onItemShiftTab:Ee.useCallback(()=>v(!0),[]),onFocusableItemAdd:Ee.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:Ee.useCallback(()=>R(P=>P-1),[]),children:(0,sa.jsx)(Z.div,{tabIndex:w||y===0?-1:0,"data-orientation":r,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:H(t.onMouseDown,()=>{L.current=!0}),onFocus:H(t.onFocus,P=>{let k=!L.current;if(P.target===P.currentTarget&&k&&!w){let O=new CustomEvent(Al,jv);if(P.currentTarget.dispatchEvent(O),!O.defaultPrevented){let D=I().filter(M=>M.focusable),B=D.find(M=>M.active),_=D.find(M=>M.id===m),S=[B,_,...D].filter(Boolean).map(M=>M.ref.current);Ol(S,d)}}L.current=!1}),onBlur:H(t.onBlur,()=>v(!1))})})},"RovingFocusGroupImpl")),Qv="RovingFocusGroupItem",ew=Ee.forwardRef(za(function(t,a){let{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:s,children:l,...i}=t,u=tt(),c=s||u,d=Yv(Qv,o),f=d.currentTabStopId===c,h=Mf(o),{onFocusableItemAdd:g,onFocusableItemRemove:p,currentTabStopId:m}=d,x=Df();return ne(()=>{if(!(!x||!r))return g(),()=>p()},[x,r,g,p]),Ee.useEffect(()=>{if(!(x||!r))return g(),()=>p()},[x,r,g,p]),(0,sa.jsx)(Tl.ItemSlot,{scope:o,id:c,focusable:r,active:n,children:(0,sa.jsx)(Z.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:a,onMouseDown:H(t.onMouseDown,w=>{r?d.onItemFocus(c):w.preventDefault()}),onFocus:H(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:H(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;let v=Af(w,d.orientation,d.dir);if(v!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let I=h().filter(L=>L.focusable).map(L=>L.ref.current);if(v==="last")I.reverse();else if(v==="prev"||v==="next"){v==="prev"&&I.reverse();let L=I.indexOf(w.currentTarget);I=d.loop?Tf(I,L+1):I.slice(L+1)}setTimeout(()=>Ol(I))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:m!=null}):l})})},"RovingFocusGroupItem")),tw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}za(kf,"getDirectionAwareKey");function Af(e,t,a){let o=kf(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return tw[o]}za(Af,"getFocusIntent");function Ol(e,t=!1){let a=document.activeElement;for(let o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}za(Ol,"focusFirst");function Tf(e,t){return e.map((a,o)=>e[(t+o)%e.length])}za(Tf,"wrapArray");var Ef=Zv,Of=ew;var ie=require("react/jsx-runtime"),ow=Object.defineProperty,ue=(e,t)=>ow(e,"name",{value:t,configurable:!0}),Fl=["Enter"," "],rw=["ArrowDown","PageUp","Home"],Bf=["ArrowUp","PageDown","End"],nw=[...rw,...Bf],oR={ltr:[...Fl,"ArrowRight"],rtl:[...Fl,"ArrowLeft"]};var Nn="Menu",[Bl,sw,lw]=Da(Nn),[Va,_l]=Ne(Nn,[lw,yo,El]),Ul=yo(),Nf=El(),[iw,Lr]=Va(Nn),[uw,Hl]=Va(Nn),dw=ue(e=>{let{__scopeMenu:t,open:a=!1,children:o,dir:r,onOpenChange:n,modal:s=!0}=e,l=Ul(t),[i,u]=W.useState(null),c=W.useRef(!1),d=ke(n),f=Ma(r);return W.useEffect(()=>{let h=ue(()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},"handleKeyDown"),g=ue(()=>c.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),W.useEffect(()=>{if(!a)return;let h=ue(()=>d(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[a,d]),(0,ie.jsx)(bn,{...l,children:(0,ie.jsx)(iw,{scope:t,open:a,onOpenChange:d,content:i,onContentChange:u,children:(0,ie.jsx)(uw,{scope:t,onClose:W.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:s,children:o})})})},"Menu"),cw=W.forwardRef(ue(function(t,a){let{__scopeMenu:o,...r}=t,n=Ul(o);return(0,ie.jsx)(yn,{...n,...r,ref:a})},"MenuAnchor")),_f="MenuPortal",[fw,pw]=Va(_f,{forceMount:void 0}),mw=ue(e=>{let{__scopeMenu:t,forceMount:a,children:o,container:r}=e,n=Lr(_f,t);return(0,ie.jsx)(fw,{scope:t,forceMount:a,children:(0,ie.jsx)(Ht,{present:a||n.open,children:(0,ie.jsx)(co,{asChild:!0,container:r,children:o})})})},"MenuPortal"),la="MenuContent",[gw,Uf]=Va(la),hw=W.forwardRef(ue(function(t,a){let o=pw(la,t.__scopeMenu),{forceMount:r=o.forceMount,...n}=t,s=Lr(la,t.__scopeMenu),l=Hl(la,t.__scopeMenu);return(0,ie.jsx)(Bl.Provider,{scope:t.__scopeMenu,children:(0,ie.jsx)(Ht,{present:r||s.open,children:(0,ie.jsx)(Bl.Slot,{scope:t.__scopeMenu,children:l.modal?(0,ie.jsx)(xw,{...n,ref:a}):(0,ie.jsx)(vw,{...n,ref:a})})})})},"MenuContent")),xw=W.forwardRef(ue(function(t,a){let o=Lr(la,t.__scopeMenu),r=W.useRef(null),n=Y(a,r);return W.useEffect(()=>{let s=r.current;if(s)return vo(s)},[]),(0,ie.jsx)(Hf,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:H(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentModal")),vw=W.forwardRef(ue(function(t,a){let o=Lr(la,t.__scopeMenu);return(0,ie.jsx)(Hf,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentNonModal")),ww=ze("MenuContent.ScrollLock"),Hf=W.forwardRef(ue(function(t,a){let{__scopeMenu:o,loop:r=!1,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:p,...m}=t,x=Lr(la,o),w=Hl(la,o),v=Ul(o),C=Nf(o),I=sw(o),[L,y]=W.useState(null),R=W.useRef(null),P=Y(a,R,x.onContentChange),k=W.useRef(0),O=W.useRef(""),D=W.useRef(0),B=W.useRef(null),_=W.useRef("right"),G=W.useRef(0),S=p?La:W.Fragment,M=p?{as:ww,allowPinchZoom:!0}:void 0,A=ue(E=>{let j=O.current+E,z=I().filter(F=>!F.disabled),te=document.activeElement,de=z.find(F=>F.ref.current===te)?.textValue,Pe=z.map(F=>F.textValue),ge=Wf(Pe,j,de),De=z.find(F=>F.textValue===ge)?.ref.current;ue((function F(Q){O.current=Q,window.clearTimeout(k.current),Q!==""&&(k.current=window.setTimeout(()=>F(""),1e3))}),"updateSearch")(j),De&&setTimeout(()=>De.focus())},"handleTypeaheadSearch");W.useEffect(()=>()=>window.clearTimeout(k.current),[]),ta();let N=W.useCallback(E=>_.current===B.current?.side&&Kf(E,B.current?.area),[]);return(0,ie.jsx)(gw,{scope:o,searchRef:O,onItemEnter:W.useCallback(E=>{N(E)&&E.preventDefault()},[N]),onItemLeave:W.useCallback(E=>{N(E)||(R.current?.focus(),y(null))},[N]),onTriggerLeave:W.useCallback(E=>{N(E)&&E.preventDefault()},[N]),pointerGraceTimerRef:D,onPointerGraceIntentChange:W.useCallback(E=>{B.current=E},[]),children:(0,ie.jsx)(S,{...M,children:(0,ie.jsx)(uo,{asChild:!0,trapped:n,onMountAutoFocus:H(s,E=>{E.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:(0,ie.jsx)(io,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g,children:(0,ie.jsx)(Ef,{asChild:!0,...C,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:L,onCurrentTabStopIdChange:y,onEntryFocus:H(u,E=>{w.isUsingKeyboardRef.current||E.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,ie.jsx)(Sn,{role:"menu","aria-orientation":"vertical","data-state":qf(x.open),"data-radix-menu-content":"",dir:w.dir,...v,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:H(m.onKeyDown,E=>{let z=E.target.closest("[data-radix-menu-content]")===E.currentTarget,te=E.ctrlKey||E.altKey||E.metaKey,de=E.key.length===1;z&&(E.key==="Tab"&&E.preventDefault(),!te&&de&&A(E.key));let Pe=R.current;if(E.target!==Pe||!nw.includes(E.key))return;E.preventDefault();let De=I().filter(F=>!F.disabled).map(F=>F.ref.current);Bf.includes(E.key)&&De.reverse(),Vf(De)}),onBlur:H(t.onBlur,E=>{E.currentTarget.contains(E.target)||(window.clearTimeout(k.current),O.current="")}),onPointerMove:H(t.onPointerMove,Bn(E=>{let j=E.target,z=G.current!==E.clientX;if(E.currentTarget.contains(j)&&z){let te=E.clientX>G.current?"right":"left";_.current=te,G.current=E.clientX}}))})})})})})})},"MenuContentImpl"));var Cw=W.forwardRef(ue(function(t,a){let{__scopeMenu:o,...r}=t;return(0,ie.jsx)(Z.div,{...r,ref:a})},"MenuLabel")),Nl="MenuItem",Ff="menu.itemSelect",Lw=W.forwardRef(ue(function(t,a){let{disabled:o=!1,onSelect:r,...n}=t,s=W.useRef(null),l=Hl(Nl,t.__scopeMenu),i=Uf(Nl,t.__scopeMenu),u=Y(a,s),c=W.useRef(!1),d=ue(()=>{let f=s.current;if(!o&&f){let h=new CustomEvent(Ff,{bubbles:!0,cancelable:!0});f.addEventListener(Ff,g=>r?.(g),{once:!0}),rr(f,h),h.defaultPrevented?c.current=!1:l.onClose()}},"handleSelect");return(0,ie.jsx)(Iw,{...n,ref:u,disabled:o,onClick:H(t.onClick,d),onPointerDown:f=>{t.onPointerDown?.(f),c.current=!0},onPointerUp:H(t.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:H(t.onKeyDown,f=>{o||f.target!==f.currentTarget||i.searchRef.current!==""&&f.key===" "||Fl.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})},"MenuItem")),Iw=W.forwardRef(ue(function(t,a){let{__scopeMenu:o,disabled:r=!1,textValue:n,...s}=t,l=Uf(Nl,o),i=Nf(o),u=W.useRef(null),c=Y(a,u),[d,f]=W.useState(!1),[h,g]=W.useState("");return W.useEffect(()=>{let p=u.current;p&&g((p.textContent??"").trim())},[s.children]),(0,ie.jsx)(Bl.ItemSlot,{scope:o,disabled:r,textValue:n??h,children:(0,ie.jsx)(Of,{asChild:!0,...i,focusable:!r,children:(0,ie.jsx)(Z.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:H(t.onPointerMove,Bn(p=>{r?l.onItemLeave(p):(l.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(t.onPointerLeave,Bn(p=>l.onItemLeave(p))),onFocus:H(t.onFocus,()=>f(!0)),onBlur:H(t.onBlur,()=>f(!1))})})})},"MenuItemImpl"));var bw="MenuRadioGroup",[rR,nR]=Va(bw,{value:void 0,onValueChange:ue(()=>{},"onValueChange")});var yw="MenuItemIndicator",[sR,lR]=Va(yw,{checked:!1});var Sw=W.forwardRef(ue(function(t,a){let{__scopeMenu:o,...r}=t;return(0,ie.jsx)(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:a})},"MenuSeparator"));var Rw="MenuSub",[iR,uR]=Va(Rw);function qf(e){return e?"open":"closed"}ue(qf,"getOpenState");function zf(e){return e==="indeterminate"}ue(zf,"isIndeterminate");function Pw(e){return zf(e)?"indeterminate":e?"checked":"unchecked"}ue(Pw,"getCheckedState");function Vf(e){let t=document.activeElement;for(let a of e)if(a===t||(a.focus(),document.activeElement!==t))return}ue(Vf,"focusFirst");function Gf(e,t){return e.map((a,o)=>e[(t+o)%e.length])}ue(Gf,"wrapArray");function Wf(e,t,a){let r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=a?e.indexOf(a):-1,s=Gf(e,Math.max(n,0));r.length===1&&(s=s.filter(u=>u!==a));let i=s.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return i!==a?i:void 0}ue(Wf,"getNextMatch");function jf(e,t){let{x:a,y:o}=e,r=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let l=t[n],i=t[s],u=l.x,c=l.y,d=i.x,f=i.y;c>o!=f>o&&a<(d-u)*(o-c)/(f-c)+u&&(r=!r)}return r}ue(jf,"isPointInPolygon");function Kf(e,t){if(!t)return!1;let a={x:e.clientX,y:e.clientY};return jf(a,t)}ue(Kf,"isPointerInGraceArea");function Bn(e){return t=>t.pointerType==="mouse"?e(t):void 0}ue(Bn,"whenMouse");var Xf=dw,$f=cw,Yf=mw,Zf=hw;var Jf=Cw,Qf=Lw;var ep=Sw;var Et=require("react/jsx-runtime"),Mw=Object.defineProperty,Ga=(e,t)=>Mw(e,"name",{value:t,configurable:!0}),ql="DropdownMenu",[kw,RR]=Ne(ql,[_l]),Wa=_l(),[Aw,tp]=kw(ql),Tw=Ga(e=>{let{__scopeDropdownMenu:t,children:a,dir:o,open:r,defaultOpen:n,onOpenChange:s,modal:l=!0}=e,i=Wa(t),u=It.useRef(null),[c,d]=Rt({prop:r,defaultProp:n??!1,onChange:s,caller:ql});return(0,Et.jsx)(Aw,{scope:t,triggerId:tt(),triggerRef:u,contentId:tt(),open:c,onOpenChange:d,onOpenToggle:It.useCallback(()=>d(f=>!f),[d]),modal:l,children:(0,Et.jsx)(Xf,{...i,open:c,onOpenChange:d,dir:o,modal:l,children:a})})},"DropdownMenu"),Ew="DropdownMenuTrigger",Ow=It.forwardRef(Ga(function(t,a){let{__scopeDropdownMenu:o,disabled:r=!1,...n}=t,s=tp(Ew,o),l=Wa(o),i=Y(a,s.triggerRef);return(0,Et.jsx)($f,{asChild:!0,...l,children:(0,Et.jsx)(Z.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...n,ref:i,onPointerDown:H(t.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(s.onOpenToggle(),s.open||u.preventDefault())}),onKeyDown:H(t.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&s.onOpenToggle(),u.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),Fw=Ga(e=>{let{__scopeDropdownMenu:t,...a}=e,o=Wa(t);return(0,Et.jsx)(Yf,{...o,...a})},"DropdownMenuPortal"),Bw="DropdownMenuContent",Nw=It.forwardRef(Ga(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=tp(Bw,o),s=Wa(o),l=It.useRef(!1);return(0,Et.jsx)(Zf,{id:n.contentId,"aria-labelledby":n.triggerId,...s,...r,ref:a,onCloseAutoFocus:H(t.onCloseAutoFocus,i=>{l.current||n.triggerRef.current?.focus(),l.current=!1,i.preventDefault()}),onInteractOutside:H(t.onInteractOutside,i=>{let u=i.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,d=u.button===2||c;(!n.modal||d)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent"));var _w=It.forwardRef(Ga(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=Wa(o);return(0,Et.jsx)(Jf,{...n,...r,ref:a})},"DropdownMenuLabel")),Uw=It.forwardRef(Ga(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=Wa(o);return(0,Et.jsx)(Qf,{...n,...r,ref:a})},"DropdownMenuItem"));var Hw=It.forwardRef(Ga(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=Wa(o);return(0,Et.jsx)(ep,{...n,...r,ref:a})},"DropdownMenuSeparator"));var ap=Tw,op=Ow,rp=Fw,zl=Nw;var Vl=_w,Gl=Uw;var Wl=Hw;var Do=require("react/jsx-runtime"),jl=ap,Kl=op;var _n=Ir.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Do.jsx)(rp,{children:(0,Do.jsx)(zl,{ref:o,sideOffset:t,className:K("z-50 min-w-[8rem] overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...a})}));_n.displayName=zl.displayName;var Mo=Ir.forwardRef(({className:e,inset:t,...a},o)=>(0,Do.jsx)(Gl,{ref:o,className:K("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a}));Mo.displayName=Gl.displayName;var zw=Ir.forwardRef(({className:e,inset:t,...a},o)=>(0,Do.jsx)(Vl,{ref:o,className:K("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));zw.displayName=Vl.displayName;var Vw=Ir.forwardRef(({className:e,...t},a)=>(0,Do.jsx)(Wl,{ref:a,className:K("-mx-1 my-1 h-px bg-muted",e),...t}));Vw.displayName=Wl.displayName;function Un(e,t={},a="default"){return fetch("/api/kanban",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({method:e,args:{...t,workspaceId:a}})}).then(o=>o.json())}var X=require("react/jsx-runtime");function np(e){let{sessionId:t}=e,a=e.useWorkspaces,o=a?a(S=>S.items):[],r=a?a(S=>S.recentWorkspaceId):void 0,n=Array.isArray(o)?o.find(S=>Array.isArray(S.sessionIds)&&S.sessionIds.includes(t)):void 0,s=n?n.workspaceId:r||"default",l=at(),[i,u]=(0,We.useState)(null),[c,d]=(0,We.useState)(""),[f,h]=(0,We.useState)(null),[g,p]=(0,We.useState)(null),[m,x]=(0,We.useState)(!1),[w,v]=(0,We.useState)(!1),[C,I]=(0,We.useState)(!1),[L,y]=(0,We.useState)(""),R=Ar(to(Zt,{activationConstraint:{distance:8}}),to(Yt,{coordinateGetter:Vr})),P=(0,We.useCallback)(S=>{S&&S.board&&(u(S.board),d(""))},[]),k=(0,We.useCallback)((S,M={})=>{Un(S,M,s).then(P).catch(A=>d(l("actionFailed")+String(A&&A.message||A)))},[s,P]),O=(0,We.useCallback)(()=>{I(!0),Un("get",{},s).then(P).catch(S=>d(l("loadFailed")+String(S&&S.message||S))).finally(()=>I(!1))},[s,P,l]);(0,We.useEffect)(()=>{let S=!0;return Un("get",{},s).then(M=>{S&&P(M)}).catch(M=>{S&&d(l("loadFailed")+String(M&&M.message||M))}),()=>{S=!1}},[s,P]);let D=(0,We.useCallback)(S=>{let M=Pi(S),A=M.length>0?M:os(S),N=Vo(A,"id");if(N==null)return[];if(new Set((i?.columns??[]).map(j=>j.id)).has(String(N))){let j=(i?.cards??[]).filter(z=>z.columnId===N).map(z=>z.id);if(j.length>0){let z=Tr({...S,droppableContainers:S.droppableContainers.filter(te=>te.id!==N&&j.includes(String(te.id)))});z.length>0&&(N=z[0].id)}}return[{id:N}]},[i]),B=S=>{if(S.active.data.current?.type==="card"){let M=i?.cards.find(A=>A.id===S.active.id);M&&h(M)}},_=S=>{let{active:M,over:A}=S;if(h(null),!A||!i)return;let N=M.data.current?.type,E=A.data.current?.type;if(N==="card")if(E==="card"){let j=i.cards.find(de=>de.id===A.id);if(!j||j.id===M.id)return;let te=i.cards.filter(de=>de.columnId===j.columnId).findIndex(de=>de.id===j.id);k("moveCard",{id:String(M.id),columnId:j.columnId,toIndex:te>=0?te:void 0})}else E==="column"&&k("moveCard",{id:String(M.id),columnId:String(A.id)})},G=S=>{if(!g)return;let M={title:S.title,note:S.note,label:S.label||void 0,priority:S.priority||void 0};g.card?k("updateCard",{id:g.card.id,...M}):k("addCard",{columnId:g.columnId,...M})};return i?(0,X.jsxs)("div",{className:"flex h-full min-h-[420px] flex-col gap-3 p-5",children:[c&&(0,X.jsx)("p",{className:"text-sm text-destructive",children:c}),(0,X.jsxs)(Fr,{sensors:R,collisionDetection:D,onDragStart:B,onDragEnd:_,children:[(0,X.jsxs)("div",{className:"flex min-h-0 flex-1 gap-3",children:[(0,X.jsxs)("div",{className:"flex shrink-0 flex-col items-center gap-1.5 self-start rounded-2xl border border-[var(--dsw-alias-border-l2)] bg-card p-1.5 shadow-column",children:[(0,X.jsx)(Be,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground",title:l("refresh"),"aria-label":l("refresh"),disabled:C,onClick:O,children:(0,X.jsx)(Zo,{className:C?"animate-spin":void 0})}),(0,X.jsxs)(jl,{children:[(0,X.jsx)(Kl,{asChild:!0,children:(0,X.jsx)(Be,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground",title:l("settings"),children:(0,X.jsx)(Jo,{className:"h-4 w-4"})})}),(0,X.jsxs)(_n,{align:"start",children:[(0,X.jsxs)(Mo,{onClick:()=>x(!0),children:[(0,X.jsx)(Yo,{className:"h-4 w-4"}),l("columnEdit")]}),(0,X.jsxs)(Mo,{onClick:()=>v(!0),children:[(0,X.jsx)(Qo,{className:"h-4 w-4"}),l("labelEdit")]})]})]}),(0,X.jsxs)(jl,{children:[(0,X.jsx)(Kl,{asChild:!0,children:(0,X.jsx)(Be,{variant:L?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground",title:l("priorityFilter"),children:(0,X.jsx)(Xo,{className:"h-4 w-4"})})}),(0,X.jsxs)(_n,{align:"start",children:[(0,X.jsxs)(Mo,{onClick:()=>y(""),children:[(0,X.jsx)("span",{className:"flex h-4 w-4 items-center",children:!L&&(0,X.jsx)(Jt,{className:"h-4 w-4"})}),l("all")]}),Tn.map(S=>(0,X.jsxs)(Mo,{onClick:()=>y(S),children:[(0,X.jsx)("span",{className:"flex h-4 w-4 items-center",children:L===S&&(0,X.jsx)(Jt,{className:"h-4 w-4"})}),(0,X.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:Ua[S].color}}),Ua[S].label]},S))]})]})]}),(0,X.jsx)("div",{className:"kan-scroll flex flex-1 gap-3 overflow-x-auto pb-2",children:i.columns.map(S=>{let M=i.cards.filter(A=>A.columnId===S.id&&(!L||A.priority===L));return(0,X.jsx)(Lf,{column:S,cards:M,labels:i.labels,onAddCard:A=>p({card:null,columnId:A.id}),onOpenCard:A=>p({card:A,columnId:A.columnId})},S.id)})})]}),(0,X.jsx)(Gi,{children:f?(0,X.jsx)(vr,{className:"w-64 rotate-2 rounded-xl border-[var(--dsw-alias-border-l2)] bg-secondary shadow-float",children:(0,X.jsx)(wr,{className:"p-3.5",children:(0,X.jsx)("p",{className:"text-[13.5px] font-medium tracking-tight break-words",children:f.title})})}):null})]}),(0,X.jsx)(vf,{open:g!==null,card:g?.card??null,labels:i.labels,onOpenChange:S=>{S||p(null)},onSave:G,onDelete:S=>k("deleteCard",{id:S.id})}),(0,X.jsx)(If,{open:m,columns:i.columns,onOpenChange:x,onReorder:(S,M)=>{let A=i.columns.findIndex(N=>N.id===M);A>=0&&k("moveColumn",{id:S,toIndex:A})},onRename:(S,M)=>k("renameColumn",{id:S,title:M}),onDelete:S=>k("deleteColumn",{id:S}),onAdd:S=>k("addColumn",{title:S})}),(0,X.jsx)(bf,{open:w,labels:i.labels,onOpenChange:v,onAdd:(S,M)=>k("addLabel",{name:S,color:M}),onUpdate:(S,M,A)=>k("updateLabel",{name:S,newName:M,color:A}),onDelete:S=>k("deleteLabel",{name:S})})]}):(0,X.jsx)("div",{className:"flex h-full min-h-[420px] items-center justify-center p-5",children:c?(0,X.jsx)("p",{className:"text-sm text-destructive",children:c}):(0,X.jsx)("p",{className:"text-sm text-muted-foreground",children:l("loading")})})}var lp={name:"dsh-kanban",inject:["slots","locale"],apply(e){Ad(e);let t=e.get("slots");t!==void 0&&t.inject("conversation.view",()=>t.register({name:"conversation.view",id:"kanban",order:20,label:()=>Ys("boardTab")},a=>(0,sp.createElement)(np,a)))}};var ip="data-dsh-kanban-style";if(typeof document<"u"&&!document.querySelector("style["+ip+"]")){let e=document.createElement("style");e.setAttribute(ip,""),e.textContent=ri,document.head.appendChild(e)}var Gw=lp;
|
|
1508
|
+
`)},fx=0,wo=[];function Dd(e){var t=ge.useRef([]),a=ge.useRef([0,0]),o=ge.useRef(),r=ge.useState(fx++)[0],n=ge.useState(cr)[0],s=ge.useRef(e);ge.useEffect(function(){s.current=e},[e]),ge.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=fd([e.lockRef.current],(e.shards||[]).map(Pd),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=ge.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var x=cn(p),w=a.current,v="deltaX"in p?p.deltaX:w[0]-x[0],C="deltaY"in p?p.deltaY:w[1]-x[1],b,L=p.target,y=Math.abs(v)>Math.abs(C)?"h":"v";if("touches"in p&&y==="h"&&L.type==="range")return!1;var S=window.getSelection(),P=S&&S.anchorNode,E=P?P===L||P.contains(L):!1;if(E)return!1;var M=$s(y,L);if(!M)return!0;if(M?b=y:(b=y==="v"?"h":"v",M=$s(y,L)),!M)return!1;if(!o.current&&"changedTouches"in p&&(v||C)&&(o.current=b),!b)return!0;var D=o.current||b;return Sd(D,m,p,D==="h"?v:C,!0)},[]),i=ge.useCallback(function(p){var m=p;if(!(!wo.length||wo[wo.length-1]!==n)){var x="deltaY"in m?Rd(m):cn(m),w=t.current.filter(function(b){return b.name===m.type&&(b.target===m.target||m.target===b.shadowParent)&&dx(b.delta,x)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var v=(s.current.shards||[]).map(Pd).filter(Boolean).filter(function(b){return b.contains(m.target)}),C=v.length>0?l(m,v[0]):!s.current.noIsolation;C&&m.cancelable&&m.preventDefault()}}},[]),u=ge.useCallback(function(p,m,x,w){var v={name:p,delta:m,target:x,should:w,shadowParent:px(x)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(C){return C!==v})},1)},[]),c=ge.useCallback(function(p){a.current=cn(p),o.current=void 0},[]),d=ge.useCallback(function(p){u(p.type,Rd(p),p.target,l(p,e.lockRef.current))},[]),f=ge.useCallback(function(p){u(p.type,cn(p),p.target,l(p,e.lockRef.current))},[]);ge.useEffect(function(){return wo.push(n),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",i,ya),document.addEventListener("touchmove",i,ya),document.addEventListener("touchstart",c,ya),function(){wo=wo.filter(function(p){return p!==n}),document.removeEventListener("wheel",i,ya),document.removeEventListener("touchmove",i,ya),document.removeEventListener("touchstart",c,ya)}},[]);var g=e.removeScrollBar,h=e.inert;return ge.createElement(ge.Fragment,null,h?ge.createElement(n,{styles:cx(r)}):null,g?ge.createElement(Ks,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function px(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var kd=qs(dn,Dd);var Md=fn.forwardRef(function(e,t){return fn.createElement(dr,Ye({},e,{ref:t,sideCar:kd}))});Md.classNames=dr.classNames;var Sa=Md;var mx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Co=new WeakMap,pn=new WeakMap,mn={},Ys=0,Ad=function(e){return e&&(e.host||Ad(e.parentNode))},gx=function(e,t){return t.map(function(a){if(e.contains(a))return a;var o=Ad(a);return o&&e.contains(o)?o:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},hx=function(e,t,a,o){var r=gx(t,Array.isArray(e)?e:[e]);mn[a]||(mn[a]=new WeakMap);var n=mn[a],s=[],l=new Set,i=new Set(r),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};r.forEach(u);var c=function(d){!d||i.has(d)||Array.prototype.forEach.call(d.children,function(f){if(l.has(f))c(f);else try{var g=f.getAttribute(o),h=g!==null&&g!=="false",p=(Co.get(f)||0)+1,m=(n.get(f)||0)+1;Co.set(f,p),n.set(f,m),s.push(f),p===1&&h&&pn.set(f,!0),m===1&&f.setAttribute(a,"true"),h||f.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return c(t),l.clear(),Ys++,function(){s.forEach(function(d){var f=Co.get(d)-1,g=n.get(d)-1;Co.set(d,f),n.set(d,g),f||(pn.has(d)||d.removeAttribute(o),pn.delete(d)),g||d.removeAttribute(a)}),Ys--,Ys||(Co=new WeakMap,Co=new WeakMap,pn=new WeakMap,mn={})}},bo=function(e,t,a){a===void 0&&(a="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=t||mx(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),hx(o,r,a,"aria-hidden")):function(){return null}};var Ce=require("react/jsx-runtime"),xx=Object.defineProperty,pt=(e,t)=>xx(e,"name",{value:t,configurable:!0}),Js="Dialog",[Td,FI]=_e(Js),[vx,kt]=Td(Js),Ed=pt(e=>{let{__scopeDialog:t,children:a,open:o,defaultOpen:r,onOpenChange:n,modal:s=!0}=e,l=he.useRef(null),i=he.useRef(null),[u,c]=Dt({prop:o,defaultProp:r??!1,onChange:n,caller:Js}),[d,f]=he.useState(0),[g,h]=he.useState(0);return(0,Ce.jsx)(vx,{scope:t,triggerRef:l,contentRef:i,contentId:ot(),titleId:ot(),descriptionId:ot(),titlePresent:d>0,descriptionPresent:g>0,setTitleCount:f,setDescriptionCount:h,open:u,onOpenChange:c,onOpenToggle:he.useCallback(()=>c(p=>!p),[c]),modal:s,children:a})},"Dialog");var Od="DialogPortal",[wx,Fd]=Td(Od,{forceMount:void 0}),Bd=pt(e=>{let{__scopeDialog:t,forceMount:a,children:o,container:r}=e,n=kt(Od,t);return(0,Ce.jsx)(wx,{scope:t,forceMount:a,children:he.Children.map(o,s=>(0,Ce.jsx)(zt,{present:a||n.open,children:(0,Ce.jsx)(mo,{asChild:!0,container:r,children:s})}))})},"DialogPortal"),Zs="DialogOverlay",Qs=he.forwardRef(pt(function(t,a){let o=Fd(Zs,t.__scopeDialog),{forceMount:r=o.forceMount,...n}=t,s=kt(Zs,t.__scopeDialog);return s.modal?(0,Ce.jsx)(zt,{present:r||s.open,children:(0,Ce.jsx)(bx,{...n,ref:a})}):null},"DialogOverlay")),Cx=Ve("DialogOverlay.RemoveScroll"),bx=he.forwardRef(pt(function(t,a){let{__scopeDialog:o,...r}=t,n=kt(Zs,o),s=Ps(),l=ae(a,s);return(0,Ce.jsx)(Sa,{as:Cx,allowPinchZoom:!0,shards:[n.contentRef],children:(0,Ce.jsx)(re.div,{"data-state":ol(n.open),...r,ref:l,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),pr="DialogContent",el=he.forwardRef(pt(function(t,a){let o=Fd(pr,t.__scopeDialog),{forceMount:r=o.forceMount,...n}=t,s=kt(pr,t.__scopeDialog);return(0,Ce.jsx)(zt,{present:r||s.open,children:s.modal?(0,Ce.jsx)(Lx,{...n,ref:a}):(0,Ce.jsx)(Ix,{...n,ref:a})})},"DialogContent")),Lx=he.forwardRef(pt(function(t,a){let o=kt(pr,t.__scopeDialog),r=he.useRef(null),n=ae(a,o.contentRef,r);return he.useEffect(()=>{let s=r.current;if(s)return bo(s)},[]),(0,Ce.jsx)(Nd,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:z(t.onCloseAutoFocus,s=>{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:z(t.onPointerDownOutside,s=>{let l=s.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&s.preventDefault()}),onFocusOutside:z(t.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),Ix=he.forwardRef(pt(function(t,a){let o=kt(pr,t.__scopeDialog),r=he.useRef(!1),n=he.useRef(!1);return(0,Ce.jsx)(Nd,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let l=s.target;o.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})},"DialogContentNonModal")),Nd=he.forwardRef(pt(function(t,a){let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,...l}=t,i=kt(pr,o);return na(),(0,Ce.jsx)(Ce.Fragment,{children:(0,Ce.jsx)(po,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:(0,Ce.jsx)(fo,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionPresent?i.descriptionId:void 0,"aria-labelledby":i.titlePresent?i.titleId:void 0,"data-state":ol(i.open),...l,ref:a,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})},"DialogContentImpl")),yx="DialogTitle",tl=he.forwardRef(pt(function(t,a){let{__scopeDialog:o,...r}=t,n=kt(yx,o),{setTitleCount:s}=n;return ue(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),(0,Ce.jsx)(re.h2,{id:n.titleId,...r,ref:a})},"DialogTitle")),Sx="DialogDescription",al=he.forwardRef(pt(function(t,a){let{__scopeDialog:o,...r}=t,n=kt(Sx,o),{setDescriptionCount:s}=n;return ue(()=>(s(l=>l+1),()=>s(l=>l-1)),[s]),(0,Ce.jsx)(re.p,{id:n.descriptionId,...r,ref:a})},"DialogDescription")),Rx="DialogClose",_d=he.forwardRef(pt(function(t,a){let{__scopeDialog:o,...r}=t,n=kt(Rx,o);return(0,Ce.jsx)(re.button,{type:"button",...r,ref:a,onClick:z(t.onClick,()=>n.onOpenChange(!1))})},"DialogClose"));function ol(e){return e?"open":"closed"}pt(ol,"getState");var Hd=require("react"),rl="dsh-kanban",qd={boardTab:"\u770B\u677F",loading:"\u770B\u677F\u52A0\u8F7D\u4E2D\u2026",loadFailed:"\u770B\u677F\u52A0\u8F7D\u5931\u8D25\uFF1A",actionFailed:"\u64CD\u4F5C\u5931\u8D25\uFF1A",refresh:"\u5237\u65B0\u770B\u677F",settings:"\u8BBE\u7F6E",columnEdit:"\u5217\u7F16\u8F91",labelEdit:"\u6807\u7B7E\u7F16\u8F91",emptyColumn:"\u6682\u65E0\u5361\u7247",addCard:"\u6DFB\u52A0\u5361\u7247",dragSort:"\u62D6\u62FD\u6392\u5E8F",editCard:"\u7F16\u8F91\u5361\u7247",fieldTitle:"\u6807\u9898",fieldId:"\u4EFB\u52A1 ID",titlePlaceholder:"\u5361\u7247\u6807\u9898",fieldLabel:"\u6807\u7B7E",noLabel:"\u65E0\u6807\u7B7E",fieldPriority:"\u4F18\u5148\u7EA7",noPriority:"\u65E0\u4F18\u5148\u7EA7",fieldNote:"\u5907\u6CE8",notePlaceholder:"\u5907\u6CE8\uFF08\u53EF\u9009\uFF09",cancel:"\u53D6\u6D88",save:"\u4FDD\u5B58",chatWithAgent:"\u4E0E agent \u804A\u4E00\u804A",chatCurrentSession:"\u5F53\u524D\u5BF9\u8BDD",chatNewSession:"\u65B0\u5EFA\u5BF9\u8BDD",delete:"\u5220\u9664",add:"\u6DFB\u52A0",close:"\u5173\u95ED",columnEditDesc:"\u62D6\u62FD\u8C03\u6574\u5217\u7684\u987A\u5E8F\uFF0C\u6216\u91CD\u547D\u540D\u3001\u5220\u9664\u3001\u65B0\u589E\u5217\u8868",newColumnPlaceholder:"\u65B0\u5217\u8868\u540D\u79F0",labelEditDesc:"\u521B\u5EFA\u3001\u5220\u9664\u6216\u4FEE\u6539\u6807\u7B7E\uFF0C\u989C\u8272\u4E0E\u6807\u7B7E\u7ED1\u5B9A",newLabelPlaceholder:"\u65B0\u6807\u7B7E\u540D\u79F0",priorityFilter:"\u6309\u4F18\u5148\u7EA7\u7B5B\u9009",all:"\u5168\u90E8",warnings:"\u6570\u636E\u63D0\u793A",dismiss:"\u77E5\u9053\u4E86",activityTitle:"\u6D3B\u52A8\u8BB0\u5F55",activityEmpty:"\u6682\u65E0\u6D3B\u52A8\u8BB0\u5F55",actorHuman:"\u4F60",actorAgent:"Agent",actCreated:"\u521B\u5EFA\u4E8E\u300C{column}\u300D\uFF0C\u6807\u7B7E {label}\uFF0C\u4F18\u5148\u7EA7 {priority}",actMoved:"\u4ECE\u300C{from}\u300D\u79FB\u5230\u300C{to}\u300D",actLabel:"\u6807\u7B7E {from} \u2192 {to}",actLabelSet:"\u8BBE\u7F6E\u6807\u7B7E {to}",actLabelCleared:"\u6E05\u9664\u6807\u7B7E {from}",actPriority:"\u4F18\u5148\u7EA7 {from} \u2192 {to}",actPrioritySet:"\u8BBE\u7F6E\u4F18\u5148\u7EA7 {to}",actPriorityCleared:"\u6E05\u9664\u4F18\u5148\u7EA7 {from}",actTitle:'\u6807\u9898 "{from}" \u2192 "{to}"',actNote:"\u66F4\u65B0\u4E86\u5907\u6CE8",actDeleted:"\u5220\u9664\u4E86\u5361\u7247",actColumnAdded:"\u65B0\u589E\u5217\u8868\u300C{column}\u300D",actColumnRenamed:"\u5217\u8868\u300C{from}\u300D\u2192\u300C{to}\u300D",actColumnDeleted:"\u5220\u9664\u4E86\u5217\u8868\u300C{column}\u300D",actLabelAdded:"\u65B0\u589E\u6807\u7B7E\u300C{label}\u300D",actLabelRenamed:"\u6807\u7B7E\u300C{from}\u300D\u2192\u300C{to}\u300D",actLabelDeleted:"\u5220\u9664\u4E86\u6807\u7B7E\u300C{label}\u300D",actLabelColor:"\u6807\u7B7E\u300C{label}\u300D\u6539\u8272 {from} \u2192 {to}",noValue:"\u65E0"},Dx={boardTab:"Board",loading:"Loading board\u2026",loadFailed:"Failed to load board: ",actionFailed:"Action failed: ",refresh:"Refresh board",settings:"Settings",columnEdit:"Edit lists",labelEdit:"Edit labels",emptyColumn:"No cards",addCard:"Add card",dragSort:"Drag to reorder",editCard:"Edit card",fieldTitle:"Title",fieldId:"Task ID",titlePlaceholder:"Card title",fieldLabel:"Label",noLabel:"No label",fieldPriority:"Priority",noPriority:"No priority",fieldNote:"Note",notePlaceholder:"Note (optional)",cancel:"Cancel",save:"Save",chatWithAgent:"Chat with agent",chatCurrentSession:"Current session",chatNewSession:"New session",delete:"Delete",add:"Add",close:"Close",columnEditDesc:"Drag to reorder lists, or rename, delete and add lists",newColumnPlaceholder:"New list name",labelEditDesc:"Create, delete or edit labels; color is bound to the label",newLabelPlaceholder:"New label name",priorityFilter:"Filter by priority",all:"All",warnings:"Data notice",dismiss:"Got it",activityTitle:"Activity",activityEmpty:"No activity yet",actorHuman:"You",actorAgent:"Agent",actCreated:'Created in "{column}" with label {label}, priority {priority}',actMoved:'Moved from "{from}" to "{to}"',actLabel:"Label {from} \u2192 {to}",actLabelSet:"Set label {to}",actLabelCleared:"Cleared label {from}",actPriority:"Priority {from} \u2192 {to}",actPrioritySet:"Set priority {to}",actPriorityCleared:"Cleared priority {from}",actTitle:'Title "{from}" \u2192 "{to}"',actNote:"Updated the note",actDeleted:"Deleted the card",actColumnAdded:'Added list "{column}"',actColumnRenamed:'List "{from}" \u2192 "{to}"',actColumnDeleted:'Deleted list "{column}"',actLabelAdded:'Added label "{label}"',actLabelRenamed:'Label "{from}" \u2192 "{to}"',actLabelDeleted:'Deleted label "{label}"',actLabelColor:'Label "{label}" color {from} \u2192 {to}',noValue:"None"},Ra=null,nl=null;function zd(e){let t=e.get("locale");if(t!==void 0){Ra=t;try{t.register(rl,"zh",qd),t.register(rl,"en",Dx)}catch{}nl=t.bind(rl)}}function Lo(e){return nl?nl(e):qd[e]??e}var kx=e=>Ra&&typeof Ra.subscribe=="function"?Ra.subscribe(e):()=>{},Ud=()=>Ra&&typeof Ra.getSnapshot=="function"?Ra.getSnapshot():null;function Xe(){return(0,Hd.useSyncExternalStore)(kx,Ud,Ud),Lo}var rt=require("react/jsx-runtime"),Io=Ed;var Mx=Bd;var Vd=mr.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(Qs,{ref:a,className:ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Vd.displayName=Qs.displayName;var Pa=mr.forwardRef(({className:e,children:t,...a},o)=>{let r=Xe();return(0,rt.jsxs)(Mx,{children:[(0,rt.jsx)(Vd,{}),(0,rt.jsxs)(el,{ref:o,className:ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,rt.jsxs)(_d,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,rt.jsx)(nr,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:"sr-only",children:r("close")})]})]})]})});Pa.displayName=el.displayName;var Da=({className:e,...t})=>(0,rt.jsx)("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Da.displayName="DialogHeader";var gr=({className:e,...t})=>(0,rt.jsx)("div",{className:ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gr.displayName="DialogFooter";var ka=mr.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(tl,{ref:a,className:ee("text-lg font-semibold leading-none tracking-tight",e),...t}));ka.displayName=tl.displayName;var hr=mr.forwardRef(({className:e,...t},a)=>(0,rt.jsx)(al,{ref:a,className:ee("text-sm text-muted-foreground",e),...t}));hr.displayName=al.displayName;var yr=q(require("react"),1);var It=q(require("react"),1);var J=q(require("react"),1);var vt=q(require("react"),1);var gn=require("react/jsx-runtime"),Ze=q(require("react"),1);var Ma=require("react/jsx-runtime");var Ax=Object.defineProperty,Oe=(e,t)=>Ax(e,"name",{value:t,configurable:!0});function Aa(e){let t=e+"CollectionProvider",[a,o]=_e(t),[r,n]=a(t,{collectionRef:{current:null},itemMap:new Map}),s=Oe(p=>{let{scope:m,children:x}=p,w=vt.useRef(null),v=vt.useRef(new Map).current;return(0,gn.jsx)(r,{scope:m,itemMap:v,collectionRef:w,children:x})},"CollectionProvider");s.displayName=t;let l=e+"CollectionSlot",i=Ve(l),u=vt.forwardRef((p,m)=>{let{scope:x,children:w}=p,v=n(l,x),C=ae(m,v.collectionRef);return(0,gn.jsx)(i,{ref:C,children:w})});u.displayName=l;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Ve(c),g=vt.forwardRef((p,m)=>{let{scope:x,children:w,...v}=p,C=vt.useRef(null),b=ae(m,C),L=n(c,x);return vt.useEffect(()=>(L.itemMap.set(C,{ref:C,...v}),()=>{L.itemMap.delete(C)})),(0,gn.jsx)(f,{[d]:"",ref:b,children:w})});g.displayName=c;function h(p){let m=n(e+"CollectionConsumer",p);return vt.useCallback(()=>{let w=m.collectionRef.current;if(!w)return[];let v=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((L,y)=>v.indexOf(L.ref.current)-v.indexOf(y.ref.current))},[m.collectionRef,m.itemMap])}return Oe(h,"useCollection"),[{Provider:s,Slot:u,ItemSlot:g},h,o]}Oe(Aa,"createCollection");var Gd=new WeakMap,Se,nt,sl=(nt=class extends Map{constructor(a){super(a);mi(this,Se);Qn(this,Se,[...super.keys()]),Gd.set(this,!0)}set(a,o){return Gd.get(this)&&(this.has(a)?qe(this,Se)[qe(this,Se).indexOf(a)]=a:qe(this,Se).push(a)),super.set(a,o),this}insert(a,o,r){let n=this.has(o),s=qe(this,Se).length,l=il(a),i=l>=0?l:s+l,u=i<0||i>=s?-1:i;if(u===this.size||n&&u===this.size-1||u===-1)return this.set(o,r),this;let c=this.size+(n?0:1);l<0&&i++;let d=[...qe(this,Se)],f,g=!1;for(let h=i;h<c;h++)if(i===h){let p=d[h];d[h]===o&&(p=d[h+1]),n&&this.delete(o),f=this.get(p),this.set(o,r)}else{!g&&d[h-1]===o&&(g=!0);let p=d[g?h:h-1],m=f;f=this.get(p),this.delete(p),this.set(p,m)}return this}with(a,o,r){let n=new nt(this);return n.insert(a,o,r),n}before(a){let o=qe(this,Se).indexOf(a)-1;if(!(o<0))return this.entryAt(o)}setBefore(a,o,r){let n=qe(this,Se).indexOf(a);return n===-1?this:this.insert(n,o,r)}after(a){let o=qe(this,Se).indexOf(a);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(a,o,r){let n=qe(this,Se).indexOf(a);return n===-1?this:this.insert(n+1,o,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Qn(this,Se,[]),super.clear()}delete(a){let o=super.delete(a);return o&&qe(this,Se).splice(qe(this,Se).indexOf(a),1),o}deleteAt(a){let o=this.keyAt(a);return o!==void 0?this.delete(o):!1}at(a){let o=hn(qe(this,Se),a);if(o!==void 0)return this.get(o)}entryAt(a){let o=hn(qe(this,Se),a);if(o!==void 0)return[o,this.get(o)]}indexOf(a){return qe(this,Se).indexOf(a)}keyAt(a){return hn(qe(this,Se),a)}from(a,o){let r=this.indexOf(a);if(r===-1)return;let n=r+o;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(a,o){let r=this.indexOf(a);if(r===-1)return;let n=r+o;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(a,o){let r=0;for(let n of this){if(Reflect.apply(a,o,[n,r,this]))return n;r++}}findIndex(a,o){let r=0;for(let n of this){if(Reflect.apply(a,o,[n,r,this]))return r;r++}return-1}filter(a,o){let r=[],n=0;for(let s of this)Reflect.apply(a,o,[s,n,this])&&r.push(s),n++;return new nt(r)}map(a,o){let r=[],n=0;for(let s of this)r.push([s[0],Reflect.apply(a,o,[s,n,this])]),n++;return new nt(r)}reduce(...a){let[o,r]=a,n=0,s=r??this.at(0);for(let l of this)n===0&&a.length===1?s=l:s=Reflect.apply(o,this,[s,l,n,this]),n++;return s}reduceRight(...a){let[o,r]=a,n=r??this.at(-1);for(let s=this.size-1;s>=0;s--){let l=this.at(s);s===this.size-1&&a.length===1?n=l:n=Reflect.apply(o,this,[n,l,s,this])}return n}toSorted(a){let o=[...this.entries()].sort(a);return new nt(o)}toReversed(){let a=new nt;for(let o=this.size-1;o>=0;o--){let r=this.keyAt(o),n=this.get(r);a.set(r,n)}return a}toSpliced(...a){let o=[...this.entries()];return o.splice(...a),new nt(o)}slice(a,o){let r=new nt,n=this.size-1;if(a===void 0)return r;a<0&&(a=a+this.size),o!==void 0&&o>0&&(n=o-1);for(let s=a;s<=n;s++){let l=this.keyAt(s),i=this.get(l);r.set(l,i)}return r}every(a,o){let r=0;for(let n of this){if(!Reflect.apply(a,o,[n,r,this]))return!1;r++}return!0}some(a,o){let r=0;for(let n of this){if(Reflect.apply(a,o,[n,r,this]))return!0;r++}return!1}},Se=new WeakMap,Oe(nt,"OrderedDict"),nt);function hn(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=Wd(e,t);return a===-1?void 0:e[a]}Oe(hn,"at");function Wd(e,t){let a=e.length,o=il(t),r=o>=0?o:a+o;return r<0||r>=a?-1:r}Oe(Wd,"toSafeIndex");function il(e){return e!==e||e===0?0:Math.trunc(e)}Oe(il,"toSafeInteger");function Tx(e){let t=e+"CollectionProvider",[a,o]=_e(t),[r,n]=a(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new sl,setItemMap:Oe(()=>{},"setItemMap")}),s=Oe(({state:v,...C})=>v?(0,Ma.jsx)(i,{...C,state:v}):(0,Ma.jsx)(l,{...C}),"CollectionProvider");s.displayName=t;let l=Oe(v=>{let C=m();return(0,Ma.jsx)(i,{...v,state:C})},"CollectionInit");l.displayName=t+"Init";let i=Oe(v=>{let{scope:C,children:b,state:L}=v,y=Ze.useRef(null),[S,P]=Ze.useState(null),E=ae(y,P),[M,D]=L;return Ze.useEffect(()=>{if(!S)return;let F=Xd(()=>{});return F.observe(S,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[S]),(0,Ma.jsx)(r,{scope:C,itemMap:M,setItemMap:D,collectionRef:E,collectionRefObject:y,collectionElement:S,children:b})},"CollectionProviderImpl");i.displayName=t+"Impl";let u=e+"CollectionSlot",c=Ve(u),d=Ze.forwardRef((v,C)=>{let{scope:b,children:L}=v,y=n(u,b),S=ae(C,y.collectionRef);return(0,Ma.jsx)(c,{ref:S,children:L})});d.displayName=u;let f=e+"CollectionItemSlot",g="data-radix-collection-item",h=Ve(f),p=Ze.forwardRef((v,C)=>{let{scope:b,children:L,...y}=v,S=Ze.useRef(null),[P,E]=Ze.useState(null),M=ae(C,S,E),D=n(f,b),{setItemMap:F}=D,U=Ze.useRef(y);jd(U.current,y)||(U.current=y);let Z=U.current;return Ze.useEffect(()=>{let W=Z;return F(O=>P?O.has(P)?O.set(P,{...W,element:P}).toSorted(ll):(O.set(P,{...W,element:P}),O.toSorted(ll)):O),()=>{F(O=>!P||!O.has(P)?O:(O.delete(P),new sl(O)))}},[P,Z,F]),(0,Ma.jsx)(h,{[g]:"",ref:M,children:L})});p.displayName=f;function m(){return Ze.useState(new sl)}Oe(m,"useInitCollection");function x(v){let{itemMap:C}=n(e+"CollectionConsumer",v);return C}return Oe(x,"useCollection"),[{Provider:s,Slot:d,ItemSlot:p},{createCollectionScope:o,useCollection:x,useInitCollection:m}]}Oe(Tx,"createCollection");function jd(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Oe(jd,"shallowEqual");function Kd(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Oe(Kd,"isElementPreceding");function ll(e,t){return!e[1].element||!t[1].element?0:Kd(e[1].element,t[1].element)?-1:1}Oe(ll,"sortByDocumentPosition");function Xd(e){return new MutationObserver(a=>{for(let o of a)if(o.type==="childList"){e();return}})}Oe(Xd,"getChildListObserver");var xn=q(require("react"),1),Fx=require("react/jsx-runtime"),Ex=Object.defineProperty,Ox=(e,t)=>Ex(e,"name",{value:t,configurable:!0}),Bx=xn.createContext(void 0);function Ta(e){let t=xn.useContext(Bx);return e||t||"ltr"}Ox(Ta,"useDirection");var We=q(require("react"),1);var Zd=["top","right","bottom","left"];var Mt=Math.min,wt=Math.max,vr=Math.round,wr=Math.floor,At=e=>({x:e,y:e}),Nx={left:"right",right:"left",bottom:"top",top:"bottom"};function ul(e,t,a){return wt(e,Mt(t,a))}function Tt(e,t){return typeof e=="function"?e(t):e}function Vt(e){return e.split("-")[0]}function Ea(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function Cn(e){return e==="y"?"height":"width"}function Ct(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function bn(e){return wn(Ct(e))}function Jd(e,t,a){a===void 0&&(a=!1);let o=Ea(e),r=bn(e),n=Cn(r),s=r==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=xr(s)),[s,xr(s)]}function Qd(e){let t=xr(e);return[vn(e),t,vn(t)]}function vn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var $d=["left","right"],Yd=["right","left"],_x=["top","bottom"],Ux=["bottom","top"];function Hx(e,t,a){switch(e){case"top":case"bottom":return a?t?Yd:$d:t?$d:Yd;case"left":case"right":return t?_x:Ux;default:return[]}}function ec(e,t,a,o){let r=Ea(e),n=Hx(Vt(e),a==="start",o);return r&&(n=n.map(s=>s+"-"+r),t&&(n=n.concat(n.map(vn)))),n}function xr(e){let t=Vt(e);return Nx[t]+e.slice(t.length)}function qx(e){var t,a,o,r;return{top:(t=e.top)!=null?t:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function dl(e){return typeof e!="number"?qx(e):{top:e,right:e,bottom:e,left:e}}function Oa(e){let{x:t,y:a,width:o,height:r}=e;return{width:o,height:r,top:a,left:t,right:t+o,bottom:a+r,x:t,y:a}}function tc(e,t,a){let{reference:o,floating:r}=e,n=Ct(t),s=bn(t),l=Cn(s),i=Vt(t),u=n==="y",c=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[l]/2-r[l]/2,g;switch(i){case"top":g={x:c,y:o.y-r.height};break;case"bottom":g={x:c,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:d};break;case"left":g={x:o.x-r.width,y:d};break;default:g={x:o.x,y:o.y}}let h=Ea(t);return h&&(g[s]+=f*(h==="end"?1:-1)*(a&&u?-1:1)),g}async function rc(e,t){var a;t===void 0&&(t={});let{x:o,y:r,platform:n,rects:s,elements:l,strategy:i}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:g=0}=Tt(t,e),h=dl(g),m=l[f?d==="floating"?"reference":"floating":d],x=Oa(await n.getClippingRect({element:(a=await(n.isElement==null?void 0:n.isElement(m)))==null||a?m:m.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:i})),w=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating)),C=await(n.isElement==null?void 0:n.isElement(v))&&await(n.getScale==null?void 0:n.getScale(v))||{x:1,y:1},b=Oa(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:v,strategy:i}):w);return{top:(x.top-b.top+h.top)/C.y,bottom:(b.bottom-x.bottom+h.bottom)/C.y,left:(x.left-b.left+h.left)/C.x,right:(b.right-x.right+h.right)/C.x}}var zx=50,nc=async(e,t,a)=>{let{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:s}=a,l=s.detectOverflow?s:{...s,detectOverflow:rc},i=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=tc(u,o,i),f=o,g=0,h={};for(let p=0;p<n.length;p++){let m=n[p];if(!m)continue;let{name:x,fn:w}=m,{x:v,y:C,data:b,reset:L}=await w({x:c,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});c=v??c,d=C??d,h[x]={...h[x],...b},L&&g<zx&&(g++,typeof L=="object"&&(L.placement&&(f=L.placement),L.rects&&(u=L.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):L.rects),{x:c,y:d}=tc(u,f,i)),p=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:h}},sc=e=>({name:"arrow",options:e,async fn(t){let{x:a,y:o,placement:r,rects:n,platform:s,elements:l,middlewareData:i}=t,{element:u,padding:c=0}=Tt(e,t)||{};if(u==null)return{};let d=dl(c),f={x:a,y:o},g=bn(r),h=Cn(g),p=await s.getDimensions(u),m=g==="y",x=m?"top":"left",w=m?"bottom":"right",v=m?"clientHeight":"clientWidth",C=n.reference[h]+n.reference[g]-f[g]-n.floating[h],b=f[g]-n.reference[g],L=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),y=L?L[v]:0;(!y||!await(s.isElement==null?void 0:s.isElement(L)))&&(y=l.floating[v]||n.floating[h]);let S=C/2-b/2,P=y/2-p[h]/2-1,E=Mt(d[x],P),M=Mt(d[w],P),D=y-p[h]-M,F=y/2-p[h]/2+S,U=ul(E,F,D),Z=!i.arrow&&Ea(r)!=null&&F!==U&&n.reference[h]/2-(F<E?E:M)-p[h]/2<0,W=Z?F<E?F-E:F-D:0;return{[g]:f[g]+W,data:{[g]:U,centerOffset:F-U-W,...Z&&{alignmentOffset:W}},reset:Z}}});var lc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;let{placement:r,middlewareData:n,rects:s,initialPlacement:l,platform:i,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...m}=Tt(e,t);if((a=n.arrow)!=null&&a.alignmentOffset)return{};let x=Vt(r),w=Ct(l),v=Vt(l)===l,C=await(i.isRTL==null?void 0:i.isRTL(u.floating)),b=f||(v||!p?[xr(l)]:Qd(l)),L=h!=="none";!f&&L&&b.push(...ec(l,p,h,C));let y=[l,...b],S=await i.detectOverflow(t,m),P=[],E=((o=n.flip)==null?void 0:o.overflows)||[];if(c&&P.push(S[x]),d){let U=Jd(r,s,C);P.push(S[U[0]],S[U[1]])}if(E=[...E,{placement:r,overflows:P}],!P.every(U=>U<=0)){var M,D;let U=(((M=n.flip)==null?void 0:M.index)||0)+1,Z=y[U];if(Z&&(!(d==="alignment"?w!==Ct(Z):!1)||E.every(B=>Ct(B.placement)===w?B.overflows[0]>0:!0)))return{data:{index:U,overflows:E},reset:{placement:Z}};let W=(D=E.filter(O=>O.overflows[0]<=0).sort((O,B)=>O.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!W)switch(g){case"bestFit":{var F;let O=(F=E.filter(B=>{if(L){let H=Ct(B.placement);return H===w||H==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(H=>H>0).reduce((H,T)=>H+T,0)]).sort((B,H)=>B[1]-H[1])[0])==null?void 0:F[0];O&&(W=O);break}case"initialPlacement":W=l;break}if(r!==W)return{reset:{placement:W}}}return{}}}};function ac(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oc(e){return Zd.some(t=>e[t]>=0)}var ic=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:a,platform:o}=t,{strategy:r="referenceHidden",...n}=Tt(e,t);switch(r){case"referenceHidden":{let s=await o.detectOverflow(t,{...n,elementContext:"reference"}),l=ac(s,a.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:oc(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...n,altBoundary:!0}),l=ac(s,a.floating);return{data:{escapedOffsets:l,escaped:oc(l)}}}default:return{}}}}};var uc=new Set(["left","top"]);async function Vx(e,t){let{placement:a,platform:o,elements:r}=e,n=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Vt(a),l=Ea(a),i=Ct(a)==="y",u=uc.has(s)?-1:1,c=n&&i?-1:1,d=Tt(t,e),{mainAxis:f,crossAxis:g,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(g=l==="end"?h*-1:h),i?{x:g*c,y:f*u}:{x:f*u,y:g*c}}var dc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;let{x:r,y:n,placement:s,middlewareData:l}=t,i=await Vx(t,e);return s===((a=l.offset)==null?void 0:a.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+i.x,y:n+i.y,data:{...i,placement:s}}}}},cc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:a,y:o,placement:r,platform:n}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:i={fn:w=>{let{x:v,y:C}=w;return{x:v,y:C}}},...u}=Tt(e,t),c={x:a,y:o},d=await n.detectOverflow(t,u),f=Ct(r),g=wn(f),h=c[g],p=c[f],m=(w,v)=>ul(v+d[w==="y"?"top":"left"],v,v-d[w==="y"?"bottom":"right"]);s&&(h=m(g,h)),l&&(p=m(f,p));let x=i.fn({...t,[g]:h,[f]:p});return{...x,data:{x:x.x-a,y:x.y-o,enabled:{[g]:s,[f]:l}}}}}},fc=function(e){return e===void 0&&(e={}),{options:e,fn(t){var a,o;let{x:r,y:n,placement:s,rects:l,middlewareData:i}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=Tt(e,t),f={x:r,y:n},g=Ct(s),h=wn(g),p=f[h],m=f[g],x=Tt(u,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(a=x.mainAxis)!=null?a:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(c){let b=h==="y"?"height":"width",L=l.reference[h]-l.floating[b]+w.mainAxis,y=l.reference[h]+l.reference[b]-w.mainAxis;p<L?p=L:p>y&&(p=y)}if(d){var v,C;let b=h==="y"?"width":"height",L=uc.has(Vt(s)),y=l.reference[g]-l.floating[b]+(L&&((v=i.offset)==null?void 0:v[g])||0)+(L?0:w.crossAxis),S=l.reference[g]+l.reference[b]+(L?0:((C=i.offset)==null?void 0:C[g])||0)-(L?w.crossAxis:0);m<y?m=y:m>S&&(m=S)}return{[h]:p,[g]:m}}}},pc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:a,rects:o,platform:r,elements:n}=t,{apply:s=()=>{},...l}=Tt(e,t),i=await r.detectOverflow(t,l),u=Vt(a),c=Ea(a),d=Ct(a)==="y",{width:f,height:g}=o.floating,h,p;u==="top"||u==="bottom"?(h=u,p=c===(await(r.isRTL==null?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"):(p=u,h=c==="end"?"top":"bottom");let m=g-i.top-i.bottom,x=f-i.left-i.right,w=Mt(g-i[h],m),v=Mt(f-i[p],x),C=t.middlewareData.shift,b=!C,L=w,y=v;C!=null&&C.enabled.x&&(y=x),C!=null&&C.enabled.y&&(L=m),b&&!c&&(d?y=f-2*wt(i.left,i.right):L=g-2*wt(i.top,i.bottom)),await s({...t,availableWidth:y,availableHeight:L});let S=await r.getDimensions(n.floating);return f!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}};function Ln(){return typeof window<"u"}function Na(e){return gc(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Et(e){var t;return(t=(gc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gc(e){return Ln()?e instanceof Node||e instanceof $e(e).Node:!1}function bt(e){return Ln()?e instanceof Element||e instanceof $e(e).Element:!1}function Gt(e){return Ln()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function mc(e){return!Ln()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}function Cr(e){let{overflow:t,overflowX:a,overflowY:o,display:r}=Lt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&r!=="inline"&&r!=="contents"}function hc(e){return/^(table|td|th)$/.test(Na(e))}function br(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Gx=/transform|translate|scale|rotate|perspective|filter/,Wx=/paint|layout|strict|content/,Fa=e=>!!e&&e!=="none",cl;function In(e){let t=bt(e)?Lt(e):e;return Fa(t.transform)||Fa(t.translate)||Fa(t.scale)||Fa(t.rotate)||Fa(t.perspective)||!yn()&&(Fa(t.backdropFilter)||Fa(t.filter))||Gx.test(t.willChange||"")||Wx.test(t.contain||"")}function xc(e){let t=sa(e);for(;Gt(t)&&!yo(t);){if(In(t))return t;if(br(t))return null;t=sa(t)}return null}function yn(){return cl==null&&(cl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cl}function yo(e){return/^(html|body|#document)$/.test(Na(e))}function Lt(e){return $e(e).getComputedStyle(e)}function Lr(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sa(e){if(Na(e)==="html")return e;let t=e.assignedSlot||e.parentNode||mc(e)&&e.host||Et(e);return mc(t)?t.host:t}function vc(e){let t=sa(e);return yo(t)?(e.ownerDocument||e).body:Gt(t)&&Cr(t)?t:vc(t)}function Ba(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);let r=vc(e),n=r===((o=e.ownerDocument)==null?void 0:o.body),s=$e(r);if(n){let l=Sn(s);return t.concat(s,s.visualViewport||[],Cr(r)?r:[],l&&a?Ba(l):[])}else return t.concat(r,Ba(r,[],a))}function Sn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bc(e){let t=Lt(e),a=parseFloat(t.width)||0,o=parseFloat(t.height)||0,r=Gt(e),n=r?e.offsetWidth:a,s=r?e.offsetHeight:o,l=vr(a)!==n||vr(o)!==s;return l&&(a=n,o=s),{width:a,height:o,$:l}}function pl(e){return bt(e)?e:e.contextElement}function So(e){let t=pl(e);if(!Gt(t))return At(1);let a=t.getBoundingClientRect(),{width:o,height:r,$:n}=bc(t),s=(n?vr(a.width):a.width)/o,l=(n?vr(a.height):a.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var jx=At(0);function Lc(e){let t=$e(e);return!yn()||!t.visualViewport?jx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kx(e,t,a){return t===void 0&&(t=!1),!!a&&t&&a===$e(e)}function _a(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);let r=e.getBoundingClientRect(),n=pl(e),s=At(1);t&&(o?bt(o)&&(s=So(o)):s=So(e));let l=Kx(n,a,o)?Lc(n):At(0),i=(r.left+l.x)/s.x,u=(r.top+l.y)/s.y,c=r.width/s.x,d=r.height/s.y;if(n&&o){let f=$e(n),g=bt(o)?$e(o):o,h=f,p=Sn(h);for(;p&&g!==h;){let m=So(p),x=p.getBoundingClientRect(),w=Lt(p),v=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*m.x,C=x.top+(p.clientTop+parseFloat(w.paddingTop))*m.y;i*=m.x,u*=m.y,c*=m.x,d*=m.y,i+=v,u+=C,h=$e(p),p=Sn(h)}}return Oa({width:c,height:d,x:i,y:u})}function Rn(e,t){let a=Lr(e).scrollLeft;return t?t.left+a:_a(Et(e)).left+a}function Ic(e,t){let a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-Rn(e,a),r=a.top+t.scrollTop;return{x:o,y:r}}function Xx(e){let{elements:t,rect:a,offsetParent:o,strategy:r}=e,n=r==="fixed",s=Et(o),l=t?br(t.floating):!1;if(o===s||l&&n)return a;let i={scrollLeft:0,scrollTop:0},u=At(1),c=At(0),d=Gt(o);if((d||!n)&&((Na(o)!=="body"||Cr(s))&&(i=Lr(o)),d)){let g=_a(o);u=So(o),c.x=g.x+o.clientLeft,c.y=g.y+o.clientTop}let f=s&&!d&&!n?Ic(s,i):At(0);return{width:a.width*u.x,height:a.height*u.y,x:a.x*u.x-i.scrollLeft*u.x+c.x+f.x,y:a.y*u.y-i.scrollTop*u.y+c.y+f.y}}function $x(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Yx(e){let t=Lr(e),a=e.ownerDocument.body,o=wt(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),r=wt(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight),n=-t.scrollLeft+Rn(e),s=-t.scrollTop;return Lt(a).direction==="rtl"&&(n+=wt(e.clientWidth,a.clientWidth)-o),{width:o,height:r,x:n,y:s}}var Zx=25;function Jx(e,t,a){a===void 0&&(a="viewport");let o=a==="layoutViewport",r=$e(e),n=Et(e),s=r.visualViewport,l=n.clientWidth,i=n.clientHeight,u=0,c=0;if(s){let f=!yn()||t==="fixed";o?f||(u=-s.offsetLeft,c=-s.offsetTop):(l=s.width,i=s.height,f&&(u=s.offsetLeft,c=s.offsetTop))}if(Rn(n)<=0){let f=n.ownerDocument,g=f.body,h=getComputedStyle(g),p=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(n.clientWidth-g.clientWidth-p),x=getComputedStyle(n).scrollbarGutter==="stable both-edges"?m/2:m;x<=Zx&&(l-=x)}return{width:l,height:i,x:u,y:c}}function Qx(e,t){let a=_a(e,!0,t==="fixed"),o=a.top+e.clientTop,r=a.left+e.clientLeft,n=So(e),s=e.clientWidth*n.x,l=e.clientHeight*n.y,i=r*n.x,u=o*n.y;return{width:s,height:l,x:i,y:u}}function wc(e,t,a){let o;if(t==="viewport"||t==="layoutViewport")o=Jx(e,a,t);else if(t==="document")o=Yx(Et(e));else if(bt(t))o=Qx(t,a);else{let r=Lc(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Oa(o)}function ev(e,t){let a=t.get(e);if(a)return a;let o=Ba(e,[],!1).filter(l=>bt(l)&&Na(l)!=="body"),r=null,n=Lt(e).position==="fixed",s=n?sa(e):e;for(;bt(s)&&!yo(s);){let l=Lt(s),i=In(s),u=r?r.position:n?"fixed":"";!i&&(u==="fixed"||u==="absolute"&&l.position==="static")?o=o.filter(d=>d!==s):r=l,s=sa(s)}return t.set(e,o),o}function tv(e){let{element:t,boundary:a,rootBoundary:o,strategy:r}=e,s=[...a==="clippingAncestors"?br(t)?[]:ev(t,this._c):[].concat(a),o],l=wc(t,s[0],r),i=l.top,u=l.right,c=l.bottom,d=l.left;for(let f=1;f<s.length;f++){let g=wc(t,s[f],r);i=wt(g.top,i),u=Mt(g.right,u),c=Mt(g.bottom,c),d=wt(g.left,d)}return{width:u-d,height:c-i,x:d,y:i}}function av(e){let{width:t,height:a}=bc(e);return{width:t,height:a}}function ov(e,t,a){let o=Gt(t),r=Et(t),n=a==="fixed",s=_a(e,!0,n,t),l={scrollLeft:0,scrollTop:0},i=At(0);if((o||!n)&&((Na(t)!=="body"||Cr(r))&&(l=Lr(t)),o)){let f=_a(t,!0,n,t);i.x=f.x+t.clientLeft,i.y=f.y+t.clientTop}!o&&r&&(i.x=Rn(r));let u=r&&!o&&!n?Ic(r,l):At(0),c=s.left+l.scrollLeft-i.x-u.x,d=s.top+l.scrollTop-i.y-u.y;return{x:c,y:d,width:s.width,height:s.height}}function fl(e){return Lt(e).position==="static"}function Cc(e,t){if(!Gt(e)||Lt(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return Et(e)===a&&(a=a.ownerDocument.body),a}function yc(e,t){let a=$e(e);if(br(e))return a;if(!Gt(e)){let r=sa(e);for(;r&&!yo(r);){if(bt(r)&&!fl(r))return r;r=sa(r)}return a}let o=Cc(e,t);for(;o&&hc(o)&&fl(o);)o=Cc(o,t);return o&&yo(o)&&fl(o)&&!In(o)?a:o||xc(e)||a}var rv=async function(e){let t=this.getOffsetParent||yc,a=this.getDimensions,o=await a(e.floating);return{reference:ov(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function nv(e){return Lt(e).direction==="rtl"}var Sc={convertOffsetParentRelativeRectToViewportRelativeRect:Xx,getDocumentElement:Et,getClippingRect:tv,getOffsetParent:yc,getElementRects:rv,getClientRects:$x,getDimensions:av,getScale:So,isElement:bt,isRTL:nv};function Rc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sv(e,t,a){let o=null,r,n=Et(e);function s(){var c;clearTimeout(r),(c=o)==null||c.disconnect(),o=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();let f=e.getBoundingClientRect(),{left:g,top:h,width:p,height:m}=f;if(c||t(),!p||!m)return;let x=wr(h),w=wr(n.clientWidth-(g+p)),v=wr(n.clientHeight-(h+m)),C=wr(g),L={rootMargin:-x+"px "+-w+"px "+-v+"px "+-C+"px",threshold:wt(0,Mt(1,d))||1},y=!0;function S(P){let E=P[0].intersectionRatio;if(!Rc(f,e.getBoundingClientRect()))return l();if(E!==d){if(!y)return l();E?l(!1,E):r=setTimeout(()=>{l(!1,1e-7)},1e3)}y=!1}try{o=new IntersectionObserver(S,{...L,root:n.ownerDocument})}catch{o=new IntersectionObserver(S,L)}o.observe(e)}let i=$e(e),u=()=>l(a);return i.addEventListener("resize",u),l(!0),()=>{i.removeEventListener("resize",u),s()}}function ml(e,t,a,o){o===void 0&&(o={});let{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:i=!1}=o,u=pl(e),c=r||n?[...u?Ba(u):[],...t?Ba(t):[]]:[];c.forEach(x=>{r&&x.addEventListener("scroll",a),n&&x.addEventListener("resize",a)});let d=u&&l?sv(u,a,n):null,f=-1,g=null;s&&(g=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=g)==null||v.observe(t)})),a()}),u&&!i&&g.observe(u),t&&g.observe(t));let h,p=i?_a(e):null;i&&m();function m(){let x=_a(e);p&&!Rc(p,x)&&a(),p=x,h=requestAnimationFrame(m)}return a(),()=>{var x;c.forEach(w=>{r&&w.removeEventListener("scroll",a),n&&w.removeEventListener("resize",a)}),d?.(),(x=g)==null||x.disconnect(),g=null,i&&cancelAnimationFrame(h)}}var Pc=dc;var Dc=cc,kc=lc,Mc=pc,Ac=ic,gl=sc;var Tc=fc,hl=(e,t,a)=>{let o=new Map,r=a??{},n={...Sc,...r.platform,_c:o};return nc(e,t,{...r,platform:n})};var Re=q(require("react"),1),Oc=require("react"),Fc=q(require("react-dom"),1),lv=typeof document<"u",iv=function(){},Pn=lv?Oc.useLayoutEffect:iv;function Dn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let a,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!Dn(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),a=r.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=a;o--!==0;){let n=r[o];if(!(n==="_owner"&&e.$$typeof)&&!Dn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ec(e,t){let a=Bc(e);return Math.round(t*a)/a}function xl(e){let t=Re.useRef(e);return Pn(()=>{t.current=e}),t}function Nc(e){e===void 0&&(e={});let{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:r,elements:{reference:n,floating:s}={},transform:l=!0,whileElementsMounted:i,open:u}=e,[c,d]=Re.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=Re.useState(o);Dn(f,o)||g(o);let[h,p]=Re.useState(null),[m,x]=Re.useState(null),w=Re.useCallback(B=>{B!==L.current&&(L.current=B,p(B))},[]),v=Re.useCallback(B=>{B!==y.current&&(y.current=B,x(B))},[]),C=n||h,b=s||m,L=Re.useRef(null),y=Re.useRef(null),S=Re.useRef(c),P=i!=null,E=xl(i),M=xl(r),D=xl(u),F=Re.useCallback(()=>{if(!L.current||!y.current)return;let B={placement:t,strategy:a,middleware:f};M.current&&(B.platform=M.current),hl(L.current,y.current,B).then(H=>{let T={...H,isPositioned:D.current!==!1};U.current&&!Dn(S.current,T)&&(S.current=T,Fc.flushSync(()=>{d(T)}))})},[f,t,a,M,D]);Pn(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let U=Re.useRef(!1);Pn(()=>(U.current=!0,()=>{U.current=!1}),[]),Pn(()=>{if(C&&(L.current=C),b&&(y.current=b),C&&b){if(E.current)return E.current(C,b,F);F()}},[C,b,F,E,P]);let Z=Re.useMemo(()=>({reference:L,floating:y,setReference:w,setFloating:v}),[w,v]),W=Re.useMemo(()=>({reference:C,floating:b}),[C,b]),O=Re.useMemo(()=>{let B={position:a,left:0,top:0};if(!W.floating)return B;let H=Ec(W.floating,c.x),T=Ec(W.floating,c.y);return l?{...B,transform:"translate("+H+"px, "+T+"px)",...Bc(W.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:H,top:T}},[a,l,W.floating,c.x,c.y]);return Re.useMemo(()=>({...c,update:F,refs:Z,elements:W,floatingStyles:O}),[c,F,Z,W,O])}var uv=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){let{element:o,padding:r}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?gl({element:o.current,padding:r}).fn(a):{}:o?gl({element:o,padding:r}).fn(a):{}}}},_c=(e,t)=>{let a=Pc(e);return{name:a.name,fn:a.fn,options:[e,t]}},Uc=(e,t)=>{let a=Dc(e);return{name:a.name,fn:a.fn,options:[e,t]}},Hc=(e,t)=>({fn:Tc(e).fn,options:[e,t]}),qc=(e,t)=>{let a=kc(e);return{name:a.name,fn:a.fn,options:[e,t]}},zc=(e,t)=>{let a=Mc(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Vc=(e,t)=>{let a=Ac(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Gc=(e,t)=>{let a=uv(e);return{name:a.name,fn:a.fn,options:[e,t]}};var Wc=q(require("react"),1);var dv=Object.defineProperty,cv=(e,t)=>dv(e,"name",{value:t,configurable:!0});function vl(e){let[t,a]=Wc.useState(void 0);return ue(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let n=r[0],s,l;if("borderBoxSize"in n){let i=n.borderBoxSize,u=Array.isArray(i)?i[0]:i;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;a({width:s,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else a(void 0)},[e]),t}cv(vl,"useSize");var Ro=require("react/jsx-runtime"),fv=Object.defineProperty,la=(e,t)=>fv(e,"name",{value:t,configurable:!0});var jc="Popper",[Kc,Po]=_e(jc),[pv,Xc]=Kc(jc),mv=la(e=>{let{__scopePopper:t,children:a}=e,[o,r]=We.useState(null),[n,s]=We.useState(void 0);return(0,Ro.jsx)(pv,{scope:t,anchor:o,onAnchorChange:r,placementState:n,setPlacementState:s,children:a})},"Popper"),gv="PopperAnchor",hv=We.forwardRef(la(function(t,a){let{__scopePopper:o,virtualRef:r,...n}=t,s=Xc(gv,o),l=We.useRef(null),i=s.onAnchorChange,u=We.useCallback(p=>{l.current=p,p&&i(p)},[i]),c=ae(a,u),d=We.useRef(null);We.useEffect(()=>{if(!r)return;let p=d.current;d.current=r.current,p!==d.current&&i(d.current)});let f=s.placementState&&kn(s.placementState),g=f?.[0],h=f?.[1];return r?null:(0,Ro.jsx)(re.div,{"data-radix-popper-side":g,"data-radix-popper-align":h,...n,ref:c})},"PopperAnchor")),$c="PopperContent",[xv,yy]=Kc($c),vv=We.forwardRef(la(function(t,a){let{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:s="center",alignOffset:l=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=t,x=Xc($c,o),[w,v]=We.useState(null),C=ae(a,v),[b,L]=We.useState(null),y=vl(b),S=y?.width??0,P=y?.height??0,E=r+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(c)?c:[c],F=D.length>0,U={padding:M,boundary:D.filter(Yc),altBoundary:F},{refs:Z,floatingStyles:W,placement:O,isPositioned:B,middlewareData:H}=Nc({strategy:"fixed",placement:E,whileElementsMounted:la((...X)=>ml(...X,{animationFrame:h==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[_c({mainAxis:n+P,alignmentAxis:l}),u&&Uc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Hc():void 0,...U}),u&&qc({...U}),zc({...U,apply:la(({elements:X,rects:_,availableWidth:$,availableHeight:Y})=>{let{width:oe,height:we}=_.reference,Pe=X.floating.style;Pe.setProperty("--radix-popper-available-width",`${$}px`),Pe.setProperty("--radix-popper-available-height",`${Y}px`),Pe.setProperty("--radix-popper-anchor-width",`${oe}px`),Pe.setProperty("--radix-popper-anchor-height",`${we}px`)},"apply")}),b&&Gc({element:b,padding:i}),wv({arrowWidth:S,arrowHeight:P}),g&&Vc({strategy:"referenceHidden",...U,boundary:F?U.boundary:void 0})]}),T=x.setPlacementState;ue(()=>(T(O),()=>{T(void 0)}),[O,T]);let[le,Q]=kn(O),ie=Te(p);ue(()=>{B&&ie?.()},[B,ie]);let ve=H.arrow?.x,R=H.arrow?.y,N=H.arrow?.centerOffset!==0,[G,k]=We.useState();return ue(()=>{w&&k(window.getComputedStyle(w).zIndex)},[w]),(0,Ro.jsx)("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:B?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,Ro.jsx)(xv,{scope:o,placedSide:le,placedAlign:Q,onArrowChange:L,arrowX:ve,arrowY:R,shouldHideArrow:N,children:(0,Ro.jsx)(re.div,{"data-side":le,"data-align":Q,...m,ref:C,style:{...m.style,animation:B?m.style?.animation:"none"}})})})},"PopperContent"));function Yc(e){return e!==null}la(Yc,"isNotNull");var wv=la(e=>({name:"transformOrigin",options:e,fn(t){let{placement:a,rects:o,middlewareData:r}=t,s=r.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,i=s?0:e.arrowHeight,[u,c]=kn(a),d={start:"0%",center:"50%",end:"100%"}[c],f=(r.arrow?.x??0)+l/2,g=(r.arrow?.y??0)+i/2,h="",p="";return u==="bottom"?(h=s?d:`${f}px`,p=`${-i}px`):u==="top"?(h=s?d:`${f}px`,p=`${o.floating.height+i}px`):u==="right"?(h=`${-i}px`,p=s?d:`${g}px`):u==="left"&&(h=`${o.floating.width+i}px`,p=s?d:`${g}px`),{data:{x:h,y:p}}}}),"transformOrigin");function kn(e){let[t,a="center"]=e.split("-");return[t,a]}la(kn,"getSideAndAlignFromPlacement");var Mn=mv,An=hv,Tn=vv;var Fe=q(require("react"),1);var bv=q(require("react"),1),En=q(require("react"),1),Cv=Object.defineProperty,Cl=(e,t)=>Cv(e,"name",{value:t,configurable:!0}),wl=!1;function Jc(){let[e,t]=En.useState(wl);return En.useEffect(()=>{wl||(wl=!0,t(!0))},[]),e}Cl(Jc,"useIsHydrated");var Qc=bv[" useSyncExternalStore ".trim().toString()];function ef(){return()=>{}}Cl(ef,"subscribe");function tf(){return Qc(ef,()=>!0,()=>!1)}Cl(tf,"useIsHydratedModern");var af=typeof Qc=="function"?tf:Jc;var ia=require("react/jsx-runtime"),Lv=Object.defineProperty,Ua=(e,t)=>Lv(e,"name",{value:t,configurable:!0}),bl="rovingFocusGroup.onEntryFocus",Iv={bubbles:!1,cancelable:!0},On="RovingFocusGroup",[Ll,of,yv]=Aa(On),[Sv,Il]=_e(On,[yv]),[Rv,Pv]=Sv(On),Dv=Fe.forwardRef(Ua(function(t,a){return(0,ia.jsx)(Ll.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,ia.jsx)(Ll.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,ia.jsx)(kv,{...t,ref:a})})})},"RovingFocusGroup")),kv=Fe.forwardRef(Ua(function(t,a){let{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,g=Fe.useRef(null),h=ae(a,g),p=Ta(s),[m,x]=Dt({prop:l,defaultProp:i??null,onChange:u,caller:On}),[w,v]=Fe.useState(!1),C=Te(c),b=of(o),L=Fe.useRef(!1),[y,S]=Fe.useState(0);return Fe.useEffect(()=>{let P=g.current;if(P)return P.addEventListener(bl,C),()=>P.removeEventListener(bl,C)},[C]),(0,ia.jsx)(Rv,{scope:o,orientation:r,dir:p,loop:n,currentTabStopId:m,onItemFocus:Fe.useCallback(P=>x(P),[x]),onItemShiftTab:Fe.useCallback(()=>v(!0),[]),onFocusableItemAdd:Fe.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:Fe.useCallback(()=>S(P=>P-1),[]),children:(0,ia.jsx)(re.div,{tabIndex:w||y===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:z(t.onMouseDown,()=>{L.current=!0}),onFocus:z(t.onFocus,P=>{let E=!L.current;if(P.target===P.currentTarget&&E&&!w){let M=new CustomEvent(bl,Iv);if(P.currentTarget.dispatchEvent(M),!M.defaultPrevented){let D=b().filter(O=>O.focusable),F=D.find(O=>O.active),U=D.find(O=>O.id===m),W=[F,U,...D].filter(Boolean).map(O=>O.ref.current);yl(W,d)}}L.current=!1}),onBlur:z(t.onBlur,()=>v(!1))})})},"RovingFocusGroupImpl")),Mv="RovingFocusGroupItem",Av=Fe.forwardRef(Ua(function(t,a){let{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:s,children:l,...i}=t,u=ot(),c=s||u,d=Pv(Mv,o),f=d.currentTabStopId===c,g=of(o),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:m}=d,x=af();return ue(()=>{if(!(!x||!r))return h(),()=>p()},[x,r,h,p]),Fe.useEffect(()=>{if(!(x||!r))return h(),()=>p()},[x,r,h,p]),(0,ia.jsx)(Ll.ItemSlot,{scope:o,id:c,focusable:r,active:n,children:(0,ia.jsx)(re.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:a,onMouseDown:z(t.onMouseDown,w=>{r?d.onItemFocus(c):w.preventDefault()}),onFocus:z(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:z(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;let v=nf(w,d.orientation,d.dir);if(v!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=g().filter(L=>L.focusable).map(L=>L.ref.current);if(v==="last")b.reverse();else if(v==="prev"||v==="next"){v==="prev"&&b.reverse();let L=b.indexOf(w.currentTarget);b=d.loop?sf(b,L+1):b.slice(L+1)}setTimeout(()=>yl(b))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:m!=null}):l})})},"RovingFocusGroupItem")),Tv={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ua(rf,"getDirectionAwareKey");function nf(e,t,a){let o=rf(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Tv[o]}Ua(nf,"getFocusIntent");function yl(e,t=!1){let a=document.activeElement;for(let o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}Ua(yl,"focusFirst");function sf(e,t){return e.map((a,o)=>e[(t+o)%e.length])}Ua(sf,"wrapArray");var lf=Dv,uf=Av;var fe=require("react/jsx-runtime"),Fv=Object.defineProperty,pe=(e,t)=>Fv(e,"name",{value:t,configurable:!0}),Sl=["Enter"," "],Bv=["ArrowDown","PageUp","Home"],cf=["ArrowUp","PageDown","End"],Nv=[...Bv,...cf],eS={ltr:[...Sl,"ArrowRight"],rtl:[...Sl,"ArrowLeft"]};var Bn="Menu",[Rl,_v,Uv]=Aa(Bn),[Ha,Dl]=_e(Bn,[Uv,Po,Il]),kl=Po(),ff=Il(),[Hv,Ir]=Ha(Bn),[qv,Ml]=Ha(Bn),zv=pe(e=>{let{__scopeMenu:t,open:a=!1,children:o,dir:r,onOpenChange:n,modal:s=!0}=e,l=kl(t),[i,u]=J.useState(null),c=J.useRef(!1),d=Te(n),f=Ta(r);return J.useEffect(()=>{let g=pe(()=>{c.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},"handleKeyDown"),h=pe(()=>c.current=!1,"handlePointer");return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),J.useEffect(()=>{if(!a)return;let g=pe(()=>d(!1),"handleBlur");return window.addEventListener("blur",g),()=>window.removeEventListener("blur",g)},[a,d]),(0,fe.jsx)(Mn,{...l,children:(0,fe.jsx)(Hv,{scope:t,open:a,onOpenChange:d,content:i,onContentChange:u,children:(0,fe.jsx)(qv,{scope:t,onClose:J.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:s,children:o})})})},"Menu"),Vv=J.forwardRef(pe(function(t,a){let{__scopeMenu:o,...r}=t,n=kl(o);return(0,fe.jsx)(An,{...n,...r,ref:a})},"MenuAnchor")),pf="MenuPortal",[Gv,Wv]=Ha(pf,{forceMount:void 0}),jv=pe(e=>{let{__scopeMenu:t,forceMount:a,children:o,container:r}=e,n=Ir(pf,t);return(0,fe.jsx)(Gv,{scope:t,forceMount:a,children:(0,fe.jsx)(zt,{present:a||n.open,children:(0,fe.jsx)(mo,{asChild:!0,container:r,children:o})})})},"MenuPortal"),ua="MenuContent",[Kv,mf]=Ha(ua),Xv=J.forwardRef(pe(function(t,a){let o=Wv(ua,t.__scopeMenu),{forceMount:r=o.forceMount,...n}=t,s=Ir(ua,t.__scopeMenu),l=Ml(ua,t.__scopeMenu);return(0,fe.jsx)(Rl.Provider,{scope:t.__scopeMenu,children:(0,fe.jsx)(zt,{present:r||s.open,children:(0,fe.jsx)(Rl.Slot,{scope:t.__scopeMenu,children:l.modal?(0,fe.jsx)($v,{...n,ref:a}):(0,fe.jsx)(Yv,{...n,ref:a})})})})},"MenuContent")),$v=J.forwardRef(pe(function(t,a){let o=Ir(ua,t.__scopeMenu),r=J.useRef(null),n=ae(a,r);return J.useEffect(()=>{let s=r.current;if(s)return bo(s)},[]),(0,fe.jsx)(gf,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:z(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentModal")),Yv=J.forwardRef(pe(function(t,a){let o=Ir(ua,t.__scopeMenu);return(0,fe.jsx)(gf,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentNonModal")),Zv=Ve("MenuContent.ScrollLock"),gf=J.forwardRef(pe(function(t,a){let{__scopeMenu:o,loop:r=!1,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:g,onDismiss:h,disableOutsideScroll:p,...m}=t,x=Ir(ua,o),w=Ml(ua,o),v=kl(o),C=ff(o),b=_v(o),[L,y]=J.useState(null),S=J.useRef(null),P=ae(a,S,x.onContentChange),E=J.useRef(0),M=J.useRef(""),D=J.useRef(0),F=J.useRef(null),U=J.useRef("right"),Z=J.useRef(0),W=p?Sa:J.Fragment,O=p?{as:Zv,allowPinchZoom:!0}:void 0,B=pe(T=>{let le=M.current+T,Q=b().filter(k=>!k.disabled),ie=document.activeElement,ve=Q.find(k=>k.ref.current===ie)?.textValue,R=Q.map(k=>k.textValue),N=Cf(R,le,ve),G=Q.find(k=>k.textValue===N)?.ref.current;pe((function k(X){M.current=X,window.clearTimeout(E.current),X!==""&&(E.current=window.setTimeout(()=>k(""),1e3))}),"updateSearch")(le),G&&setTimeout(()=>G.focus())},"handleTypeaheadSearch");J.useEffect(()=>()=>window.clearTimeout(E.current),[]),na();let H=J.useCallback(T=>U.current===F.current?.side&&Lf(T,F.current?.area),[]);return(0,fe.jsx)(Kv,{scope:o,searchRef:M,onItemEnter:J.useCallback(T=>{H(T)&&T.preventDefault()},[H]),onItemLeave:J.useCallback(T=>{H(T)||(S.current?.focus(),y(null))},[H]),onTriggerLeave:J.useCallback(T=>{H(T)&&T.preventDefault()},[H]),pointerGraceTimerRef:D,onPointerGraceIntentChange:J.useCallback(T=>{F.current=T},[]),children:(0,fe.jsx)(W,{...O,children:(0,fe.jsx)(po,{asChild:!0,trapped:n,onMountAutoFocus:z(s,T=>{T.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:(0,fe.jsx)(fo,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:g,onDismiss:h,children:(0,fe.jsx)(lf,{asChild:!0,...C,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:L,onCurrentTabStopIdChange:y,onEntryFocus:z(u,T=>{w.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,fe.jsx)(Tn,{role:"menu","aria-orientation":"vertical","data-state":hf(x.open),"data-radix-menu-content":"",dir:w.dir,...v,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:z(m.onKeyDown,T=>{let Q=T.target.closest("[data-radix-menu-content]")===T.currentTarget,ie=T.ctrlKey||T.altKey||T.metaKey,ve=T.key.length===1;Q&&(T.key==="Tab"&&T.preventDefault(),!ie&&ve&&B(T.key));let R=S.current;if(T.target!==R||!Nv.includes(T.key))return;T.preventDefault();let G=b().filter(k=>!k.disabled).map(k=>k.ref.current);cf.includes(T.key)&&G.reverse(),vf(G)}),onBlur:z(t.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(E.current),M.current="")}),onPointerMove:z(t.onPointerMove,Fn(T=>{let le=T.target,Q=Z.current!==T.clientX;if(T.currentTarget.contains(le)&&Q){let ie=T.clientX>Z.current?"right":"left";U.current=ie,Z.current=T.clientX}}))})})})})})})},"MenuContentImpl"));var Jv=J.forwardRef(pe(function(t,a){let{__scopeMenu:o,...r}=t;return(0,fe.jsx)(re.div,{...r,ref:a})},"MenuLabel")),Pl="MenuItem",df="menu.itemSelect",Qv=J.forwardRef(pe(function(t,a){let{disabled:o=!1,onSelect:r,...n}=t,s=J.useRef(null),l=Ml(Pl,t.__scopeMenu),i=mf(Pl,t.__scopeMenu),u=ae(a,s),c=J.useRef(!1),d=pe(()=>{let f=s.current;if(!o&&f){let g=new CustomEvent(df,{bubbles:!0,cancelable:!0});f.addEventListener(df,h=>r?.(h),{once:!0}),ur(f,g),g.defaultPrevented?c.current=!1:l.onClose()}},"handleSelect");return(0,fe.jsx)(ew,{...n,ref:u,disabled:o,onClick:z(t.onClick,d),onPointerDown:f=>{t.onPointerDown?.(f),c.current=!0},onPointerUp:z(t.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:z(t.onKeyDown,f=>{o||f.target!==f.currentTarget||i.searchRef.current!==""&&f.key===" "||Sl.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})},"MenuItem")),ew=J.forwardRef(pe(function(t,a){let{__scopeMenu:o,disabled:r=!1,textValue:n,...s}=t,l=mf(Pl,o),i=ff(o),u=J.useRef(null),c=ae(a,u),[d,f]=J.useState(!1),[g,h]=J.useState("");return J.useEffect(()=>{let p=u.current;p&&h((p.textContent??"").trim())},[s.children]),(0,fe.jsx)(Rl.ItemSlot,{scope:o,disabled:r,textValue:n??g,children:(0,fe.jsx)(uf,{asChild:!0,...i,focusable:!r,children:(0,fe.jsx)(re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:z(t.onPointerMove,Fn(p=>{r?l.onItemLeave(p):(l.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(t.onPointerLeave,Fn(p=>l.onItemLeave(p))),onFocus:z(t.onFocus,()=>f(!0)),onBlur:z(t.onBlur,()=>f(!1))})})})},"MenuItemImpl"));var tw="MenuRadioGroup",[tS,aS]=Ha(tw,{value:void 0,onValueChange:pe(()=>{},"onValueChange")});var aw="MenuItemIndicator",[oS,rS]=Ha(aw,{checked:!1});var ow=J.forwardRef(pe(function(t,a){let{__scopeMenu:o,...r}=t;return(0,fe.jsx)(re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:a})},"MenuSeparator"));var rw="MenuSub",[nS,sS]=Ha(rw);function hf(e){return e?"open":"closed"}pe(hf,"getOpenState");function xf(e){return e==="indeterminate"}pe(xf,"isIndeterminate");function nw(e){return xf(e)?"indeterminate":e?"checked":"unchecked"}pe(nw,"getCheckedState");function vf(e){let t=document.activeElement;for(let a of e)if(a===t||(a.focus(),document.activeElement!==t))return}pe(vf,"focusFirst");function wf(e,t){return e.map((a,o)=>e[(t+o)%e.length])}pe(wf,"wrapArray");function Cf(e,t,a){let r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=a?e.indexOf(a):-1,s=wf(e,Math.max(n,0));r.length===1&&(s=s.filter(u=>u!==a));let i=s.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return i!==a?i:void 0}pe(Cf,"getNextMatch");function bf(e,t){let{x:a,y:o}=e,r=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let l=t[n],i=t[s],u=l.x,c=l.y,d=i.x,f=i.y;c>o!=f>o&&a<(d-u)*(o-c)/(f-c)+u&&(r=!r)}return r}pe(bf,"isPointInPolygon");function Lf(e,t){if(!t)return!1;let a={x:e.clientX,y:e.clientY};return bf(a,t)}pe(Lf,"isPointerInGraceArea");function Fn(e){return t=>t.pointerType==="mouse"?e(t):void 0}pe(Fn,"whenMouse");var If=zv,yf=Vv,Sf=jv,Rf=Xv;var Pf=Jv,Df=Qv;var kf=ow;var Ot=require("react/jsx-runtime"),lw=Object.defineProperty,qa=(e,t)=>lw(e,"name",{value:t,configurable:!0}),Al="DropdownMenu",[iw,IS]=_e(Al,[Dl]),za=Dl(),[uw,Mf]=iw(Al),dw=qa(e=>{let{__scopeDropdownMenu:t,children:a,dir:o,open:r,defaultOpen:n,onOpenChange:s,modal:l=!0}=e,i=za(t),u=It.useRef(null),[c,d]=Dt({prop:r,defaultProp:n??!1,onChange:s,caller:Al});return(0,Ot.jsx)(uw,{scope:t,triggerId:ot(),triggerRef:u,contentId:ot(),open:c,onOpenChange:d,onOpenToggle:It.useCallback(()=>d(f=>!f),[d]),modal:l,children:(0,Ot.jsx)(If,{...i,open:c,onOpenChange:d,dir:o,modal:l,children:a})})},"DropdownMenu"),cw="DropdownMenuTrigger",fw=It.forwardRef(qa(function(t,a){let{__scopeDropdownMenu:o,disabled:r=!1,...n}=t,s=Mf(cw,o),l=za(o),i=ae(a,s.triggerRef);return(0,Ot.jsx)(yf,{asChild:!0,...l,children:(0,Ot.jsx)(re.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...n,ref:i,onPointerDown:z(t.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(s.onOpenToggle(),s.open||u.preventDefault())}),onKeyDown:z(t.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&s.onOpenToggle(),u.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),pw=qa(e=>{let{__scopeDropdownMenu:t,...a}=e,o=za(t);return(0,Ot.jsx)(Sf,{...o,...a})},"DropdownMenuPortal"),mw="DropdownMenuContent",gw=It.forwardRef(qa(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=Mf(mw,o),s=za(o),l=It.useRef(!1);return(0,Ot.jsx)(Rf,{id:n.contentId,"aria-labelledby":n.triggerId,...s,...r,ref:a,onCloseAutoFocus:z(t.onCloseAutoFocus,i=>{l.current||n.triggerRef.current?.focus(),l.current=!1,i.preventDefault()}),onInteractOutside:z(t.onInteractOutside,i=>{let u=i.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,d=u.button===2||c;(!n.modal||d)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent"));var hw=It.forwardRef(qa(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=za(o);return(0,Ot.jsx)(Pf,{...n,...r,ref:a})},"DropdownMenuLabel")),xw=It.forwardRef(qa(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=za(o);return(0,Ot.jsx)(Df,{...n,...r,ref:a})},"DropdownMenuItem"));var vw=It.forwardRef(qa(function(t,a){let{__scopeDropdownMenu:o,...r}=t,n=za(o);return(0,Ot.jsx)(kf,{...n,...r,ref:a})},"DropdownMenuSeparator"));var Af=dw,Tf=fw,Ef=pw,Tl=gw;var El=hw,Ol=xw;var Fl=vw;var Do=require("react/jsx-runtime"),Sr=Af,Rr=Tf;var ko=yr.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Do.jsx)(Ef,{children:(0,Do.jsx)(Tl,{ref:o,sideOffset:t,className:ee("z-50 min-w-[8rem] overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...a})}));ko.displayName=Tl.displayName;var Wt=yr.forwardRef(({className:e,inset:t,...a},o)=>(0,Do.jsx)(Ol,{ref:o,className:ee("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a}));Wt.displayName=Ol.displayName;var Cw=yr.forwardRef(({className:e,inset:t,...a},o)=>(0,Do.jsx)(El,{ref:o,className:ee("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Cw.displayName=El.displayName;var bw=yr.forwardRef(({className:e,...t},a)=>(0,Do.jsx)(Fl,{ref:a,className:ee("-mx-1 my-1 h-px bg-muted",e),...t}));bw.displayName=Fl.displayName;var Of=q(require("react"),1);var Ff=require("react/jsx-runtime"),jt=Of.forwardRef(({className:e,type:t,...a},o)=>(0,Ff.jsx)("input",{type:t,className:ee("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));jt.displayName="Input";var _f=q(require("react"),1);var Bf=q(require("react"),1);var Nf=require("react/jsx-runtime"),Lw=Object.defineProperty,Iw=(e,t)=>Lw(e,"name",{value:t,configurable:!0}),yw=Bf.forwardRef(Iw(function(t,a){return(0,Nf.jsx)(re.label,{...t,ref:a,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(t.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}})},"Label")),Bl=yw;var Uf=require("react/jsx-runtime"),Va=_f.forwardRef(({className:e,...t},a)=>(0,Uf.jsx)(Bl,{ref:a,className:ee("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));Va.displayName=Bl.displayName;var ca=q(require("react"),1);var A=q(require("react"),1),Ul=q(require("react-dom"),1);var Rw=Object.defineProperty,Pw=(e,t)=>Rw(e,"name",{value:t,configurable:!0});function Nn(e,[t,a]){return Math.min(a,Math.max(t,e))}Pw(Nn,"clamp");var _n=q(require("react"),1),Dw=Object.defineProperty,kw=(e,t)=>Dw(e,"name",{value:t,configurable:!0});function Nl(e){let t=_n.useRef({value:e,previous:e});return _n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}kw(Nl,"usePrevious");var Mw=q(require("react"),1);var Aw=require("react/jsx-runtime");var Hf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});var V=require("react/jsx-runtime"),Tw=Object.defineProperty,se=(e,t)=>Tw(e,"name",{value:t,configurable:!0}),Ew=[" ","Enter","ArrowUp","ArrowDown"],Ow=[" ","Enter"],Mo="Select",[Hn,qn,Fw]=Aa(Mo),[Wa,oR]=_e(Mo,[Fw,Po]),Hl=Po(),[Bw,da]=Wa(Mo),[Nw,_w]=Wa(Mo);function Wf(e){let{__scopeSelect:t,children:a,open:o,defaultOpen:r,onOpenChange:n,value:s,defaultValue:l,onValueChange:i,dir:u,name:c,autoComplete:d,disabled:f,required:g,form:h,internal_do_not_use_render:p}=e,m=Hl(t),[x,w]=A.useState(null),[v,C]=A.useState(null),[b,L]=A.useState(!1),y=Ta(u),[S,P]=Dt({prop:o,defaultProp:r??!1,onChange:n,caller:Mo}),[E,M]=Dt({prop:s,defaultProp:l,onChange:i,caller:Mo}),D=A.useRef(null),F=A.useRef(E);A.useEffect(()=>{let Q=h?x?.ownerDocument.getElementById(h):x?.form;if(Q instanceof HTMLFormElement){let ie=se(()=>M(F.current),"reset");return Q.addEventListener("reset",ie),()=>Q.removeEventListener("reset",ie)}},[h,x,M]);let U=x?!!h||!!x.closest("form"):!0,[Z,W]=A.useState(new Set),O=ot(),B=Array.from(Z).map(Q=>Q.props.value).join(";"),H=A.useCallback(Q=>{W(ie=>new Set(ie).add(Q))},[]),T=A.useCallback(Q=>{W(ie=>{let ve=new Set(ie);return ve.delete(Q),ve})},[]),le={required:g,trigger:x,onTriggerChange:w,valueNode:v,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:L,contentId:O,value:E,onValueChange:M,open:S,onOpenChange:P,dir:y,triggerPointerDownPosRef:D,disabled:f,name:c,autoComplete:d,form:h,nativeOptions:Z,nativeSelectKey:B,isFormControl:U};return(0,V.jsx)(Mn,{...m,children:(0,V.jsx)(Bw,{scope:t,...le,children:(0,V.jsx)(Hn.Provider,{scope:t,children:(0,V.jsx)(Nw,{scope:t,onNativeOptionAdd:H,onNativeOptionRemove:T,children:ap(p)?p(le):a})})})})}se(Wf,"SelectProvider");var jf=se(e=>{let{__scopeSelect:t,children:a,...o}=e;return(0,V.jsx)(Wf,{__scopeSelect:t,...o,internal_do_not_use_render:({isFormControl:r})=>(0,V.jsxs)(V.Fragment,{children:[a,r?(0,V.jsx)(tC,{__scopeSelect:t}):null]})})},"Select"),Uw="SelectTrigger",ql=A.forwardRef(se(function(t,a){let{__scopeSelect:o,disabled:r=!1,...n}=t,s=Hl(o),l=da(Uw,o),i=l.disabled||r,u=ae(a,l.onTriggerChange),c=qn(o),d=A.useRef("touch"),[f,g,h]=$l(m=>{let x=c().filter(C=>!C.disabled),w=x.find(C=>C.value===l.value),v=Yl(x,m,w);v!==void 0&&l.onValueChange(v.value)}),p=se(m=>{i||(l.onOpenChange(!0),h()),m&&(l.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},"handleOpen");return(0,V.jsx)(An,{asChild:!0,...s,children:(0,V.jsx)(re.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Pr(l.value)?"":void 0,...n,ref:u,onClick:z(n.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&p(m)}),onPointerDown:z(n.onPointerDown,m=>{d.current=m.pointerType;let x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(p(m),m.preventDefault())}),onKeyDown:z(n.onKeyDown,m=>{let x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(x&&m.key===" ")&&Ew.includes(m.key)&&(p(),m.preventDefault())})})})},"SelectTrigger")),Hw="SelectValue",Kf=A.forwardRef(se(function(t,a){let{__scopeSelect:o,className:r,style:n,children:s,placeholder:l="",...i}=t,u=da(Hw,o),{onValueNodeHasChildrenChange:c}=u,d=s!==void 0,f=ae(a,u.onValueNodeChange);ue(()=>{c(d)},[c,d]);let g=Pr(u.value);return(0,V.jsx)(re.span,{...i,asChild:g?!1:i.asChild,ref:f,style:{pointerEvents:"none"},children:(0,V.jsx)(A.Fragment,{children:g?l:s},g?"placeholder":"value")})},"SelectValue")),Xf=A.forwardRef(se(function(t,a){let{__scopeSelect:o,children:r,...n}=t;return(0,V.jsx)(re.span,{"aria-hidden":!0,...n,ref:a,children:r||"\u25BC"})},"SelectIcon")),qw="SelectPortal",[zw,Vw]=Wa(qw,{forceMount:void 0}),$f=se(e=>{let{__scopeSelect:t,forceMount:a,...o}=e;return(0,V.jsx)(zw,{scope:e.__scopeSelect,forceMount:a,children:(0,V.jsx)(mo,{asChild:!0,...o})})},"SelectPortal"),Ga="SelectContent",zl=A.forwardRef(se(function(t,a){let o=Vw(Ga,t.__scopeSelect),{forceMount:r=o.forceMount,...n}=t,s=da(Ga,t.__scopeSelect),[l,i]=A.useState();return ue(()=>{i(new DocumentFragment)},[]),(0,V.jsx)(zt,{present:r||s.open,children:({present:u})=>u?(0,V.jsx)(jw,{...n,ref:a}):(0,V.jsx)(Gw,{...n,fragment:l})})},"SelectContent")),Gw=A.forwardRef(se(function(t,a){let{__scopeSelect:o,children:r,fragment:n}=t;return n?Ul.createPortal((0,V.jsx)(Yf,{scope:o,children:(0,V.jsx)(Hn.Slot,{scope:o,children:(0,V.jsx)("div",{ref:a,children:r})})}),n):null},"SelectContentFragment")),yt=10,[Yf,ja]=Wa(Ga),Ww=Ve("SelectContent.RemoveScroll"),jw=A.forwardRef(se(function(t,a){let{__scopeSelect:o}=t,{position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:s,onPointerDownOutside:l,side:i,sideOffset:u,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:g,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:x,...w}=t,v=da(Ga,o),[C,b]=A.useState(null),[L,y]=A.useState(null),S=ae(a,b),[P,E]=A.useState(null),[M,D]=A.useState(null),F=qn(o),[U,Z]=A.useState(!1),W=A.useRef(!1);A.useEffect(()=>{if(C)return bo(C)},[C]),na();let O=A.useCallback(k=>{let[X,..._]=F().map(oe=>oe.ref.current),[$]=_.slice(-1),Y=document.activeElement;for(let oe of k)if(oe===Y||(oe?.scrollIntoView({block:"nearest"}),oe===X&&L&&(L.scrollTop=0),oe===$&&L&&(L.scrollTop=L.scrollHeight),oe?.focus(),document.activeElement!==Y))return},[F,L]),B=A.useCallback(()=>O([P,C]),[O,P,C]);A.useEffect(()=>{U&&B()},[U,B]);let{onOpenChange:H,triggerPointerDownPosRef:T}=v;A.useEffect(()=>{if(C){let k={x:0,y:0},X=se($=>{k={x:Math.abs(Math.round($.pageX)-(T.current?.x??0)),y:Math.abs(Math.round($.pageY)-(T.current?.y??0))}},"handlePointerMove"),_=se($=>{k.x<=10&&k.y<=10?$.preventDefault():$.composedPath().includes(C)||H(!1),document.removeEventListener("pointermove",X),T.current=null},"handlePointerUp");return T.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",_,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",_,{capture:!0})}}},[C,H,T]),A.useEffect(()=>{let k=se(()=>H(!1),"close");return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[H]);let[le,Q]=$l(k=>{let X=F().filter(Y=>!Y.disabled),_=X.find(Y=>Y.ref.current===document.activeElement),$=Yl(X,k,_);$&&setTimeout(()=>$.ref.current?.focus())}),ie=A.useCallback((k,X,_)=>{let $=!W.current&&!_;(v.value!==void 0&&v.value===X||$)&&(E(k),$&&(W.current=!0))},[v.value]),ve=A.useCallback(()=>C?.focus(),[C]),R=A.useCallback((k,X,_)=>{let $=!W.current&&!_;(v.value!==void 0&&v.value===X||$)&&D(k)},[v.value]),N=r==="popper"?qf:Kw,G=N===qf?{side:i,sideOffset:u,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:g,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:x}:{};return(0,V.jsx)(Yf,{scope:o,content:C,viewport:L,onViewportChange:y,itemRefCallback:ie,selectedItem:P,onItemLeave:ve,itemTextRefCallback:R,focusSelectedItem:B,selectedItemText:M,position:r,isPositioned:U,searchRef:le,children:(0,V.jsx)(Sa,{as:Ww,allowPinchZoom:!0,children:(0,V.jsx)(po,{asChild:!0,trapped:v.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:z(n,k=>{v.trigger?.focus({preventScroll:!0}),k.preventDefault()}),children:(0,V.jsx)(fo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,V.jsx)(N,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:k=>k.preventDefault(),...w,...G,onPlaced:()=>Z(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:z(w.onKeyDown,k=>{let X=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!X&&k.key.length===1&&Q(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let $=F().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(k.key)&&($=$.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){let Y=k.target,oe=$.indexOf(Y);$=$.slice(oe+1)}setTimeout(()=>O($)),k.preventDefault()}})})})})})})},"SelectContentImpl")),Kw=A.forwardRef(se(function(t,a){let{__scopeSelect:o,onPlaced:r,...n}=t,s=da(Ga,o),l=ja(Ga,o),[i,u]=A.useState(null),[c,d]=A.useState(null),f=ae(a,d),g=qn(o),h=A.useRef(!1),p=A.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:w,focusSelectedItem:v}=l,C=A.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&c&&m&&x&&w){let S=s.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),E=s.valueNode.getBoundingClientRect(),M=w.getBoundingClientRect();if(s.dir!=="rtl"){let Y=M.left-P.left,oe=E.left-Y,we=S.left-oe,Pe=S.width+we,St=Math.max(Pe,P.width),$a=window.innerWidth-yt,Ya=Nn(oe,[yt,Math.max(yt,$a-St)]);i.style.minWidth=Pe+"px",i.style.left=Ya+"px"}else{let Y=P.right-M.right,oe=window.innerWidth-E.right-Y,we=window.innerWidth-S.right-oe,Pe=S.width+we,St=Math.max(Pe,P.width),$a=window.innerWidth-yt,Ya=Nn(oe,[yt,Math.max(yt,$a-St)]);i.style.minWidth=Pe+"px",i.style.right=Ya+"px"}let D=g(),F=window.innerHeight-yt*2,U=m.scrollHeight,Z=window.getComputedStyle(c),W=parseInt(Z.borderTopWidth,10),O=parseInt(Z.paddingTop,10),B=parseInt(Z.borderBottomWidth,10),H=parseInt(Z.paddingBottom,10),T=W+O+U+H+B,le=Math.min(x.offsetHeight*5,T),Q=window.getComputedStyle(m),ie=parseInt(Q.paddingTop,10),ve=parseInt(Q.paddingBottom,10),R=S.top+S.height/2-yt,N=F-R,G=x.offsetHeight/2,k=x.offsetTop+G,X=W+O+k,_=T-X;if(X<=R){let Y=D.length>0&&x===D[D.length-1].ref.current;i.style.bottom="0px";let oe=c.clientHeight-m.offsetTop-m.offsetHeight,we=Math.max(N,G+(Y?ve:0)+oe+B),Pe=X+we;i.style.height=Pe+"px"}else{let Y=D.length>0&&x===D[0].ref.current;i.style.top="0px";let we=Math.max(R,W+m.offsetTop+(Y?ie:0)+G)+_;i.style.height=we+"px",m.scrollTop=X-R+m.offsetTop}i.style.margin=`${yt}px 0`,i.style.minHeight=le+"px",i.style.maxHeight=F+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,i,c,m,x,w,s.dir,r]);ue(()=>C(),[C]);let[b,L]=A.useState();ue(()=>{c&&L(window.getComputedStyle(c).zIndex)},[c]);let y=A.useCallback(S=>{S&&p.current===!0&&(C(),v?.(),p.current=!1)},[C,v]);return(0,V.jsx)(Xw,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:y,children:(0,V.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:(0,V.jsx)(re.div,{...n,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),qf=A.forwardRef(se(function(t,a){let{__scopeSelect:o,align:r="start",collisionPadding:n=yt,...s}=t,l=Hl(o);return(0,V.jsx)(Tn,{...l,...s,ref:a,align:r,collisionPadding:n,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Xw,Vl]=Wa(Ga,{}),zf="SelectViewport",Zf=A.forwardRef(se(function(t,a){let{__scopeSelect:o,nonce:r,...n}=t,s=ja(zf,o),l=Vl(zf,o),i=ae(a,s.onViewportChange),u=A.useRef(0);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,V.jsx)(Hn.Slot,{scope:o,children:(0,V.jsx)(re.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:z(n.onScroll,c=>{let d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=l;if(g?.current&&f){let h=Math.abs(u.current-d.scrollTop);if(h>0){let p=window.innerHeight-yt*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),w=Math.max(m,x);if(w<p){let v=w+h,C=Math.min(p,v),b=v-C;f.style.height=C+"px",f.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})},"SelectViewport")),$w="SelectGroup",[rR,Yw]=Wa($w);var Zw="SelectLabel",Gl=A.forwardRef(se(function(t,a){let{__scopeSelect:o,...r}=t,n=Yw(Zw,o);return(0,V.jsx)(re.div,{id:n.id,...r,ref:a})},"SelectLabel")),_l="SelectItem",[Jw,Jf]=Wa(_l),Wl=A.forwardRef(se(function(t,a){let{__scopeSelect:o,value:r,disabled:n=!1,textValue:s,...l}=t,i=da(_l,o),u=ja(_l,o),c=i.value===r,[d,f]=A.useState(s??""),[g,h]=A.useState(!1),p=Te(C=>u.itemRefCallback?.(C,r,n)),m=ae(a,p),x=ot(),w=A.useRef("touch"),v=se(()=>{n||(i.onValueChange(r),i.onOpenChange(!1))},"handleSelect");return(0,V.jsx)(Jw,{scope:o,value:r,disabled:n,textId:x,isSelected:c,onItemTextChange:A.useCallback(C=>{f(b=>b||(C?.textContent??"").trim())},[]),children:(0,V.jsx)(Hn.ItemSlot,{scope:o,value:r,disabled:n,textValue:d,children:(0,V.jsx)(re.div,{role:"option","aria-labelledby":x,"data-highlighted":g?"":void 0,"aria-selected":c&&g,"data-state":c?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...l,ref:m,onFocus:z(l.onFocus,()=>h(!0)),onBlur:z(l.onBlur,()=>h(!1)),onClick:z(l.onClick,()=>{w.current!=="mouse"&&v()}),onPointerUp:z(l.onPointerUp,()=>{w.current==="mouse"&&v()}),onPointerDown:z(l.onPointerDown,C=>{w.current=C.pointerType}),onPointerMove:z(l.onPointerMove,C=>{w.current=C.pointerType,n?u.onItemLeave?.():w.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(l.onPointerLeave,C=>{C.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:z(l.onKeyDown,C=>{n||C.target!==C.currentTarget||u.searchRef?.current!==""&&C.key===" "||(Ow.includes(C.key)&&v(),C.key===" "&&C.preventDefault())})})})})},"SelectItem")),Un="SelectItemText",Qf=A.forwardRef(se(function(t,a){let{__scopeSelect:o,className:r,style:n,...s}=t,l=da(Un,o),i=ja(Un,o),u=Jf(Un,o),c=_w(Un,o),[d,f]=A.useState(null),g=Te(v=>i.itemTextRefCallback?.(v,u.value,u.disabled)),h=ae(a,f,u.onItemTextChange,g),p=d?.textContent,m=A.useMemo(()=>(0,V.jsx)("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:x,onNativeOptionRemove:w}=c;return ue(()=>(x(m),()=>w(m)),[x,w,m]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(re.span,{id:u.textId,...s,ref:h}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!Pr(l.value)?Ul.createPortal(s.children,l.valueNode):null]})},"SelectItemText")),Qw="SelectItemIndicator",ep=A.forwardRef(se(function(t,a){let{__scopeSelect:o,...r}=t;return Jf(Qw,o).isSelected?(0,V.jsx)(re.span,{"aria-hidden":!0,...r,ref:a}):null},"SelectItemIndicator")),Vf="SelectScrollUpButton",jl=A.forwardRef(se(function(t,a){let o=ja(Vf,t.__scopeSelect),r=Vl(Vf,t.__scopeSelect),[n,s]=A.useState(!1),l=ae(a,r.onScrollButtonChange);return ue(()=>{if(o.viewport&&o.isPositioned){let u=function(){let d=c.scrollTop>0;s(d)};var i=u;se(u,"handleScroll");let c=o.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[o.viewport,o.isPositioned]),n?(0,V.jsx)(tp,{...t,ref:l,onAutoScroll:()=>{let{viewport:i,selectedItem:u}=o;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null},"SelectScrollUpButton")),Gf="SelectScrollDownButton",Kl=A.forwardRef(se(function(t,a){let o=ja(Gf,t.__scopeSelect),r=Vl(Gf,t.__scopeSelect),[n,s]=A.useState(!1),l=ae(a,r.onScrollButtonChange);return ue(()=>{if(o.viewport&&o.isPositioned){let u=function(){let d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;s(f)};var i=u;se(u,"handleScroll");let c=o.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[o.viewport,o.isPositioned]),n?(0,V.jsx)(tp,{...t,ref:l,onAutoScroll:()=>{let{viewport:i,selectedItem:u}=o;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null},"SelectScrollDownButton")),tp=A.forwardRef(se(function(t,a){let{__scopeSelect:o,onAutoScroll:r,...n}=t,s=ja("SelectScrollButton",o),l=A.useRef(null),i=qn(o),u=A.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return A.useEffect(()=>()=>u(),[u]),ue(()=>{i().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),(0,V.jsx)(re.div,{"aria-hidden":!0,...n,ref:a,style:{flexShrink:0,...n.style},onPointerDown:z(n.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:z(n.onPointerMove,()=>{s.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:z(n.onPointerLeave,()=>{u()})})},"SelectScrollButtonImpl")),Xl=A.forwardRef(se(function(t,a){let{__scopeSelect:o,...r}=t;return(0,V.jsx)(re.div,{"aria-hidden":!0,...r,ref:a})},"SelectSeparator"));var eC="SelectBubbleInput",tC=A.forwardRef(se(function({__scopeSelect:t,...a},o){let r=da(eC,t),{value:n,onValueChange:s,required:l,disabled:i,name:u,autoComplete:c,form:d}=r,{nativeOptions:f,nativeSelectKey:g}=r,h=A.useRef(null),p=ae(o,h),m=n??"",x=Nl(m),w=Array.from(f).some(v=>(v.props.value??"")==="");return A.useEffect(()=>{let v=h.current;if(!v)return;let C=window.HTMLSelectElement.prototype,L=Object.getOwnPropertyDescriptor(C,"value").set;if(x!==m&&L){let y=new Event("change",{bubbles:!0});L.call(v,m),v.dispatchEvent(y)}},[x,m]),(0,V.jsxs)(re.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:u,autoComplete:c,disabled:i,form:d,onChange:v=>s(v.target.value),...a,style:{...Hf,...a.style},ref:p,defaultValue:m,children:[Pr(n)&&!w?(0,V.jsx)("option",{value:""}):null,Array.from(f)]},g)},"SelectBubbleInput"));function ap(e){return typeof e=="function"}se(ap,"isFunction");function Pr(e){return e===""||e===void 0}se(Pr,"shouldShowPlaceholder");function $l(e){let t=Te(e),a=A.useRef(""),o=A.useRef(0),r=A.useCallback(s=>{let l=a.current+s;t(l),se((function i(u){a.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))}),"updateSearch")(l)},[t]),n=A.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,r,n]}se($l,"useTypeaheadSearch");function Yl(e,t,a){let r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=a?e.indexOf(a):-1,s=op(e,Math.max(n,0));r.length===1&&(s=s.filter(u=>u!==a));let i=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==a?i:void 0}se(Yl,"findNextItem");function op(e,t){return e.map((a,o)=>e[(t+o)%e.length])}se(op,"wrapArray");var Ie=require("react/jsx-runtime"),Zl=jf;var Jl=Kf,zn=ca.forwardRef(({className:e,children:t,...a},o)=>(0,Ie.jsxs)(ql,{ref:o,className:ee("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[t,(0,Ie.jsx)(Xf,{asChild:!0,children:(0,Ie.jsx)(no,{className:"h-4 w-4 opacity-50"})})]}));zn.displayName=ql.displayName;var rp=ca.forwardRef(({className:e,...t},a)=>(0,Ie.jsx)(jl,{ref:a,className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:(0,Ie.jsx)(Yo,{className:"h-4 w-4"})}));rp.displayName=jl.displayName;var np=ca.forwardRef(({className:e,...t},a)=>(0,Ie.jsx)(Kl,{ref:a,className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:(0,Ie.jsx)(no,{className:"h-4 w-4"})}));np.displayName=Kl.displayName;var Vn=ca.forwardRef(({className:e,children:t,position:a="popper",...o},r)=>(0,Ie.jsx)($f,{children:(0,Ie.jsxs)(zl,{ref:r,className:ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...o,children:[(0,Ie.jsx)(rp,{}),(0,Ie.jsx)(Zf,{className:ee("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,Ie.jsx)(np,{})]})}));Vn.displayName=zl.displayName;var oC=ca.forwardRef(({className:e,...t},a)=>(0,Ie.jsx)(Gl,{ref:a,className:ee("px-2 py-1.5 text-sm font-semibold",e),...t}));oC.displayName=Gl.displayName;var Ao=ca.forwardRef(({className:e,children:t,...a},o)=>(0,Ie.jsxs)(Wl,{ref:o,className:ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Ie.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ie.jsx)(ep,{children:(0,Ie.jsx)(aa,{className:"h-4 w-4"})})}),(0,Ie.jsx)(Qf,{children:t})]}));Ao.displayName=Wl.displayName;var rC=ca.forwardRef(({className:e,...t},a)=>(0,Ie.jsx)(Xl,{ref:a,className:ee("-mx-1 my-1 h-px bg-muted",e),...t}));rC.displayName=Xl.displayName;var sp=q(require("react"),1);var lp=require("react/jsx-runtime"),Ql=sp.forwardRef(({className:e,...t},a)=>(0,lp.jsx)("textarea",{className:ee("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ql.displayName="Textarea";var Kt={high:{label:"P0",color:"#f87171"},medium:{label:"P1",color:"#fbbf24"},low:{label:"P2",color:"#38bdf8"}},Gn=["high","medium","low"],ip="#94a3b8";function up(e,t){return t?e.find(a=>a.name===t)?.color??ip:ip}var je=(e,t)=>e.replace(/\{(\w+)\}/g,(a,o)=>t[o]??""),ei=e=>e==="high"||e==="medium"||e==="low"?Kt[e].label:"";function dp(e,t){let a=e.meta||{},o=t("noValue"),r=e.from??null,n=e.to??null;switch(e.type){case"card_created":{let s=a.label??o,l=a.priority&&ei(a.priority)||o;return je(t("actCreated"),{column:a.column??"",label:s,priority:l})}case"card_moved":return je(t("actMoved"),{from:r??o,to:n??o});case"card_label_changed":return r==null&&n!=null?je(t("actLabelSet"),{to:n}):r!=null&&n==null?je(t("actLabelCleared"),{from:r}):je(t("actLabel"),{from:r??o,to:n??o});case"card_priority_changed":{let s=r?ei(r)||r:o,l=n?ei(n)||n:o;return r==null&&n!=null?je(t("actPrioritySet"),{to:l}):r!=null&&n==null?je(t("actPriorityCleared"),{from:s}):je(t("actPriority"),{from:s,to:l})}case"card_title_changed":return je(t("actTitle"),{from:r??o,to:n??o});case"card_note_changed":return t("actNote");case"card_deleted":return t("actDeleted");case"column_added":return je(t("actColumnAdded"),{column:a.column??""});case"column_renamed":return je(t("actColumnRenamed"),{from:r??o,to:n??o});case"column_deleted":return je(t("actColumnDeleted"),{column:a.column??""});case"label_added":return je(t("actLabelAdded"),{label:a.label??""});case"label_renamed":return je(t("actLabelRenamed"),{from:r??o,to:n??o});case"label_deleted":return je(t("actLabelDeleted"),{label:a.label??""});case"label_color_changed":return je(t("actLabelColor"),{label:a.label??"",from:r??o,to:n??o});default:return e.type}}var Wn=e=>String(e).padStart(2,"0");function cp(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:`${t.getFullYear()}-${Wn(t.getMonth()+1)}-${Wn(t.getDate())} ${Wn(t.getHours())}:${Wn(t.getMinutes())}`}var mt=require("react/jsx-runtime");function fp({activities:e}){let t=Xe();if(e.length===0)return(0,mt.jsx)("p",{className:"text-xs text-muted-foreground",children:t("activityEmpty")});let a=[...e].reverse();return(0,mt.jsx)("ol",{className:"relative space-y-3.5 border-l border-[var(--dsw-alias-border-l2)] pl-4",children:a.map(o=>{let r=o.source==="agent";return(0,mt.jsxs)("li",{className:"relative",children:[(0,mt.jsx)("span",{className:`absolute -left-[21px] top-1.5 h-2 w-2 rounded-full ${r?"bg-sky-500":"bg-emerald-500"}`}),(0,mt.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,mt.jsx)(Zo,{className:"h-3 w-3"}),(0,mt.jsx)("time",{className:"tabular-nums",children:cp(o.ts)}),(0,mt.jsx)("span",{children:"\xB7"}),(0,mt.jsx)("span",{className:`font-medium ${r?"text-sky-500":"text-emerald-500"}`,children:t(r?"actorAgent":"actorHuman")})]}),(0,mt.jsx)("p",{className:"mt-1 text-[13px] leading-snug text-foreground",children:dp(o,t)})]},o.id)})})}var j=require("react/jsx-runtime");function pp({open:e,card:t,labels:a,activities:o,onOpenChange:r,onSave:n,onDelete:s,onChatWithAgent:l}){let i=Xe(),[u,c]=(0,jn.useState)({id:"",title:"",note:"",label:"",priority:""});(0,jn.useEffect)(()=>{e&&c({id:t?.id??"",title:t?.title??"",note:t?.note??"",label:t?.label??"",priority:t?.priority??""})},[e,t]);let d=f=>c(g=>({...g,...f}));return(0,j.jsx)(Io,{open:e,onOpenChange:r,children:(0,j.jsxs)(Pa,{className:"sm:max-w-xl","aria-describedby":void 0,onOpenAutoFocus:f=>f.preventDefault(),children:[(0,j.jsx)(Da,{children:(0,j.jsx)(ka,{className:"sr-only",children:i(t?"editCard":"addCard")})}),(0,j.jsxs)("div",{className:"grid gap-4 py-2",children:[(0,j.jsxs)("div",{className:"grid gap-2",children:[(0,j.jsxs)(Va,{htmlFor:"card-title",className:"flex items-center justify-between",children:[(0,j.jsx)("span",{children:i("fieldTitle")}),t&&(0,j.jsxs)("span",{className:"text-[11px] font-medium text-muted-foreground",children:[i("fieldId"),": ",t.id]})]}),(0,j.jsx)(jt,{id:"card-title",value:u.title,placeholder:i("titlePlaceholder"),onChange:f=>d({title:f.target.value})})]}),(0,j.jsxs)("div",{className:"grid gap-2",children:[(0,j.jsx)(Va,{children:i("fieldLabel")}),(0,j.jsxs)(Zl,{value:u.label||"__none__",onValueChange:f=>d({label:f==="__none__"?"":f}),children:[(0,j.jsx)(zn,{children:(0,j.jsx)(Jl,{placeholder:i("noLabel")})}),(0,j.jsxs)(Vn,{children:[(0,j.jsx)(Ao,{value:"__none__",children:i("noLabel")}),a.map(f=>(0,j.jsx)(Ao,{value:f.name,children:f.name},f.name))]})]})]}),(0,j.jsxs)("div",{className:"grid gap-2",children:[(0,j.jsx)(Va,{children:i("fieldPriority")}),(0,j.jsxs)(Zl,{value:u.priority||"__none__",onValueChange:f=>d({priority:f==="__none__"?"":f}),children:[(0,j.jsx)(zn,{children:(0,j.jsx)(Jl,{placeholder:i("noPriority")})}),(0,j.jsxs)(Vn,{children:[(0,j.jsx)(Ao,{value:"__none__",children:i("noPriority")}),Gn.map(f=>{let g=Kt[f];return(0,j.jsx)(Ao,{value:f,children:(0,j.jsxs)("span",{className:"flex items-center gap-2",children:[(0,j.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:g.color}}),g.label]})},f)})]})]})]}),(0,j.jsxs)("div",{className:"grid gap-2",children:[(0,j.jsx)(Va,{htmlFor:"card-note",children:i("fieldNote")}),(0,j.jsx)(Ql,{id:"card-note",value:u.note,placeholder:i("notePlaceholder"),rows:5,onChange:f=>d({note:f.target.value})})]}),t&&(0,j.jsxs)("div",{className:"grid gap-2 rounded-xl border border-[var(--dsw-alias-border-l2)] p-3",children:[(0,j.jsx)(Va,{className:"text-xs text-muted-foreground",children:i("activityTitle")}),(0,j.jsx)("div",{className:"max-h-48 overflow-y-auto pr-1",children:(0,j.jsx)(fp,{activities:o})})]})]}),(0,j.jsxs)(gr,{children:[t&&s&&(0,j.jsxs)(Ae,{variant:"destructive",className:"mr-auto",onClick:()=>{s(t),r(!1)},children:[(0,j.jsx)(_t,{className:"h-4 w-4"}),i("delete")]}),(0,j.jsxs)(Sr,{children:[(0,j.jsx)(Rr,{asChild:!0,children:(0,j.jsxs)(Ae,{variant:"outline",disabled:!u.title.trim()&&!u.note.trim(),children:[(0,j.jsx)(tr,{className:"h-4 w-4"}),i("chatWithAgent")]})}),(0,j.jsxs)(ko,{align:"end",children:[(0,j.jsx)(Wt,{onClick:()=>{l(u,"current"),r(!1)},children:i("chatCurrentSession")}),(0,j.jsx)(Wt,{onClick:()=>{l(u,"new"),r(!1)},children:i("chatNewSession")})]})]}),(0,j.jsx)(Ae,{disabled:!u.title.trim(),onClick:()=>{n(u),r(!1)},children:i("save")})]})]})})}var mp=require("react/jsx-runtime"),nC=an("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ti({className:e,variant:t,...a}){return(0,mp.jsx)("div",{className:ee(nC({variant:t}),e),...a})}var Ka=q(require("react"),1);var Xa=require("react/jsx-runtime"),Dr=Ka.forwardRef(({className:e,...t},a)=>(0,Xa.jsx)("div",{ref:a,className:ee("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Dr.displayName="Card";var sC=Ka.forwardRef(({className:e,...t},a)=>(0,Xa.jsx)("div",{ref:a,className:ee("flex flex-col space-y-1.5 p-6",e),...t}));sC.displayName="CardHeader";var lC=Ka.forwardRef(({className:e,...t},a)=>(0,Xa.jsx)("div",{ref:a,className:ee("font-semibold leading-none tracking-tight",e),...t}));lC.displayName="CardTitle";var iC=Ka.forwardRef(({className:e,...t},a)=>(0,Xa.jsx)("div",{ref:a,className:ee("text-sm text-muted-foreground",e),...t}));iC.displayName="CardDescription";var kr=Ka.forwardRef(({className:e,...t},a)=>(0,Xa.jsx)("div",{ref:a,className:ee("p-6 pt-0",e),...t}));kr.displayName="CardContent";var uC=Ka.forwardRef(({className:e,...t},a)=>(0,Xa.jsx)("div",{ref:a,className:ee("flex items-center p-6 pt-0",e),...t}));uC.displayName="CardFooter";var Ft=require("react/jsx-runtime");function gp({card:e,labels:t,onOpen:a}){let{attributes:o,listeners:r,setNodeRef:n,transform:s,transition:l,isDragging:i}=Yr({id:e.id,data:{type:"card",cardId:e.id,columnId:e.columnId}}),u=e.priority?Kt[e.priority]:null,c=up(t,e.label);return(0,Ft.jsx)("div",{ref:n,style:{transform:tt.Transform.toString(s),transition:l},...o,...r,onClick:()=>a(e),className:ee("group cursor-grab touch-none select-none active:cursor-grabbing",i&&"opacity-40"),children:(0,Ft.jsx)(Dr,{className:"pointer-events-none rounded-xl border-[var(--dsw-alias-border-l2)] shadow-card transition-shadow duration-200 group-hover:shadow-float",children:(0,Ft.jsxs)(kr,{className:"p-3.5",children:[(e.label||u)&&(0,Ft.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[e.label&&(0,Ft.jsx)(ti,{variant:"secondary",className:"rounded-full px-2 py-0 text-[10.5px] font-medium leading-4",style:{background:c,color:"#0b1220"},children:e.label}),u&&(0,Ft.jsx)(ti,{variant:"secondary",className:"rounded-full px-2 py-0 text-[10.5px] font-medium leading-4",style:{background:u.color,color:"#0b1220"},children:u.label})]}),(0,Ft.jsx)("p",{className:"text-[13.5px] font-medium leading-snug tracking-tight break-words",children:e.title}),e.note&&(0,Ft.jsx)("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground line-clamp-3 whitespace-pre-wrap break-words",children:e.note})]})})})}var st=require("react/jsx-runtime");function hp({column:e,cards:t,labels:a,onAddCard:o,onOpenCard:r}){let{setNodeRef:n,isOver:s}=Gr({id:e.id,data:{type:"column"}}),l=Xe();return(0,st.jsxs)("div",{ref:n,className:ee("flex min-h-0 w-72 shrink-0 flex-col rounded-2xl border border-[var(--dsw-alias-border-l2)] bg-card shadow-column transition-colors",s&&"border-primary"),children:[(0,st.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-3",children:[(0,st.jsx)("h3",{className:"flex-1 truncate text-[13.5px] font-semibold tracking-tight",children:e.title}),(0,st.jsx)("span",{className:"rounded-full bg-secondary/70 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:t.length})]}),(0,st.jsxs)("div",{className:"kan-scroll flex min-h-[4rem] flex-1 flex-col gap-2 overflow-y-auto px-2.5 pb-2.5",children:[(0,st.jsx)($r,{items:t.map(i=>i.id),strategy:Xr,children:t.map(i=>(0,st.jsx)(gp,{card:i,labels:a,onOpen:r},i.id))}),t.length===0&&(0,st.jsx)("p",{className:"py-5 text-center text-xs text-muted-foreground/70",children:l("emptyColumn")})]}),(0,st.jsx)("div",{className:"p-2.5 pt-1",children:(0,st.jsxs)(Ae,{variant:"ghost",size:"sm",className:"w-full justify-start rounded-xl text-muted-foreground hover:text-foreground",onClick:()=>o(e),children:[(0,st.jsx)(Nt,{className:"h-4 w-4"}),l("addCard")]})})]})}var Mr=require("react");var ye=require("react/jsx-runtime");function dC({column:e,value:t,onValueChange:a,onCommit:o,onDelete:r,canDelete:n}){let{attributes:s,listeners:l,setNodeRef:i,transform:u,transition:c}=Yr({id:e.id}),d=Xe();return(0,ye.jsxs)("div",{ref:i,style:{transform:tt.Transform.toString(u),transition:c},className:"flex items-center gap-1.5",children:[(0,ye.jsx)("button",{...s,...l,className:"shrink-0 cursor-grab touch-none rounded-md p-1 text-muted-foreground/60 hover:bg-accent hover:text-foreground","aria-label":d("dragSort"),children:(0,ye.jsx)(Qo,{className:"h-4 w-4"})}),(0,ye.jsx)(jt,{value:t,onChange:f=>a(f.target.value),onBlur:o,onKeyDown:f=>{f.key==="Enter"&&f.target.blur()}}),(0,ye.jsx)(Ae,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive",disabled:!n,onClick:r,children:(0,ye.jsx)(_t,{className:"h-4 w-4"})})]})}function xp({open:e,columns:t,onOpenChange:a,onReorder:o,onRename:r,onDelete:n,onAdd:s}){let l=Xe(),[i,u]=(0,Mr.useState)({}),[c,d]=(0,Mr.useState)(""),f=Ur(ro(ta,{activationConstraint:{distance:8}}),ro(ea,{coordinateGetter:Zr}));(0,Mr.useEffect)(()=>{e&&u(Object.fromEntries(t.map(p=>[p.id,p.title])))},[e,t]);let g=p=>{let m=(i[p]??"").trim(),x=t.find(w=>w.id===p);x&&m&&m!==x.title&&r(p,m)},h=p=>{let{active:m,over:x}=p;x&&m.id!==x.id&&o(String(m.id),String(x.id))};return(0,ye.jsx)(Io,{open:e,onOpenChange:a,children:(0,ye.jsxs)(Pa,{className:"sm:max-w-md",children:[(0,ye.jsxs)(Da,{children:[(0,ye.jsx)(ka,{children:l("columnEdit")}),(0,ye.jsx)(hr,{children:l("columnEditDesc")})]}),(0,ye.jsx)(Vr,{sensors:f,collisionDetection:Ni,onDragEnd:h,children:(0,ye.jsx)($r,{items:t.map(p=>p.id),strategy:Xr,children:(0,ye.jsx)("div",{className:"flex max-h-[60vh] flex-col gap-2 overflow-y-auto py-2",children:t.map(p=>(0,ye.jsx)(dC,{column:p,value:i[p.id]??p.title,onValueChange:m=>u(x=>({...x,[p.id]:m})),onCommit:()=>g(p.id),onDelete:()=>n(p.id),canDelete:t.length>1},p.id))})})}),(0,ye.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,ye.jsx)(jt,{value:c,placeholder:l("newColumnPlaceholder"),onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&c.trim()&&(s(c.trim()),d(""))}}),(0,ye.jsxs)(Ae,{size:"sm",onClick:()=>{c.trim()&&(s(c.trim()),d(""))},children:[(0,ye.jsx)(Nt,{className:"h-4 w-4"}),l("add")]})]})]})})}var To=require("react");var ke=require("react/jsx-runtime");function vp({open:e,labels:t,onOpenChange:a,onAdd:o,onUpdate:r,onDelete:n}){let s=Xe(),[l,i]=(0,To.useState)({}),[u,c]=(0,To.useState)(""),[d,f]=(0,To.useState)("#38bdf8");(0,To.useEffect)(()=>{e&&i(Object.fromEntries(t.map(h=>[h.name,{name:h.name,color:h.color}])))},[e,t]);let g=h=>{let p=l[h];if(!p)return;let m=t.find(w=>w.name===h),x=p.name.trim();m&&x&&(x!==h||p.color!==m.color)&&r(h,x,p.color)};return(0,ke.jsx)(Io,{open:e,onOpenChange:a,children:(0,ke.jsxs)(Pa,{className:"sm:max-w-md",children:[(0,ke.jsxs)(Da,{children:[(0,ke.jsx)(ka,{children:s("labelEdit")}),(0,ke.jsx)(hr,{children:s("labelEditDesc")})]}),(0,ke.jsx)("div",{className:"flex max-h-[60vh] flex-col gap-2 overflow-y-auto py-2",children:t.map(h=>{let p=l[h.name]??{name:h.name,color:h.color};return(0,ke.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,ke.jsx)("input",{type:"color",value:p.color,className:"h-8 w-8 shrink-0 cursor-pointer rounded-md border border-input bg-transparent p-0.5",onChange:m=>i(x=>({...x,[h.name]:{...p,color:m.target.value}})),onBlur:()=>g(h.name)}),(0,ke.jsx)(jt,{value:p.name,onChange:m=>i(x=>({...x,[h.name]:{...p,name:m.target.value}})),onBlur:()=>g(h.name),onKeyDown:m=>{m.key==="Enter"&&m.target.blur()}}),(0,ke.jsx)(Ae,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive",onClick:()=>n(h.name),children:(0,ke.jsx)(_t,{className:"h-4 w-4"})})]},h.name)})}),(0,ke.jsx)(gr,{className:"flex-col gap-2 sm:flex-row sm:items-center",children:(0,ke.jsxs)("div",{className:"flex flex-1 items-center gap-1.5",children:[(0,ke.jsx)("input",{type:"color",value:d,className:"h-8 w-8 shrink-0 cursor-pointer rounded-md border border-input bg-transparent p-0.5",onChange:h=>f(h.target.value)}),(0,ke.jsx)(jt,{value:u,placeholder:s("newLabelPlaceholder"),onChange:h=>c(h.target.value),onKeyDown:h=>{h.key==="Enter"&&u.trim()&&(o(u.trim(),d),c(""))}}),(0,ke.jsxs)(Ae,{size:"sm",onClick:()=>{u.trim()&&(o(u.trim(),d),c(""))},children:[(0,ke.jsx)(Nt,{className:"h-4 w-4"}),s("add")]})]})})]})})}function Kn(e,t={},a="default"){return fetch("/api/kanban",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({method:e,args:{...t,workspaceId:a}})}).then(o=>o.json())}var ai=new Map,oi=0,Xn=new Set;function wp(e,t){ai.set(e,t),oi++;for(let a of Xn)a()}function Cp(e){let t=ai.get(e);if(t==null)return null;ai.delete(e),oi++;for(let a of Xn)a();return t}function bp(e){return Xn.add(e),()=>{Xn.delete(e)}}function Lp(){return oi}function Ip(e){let t=(e.id??"").trim(),a=(e.title??"").trim(),o=(e.note??"").trim(),r=(e.label??"").trim(),n=[];return t&&n.push(Lo("fieldId")+": "+t),a&&n.push(a),r&&n.push(Lo("fieldLabel")+": "+r),o&&n.push(o),n.join(`
|
|
1509
|
+
|
|
1510
|
+
`)}var K=require("react/jsx-runtime");function yp(e){let{sessionId:t}=e,a=e.useWorkspaces,o=e.inputActions,r=e.workspaces,n=e.sessions,s=a?a(R=>R.items):[],l=a?a(R=>R.recentWorkspaceId):void 0,i=Array.isArray(s)?s.find(R=>Array.isArray(R.sessionIds)&&R.sessionIds.includes(t)):void 0,u=i?i.workspaceId:l||"default",c=Xe(),[d,f]=(0,xe.useState)(null),[g,h]=(0,xe.useState)(""),[p,m]=(0,xe.useState)([]),[x,w]=(0,xe.useState)(null),[v,C]=(0,xe.useState)(null),[b,L]=(0,xe.useState)(!1),[y,S]=(0,xe.useState)(!1),[P,E]=(0,xe.useState)(!1),[M,D]=(0,xe.useState)(""),F=(0,xe.useRef)(null),[U,Z]=(0,xe.useState)(null),W=Ur(ro(ta,{activationConstraint:{distance:8}}),ro(ea,{coordinateGetter:Zr})),O=(0,xe.useCallback)(R=>{R&&R.board&&(f({...R.board,activities:Array.isArray(R.board.activities)?R.board.activities:[]}),h("")),Array.isArray(R&&R.warnings)&&R.warnings.length>0&&m(N=>[...N,...R.warnings])},[]),B=(0,xe.useCallback)((R,N={})=>{Kn(R,N,u).then(O).catch(G=>h(c("actionFailed")+String(G&&G.message||G)))},[u,O]),H=(0,xe.useCallback)(()=>{E(!0),Kn("get",{},u).then(O).catch(R=>h(c("loadFailed")+String(R&&R.message||R))).finally(()=>E(!1))},[u,O,c]);(0,xe.useEffect)(()=>{let R=!0;return Kn("get",{},u).then(N=>{R&&O(N)}).catch(N=>{R&&h(c("loadFailed")+String(N&&N.message||N))}),()=>{R=!1}},[u,O]),(0,xe.useLayoutEffect)(()=>{let R=X=>{let _=X;for(;_;){let $=getComputedStyle(_).overflowY;if($==="auto"||$==="scroll")return _;_=_.parentElement}return null},N=()=>{let X=F.current;if(!X)return;let _=X.getBoundingClientRect().top,$=R(X.parentElement),Y=window.innerHeight;if($){let oe=$.querySelector("[data-composer-seat]"),we=oe?oe.getBoundingClientRect().top:0;oe&&oe.offsetHeight>0&&we>_?Y=we:Y=$.getBoundingClientRect().bottom}Z(Math.max(0,Math.floor(Y-_)))};N();let G=R(F.current?.parentElement??null),k=new ResizeObserver(N);return k.observe(document.documentElement),G&&k.observe(G),window.addEventListener("resize",N),()=>{k.disconnect(),window.removeEventListener("resize",N)}},[d!==null]);let T=(0,xe.useCallback)(R=>{let N=_i(R),G=N.length>0?N:ps(R),k=jo(G,"id");if(k==null)return[];if(new Set((d?.columns??[]).map(_=>_.id)).has(String(k))){let _=(d?.cards??[]).filter($=>$.columnId===k).map($=>$.id);if(_.length>0){let $=Hr({...R,droppableContainers:R.droppableContainers.filter(Y=>Y.id!==k&&_.includes(String(Y.id)))});$.length>0&&(k=$[0].id)}}return[{id:k}]},[d]),le=R=>{if(R.active.data.current?.type==="card"){let N=d?.cards.find(G=>G.id===R.active.id);N&&w(N)}},Q=R=>{let{active:N,over:G}=R;if(w(null),!G||!d)return;let k=N.data.current?.type,X=G.data.current?.type;if(k==="card")if(X==="card"){let _=d.cards.find(oe=>oe.id===G.id);if(!_||_.id===N.id)return;let Y=d.cards.filter(oe=>oe.columnId===_.columnId).findIndex(oe=>oe.id===_.id);B("moveCard",{id:String(N.id),columnId:_.columnId,toIndex:Y>=0?Y:void 0})}else X==="column"&&B("moveCard",{id:String(N.id),columnId:String(G.id)})},ie=R=>{if(!v)return;let N={title:R.title,note:R.note,label:R.label||void 0,priority:R.priority||void 0};v.card?B("updateCard",{id:v.card.id,...N}):B("addCard",{columnId:v.columnId,...N})},ve=(0,xe.useCallback)((R,N)=>{let G=Ip(R);if(G){if(N==="current"){o?.setDraft(G);return}!r?.connectWorkspace||!n?.open||r.connectWorkspace(u).then(k=>{k&&(wp(k,G),n.open(k))}).catch(k=>h(c("actionFailed")+String(k&&k.message||k)))}},[o,r,n,u,c]);return d?(0,K.jsxs)("div",{ref:F,className:"flex h-full flex-col gap-3 p-5",style:U!=null?{height:U}:void 0,children:[g&&(0,K.jsx)("p",{className:"text-sm text-destructive",children:g}),p.length>0&&(0,K.jsxs)("div",{className:"flex items-start gap-2 rounded-xl border border-amber-500/40 bg-amber-500/10 px-3 py-2",children:[(0,K.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,K.jsx)("p",{className:"text-xs font-medium text-amber-500",children:c("warnings")}),p.map((R,N)=>(0,K.jsx)("p",{className:"mt-0.5 break-words text-xs text-amber-600",children:R},N))]}),(0,K.jsx)(Ae,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs text-amber-600 hover:text-amber-500",onClick:()=>m([]),children:c("dismiss")})]}),(0,K.jsxs)(Vr,{sensors:W,collisionDetection:T,onDragStart:le,onDragEnd:Q,children:[(0,K.jsxs)("div",{className:"flex min-h-0 flex-1 gap-3",children:[(0,K.jsxs)("div",{className:"flex shrink-0 flex-col items-center gap-1.5 self-start rounded-2xl border border-[var(--dsw-alias-border-l2)] bg-card p-1.5 shadow-column",children:[(0,K.jsx)(Ae,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground",title:c("refresh"),"aria-label":c("refresh"),disabled:P,onClick:H,children:(0,K.jsx)(ar,{className:P?"animate-spin":void 0})}),(0,K.jsxs)(Sr,{children:[(0,K.jsx)(Rr,{asChild:!0,children:(0,K.jsx)(Ae,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground",title:c("settings"),children:(0,K.jsx)(or,{className:"h-4 w-4"})})}),(0,K.jsxs)(ko,{align:"start",children:[(0,K.jsxs)(Wt,{onClick:()=>L(!0),children:[(0,K.jsx)(er,{className:"h-4 w-4"}),c("columnEdit")]}),(0,K.jsxs)(Wt,{onClick:()=>S(!0),children:[(0,K.jsx)(rr,{className:"h-4 w-4"}),c("labelEdit")]})]})]}),(0,K.jsxs)(Sr,{children:[(0,K.jsx)(Rr,{asChild:!0,children:(0,K.jsx)(Ae,{variant:M?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-muted-foreground hover:text-foreground",title:c("priorityFilter"),children:(0,K.jsx)(Jo,{className:"h-4 w-4"})})}),(0,K.jsxs)(ko,{align:"start",children:[(0,K.jsxs)(Wt,{onClick:()=>D(""),children:[(0,K.jsx)("span",{className:"flex h-4 w-4 items-center",children:!M&&(0,K.jsx)(aa,{className:"h-4 w-4"})}),c("all")]}),Gn.map(R=>(0,K.jsxs)(Wt,{onClick:()=>D(R),children:[(0,K.jsx)("span",{className:"flex h-4 w-4 items-center",children:M===R&&(0,K.jsx)(aa,{className:"h-4 w-4"})}),(0,K.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:Kt[R].color}}),Kt[R].label]},R))]})]})]}),(0,K.jsx)("div",{className:"kan-scroll flex min-h-0 flex-1 gap-3 overflow-x-auto overflow-y-hidden pb-2",children:d.columns.map(R=>{let N=d.cards.filter(G=>G.columnId===R.id&&(!M||G.priority===M));return(0,K.jsx)(hp,{column:R,cards:N,labels:d.labels,onAddCard:G=>C({card:null,columnId:G.id}),onOpenCard:G=>C({card:G,columnId:G.columnId})},R.id)})})]}),(0,K.jsx)(tu,{children:x?(0,K.jsx)(Dr,{className:"w-64 rotate-2 rounded-xl border-[var(--dsw-alias-border-l2)] bg-secondary shadow-float",children:(0,K.jsx)(kr,{className:"p-3.5",children:(0,K.jsx)("p",{className:"text-[13.5px] font-medium tracking-tight break-words",children:x.title})})}):null})]}),(0,K.jsx)(pp,{open:v!==null,card:v?.card??null,labels:d.labels,activities:v?.card?d.activities.filter(R=>R.cardId===v.card.id):[],onOpenChange:R=>{R||C(null)},onSave:ie,onDelete:R=>B("deleteCard",{id:R.id}),onChatWithAgent:ve}),(0,K.jsx)(xp,{open:b,columns:d.columns,onOpenChange:L,onReorder:(R,N)=>{let G=d.columns.findIndex(k=>k.id===N);G>=0&&B("moveColumn",{id:R,toIndex:G})},onRename:(R,N)=>B("renameColumn",{id:R,title:N}),onDelete:R=>B("deleteColumn",{id:R}),onAdd:R=>B("addColumn",{title:R})}),(0,K.jsx)(vp,{open:y,labels:d.labels,onOpenChange:S,onAdd:(R,N)=>B("addLabel",{name:R,color:N}),onUpdate:(R,N,G)=>B("updateLabel",{name:R,newName:N,color:G}),onDelete:R=>B("deleteLabel",{name:R})})]}):(0,K.jsx)("div",{className:"flex h-full min-h-[420px] items-center justify-center p-5",children:g?(0,K.jsx)("p",{className:"text-sm text-destructive",children:g}):(0,K.jsx)("p",{className:"text-sm text-muted-foreground",children:c("loading")})})}var $n=require("react");function Sp({sessionId:e,inputActions:t}){let a=(0,$n.useSyncExternalStore)(bp,Lp);return(0,$n.useEffect)(()=>{if(!e||!t?.setDraft)return;let o=Cp(e);o!=null&&t.setDraft(o)},[a,e,t]),null}var Rp={name:"dsh-kanban",inject:["slots","locale"],apply(e){zd(e);let t=e.get("slots");if(t===void 0)return;let a=e.get("workspaces"),o=e.get("sessions");t.inject("conversation.view",()=>t.register({name:"conversation.view",id:"kanban",order:20,label:()=>Lo("boardTab")},r=>(0,ri.createElement)(yp,{...r,workspaces:a,sessions:o}))),t.inject("conversation.input.dock",()=>t.register({name:"conversation.input.dock",id:"kanban-chat-draft",order:100},r=>(0,ri.createElement)(Sp,r)))}};var Pp="data-dsh-kanban-style";if(typeof document<"u"&&!document.querySelector("style["+Pp+"]")){let e=document.createElement("style");e.setAttribute(Pp,""),e.textContent=gi,document.head.appendChild(e)}var cC=Rp;
|
|
1382
1511
|
/*! Bundled license information:
|
|
1383
1512
|
|
|
1384
1513
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
@@ -1388,9 +1517,11 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
|
1388
1517
|
lucide-react/dist/esm/icons/check.js:
|
|
1389
1518
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
1390
1519
|
lucide-react/dist/esm/icons/chevron-up.js:
|
|
1520
|
+
lucide-react/dist/esm/icons/clock.js:
|
|
1391
1521
|
lucide-react/dist/esm/icons/filter.js:
|
|
1392
1522
|
lucide-react/dist/esm/icons/grip-vertical.js:
|
|
1393
1523
|
lucide-react/dist/esm/icons/list.js:
|
|
1524
|
+
lucide-react/dist/esm/icons/message-square.js:
|
|
1394
1525
|
lucide-react/dist/esm/icons/plus.js:
|
|
1395
1526
|
lucide-react/dist/esm/icons/refresh-cw.js:
|
|
1396
1527
|
lucide-react/dist/esm/icons/settings-2.js:
|