@acpus/web 0.1.0-alpha.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/LICENSE +21 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/client/api.d.ts +398 -0
- package/dist/client/api.d.ts.map +1 -0
- package/dist/client/api.js +73 -0
- package/dist/client/api.js.map +1 -0
- package/dist/client/assets/index-Cn1qpJ2F.css +1 -0
- package/dist/client/assets/index-DVV3hISu.js +2 -0
- package/dist/client/assets/vendor-B7fc3-WT.js +69 -0
- package/dist/client/assets/vendor-icons-BQrCRas_.js +241 -0
- package/dist/client/assets/vendor-json-view-B9Z7D9kT.css +1 -0
- package/dist/client/assets/vendor-json-view-uYZpLE5K.js +1 -0
- package/dist/client/assets/vendor-query-Co8PPx4J.js +1 -0
- package/dist/client/assets/vendor-radix-C9JUg2bE.js +1 -0
- package/dist/client/assets/vendor-react-BRGuIgbw.js +49 -0
- package/dist/client/index.html +26 -0
- package/dist/client/lib/utils.d.ts +3 -0
- package/dist/client/lib/utils.d.ts.map +1 -0
- package/dist/client/lib/utils.js +6 -0
- package/dist/client/lib/utils.js.map +1 -0
- package/dist/client/main.d.ts +2 -0
- package/dist/client/main.d.ts.map +1 -0
- package/dist/client/main.js +18 -0
- package/dist/client/main.js.map +1 -0
- package/dist/client/static-viz.d.ts +8 -0
- package/dist/client/static-viz.d.ts.map +1 -0
- package/dist/client/static-viz.js +10 -0
- package/dist/client/static-viz.js.map +1 -0
- package/dist/client/ui/App.d.ts +40 -0
- package/dist/client/ui/App.d.ts.map +1 -0
- package/dist/client/ui/App.js +742 -0
- package/dist/client/ui/App.js.map +1 -0
- package/dist/client/ui/RunGraph.d.ts +9 -0
- package/dist/client/ui/RunGraph.d.ts.map +1 -0
- package/dist/client/ui/RunGraph.js +294 -0
- package/dist/client/ui/RunGraph.js.map +1 -0
- package/dist/client/ui/StaticGraphApp.d.ts +22 -0
- package/dist/client/ui/StaticGraphApp.d.ts.map +1 -0
- package/dist/client/ui/StaticGraphApp.js +102 -0
- package/dist/client/ui/StaticGraphApp.js.map +1 -0
- package/dist/client/ui/Toast.d.ts +16 -0
- package/dist/client/ui/Toast.d.ts.map +1 -0
- package/dist/client/ui/Toast.js +41 -0
- package/dist/client/ui/Toast.js.map +1 -0
- package/dist/client/ui/shadcn/alert.d.ts +3 -0
- package/dist/client/ui/shadcn/alert.d.ts.map +1 -0
- package/dist/client/ui/shadcn/alert.js +6 -0
- package/dist/client/ui/shadcn/alert.js.map +1 -0
- package/dist/client/ui/shadcn/badge.d.ts +10 -0
- package/dist/client/ui/shadcn/badge.d.ts.map +1 -0
- package/dist/client/ui/shadcn/badge.js +19 -0
- package/dist/client/ui/shadcn/badge.js.map +1 -0
- package/dist/client/ui/shadcn/breadcrumb.d.ts +9 -0
- package/dist/client/ui/shadcn/breadcrumb.d.ts.map +1 -0
- package/dist/client/ui/shadcn/breadcrumb.js +15 -0
- package/dist/client/ui/shadcn/breadcrumb.js.map +1 -0
- package/dist/client/ui/shadcn/button.d.ts +12 -0
- package/dist/client/ui/shadcn/button.d.ts.map +1 -0
- package/dist/client/ui/shadcn/button.js +37 -0
- package/dist/client/ui/shadcn/button.js.map +1 -0
- package/dist/client/ui/shadcn/card.d.ts +6 -0
- package/dist/client/ui/shadcn/card.d.ts.map +1 -0
- package/dist/client/ui/shadcn/card.js +10 -0
- package/dist/client/ui/shadcn/card.js.map +1 -0
- package/dist/client/ui/shadcn/dialog.d.ts +11 -0
- package/dist/client/ui/shadcn/dialog.d.ts.map +1 -0
- package/dist/client/ui/shadcn/dialog.js +15 -0
- package/dist/client/ui/shadcn/dialog.js.map +1 -0
- package/dist/client/ui/shadcn/input.d.ts +5 -0
- package/dist/client/ui/shadcn/input.d.ts.map +1 -0
- package/dist/client/ui/shadcn/input.js +6 -0
- package/dist/client/ui/shadcn/input.js.map +1 -0
- package/dist/client/ui/shadcn/list.d.ts +8 -0
- package/dist/client/ui/shadcn/list.d.ts.map +1 -0
- package/dist/client/ui/shadcn/list.js +8 -0
- package/dist/client/ui/shadcn/list.js.map +1 -0
- package/dist/client/ui/shadcn/popover.d.ts +8 -0
- package/dist/client/ui/shadcn/popover.d.ts.map +1 -0
- package/dist/client/ui/shadcn/popover.js +11 -0
- package/dist/client/ui/shadcn/popover.js.map +1 -0
- package/dist/client/ui/shadcn/select.d.ts +9 -0
- package/dist/client/ui/shadcn/select.d.ts.map +1 -0
- package/dist/client/ui/shadcn/select.js +17 -0
- package/dist/client/ui/shadcn/select.js.map +1 -0
- package/dist/client/ui/shadcn/tabs.d.ts +7 -0
- package/dist/client/ui/shadcn/tabs.d.ts.map +1 -0
- package/dist/client/ui/shadcn/tabs.js +12 -0
- package/dist/client/ui/shadcn/tabs.js.map +1 -0
- package/dist/client/ui/shadcn/textarea.d.ts +3 -0
- package/dist/client/ui/shadcn/textarea.d.ts.map +1 -0
- package/dist/client/ui/shadcn/textarea.js +6 -0
- package/dist/client/ui/shadcn/textarea.js.map +1 -0
- package/dist/graph-renderer.d.ts +114 -0
- package/dist/graph-renderer.d.ts.map +1 -0
- package/dist/graph-renderer.js +673 -0
- package/dist/graph-renderer.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime-status.d.ts +10 -0
- package/dist/runtime-status.d.ts.map +1 -0
- package/dist/runtime-status.js +45 -0
- package/dist/runtime-status.js.map +1 -0
- package/dist/server/app.d.ts +11 -0
- package/dist/server/app.d.ts.map +1 -0
- package/dist/server/app.js +244 -0
- package/dist/server/app.js.map +1 -0
- package/dist/server/assets.d.ts +3 -0
- package/dist/server/assets.d.ts.map +1 -0
- package/dist/server/assets.js +45 -0
- package/dist/server/assets.js.map +1 -0
- package/dist/server/errors.d.ts +14 -0
- package/dist/server/errors.d.ts.map +1 -0
- package/dist/server/errors.js +13 -0
- package/dist/server/errors.js.map +1 -0
- package/dist/server/graph.d.ts +137 -0
- package/dist/server/graph.d.ts.map +1 -0
- package/dist/server/graph.js +592 -0
- package/dist/server/graph.js.map +1 -0
- package/dist/server/launcher.d.ts +15 -0
- package/dist/server/launcher.d.ts.map +1 -0
- package/dist/server/launcher.js +30 -0
- package/dist/server/launcher.js.map +1 -0
- package/dist/server/node-inspection.d.ts +108 -0
- package/dist/server/node-inspection.d.ts.map +1 -0
- package/dist/server/node-inspection.js +435 -0
- package/dist/server/node-inspection.js.map +1 -0
- package/dist/server/security.d.ts +12 -0
- package/dist/server/security.d.ts.map +1 -0
- package/dist/server/security.js +43 -0
- package/dist/server/security.js.map +1 -0
- package/dist/server/static-viz-assets.generated.d.ts +3 -0
- package/dist/server/static-viz-assets.generated.d.ts.map +1 -0
- package/dist/server/static-viz-assets.generated.js +4 -0
- package/dist/server/static-viz-assets.generated.js.map +1 -0
- package/dist/server/workflows.d.ts +75 -0
- package/dist/server/workflows.d.ts.map +1 -0
- package/dist/server/workflows.js +205 -0
- package/dist/server/workflows.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import{r as s}from"./vendor-react-BRGuIgbw.js";/**
|
|
2
|
+
* @license lucide-react v0.503.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const _=c=>c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),m=c=>c.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,o)=>o?o.toUpperCase():a.toLowerCase()),r=c=>{const t=m(c);return t.charAt(0).toUpperCase()+t.slice(1)},d=(...c)=>c.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim(),x=c=>{for(const t in c)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
|
+
* @license lucide-react v0.503.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var v={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"};/**
|
|
12
|
+
* @license lucide-react v0.503.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const M=s.forwardRef(({color:c="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:h="",children:n,iconNode:i,...y},k)=>s.createElement("svg",{ref:k,...v,width:t,height:t,stroke:c,strokeWidth:o?Number(a)*24/Number(t):a,className:d("lucide",h),...!n&&!x(y)&&{"aria-hidden":"true"},...y},[...i.map(([p,l])=>s.createElement(p,l)),...Array.isArray(n)?n:[n]]));/**
|
|
17
|
+
* @license lucide-react v0.503.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const e=(c,t)=>{const a=s.forwardRef(({className:o,...h},n)=>s.createElement(M,{ref:n,iconNode:t,className:d(`lucide-${_(r(c))}`,`lucide-${c}`,o),...h}));return a.displayName=r(c),a};/**
|
|
22
|
+
* @license lucide-react v0.503.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const u=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],i1=e("activity",u);/**
|
|
27
|
+
* @license lucide-react v0.503.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const g=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],k1=e("ban",g);/**
|
|
32
|
+
* @license lucide-react v0.503.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const w=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],p1=e("boxes",w);/**
|
|
37
|
+
* @license lucide-react v0.503.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const f=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],l1=e("circle-check-big",f);/**
|
|
42
|
+
* @license lucide-react v0.503.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const $=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_1=e("chevron-right",$);/**
|
|
47
|
+
* @license lucide-react v0.503.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const N=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],m1=e("chevrons-left",N);/**
|
|
52
|
+
* @license lucide-react v0.503.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const C=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],x1=e("chevrons-right",C);/**
|
|
57
|
+
* @license lucide-react v0.503.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],v1=e("circle-alert",q);/**
|
|
62
|
+
* @license lucide-react v0.503.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const b=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],M1=e("clock",b);/**
|
|
67
|
+
* @license lucide-react v0.503.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const z=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],u1=e("copy",z);/**
|
|
72
|
+
* @license lucide-react v0.503.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const A=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],g1=e("file-search",A);/**
|
|
77
|
+
* @license lucide-react v0.503.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const H=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],w1=e("file-text",H);/**
|
|
82
|
+
* @license lucide-react v0.503.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const j=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],f1=e("folder",j);/**
|
|
87
|
+
* @license lucide-react v0.503.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const L=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$1=e("loader-circle",L);/**
|
|
92
|
+
* @license lucide-react v0.503.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const V=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],N1=e("package",V);/**
|
|
97
|
+
* @license lucide-react v0.503.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const B=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],C1=e("pause",B);/**
|
|
102
|
+
* @license lucide-react v0.503.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const R=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],q1=e("play",R);/**
|
|
107
|
+
* @license lucide-react v0.503.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const P=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],b1=e("radio",P);/**
|
|
112
|
+
* @license lucide-react v0.503.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const S=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],z1=e("rotate-ccw",S);/**
|
|
117
|
+
* @license lucide-react v0.503.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const E=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],A1=e("search",E);/**
|
|
122
|
+
* @license lucide-react v0.503.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const F=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],H1=e("square",F);/**
|
|
127
|
+
* @license lucide-react v0.503.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Z=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],j1=e("workflow",Z);/**
|
|
132
|
+
* @license lucide-react v0.503.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const D=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],L1=e("circle-x",D);/**
|
|
137
|
+
* @license lucide-react v0.503.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const G=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],V1=e("bot",G);/**
|
|
142
|
+
* @license lucide-react v0.503.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const W=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],B1=e("braces",W);/**
|
|
147
|
+
* @license lucide-react v0.503.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],R1=e("circle-check",I);/**
|
|
152
|
+
* @license lucide-react v0.503.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const T=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],P1=e("circle-dashed",T);/**
|
|
157
|
+
* @license lucide-react v0.503.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],S1=e("circle-ellipsis",U);/**
|
|
162
|
+
* @license lucide-react v0.503.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],E1=e("circle-pause",X);/**
|
|
167
|
+
* @license lucide-react v0.503.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const J=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],F1=e("git-branch",J);/**
|
|
172
|
+
* @license lucide-react v0.503.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const K=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Z1=e("git-fork",K);/**
|
|
177
|
+
* @license lucide-react v0.503.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const O=[["path",{d:"M5 12h14",key:"1ays0h"}]],D1=e("minus",O);/**
|
|
182
|
+
* @license lucide-react v0.503.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Q=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],G1=e("plus",Q);/**
|
|
187
|
+
* @license lucide-react v0.503.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Y=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],W1=e("repeat",Y);/**
|
|
192
|
+
* @license lucide-react v0.503.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const e1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],I1=e("rows-3",e1);/**
|
|
197
|
+
* @license lucide-react v0.503.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const t1=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],T1=e("scan",t1);/**
|
|
202
|
+
* @license lucide-react v0.503.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const c1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],U1=e("shield-check",c1);/**
|
|
207
|
+
* @license lucide-react v0.503.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const a1=[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]],X1=e("skip-forward",a1);/**
|
|
212
|
+
* @license lucide-react v0.503.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const o1=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],J1=e("split",o1);/**
|
|
217
|
+
* @license lucide-react v0.503.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const n1=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],K1=e("terminal",n1);/**
|
|
222
|
+
* @license lucide-react v0.503.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const s1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],O1=e("check",s1);/**
|
|
227
|
+
* @license lucide-react v0.503.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const h1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Q1=e("chevron-down",h1);/**
|
|
232
|
+
* @license lucide-react v0.503.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const y1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Y1=e("chevron-up",y1);/**
|
|
237
|
+
* @license lucide-react v0.503.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const r1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ee=e("x",r1);export{i1 as A,V1 as B,Q1 as C,N1 as D,A1 as E,g1 as F,F1 as G,f1 as H,w1 as I,_1 as J,$1 as L,D1 as M,G1 as P,W1 as R,J1 as S,K1 as T,j1 as W,ee as X,Y1 as a,O1 as b,I1 as c,Z1 as d,U1 as e,b1 as f,X1 as g,k1 as h,L1 as i,R1 as j,E1 as k,S1 as l,P1 as m,B1 as n,T1 as o,u1 as p,l1 as q,v1 as r,M1 as s,x1 as t,m1 as u,p1 as v,C1 as w,q1 as x,z1 as y,H1 as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._GzYRV{line-height:1.2;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{font-size:1.2em;margin-right:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{font-weight:600;margin-right:5px;color:#000}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{font-weight:bolder;margin-right:5px;color:#fdf6e3}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l}from"./vendor-react-BRGuIgbw.js";const q=e=>typeof e=="boolean"||e instanceof Boolean,M=e=>typeof e=="number"||e instanceof Number,K=e=>typeof e=="bigint"||e instanceof BigInt,B=e=>!!e&&e instanceof Date,G=e=>typeof e=="string"||e instanceof String,Q=e=>Array.isArray(e),J=e=>typeof e=="object"&&e!==null,A=e=>!!e&&e instanceof Object&&typeof e=="function";function y(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function $(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function j(e){let{field:t,value:n,data:o,lastElement:u,openBracket:a,closeBracket:i,level:d,style:s,shouldExpandNode:f,clickToExpandNode:p,outerRef:h,beforeExpandChange:N}=e;const I=l.useRef(!1),[b,C]=l.useState(()=>f(d,n,t)),F=l.useRef(null);l.useEffect(()=>{I.current?C(f(d,n,t)):I.current=!0},[f]);const V=l.useId();if(o.length===0)return U({field:t,openBracket:a,closeBracket:i,lastElement:u,style:s});const L=b?s.collapseIcon:s.expandIcon,T=b?s.ariaLables.collapseJson:s.ariaLables.expandJson,w=d+1,D=o.length-1,R=r=>{b!==r&&(!N||N({level:d,value:n,field:t,newExpandValue:r}))&&C(r)},v=r=>{if(r.key==="ArrowRight"||r.key==="ArrowLeft")r.preventDefault(),R(r.key==="ArrowRight");else if(r.key==="ArrowUp"||r.key==="ArrowDown"){r.preventDefault();const g=r.key==="ArrowUp"?-1:1;if(!h.current)return;const m=h.current.querySelectorAll("[role=button]");let E=-1;for(let x=0;x<m.length;x++)if(m[x].tabIndex===0){E=x;break}if(E<0)return;const O=(E+g+m.length)%m.length;m[E].tabIndex=-1,m[O].tabIndex=0,m[O].focus()}},k=()=>{var r;R(!b);const g=F.current;if(!g)return;const m=(r=h.current)===null||r===void 0?void 0:r.querySelector('[role=button][tabindex="0"]');m&&(m.tabIndex=-1),g.tabIndex=0,g.focus()};return l.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},l.createElement("span",{className:L,onClick:k,onKeyDown:v,role:"button","aria-label":T,"aria-expanded":b,"aria-controls":b?V:void 0,ref:F,tabIndex:d===0?0:-1}),(t||t==="")&&(p?l.createElement("span",{className:s.clickableLabel,onClick:k,onKeyDown:v},y(t,s.quotesForFieldNames),":"):l.createElement("span",{className:s.label},y(t,s.quotesForFieldNames),":")),l.createElement("span",{className:s.punctuation},a),b?l.createElement("ul",{id:V,role:"group",className:s.childFieldsContainer},o.map((r,g)=>l.createElement(S,{key:r[0]||g,field:r[0],value:r[1],style:s,lastElement:g===D,level:w,shouldExpandNode:f,clickToExpandNode:p,beforeExpandChange:N,outerRef:h}))):l.createElement("span",{className:s.collapsedContent,onClick:k,onKeyDown:v}),l.createElement("span",{className:s.punctuation},i),!u&&l.createElement("span",{className:s.punctuation},","))}function U(e){let{field:t,openBracket:n,closeBracket:o,lastElement:u,style:a}=e;return l.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&l.createElement("span",{className:a.label},y(t,a.quotesForFieldNames),":"),l.createElement("span",{className:a.punctuation},n),l.createElement("span",{className:a.punctuation},o),!u&&l.createElement("span",{className:a.punctuation},","))}function X(e){let{field:t,value:n,style:o,lastElement:u,shouldExpandNode:a,clickToExpandNode:i,level:d,outerRef:s,beforeExpandChange:f}=e;return j({field:t,value:n,lastElement:u||!1,level:d,openBracket:"{",closeBracket:"}",style:o,shouldExpandNode:a,clickToExpandNode:i,data:Object.keys(n).map(p=>[p,n[p]]),outerRef:s,beforeExpandChange:f})}function Y(e){let{field:t,value:n,style:o,lastElement:u,level:a,shouldExpandNode:i,clickToExpandNode:d,outerRef:s,beforeExpandChange:f}=e;return j({field:t,value:n,lastElement:u||!1,level:a,openBracket:"[",closeBracket:"]",style:o,shouldExpandNode:i,clickToExpandNode:d,data:n.map(p=>[void 0,p]),outerRef:s,beforeExpandChange:f})}function z(e){let{field:t,value:n,style:o,lastElement:u}=e,a,i=o.otherValue;return n===null?(a="null",i=o.nullValue):n===void 0?(a="undefined",i=o.undefinedValue):G(n)?(a=$(n,!o.noQuotesForStringValues,o.stringifyStringValues),i=o.stringValue):q(n)?(a=n?"true":"false",i=o.booleanValue):M(n)?(a=n.toString(),i=o.numberValue):K(n)?(a=`${n.toString()}n`,i=o.numberValue):B(n)?a=n.toISOString():A(n)?a="function() { }":a=n.toString(),l.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&l.createElement("span",{className:o.label},y(t,o.quotesForFieldNames),":"),l.createElement("span",{className:i},a),!u&&l.createElement("span",{className:o.punctuation},","))}function S(e){const t=e.value;return Q(t)?l.createElement(Y,Object.assign({},e)):J(t)&&!B(t)&&!A(t)?l.createElement(X,Object.assign({},e)):l.createElement(z,Object.assign({},e))}var c={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const P={collapseJson:"collapse JSON",expandJson:"expand JSON"},_={container:c["container-light"],basicChildStyle:c["basic-element-style"],childFieldsContainer:c["child-fields-container"],label:c["label-light"],clickableLabel:c["clickable-label-light"],nullValue:c["value-null-light"],undefinedValue:c["value-undefined-light"],stringValue:c["value-string-light"],booleanValue:c["value-boolean-light"],numberValue:c["value-number-light"],otherValue:c["value-other-light"],punctuation:c["punctuation-light"],collapseIcon:c["collapse-icon-light"],expandIcon:c["expand-icon-light"],collapsedContent:c["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:P,stringifyStringValues:!1},W=()=>!0,Z=e=>{let{data:t,style:n=_,shouldExpandNode:o=W,clickToExpandNode:u=!1,beforeExpandChange:a,compactTopLevel:i,...d}=e;const s=l.useRef(null);return l.createElement("div",Object.assign({"aria-label":"JSON view"},d,{className:n.container,ref:s,role:"tree"}),i&&J(t)?Object.entries(t).map(f=>{let[p,h]=f;return l.createElement(S,{key:p,field:p,value:h,style:{..._,...n},lastElement:!0,level:1,shouldExpandNode:o,clickToExpandNode:u,beforeExpandChange:a,outerRef:s})}):l.createElement(S,{value:t,style:{..._,...n},lastElement:!0,level:0,shouldExpandNode:o,clickToExpandNode:u,outerRef:s,beforeExpandChange:a}))};export{Z as J,W as a,_ as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ce=e=>{throw TypeError(e)};var te=(e,t,s)=>t.has(e)||Ce("Cannot "+s);var r=(e,t,s)=>(te(e,t,"read from private field"),s?s.call(e):t.get(e)),c=(e,t,s)=>t.has(e)?Ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),o=(e,t,s,i)=>(te(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),y=(e,t,s)=>(te(e,t,"access private method"),s);var $t=(e,t,s,i)=>({set _(n){o(e,t,n,s)},get _(){return r(e,t,i)}});import{r as x,j as is}from"./vendor-react-BRGuIgbw.js";var qt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yt,it,Pt,xe,rs=(xe=class extends qt{constructor(){super();c(this,yt);c(this,it);c(this,Pt);o(this,Pt,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){r(this,it)||this.setEventListener(r(this,Pt))}onUnsubscribe(){var t;this.hasListeners()||((t=r(this,it))==null||t.call(this),o(this,it,void 0))}setEventListener(t){var s;o(this,Pt,t),(s=r(this,it))==null||s.call(this),o(this,it,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){r(this,yt)!==t&&(o(this,yt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof r(this,yt)=="boolean"?r(this,yt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},yt=new WeakMap,it=new WeakMap,Pt=new WeakMap,xe),me=new rs,ns={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rt,pe,Ae,as=(Ae=class{constructor(){c(this,rt,ns);c(this,pe,!1)}setTimeoutProvider(e){o(this,rt,e)}setTimeout(e,t){return r(this,rt).setTimeout(e,t)}clearTimeout(e){r(this,rt).clearTimeout(e)}setInterval(e,t){return r(this,rt).setInterval(e,t)}clearInterval(e){r(this,rt).clearInterval(e)}},rt=new WeakMap,pe=new WeakMap,Ae),ft=new as;function os(e){setTimeout(e,0)}var us=typeof window>"u"||"Deno"in globalThis;function q(){}function hs(e,t){return typeof e=="function"?e(t):e}function ee(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ge(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dt(e,t){return typeof e=="function"?e(t):e}function H(e,t){return typeof e=="function"?e(t):e}function Oe(e,t){const{type:s="all",exact:i,fetchStatus:n,predicate:a,queryKey:h,stale:u}=e;if(h){if(i){if(t.queryHash!==ve(h,t.options))return!1}else if(!_t(t.queryKey,h))return!1}if(s!=="all"){const m=t.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||n&&n!==t.state.fetchStatus||a&&!a(t))}function Pe(e,t){const{exact:s,status:i,predicate:n,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(s){if(Ot(t.options.mutationKey)!==Ot(a))return!1}else if(!_t(t.options.mutationKey,a))return!1}return!(i&&t.state.status!==i||n&&!n(t))}function ve(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ot)(e)}function Ot(e){return JSON.stringify(e,(t,s)=>se(s)?Object.keys(s).sort().reduce((i,n)=>(i[n]=s[n],i),{}):s)}function _t(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>_t(e[s],t[s])):!1}var cs=Object.prototype.hasOwnProperty;function Be(e,t,s=0){if(e===t)return e;if(s>500)return t;const i=Re(e)&&Re(t);if(!i&&!(se(e)&&se(t)))return t;const a=(i?e:Object.keys(e)).length,h=i?t:Object.keys(t),u=h.length,m=i?new Array(u):{};let R=0;for(let p=0;p<u;p++){const d=i?p:h[p],g=e[d],f=t[d];if(g===f){m[d]=g,(i?p<a:cs.call(e,d))&&R++;continue}if(g===null||f===null||typeof g!="object"||typeof f!="object"){m[d]=f;continue}const E=Be(g,f,s+1);m[d]=E,E===g&&R++}return a===u&&R===a?e:m}function Xt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Re(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function se(e){if(!Fe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Fe(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Fe(e){return Object.prototype.toString.call(e)==="[object Object]"}function ls(e){return new Promise(t=>{ft.setTimeout(t,e)})}function ie(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Be(e,t):t}function ds(e,t,s=0){const i=[...e,t];return s&&i.length>s?i.slice(1):i}function fs(e,t,s=0){const i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}var be=Symbol();function ze(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===be?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ge(e,t){return typeof e=="function"?e(...t):!!e}function ys(e,t,s){let i=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??(n=t()),i||(i=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),e}var kt=(()=>{let e=()=>us;return{isServer(){return e()},setIsServer(t){e=t}}})();function re(){let e,t;const s=new Promise((n,a)=>{e=n,t=a});s.status="pending",s.catch(()=>{});function i(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{i({status:"fulfilled",value:n}),e(n)},s.reject=n=>{i({status:"rejected",reason:n}),t(n)},s}var ps=os;function ms(){let e=[],t=0,s=u=>{u()},i=u=>{u()},n=ps;const a=u=>{t?e.push(u):n(()=>{s(u)})},h=()=>{const u=e;e=[],u.length&&n(()=>{i(()=>{u.forEach(m=>{s(m)})})})};return{batch:u=>{let m;t++;try{m=u()}finally{t--,t||h()}return m},batchCalls:u=>(...m)=>{a(()=>{u(...m)})},schedule:a,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{n=u}}}var Q=ms(),Rt,nt,Ft,je,vs=(je=class extends qt{constructor(){super();c(this,Rt,!0);c(this,nt);c(this,Ft);o(this,Ft,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){r(this,nt)||this.setEventListener(r(this,Ft))}onUnsubscribe(){var t;this.hasListeners()||((t=r(this,nt))==null||t.call(this),o(this,nt,void 0))}setEventListener(t){var s;o(this,Ft,t),(s=r(this,nt))==null||s.call(this),o(this,nt,t(this.setOnline.bind(this)))}setOnline(t){r(this,Rt)!==t&&(o(this,Rt,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return r(this,Rt)}},Rt=new WeakMap,nt=new WeakMap,Ft=new WeakMap,je),Yt=new vs;function bs(e){return Math.min(1e3*2**e,3e4)}function Ve(e){return(e??"online")==="online"?Yt.isOnline():!0}var ne=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function We(e){let t=!1,s=0,i;const n=re(),a=()=>n.status!=="pending",h=b=>{var w;if(!a()){const C=new ne(b);g(C),(w=e.onCancel)==null||w.call(e,C)}},u=()=>{t=!0},m=()=>{t=!1},R=()=>me.isFocused()&&(e.networkMode==="always"||Yt.isOnline())&&e.canRun(),p=()=>Ve(e.networkMode)&&e.canRun(),d=b=>{a()||(i==null||i(),n.resolve(b))},g=b=>{a()||(i==null||i(),n.reject(b))},f=()=>new Promise(b=>{var w;i=C=>{(a()||R())&&b(C)},(w=e.onPause)==null||w.call(e)}).then(()=>{var b;i=void 0,a()||(b=e.onContinue)==null||b.call(e)}),E=()=>{if(a())return;let b;const w=s===0?e.initialPromise:void 0;try{b=w??e.fn()}catch(C){b=Promise.reject(C)}Promise.resolve(b).then(d).catch(C=>{var K;if(a())return;const M=e.retry??(kt.isServer()?0:3),P=e.retryDelay??bs,l=typeof P=="function"?P(s,C):P,I=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,C);if(t||!I){g(C);return}s++,(K=e.onFail)==null||K.call(e,s,C),ls(l).then(()=>R()?void 0:f()).then(()=>{t?g(C):E()})})};return{promise:n,status:()=>n.status,cancel:h,continue:()=>(i==null||i(),n),cancelRetry:u,continueRetry:m,canStart:p,start:()=>(p()?E():f().then(E),n)}}var pt,Ue,$e=(Ue=class{constructor(){c(this,pt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ee(this.gcTime)&&o(this,pt,ft.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(kt.isServer()?1/0:300*1e3))}clearGcTimeout(){r(this,pt)!==void 0&&(ft.clearTimeout(r(this,pt)),o(this,pt,void 0))}},pt=new WeakMap,Ue);function gs(e){return{onFetch:(t,s)=>{var p,d,g,f,E;const i=t.options,n=(g=(d=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:d.fetchMore)==null?void 0:g.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],h=((E=t.state.data)==null?void 0:E.pageParams)||[];let u={pages:[],pageParams:[]},m=0;const R=async()=>{let b=!1;const w=P=>{ys(P,()=>t.signal,()=>b=!0)},C=ze(t.options,t.fetchOptions),M=async(P,l,I)=>{if(b)return Promise.reject(t.signal.reason);if(l==null&&P.pages.length)return Promise.resolve(P);const tt=(()=>{const et={client:t.client,queryKey:t.queryKey,pageParam:l,direction:I?"backward":"forward",meta:t.options.meta};return w(et),et})(),O=await C(tt),{maxPages:T}=t.options,j=I?fs:ds;return{pages:j(P.pages,O,T),pageParams:j(P.pageParams,l,T)}};if(n&&a.length){const P=n==="backward",l=P?Ss:Ee,I={pages:a,pageParams:h},K=l(i,I);u=await M(I,K,P)}else{const P=e??a.length;do{const l=m===0?h[0]??i.initialPageParam:Ee(i,u);if(m>0&&l==null)break;u=await M(u,l),m++}while(m<P)}return u};t.options.persister?t.fetchFn=()=>{var b,w;return(w=(b=t.options).persister)==null?void 0:w.call(b,R,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=R}}}function Ee(e,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}function Ss(e,{pages:t,pageParams:s}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,s[0],s):void 0}var Et,mt,Mt,N,vt,D,Lt,bt,L,Je,W,qe,ws=(qe=class extends $e{constructor(t){super();c(this,L);c(this,Et);c(this,mt);c(this,Mt);c(this,N);c(this,vt);c(this,D);c(this,Lt);c(this,bt);o(this,bt,!1),o(this,Lt,t.defaultOptions),this.setOptions(t.options),this.observers=[],o(this,vt,t.client),o(this,N,r(this,vt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,o(this,mt,Qe(this.options)),this.state=t.state??r(this,mt),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return r(this,Et)}get promise(){var t;return(t=r(this,D))==null?void 0:t.promise}setOptions(t){if(this.options={...r(this,Lt),...t},t!=null&&t._type&&o(this,Et,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Qe(this.options);s.data!==void 0&&(this.setState(Me(s.data,s.dataUpdatedAt)),o(this,mt,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&r(this,N).remove(this)}setData(t,s){const i=ie(this.state.data,t,this.options);return y(this,L,W).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t){y(this,L,W).call(this,{type:"setState",state:t})}cancel(t){var i,n;const s=(i=r(this,D))==null?void 0:i.promise;return(n=r(this,D))==null||n.cancel(t),s?s.then(q).catch(q):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return r(this,mt)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>H(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===be||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>dt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ge(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=r(this,D))==null||s.continue()}onOnline(){var s;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=r(this,D))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),r(this,N).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(r(this,D)&&(r(this,bt)||y(this,L,Je).call(this)?r(this,D).cancel({revert:!0}):r(this,D).cancelRetry()),this.scheduleGc()),r(this,N).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||y(this,L,W).call(this,{type:"invalidate"})}async fetch(t,s){var R,p,d,g,f,E,b,w,C,M,P;if(this.state.fetchStatus!=="idle"&&((R=r(this,D))==null?void 0:R.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(r(this,D))return r(this,D).continueRetry(),r(this,D).promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(I=>I.options.queryFn);l&&this.setOptions(l.options)}const i=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(o(this,bt,!0),i.signal)})},a=()=>{const l=ze(this.options,s),K=(()=>{const tt={client:r(this,vt),queryKey:this.queryKey,meta:this.meta};return n(tt),tt})();return o(this,bt,!1),this.options.persister?this.options.persister(l,K,this):l(K)},u=(()=>{const l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:r(this,vt),state:this.state,fetchFn:a};return n(l),l})(),m=r(this,Et)==="infinite"?gs(this.options.pages):this.options.behavior;m==null||m.onFetch(u,this),o(this,Mt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=u.fetchOptions)==null?void 0:p.meta))&&y(this,L,W).call(this,{type:"fetch",meta:(d=u.fetchOptions)==null?void 0:d.meta}),o(this,D,We({initialPromise:s==null?void 0:s.initialPromise,fn:u.fetchFn,onCancel:l=>{l instanceof ne&&l.revert&&this.setState({...r(this,Mt),fetchStatus:"idle"}),i.abort()},onFail:(l,I)=>{y(this,L,W).call(this,{type:"failed",failureCount:l,error:I})},onPause:()=>{y(this,L,W).call(this,{type:"pause"})},onContinue:()=>{y(this,L,W).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const l=await r(this,D).start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),(f=(g=r(this,N).config).onSuccess)==null||f.call(g,l,this),(b=(E=r(this,N).config).onSettled)==null||b.call(E,l,this.state.error,this),l}catch(l){if(l instanceof ne){if(l.silent)return r(this,D).promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw y(this,L,W).call(this,{type:"error",error:l}),(C=(w=r(this,N).config).onError)==null||C.call(w,l,this),(P=(M=r(this,N).config).onSettled)==null||P.call(M,this.state.data,l,this),l}finally{this.scheduleGc()}}},Et=new WeakMap,mt=new WeakMap,Mt=new WeakMap,N=new WeakMap,vt=new WeakMap,D=new WeakMap,Lt=new WeakMap,bt=new WeakMap,L=new WeakSet,Je=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},W=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Ze(i.data,this.options),fetchMeta:t.meta??null};case"success":const n={...i,...Me(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return o(this,Mt,t.manual?n:void 0),n;case"error":const a=t.error;return{...i,error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),Q.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),r(this,N).notify({query:this,type:"updated",action:t})})},qe);function Ze(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ve(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Me(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var _,v,Ht,U,gt,Qt,$,at,Nt,It,Tt,St,wt,ot,Dt,S,Kt,ae,oe,ue,he,ce,le,de,Xe,Ke,Cs=(Ke=class extends qt{constructor(t,s){super();c(this,S);c(this,_);c(this,v);c(this,Ht);c(this,U);c(this,gt);c(this,Qt);c(this,$);c(this,at);c(this,Nt);c(this,It);c(this,Tt);c(this,St);c(this,wt);c(this,ot);c(this,Dt,new Set);this.options=s,o(this,_,t),o(this,at,null),o(this,$,re()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(r(this,v).addObserver(this),Ie(r(this,v),this.options)?y(this,S,Kt).call(this):this.updateResult(),y(this,S,he).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fe(r(this,v),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fe(r(this,v),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,y(this,S,ce).call(this),y(this,S,le).call(this),r(this,v).removeObserver(this)}setOptions(t){const s=this.options,i=r(this,v);if(this.options=r(this,_).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof H(this.options.enabled,r(this,v))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");y(this,S,de).call(this),r(this,v).setOptions(this.options),s._defaulted&&!Xt(this.options,s)&&r(this,_).getQueryCache().notify({type:"observerOptionsUpdated",query:r(this,v),observer:this});const n=this.hasListeners();n&&Te(r(this,v),i,this.options,s)&&y(this,S,Kt).call(this),this.updateResult(),n&&(r(this,v)!==i||H(this.options.enabled,r(this,v))!==H(s.enabled,r(this,v))||dt(this.options.staleTime,r(this,v))!==dt(s.staleTime,r(this,v)))&&y(this,S,ae).call(this);const a=y(this,S,oe).call(this);n&&(r(this,v)!==i||H(this.options.enabled,r(this,v))!==H(s.enabled,r(this,v))||a!==r(this,ot))&&y(this,S,ue).call(this,a)}getOptimisticResult(t){const s=r(this,_).getQueryCache().build(r(this,_),t),i=this.createResult(s,t);return Ps(this,i)&&(o(this,U,i),o(this,Qt,this.options),o(this,gt,r(this,v).state)),i}getCurrentResult(){return r(this,U)}trackResult(t,s){return new Proxy(t,{get:(i,n)=>(this.trackProp(n),s==null||s(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&r(this,$).status==="pending"&&r(this,$).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,n))})}trackProp(t){r(this,Dt).add(t)}getCurrentQuery(){return r(this,v)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=r(this,_).defaultQueryOptions(t),i=r(this,_).getQueryCache().build(r(this,_),s);return i.fetch().then(()=>this.createResult(i,s))}fetch(t){return y(this,S,Kt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),r(this,U)))}createResult(t,s){var T;const i=r(this,v),n=this.options,a=r(this,U),h=r(this,gt),u=r(this,Qt),R=t!==i?t.state:r(this,Ht),{state:p}=t;let d={...p},g=!1,f;if(s._optimisticResults){const j=this.hasListeners(),et=!j&&Ie(t,s),zt=j&&Te(t,i,s,n);(et||zt)&&(d={...d,...Ze(p.data,t.options)}),s._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:b,status:w}=d;f=d.data;let C=!1;if(s.placeholderData!==void 0&&f===void 0&&w==="pending"){let j;a!=null&&a.isPlaceholderData&&s.placeholderData===(u==null?void 0:u.placeholderData)?(j=a.data,C=!0):j=typeof s.placeholderData=="function"?s.placeholderData((T=r(this,Tt))==null?void 0:T.state.data,r(this,Tt)):s.placeholderData,j!==void 0&&(w="success",f=ie(a==null?void 0:a.data,j,s),g=!0)}if(s.select&&f!==void 0&&!C)if(a&&f===(h==null?void 0:h.data)&&s.select===r(this,Nt))f=r(this,It);else try{o(this,Nt,s.select),f=s.select(f),f=ie(a==null?void 0:a.data,f,s),o(this,It,f),o(this,at,null)}catch(j){o(this,at,j)}r(this,at)&&(E=r(this,at),f=r(this,It),b=Date.now(),w="error");const M=d.fetchStatus==="fetching",P=w==="pending",l=w==="error",I=P&&M,K=f!==void 0,O={status:w,fetchStatus:d.fetchStatus,isPending:P,isSuccess:w==="success",isError:l,isInitialLoading:I,isLoading:I,data:f,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:b,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>R.dataUpdateCount||d.errorUpdateCount>R.errorUpdateCount,isFetching:M,isRefetching:M&&!P,isLoadingError:l&&!K,isPaused:d.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:l&&K,isStale:Se(t,s),refetch:this.refetch,promise:r(this,$),isEnabled:H(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=O.data!==void 0,et=O.status==="error"&&!j,zt=Wt=>{et?Wt.reject(O.error):j&&Wt.resolve(O.data)},we=()=>{const Wt=o(this,$,O.promise=re());zt(Wt)},Vt=r(this,$);switch(Vt.status){case"pending":t.queryHash===i.queryHash&&zt(Vt);break;case"fulfilled":(et||O.data!==Vt.value)&&we();break;case"rejected":(!et||O.error!==Vt.reason)&&we();break}}return O}updateResult(){const t=r(this,U),s=this.createResult(r(this,v),this.options);if(o(this,gt,r(this,v).state),o(this,Qt,this.options),r(this,gt).data!==void 0&&o(this,Tt,r(this,v)),Xt(s,t))return;o(this,U,s);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,a=typeof n=="function"?n():n;if(a==="all"||!a&&!r(this,Dt).size)return!0;const h=new Set(a??r(this,Dt));return this.options.throwOnError&&h.add("error"),Object.keys(r(this,U)).some(u=>{const m=u;return r(this,U)[m]!==t[m]&&h.has(m)})};y(this,S,Xe).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&y(this,S,he).call(this)}},_=new WeakMap,v=new WeakMap,Ht=new WeakMap,U=new WeakMap,gt=new WeakMap,Qt=new WeakMap,$=new WeakMap,at=new WeakMap,Nt=new WeakMap,It=new WeakMap,Tt=new WeakMap,St=new WeakMap,wt=new WeakMap,ot=new WeakMap,Dt=new WeakMap,S=new WeakSet,Kt=function(t){y(this,S,de).call(this);let s=r(this,v).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(q)),s},ae=function(){y(this,S,ce).call(this);const t=dt(this.options.staleTime,r(this,v));if(kt.isServer()||r(this,U).isStale||!ee(t))return;const i=Ge(r(this,U).dataUpdatedAt,t)+1;o(this,St,ft.setTimeout(()=>{r(this,U).isStale||this.updateResult()},i))},oe=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(r(this,v)):this.options.refetchInterval)??!1},ue=function(t){y(this,S,le).call(this),o(this,ot,t),!(kt.isServer()||H(this.options.enabled,r(this,v))===!1||!ee(r(this,ot))||r(this,ot)===0)&&o(this,wt,ft.setInterval(()=>{(this.options.refetchIntervalInBackground||me.isFocused())&&y(this,S,Kt).call(this)},r(this,ot)))},he=function(){y(this,S,ae).call(this),y(this,S,ue).call(this,y(this,S,oe).call(this))},ce=function(){r(this,St)!==void 0&&(ft.clearTimeout(r(this,St)),o(this,St,void 0))},le=function(){r(this,wt)!==void 0&&(ft.clearInterval(r(this,wt)),o(this,wt,void 0))},de=function(){const t=r(this,_).getQueryCache().build(r(this,_),this.options);if(t===r(this,v))return;const s=r(this,v);o(this,v,t),o(this,Ht,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Xe=function(t){Q.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(r(this,U))}),r(this,_).getQueryCache().notify({query:r(this,v),type:"observerResultsUpdated"})})},Ke);function Os(e,t){return H(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&H(t.retryOnMount,e)===!1)}function Ie(e,t){return Os(e,t)||e.state.data!==void 0&&fe(e,t,t.refetchOnMount)}function fe(e,t,s){if(H(t.enabled,e)!==!1&&dt(t.staleTime,e)!=="static"){const i=typeof s=="function"?s(e):s;return i==="always"||i!==!1&&Se(e,t)}return!1}function Te(e,t,s,i){return(e!==t||H(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Se(e,s)}function Se(e,t){return H(t.enabled,e)!==!1&&e.isStaleByTime(dt(t.staleTime,e))}function Ps(e,t){return!Xt(e.getCurrentResult(),t)}var Gt,B,A,Ct,z,st,_e,Rs=(_e=class extends $e{constructor(t){super();c(this,z);c(this,Gt);c(this,B);c(this,A);c(this,Ct);o(this,Gt,t.client),this.mutationId=t.mutationId,o(this,A,t.mutationCache),o(this,B,[]),this.state=t.state||Ye(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){r(this,B).includes(t)||(r(this,B).push(t),this.clearGcTimeout(),r(this,A).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){o(this,B,r(this,B).filter(s=>s!==t)),this.scheduleGc(),r(this,A).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){r(this,B).length||(this.state.status==="pending"?this.scheduleGc():r(this,A).remove(this))}continue(){var t;return((t=r(this,Ct))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var h,u,m,R,p,d,g,f,E,b,w,C,M,P,l,I,K,tt;const s=()=>{y(this,z,st).call(this,{type:"continue"})},i={client:r(this,Gt),meta:this.options.meta,mutationKey:this.options.mutationKey};o(this,Ct,We({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(O,T)=>{y(this,z,st).call(this,{type:"failed",failureCount:O,error:T})},onPause:()=>{y(this,z,st).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r(this,A).canRun(this)}));const n=this.state.status==="pending",a=!r(this,Ct).canStart();try{if(n)s();else{y(this,z,st).call(this,{type:"pending",variables:t,isPaused:a}),r(this,A).config.onMutate&&await r(this,A).config.onMutate(t,this,i);const T=await((u=(h=this.options).onMutate)==null?void 0:u.call(h,t,i));T!==this.state.context&&y(this,z,st).call(this,{type:"pending",context:T,variables:t,isPaused:a})}const O=await r(this,Ct).start();return await((R=(m=r(this,A).config).onSuccess)==null?void 0:R.call(m,O,t,this.state.context,this,i)),await((d=(p=this.options).onSuccess)==null?void 0:d.call(p,O,t,this.state.context,i)),await((f=(g=r(this,A).config).onSettled)==null?void 0:f.call(g,O,null,this.state.variables,this.state.context,this,i)),await((b=(E=this.options).onSettled)==null?void 0:b.call(E,O,null,t,this.state.context,i)),y(this,z,st).call(this,{type:"success",data:O}),O}catch(O){try{await((C=(w=r(this,A).config).onError)==null?void 0:C.call(w,O,t,this.state.context,this,i))}catch(T){Promise.reject(T)}try{await((P=(M=this.options).onError)==null?void 0:P.call(M,O,t,this.state.context,i))}catch(T){Promise.reject(T)}try{await((I=(l=r(this,A).config).onSettled)==null?void 0:I.call(l,void 0,O,this.state.variables,this.state.context,this,i))}catch(T){Promise.reject(T)}try{await((tt=(K=this.options).onSettled)==null?void 0:tt.call(K,void 0,O,t,this.state.context,i))}catch(T){Promise.reject(T)}throw y(this,z,st).call(this,{type:"error",error:O}),O}finally{r(this,A).runNext(this)}}},Gt=new WeakMap,B=new WeakMap,A=new WeakMap,Ct=new WeakMap,z=new WeakSet,st=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Q.batch(()=>{r(this,B).forEach(i=>{i.onMutationUpdate(t)}),r(this,A).notify({mutation:this,type:"updated",action:t})})},_e);function Ye(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var J,G,Bt,ke,Fs=(ke=class extends qt{constructor(t={}){super();c(this,J);c(this,G);c(this,Bt);this.config=t,o(this,J,new Set),o(this,G,new Map),o(this,Bt,0)}build(t,s,i){const n=new Rs({client:t,mutationCache:this,mutationId:++$t(this,Bt)._,options:t.defaultMutationOptions(s),state:i});return this.add(n),n}add(t){r(this,J).add(t);const s=Jt(t);if(typeof s=="string"){const i=r(this,G).get(s);i?i.push(t):r(this,G).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(r(this,J).delete(t)){const s=Jt(t);if(typeof s=="string"){const i=r(this,G).get(s);if(i)if(i.length>1){const n=i.indexOf(t);n!==-1&&i.splice(n,1)}else i[0]===t&&r(this,G).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Jt(t);if(typeof s=="string"){const i=r(this,G).get(s),n=i==null?void 0:i.find(a=>a.state.status==="pending");return!n||n===t}else return!0}runNext(t){var i;const s=Jt(t);if(typeof s=="string"){const n=(i=r(this,G).get(s))==null?void 0:i.find(a=>a!==t&&a.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Q.batch(()=>{r(this,J).forEach(t=>{this.notify({type:"removed",mutation:t})}),r(this,J).clear(),r(this,G).clear()})}getAll(){return Array.from(r(this,J))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Pe(s,i))}findAll(t={}){return this.getAll().filter(s=>Pe(t,s))}notify(t){Q.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return Q.batch(()=>Promise.all(t.map(s=>s.continue().catch(q))))}},J=new WeakMap,G=new WeakMap,Bt=new WeakMap,ke);function Jt(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Z,ut,k,X,Y,Zt,ye,Le,Es=(Le=class extends qt{constructor(t,s){super();c(this,Y);c(this,Z);c(this,ut);c(this,k);c(this,X);o(this,Z,t),this.setOptions(s),this.bindMethods(),y(this,Y,Zt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const s=this.options;this.options=r(this,Z).defaultMutationOptions(t),Xt(this.options,s)||r(this,Z).getMutationCache().notify({type:"observerOptionsUpdated",mutation:r(this,k),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Ot(s.mutationKey)!==Ot(this.options.mutationKey)?this.reset():((i=r(this,k))==null?void 0:i.state.status)==="pending"&&r(this,k).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=r(this,k))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,Y,Zt).call(this),y(this,Y,ye).call(this,t)}getCurrentResult(){return r(this,ut)}reset(){var t;(t=r(this,k))==null||t.removeObserver(this),o(this,k,void 0),y(this,Y,Zt).call(this),y(this,Y,ye).call(this)}mutate(t,s){var i;return o(this,X,s),(i=r(this,k))==null||i.removeObserver(this),o(this,k,r(this,Z).getMutationCache().build(r(this,Z),this.options)),r(this,k).addObserver(this),r(this,k).execute(t)}},Z=new WeakMap,ut=new WeakMap,k=new WeakMap,X=new WeakMap,Y=new WeakSet,Zt=function(){var s;const t=((s=r(this,k))==null?void 0:s.state)??Ye();o(this,ut,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ye=function(t){Q.batch(()=>{var s,i,n,a,h,u,m,R;if(r(this,X)&&this.hasListeners()){const p=r(this,ut).variables,d=r(this,ut).context,g={client:r(this,Z),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(i=(s=r(this,X)).onSuccess)==null||i.call(s,t.data,p,d,g)}catch(f){Promise.reject(f)}try{(a=(n=r(this,X)).onSettled)==null||a.call(n,t.data,null,p,d,g)}catch(f){Promise.reject(f)}}else if((t==null?void 0:t.type)==="error"){try{(u=(h=r(this,X)).onError)==null||u.call(h,t.error,p,d,g)}catch(f){Promise.reject(f)}try{(R=(m=r(this,X)).onSettled)==null||R.call(m,void 0,t.error,p,d,g)}catch(f){Promise.reject(f)}}}this.listeners.forEach(p=>{p(r(this,ut))})})},Le),V,He,Ms=(He=class extends qt{constructor(t={}){super();c(this,V);this.config=t,o(this,V,new Map)}build(t,s,i){const n=s.queryKey,a=s.queryHash??ve(n,s);let h=this.get(a);return h||(h=new ws({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(n)}),this.add(h)),h}add(t){r(this,V).has(t.queryHash)||(r(this,V).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=r(this,V).get(t.queryHash);s&&(t.destroy(),s===t&&r(this,V).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Q.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return r(this,V).get(t)}getAll(){return[...r(this,V).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Oe(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>Oe(t,i)):s}notify(t){Q.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){Q.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Q.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},V=new WeakMap,He),F,ht,ct,xt,At,lt,jt,Ut,Ne,Hs=(Ne=class{constructor(e={}){c(this,F);c(this,ht);c(this,ct);c(this,xt);c(this,At);c(this,lt);c(this,jt);c(this,Ut);o(this,F,e.queryCache||new Ms),o(this,ht,e.mutationCache||new Fs),o(this,ct,e.defaultOptions||{}),o(this,xt,new Map),o(this,At,new Map),o(this,lt,0)}mount(){$t(this,lt)._++,r(this,lt)===1&&(o(this,jt,me.subscribe(async e=>{e&&(await this.resumePausedMutations(),r(this,F).onFocus())})),o(this,Ut,Yt.subscribe(async e=>{e&&(await this.resumePausedMutations(),r(this,F).onOnline())})))}unmount(){var e,t;$t(this,lt)._--,r(this,lt)===0&&((e=r(this,jt))==null||e.call(this),o(this,jt,void 0),(t=r(this,Ut))==null||t.call(this),o(this,Ut,void 0))}isFetching(e){return r(this,F).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return r(this,ht).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=r(this,F).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=r(this,F).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(dt(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return r(this,F).findAll(e).map(({queryKey:t,state:s})=>{const i=s.data;return[t,i]})}setQueryData(e,t,s){const i=this.defaultQueryOptions({queryKey:e}),n=r(this,F).get(i.queryHash),a=n==null?void 0:n.state.data,h=hs(t,a);if(h!==void 0)return r(this,F).build(this,i).setData(h,{...s,manual:!0})}setQueriesData(e,t,s){return Q.batch(()=>r(this,F).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=r(this,F).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=r(this,F);Q.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=r(this,F);return Q.batch(()=>(s.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},i=Q.batch(()=>r(this,F).findAll(e).map(n=>n.cancel(s)));return Promise.all(i).then(q).catch(q)}invalidateQueries(e,t={}){return Q.batch(()=>(r(this,F).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=Q.batch(()=>r(this,F).findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let a=n.fetch(void 0,s);return s.throwOnError||(a=a.catch(q)),n.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(q)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=r(this,F).build(this,t);return s.isStaleByTime(dt(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(q).catch(q)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(q).catch(q)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Yt.isOnline()?r(this,ht).resumePausedMutations():Promise.resolve()}getQueryCache(){return r(this,F)}getMutationCache(){return r(this,ht)}getDefaultOptions(){return r(this,ct)}setDefaultOptions(e){o(this,ct,e)}setQueryDefaults(e,t){r(this,xt).set(Ot(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...r(this,xt).values()],s={};return t.forEach(i=>{_t(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,t){r(this,At).set(Ot(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...r(this,At).values()],s={};return t.forEach(i=>{_t(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...r(this,ct).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ve(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===be&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...r(this,ct).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){r(this,F).clear(),r(this,ht).clear()}},F=new WeakMap,ht=new WeakMap,ct=new WeakMap,xt=new WeakMap,At=new WeakMap,lt=new WeakMap,jt=new WeakMap,Ut=new WeakMap,Ne),ts=x.createContext(void 0),es=e=>{const t=x.useContext(ts);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ns=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),is.jsx(ts.Provider,{value:e,children:t})),ss=x.createContext(!1),Qs=()=>x.useContext(ss);ss.Provider;function Is(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ts=x.createContext(Is()),Ds=()=>x.useContext(Ts),xs=(e,t,s)=>{const i=s!=null&&s.state.error&&typeof e.throwOnError=="function"?ge(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},As=e=>{x.useEffect(()=>{e.clearReset()},[e])},js=({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(n&&e.data===void 0||ge(s,[e.error,i])),Us=e=>{if(e.suspense){const s=n=>n==="static"?n:Math.max(n??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...n)=>s(i(...n)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},qs=(e,t)=>e.isLoading&&e.isFetching&&!t,Ks=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,De=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function _s(e,t,s){var f,E,b,w;const i=Qs(),n=Ds(),a=es(),h=a.defaultQueryOptions(e);(E=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||E.call(f,h);const u=a.getQueryCache().get(h.queryHash),m=e.subscribed!==!1;h._optimisticResults=i?"isRestoring":m?"optimistic":void 0,Us(h),xs(h,n,u),As(n);const R=!a.getQueryCache().get(h.queryHash),[p]=x.useState(()=>new t(a,h)),d=p.getOptimisticResult(h),g=!i&&m;if(x.useSyncExternalStore(x.useCallback(C=>{const M=g?p.subscribe(Q.batchCalls(C)):q;return p.updateResult(),M},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),x.useEffect(()=>{p.setOptions(h)},[h,p]),Ks(h,d))throw De(h,p,n);if(js({result:d,errorResetBoundary:n,throwOnError:h.throwOnError,query:u,suspense:h.suspense}))throw d.error;if((w=(b=a.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,h,d),h.experimental_prefetchInRender&&!kt.isServer()&&qs(d,i)){const C=R?De(h,p,n):u==null?void 0:u.promise;C==null||C.catch(q).finally(()=>{p.updateResult()})}return h.notifyOnChangeProps?d:p.trackResult(d)}function Gs(e,t){return _s(e,Cs)}function Bs(e,t){const s=es(),[i]=x.useState(()=>new Es(s,e));x.useEffect(()=>{i.setOptions(e)},[i,e]);const n=x.useSyncExternalStore(x.useCallback(h=>i.subscribe(Q.batchCalls(h)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=x.useCallback((h,u)=>{i.mutate(h,u).catch(q)},[i]);if(n.error&&ge(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}export{Hs as Q,es as a,Bs as b,Ns as c,Gs as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,R as De,j as d,a as Me}from"./vendor-react-BRGuIgbw.js";import{u as Ko,o as Go,s as zo,f as Yo,a as Xo,b as Zo,h as qo,c as Jo,l as Qo,d as ot,R as nt}from"./vendor-B7fc3-WT.js";function ht(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function en(...e){return t=>{let o=!1;const n=e.map(r=>{const i=ht(r,t);return!o&&typeof i=="function"&&(o=!0),i});if(o)return()=>{for(let r=0;r<n.length;r++){const i=n[r];typeof i=="function"?i():ht(e[r],null)}}}}function M(...e){return s.useCallback(en(...e),e)}function pe(e){const t=s.forwardRef((o,n)=>{let{children:r,...i}=o,a=null,c=!1;const l=[];gt(r)&&typeof _e=="function"&&(r=_e(r._payload)),s.Children.forEach(r,g=>{var y;if(sn(g)){c=!0;const S=g;let m="child"in S.props?S.props.child:S.props.children;gt(m)&&typeof _e=="function"&&(m=_e(m._payload)),a=on(S,m),l.push((y=a==null?void 0:a.props)==null?void 0:y.children)}else l.push(g)}),a?a=s.cloneElement(a,void 0,l):!c&&s.Children.count(r)===1&&s.isValidElement(r)&&(a=r);const f=a?rn(a):void 0,u=M(n,f);if(!a){if(r||r===0)throw new Error(c?un(e):ln(e));return r}const p=nn(i,a.props??{});return a.type!==s.Fragment&&(p.ref=n?u:f),s.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}var Ps=pe("Slot"),tn=Symbol.for("radix.slottable"),on=(e,t)=>{if("child"in e.props){const o=e.props.child;return s.isValidElement(o)?s.cloneElement(o,void 0,e.props.children(o.props.children)):null}return s.isValidElement(t)?t:null};function nn(e,t){const o={...t};for(const n in t){const r=e[n],i=t[n];/^on[A-Z]/.test(n)?r&&i?o[n]=(...c)=>{const l=i(...c);return r(...c),l}:r&&(o[n]=r):n==="style"?o[n]={...r,...i}:n==="className"&&(o[n]=[r,i].filter(Boolean).join(" "))}return{...e,...o}}function rn(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function sn(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tn}var an=Symbol.for("react.lazy");function gt(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===an&&"_payload"in e&&cn(e._payload)}function cn(e){return typeof e=="object"&&e!==null&&"then"in e}var ln=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,un=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,_e=De[" use ".trim().toString()];function xt(e,[t,o]){return Math.min(o,Math.max(t,e))}function P(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e==null||e(r),o===!1||!r||!r.defaultPrevented)return t==null?void 0:t(r)}}function ve(e,t=[]){let o=[];function n(i,a){const c=s.createContext(a);c.displayName=i+"Context";const l=o.length;o=[...o,a];const f=p=>{var h;const{scope:g,children:y,...S}=p,m=((h=g==null?void 0:g[e])==null?void 0:h[l])||c,x=s.useMemo(()=>S,Object.values(S));return d.jsx(m.Provider,{value:x,children:y})};f.displayName=i+"Provider";function u(p,g,y={}){var h;const{optional:S=!1}=y,m=((h=g==null?void 0:g[e])==null?void 0:h[l])||c,x=s.useContext(m);if(x)return x;if(a!==void 0)return a;if(!S)throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,u]}const r=()=>{const i=o.map(a=>s.createContext(a));return function(c){const l=(c==null?void 0:c[e])||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[n,dn(r,...t)]}function dn(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const n=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=n.reduce((c,{useScope:l,scopeName:f})=>{const p=l(i)[`__scope${f}`];return{...c,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return o.scopeName=t.scopeName,o}function It(e){const t=e+"CollectionProvider",[o,n]=ve(t),[r,i]=o(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:x,children:h}=m,C=s.useRef(null),v=s.useRef(new Map).current;return d.jsx(r,{scope:x,itemMap:v,collectionRef:C,children:h})};a.displayName=t;const c=e+"CollectionSlot",l=pe(c),f=s.forwardRef((m,x)=>{const{scope:h,children:C}=m,v=i(c,h),w=M(x,v.collectionRef);return d.jsx(l,{ref:w,children:C})});f.displayName=c;const u=e+"CollectionItemSlot",p="data-radix-collection-item",g=pe(u),y=s.forwardRef((m,x)=>{const{scope:h,children:C,...v}=m,w=s.useRef(null),E=M(x,w),N=i(u,h);return s.useEffect(()=>(N.itemMap.set(w,{ref:w,...v}),()=>void N.itemMap.delete(w))),d.jsx(g,{[p]:"",ref:E,children:C})});y.displayName=u;function S(m){const x=i(e+"CollectionConsumer",m);return s.useCallback(()=>{const C=x.collectionRef.current;if(!C)return[];const v=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((N,F)=>v.indexOf(N.ref.current)-v.indexOf(F.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:f,ItemSlot:y},S,n]}var fn=s.createContext(void 0);function rt(e){const t=s.useContext(fn);return e||t||"ltr"}var pn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=pn.reduce((e,t)=>{const o=pe(`Primitive.${t}`),n=s.forwardRef((r,i)=>{const{asChild:a,...c}=r,l=a?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...c,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mn(e,t){e&&Me.flushSync(()=>e.dispatchEvent(t))}function ne(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>((...o)=>{var n;return(n=t.current)==null?void 0:n.call(t,...o)}),[])}var vn="DismissableLayer",Ze="dismissableLayer.update",hn="dismissableLayer.pointerDownOutside",gn="dismissableLayer.focusOutside",yt,st=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Fe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:l,...f}=e,u=s.useContext(st),[p,g]=s.useState(null),y=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=s.useState({}),m=M(t,g),x=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),C=h?x.indexOf(h):-1,v=p?x.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=v>=C,N=s.useRef(!1),F=wn(R=>{i==null||i(R),c==null||c(R),R.defaultPrevented||l==null||l()},{ownerDocument:y,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:N,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:s.useCallback(R=>{if(!(R instanceof Node))return!1;const L=[...u.branches].some(k=>k.contains(R));return E&&!L},[u.branches,E])}),_=En(R=>{if(n&&N.current)return;const L=R.target;[...u.branches].some(z=>z.contains(L))||(a==null||a(R),c==null||c(R),R.defaultPrevented||l==null||l())},y),G=p?v===x.length-1:!1,B=ne(R=>{R.key==="Escape"&&(r==null||r(R),!R.defaultPrevented&&l&&(R.preventDefault(),l()))});return s.useEffect(()=>{if(G)return y.addEventListener("keydown",B,{capture:!0}),()=>y.removeEventListener("keydown",B,{capture:!0})},[y,G,B]),s.useEffect(()=>{if(p)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(yt=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),St(),()=>{o&&(u.layersWithOutsidePointerEventsDisabled.delete(p),u.layersWithOutsidePointerEventsDisabled.size===0&&(y.body.style.pointerEvents=yt))}},[p,y,o,u]),s.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),St())},[p,u]),s.useEffect(()=>{const R=()=>S({});return document.addEventListener(Ze,R),()=>document.removeEventListener(Ze,R)},[]),d.jsx(I.div,{...f,ref:m,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,_.onFocusCapture),onBlurCapture:P(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,F.onPointerDownCapture)})});Fe.displayName=vn;var xn="DismissableLayerBranch",yn=s.forwardRef((e,t)=>{const o=s.useContext(st),n=s.useRef(null),r=M(t,n);return s.useEffect(()=>{const i=n.current;if(i)return o.branches.add(i),()=>{o.branches.delete(i)}},[o.branches]),d.jsx(I.div,{...e,ref:r})});yn.displayName=xn;function Sn(){const e=s.useContext(st),[t,o]=s.useState(null);return s.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),o}var Cn=()=>!0;function wn(e,t){const{ownerDocument:o=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:i,shouldHandlePointerDownOutside:a=Cn}=t,c=ne(e),l=s.useRef(!1),f=s.useRef(!1),u=s.useRef(new Map),p=s.useRef(()=>{});return s.useEffect(()=>{function g(){f.current=!1,r.current=!1,u.current.clear()}function y(){return Array.from(u.current.values()).some(Boolean)}function S(v){if(!f.current)return;const w=v.target;w instanceof Node&&[...i].some(N=>N.contains(w))||u.current.set(v.type,!0),v.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function m(v){f.current&&u.current.set(v.type,!1)}const x=v=>{if(v.target&&!l.current){let w=function(){o.removeEventListener("click",p.current);const N=y();g(),N||Tt(hn,c,E,{discrete:!0})};if(!a(v.target)){o.removeEventListener("click",p.current),g(),l.current=!1;return}const E={originalEvent:v};f.current=!0,r.current=n&&v.button===0,u.current.clear(),!n||v.button!==0?w():(o.removeEventListener("click",p.current),p.current=w,o.addEventListener("click",p.current,{once:!0}))}else o.removeEventListener("click",p.current),g();l.current=!1},h=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const v of h)o.addEventListener(v,S,!0),o.addEventListener(v,m);const C=window.setTimeout(()=>{o.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(C),o.removeEventListener("pointerdown",x),o.removeEventListener("click",p.current);for(const v of h)o.removeEventListener(v,S,!0),o.removeEventListener(v,m)}},[o,c,n,r,i,a]),{onPointerDownCapture:()=>l.current=!0}}function En(e,t=globalThis==null?void 0:globalThis.document){const o=ne(e),n=s.useRef(!1);return s.useEffect(()=>{const r=i=>{i.target&&!n.current&&Tt(gn,o,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,o]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function St(){const e=new CustomEvent(Ze);document.dispatchEvent(e)}function Tt(e,t,o,{discrete:n}){const r=o.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&r.addEventListener(e,t,{once:!0}),n?mn(r,i):r.dispatchEvent(i)}var Ne=0,oe=null;function it(){s.useEffect(()=>{oe||(oe={start:Ct(),end:Ct()});const{start:e,end:t}=oe;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ne++,()=>{Ne===1&&(oe==null||oe.start.remove(),oe==null||oe.end.remove(),oe=null),Ne=Math.max(0,Ne-1)}},[])}function Ct(){const 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}var Ge="focusScope.autoFocusOnMount",ze="focusScope.autoFocusOnUnmount",wt={bubbles:!1,cancelable:!0},bn="FocusScope",je=s.forwardRef((e,t)=>{const{loop:o=!1,trapped:n=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[c,l]=s.useState(null),f=ne(r),u=ne(i),p=s.useRef(null),g=M(t,l),y=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(n){let m=function(v){if(y.paused||!c)return;const w=v.target;c.contains(w)?p.current=w:ie(p.current,{select:!0})},x=function(v){if(y.paused||!c)return;const w=v.relatedTarget;w!==null&&(c.contains(w)||ie(p.current,{select:!0}))},h=function(v){if(document.activeElement===document.body)for(const E of v)E.removedNodes.length>0&&ie(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const C=new MutationObserver(h);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),C.disconnect()}}},[n,c,y.paused]),s.useEffect(()=>{if(c){bt.add(y);const m=document.activeElement;if(!c.contains(m)){const h=new CustomEvent(Ge,wt);c.addEventListener(Ge,f),c.dispatchEvent(h),h.defaultPrevented||(Pn(Nn(_t(c)),{select:!0}),document.activeElement===m&&ie(c))}return()=>{c.removeEventListener(Ge,f),setTimeout(()=>{const h=new CustomEvent(ze,wt);c.addEventListener(ze,u),c.dispatchEvent(h),h.defaultPrevented||ie(m??document.body,{select:!0}),c.removeEventListener(ze,u),bt.remove(y)},0)}}},[c,f,u,y]);const S=s.useCallback(m=>{if(!o&&!n||y.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,h=document.activeElement;if(x&&h){const C=m.currentTarget,[v,w]=Rn(C);v&&w?!m.shiftKey&&h===w?(m.preventDefault(),o&&ie(v,{select:!0})):m.shiftKey&&h===v&&(m.preventDefault(),o&&ie(w,{select:!0})):h===C&&m.preventDefault()}},[o,n,y.paused]);return d.jsx(I.div,{tabIndex:-1,...a,ref:g,onKeyDown:S})});je.displayName=bn;function Pn(e,{select:t=!1}={}){const o=document.activeElement;for(const n of e)if(ie(n,{select:t}),document.activeElement!==o)return}function Rn(e){const t=_t(e),o=Et(t,e),n=Et(t.reverse(),e);return[o,n]}function _t(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const r=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||r?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function Et(e,t){const o=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const n of e)if(!(o?!n.checkVisibility({checkVisibilityCSS:!0}):In(n,{upTo:t})))return n}function In(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}function Tn(e){return e instanceof HTMLInputElement&&"select"in e}function ie(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Tn(e)&&t&&e.select()}}var bt=_n();function _n(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=Pt(e,t),e.unshift(t)},remove(t){var o;e=Pt(e,t),(o=e[0])==null||o.resume()}}}function Pt(e,t){const o=[...e],n=o.indexOf(t);return n!==-1&&o.splice(n,1),o}function Nn(e){return e.filter(t=>t.tagName!=="A")}var V=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},An=De[" useId ".trim().toString()]||(()=>{}),On=0;function re(e){const[t,o]=s.useState(An());return V(()=>{o(n=>n??String(On++))},[e]),t?`radix-${t}`:""}var Dn="Arrow",Nt=s.forwardRef((e,t)=>{const{children:o,width:n=10,height:r=5,...i}=e;return d.jsx(I.svg,{...i,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nt.displayName=Dn;var Mn=Nt;function Fn(e){const[t,o]=s.useState(void 0);return V(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,c;if("borderBoxSize"in i){const l=i.borderBoxSize,f=Array.isArray(l)?l[0]:l;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;o({width:a,height:c})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else o(void 0)},[e]),t}var at="Popper",[At,Le]=ve(at),[jn,Ot]=At(at),Dt=e=>{const{__scopePopper:t,children:o}=e,[n,r]=s.useState(null),[i,a]=s.useState(void 0);return d.jsx(jn,{scope:t,anchor:n,onAnchorChange:r,placementState:i,setPlacementState:a,children:o})};Dt.displayName=at;var Mt="PopperAnchor",Ft=s.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:n,...r}=e,i=Ot(Mt,o),a=s.useRef(null),c=i.onAnchorChange,l=s.useCallback(S=>{a.current=S,S&&c(S)},[c]),f=M(t,l),u=s.useRef(null);s.useEffect(()=>{if(!n)return;const S=u.current;u.current=n.current,S!==u.current&&c(u.current)});const p=i.placementState&<(i.placementState),g=p==null?void 0:p[0],y=p==null?void 0:p[1];return n?null:d.jsx(I.div,{"data-radix-popper-side":g,"data-radix-popper-align":y,...r,ref:f})});Ft.displayName=Mt;var ct="PopperContent",[Ln,kn]=At(ct),jt=s.forwardRef((e,t)=>{var D,U,O,T,A,te;const{__scopePopper:o,side:n="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:S,...m}=e,x=Ot(ct,o),[h,C]=s.useState(null),v=M(t,C),[w,E]=s.useState(null),N=Fn(w),F=(N==null?void 0:N.width)??0,_=(N==null?void 0:N.height)??0,G=n+(i!=="center"?"-"+i:""),B=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},R=Array.isArray(f)?f:[f],L=R.length>0,k={padding:B,boundary:R.filter(Vn),altBoundary:L},{refs:z,floatingStyles:H,placement:j,isPositioned:Y,middlewareData:W}=Ko({strategy:"fixed",placement:G,whileElementsMounted:(...q)=>Jo(...q,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[Go({mainAxis:r+_,alignmentAxis:a}),l&&zo({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Qo():void 0,...k}),l&&Yo({...k}),Xo({...k,apply:({elements:q,rects:xe,availableWidth:we,availableHeight:Ee})=>{const{width:Ho,height:Wo}=xe.reference,Te=q.floating.style;Te.setProperty("--radix-popper-available-width",`${we}px`),Te.setProperty("--radix-popper-available-height",`${Ee}px`),Te.setProperty("--radix-popper-anchor-width",`${Ho}px`),Te.setProperty("--radix-popper-anchor-height",`${Wo}px`)}}),w&&Zo({element:w,padding:c}),Bn({arrowWidth:F,arrowHeight:_}),g&&qo({strategy:"referenceHidden",...k,boundary:L?k.boundary:void 0})]}),K=x.setPlacementState;V(()=>(K(j),()=>{K(void 0)}),[j,K]);const[se,ee]=lt(j),$=ne(S);V(()=>{Y&&($==null||$())},[Y,$]);const X=(D=W.arrow)==null?void 0:D.x,Z=(U=W.arrow)==null?void 0:U.y,ge=((O=W.arrow)==null?void 0:O.centerOffset)!==0,[fe,b]=s.useState();return V(()=>{h&&b(window.getComputedStyle(h).zIndex)},[h]),d.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:Y?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(T=W.transformOrigin)==null?void 0:T.x,(A=W.transformOrigin)==null?void 0:A.y].join(" "),...((te=W.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Ln,{scope:o,placedSide:se,placedAlign:ee,onArrowChange:E,arrowX:X,arrowY:Z,shouldHideArrow:ge,children:d.jsx(I.div,{"data-side":se,"data-align":ee,...m,ref:v,style:{...m.style,animation:Y?void 0:"none"}})})})});jt.displayName=ct;var Lt="PopperArrow",$n={top:"bottom",right:"left",bottom:"top",left:"right"},kt=s.forwardRef(function(t,o){const{__scopePopper:n,...r}=t,i=kn(Lt,n),a=$n[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(Mn,{...r,ref:o,style:{...r.style,display:"block"}})})});kt.displayName=Lt;function Vn(e){return e!==null}var Bn=e=>({name:"transformOrigin",options:e,fn(t){var x,h,C;const{placement:o,rects:n,middlewareData:r}=t,a=((x=r.arrow)==null?void 0:x.centerOffset)!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[f,u]=lt(o),p={start:"0%",center:"50%",end:"100%"}[u],g=(((h=r.arrow)==null?void 0:h.x)??0)+c/2,y=(((C=r.arrow)==null?void 0:C.y)??0)+l/2;let S="",m="";return f==="bottom"?(S=a?p:`${g}px`,m=`${-l}px`):f==="top"?(S=a?p:`${g}px`,m=`${n.floating.height+l}px`):f==="right"?(S=`${-l}px`,m=a?p:`${y}px`):f==="left"&&(S=`${n.floating.width+l}px`,m=a?p:`${y}px`),{data:{x:S,y:m}}}});function lt(e){const[t,o="center"]=e.split("-");return[t,o]}var $t=Dt,ut=Ft,Vt=jt,Bt=kt,Un="Portal",ke=s.forwardRef((e,t)=>{var c;const{container:o,...n}=e,[r,i]=s.useState(!1);V(()=>i(!0),[]);const a=o||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Me.createPortal(d.jsx(I.div,{...n,ref:t}),a):null});ke.displayName=Un;function Hn(e,t){return s.useReducer((o,n)=>t[o][n]??o,e)}var ce=e=>{const{present:t,children:o}=e,n=Wn(t),r=typeof o=="function"?o({present:n.isPresent}):s.Children.only(o),i=Kn(n.ref,Gn(r));return typeof o=="function"||n.isPresent?s.cloneElement(r,{ref:i}):null};ce.displayName="Presence";function Wn(e){const[t,o]=s.useState(),n=s.useRef(null),r=s.useRef(e),i=s.useRef("none"),a=s.useRef(void 0),c=e?"mounted":"unmounted",[l,f]=Hn(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{l==="mounted"?(i.current=a.current??be(n.current),a.current=void 0):i.current="none"},[l]),V(()=>{const u=n.current,p=r.current;if(p!==e){const y=i.current,S=be(u);e?(a.current=S,f("MOUNT")):S==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(p&&y!==S?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,f]),V(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,g=S=>{const x=be(n.current).includes(CSS.escape(S.animationName));if(S.target===t&&x&&(f("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},y=S=>{S.target===t&&(i.current=be(n.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback(u=>{if(u){const p=getComputedStyle(u);n.current=p,a.current=be(p)}else n.current=null;o(u)},[])}}function Rt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kn(...e){const t=s.useRef(e);return t.current=e,s.useCallback(o=>{const n=t.current;let r=!1;const i=n.map(a=>{const c=Rt(a,o);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let a=0;a<i.length;a++){const c=i[a];typeof c=="function"?c():Rt(n[a],null)}}},[])}function be(e){return(e==null?void 0:e.animationName)||"none"}function Gn(e){var n,r;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var zn=De[" useInsertionEffect ".trim().toString()]||V;function ye({prop:e,defaultProp:t,onChange:o=()=>{},caller:n}){const[r,i,a]=Yn({defaultProp:t,onChange:o}),c=e!==void 0,l=c?e:r;{const u=s.useRef(e!==void 0);s.useEffect(()=>{const p=u.current;p!==c&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${c?"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.`),u.current=c},[c,n])}const f=s.useCallback(u=>{var p;if(c){const g=Xn(u)?u(e):u;g!==e&&((p=a.current)==null||p.call(a,g))}else i(u)},[c,e,i,a]);return[l,f]}function Yn({defaultProp:e,onChange:t}){const[o,n]=s.useState(e),r=s.useRef(o),i=s.useRef(t);return zn(()=>{i.current=t},[t]),s.useEffect(()=>{var a;r.current!==o&&((a=i.current)==null||a.call(i,o),r.current=o)},[o,r]),[o,n,i]}function Xn(e){return typeof e=="function"}function Zn(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ut=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"}),qn="VisuallyHidden",Jn=s.forwardRef((e,t)=>d.jsx(I.span,{...e,ref:t,style:{...Ut,...e.style}}));Jn.displayName=qn;var Qn=[" ","Enter","ArrowUp","ArrowDown"],er=[" ","Enter"],me="Select",[$e,Ve,tr]=It(me),[he]=ve(me,[tr,Le]),Be=Le(),[or,le]=he(me),[nr,rr]=he(me),sr="SelectProvider";function Ht(e){const{__scopeSelect:t,children:o,open:n,defaultOpen:r,onOpenChange:i,value:a,defaultValue:c,onValueChange:l,dir:f,name:u,autoComplete:p,disabled:g,required:y,form:S,internal_do_not_use_render:m}=e,x=Be(t),[h,C]=s.useState(null),[v,w]=s.useState(null),[E,N]=s.useState(!1),F=rt(f),[_,G]=ye({prop:n,defaultProp:r??!1,onChange:i,caller:me}),[B,R]=ye({prop:a,defaultProp:c,onChange:l,caller:me}),L=s.useRef(null),k=s.useRef(B);s.useEffect(()=>{const $=S?h==null?void 0:h.ownerDocument.getElementById(S):h==null?void 0:h.form;if($ instanceof HTMLFormElement){const X=()=>R(k.current);return $.addEventListener("reset",X),()=>$.removeEventListener("reset",X)}},[S,h,R]);const z=h?!!S||!!h.closest("form"):!0,[H,j]=s.useState(new Set),Y=re(),W=Array.from(H).map($=>$.props.value).join(";"),K=s.useCallback($=>{j(X=>new Set(X).add($))},[]),se=s.useCallback($=>{j(X=>{const Z=new Set(X);return Z.delete($),Z})},[]),ee={required:y,trigger:h,onTriggerChange:C,valueNode:v,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:N,contentId:Y,value:B,onValueChange:R,open:_,onOpenChange:G,dir:F,triggerPointerDownPosRef:L,disabled:g,name:u,autoComplete:p,form:S,nativeOptions:H,nativeSelectKey:W,isFormControl:z};return d.jsx($t,{...x,children:d.jsx(or,{scope:t,...ee,children:d.jsx($e.Provider,{scope:t,children:d.jsx(nr,{scope:t,onNativeOptionAdd:K,onNativeOptionRemove:se,children:Mr(m)?m(ee):o})})})})}Ht.displayName=sr;var ir=e=>{const{__scopeSelect:t,children:o,...n}=e;return d.jsx(Ht,{__scopeSelect:t,...n,internal_do_not_use_render:({isFormControl:r})=>d.jsxs(d.Fragment,{children:[o,r?d.jsx(ro,{__scopeSelect:t}):null]})})};ir.displayName=me;var Wt="SelectTrigger",ar=s.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:n=!1,...r}=e,i=Be(o),a=le(Wt,o),c=a.disabled||n,l=M(t,a.onTriggerChange),f=Ve(o),u=s.useRef("touch"),[p,g,y]=so(m=>{const x=f().filter(v=>!v.disabled),h=x.find(v=>v.value===a.value),C=io(x,m,h);C!==void 0&&a.onValueChange(C.value)}),S=m=>{c||(a.onOpenChange(!0),y()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(ut,{asChild:!0,...i,children:d.jsx(I.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ue(a.value)?"":void 0,...r,ref:l,onClick:P(r.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&S(m)}),onPointerDown:P(r.onPointerDown,m=>{u.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(S(m),m.preventDefault())}),onKeyDown:P(r.onKeyDown,m=>{const x=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(x&&m.key===" ")&&Qn.includes(m.key)&&(S(),m.preventDefault())})})})});ar.displayName=Wt;var Kt="SelectValue",cr=s.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:i,placeholder:a="",...c}=e,l=le(Kt,o),{onValueNodeHasChildrenChange:f}=l,u=i!==void 0,p=M(t,l.onValueNodeChange);V(()=>{f(u)},[f,u]);const g=Ue(l.value);return d.jsx(I.span,{...c,asChild:g?!1:c.asChild,ref:p,style:{pointerEvents:"none"},children:d.jsx(s.Fragment,{children:g?a:i},g?"placeholder":"value")})});cr.displayName=Kt;var lr="SelectIcon",ur=s.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return d.jsx(I.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})});ur.displayName=lr;var Gt="SelectPortal",[dr,fr]=he(Gt,{forceMount:void 0}),pr=e=>{const{__scopeSelect:t,forceMount:o,...n}=e;return d.jsx(dr,{scope:e.__scopeSelect,forceMount:o,children:d.jsx(ke,{asChild:!0,...n})})};pr.displayName=Gt;var ae="SelectContent",mr=s.forwardRef((e,t)=>{const o=fr(ae,e.__scopeSelect),{forceMount:n=o.forceMount,...r}=e,i=le(ae,e.__scopeSelect),[a,c]=s.useState();return V(()=>{c(new DocumentFragment)},[]),d.jsx(ce,{present:n||i.open,children:({present:l})=>l?d.jsx(Xt,{...r,ref:t}):d.jsx(zt,{...r,fragment:a})})});mr.displayName=ae;var zt=s.forwardRef((e,t)=>{const{__scopeSelect:o,children:n,fragment:r}=e;return r?Me.createPortal(d.jsx(Yt,{scope:o,children:d.jsx($e.Slot,{scope:o,children:d.jsx("div",{ref:t,children:n})})}),r):null});zt.displayName="SelectContentFragment";var J=10,[Yt,ue]=he(ae),vr="SelectContentImpl",hr=pe("SelectContent.RemoveScroll"),Xt=s.forwardRef((e,t)=>{const{__scopeSelect:o}=e,{position:n="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:a,side:c,sideOffset:l,align:f,alignOffset:u,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:S,hideWhenDetached:m,avoidCollisions:x,...h}=e,C=le(ae,o),[v,w]=s.useState(null),[E,N]=s.useState(null),F=M(t,w),[_,G]=s.useState(null),[B,R]=s.useState(null),L=Ve(o),[k,z]=s.useState(!1),H=s.useRef(!1);s.useEffect(()=>{if(v)return ot(v)},[v]),it();const j=s.useCallback(b=>{const[D,...U]=L().map(A=>A.ref.current),[O]=U.slice(-1),T=document.activeElement;for(const A of b)if(A===T||(A==null||A.scrollIntoView({block:"nearest"}),A===D&&E&&(E.scrollTop=0),A===O&&E&&(E.scrollTop=E.scrollHeight),A==null||A.focus(),document.activeElement!==T))return},[L,E]),Y=s.useCallback(()=>j([_,v]),[j,_,v]);s.useEffect(()=>{k&&Y()},[k,Y]);const{onOpenChange:W,triggerPointerDownPosRef:K}=C;s.useEffect(()=>{if(v){let b={x:0,y:0};const D=O=>{var T,A;b={x:Math.abs(Math.round(O.pageX)-(((T=K.current)==null?void 0:T.x)??0)),y:Math.abs(Math.round(O.pageY)-(((A=K.current)==null?void 0:A.y)??0))}},U=O=>{b.x<=10&&b.y<=10?O.preventDefault():O.composedPath().includes(v)||W(!1),document.removeEventListener("pointermove",D),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",U,{capture:!0})}}},[v,W,K]),s.useEffect(()=>{const b=()=>W(!1);return window.addEventListener("blur",b),window.addEventListener("resize",b),()=>{window.removeEventListener("blur",b),window.removeEventListener("resize",b)}},[W]);const[se,ee]=so(b=>{const D=L().filter(T=>!T.disabled),U=D.find(T=>T.ref.current===document.activeElement),O=io(D,b,U);O&&setTimeout(()=>{var T;return(T=O.ref.current)==null?void 0:T.focus()})}),$=s.useCallback((b,D,U)=>{const O=!H.current&&!U;(C.value!==void 0&&C.value===D||O)&&(G(b),O&&(H.current=!0))},[C.value]),X=s.useCallback(()=>v==null?void 0:v.focus(),[v]),Z=s.useCallback((b,D,U)=>{const O=!H.current&&!U;(C.value!==void 0&&C.value===D||O)&&R(b)},[C.value]),ge=n==="popper"?qe:Zt,fe=ge===qe?{side:c,sideOffset:l,align:f,alignOffset:u,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:S,hideWhenDetached:m,avoidCollisions:x}:{};return d.jsx(Yt,{scope:o,content:v,viewport:E,onViewportChange:N,itemRefCallback:$,selectedItem:_,onItemLeave:X,itemTextRefCallback:Z,focusSelectedItem:Y,selectedItemText:B,position:n,isPositioned:k,searchRef:se,children:d.jsx(nt,{as:hr,allowPinchZoom:!0,children:d.jsx(je,{asChild:!0,trapped:C.open,onMountAutoFocus:b=>{b.preventDefault()},onUnmountAutoFocus:P(r,b=>{var D;(D=C.trigger)==null||D.focus({preventScroll:!0}),b.preventDefault()}),children:d.jsx(Fe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:b=>b.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:d.jsx(ge,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:b=>b.preventDefault(),...h,...fe,onPlaced:()=>z(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:P(h.onKeyDown,b=>{const D=b.ctrlKey||b.altKey||b.metaKey;if(b.key==="Tab"&&b.preventDefault(),!D&&b.key.length===1&&ee(b.key),["ArrowUp","ArrowDown","Home","End"].includes(b.key)){let O=L().filter(T=>!T.disabled).map(T=>T.ref.current);if(["ArrowUp","End"].includes(b.key)&&(O=O.slice().reverse()),["ArrowUp","ArrowDown"].includes(b.key)){const T=b.target,A=O.indexOf(T);O=O.slice(A+1)}setTimeout(()=>j(O)),b.preventDefault()}})})})})})})});Xt.displayName=vr;var gr="SelectItemAlignedPosition",Zt=s.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:n,...r}=e,i=le(ae,o),a=ue(ae,o),[c,l]=s.useState(null),[f,u]=s.useState(null),p=M(t,u),g=Ve(o),y=s.useRef(!1),S=s.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:h,focusSelectedItem:C}=a,v=s.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&f&&m&&x&&h){const F=i.trigger.getBoundingClientRect(),_=f.getBoundingClientRect(),G=i.valueNode.getBoundingClientRect(),B=h.getBoundingClientRect();if(i.dir!=="rtl"){const T=B.left-_.left,A=G.left-T,te=F.left-A,q=F.width+te,xe=Math.max(q,_.width),we=window.innerWidth-J,Ee=xt(A,[J,Math.max(J,we-xe)]);c.style.minWidth=q+"px",c.style.left=Ee+"px"}else{const T=_.right-B.right,A=window.innerWidth-G.right-T,te=window.innerWidth-F.right-A,q=F.width+te,xe=Math.max(q,_.width),we=window.innerWidth-J,Ee=xt(A,[J,Math.max(J,we-xe)]);c.style.minWidth=q+"px",c.style.right=Ee+"px"}const R=g(),L=window.innerHeight-J*2,k=m.scrollHeight,z=window.getComputedStyle(f),H=parseInt(z.borderTopWidth,10),j=parseInt(z.paddingTop,10),Y=parseInt(z.borderBottomWidth,10),W=parseInt(z.paddingBottom,10),K=H+j+k+W+Y,se=Math.min(x.offsetHeight*5,K),ee=window.getComputedStyle(m),$=parseInt(ee.paddingTop,10),X=parseInt(ee.paddingBottom,10),Z=F.top+F.height/2-J,ge=L-Z,fe=x.offsetHeight/2,b=x.offsetTop+fe,D=H+j+b,U=K-D;if(D<=Z){const T=R.length>0&&x===R[R.length-1].ref.current;c.style.bottom="0px";const A=f.clientHeight-m.offsetTop-m.offsetHeight,te=Math.max(ge,fe+(T?X:0)+A+Y),q=D+te;c.style.height=q+"px"}else{const T=R.length>0&&x===R[0].ref.current;c.style.top="0px";const te=Math.max(Z,H+m.offsetTop+(T?$:0)+fe)+U;c.style.height=te+"px",m.scrollTop=D-Z+m.offsetTop}c.style.margin=`${J}px 0`,c.style.minHeight=se+"px",c.style.maxHeight=L+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[g,i.trigger,i.valueNode,c,f,m,x,h,i.dir,n]);V(()=>v(),[v]);const[w,E]=s.useState();V(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);const N=s.useCallback(F=>{F&&S.current===!0&&(v(),C==null||C(),S.current=!1)},[v,C]);return d.jsx(yr,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:N,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:d.jsx(I.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Zt.displayName=gr;var xr="SelectPopperPosition",qe=s.forwardRef((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=J,...i}=e,a=Be(o);return d.jsx(Vt,{...a,...i,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.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)"}})});qe.displayName=xr;var[yr,dt]=he(ae,{}),Je="SelectViewport",Sr=s.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:n,...r}=e,i=ue(Je,o),a=dt(Je,o),c=M(t,i.onViewportChange),l=s.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:n}),d.jsx($e.Slot,{scope:o,children:d.jsx(I.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,f=>{const u=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g!=null&&g.current&&p){const y=Math.abs(l.current-u.scrollTop);if(y>0){const S=window.innerHeight-J*2,m=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),h=Math.max(m,x);if(h<S){const C=h+y,v=Math.min(S,C),w=C-v;p.style.height=v+"px",p.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,p.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Sr.displayName=Je;var qt="SelectGroup",[Cr,wr]=he(qt),Er=s.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=re();return d.jsx(Cr,{scope:o,id:r,children:d.jsx(I.div,{role:"group","aria-labelledby":r,...n,ref:t})})});Er.displayName=qt;var Jt="SelectLabel",br=s.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=wr(Jt,o);return d.jsx(I.div,{id:r.id,...n,ref:t})});br.displayName=Jt;var Ae="SelectItem",[Pr,Qt]=he(Ae),Rr=s.forwardRef((e,t)=>{const{__scopeSelect:o,value:n,disabled:r=!1,textValue:i,...a}=e,c=le(Ae,o),l=ue(Ae,o),f=c.value===n,[u,p]=s.useState(i??""),[g,y]=s.useState(!1),S=ne(v=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,v,n,r)}),m=M(t,S),x=re(),h=s.useRef("touch"),C=()=>{r||(c.onValueChange(n),c.onOpenChange(!1))};return d.jsx(Pr,{scope:o,value:n,disabled:r,textId:x,isSelected:f,onItemTextChange:s.useCallback(v=>{p(w=>w||((v==null?void 0:v.textContent)??"").trim())},[]),children:d.jsx($e.ItemSlot,{scope:o,value:n,disabled:r,textValue:u,children:d.jsx(I.div,{role:"option","aria-labelledby":x,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:m,onFocus:P(a.onFocus,()=>y(!0)),onBlur:P(a.onBlur,()=>y(!1)),onClick:P(a.onClick,()=>{h.current!=="mouse"&&C()}),onPointerUp:P(a.onPointerUp,()=>{h.current==="mouse"&&C()}),onPointerDown:P(a.onPointerDown,v=>{h.current=v.pointerType}),onPointerMove:P(a.onPointerMove,v=>{var w;h.current=v.pointerType,r?(w=l.onItemLeave)==null||w.call(l):h.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(a.onPointerLeave,v=>{var w;v.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:P(a.onKeyDown,v=>{var E;r||v.target!==v.currentTarget||((E=l.searchRef)==null?void 0:E.current)!==""&&v.key===" "||(er.includes(v.key)&&C(),v.key===" "&&v.preventDefault())})})})})});Rr.displayName=Ae;var Pe="SelectItemText",Ir=s.forwardRef((e,t)=>{const{__scopeSelect:o,className:n,style:r,...i}=e,a=le(Pe,o),c=ue(Pe,o),l=Qt(Pe,o),f=rr(Pe,o),[u,p]=s.useState(null),g=ne(C=>{var v;return(v=c.itemTextRefCallback)==null?void 0:v.call(c,C,l.value,l.disabled)}),y=M(t,p,l.onItemTextChange,g),S=u==null?void 0:u.textContent,m=s.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:S},l.value),[l.disabled,l.value,S]),{onNativeOptionAdd:x,onNativeOptionRemove:h}=f;return V(()=>(x(m),()=>h(m)),[x,h,m]),d.jsxs(d.Fragment,{children:[d.jsx(I.span,{id:l.textId,...i,ref:y}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!Ue(a.value)?Me.createPortal(i.children,a.valueNode):null]})});Ir.displayName=Pe;var eo="SelectItemIndicator",Tr=s.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return Qt(eo,o).isSelected?d.jsx(I.span,{"aria-hidden":!0,...n,ref:t}):null});Tr.displayName=eo;var Qe="SelectScrollUpButton",_r=s.forwardRef((e,t)=>{const o=ue(Qe,e.__scopeSelect),n=dt(Qe,e.__scopeSelect),[r,i]=s.useState(!1),a=M(t,n.onScrollButtonChange);return V(()=>{if(o.viewport&&o.isPositioned){let c=function(){const f=l.scrollTop>0;i(f)};const l=o.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[o.viewport,o.isPositioned]),r?d.jsx(to,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=o;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});_r.displayName=Qe;var et="SelectScrollDownButton",Nr=s.forwardRef((e,t)=>{const o=ue(et,e.__scopeSelect),n=dt(et,e.__scopeSelect),[r,i]=s.useState(!1),a=M(t,n.onScrollButtonChange);return V(()=>{if(o.viewport&&o.isPositioned){let c=function(){const f=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<f;i(u)};const l=o.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[o.viewport,o.isPositioned]),r?d.jsx(to,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=o;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Nr.displayName=et;var to=s.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:n,...r}=e,i=ue("SelectScrollButton",o),a=s.useRef(null),c=Ve(o),l=s.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return s.useEffect(()=>()=>l(),[l]),V(()=>{var u;const f=c().find(p=>p.ref.current===document.activeElement);(u=f==null?void 0:f.ref.current)==null||u.scrollIntoView({block:"nearest"})},[c]),d.jsx(I.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:P(r.onPointerMove,()=>{var f;(f=i.onItemLeave)==null||f.call(i),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:P(r.onPointerLeave,()=>{l()})})}),Ar="SelectSeparator",Or=s.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e;return d.jsx(I.div,{"aria-hidden":!0,...n,ref:t})});Or.displayName=Ar;var oo="SelectArrow",Dr=s.forwardRef((e,t)=>{const{__scopeSelect:o,...n}=e,r=Be(o);return ue(oo,o).position==="popper"?d.jsx(Bt,{...r,...n,ref:t}):null});Dr.displayName=oo;var no="SelectBubbleInput",ro=s.forwardRef(({__scopeSelect:e,...t},o)=>{const n=le(no,e),{value:r,onValueChange:i,required:a,disabled:c,name:l,autoComplete:f,form:u}=n,{nativeOptions:p,nativeSelectKey:g}=n,y=s.useRef(null),S=M(o,y),m=r??"",x=Zn(m),h=Array.from(p).some(C=>(C.props.value??"")==="");return s.useEffect(()=>{const C=y.current;if(!C)return;const v=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(v,"value").set;if(x!==m&&E){const N=new Event("change",{bubbles:!0});E.call(C,m),C.dispatchEvent(N)}},[x,m]),d.jsxs(I.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:l,autoComplete:f,disabled:c,form:u,onChange:C=>i(C.target.value),...t,style:{...Ut,...t.style},ref:S,defaultValue:m,children:[Ue(r)&&!h?d.jsx("option",{value:""}):null,Array.from(p)]},g)});ro.displayName=no;function Mr(e){return typeof e=="function"}function Ue(e){return e===""||e===void 0}function so(e){const t=ne(e),o=s.useRef(""),n=s.useRef(0),r=s.useCallback(a=>{const c=o.current+a;t(c),(function l(f){o.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),i=s.useCallback(()=>{o.current="",window.clearTimeout(n.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(n.current),[]),[o,r,i]}function io(e,t,o){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=o?e.indexOf(o):-1;let a=Fr(e,Math.max(i,0));r.length===1&&(a=a.filter(f=>f!==o));const l=a.find(f=>f.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==o?l:void 0}function Fr(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var He="Dialog",[ao]=ve(He),[jr,Q]=ao(He),Lr=e=>{const{__scopeDialog:t,children:o,open:n,defaultOpen:r,onOpenChange:i,modal:a=!0}=e,c=s.useRef(null),l=s.useRef(null),[f,u]=ye({prop:n,defaultProp:r??!1,onChange:i,caller:He});return d.jsx(jr,{scope:t,triggerRef:c,contentRef:l,contentId:re(),titleId:re(),descriptionId:re(),open:f,onOpenChange:u,onOpenToggle:s.useCallback(()=>u(p=>!p),[u]),modal:a,children:o})};Lr.displayName=He;var co="DialogTrigger",kr=s.forwardRef((e,t)=>{const{__scopeDialog:o,...n}=e,r=Q(co,o),i=M(t,r.triggerRef);return d.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":pt(r.open),...n,ref:i,onClick:P(e.onClick,r.onOpenToggle)})});kr.displayName=co;var ft="DialogPortal",[$r,lo]=ao(ft,{forceMount:void 0}),Vr=e=>{const{__scopeDialog:t,forceMount:o,children:n,container:r}=e,i=Q(ft,t);return d.jsx($r,{scope:t,forceMount:o,children:s.Children.map(n,a=>d.jsx(ce,{present:o||i.open,children:d.jsx(ke,{asChild:!0,container:r,children:a})}))})};Vr.displayName=ft;var Oe="DialogOverlay",Br=s.forwardRef((e,t)=>{const o=lo(Oe,e.__scopeDialog),{forceMount:n=o.forceMount,...r}=e,i=Q(Oe,e.__scopeDialog);return i.modal?d.jsx(ce,{present:n||i.open,children:d.jsx(Hr,{...r,ref:t})}):null});Br.displayName=Oe;var Ur=pe("DialogOverlay.RemoveScroll"),Hr=s.forwardRef((e,t)=>{const{__scopeDialog:o,...n}=e,r=Q(Oe,o),i=Sn(),a=M(t,i);return d.jsx(nt,{as:Ur,allowPinchZoom:!0,shards:[r.contentRef],children:d.jsx(I.div,{"data-state":pt(r.open),...n,ref:a,style:{pointerEvents:"auto",...n.style}})})}),Se="DialogContent",Wr=s.forwardRef((e,t)=>{const o=lo(Se,e.__scopeDialog),{forceMount:n=o.forceMount,...r}=e,i=Q(Se,e.__scopeDialog);return d.jsx(ce,{present:n||i.open,children:i.modal?d.jsx(Kr,{...r,ref:t}):d.jsx(Gr,{...r,ref:t})})});Wr.displayName=Se;var Kr=s.forwardRef((e,t)=>{const o=Q(Se,e.__scopeDialog),n=s.useRef(null),r=M(t,o.contentRef,n);return s.useEffect(()=>{const i=n.current;if(i)return ot(i)},[]),d.jsx(uo,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:P(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=o.triggerRef.current)==null||a.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:P(e.onFocusOutside,i=>i.preventDefault())})}),Gr=s.forwardRef((e,t)=>{const o=Q(Se,e.__scopeDialog),n=s.useRef(!1),r=s.useRef(!1);return d.jsx(uo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,c;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(n.current||(c=o.triggerRef.current)==null||c.focus(),i.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:i=>{var l,f;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=i.target;((f=o.triggerRef.current)==null?void 0:f.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),uo=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:i,...a}=e,c=Q(Se,o);return it(),d.jsx(d.Fragment,{children:d.jsx(je,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:i,children:d.jsx(Fe,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":pt(c.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),fo="DialogTitle",zr=s.forwardRef((e,t)=>{const{__scopeDialog:o,...n}=e,r=Q(fo,o);return d.jsx(I.h2,{id:r.titleId,...n,ref:t})});zr.displayName=fo;var po="DialogDescription",Yr=s.forwardRef((e,t)=>{const{__scopeDialog:o,...n}=e,r=Q(po,o);return d.jsx(I.p,{id:r.descriptionId,...n,ref:t})});Yr.displayName=po;var mo="DialogClose",Xr=s.forwardRef((e,t)=>{const{__scopeDialog:o,...n}=e,r=Q(mo,o);return d.jsx(I.button,{type:"button",...n,ref:t,onClick:P(e.onClick,()=>r.onOpenChange(!1))})});Xr.displayName=mo;function pt(e){return e?"open":"closed"}var We="Popover",[vo]=ve(We,[Le]),Re=Le(),[Zr,de]=vo(We),ho=e=>{const{__scopePopover:t,children:o,open:n,defaultOpen:r,onOpenChange:i,modal:a=!1}=e,c=Re(t),l=s.useRef(null),[f,u]=s.useState(!1),[p,g]=ye({prop:n,defaultProp:r??!1,onChange:i,caller:We});return d.jsx($t,{...c,children:d.jsx(Zr,{scope:t,contentId:re(),triggerRef:l,open:p,onOpenChange:g,onOpenToggle:s.useCallback(()=>g(y=>!y),[g]),hasCustomAnchor:f,onCustomAnchorAdd:s.useCallback(()=>u(!0),[]),onCustomAnchorRemove:s.useCallback(()=>u(!1),[]),modal:a,children:o})})};ho.displayName=We;var go="PopoverAnchor",qr=s.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=de(go,o),i=Re(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=r;return s.useEffect(()=>(a(),()=>c()),[a,c]),d.jsx(ut,{...i,...n,ref:t})});qr.displayName=go;var xo="PopoverTrigger",yo=s.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=de(xo,o),i=Re(o),a=M(t,r.triggerRef),c=d.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":Po(r.open),...n,ref:a,onClick:P(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:d.jsx(ut,{asChild:!0,...i,children:c})});yo.displayName=xo;var mt="PopoverPortal",[Jr,Qr]=vo(mt,{forceMount:void 0}),So=e=>{const{__scopePopover:t,forceMount:o,children:n,container:r}=e,i=de(mt,t);return d.jsx(Jr,{scope:t,forceMount:o,children:d.jsx(ce,{present:o||i.open,children:d.jsx(ke,{asChild:!0,container:r,children:n})})})};So.displayName=mt;var Ce="PopoverContent",Co=s.forwardRef((e,t)=>{const o=Qr(Ce,e.__scopePopover),{forceMount:n=o.forceMount,...r}=e,i=de(Ce,e.__scopePopover);return d.jsx(ce,{present:n||i.open,children:i.modal?d.jsx(ts,{...r,ref:t}):d.jsx(os,{...r,ref:t})})});Co.displayName=Ce;var es=pe("PopoverContent.RemoveScroll"),ts=s.forwardRef((e,t)=>{const o=de(Ce,e.__scopePopover),n=s.useRef(null),r=M(t,n),i=s.useRef(!1);return s.useEffect(()=>{const a=n.current;if(a)return ot(a)},[]),d.jsx(nt,{as:es,allowPinchZoom:!0,children:d.jsx(wo,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),i.current||(c=o.triggerRef.current)==null||c.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,f=c.button===2||l;i.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),os=s.forwardRef((e,t)=>{const o=de(Ce,e.__scopePopover),n=s.useRef(!1),r=s.useRef(!1);return d.jsx(wo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,c;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(n.current||(c=o.triggerRef.current)==null||c.focus(),i.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:i=>{var l,f;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=i.target;((f=o.triggerRef.current)==null?void 0:f.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),wo=s.forwardRef((e,t)=>{const{__scopePopover:o,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:u,...p}=e,g=de(Ce,o),y=Re(o);return it(),d.jsx(je,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:i,children:d.jsx(Fe,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:d.jsx(Vt,{"data-state":Po(g.open),role:"dialog",id:g.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Eo="PopoverClose",bo=s.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=de(Eo,o);return d.jsx(I.button,{type:"button",...n,ref:t,onClick:P(e.onClick,()=>r.onOpenChange(!1))})});bo.displayName=Eo;var ns="PopoverArrow",rs=s.forwardRef((e,t)=>{const{__scopePopover:o,...n}=e,r=Re(o);return d.jsx(Bt,{...r,...n,ref:t})});rs.displayName=ns;function Po(e){return e?"open":"closed"}var Rs=ho,Is=yo,Ts=So,_s=Co,Ns=bo,Ye=!1;function ss(){const[e,t]=s.useState(Ye);return s.useEffect(()=>{Ye||(Ye=!0,t(!0))},[]),e}var Ro=De[" useSyncExternalStore ".trim().toString()];function is(){return()=>{}}function as(){return Ro(is,()=>!0,()=>!1)}var cs=typeof Ro=="function"?as:ss,Xe="rovingFocusGroup.onEntryFocus",ls={bubbles:!1,cancelable:!0},Ie="RovingFocusGroup",[tt,Io,us]=It(Ie),[ds,To]=ve(Ie,[us]),[fs,ps]=ds(Ie),_o=s.forwardRef((e,t)=>d.jsx(tt.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(tt.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ms,{...e,ref:t})})}));_o.displayName=Ie;var ms=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:n,loop:r=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:f,preventScrollOnEntryFocus:u=!1,...p}=e,g=s.useRef(null),y=M(t,g),S=rt(i),[m,x]=ye({prop:a,defaultProp:c??null,onChange:l,caller:Ie}),[h,C]=s.useState(!1),v=ne(f),w=Io(o),E=s.useRef(!1),[N,F]=s.useState(0);return s.useEffect(()=>{const _=g.current;if(_)return _.addEventListener(Xe,v),()=>_.removeEventListener(Xe,v)},[v]),d.jsx(fs,{scope:o,orientation:n,dir:S,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(_=>x(_),[x]),onItemShiftTab:s.useCallback(()=>C(!0),[]),onFocusableItemAdd:s.useCallback(()=>F(_=>_+1),[]),onFocusableItemRemove:s.useCallback(()=>F(_=>_-1),[]),children:d.jsx(I.div,{tabIndex:h||N===0?-1:0,"data-orientation":n,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{E.current=!0}),onFocus:P(e.onFocus,_=>{const G=!E.current;if(_.target===_.currentTarget&&G&&!h){const B=new CustomEvent(Xe,ls);if(_.currentTarget.dispatchEvent(B),!B.defaultPrevented){const R=w().filter(j=>j.focusable),L=R.find(j=>j.active),k=R.find(j=>j.id===m),H=[L,k,...R].filter(Boolean).map(j=>j.ref.current);Oo(H,u)}}E.current=!1}),onBlur:P(e.onBlur,()=>C(!1))})})}),No="RovingFocusGroupItem",Ao=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:n=!0,active:r=!1,tabStopId:i,children:a,...c}=e,l=re(),f=i||l,u=ps(No,o),p=u.currentTabStopId===f,g=Io(o),{onFocusableItemAdd:y,onFocusableItemRemove:S,currentTabStopId:m}=u,x=cs();return V(()=>{if(!(!x||!n))return y(),()=>S()},[x,n,y,S]),s.useEffect(()=>{if(!(x||!n))return y(),()=>S()},[x,n,y,S]),d.jsx(tt.ItemSlot,{scope:o,id:f,focusable:n,active:r,children:d.jsx(I.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:P(e.onMouseDown,h=>{n?u.onItemFocus(f):h.preventDefault()}),onFocus:P(e.onFocus,()=>u.onItemFocus(f)),onKeyDown:P(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const C=gs(h,u.orientation,u.dir);if(C!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=g().filter(E=>E.focusable).map(E=>E.ref.current);if(C==="last")w.reverse();else if(C==="prev"||C==="next"){C==="prev"&&w.reverse();const E=w.indexOf(h.currentTarget);w=u.loop?xs(w,E+1):w.slice(E+1)}setTimeout(()=>Oo(w))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:m!=null}):a})})});Ao.displayName=No;var vs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hs(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gs(e,t,o){const n=hs(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return vs[n]}function Oo(e,t=!1){const o=document.activeElement;for(const n of e)if(n===o||(n.focus({preventScroll:t}),document.activeElement!==o))return}function xs(e,t){return e.map((o,n)=>e[(t+n)%e.length])}var ys=_o,Ss=Ao,Ke="Tabs",[Cs]=ve(Ke,[To]),Do=To(),[ws,vt]=Cs(Ke),Mo=s.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,onValueChange:r,defaultValue:i,orientation:a="horizontal",dir:c,activationMode:l="automatic",...f}=e,u=rt(c),[p,g]=ye({prop:n,onChange:r,defaultProp:i??"",caller:Ke});return d.jsx(ws,{scope:o,baseId:re(),value:p,onValueChange:g,orientation:a,dir:u,activationMode:l,children:d.jsx(I.div,{dir:u,"data-orientation":a,...f,ref:t})})});Mo.displayName=Ke;var Fo="TabsList",jo=s.forwardRef((e,t)=>{const{__scopeTabs:o,loop:n=!0,...r}=e,i=vt(Fo,o),a=Do(o);return d.jsx(ys,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:n,children:d.jsx(I.div,{role:"tablist","aria-orientation":i.orientation,...r,ref:t})})});jo.displayName=Fo;var Lo="TabsTrigger",ko=s.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,disabled:r=!1,...i}=e,a=vt(Lo,o),c=Do(o),l=Bo(a.baseId,n),f=Uo(a.baseId,n),u=n===a.value;return d.jsx(Ss,{asChild:!0,...c,focusable:!r,active:u,children:d.jsx(I.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...i,ref:t,onMouseDown:P(e.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?a.onValueChange(n):p.preventDefault()}),onKeyDown:P(e.onKeyDown,p=>{r||p.target!==p.currentTarget||[" ","Enter"].includes(p.key)&&a.onValueChange(n)}),onFocus:P(e.onFocus,()=>{const p=a.activationMode!=="manual";!u&&!r&&p&&a.onValueChange(n)})})})});ko.displayName=Lo;var $o="TabsContent",Vo=s.forwardRef((e,t)=>{const{__scopeTabs:o,value:n,forceMount:r,children:i,...a}=e,c=vt($o,o),l=Bo(c.baseId,n),f=Uo(c.baseId,n),u=n===c.value,p=s.useRef(u);return s.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),d.jsx(ce,{present:r||u,children:({present:g})=>d.jsx(I.div,{"data-state":u?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!g,id:f,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&i})})});Vo.displayName=$o;function Bo(e,t){return`${e}-trigger-${t}`}function Uo(e,t){return`${e}-content-${t}`}var As=Mo,Os=jo,Ds=ko,Ms=Vo;export{_s as C,Br as D,Os as L,Ts as P,Rs as R,Ps as S,Is as T,ar as a,ur as b,pr as c,mr as d,_r as e,Sr as f,Nr as g,Rr as h,Tr as i,Ir as j,ir as k,cr as l,Vr as m,Wr as n,Lr as o,zr as p,Yr as q,Ns as r,Ds as s,Ms as t,As as u};
|