@tetrascience-npm/tetrascience-react-ui 0.4.0 → 0.5.0-beta.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2021 +1,11 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("styled-components"),d=require("react"),Do=require("@monaco-editor/react"),zo=require("monaco-themes/themes/themelist"),Go=require("react-markdown"),Uo=require("react-syntax-highlighter"),Vo=require("rehype-raw"),Fo=require("remark-gfm"),Yo=require("react-dom"),q=require("plotly.js-dist"),Zo={small:l.css`
2
- height: 22px;
3
- `,medium:l.css`
4
- height: 26px;
5
- `},Wo={default:l.css`
6
- color: var(--black);
7
- background-color: var(--white);
8
- border: 1px solid var(--grey-300);
9
- `,primary:l.css`
10
- color: var(--blue-600);
11
- background-color: var(--blue-50);
12
- border: 1px solid var(--blue-600);
13
- `},Ko=l.span`
14
- display: inline-flex;
15
- align-items: center;
16
- justify-content: center;
17
- gap: 6px;
18
- font-family: "Inter", sans-serif;
19
- font-size: 13px;
20
- font-style: normal;
21
- font-weight: 400;
22
- line-height: 18px;
23
- white-space: nowrap;
24
- padding: 2px 8px;
25
- border-radius: 6px;
26
- user-select: none;
27
-
28
- ${({$size:e})=>Zo[e]}
29
- ${({$variant:e})=>Wo[e]}
30
-
31
- ${({$disabled:e})=>e&&l.css`
32
- cursor: not-allowed;
33
- background-color: var(--white);
34
- border-color: var(--grey-300);
35
- color: var(--grey-300);
36
- `}
37
-
38
- svg {
39
- width: 16px;
40
- height: 16px;
41
- }
42
- `,Xo=({children:e,size:o="medium",variant:n="default",disabled:r=!1,iconLeft:s,iconRight:i,className:a})=>t.jsxs(Ko,{$size:o,$variant:n,$disabled:r,className:a,children:[s&&s,e,i&&i]}),qo={small:l.css`
43
- height: 34px;
44
- `,medium:l.css`
45
- height: 38px;
46
- `},Qo={primary:l.css`
47
- color: var(--white-900);
48
- background-color: var(--theme-primary, var(--blue-900));
49
- border: 1px solid var(--theme-primary, var(--blue-900));
50
-
51
- &:hover:not(:disabled) {
52
- background-color: var(--theme-primaryHover, var(--blue-800));
53
- border-color: var(--theme-primaryHover, var(--blue-800));
54
- }
55
-
56
- &:focus:not(:disabled) {
57
- background-color: var(--theme-primaryHover, var(--blue-800));
58
- }
59
-
60
- &:active:not(:disabled) {
61
- background-color: var(--theme-primaryActive, var(--blue-800));
62
- border-color: var(--theme-primaryActive, var(--blue-800));
63
- }
64
- `,secondary:l.css`
65
- color: var(--blue-600);
66
- background-color: var(--white-900);
67
- border: 1px solid var(--blue-600);
68
-
69
- &:hover:not(:disabled) {
70
- background-color: var(--blue-100);
71
- border-color: var(--blue-600);
72
- }
73
-
74
- &:focus:not(:disabled) {
75
- background-color: var(--blue-100);
76
- }
77
-
78
- &:active:not(:disabled) {
79
- border-color: var(--blue-600);
80
- background-color: var(--blue-100);
81
- }
82
- `,tertiary:l.css`
83
- color: var(--black-900);
84
- background-color: var(--white-900);
85
- border: 1px solid var(--grey-300);
86
-
87
- &:hover:not(:disabled) {
88
- background-color: var(--grey-100);
89
- border: 1px solid var(--grey-300);
90
- }
91
-
92
- &:focus:not(:disabled) {
93
- background-color: var(--grey-100);
94
- }
95
-
96
- &:active:not(:disabled) {
97
- background-color: var(--grey-100);
98
- }
99
- `},Jo=(e,o)=>o?"0":e==="small"?"7px 10px":"9px 12px",en=l.button`
100
- display: inline-flex;
101
- align-items: center;
102
- justify-content: center;
103
- gap: 8px;
104
- border-radius: var(--theme-radius-medium, 8px);
105
- font-family: "Inter", sans-serif;
106
- font-weight: 600;
107
- cursor: pointer;
108
- transition: all 0.2s;
109
- font-size: 14px;
110
- min-height: 20px;
111
- width: ${e=>e.$fullWidth?"100%":"auto"};
112
- padding: ${e=>Jo(e.size||"medium",e.$noPadding)};
113
- user-select: none;
114
-
115
- ${e=>qo[e.size||"medium"]}
116
- ${e=>Qo[e.variant||"primary"]}
117
-
118
- &:disabled {
119
- cursor: not-allowed;
120
- user-select: none;
121
- pointer-events: none;
122
- background-color: var(--grey-300);
123
- border-color: var(--grey-300);
124
- color: var(--white-900);
125
- }
126
-
127
- &:focus {
128
- outline: none;
129
- box-shadow: 0px 0px 0px 1px var(--white-900),
130
- 0px 0px 0px 3px var(--blue-600);
131
- }
132
- `,ae=({children:e,variant:o="primary",size:n="medium",loading:r=!1,leftIcon:s,rightIcon:i,noPadding:a=!1,fullWidth:u=!1,disabled:c,ref:h,...f})=>t.jsxs(en,{ref:h,variant:o,size:n,$noPadding:a,$fullWidth:u,disabled:c||r,...f,children:[s,e,i]}),tn=l.button`
133
- display: flex;
134
- align-items: center;
135
- justify-content: center;
136
- width: 40px;
137
- height: 40px;
138
- background-color: ${e=>e.selected?"var(--grey-100)":"var(--white-900)"};
139
- border: none;
140
- border-radius: 0;
141
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
142
- outline: none;
143
- transition: all 0.2s ease;
144
- padding: 0;
145
-
146
- &:hover:not(:disabled) {
147
- background-color: var(--grey-100);
148
- }
149
-
150
- &:active:not(:disabled) {
151
- background-color: var(--grey-100);
152
- outline: none;
153
- }
154
-
155
- &:focus,
156
- &:focus-visible {
157
- outline-color: var(--blue-600) !important;
158
- }
159
-
160
- &:disabled {
161
- opacity: 0.5;
162
- background-color: var(--grey-50);
163
- border-color: var(--grey-200);
164
- }
165
-
166
- svg {
167
- width: 20px;
168
- height: 20px;
169
- color: ${e=>e.disabled?"var(--grey-400)":"var(--blue-900)"};
170
- }
171
- `,po=({icon:e,selected:o=!1,disabled:n=!1,onClick:r})=>t.jsx(tn,{selected:o,disabled:n,onClick:n?void 0:r,children:e}),fo={small:l.css`
172
- padding: 12px;
173
- `,medium:l.css`
174
- padding: 16px;
175
- `,large:l.css`
176
- padding: 20px;
177
- `},on={default:l.css`
178
- background-color: var(--theme-cardBackground, var(--white-900));
179
- border: 1px solid var(--theme-cardBorder, var(--grey-200));
180
- `,outlined:l.css`
181
- background-color: var(--theme-cardBackground, var(--white-900));
182
- border: 1px solid var(--theme-cardBorder, var(--grey-200));
183
- `,elevated:l.css`
184
- background-color: var(--theme-cardBackground, var(--white-900));
185
- border: 1px solid var(--theme-cardBorder, var(--grey-200));
186
- box-shadow: 0px 2px 4px var(--black-100);
187
- `},nn=l.div`
188
- border-radius: var(--theme-radius-large, 16px);
189
- width: ${e=>e.$fullWidth?"100%":"auto"};
190
- ${e=>on[e.$variant]}
191
- transition: all 0.2s ease;
192
- `,rn=l.div`
193
- font-family: "Inter", sans-serif;
194
- font-size: 14px;
195
- font-style: normal;
196
- font-weight: 600;
197
- line-height: 20px;
198
- background-color: var(--grey-50);
199
- border-top-left-radius: var(--theme-radius-large, 16px);
200
- border-top-right-radius: var(--theme-radius-large, 16px);
201
- ${e=>fo[e.$size]}
202
- `,sn=l.div`
203
- ${e=>fo[e.$size]}
204
- `,an=({children:e,title:o,size:n="medium",variant:r="default",className:s,fullWidth:i=!1,ref:a,...u})=>t.jsxs(nn,{ref:a,$size:n,$variant:r,$fullWidth:i,className:s,...u,children:[o&&t.jsx(rn,{$size:n,children:o}),t.jsx(sn,{$size:n,children:e})]}),ln=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.75C2 4.33579 2.33579 4 2.75 4H17.25C17.6642 4 18 4.33579 18 4.75C18 5.16421 17.6642 5.5 17.25 5.5H2.75C2.33579 5.5 2 5.16421 2 4.75ZM2 15.25C2 14.8358 2.33579 14.5 2.75 14.5H10.25C10.6642 14.5 11 14.8358 11 15.25C11 15.6642 10.6642 16 10.25 16H2.75C2.33579 16 2 15.6642 2 15.25Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 10C2 9.58579 2.33579 9.25 2.75 9.25H17.25C17.6642 9.25 18 9.58579 18 10C18 10.4142 17.6642 10.75 17.25 10.75H2.75C2.33579 10.75 2 10.4142 2 10Z",fill:e})]}),cn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 16.5V3.5H3.75C3.55109 3.5 3.36032 3.42098 3.21967 3.28033C3.07902 3.13968 3 2.94891 3 2.75C3 2.55109 3.07902 2.36032 3.21967 2.21967C3.36032 2.07902 3.55109 2 3.75 2H16.25C16.4489 2 16.6397 2.07902 16.7803 2.21967C16.921 2.36032 17 2.55109 17 2.75C17 2.94891 16.921 3.13968 16.7803 3.28033C16.6397 3.42098 16.4489 3.5 16.25 3.5H16V16.5H16.25C16.4489 16.5 16.6397 16.579 16.7803 16.7197C16.921 16.8603 17 17.0511 17 17.25C17 17.4489 16.921 17.6397 16.7803 17.7803C16.6397 17.921 16.4489 18 16.25 18H12.75C12.5511 18 12.3603 17.921 12.2197 17.7803C12.079 17.6397 12 17.4489 12 17.25V14.75C12 14.5511 11.921 14.3603 11.7803 14.2197C11.6397 14.079 11.4489 14 11.25 14H8.75C8.55109 14 8.36032 14.079 8.21967 14.2197C8.07902 14.3603 8 14.5511 8 14.75V17.25C8 17.4489 7.92098 17.6397 7.78033 17.7803C7.63968 17.921 7.44891 18 7.25 18H3.75C3.55109 18 3.36032 17.921 3.21967 17.7803C3.07902 17.6397 3 17.4489 3 17.25C3 17.0511 3.07902 16.8603 3.21967 16.7197C3.36032 16.579 3.55109 16.5 3.75 16.5H4ZM7 5.5C7 5.36739 7.05268 5.24021 7.14645 5.14645C7.24021 5.05268 7.36739 5 7.5 5H8.5C8.63261 5 8.75979 5.05268 8.85355 5.14645C8.94732 5.24021 9 5.36739 9 5.5V6.5C9 6.63261 8.94732 6.75979 8.85355 6.85355C8.75979 6.94732 8.63261 7 8.5 7H7.5C7.36739 7 7.24021 6.94732 7.14645 6.85355C7.05268 6.75979 7 6.63261 7 6.5V5.5ZM7.5 9C7.36739 9 7.24021 9.05268 7.14645 9.14645C7.05268 9.24021 7 9.36739 7 9.5V10.5C7 10.6326 7.05268 10.7598 7.14645 10.8536C7.24021 10.9473 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 10.9473 8.85355 10.8536C8.94732 10.7598 9 10.6326 9 10.5V9.5C9 9.36739 8.94732 9.24021 8.85355 9.14645C8.75979 9.05268 8.63261 9 8.5 9H7.5ZM11 5.5C11 5.36739 11.0527 5.24021 11.1464 5.14645C11.2402 5.05268 11.3674 5 11.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5V6.5C13 6.63261 12.9473 6.75979 12.8536 6.85355C12.7598 6.94732 12.6326 7 12.5 7H11.5C11.3674 7 11.2402 6.94732 11.1464 6.85355C11.0527 6.75979 11 6.63261 11 6.5V5.5ZM11.5 9C11.3674 9 11.2402 9.05268 11.1464 9.14645C11.0527 9.24021 11 9.36739 11 9.5V10.5C11 10.6326 11.0527 10.7598 11.1464 10.8536C11.2402 10.9473 11.3674 11 11.5 11H12.5C12.6326 11 12.7598 10.9473 12.8536 10.8536C12.9473 10.7598 13 10.6326 13 10.5V9.5C13 9.36739 12.9473 9.24021 12.8536 9.14645C12.7598 9.05268 12.6326 9 12.5 9H11.5Z",fill:e})}),dn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.997 5.25C17.9972 4.69436 17.7917 4.15832 17.4202 3.74512C17.0488 3.33191 16.5375 3.07077 15.985 3.012C15.9262 2.45948 15.6651 1.94825 15.2519 1.57677C14.8387 1.20529 14.3026 0.999846 13.747 1H12.247C11.6914 0.999846 11.1553 1.20529 10.7421 1.57677C10.3289 1.94825 10.0678 2.45948 10.009 3.012C9.134 3.104 8.409 3.698 8.125 4.5H10.997C11.66 4.5 12.2959 4.76339 12.7648 5.23223C13.2336 5.70107 13.497 6.33696 13.497 7V14H15.747C16.3437 14 16.916 13.7629 17.338 13.341C17.7599 12.919 17.997 12.3467 17.997 11.75V5.25ZM12.247 2.5C12.0481 2.5 11.8573 2.57902 11.7167 2.71967C11.576 2.86032 11.497 3.05109 11.497 3.25V3.5H14.497V3.25C14.497 3.05109 14.418 2.86032 14.2773 2.71967C14.1367 2.57902 13.9459 2.5 13.747 2.5H12.247Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 6C2.73478 6 2.48043 6.10536 2.29289 6.29289C2.10536 6.48043 2 6.73478 2 7V17C2 17.2652 2.10536 17.5196 2.29289 17.7071C2.48043 17.8946 2.73478 18 3 18H11C11.2652 18 11.5196 17.8946 11.7071 17.7071C11.8946 17.5196 12 17.2652 12 17V7C12 6.73478 11.8946 6.48043 11.7071 6.29289C11.5196 6.10536 11.2652 6 11 6H3ZM9.874 10.166C9.92992 10.0841 9.96904 9.99189 9.98909 9.89475C10.0091 9.79761 10.0097 9.69746 9.99081 9.6001C9.97189 9.50273 9.93385 9.41009 9.87889 9.32752C9.82392 9.24496 9.75313 9.17412 9.6706 9.1191C9.58807 9.06408 9.49545 9.02598 9.3981 9.007C9.30075 8.98802 9.2006 8.98854 9.10345 9.00852C9.0063 9.02851 8.91407 9.06757 8.83212 9.12344C8.75017 9.1793 8.68011 9.25087 8.626 9.334L6.133 13.073L5.28 12.22C5.13783 12.0875 4.94978 12.0154 4.75548 12.0188C4.56118 12.0223 4.37579 12.101 4.23838 12.2384C4.10097 12.3758 4.02225 12.5612 4.01883 12.7555C4.0154 12.9498 4.08752 13.1378 4.22 13.28L5.72 14.78C5.79844 14.8584 5.8933 14.9184 5.99773 14.9558C6.10217 14.9931 6.21359 15.0068 6.32396 14.9959C6.43434 14.985 6.54092 14.9498 6.63603 14.8927C6.73114 14.8357 6.81242 14.7582 6.874 14.666L9.874 10.166Z",fill:e})]}),un=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.7045 4.15347C17.034 4.4045 17.0976 4.87509 16.8466 5.20457L8.84657 15.7046C8.71541 15.8767 8.51627 15.9838 8.30033 15.9983C8.08439 16.0129 7.87271 15.9334 7.71967 15.7804L3.21967 11.2804C2.92678 10.9875 2.92678 10.5126 3.21967 10.2197C3.51256 9.92682 3.98744 9.92682 4.28033 10.2197L8.17351 14.1129L15.6534 4.29551C15.9045 3.96603 16.3751 3.90243 16.7045 4.15347Z",fill:e})}),hn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM13.8566 8.19113C14.1002 7.85614 14.0261 7.38708 13.6911 7.14345C13.3561 6.89982 12.8871 6.97388 12.6434 7.30887L9.15969 12.099L7.28033 10.2197C6.98744 9.92678 6.51256 9.92678 6.21967 10.2197C5.92678 10.5126 5.92678 10.9874 6.21967 11.2803L8.71967 13.7803C8.87477 13.9354 9.08999 14.0149 9.30867 13.9977C9.52734 13.9805 9.72754 13.8685 9.85655 13.6911L13.8566 8.19113Z",fill:e})}),pn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:[t.jsx("path",{d:"M11.2016 1.59961H4.80156C3.03676 1.59961 1.60156 3.03481 1.60156 4.79961V11.1996C1.60156 12.9644 3.03676 14.3996 4.80156 14.3996H11.2016C12.9664 14.3996 14.4016 12.9644 14.4016 11.1996V4.79961C14.4016 3.03481 12.9664 1.59961 11.2016 1.59961Z",fill:e}),t.jsx("path",{d:"M7.63305 10.8968L11.4331 6.09685C11.7075 5.75045 11.6491 5.24725 11.3027 4.97285C10.9555 4.69925 10.4531 4.75845 10.1787 5.10405L6.96665 9.16085L5.80025 7.86485C5.50425 7.53685 4.99945 7.50965 4.67065 7.80565C4.34265 8.10085 4.31625 8.60645 4.61145 8.93525L6.41145 10.9352C6.56265 11.104 6.77945 11.2 7.00585 11.2H7.03065C7.26665 11.1928 7.48665 11.0816 7.63305 10.8968Z",fill:"white"})]}),fn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{width:o,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.21967 8.21967C5.51256 7.92678 5.98744 7.92678 6.28033 8.21967L10 11.9393L13.7197 8.21967C14.0126 7.92678 14.4874 7.92678 14.7803 8.21967C15.0732 8.51256 15.0732 8.98744 14.7803 9.28033L10.5303 13.5303C10.3897 13.671 10.1989 13.75 10 13.75C9.80109 13.75 9.61032 13.671 9.46967 13.5303L5.21967 9.28033C4.92678 8.98744 4.92678 8.51256 5.21967 8.21967Z",fill:e})}),mn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M3.75 3.75L16.25 16.25M16.25 3.75L3.75 16.25",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 2C3.65326 2 3.08097 2.23705 2.65901 2.65901C2.23705 3.08097 2 3.65326 2 4.25V15.75C2 16.3467 2.23705 16.919 2.65901 17.341C3.08097 17.7629 3.65326 18 4.25 18H15.75C16.3467 18 16.919 17.7629 17.341 17.341C17.7629 16.919 18 16.3467 18 15.75V4.25C18 3.65326 17.7629 3.08097 17.341 2.65901C16.919 2.23705 16.3467 2 15.75 2H4.25ZM8.28 8.28C8.41248 8.13783 8.4846 7.94978 8.48118 7.75548C8.47775 7.56118 8.39903 7.37579 8.26162 7.23838C8.12421 7.10097 7.93882 7.02225 7.74452 7.01883C7.55022 7.0154 7.36217 7.08752 7.22 7.22L4.97 9.47C4.82955 9.61063 4.75066 9.80125 4.75066 10C4.75066 10.1988 4.82955 10.3894 4.97 10.53L7.22 12.78C7.36217 12.9125 7.55022 12.9846 7.74452 12.9812C7.93882 12.9777 8.12421 12.899 8.26162 12.7616C8.39903 12.6242 8.47775 12.4388 8.48118 12.2445C8.4846 12.0502 8.41248 11.8622 8.28 11.72L6.56 10L8.28 8.28ZM12.78 7.22C12.7113 7.14631 12.6285 7.08721 12.5365 7.04622C12.4445 7.00523 12.3452 6.98319 12.2445 6.98141C12.1438 6.97963 12.0438 6.99816 11.9504 7.03588C11.857 7.0736 11.7722 7.12974 11.701 7.20096C11.6297 7.27218 11.5736 7.35701 11.5359 7.4504C11.4982 7.54379 11.4796 7.64382 11.4814 7.74452C11.4832 7.84523 11.5052 7.94454 11.5462 8.03654C11.5872 8.12854 11.6463 8.21134 11.72 8.28L13.44 10L11.72 11.72C11.6463 11.7887 11.5872 11.8715 11.5462 11.9635C11.5052 12.0555 11.4832 12.1548 11.4814 12.2555C11.4796 12.3562 11.4982 12.4562 11.5359 12.5496C11.5736 12.643 11.6297 12.7278 11.701 12.799C11.7722 12.8703 11.857 12.9264 11.9504 12.9641C12.0438 13.0018 12.1438 13.0204 12.2445 13.0186C12.3452 13.0168 12.4445 12.9948 12.5365 12.9538C12.6285 12.9128 12.7113 12.8537 12.78 12.78L15.03 10.53C15.1705 10.3894 15.2493 10.1988 15.2493 10C15.2493 9.80125 15.1705 9.61063 15.03 9.47L12.78 7.22Z",fill:e})}),gn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.25C2 3.65326 2.23705 3.08097 2.65901 2.65901C3.08097 2.23705 3.65326 2 4.25 2H15.75C16.3467 2 16.919 2.23705 17.341 2.65901C17.7629 3.08097 18 3.65326 18 4.25V12.75C18 13.3467 17.7629 13.919 17.341 14.341C16.919 14.7629 16.3467 15 15.75 15H12.645C12.8403 15.6543 13.2226 16.2372 13.745 16.677C13.8625 16.7762 13.9467 16.9092 13.9861 17.0579C14.0255 17.2065 14.0182 17.3637 13.9653 17.5081C13.9123 17.6526 13.8163 17.7772 13.6901 17.8652C13.564 17.9532 13.4138 18.0002 13.26 18H6.74C6.58628 18 6.43627 17.9528 6.31027 17.8647C6.18427 17.7767 6.08838 17.652 6.03557 17.5077C5.98275 17.3633 5.97557 17.2062 6.015 17.0576C6.05443 16.9091 6.13856 16.7762 6.256 16.677C6.77799 16.2371 7.15999 15.6542 7.355 15H4.25C3.65326 15 3.08097 14.7629 2.65901 14.341C2.23705 13.919 2 13.3467 2 12.75V4.25ZM3.5 4.25C3.5 4.05109 3.57902 3.86032 3.71967 3.71967C3.86032 3.57902 4.05109 3.5 4.25 3.5H15.75C15.9489 3.5 16.1397 3.57902 16.2803 3.71967C16.421 3.86032 16.5 4.05109 16.5 4.25V11.75C16.5 11.9489 16.421 12.1397 16.2803 12.2803C16.1397 12.421 15.9489 12.5 15.75 12.5H4.25C4.05109 12.5 3.86032 12.421 3.71967 12.2803C3.57902 12.1397 3.5 11.9489 3.5 11.75V4.25Z",fill:e})}),Cn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M2 4.25C2 3.00736 3.00736 2 4.25 2H10.75C11.9926 2 13 3.00736 13 4.25V5.5H9.25C7.17893 5.5 5.5 7.17893 5.5 9.25V13H4.25C3.00736 13 2 11.9926 2 10.75V4.25Z",fill:e}),t.jsx("path",{d:"M9.25 7C8.00736 7 7 8.00736 7 9.25V15.75C7 16.9926 8.00736 18 9.25 18H15.75C16.9926 18 18 16.9926 18 15.75V9.25C18 8.00736 16.9926 7 15.75 7H9.25Z",fill:e})]}),bn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10.362 1.093C10.2511 1.0319 10.1266 0.999851 10 0.999851C9.87341 0.999851 9.74887 1.0319 9.638 1.093L2.523 5.018L10 9.143L17.477 5.018L10.362 1.093ZM18 6.443L10.75 10.443V18.693L17.612 14.907C17.7295 14.8422 17.8275 14.7471 17.8958 14.6315C17.964 14.516 18 14.3842 18 14.25V6.443ZM9.25 18.693V10.443L2 6.443V14.25C1.99997 14.3842 2.03596 14.516 2.10421 14.6315C2.17245 14.7471 2.27046 14.8422 2.388 14.907L9.25 18.693Z",fill:e})}),vn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1C13.866 1 17 2.79 17 5C17 7.21 13.866 9 10 9C6.134 9 3 7.21 3 5C3 2.79 6.134 1 10 1ZM15.694 9.13C16.158 8.866 16.604 8.547 17 8.178V10C17 12.21 13.866 14 10 14C6.134 14 3 12.21 3 10V8.178C3.396 8.548 3.842 8.866 4.306 9.131C5.838 10.006 7.854 10.5 10 10.5C12.146 10.5 14.162 10.006 15.694 9.13ZM3 13.179V15C3 17.21 6.134 19 10 19C13.866 19 17 17.21 17 15V13.178C16.604 13.548 16.158 13.866 15.694 14.131C14.162 15.006 12.146 15.5 10 15.5C7.854 15.5 5.838 15.006 4.306 14.13C3.83547 13.8644 3.39722 13.5453 3 13.179Z",fill:e})}),yn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM10 5C10.4142 5 10.75 5.33579 10.75 5.75V10.25C10.75 10.6642 10.4142 11 10 11C9.58579 11 9.25 10.6642 9.25 10.25V5.75C9.25 5.33579 9.58579 5 10 5ZM10 15C10.5523 15 11 14.5523 11 14C11 13.4477 10.5523 13 10 13C9.44771 13 9 13.4477 9 14C9 14.5523 9.44771 15 10 15Z",fill:e})}),wn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.4845 2.49499C9.15808 1.32833 10.842 1.32833 11.5156 2.495L17.7943 13.37C18.4678 14.5367 17.6259 15.995 16.2787 15.995H3.72136C2.37421 15.995 1.53224 14.5367 2.20582 13.37L8.4845 2.49499ZM10 5C10.4142 5 10.75 5.33579 10.75 5.75V9.25C10.75 9.66421 10.4142 10 10 10C9.58579 10 9.25 9.66421 9.25 9.25L9.25 5.75C9.25 5.33579 9.58579 5 10 5ZM10 14C10.5523 14 11 13.5523 11 13C11 12.4477 10.5523 12 10 12C9.44772 12 9 12.4477 9 13C9 13.5523 9.44772 14 10 14Z",fill:e})}),jn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.84288 1.804C7.88817 1.57739 8.01055 1.37346 8.18921 1.22689C8.36787 1.08031 8.59178 1.00014 8.82288 1H11.1829C11.414 1.00014 11.6379 1.08031 11.8165 1.22689C11.9952 1.37346 12.1176 1.57739 12.1629 1.804L12.4939 3.456C13.1923 3.72219 13.8436 4.09863 14.4229 4.571L16.0209 4.031C16.2398 3.95702 16.4775 3.96112 16.6937 4.04261C16.9099 4.1241 17.0913 4.27795 17.2069 4.478L18.3869 6.522C18.5025 6.72209 18.5453 6.95607 18.5079 7.18413C18.4706 7.4122 18.3553 7.62029 18.1819 7.773L16.9149 8.886C17.033 9.62397 17.033 10.376 16.9149 11.114L18.1819 12.227C18.3553 12.3795 18.4705 12.5874 18.5081 12.8152C18.5456 13.0431 18.5031 13.2769 18.3879 13.477L17.2079 15.522C17.0922 15.7223 16.9107 15.8763 16.6943 15.9578C16.4779 16.0393 16.2399 16.0432 16.0209 15.969L14.4229 15.429C13.8436 15.9014 13.1923 16.2778 12.4939 16.544L12.1639 18.196C12.1186 18.4226 11.9962 18.6265 11.8175 18.7731C11.6389 18.9197 11.415 18.9999 11.1839 19H8.82288C8.59178 18.9999 8.36787 18.9197 8.18921 18.7731C8.01055 18.6265 7.88817 18.4226 7.84288 18.196L7.51188 16.544C6.81342 16.2778 6.16215 15.9014 5.58288 15.429L3.98488 15.969C3.76598 16.043 3.52823 16.0389 3.31202 15.9574C3.09581 15.8759 2.91449 15.7221 2.79888 15.522L1.61888 13.478C1.50322 13.2779 1.46045 13.0439 1.49782 12.8159C1.53519 12.5878 1.65041 12.3797 1.82388 12.227L3.09088 11.113C2.97289 10.3754 2.97289 9.62364 3.09088 8.886L1.82388 7.773C1.65049 7.62047 1.53524 7.41264 1.49769 7.18478C1.46014 6.95693 1.5026 6.7231 1.61788 6.523L2.79788 4.478C2.91352 4.27773 3.09501 4.12373 3.31144 4.04223C3.52787 3.96073 3.76585 3.95676 3.98488 4.031L5.58288 4.571C6.16245 4.09852 6.81406 3.72207 7.51288 3.456L7.84288 1.804ZM10.0029 13C10.7985 13 11.5616 12.6839 12.1242 12.1213C12.6868 11.5587 13.0029 10.7956 13.0029 10C13.0029 9.20435 12.6868 8.44129 12.1242 7.87868C11.5616 7.31607 10.7985 7 10.0029 7C9.20723 7 8.44416 7.31607 7.88156 7.87868C7.31895 8.44129 7.00288 9.20435 7.00288 10C7.00288 10.7956 7.31895 11.5587 7.88156 12.1213C8.44416 12.6839 9.20723 13 10.0029 13Z",fill:e})}),kn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM16.4969 10.2041C16.389 13.6995 13.5216 16.5 10 16.5C6.41015 16.5 3.5 13.5899 3.5 10C3.5 7.12656 5.36451 4.68861 7.94969 3.82998L6.92671 5.62019C6.60171 6.18894 6.69759 6.90485 7.16078 7.36805C7.6029 7.81017 8.27833 7.91977 8.83757 7.64015L9.0123 7.55279C9.08173 7.51807 9.15829 7.5 9.23591 7.5H9.38181C9.5712 7.5 9.74433 7.607 9.82902 7.77639C9.8994 7.91716 9.8994 8.08284 9.82902 8.22361L9.80123 8.27919C9.73357 8.41452 9.59525 8.5 9.44395 8.5H8.9418C8.18614 8.5 7.48048 8.87766 7.06131 9.50641L7.01751 9.57212C6.65828 10.111 6.56795 10.7855 6.77274 11.3998C6.98201 12.0276 7.47787 12.5197 8.10338 12.7282C8.33997 12.8071 8.49984 13.0292 8.49984 13.2749V14.3246C8.49984 14.9738 9.02608 15.5 9.67523 15.5C10.0323 15.5 10.37 15.3377 10.5931 15.0589L12.2044 13.0446C12.3957 12.8056 12.4998 12.5086 12.4998 12.2025C12.4998 11.8866 12.6279 11.5791 12.8531 11.3539C13.3088 10.8982 13.3864 10.1784 13.0257 9.63738L12.5617 8.94145C12.5214 8.88091 12.4998 8.80979 12.4998 8.73703C12.4998 8.43336 12.8465 8.26002 13.0895 8.44222L13.4322 8.69925C13.748 8.93609 14.1704 8.97373 14.523 8.79746C14.7488 8.68456 15.0216 8.72887 15.1996 8.90689L16.4969 10.2041Z",fill:e})}),_n=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M13.3516 2.00712C13.7619 2.06371 14.0488 2.44249 13.9922 2.85282L13.5576 6.00028H16.6973C17.1115 6.00028 17.4473 6.33607 17.4473 6.75028C17.4473 7.16448 17.1115 7.50028 16.6973 7.50028H13.3516L12.6611 12.5003H15.8008C16.215 12.5003 16.5508 12.8361 16.5508 13.2503C16.5508 13.6645 16.215 14.0003 15.8008 14.0003H12.4551L11.9922 17.3528C11.9356 17.7631 11.5568 18.05 11.1465 17.9934C10.7362 17.9368 10.4493 17.558 10.5059 17.1477L10.9404 14.0003H7.95508L7.49219 17.3528C7.43556 17.7631 7.05679 18.05 6.64648 17.9934C6.23622 17.9368 5.94927 17.558 6.00586 17.1477L6.44043 14.0003H3.30078C2.88658 14.0003 2.5508 13.6645 2.55078 13.2503C2.55078 12.8361 2.88657 12.5003 3.30078 12.5003H6.64648L7.33691 7.50028H4.19727C3.78309 7.50024 3.44728 7.16446 3.44727 6.75028C3.44727 6.33609 3.78308 6.00032 4.19727 6.00028H7.54297L8.00586 2.64774C8.06245 2.23743 8.44125 1.95055 8.85156 2.00712C9.26189 2.06371 9.54878 2.44249 9.49219 2.85282L9.05762 6.00028H12.043L12.5059 2.64774C12.5625 2.23743 12.9413 1.95055 13.3516 2.00712ZM8.85156 7.50028L8.16113 12.5003H11.1465L11.8369 7.50028H8.85156Z",fill:e})}),En=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29292 2.29289C9.68345 1.90237 10.3166 1.90237 10.7071 2.29289L17.7071 9.29289C17.9931 9.57889 18.0787 10.009 17.9239 10.3827C17.7691 10.7564 17.4045 11 17 11H16V17C16 17.5523 15.5523 18 15 18H13C12.4477 18 12 17.5523 12 17V14C12 13.4477 11.5523 13 11 13H9.00003C8.44774 13 8.00003 13.4477 8.00003 14V17C8.00003 17.5523 7.55231 18 7.00003 18H5.00003C4.44774 18 4.00003 17.5523 4.00003 17V11H3.00003C2.59557 11 2.23093 10.7564 2.07615 10.3827C1.92137 10.009 2.00692 9.57889 2.29292 9.29289L9.29292 2.29289Z",fill:e})}),Mn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 40 40",fill:"none",children:t.jsx("path",{d:"M3.75 22.5H10.1824C11.6028 22.5 12.9013 23.3025 13.5365 24.5729L13.9635 25.4271C14.5987 26.6975 15.8972 27.5 17.3176 27.5H22.6824C24.1028 27.5 25.4013 26.6975 26.0365 25.4271L26.4635 24.5729C27.0987 23.3025 28.3972 22.5 29.8176 22.5H36.25M3.75 23.0639V30C3.75 32.0711 5.42893 33.75 7.5 33.75H32.5C34.5711 33.75 36.25 32.0711 36.25 30V23.0639C36.25 22.6901 36.1941 22.3183 36.0842 21.9611L32.0645 8.89718C31.5804 7.32371 30.1266 6.25 28.4803 6.25H11.5197C9.87339 6.25 8.41963 7.32371 7.93548 8.89718L3.91583 21.9611C3.80589 22.3183 3.75 22.6901 3.75 23.0639Z",stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})}),Ln=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM9 9C8.58579 9 8.25 9.33579 8.25 9.75C8.25 10.1642 8.58579 10.5 9 10.5H9.25293C9.41287 10.5 9.53176 10.6486 9.49707 10.8047L9.03809 12.8701C8.79522 13.963 9.62751 15 10.7471 15H11C11.4142 15 11.75 14.6642 11.75 14.25C11.75 13.8358 11.4142 13.5 11 13.5H10.7471C10.5871 13.5 10.4682 13.3514 10.5029 13.1953L10.9619 11.1299C11.2048 10.037 10.3725 9 9.25293 9H9ZM10 5C9.44771 5 9 5.44772 9 6C9 6.55228 9.44771 7 10 7C10.5523 7 11 6.55228 11 6C11 5.44772 10.5523 5 10 5Z",fill:e})}),Tn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM9 5C9 5.55228 8.55228 6 8 6C7.44772 6 7 5.55228 7 5C7 4.44772 7.44772 4 8 4C8.55228 4 9 4.44772 9 5ZM6.75 8C6.33579 8 6 8.33579 6 8.75C6 9.16421 6.33579 9.5 6.75 9.5H7.5V11.25C7.5 11.6642 7.83579 12 8.25 12C8.66421 12 9 11.6642 9 11.25V8.75C9 8.33579 8.66421 8 8.25 8H6.75Z",fill:e})}),An=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10.0001 1C8.76409 0.99999 7.55829 1.38167 6.54746 2.09287C5.53662 2.80407 4.77008 3.81008 4.35262 4.9734C3.93516 6.13672 3.88714 7.40058 4.21512 8.59222C4.54311 9.78387 5.2311 10.8451 6.18505 11.631C7.23705 12.5 8.00005 13.443 8.00005 14.456V15.1C7.99995 15.268 8.05628 15.4312 8.16 15.5634C8.26372 15.6956 8.40883 15.7891 8.57205 15.829C9.51025 16.0582 10.4899 16.0582 11.4281 15.829C11.5913 15.7891 11.7364 15.6956 11.8401 15.5634C11.9438 15.4312 12.0001 15.268 12.0001 15.1V14.456C12.0001 13.443 12.7621 12.499 13.8151 11.631C14.769 10.8451 15.457 9.78387 15.785 8.59222C16.113 7.40058 16.0649 6.13672 15.6475 4.9734C15.23 3.81008 14.4635 2.80407 13.4526 2.09287C12.4418 1.38167 11.236 0.99999 10.0001 1ZM8.86305 17.414C8.76568 17.3992 8.66633 17.4036 8.57069 17.4272C8.47505 17.4508 8.38498 17.4929 8.30563 17.5513C8.14538 17.6691 8.03852 17.8458 8.00855 18.0425C7.97858 18.2392 8.02796 18.4397 8.14583 18.5999C8.2637 18.7602 8.44039 18.867 8.63705 18.897C9.54052 19.0344 10.4596 19.0344 11.3631 18.897C11.5597 18.867 11.7364 18.7602 11.8543 18.5999C11.9721 18.4397 12.0215 18.2392 11.9916 18.0425C11.9616 17.8458 11.8547 17.6691 11.6945 17.5513C11.5342 17.4334 11.3337 17.384 11.1371 17.414C10.3834 17.5288 9.61671 17.5288 8.86305 17.414Z",fill:e})}),In=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M11.5 1C9.567 1 8 2.567 8 4.5V7H2.5C1.67157 7 1 7.67157 1 8.5V13.5C1 14.3284 1.67157 15 2.5 15H9.5C10.3284 15 11 14.3284 11 13.5V8.5C11 7.67157 10.3284 7 9.5 7V4.5C9.5 3.39543 10.3954 2.5 11.5 2.5C12.6046 2.5 13.5 3.39543 13.5 4.5V6.25C13.5 6.66421 13.8358 7 14.25 7C14.6642 7 15 6.66421 15 6.25V4.5C15 2.567 13.433 1 11.5 1Z",fill:e})}),Rn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M3.75 7.25C3.33579 7.25 3 7.58579 3 8C3 8.41421 3.33579 8.75 3.75 8.75L12.25 8.75C12.6642 8.75 13 8.41421 13 8C13 7.58579 12.6642 7.25 12.25 7.25H3.75Z",fill:e})}),Sn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{width:o,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M3.10526 2.28868C2.85362 2.25302 2.60104 2.34722 2.43421 2.53895C2.26738 2.73068 2.209 2.99386 2.27911 3.23815L3.69276 8.16402C3.87733 8.80713 4.4655 9.25024 5.13456 9.25024H11.25C11.6642 9.25024 12 9.58603 12 10.0002C12 10.4145 11.6642 10.7502 11.25 10.7502H5.13457C4.4655 10.7502 3.87733 11.1934 3.69277 11.8365L2.27911 16.7624C2.209 17.0067 2.26738 17.2698 2.43421 17.4616C2.60104 17.6533 2.85362 17.7475 3.10526 17.7118C8.94303 16.8844 14.221 14.319 18.3983 10.5576C18.5563 10.4154 18.6465 10.2128 18.6465 10.0003C18.6465 9.7877 18.5563 9.58513 18.3983 9.4429C14.221 5.68154 8.94303 3.1161 3.10526 2.28868Z",fill:e})}),$n=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M2.69533 14.7623L1.43355 17.9168C1.27028 18.3249 1.67532 18.73 2.08348 18.5667L5.23795 17.3049C5.74091 17.1037 6.19777 16.8025 6.58081 16.4194L17.5 5.50072C18.3284 4.67229 18.3284 3.32914 17.5 2.50072C16.6716 1.67229 15.3284 1.67229 14.5 2.50071L3.58081 13.4194C3.19777 13.8025 2.89652 14.2593 2.69533 14.7623Z",fill:e})}),Nn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M12 8.99908C11.7348 8.99908 11.4804 8.89372 11.2929 8.70618C11.1054 8.51865 11 8.26429 11 7.99908V2.99908C11 2.44708 11.45 1.99208 11.997 2.06908C13.4939 2.28487 14.8808 2.97941 15.9502 4.04884C17.0197 5.11828 17.7142 6.50515 17.93 8.00208C18.008 8.54908 17.552 8.99908 17 8.99908H12Z",fill:e}),t.jsx("path",{d:"M8.003 4.07083C8.55 3.99483 9 4.44982 9 5.00082V10.0008C9 10.266 9.10536 10.5204 9.29289 10.7079C9.48043 10.8955 9.73478 11.0008 10 11.0008H15C15.552 11.0008 16.008 11.4508 15.93 11.9978C15.6769 13.7491 14.77 15.3396 13.3918 16.4494C12.0135 17.5591 10.2662 18.1058 8.5012 17.9795C6.73622 17.8532 5.08455 17.0632 3.87841 15.7685C2.67226 14.4737 2.00113 12.7703 2 11.0008C2.00009 9.31693 2.60701 7.68946 3.70953 6.41668C4.81205 5.1439 6.33633 4.31107 8.003 4.07083Z",fill:e})]}),On=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.157 2.17646C7.78976 2.02451 7.37724 2.02451 7.01 2.17646L2.926 3.86646C2.65219 3.97987 2.41812 4.17185 2.25331 4.41817C2.08851 4.66448 2.00036 4.9541 2 5.25046V16.1275C1.99997 16.3742 2.06079 16.617 2.17705 16.8346C2.29332 17.0522 2.46146 17.2377 2.66656 17.3748C2.87167 17.5118 3.10741 17.5962 3.35291 17.6204C3.59841 17.6446 3.84609 17.6079 4.074 17.5135L7.584 16.0615L11.844 17.8235C12.2109 17.9751 12.6231 17.9751 12.99 17.8235L17.073 16.1335C17.3468 16.0203 17.581 15.8285 17.746 15.5824C17.911 15.3363 17.9994 15.0468 18 14.7505V3.87246C18 3.6259 17.9391 3.38315 17.8229 3.1657C17.7067 2.94824 17.5387 2.76278 17.3337 2.62574C17.1287 2.4887 16.8932 2.4043 16.6478 2.38001C16.4024 2.35571 16.1549 2.39228 15.927 2.48646L12.417 3.93846L8.157 2.17646ZM7.58 5.00046C7.77891 5.00046 7.96968 5.07948 8.11033 5.22013C8.25098 5.36079 8.33 5.55155 8.33 5.75046V12.2505C8.33 12.4494 8.25098 12.6401 8.11033 12.7808C7.96968 12.9214 7.77891 13.0005 7.58 13.0005C7.38109 13.0005 7.19032 12.9214 7.04967 12.7808C6.90902 12.6401 6.83 12.4494 6.83 12.2505V5.75046C6.83 5.55155 6.90902 5.36079 7.04967 5.22013C7.19032 5.07948 7.38109 5.00046 7.58 5.00046ZM13.17 7.75046C13.17 7.55155 13.091 7.36079 12.9503 7.22013C12.8097 7.07948 12.6189 7.00046 12.42 7.00046C12.2211 7.00046 12.0303 7.07948 11.8897 7.22013C11.749 7.36079 11.67 7.55155 11.67 7.75046V14.2505C11.67 14.4494 11.749 14.6401 11.8897 14.7808C12.0303 14.9214 12.2211 15.0005 12.42 15.0005C12.6189 15.0005 12.8097 14.9214 12.9503 14.7808C13.091 14.6401 13.17 14.4494 13.17 14.2505V7.75046Z",fill:e})}),Bn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M8.75 3.75C8.75 3.33579 8.41421 3 8 3C7.58579 3 7.25 3.33579 7.25 3.75V7.25H3.75C3.33579 7.25 3 7.58579 3 8C3 8.41421 3.33579 8.75 3.75 8.75L7.25 8.75V12.25C7.25 12.6642 7.58579 13 8 13C8.41421 13 8.75 12.6642 8.75 12.25V8.75L12.25 8.75C12.6642 8.75 13 8.41421 13 8C13 7.58579 12.6642 7.25 12.25 7.25H8.75V3.75Z",fill:e})}),Pn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M10.0036 8C10.7993 8 11.5623 7.68393 12.1249 7.12132C12.6875 6.55871 13.0036 5.79565 13.0036 5C13.0036 4.20435 12.6875 3.44129 12.1249 2.87868C11.5623 2.31607 10.7993 2 10.0036 2C9.20797 2 8.44491 2.31607 7.8823 2.87868C7.31969 3.44129 7.00362 4.20435 7.00362 5C7.00362 5.79565 7.31969 6.55871 7.8823 7.12132C8.44491 7.68393 9.20797 8 10.0036 8ZM3.46862 14.493C3.37578 14.7411 3.36554 15.0126 3.43941 15.267C3.51329 15.5214 3.66733 15.7452 3.87862 15.905C5.62995 17.266 7.7856 18.0034 10.0036 18C12.3136 18 14.4416 17.216 16.1346 15.9C16.5646 15.567 16.7386 14.997 16.5426 14.49C16.0349 13.168 15.1382 12.0311 13.9709 11.2292C12.8037 10.4274 11.4207 9.99829 10.0046 9.99861C8.58845 9.99894 7.20569 10.4287 6.03881 11.231C4.87193 12.0334 3.97578 13.1708 3.46862 14.493Z",fill:e})}),Hn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM9 11.5C9 12.0523 8.55228 12.5 8 12.5C7.44772 12.5 7 12.0523 7 11.5C7 10.9477 7.44772 10.5 8 10.5C8.55228 10.5 9 10.9477 9 11.5ZM7.29303 5.29289C7.68355 4.90237 8.31671 4.90237 8.70724 5.29289C9.09776 5.68342 9.09776 6.31658 8.70724 6.70711C8.58354 6.83081 8.43743 6.91429 8.2827 6.95959C7.82404 7.09387 7.25013 7.52576 7.25013 8.25V8.50022C7.25013 8.91444 7.58592 9.25022 8.00013 9.25022C8.41435 9.25022 8.75013 8.91444 8.75013 8.50022V8.38522C9.12313 8.26818 9.47391 8.06176 9.7679 7.76777C10.7442 6.79146 10.7442 5.20854 9.7679 4.23223C8.79159 3.25592 7.20868 3.25592 6.23237 4.23223C5.93947 4.52513 5.93947 5 6.23237 5.29289C6.52526 5.58579 7.00013 5.58579 7.29303 5.29289Z",fill:e})}),Dn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.60597 12.9691C4.85946 13.2967 4.79938 13.7678 4.47179 14.0213C3.87925 14.4798 3.5 15.1954 3.5 16C3.5 16.1569 3.51437 16.31 3.54177 16.4582C3.68996 16.4856 3.84307 16.5 4 16.5C4.80458 16.5 5.52023 16.1208 5.97873 15.5282C6.23222 15.2006 6.70328 15.1405 7.03087 15.394C7.35846 15.6475 7.41854 16.1186 7.16505 16.4462C6.4347 17.39 5.2884 18 4 18C3.54003 18 3.09667 17.9221 2.6834 17.778C2.46722 17.7027 2.29728 17.5328 2.22195 17.3166C2.07794 16.9033 2 16.46 2 16C2 14.7116 2.60997 13.5653 3.55383 12.835C3.88142 12.5815 4.35248 12.6415 4.60597 12.9691Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75236 12C6.40714 12.8376 7.16237 13.5929 8 14.2476V18.25C8 18.6642 8.33579 19 8.75 19C11.5114 19 13.75 16.7614 13.75 14C13.75 13.5097 13.6792 13.035 13.5471 12.5861C16.8467 10.2297 19 6.36651 19 2C19 1.91234 18.9991 1.82486 18.9974 1.73759C18.9894 1.33502 18.665 1.01058 18.2624 1.0026C18.1751 1.00087 18.0877 1 18 1C13.6335 1 9.77032 3.15331 7.41387 6.45291C6.96496 6.32078 6.49028 6.25 6 6.25C3.23858 6.25 1 8.48858 1 11.25C1 11.6642 1.33579 12 1.75 12H5.75236ZM13 9C14.1046 9 15 8.10457 15 7C15 5.89543 14.1046 5 13 5C11.8954 5 11 5.89543 11 7C11 8.10457 11.8954 9 13 9Z",fill:e})]}),Ge=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{width:o,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16Z",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M18 18L14 14",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),zn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M8 10C8 9.60218 8.15804 9.22064 8.43934 8.93934C8.72064 8.65804 9.10218 8.5 9.5 8.5C9.89782 8.5 10.2794 8.65804 10.5607 8.93934C10.842 9.22064 11 9.60218 11 10C11 10.3978 10.842 10.7794 10.5607 11.0607C10.2794 11.342 9.89782 11.5 9.5 11.5C9.10218 11.5 8.72064 11.342 8.43934 11.0607C8.15804 10.7794 8 10.3978 8 10Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 2C4.10218 2 3.72064 2.15804 3.43934 2.43934C3.15804 2.72065 3 3.10218 3 3.5V16.5C3 16.8978 3.15804 17.2794 3.43934 17.5607C3.72064 17.842 4.10218 18 4.5 18H15.5C15.8978 18 16.2794 17.842 16.5607 17.5607C16.842 17.2794 17 16.8978 17 16.5V7.621C16.9997 7.22331 16.8414 6.84204 16.56 6.561L12.44 2.439C12.3005 2.29961 12.1349 2.1891 11.9527 2.11377C11.7705 2.03844 11.5752 1.99978 11.378 2H4.5ZM9.5 7C9.03881 7.00024 8.58388 7.10681 8.17056 7.31143C7.75725 7.51605 7.39667 7.8132 7.11685 8.17981C6.83703 8.54641 6.64551 8.9726 6.55715 9.42525C6.46879 9.8779 6.48598 10.3448 6.60739 10.7897C6.7288 11.2347 6.95116 11.6456 7.25718 11.9906C7.5632 12.3357 7.94466 12.6055 8.3719 12.7792C8.79915 12.9528 9.26068 13.0257 9.72064 12.992C10.1806 12.9583 10.6266 12.819 11.024 12.585L12.22 13.78C12.2887 13.8537 12.3715 13.9128 12.4635 13.9538C12.5555 13.9948 12.6548 14.0168 12.7555 14.0186C12.8562 14.0204 12.9562 14.0018 13.0496 13.9641C13.143 13.9264 13.2278 13.8703 13.299 13.799C13.3703 13.7278 13.4264 13.643 13.4641 13.5496C13.5018 13.4562 13.5204 13.3562 13.5186 13.2555C13.5168 13.1548 13.4948 13.0555 13.4538 12.9635C13.4128 12.8715 13.3537 12.7887 13.28 12.72L12.085 11.524C12.3538 11.0683 12.4972 10.5496 12.5009 10.0206C12.5045 9.49158 12.3682 8.97099 12.1057 8.51165C11.8432 8.0523 11.464 7.67053 11.0063 7.40506C10.5487 7.13958 10.029 6.99984 9.5 7Z",fill:e})]}),Gn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:[t.jsx("path",{d:"M6.5 9C6.5 8.33696 6.76339 7.70107 7.23223 7.23223C7.70107 6.76339 8.33696 6.5 9 6.5C9.66304 6.5 10.2989 6.76339 10.7678 7.23223C11.2366 7.70107 11.5 8.33696 11.5 9C11.5 9.66304 11.2366 10.2989 10.7678 10.7678C10.2989 11.2366 9.66304 11.5 9 11.5C8.33696 11.5 7.70107 11.2366 7.23223 10.7678C6.76339 10.2989 6.5 9.66304 6.5 9Z",fill:e}),t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18ZM9 5C8.37415 5.0001 7.75705 5.14706 7.19833 5.42906C6.63961 5.71106 6.15485 6.12023 5.78304 6.62367C5.41124 7.12711 5.16275 7.71077 5.05756 8.32773C4.95238 8.94468 4.99343 9.5777 5.17741 10.1759C5.3614 10.7741 5.68319 11.3208 6.1169 11.772C6.55061 12.2232 7.08415 12.5663 7.67462 12.7738C8.26508 12.9813 8.89599 13.0473 9.51661 12.9666C10.1372 12.8859 10.7303 12.6606 11.248 12.309L12.72 13.78C12.7887 13.8537 12.8715 13.9128 12.9635 13.9538C13.0555 13.9948 13.1548 14.0168 13.2555 14.0186C13.3562 14.0204 13.4562 14.0018 13.5496 13.9641C13.643 13.9264 13.7278 13.8703 13.799 13.799C13.8703 13.7278 13.9264 13.643 13.9641 13.5496C14.0018 13.4562 14.0204 13.3562 14.0186 13.2555C14.0168 13.1548 13.9948 13.0555 13.9538 12.9635C13.9128 12.8715 13.8537 12.7887 13.78 12.72L12.309 11.248C12.7176 10.6467 12.9546 9.94532 12.9944 9.21939C13.0343 8.49346 12.8756 7.77039 12.5353 7.1279C12.195 6.48542 11.6861 5.94782 11.0632 5.5729C10.4403 5.19798 9.72702 4.99992 9 5Z",fill:e})]}),Un=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 14 16",fill:"none",children:[t.jsx("path",{d:"M7 5V8",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M3 11V9C3 8.4477 3.4477 8 4 8H10C10.5523 8 11 8.4477 11 9V11",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M7 5C8.10457 5 9 4.10457 9 3C9 1.89543 8.10457 1 7 1C5.89543 1 5 1.89543 5 3C5 4.10457 5.89543 5 7 5Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M3 15C4.10457 15 5 14.1046 5 13C5 11.8954 4.10457 11 3 11C1.89543 11 1 11.8954 1 13C1 14.1046 1.89543 15 3 15Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M11 15C12.1046 15 13 14.1046 13 13C13 11.8954 12.1046 11 11 11C9.89543 11 9 11.8954 9 13C9 14.1046 9.89543 15 11 15Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Vn=({fill:e="currentColor",width:o="21",height:n="21"})=>t.jsxs("svg",{width:o,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M22.392 10.5705C21.693 5.4495 17.313 1.5 12 1.5C6.201 1.5 1.5 6.201 1.5 12C1.5 14.064 2.1045 15.9825 3.132 17.6055L1.5 22.5L6.3945 20.868C7.6395 21.657 9.06 22.188 10.584 22.3965",stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M17.625 12.75L18.75 16.5L22.5 17.625L18.75 18.75L17.625 22.5L16.5 18.75L12.75 17.625L16.5 16.5L17.625 12.75Z",fill:e,stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]}),Fn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 14 14",fill:"none",children:[t.jsx("path",{d:"M13 1H1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M7 13V1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Yn=({fill:e="currentColor",width:o="20",height:n="20"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M11.2502 1C12.769 1 14.0002 2.23122 14.0002 3.75V4.19238C14.7954 4.26939 15.5841 4.3694 16.3655 4.49121C16.7747 4.555 17.0551 4.93847 16.9914 5.34766C16.9276 5.75685 16.5442 6.0373 16.135 5.97363C16.0856 5.96593 16.036 5.95771 15.9865 5.9502L15.1448 16.4697C15.0302 17.8987 13.8371 19 12.4035 19H7.5969C6.16331 19 4.97024 17.8987 4.85569 16.4697L4.01389 5.9502C3.96456 5.9577 3.91473 5.96595 3.86545 5.97363C3.45635 6.03717 3.07279 5.75678 3.00901 5.34766C2.94536 4.93848 3.2258 4.555 3.63499 4.49121C4.41637 4.3694 5.205 4.2694 6.00022 4.19238V3.75C6.00022 2.23122 7.23144 1 8.75022 1H11.2502ZM7.80002 7.00098C7.41217 7.01665 7.10455 7.32382 7.08127 7.70312V7.78027L7.38108 15.2803C7.39779 15.694 7.74659 16.0156 8.16038 15.999C8.57421 15.9824 8.89666 15.6336 8.8801 15.2197L8.57932 7.71973L8.57249 7.64355C8.51897 7.26722 8.18803 6.98546 7.80002 7.00098ZM12.2004 7.00098C11.7866 6.98443 11.4378 7.30599 11.4211 7.71973L11.1213 15.2197C11.1048 15.6335 11.4263 15.9823 11.8401 15.999C12.2538 16.0156 12.6026 15.694 12.6194 15.2803L12.9201 7.78027C12.9367 7.36644 12.6142 7.01761 12.2004 7.00098ZM8.75022 2.5C8.05986 2.5 7.50022 3.05964 7.50022 3.75V4.0752C8.32725 4.02543 9.16083 4 10.0002 4C10.8396 4 11.6732 4.02544 12.5002 4.0752V3.75C12.5002 3.05964 11.9406 2.5 11.2502 2.5H8.75022Z",fill:e})}),Zn=({fill:e="currentColor",width:o="16",height:n="16"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:n,viewBox:"0 0 16 16",fill:"none",children:[t.jsx("path",{d:"M3.75 2C2.7835 2 2 2.7835 2 3.75V5.25C2 5.66421 2.33579 6 2.75 6C3.16421 6 3.5 5.66421 3.5 5.25V3.75C3.5 3.61193 3.61193 3.5 3.75 3.5H5.25C5.66421 3.5 6 3.16421 6 2.75C6 2.33579 5.66421 2 5.25 2H3.75Z",fill:e}),t.jsx("path",{d:"M10.75 2C10.3358 2 10 2.33579 10 2.75C10 3.16421 10.3358 3.5 10.75 3.5H12.25C12.3881 3.5 12.5 3.61193 12.5 3.75V5.25C12.5 5.66421 12.8358 6 13.25 6C13.6642 6 14 5.66421 14 5.25V3.75C14 2.7835 13.2165 2 12.25 2H10.75Z",fill:e}),t.jsx("path",{d:"M3.5 10.75C3.5 10.3358 3.16421 10 2.75 10C2.33579 10 2 10.3358 2 10.75V12.25C2 13.2165 2.7835 14 3.75 14H5.25C5.66421 14 6 13.6642 6 13.25C6 12.8358 5.66421 12.5 5.25 12.5H3.75C3.61193 12.5 3.5 12.3881 3.5 12.25V10.75Z",fill:e}),t.jsx("path",{d:"M14 10.75C14 10.3358 13.6642 10 13.25 10C12.8358 10 12.5 10.3358 12.5 10.75V12.25C12.5 12.3881 12.3881 12.5 12.25 12.5H10.75C10.3358 12.5 10 12.8358 10 13.25C10 13.6642 10.3358 14 10.75 14H12.25C13.2165 14 14 13.2165 14 12.25V10.75Z",fill:e}),t.jsx("path",{d:"M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z",fill:e})]});var $=(e=>(e.BARS_3_BOTTOM_LEFT="bars-3-bottom-left",e.BUILDING="building",e.BULK_CHECK="bulk-check",e.CHECK="check",e.CHECK_CIRCLE="check-circle",e.CHECK_SQUARE="check-square",e.CHEVRON_DOWN="chevron-down",e.CLOSE="close",e.CODE="code",e.COMPUTER="computer",e.COPY="copy",e.CUBE="cube",e.DATABASE="database",e.EXCLAMATION_CIRCLE="exclamation-circle",e.EXCLAMATION_TRIANGLE="exclamation-triangle",e.GEAR="gear",e.GLobe="globe",e.HASHTAG="hashtag",e.HOME="home",e.INBOX="inbox",e.INFORMATION_CIRCLE="information-circle",e.INFORMATION_CIRCLE_MICRO="information-circle-micro",e.LAMP="lamp",e.LOCK_OPEN="lock-open",e.MINUS="minus",e.PAPER_PLANE="paper-plane",e.PENCIL="pencil",e.PIE_CHART="pie-chart",e.PIPELINE="pipeline",e.PLUS="plus",e.PROFILE="profile",e.QUESTION_CIRCLE="question-circle",e.ROCKET_LAUNCH="rocket-launch",e.SEARCH="search",e.SEARCH_DOCUMENT="search-document",e.SEARCH_SQL="search-sql",e.SITEMAP="sitemap",e.TETRASCIENCE_ICON="tetrascience-icon",e.TEXT="text",e.TRASH="trash",e.VIEWFINDER_CIRCLE="viewfinder-circle",e))($||{});const F=e=>{let o=null;const{name:n}=e;switch(n){case"bars-3-bottom-left":o=t.jsx(ln,{...e});break;case"building":o=t.jsx(cn,{...e});break;case"bulk-check":o=t.jsx(dn,{...e});break;case"check":o=t.jsx(un,{...e});break;case"check-circle":o=t.jsx(hn,{...e});break;case"check-square":o=t.jsx(pn,{...e});break;case"chevron-down":o=t.jsx(fn,{...e});break;case"close":o=t.jsx(mn,{...e});break;case"code":o=t.jsx(xn,{...e});break;case"computer":o=t.jsx(gn,{...e});break;case"copy":o=t.jsx(Cn,{...e});break;case"cube":o=t.jsx(bn,{...e});break;case"database":o=t.jsx(vn,{...e});break;case"exclamation-circle":o=t.jsx(yn,{...e});break;case"exclamation-triangle":o=t.jsx(wn,{...e});break;case"gear":o=t.jsx(jn,{...e});break;case"globe":o=t.jsx(kn,{...e});break;case"hashtag":o=t.jsx(_n,{...e});break;case"home":o=t.jsx(En,{...e});break;case"inbox":o=t.jsx(Mn,{...e});break;case"information-circle":o=t.jsx(Ln,{...e});break;case"information-circle-micro":o=t.jsx(Tn,{...e});break;case"lamp":o=t.jsx(An,{...e});break;case"lock-open":o=t.jsx(In,{...e});break;case"minus":o=t.jsx(Rn,{...e});break;case"paper-plane":o=t.jsx(Sn,{...e});break;case"pencil":o=t.jsx($n,{...e});break;case"pie-chart":o=t.jsx(Nn,{...e});break;case"pipeline":o=t.jsx(On,{...e});break;case"plus":o=t.jsx(Bn,{...e});break;case"profile":o=t.jsx(Pn,{...e});break;case"question-circle":o=t.jsx(Hn,{...e});break;case"rocket-launch":o=t.jsx(Dn,{...e});break;case"search":o=t.jsx(Ge,{...e});break;case"search-document":o=t.jsx(zn,{...e});break;case"search-sql":o=t.jsx(Gn,{...e});break;case"sitemap":o=t.jsx(Un,{...e});break;case"tetrascience-icon":o=t.jsx(Vn,{...e});break;case"text":o=t.jsx(Fn,{...e});break;case"trash":o=t.jsx(Yn,{...e});break;case"viewfinder-circle":o=t.jsx(Zn,{...e});break;default:throw`[Icon] name "${n}" does not exist`}return t.jsx("div",{style:{display:"inline-flex"},children:o})},Wn=l.label`
205
- display: inline-flex;
206
- align-items: center;
207
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
208
- opacity: ${e=>e.disabled?.6:1};
209
- padding: ${e=>e.$noPadding?"0":"12px 16px"};
210
- width: 100%;
211
- `,Kn=l.input.attrs({type:"checkbox"})`
212
- position: absolute;
213
- opacity: 0;
214
- height: 0;
215
- width: 0;
216
- `,Xn=l.div`
217
- display: flex;
218
- align-items: center;
219
- justify-content: center;
220
- width: 16px;
221
- height: 16px;
222
- background: ${e=>e.checked?"var(--blue-600)":"var(--white-900)"};
223
- border: 1px solid
224
- ${e=>e.checked?"var(--blue-600)":"var(--grey-300)"};
225
- border-radius: 3px;
226
- transition: all 0.2s;
227
-
228
- ${e=>!e.disabled&&`
229
- &:hover {
230
- border-color: var(--blue-600);
231
- }
232
- `}
233
- `,qn=()=>t.jsx(F,{name:$.CHECK_SQUARE,fill:"var(--blue-600)"}),Qn=l.span`
234
- margin-left: 10px;
235
- font-family: "Inter", sans-serif;
236
- font-size: 14px;
237
- font-style: normal;
238
- font-weight: 400;
239
- line-height: 20px;
240
- `,Ue=({checked:e=!1,onChange:o,disabled:n=!1,className:r,onClick:s,label:i,noPadding:a=!1,ref:u})=>{const c=f=>{!n&&o&&o(f.target.checked)},h=f=>{s&&s(f)};return t.jsxs(Wn,{className:r,disabled:n,$noPadding:a,onClick:h,children:[t.jsx(Kn,{ref:u,checked:e,onChange:c,disabled:n}),t.jsx(Xn,{checked:e,disabled:n,children:e&&t.jsx(qn,{})}),i&&t.jsx(Qn,{children:i})]})},Jn=l.div`
241
- position: relative;
242
- display: inline-flex;
243
- width: fit-content;
244
- `,er=l.div`
245
- position: absolute;
246
- background-color: var(--black);
247
- color: var(--white);
248
- padding: 8px 12px;
249
- border-radius: 6px;
250
- font-family: "Inter", sans-serif;
251
- font-size: 13px;
252
- font-weight: 400;
253
- line-height: 18px;
254
- max-width: 250px;
255
- min-width: min-content;
256
- width: max-content;
257
- z-index: 1000;
258
- opacity: 0;
259
- visibility: hidden;
260
- transition: opacity 0.2s, visibility 0.2s;
261
- white-space: normal;
262
- word-wrap: break-word;
263
- box-sizing: border-box;
264
- text-align: left;
265
-
266
- ${e=>e.$isVisible&&l.css`
267
- opacity: 1;
268
- visibility: visible;
269
- `}
270
-
271
- ${e=>{switch(e.placement){case"top":return l.css`
272
- bottom: 100%;
273
- left: 50%;
274
- transform: translateX(-50%) translateY(-8px);
275
-
276
- &::after {
277
- content: "";
278
- position: absolute;
279
- top: 100%;
280
- left: 50%;
281
- margin-left: -6px;
282
- border-width: 6px;
283
- border-style: solid;
284
- border-color: var(--black) transparent transparent transparent;
285
- }
286
- `;case"right":return l.css`
287
- top: 50%;
288
- left: 100%;
289
- transform: translateY(-50%) translateX(8px);
290
-
291
- &::after {
292
- content: "";
293
- position: absolute;
294
- top: 50%;
295
- right: 100%;
296
- margin-top: -6px;
297
- border-width: 6px;
298
- border-style: solid;
299
- border-color: transparent var(--black) transparent transparent;
300
- }
301
- `;case"bottom":return l.css`
302
- top: 100%;
303
- left: 50%;
304
- transform: translateX(-50%) translateY(8px);
305
-
306
- &::after {
307
- content: "";
308
- position: absolute;
309
- bottom: 100%;
310
- left: 50%;
311
- margin-left: -6px;
312
- border-width: 6px;
313
- border-style: solid;
314
- border-color: transparent transparent var(--black) transparent;
315
- }
316
- `;case"left":return l.css`
317
- top: 50%;
318
- right: 100%;
319
- transform: translateY(-50%) translateX(-8px);
320
-
321
- &::after {
322
- content: "";
323
- position: absolute;
324
- top: 50%;
325
- left: 100%;
326
- margin-top: -6px;
327
- border-width: 6px;
328
- border-style: solid;
329
- border-color: transparent transparent transparent var(--black);
330
- }
331
- `;default:return""}}}
332
- `,Ve=({content:e,children:o,placement:n="top",className:r,delay:s=100})=>{const[i,a]=d.useState(!1),u=d.useRef(null),c=()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{a(!0)},s)},h=()=>{u.current&&clearTimeout(u.current),a(!1)};return d.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),t.jsxs(Jn,{className:r,onMouseEnter:c,onMouseLeave:h,children:[o,t.jsx(er,{placement:n,$isVisible:i,children:e})]})},tr={},Ut={light:"github-light",dark:"dracula"},or=l.div`
333
- border-radius: 16px;
334
- overflow: hidden;
335
- background-color: ${e=>e.$themeMode==="dark"?"var(--grey-800)":"var(--grey-50)"};
336
- position: relative;
337
- border: 1px solid var(--grey-200);
338
- opacity: ${e=>e.disabled?.6:1};
339
- cursor: ${e=>e.disabled?"not-allowed":"default"};
340
- `,nr=l.div`
341
- margin-left: auto;
342
- display: flex;
343
- gap: 8px;
344
- padding: 8px 16px;
345
- position: absolute;
346
- top: 0;
347
- right: 0;
348
- z-index: 1;
349
- `,Vt=l.div`
350
- width: 32px;
351
- height: 32px;
352
- display: flex;
353
- align-items: center;
354
- justify-content: center;
355
- `,Ft=l(ae)`
356
- width: 100%;
357
- height: 100%;
358
- `,Me=({value:e,onChange:o,language:n="python",theme:r="dark",height:s=400,width:i="100%",options:a={},onCopy:u,onLaunch:c,disabled:h=!1})=>{const[f,b]=d.useState("Copy"),[x,E]=d.useState("Launch"),y=1e3,_=d.useCallback(v=>{u&&!h&&(u(v),b("Copied"),setTimeout(()=>{b("Copy")},y))},[u,h]),M=d.useCallback(v=>{c&&!h&&(c(v),E("Launched"),setTimeout(()=>{E("Launch")},y))},[c,h]),w=async v=>{const g=Ut[r];try{const p=zo[g];if(p){const k=tr[`/node_modules/monaco-themes/themes/${p}.json`];if(k){const T=(await k()).default;v.editor.defineTheme(g,T)}}v.editor.setTheme(g)}catch(p){console.error("Error loading theme:",p),v.editor.setTheme("vs-dark")}},m={minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"on",padding:{top:12,bottom:12,left:20,right:20},scrollbar:{vertical:"hidden",verticalScrollbarSize:0},readOnly:h,...a};return t.jsxs(or,{$themeMode:r,disabled:h,children:[t.jsxs(nr,{children:[u&&t.jsx(Ve,{content:f,placement:"bottom",children:t.jsx(Vt,{children:t.jsx(Ft,{variant:"tertiary",size:"small",leftIcon:t.jsx(F,{name:$.COPY}),noPadding:!0,fullWidth:!0,onClick:()=>_(e),disabled:h,children:null})})}),c&&t.jsx(Ve,{content:x,placement:"bottom",children:t.jsx(Vt,{children:t.jsx(Ft,{variant:"tertiary",size:"small",leftIcon:t.jsx(F,{name:$.ROCKET_LAUNCH}),noPadding:!0,fullWidth:!0,onClick:()=>M(e),disabled:h,children:null})})})]}),t.jsx(Do,{value:e,onChange:o,language:n,theme:Ut[r],height:s,width:i,options:m,beforeMount:w})]})},rr=l.div`
359
- position: relative;
360
- width: ${e=>e.width||"100%"};
361
- `,sr=l.button`
362
- display: flex;
363
- align-items: center;
364
- justify-content: space-between;
365
- width: 100%;
366
- height: ${e=>e.size==="xsmall"?"34px":"38px"};
367
- padding: 0 12px;
368
- background-color: ${e=>e.disabled?"var(--grey-100)":"var(--white-900)"};
369
- border: 1px solid
370
- ${e=>e.$error?"var(--red-error)":e.disabled?"var(--grey-200)":e.open?"var(--blue-600)":"var(--grey-300)"};
371
- border-radius: 6px;
372
- outline: none;
373
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
374
- user-select: ${e=>e.disabled?"none":"auto"};
375
- transition: all 0.2s ease;
376
- font-family: "Inter", sans-serif;
377
- font-size: 14px;
378
- font-weight: 400;
379
- line-height: 20px;
380
- text-align: left;
381
- color: ${e=>e.disabled?"var(--grey-400)":e.open?"var(--black-900)":"var(--grey-400)"};
382
-
383
- &:hover:not(:disabled) {
384
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
385
- color: var(--black-900) !important;
386
- }
387
-
388
- &:disabled {
389
- color: var(--grey-400) !important;
390
- border-color: var(--grey-300);
391
- }
392
-
393
- &:active:not(:disabled) {
394
- color: var(--black-900) !important;
395
- }
396
-
397
- &:focus {
398
- outline: none;
399
- box-shadow: ${e=>e.$error?"0px 0px 0px 3px var(--red-bg)":"0px 0px 0px 1px var(--white-900), 0px 0px 0px 3px var(--blue-600)"};
400
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
401
- }
402
- `,ir=l.div`
403
- width: 20px;
404
- height: 20px;
405
- transform: ${e=>e.open?"rotate(180deg)":"rotate(0deg)"};
406
- transition: transform 0.2s ease;
407
- color: var(--grey-600);
408
- display: flex;
409
- align-items: center;
410
- justify-content: center;
411
- `,ar=l.div`
412
- text-overflow: ellipsis;
413
- white-space: nowrap;
414
- overflow: hidden;
415
- flex: 1;
416
- text-align: left;
417
- display: block;
418
- max-width: calc(100% - 24px);
419
-
420
- .dropdown-menu-item {
421
- text-overflow: ellipsis;
422
- white-space: nowrap;
423
- overflow: hidden;
424
- }
425
- `,lr=l.ul`
426
- position: absolute;
427
- top: calc(100% + 4px);
428
- left: 0;
429
- width: ${e=>e.menuWidth||"calc(100% - 2px)"};
430
- max-height: 200px;
431
- overflow-y: auto;
432
- background-color: var(--white-900);
433
- border: 1px solid var(--grey-200);
434
- border-radius: 6px;
435
- box-shadow: 0px 4px 8px var(--black-100);
436
- z-index: 10;
437
- padding: 4px 0;
438
- margin: 0;
439
- list-style: none;
440
- `,cr=l.div`
441
- display: flex;
442
- flex-direction: column;
443
- align-items: center;
444
- justify-content: center;
445
- padding: 16px;
446
- color: var(--grey-400);
447
- `,dr=l.p`
448
- margin: 8px 0 0 0;
449
- font-family: "Inter", sans-serif;
450
- font-size: 14px;
451
- line-height: 20px;
452
- text-align: center;
453
- `,ur=l.li`
454
- padding: 8px 12px;
455
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
456
- background-color: ${e=>e.selected?"var(--blue-50)":"transparent"};
457
- color: ${e=>e.disabled?"var(--grey-400)":(e.selected,"var(--blue-900)")};
458
- font-family: "Inter", sans-serif;
459
- font-size: 14px;
460
- line-height: 20px;
461
- transition: background-color 0.2s ease;
462
- outline: none;
463
-
464
- &:hover:not(:disabled) {
465
- background-color: ${e=>e.selected?"var(--blue-50)":"var(--grey-50)"};
466
- }
467
-
468
- &:focus-visible {
469
- background-color: var(--blue-50);
470
- outline: 2px solid var(--blue-600);
471
- outline-offset: -2px;
472
- }
473
- `,Le=({options:e=[],value:o,placeholder:n="Select an option",disabled:r=!1,error:s=!1,size:i="small",onChange:a,onOpen:u,onClose:c,width:h,menuWidth:f})=>{const[b,x]=d.useState(!1),[E,y]=d.useState(o||""),_=d.useRef(null),M=d.useRef([]);d.useEffect(()=>{o!==void 0&&y(o)},[o]),d.useEffect(()=>{const L=j=>{_.current&&!_.current.contains(j.target)&&b&&(x(!1),c?.())};return document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[b,c]),d.useEffect(()=>{b&&(M.current=M.current.slice(0,e.length))},[b,e.length]),d.useEffect(()=>{if(b&&M.current.length>0){const L=e.findIndex(R=>R.value===E),j=L>=0?L:0;setTimeout(()=>{M.current[j]&&M.current[j]?.focus()},10)}},[b,e,E]);const w=()=>{if(!r){const L=!b;x(L),L?u?.():c?.()}},m=L=>{L.disabled||(y(L.value),x(!1),a?.(L.value),c?.())},v=L=>{for(let j=L+1;j<e.length;j++)if(!e[j].disabled)return j;return-1},g=L=>{for(let j=L-1;j>=0;j--)if(!e[j].disabled)return j;return-1},p=(L,j)=>{const R=e[j];switch(L.key){case"Enter":case" ":L.preventDefault(),R.disabled||m(R);break;case"ArrowDown":{L.preventDefault();const N=v(j);N!==-1&&M.current[N]?.focus();break}case"ArrowUp":{L.preventDefault();const N=g(j);N!==-1&&M.current[N]?.focus();break}case"Escape":L.preventDefault(),x(!1),c?.();break;case"Tab":x(!1),c?.();break}},k=L=>{if(!r)switch(L.key){case"Enter":case" ":case"ArrowDown":L.preventDefault(),b||(x(!0),u?.());break;case"Escape":L.preventDefault(),b&&(x(!1),c?.());break}},T=e.find(L=>L.value===E),I=T?T.label:n;return t.jsxs(rr,{ref:_,width:h,children:[t.jsxs(sr,{type:"button",onClick:w,onKeyDown:k,open:b,disabled:r,$error:s,size:i,"aria-haspopup":"listbox","aria-expanded":b,"aria-label":n,children:[t.jsx(ar,{children:I}),t.jsx(ir,{open:b,children:t.jsx(F,{name:$.CHEVRON_DOWN,fill:"var(--grey-600)"})})]}),b&&t.jsx(lr,{role:"listbox","aria-labelledby":"dropdown-button",menuWidth:f,children:e.length>0?e.map((L,j)=>t.jsx(ur,{ref:R=>{M.current[j]=R},selected:L.value===E,disabled:L.disabled,onClick:()=>m(L),onKeyDown:R=>p(R,j),tabIndex:L.disabled?-1:0,role:"option","aria-selected":L.value===E,"aria-disabled":L.disabled,children:L.label},L.value)):t.jsxs(cr,{children:[t.jsx(F,{name:$.INBOX,fill:"var(--grey-400)",width:"24px",height:"24px"}),t.jsx(dr,{children:"No Data"})]})})]})},hr=l.div`
474
- width: 100%;
475
- padding: 15px;
476
- border-radius: 4px;
477
- margin-bottom: 16px;
478
- background-color: #fff2f0;
479
- border: 1px solid #ffccc7;
480
- display: flex;
481
- flex-direction: column;
482
- gap: 8px;
483
- box-sizing: border-box;
484
- `,pr=l.div`
485
- display: flex;
486
- justify-content: space-between;
487
- align-items: flex-start;
488
- `,fr=l.div`
489
- color: #ff4d4f;
490
- font-size: 18px;
491
- margin-right: 12px;
492
- display: flex;
493
- align-items: center;
494
- `,mr=l.button`
495
- background: none;
496
- border: none;
497
- font-size: 16px;
498
- cursor: pointer;
499
- color: rgba(0, 0, 0, 0.45);
500
- padding: 0;
501
- line-height: 1;
502
- &:hover {
503
- color: rgba(0, 0, 0, 0.75);
504
- }
505
- `,xr=l.div`
506
- font-weight: 500;
507
- font-size: 16px;
508
- display: flex;
509
- align-items: center;
510
- flex-grow: 1;
511
- `,gr=l.div`
512
- display: flex;
513
- flex-direction: column;
514
- gap: 8px;
515
- width: 100%;
516
- `,Yt=l.p`
517
- margin: 0;
518
- padding: 0;
519
- line-height: 1.5;
520
- `,mo=l.span`
521
- font-weight: ${e=>e.$strong?"600":"400"};
522
- color: ${e=>e.$type==="secondary"?"rgba(0, 0, 0, 0.45)":"inherit"};
523
- `,Cr=l(mo).attrs({$type:"secondary"})``,br=l.div`
524
- margin-left: -15px;
525
- margin-right: -15px;
526
- margin-bottom: -5px;
527
- `,vr=l.div`
528
- padding: 12px 16px;
529
- cursor: pointer;
530
- display: flex;
531
- align-items: center;
532
- user-select: none;
533
-
534
- &:hover {
535
- background-color: rgba(0, 0, 0, 0.02);
536
- }
537
-
538
- &::after {
539
- content: "${e=>e.$isActive?"▼":"▶"}";
540
- font-size: 12px;
541
- margin-left: 8px;
542
- }
543
- `,yr=l.div`
544
- padding: ${e=>e.$isVisible?"0 16px 12px":"0 16px"};
545
- max-height: ${e=>e.$isVisible?"300px":"0"};
546
- overflow: hidden;
547
- transition: max-height 0.3s ease;
548
- `,wr=l.pre`
549
- white-space: pre-wrap;
550
- word-break: break-all;
551
- max-height: 300px;
552
- overflow-y: auto;
553
- background: #f5f5f5;
554
- padding: 10px;
555
- border-radius: 4px;
556
- margin: 0;
557
- `;function jr(e){return typeof e=="object"&&e!==null&&"isAxiosError"in e&&e.isAxiosError===!0}function kr(e){if(typeof e=="string")return{description:e,details:null};if(e&&typeof e=="object"){const o=e.detail||e.message||e.error;return typeof o=="string"?{description:o,details:null}:{description:"Check details for response data.",details:JSON.stringify(e,null,2)}}return{description:null,details:null}}function _r(e){let o="Network/API Error",n=e.message,r=null,s=null;if(e.response){const{status:i,statusText:a,data:u}=e.response;n=`API Error: ${i} ${a}`;const c=kr(u);r=c.description??`Request failed with status code ${i}.`,s=`URL: ${e.config?.method?.toUpperCase()} ${e.config?.url}
558
- Status: ${i} ${a}
559
- Response Data:
560
- ${c.details??JSON.stringify(u,null,2)}`}else e.request?(o="Network Error",n="Network Error: Could not reach the server.",r="Please check your internet connection or contact support if the problem persists.",s=`URL: ${e.config?.method?.toUpperCase()} ${e.config?.url}
561
- Error Message: ${e.message}`):n=`Request Setup Error: ${e.message}`;return e.code&&(o+=` (Code: ${e.code})`),{message:n,description:r,details:s,errorType:o}}function Er(e){return{message:e.message,description:null,details:e.stack??"No stack trace available.",errorType:e.name||"Error"}}function Mr(e){const o=e.message||e.error||"An object was thrown as an error.";let n;try{n=JSON.stringify(e,null,2)}catch{n="Could not stringify the error object."}return{message:o,description:null,details:n,errorType:"Object Error"}}function Lr(e){return jr(e)?_r(e):e instanceof Error?Er(e):typeof e=="string"?{message:e,description:null,details:null,errorType:"Message"}:typeof e=="object"&&e!==null?Mr(e):{message:"An unexpected error occurred.",description:null,details:null,errorType:"Unknown Error"}}const Tr=({children:e,header:o,defaultExpanded:n=!1})=>{const[r,s]=d.useState(n);return t.jsxs("div",{children:[t.jsx(vr,{$isActive:r,onClick:()=>s(!r),children:o}),t.jsx(yr,{$isVisible:r,children:e})]})},xo=({error:e,title:o="An Error Occurred",onClose:n,showDetailsDefault:r=!1})=>{if(!e)return t.jsx(t.Fragment,{});const{message:s,description:i,details:a,errorType:u}=Lr(e);return t.jsxs(hr,{type:"error",children:[t.jsxs(pr,{children:[t.jsxs(xr,{children:[t.jsx(fr,{children:"⚠️"}),o]}),n&&t.jsx(mr,{onClick:n,children:"✕"})]}),t.jsxs(gr,{children:[t.jsxs(Yt,{children:[t.jsxs(mo,{$strong:!0,children:[u,":"]})," ",s]}),i&&t.jsx(Yt,{children:t.jsx(Cr,{children:i})}),a&&t.jsx(br,{children:t.jsx(Tr,{header:"Details",defaultExpanded:r,children:t.jsx(wr,{children:a})})})]})]})},Ar={xsmall:l.css`
562
- height: 32px;
563
- padding: ${e=>e.$hasIconLeft&&e.$hasIconRight?"0 32px 0 32px":e.$hasIconLeft?"0 10px 0 32px":e.$hasIconRight?"0 32px 0 10px":"0 10px"};
564
- `,small:l.css`
565
- height: 36px;
566
- padding: ${e=>e.$hasIconLeft&&e.$hasIconRight?"0 38px 0 38px":e.$hasIconLeft?"0 12px 0 38px":e.$hasIconRight?"0 38px 0 12px":"0 12px"};
567
- `},Ir=l.div`
568
- position: relative;
569
- display: inline-flex;
570
- align-items: center;
571
- width: 100%;
572
- gap: 8px;
573
- `,Rr=l.input`
574
- width: 100%;
575
- border-radius: 6px;
576
- font-family: "Inter", sans-serif;
577
- font-size: 14px;
578
- font-style: normal;
579
- font-weight: 400;
580
- line-height: 20px;
581
- border: 1px solid
582
- ${e=>e.$error?"var(--red-error)":(e.disabled,"var(--grey-300)")};
583
- background-color: ${e=>e.disabled?"var(--grey-200)":"var(--white-900)"};
584
- color: ${e=>e.disabled?"var(--grey-400)":"var(--black-900)"};
585
- transition: all 0.2s;
586
-
587
- ${e=>Ar[e.size||"small"]}
588
-
589
- &:hover:not(:disabled):not(:focus) {
590
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
591
- }
592
-
593
- &:focus {
594
- outline: none;
595
- box-shadow: 0px 0px 0px 1px var(--white-900),
596
- 0px 0px 0px 3px var(--blue-600);
597
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
598
- }
599
-
600
- &:active {
601
- outline: none;
602
- box-shadow: 0px 0px 0px 2px var(--blue-200);
603
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
604
- }
605
-
606
- &:disabled {
607
- cursor: not-allowed;
608
- user-select: none;
609
- pointer-events: none;
610
- }
611
-
612
- &::placeholder {
613
- color: var(--grey-400);
614
- }
615
- `,Zt=l.div`
616
- position: absolute;
617
- display: flex;
618
- align-items: center;
619
- justify-content: center;
620
- pointer-events: none;
621
- color: var(--grey-400);
622
- ${e=>e.position==="left"?"left: 10px;":"right: 10px;"}
623
- ${e=>e.size==="xsmall"?"width: 16px; height: 16px;":"width: 20px; height: 20px;"}
624
- `,We=({size:e="small",iconLeft:o,iconRight:n,error:r=!1,disabled:s=!1,ref:i,...a})=>t.jsxs(Ir,{size:e,disabled:s,$error:r,children:[o&&t.jsx(Zt,{position:"left",size:e,children:o}),t.jsx(Rr,{ref:i,size:e,$hasIconLeft:!!o,$hasIconRight:!!n,$error:r,disabled:s,...a}),n&&t.jsx(Zt,{position:"right",size:e,children:n})]}),Sr=l.div`
625
- display: flex;
626
- flex-direction: column;
627
- gap: 4px;
628
- `,$r=l.div`
629
- display: flex;
630
- align-items: center;
631
- gap: 6px;
632
- color: var(--grey-600);
633
- text-overflow: ellipsis;
634
- font-family: "Inter", sans-serif;
635
- font-size: 13px;
636
- font-style: normal;
637
- font-weight: 400;
638
- line-height: 18px;
639
- `,Nr=()=>t.jsx(F,{name:$.INFORMATION_CIRCLE_MICRO,fill:"var(--grey-600)"}),Or=l.span`
640
- display: inline-flex;
641
- cursor: help;
642
- `,bt=({children:e,infoText:o,className:n})=>t.jsx(Sr,{className:n,children:t.jsxs($r,{children:[e,o&&t.jsx(Ve,{content:o,placement:"bottom",children:t.jsx(Or,{children:t.jsx(Nr,{})})})]})}),Br={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2E3440",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2E3440",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#636f88"},prolog:{color:"#636f88"},doctype:{color:"#636f88"},cdata:{color:"#636f88"},punctuation:{color:"#81A1C1"},".namespace":{Opacity:".7"},property:{color:"#81A1C1"},tag:{color:"#81A1C1"},constant:{color:"#81A1C1"},symbol:{color:"#81A1C1"},deleted:{color:"#81A1C1"},number:{color:"#B48EAD"},boolean:{color:"#81A1C1"},selector:{color:"#A3BE8C"},"attr-name":{color:"#A3BE8C"},string:{color:"#A3BE8C"},char:{color:"#A3BE8C"},builtin:{color:"#A3BE8C"},inserted:{color:"#A3BE8C"},operator:{color:"#81A1C1"},entity:{color:"#81A1C1",cursor:"help"},url:{color:"#81A1C1"},".language-css .token.string":{color:"#81A1C1"},".style .token.string":{color:"#81A1C1"},variable:{color:"#81A1C1"},atrule:{color:"#88C0D0"},"attr-value":{color:"#88C0D0"},function:{color:"#88C0D0"},"class-name":{color:"#88C0D0"},keyword:{color:"#81A1C1"},regex:{color:"#EBCB8B"},important:{color:"#EBCB8B",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},Pr=2e3,Hr=l.code`
643
- background-color: rgba(0, 0, 0, 0.05);
644
- border-radius: 3px;
645
- font-family: "Courier New", Courier, monospace;
646
- padding: 0.2em 0.4em;
647
- font-size: 85%;
648
- `,Dr=({inline:e,className:o,children:n,...r})=>{const s=/language-(\w+)/.exec(o||""),i=s?s[1]:void 0,a=String(n).replace(/\n$/,""),[u,c]=d.useState(!1),h=b=>{console.log(b)},f=async()=>{if(!navigator.clipboard){console.error("Clipboard API not available."),h("Clipboard access not available or denied.");return}try{await navigator.clipboard.writeText(a),c(!0),h("Code copied to clipboard!"),setTimeout(()=>c(!1),Pr)}catch(b){console.error("Failed to copy code: ",b),c(!1)}};return!e&&s?t.jsxs("div",{className:"code-block-container",children:[t.jsx("div",{className:"copy-button-wrapper",children:t.jsx(ae,{size:"small",leftIcon:t.jsx(F,{name:$.COPY}),onClick:f,"aria-label":"Copy code to clipboard",children:u?"Copied!":"Copy"})}),d.createElement(Uo.Prism,{style:Br,language:i,PreTag:"div",children:a})]}):t.jsx(Hr,{...r,children:n})},zr=({markdown:e,codeRenderer:o})=>t.jsx(Go,{remarkPlugins:[Fo],rehypePlugins:[Vo],components:{code:o||Dr},children:e}),Gr=l.div`
649
- display: flex;
650
- align-items: center;
651
- justify-content: space-between;
652
- font-size: 14px;
653
- gap: 10px;
654
- color: ${e=>e.$active?"var(--blue-900)":"var(--grey-600)"};
655
- cursor: pointer;
656
- transition: all 0.2s;
657
- user-select: none;
658
- border-bottom: 1px solid var(--grey-200);
659
- background-color: ${e=>e.$active?"var(--grey-100)":"var(--white-900)"};
660
- padding: ${e=>e.$showCheckbox?"0":"12px 16px"};
661
-
662
- &:hover {
663
- background-color: ${e=>e.$active?"var(--grey-100)":"var(--grey-50)"};
664
- }
665
-
666
- &:last-child {
667
- border-bottom: none;
668
- }
669
- `,Ur=l.div`
670
- display: flex;
671
- align-items: center;
672
- gap: 12px;
673
- flex: 1;
674
- `,Vr=l.div`
675
- display: flex;
676
- align-items: center;
677
- justify-content: flex-start;
678
- flex: 1;
679
- width: 100%;
680
- `,go=({label:e,checked:o=!1,showCheckbox:n=!1,onClick:r,onCheckChange:s,active:i=!1,className:a,ref:u})=>{const c=()=>{console.log("MenuItem clicked!"),r&&r()},h=b=>{console.log("Checkbox changed:",b),s&&s(b)},f=b=>{console.log("Checkbox clicked!"),b.stopPropagation()};return t.jsxs(Gr,{ref:u,$active:i,$showCheckbox:n,className:a,onClick:c,role:"button",tabIndex:0,children:[!n&&t.jsx(Ur,{children:e}),n&&t.jsx(Vr,{onClick:f,children:t.jsx(Ue,{checked:o,onChange:h,onClick:f,label:e})})]})},Wt=300,Fr=l.createGlobalStyle`
681
- body.stop-scrolling {
682
- overflow: hidden;
683
- }
684
- `,Yr=l.keyframes`
685
- from {
686
- opacity: 0;
687
- }
688
- to {
689
- opacity: 1;
690
- }
691
- `,Zr=l.keyframes`
692
- from {
693
- opacity: 1;
694
- }
695
- to {
696
- opacity: 0;
697
- }
698
- `,Wr=l.keyframes`
699
- from {
700
- opacity: 0;
701
- }
702
- to {
703
- opacity: 1;
704
- }
705
- `,Kr=l.keyframes`
706
- from {
707
- opacity: 1;
708
- }
709
- to {
710
- opacity: 0;
711
- }
712
- `,Xr=l.div`
713
- position: fixed;
714
- top: 0;
715
- right: 0;
716
- bottom: 0;
717
- left: 0;
718
- z-index: 10000;
719
- animation: ${e=>e.$isFadeOut?Zr:Yr} 0.3s
720
- ease forwards;
721
- display: flex;
722
- align-items: center;
723
- justify-content: center;
724
- `,qr=l.button`
725
- background-color: var(--black-500);
726
- position: absolute;
727
- top: 0;
728
- right: 0;
729
- bottom: 0;
730
- left: 0;
731
- backdrop-filter: blur(2px);
732
- box-shadow: none;
733
- border: none;
734
- height: 100%;
735
- animation: ${e=>e.$isFadeOut?Kr:Wr}
736
- 0.3s ease forwards;
737
- `,Qr=l.div`
738
- position: relative;
739
- background: var(--theme-background, var(--white-900));
740
- border-radius: var(--theme-radius-large, 16px);
741
- width: ${e=>e.width||"480px"};
742
- max-width: 90vw;
743
- padding: 0;
744
- box-shadow: 0px 4px 12px 0px var(--black-100),
745
- 0px 2px 4px -2px var(--black-100);
746
- z-index: 1;
747
- transform: ${e=>e.$isFadeOut?"scale(0.95)":"scale(1)"};
748
- opacity: ${e=>e.$isFadeOut?0:1};
749
- transition: transform 0.3s ease-out, opacity 0.3s ease-out;
750
- max-height: 90vh;
751
- display: flex;
752
- flex-direction: column;
753
-
754
- @media (max-width: 767px) {
755
- width: calc(100% - 40px) !important;
756
- }
757
- `,Jr=l.div`
758
- display: flex;
759
- flex-direction: row;
760
- justify-content: space-between;
761
- align-items: center;
762
- padding: 12px 24px;
763
- border-bottom: 1px solid var(--grey-100);
764
- `,es=l.h3`
765
- margin: 0;
766
- font-family: "Inter", sans-serif;
767
- font-size: 18px;
768
- font-style: normal;
769
- font-weight: 500;
770
- line-height: 28px;
771
- color: var(--black-900);
772
- `,Kt=l.button`
773
- background: none;
774
- border: none;
775
- cursor: pointer;
776
- padding: 0;
777
- display: flex;
778
- align-items: center;
779
- justify-content: center;
780
- color: var(--black-900);
781
- width: 24px;
782
- height: 24px;
783
- ${e=>e.$absolute&&`
784
- position: absolute;
785
- top: 16px;
786
- right: 16px;
787
- `}
788
-
789
- &:hover {
790
- color: var(--black-900);
791
- }
792
-
793
- svg {
794
- width: 20px;
795
- height: 20px;
796
- }
797
- `,ts=l.div`
798
- padding: 12px;
799
- display: flex;
800
- justify-content: flex-end;
801
- gap: 12px;
802
-
803
- @media (max-width: 767px) {
804
- justify-content: center !important;
805
-
806
- .button {
807
- display: flex !important;
808
- width: 100%;
809
- }
810
- }
811
- `,os=l.div`
812
- color: var(--grey-500);
813
- font-family: "Inter", sans-serif;
814
- font-size: 14px;
815
- font-style: normal;
816
- font-weight: 400;
817
- line-height: 20px;
818
- margin: 0 24px;
819
- overflow-y: auto;
820
- flex: 1;
821
- max-height: calc(90vh - 140px); /* Account for header and footer */
822
- `,vt=({isOpen:e,onClose:o,onCloseLabel:n,onConfirm:r,onConfirmLabel:s,children:i,width:a="400px",className:u="",hideActions:c=!1,title:h})=>{const[f,b]=d.useState(!1),[x,E]=d.useState(!1),y=d.useRef(null);d.useEffect(()=>{if(e)b(!0),E(!1);else{if(!f)return;E(!0),y.current=setTimeout(()=>{b(!1)},Wt)}return()=>{y.current&&clearTimeout(y.current)}},[e,f]),d.useEffect(()=>(f?typeof document<"u"&&document.body.classList.add("stop-scrolling"):typeof document<"u"&&document.body.classList.remove("stop-scrolling"),()=>{typeof document<"u"&&document.body.classList.remove("stop-scrolling")}),[f]);const _=()=>{E(!0),y.current=setTimeout(()=>{o()},Wt)};return f&&t.jsxs(t.Fragment,{children:[t.jsx(Fr,{}),t.jsxs(Xr,{$isFadeOut:x,className:u,children:[t.jsx(qr,{$isFadeOut:x,onClick:_}),t.jsxs(Qr,{$isFadeOut:x,width:a,children:[h&&t.jsxs(Jr,{children:[t.jsx(es,{children:h}),t.jsx(Kt,{onClick:_,children:t.jsx(F,{name:$.CLOSE})})]}),!h&&t.jsx(Kt,{$absolute:!0,onClick:_,children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),t.jsx(os,{children:i}),!c&&t.jsxs(ts,{children:[t.jsx(ae,{variant:"tertiary",onClick:_,className:"button",size:"medium",fullWidth:!0,children:n||"Cancel"}),t.jsx(ae,{variant:"primary",onClick:r,className:"button",size:"medium",fullWidth:!0,children:s||"Confirm"})]})]})]})]})},ns=l.div`
823
- position: absolute;
824
- background-color: var(--white-900);
825
- border-radius: 8px;
826
- box-shadow: 0 3px 6px -4px var(--black-200), 0 6px 16px 0 var(--black-100),
827
- 0 9px 28px 8px var(--black-50);
828
- z-index: 1000;
829
- max-width: 450px;
830
- min-width: 400px;
831
- opacity: 0;
832
- visibility: hidden;
833
- transition: opacity 0.2s, visibility 0.2s;
834
- user-select: none;
835
- padding: 0;
836
- font-family: "Inter", sans-serif;
837
-
838
- ${e=>e.$isVisible&&l.css`
839
- opacity: 1;
840
- visibility: visible;
841
- `}
842
-
843
- ${e=>{switch(e.placement){case"top":return l.css`
844
- bottom: 100%;
845
- left: 50%;
846
- transform: translateX(-50%) translateY(-15px);
847
-
848
- &::after {
849
- content: "";
850
- position: absolute;
851
- top: 100%;
852
- left: 50%;
853
- margin-left: -6px;
854
- border-width: 6px;
855
- border-style: solid;
856
- border-color: var(--white-900) transparent transparent transparent;
857
- }
858
- `;case"topLeft":return l.css`
859
- bottom: 100%;
860
- left: 0;
861
- transform: translateY(-15px);
862
-
863
- &::after {
864
- content: "";
865
- position: absolute;
866
- top: 100%;
867
- left: 12px;
868
- border-width: 6px;
869
- border-style: solid;
870
- border-color: var(--white-900) transparent transparent transparent;
871
- }
872
- `;case"topRight":return l.css`
873
- bottom: 100%;
874
- right: 0;
875
- transform: translateY(-15px);
876
-
877
- &::after {
878
- content: "";
879
- position: absolute;
880
- top: 100%;
881
- right: 12px;
882
- border-width: 6px;
883
- border-style: solid;
884
- border-color: var(--white-900) transparent transparent transparent;
885
- }
886
- `;case"left":return l.css`
887
- top: 50%;
888
- right: 100%;
889
- transform: translateY(-50%) translateX(-15px);
890
-
891
- &::after {
892
- content: "";
893
- position: absolute;
894
- top: 50%;
895
- left: 100%;
896
- margin-top: -6px;
897
- border-width: 6px;
898
- border-style: solid;
899
- border-color: transparent transparent transparent var(--white-900);
900
- }
901
- `;case"leftTop":return l.css`
902
- top: 0;
903
- right: 100%;
904
- transform: translateX(-15px);
905
-
906
- &::after {
907
- content: "";
908
- position: absolute;
909
- top: 12px;
910
- left: 100%;
911
- border-width: 6px;
912
- border-style: solid;
913
- border-color: transparent transparent transparent var(--white-900);
914
- }
915
- `;case"leftBottom":return l.css`
916
- bottom: 0;
917
- right: 100%;
918
- transform: translateX(-15px);
919
-
920
- &::after {
921
- content: "";
922
- position: absolute;
923
- bottom: 12px;
924
- left: 100%;
925
- border-width: 6px;
926
- border-style: solid;
927
- border-color: transparent transparent transparent var(--white-900);
928
- }
929
- `;case"right":return l.css`
930
- top: 50%;
931
- left: 100%;
932
- transform: translateY(-50%) translateX(15px);
933
-
934
- &::after {
935
- content: "";
936
- position: absolute;
937
- top: 50%;
938
- right: 100%;
939
- margin-top: -6px;
940
- border-width: 6px;
941
- border-style: solid;
942
- border-color: transparent var(--white-900) transparent transparent;
943
- }
944
- `;case"rightTop":return l.css`
945
- top: 0;
946
- left: 100%;
947
- transform: translateX(15px);
948
-
949
- &::after {
950
- content: "";
951
- position: absolute;
952
- top: 12px;
953
- right: 100%;
954
- border-width: 6px;
955
- border-style: solid;
956
- border-color: transparent var(--white-900) transparent transparent;
957
- }
958
- `;case"rightBottom":return l.css`
959
- bottom: 0;
960
- left: 100%;
961
- transform: translateX(15px);
962
-
963
- &::after {
964
- content: "";
965
- position: absolute;
966
- bottom: 12px;
967
- right: 100%;
968
- border-width: 6px;
969
- border-style: solid;
970
- border-color: transparent var(--white-900) transparent transparent;
971
- }
972
- `;case"bottom":return l.css`
973
- top: 100%;
974
- left: 50%;
975
- transform: translateX(-50%) translateY(15px);
976
-
977
- &::after {
978
- content: "";
979
- position: absolute;
980
- bottom: 100%;
981
- left: 50%;
982
- margin-left: -6px;
983
- border-width: 6px;
984
- border-style: solid;
985
- border-color: transparent transparent var(--white-900) transparent;
986
- }
987
- `;case"bottomLeft":return l.css`
988
- top: 100%;
989
- left: 0;
990
- transform: translateY(15px);
991
-
992
- &::after {
993
- content: "";
994
- position: absolute;
995
- bottom: 100%;
996
- left: 12px;
997
- border-width: 6px;
998
- border-style: solid;
999
- border-color: transparent transparent var(--white-900) transparent;
1000
- }
1001
- `;case"bottomRight":return l.css`
1002
- top: 100%;
1003
- right: 0;
1004
- transform: translateY(15px);
1005
-
1006
- &::after {
1007
- content: "";
1008
- position: absolute;
1009
- bottom: 100%;
1010
- right: 12px;
1011
- border-width: 6px;
1012
- border-style: solid;
1013
- border-color: transparent transparent var(--white-900) transparent;
1014
- }
1015
- `;default:return""}}}
1016
- `,rs=l.div`
1017
- padding: 12px 16px;
1018
- color: var(--black-800);
1019
- font-weight: 600;
1020
- font-size: 14px;
1021
- border-bottom: 1px solid var(--grey-100);
1022
- `,ss=l.div`
1023
- padding: 12px 16px;
1024
- color: var(--grey-600);
1025
- font-size: 14px;
1026
- `,is=l.div`
1027
- display: flex;
1028
- justify-content: flex-end;
1029
- gap: 8px;
1030
- padding: 8px 16px 12px;
1031
- `,as=l.div`
1032
- position: relative;
1033
- display: inline-block;
1034
- `,Co=({title:e,description:o,onConfirm:n,onCancel:r,okText:s="OK",cancelText:i="Cancel",placement:a="top",children:u,className:c,okButtonProps:h,cancelButtonProps:f,...b})=>{const[x,E]=d.useState(!1),y=d.useRef(null);d.useEffect(()=>{const v=g=>{y.current&&!y.current.contains(g.target)&&E(!1)};return x&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[x]);const _=v=>{E(!1),n?.(v)},M=v=>{E(!1),r?.(v)},w=()=>{E(!x)},m=v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),w())};return t.jsxs(as,{ref:y,className:c,...b,children:[t.jsx("div",{onClick:w,onKeyDown:m,role:"button",tabIndex:0,children:u}),t.jsxs(ns,{placement:a,$isVisible:x,children:[e&&t.jsx(rs,{children:e}),o&&t.jsx(ss,{children:o}),t.jsxs(is,{children:[t.jsx(ae,{variant:"tertiary",size:"small",onClick:M,...f,children:i}),t.jsx(ae,{variant:"primary",size:"small",onClick:_,...h,children:s})]})]})]})};Co.displayName="PopConfirm";const ls=l.div`
1035
- display: flex;
1036
- align-items: center;
1037
- gap: 6px;
1038
- color: var(--grey-600);
1039
- text-overflow: ellipsis;
1040
- font-family: "Inter", sans-serif;
1041
- font-size: 13px;
1042
- font-style: normal;
1043
- font-weight: 400;
1044
- line-height: 18px;
1045
- `,cs=()=>t.jsx(F,{name:$.CHECK_CIRCLE,fill:"var(--grey-600)"}),yt=({children:e,showCheck:o=!1,className:n})=>t.jsxs(ls,{className:n,children:[o&&t.jsx(cs,{}),e]}),ds={small:l.css`
1046
- font-family: "Inter", sans-serif;
1047
- font-size: 14px;
1048
- font-style: normal;
1049
- font-weight: 600;
1050
- line-height: 20px;
1051
- `,medium:l.css`
1052
- font-family: "Inter", sans-serif;
1053
- font-size: 16px;
1054
- font-style: normal;
1055
- font-weight: 500;
1056
- line-height: 24px;
1057
- `},us=l.button`
1058
- position: relative;
1059
- display: inline-flex;
1060
- align-items: center;
1061
- justify-content: center;
1062
- padding: 12px 16px;
1063
- background: transparent;
1064
- border: none;
1065
- outline: none;
1066
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
1067
- ${e=>ds[e.size]}
1068
- color: ${e=>e.disabled?"var(--grey-400)":e.$active?"var(--blue-900)":"var(--grey-500)"};
1069
- transition: all 0.2s ease;
1070
-
1071
- &:hover:not(:disabled) {
1072
- color: var(--blue-900);
1073
- }
1074
-
1075
- &:after {
1076
- content: "";
1077
- position: absolute;
1078
- width: 100%;
1079
- height: 3px;
1080
- background-color: ${e=>e.disabled?"var(--grey-400)":"var(--blue-900)"};
1081
- bottom: 0;
1082
- left: 0;
1083
- opacity: ${e=>e.$active?1:0};
1084
- transition: opacity 0.2s ease;
1085
- }
1086
-
1087
- &:focus {
1088
- outline: none;
1089
- box-shadow: none;
1090
- }
1091
- `,bo=({label:e,active:o=!1,disabled:n=!1,size:r="medium",onClick:s})=>t.jsx(us,{$active:o,disabled:n,size:r,onClick:s,children:e}),hs=l.td`
1092
- background-color: var(--white-900);
1093
- border-right: 1px solid var(--grey-200);
1094
- border-bottom: 1px solid var(--grey-200);
1095
- padding: 10px 12px;
1096
- font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
1097
- font-size: 14px;
1098
- font-weight: 400;
1099
- line-height: 20px;
1100
- color: var(--grey-900);
1101
- opacity: 0.8;
1102
- text-align: ${e=>e.align||"left"};
1103
- width: ${e=>e.width||"auto"};
1104
- white-space: nowrap;
1105
- box-sizing: border-box;
1106
-
1107
- &:last-child {
1108
- border-right: 1px solid var(--grey-200);
1109
- }
1110
- `,wt=({children:e,align:o="left",width:n,className:r,ref:s,...i})=>t.jsx(hs,{ref:s,align:o,width:n,className:r,...i,children:e}),Xt=l.th`
1111
- background-color: var(--grey-50);
1112
- border-right: 1px solid var(--grey-200);
1113
- border-bottom: 1px solid var(--grey-200);
1114
- padding: 8px 12px;
1115
- height: 35px;
1116
- box-sizing: border-box;
1117
- width: ${e=>e.width||"auto"};
1118
-
1119
- &:last-child {
1120
- border-right: 1px solid var(--grey-200);
1121
- }
1122
- `,ps=l.div`
1123
- display: flex;
1124
- align-items: center;
1125
- gap: 4px;
1126
- cursor: ${e=>e.$clickable?"pointer":"default"};
1127
- user-select: none;
1128
- `,fs=l.span`
1129
- font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
1130
- font-size: 13px;
1131
- font-weight: 600;
1132
- line-height: 18px;
1133
- color: var(--grey-900);
1134
- white-space: nowrap;
1135
- flex-shrink: 0;
1136
- `,ms=l.svg`
1137
- width: 16px;
1138
- height: 16px;
1139
- flex-shrink: 0;
1140
- `,xs=l.div`
1141
- padding: 10px 4px;
1142
- height: 35px;
1143
- box-sizing: border-box;
1144
- display: flex;
1145
- align-items: center;
1146
- justify-content: flex-start;
1147
-
1148
- & > div {
1149
- height: 32px;
1150
- }
1151
-
1152
- li {
1153
- text-align: left;
1154
- }
1155
- `,jt=({children:e,sortable:o=!1,sortDirection:n=null,onSort:r,filterable:s=!1,filterOptions:i=[],filterValue:a,onFilterChange:u,width:c,className:h,ref:f,...b})=>{const x=()=>{o&&r&&r()};return s?t.jsx(Xt,{ref:f,width:c,className:h,...b,children:t.jsx(xs,{children:t.jsx(Le,{options:i,value:a,onChange:u,placeholder:"Placeholder",size:"small",width:"100%"})})}):t.jsx(Xt,{ref:f,width:c,className:h,...b,children:t.jsxs(ps,{$clickable:o,onClick:x,children:[t.jsx(fs,{children:e}),o&&t.jsxs(ms,{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8 3.33337L10.6667 6.00004H5.33333L8 3.33337Z",fill:n==="asc"?"var(--grey-900)":"var(--grey-400)"}),t.jsx("path",{d:"M8 12.6667L5.33333 10H10.6667L8 12.6667Z",fill:n==="desc"?"var(--grey-900)":"var(--grey-400)"})]})]})})},gs={xsmall:l.css`
1156
- min-height: ${e=>e.rows?"auto":"80px"};
1157
- padding: 10px;
1158
- `,small:l.css`
1159
- min-height: ${e=>e.rows?"auto":"100px"};
1160
- padding: 12px;
1161
- `},Cs=l.div`
1162
- position: relative;
1163
- display: inline-flex;
1164
- align-items: center;
1165
- width: ${e=>e.$fullWidth?"100%":"auto"};
1166
- gap: 8px;
1167
- `,bs=l.textarea`
1168
- width: 100%;
1169
- border-radius: 6px;
1170
- font-family: "Inter", sans-serif;
1171
- font-style: normal;
1172
- font-weight: 400;
1173
- line-height: 20px;
1174
- border: 1px solid
1175
- ${e=>e.$error?"var(--red-error)":(e.disabled,"var(--grey-300)")};
1176
- background-color: ${e=>e.disabled?"var(--grey-200)":"var(--white-900)"};
1177
- color: ${e=>e.disabled?"var(--grey-400)":"var(--black-900)"};
1178
- transition: all 0.2s;
1179
- resize: vertical;
1180
- font-size: 14px;
1181
-
1182
- ${e=>gs[e.size||"small"]}
1183
-
1184
- &:hover:not(:disabled):not(:focus) {
1185
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
1186
- }
1187
-
1188
- &:focus {
1189
- outline: none;
1190
- box-shadow: 0px 0px 0px 1px var(--white-900),
1191
- 0px 0px 0px 3px var(--blue-600);
1192
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
1193
- }
1194
-
1195
- &:active {
1196
- outline: none;
1197
- box-shadow: 0px 0px 0px 2px var(--blue-200);
1198
- border-color: ${e=>e.$error?"var(--red-error)":"var(--blue-600)"};
1199
- }
1200
-
1201
- &:disabled {
1202
- cursor: not-allowed;
1203
- user-select: none;
1204
- pointer-events: none;
1205
- }
1206
-
1207
- &::placeholder {
1208
- color: var(--grey-400);
1209
- }
1210
- `,vs=({size:e="small",error:o=!1,disabled:n=!1,fullWidth:r=!1,rows:s,ref:i,...a})=>t.jsx(Cs,{$fullWidth:r,children:t.jsx(bs,{ref:i,size:e,$error:o,disabled:n,rows:s,...a})}),ft={info:{backgroundColor:"var(--blue-100)",borderColor:"var(--blue-600)",iconColor:"var(--blue-600)"},success:{backgroundColor:"var(--green-bg)",borderColor:"var(--green-success)",iconColor:"var(--green-success)"},warning:{backgroundColor:"var(--orange-bg)",borderColor:"var(--orange-caution)",iconColor:"var(--orange-caution)"},danger:{backgroundColor:"var(--red-bg)",borderColor:"var(--red-error)",iconColor:"var(--red-error)"},default:{backgroundColor:"var(--white-900)",borderColor:"var(--grey-300)",iconColor:"var(--grey-600)"}},ys=l.div`
1211
- display: flex;
1212
- padding: 8px;
1213
- gap: 8px;
1214
- align-items: flex-start;
1215
- border-radius: 8px;
1216
- background-color: ${e=>ft[e.type].backgroundColor};
1217
- border: 1px solid ${e=>ft[e.type].borderColor};
1218
- width: 100%;
1219
- box-sizing: border-box;
1220
- `,ws=l.div`
1221
- display: flex;
1222
- flex-direction: column;
1223
- gap: 4px;
1224
- flex: 1;
1225
- `,js=l.h3`
1226
- margin: 0;
1227
- color: var(--black-900);
1228
- font-family: "Inter", sans-serif;
1229
- font-size: 16px;
1230
- font-style: normal;
1231
- font-weight: 400;
1232
- line-height: 24px;
1233
- `,ks=l.p`
1234
- margin: 0;
1235
- color: var(--grey-500);
1236
- text-overflow: ellipsis;
1237
- font-family: "Inter", sans-serif;
1238
- font-size: 13px;
1239
- font-style: normal;
1240
- font-weight: 400;
1241
- line-height: 18px;
1242
- `,_s=({color:e})=>t.jsx(F,{name:$.INFORMATION_CIRCLE,fill:e}),Es=({color:e})=>t.jsx(F,{name:$.CHECK_CIRCLE,fill:e}),Ms=({color:e})=>t.jsx(F,{name:$.EXCLAMATION_TRIANGLE,fill:e}),Ls=({color:e})=>t.jsx(F,{name:$.EXCLAMATION_CIRCLE,fill:e}),Ts=({color:e})=>t.jsx(F,{name:$.EXCLAMATION_TRIANGLE,fill:e}),As=(e,o)=>{switch(e){case"info":return t.jsx(_s,{color:o});case"success":return t.jsx(Es,{color:o});case"warning":return t.jsx(Ms,{color:o});case"danger":return t.jsx(Ls,{color:o});default:return t.jsx(Ts,{color:o})}},Re=({type:e="default",heading:o,description:n,className:r})=>t.jsxs(ys,{type:e,className:r,children:[As(e,ft[e].iconColor),t.jsxs(ws,{children:[t.jsx(js,{children:o}),n&&t.jsx(ks,{children:n})]})]}),Is=l.div`
1243
- display: flex;
1244
- align-items: center;
1245
- gap: 8px;
1246
- opacity: ${({disabled:e})=>e?.6:1};
1247
- cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
1248
- `,Rs=l.div`
1249
- position: relative;
1250
- width: 32px;
1251
- height: 20px;
1252
- background-color: ${({checked:e})=>e?"var(--blue-600)":"var(--grey-500)"};
1253
- border-radius: 100px;
1254
- border: 2px solid var(--black-200);
1255
- transition: all 0.2s ease;
1256
- cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
1257
- box-sizing: border-box;
1258
- `,Ss=l.div`
1259
- position: absolute;
1260
- top: 0px;
1261
- left: ${({checked:e})=>e?"12px":"0px"};
1262
- width: 16px;
1263
- height: 16px;
1264
- background-color: var(--white-900);
1265
- border-radius: 50%;
1266
- box-shadow: 0 1px 3px var(--black-300);
1267
- transition: all 0.2s ease;
1268
- `,$s=l.span`
1269
- font-size: 16px;
1270
- font-style: normal;
1271
- font-weight: 400;
1272
- line-height: 24px;
1273
- user-select: none;
1274
- pointer-events: none;
1275
- color: var(--grey-500);
1276
- `,Ke=({checked:e=!1,onChange:o,disabled:n=!1,label:r,className:s})=>{const[i,a]=d.useState(e),u=()=>{if(n)return;const c=!i;a(c),o?.(c)};return t.jsxs(Is,{disabled:n,className:s,onClick:u,children:[t.jsx(Rs,{checked:i,disabled:n,children:t.jsx(Ss,{checked:i})}),r&&t.jsx($s,{children:r})]})},Ns=["/data-workspace","/data-apps","/pipelines","/pipeline-edit/","/pipeline-details/","/pipeline-processing/","/file/","/file-details/","/files","/search","/search-classic","/artifacts/","/admin","/settings","/agent-studio"];function kt(){if(typeof document>"u"||!document.referrer)return null;try{const e=new URL(document.referrer),o=e.pathname;for(const n of Ns){const r=o.indexOf(n);if(r!==-1){const s=o.slice(0,r).replace(/\/$/u,"");return`${e.origin}${s}`}}return e.origin}catch{return null}}function Se(e,o){try{const n=o.startsWith("/")?o:`/${o}`,r=new URL(e);return r.pathname=`${r.pathname.replace(/\/$/u,"")}${n}`,r.href}catch{return null}}function _t(e,o={}){if(o.newTab){window.open(e,"_blank","noopener,noreferrer");return}if(window.parent!==window)try{window.parent.location.href}catch{try{const n=new URL(e),r=`${n.pathname}${n.search}${n.hash}`;window.parent.postMessage({type:"navigate",path:r},"*");return}catch{}}window.location.href=e}const Os={fileDetails:e=>`/file/${e}`,pipelineEdit:e=>`/pipeline-edit/${e}`,pipelineDetails:e=>`/pipeline-details/${e}`,search:e=>e?`/search?q=${encodeURIComponent(e)}`:"/search",dataWorkspace:()=>"/data-workspace",dataApps:()=>"/data-apps",artifact:(e,o,n)=>`/artifacts/${e}/${o}/${n}`},Et=d.createContext(null);function vo(){const e=d.useContext(Et);if(!e)throw new Error("useTdpNavigationContext must be used within a TdpNavigationProvider. Wrap your app with <TdpNavigationProvider> or use the standalone useTdpNavigation() hook instead.");return e}const Bs=({tdpBaseUrl:e,children:o})=>{const n=d.useMemo(()=>e?e.replace(/\/$/u,""):kt(),[e]),r=d.useMemo(()=>({tdpBaseUrl:n,getTdpUrl:s=>n?Se(n,s):null,navigateToTdp:(s,i)=>{if(!n){console.warn("[TdpNavigation] Cannot navigate: TDP base URL not resolved");return}const a=Se(n,s);a&&_t(a,i)}}),[n]);return t.jsx(Et.Provider,{value:r,children:o})};function Ps(e={}){const{tdpBaseUrl:o}=e,n=d.useMemo(()=>o?o.replace(/\/$/u,""):kt(),[o]);return d.useMemo(()=>({tdpBaseUrl:n,getTdpUrl:r=>n?Se(n,r):null,navigateToTdp:(r,s)=>{if(!n){console.warn("[useTdpNavigation] Cannot navigate: TDP base URL not resolved");return}const i=Se(n,r);i&&_t(i,s)}}),[n])}const Hs=l.a`
1277
- color: var(--theme-primary, var(--blue-600));
1278
- text-decoration: none;
1279
- cursor: pointer;
1280
-
1281
- &:hover {
1282
- text-decoration: underline;
1283
- }
1284
-
1285
- &:focus-visible {
1286
- outline: 2px solid var(--blue-600);
1287
- outline-offset: 2px;
1288
- border-radius: 2px;
1289
- }
1290
- `,Ds=({path:e,navigationOptions:o={newTab:!0},children:n,onClick:r,...s})=>{const{getTdpUrl:i,navigateToTdp:a}=vo(),u=i(e),c=h=>{h.metaKey||h.ctrlKey||h.shiftKey||(h.preventDefault(),r?.(h),a(e,o))};return t.jsx(Hs,{href:u??"#",target:o.newTab?"_blank":void 0,rel:o.newTab?"noopener noreferrer":void 0,onClick:c,...s,children:n})},zs=l.div`
1291
- display: flex;
1292
- align-items: center;
1293
- justify-content: space-between;
1294
- height: auto;
1295
- width: 100%;
1296
- padding: 16px 28px;
1297
- box-sizing: border-box;
1298
- border-bottom: 1px solid var(--grey-200);
1299
- background-color: var(--white-900);
1300
- `,Gs=l.div`
1301
- color: var(--black-900);
1302
- font-family: "Inter", sans-serif;
1303
- font-size: 18px;
1304
- font-style: normal;
1305
- font-weight: 500;
1306
- line-height: 28px;
1307
- `,Us=l.div`
1308
- display: flex;
1309
- align-items: center;
1310
- gap: 12px;
1311
- `,Vs=l.div`
1312
- display: flex;
1313
- align-items: center;
1314
- gap: 12px;
1315
- cursor: pointer;
1316
- border-radius: 4px;
1317
-
1318
- &:hover {
1319
- background-color: var(--grey-100);
1320
- }
1321
- `,Fs=l.div`
1322
- width: 32px;
1323
- height: 32px;
1324
- border-radius: 50%;
1325
- background-color: var(--blue-100);
1326
- background-image: ${e=>e.src?`url(${e.src})`:"none"};
1327
- background-size: cover;
1328
- background-position: center;
1329
- display: flex;
1330
- align-items: center;
1331
- justify-content: center;
1332
- color: var(--blue-600);
1333
- font-weight: 500;
1334
- font-size: 14px;
1335
- font-family: "Inter", sans-serif;
1336
- `,Ys=l.div`
1337
- font-family: "Inter", sans-serif;
1338
- color: var(--grey-400);
1339
- font-size: 16px;
1340
- font-style: normal;
1341
- font-weight: 400;
1342
- line-height: 24px;
1343
- `,qt=l(ae)`
1344
- width: 32px;
1345
- height: 32px;
1346
- padding: 0;
1347
- min-height: 0;
1348
- border-radius: 4px;
1349
- `,Zs=l.div`
1350
- height: 20px;
1351
- width: 1px;
1352
- background-color: var(--grey-200);
1353
- margin: 0;
1354
- `,Mt=({hostname:e,userProfile:o,onHomeClick:n,onSettingsClick:r,onUserProfileClick:s})=>{const i=a=>a.split(" ").map(u=>u.charAt(0)).join("").toUpperCase().substring(0,2);return t.jsxs(zs,{children:[t.jsx(Gs,{children:e}),t.jsxs(Us,{children:[t.jsx(qt,{variant:"tertiary",size:"small",onClick:n,"aria-label":"Home",children:t.jsx(F,{name:$.HOME,width:"20",height:"20",fill:"var(--grey-600)"})}),t.jsx(qt,{variant:"tertiary",size:"small",onClick:r,"aria-label":"Settings",children:t.jsx(F,{name:$.GEAR,width:"20",height:"20",fill:"var(--grey-600)"})}),t.jsx(Zs,{}),t.jsxs(Vs,{onClick:s,children:[t.jsx(Fs,{src:o.avatar,children:!o.avatar&&i(o.name)}),t.jsx(Ys,{children:o.name})]})]})]})},Ws=l.div`
1355
- position: fixed;
1356
- top: 0;
1357
- left: 0;
1358
- width: 100vw;
1359
- height: 100vh;
1360
- background: var(--black-100);
1361
- z-index: 1300;
1362
- display: flex;
1363
- align-items: center;
1364
- justify-content: center;
1365
- `,Ks=l.div`
1366
- background: var(--white-900);
1367
- border-radius: 20px;
1368
- box-shadow: 0 2px 16px var(--black-100);
1369
- min-width: 600px;
1370
- max-width: 90vw;
1371
- min-height: 500px;
1372
- padding: 0;
1373
- display: flex;
1374
- flex-direction: column;
1375
- `,Xs=l.div`
1376
- display: flex;
1377
- align-items: center;
1378
- justify-content: space-between;
1379
- padding: 20px 24px 0 24px;
1380
- `,qs=l.div`
1381
- display: flex;
1382
- align-items: center;
1383
- gap: 8px;
1384
- `,Qs=l.span`
1385
- font-weight: 600;
1386
- font-size: 20px;
1387
- `,Js=l.button`
1388
- background: none;
1389
- border: none;
1390
- font-size: 20px;
1391
- cursor: pointer;
1392
- `,ei=l.div`
1393
- padding: 24px;
1394
-
1395
- color: var(--black-900);
1396
- font-family: "Inter", sans-serif;
1397
- font-size: 14px;
1398
- font-style: normal;
1399
- font-weight: 400;
1400
- line-height: 20px;
1401
- `,ti=l.div`
1402
- margin: 0 24px;
1403
- background: var(--blue-900);
1404
- color: var(--white-900);
1405
- border-radius: 12px;
1406
- padding: 0;
1407
- font-size: 16px;
1408
- font-weight: 500;
1409
- word-break: break-word;
1410
- box-shadow: 0 1px 4px var(--black-50);
1411
- `,oi=l.textarea`
1412
- width: 100%;
1413
- min-height: 48px;
1414
- background: transparent;
1415
- color: var(--white-900);
1416
- border: none;
1417
- outline: none;
1418
- resize: vertical;
1419
- font-family: "Inter", sans-serif;
1420
- font-size: 14px;
1421
- font-style: normal;
1422
- font-weight: 400;
1423
- line-height: 20px;
1424
- padding: 16px 20px;
1425
- border-radius: 12px;
1426
- box-sizing: border-box;
1427
- `,ni=l.div`
1428
- padding: 24px;
1429
- padding-bottom: 0;
1430
- flex: 1;
1431
- `,ri=l.div`
1432
- border-radius: 20px;
1433
- overflow: hidden;
1434
- background: var(--blue-900);
1435
- min-height: 200px;
1436
- position: relative;
1437
- `,si=l.div`
1438
- display: flex;
1439
- align-items: center;
1440
- gap: 12px;
1441
- padding: 24px;
1442
- padding-top: 16px;
1443
- background: var(--white-900);
1444
- border-bottom-left-radius: 20px;
1445
- border-bottom-right-radius: 20px;
1446
- `,ii=l(ae)`
1447
- min-width: 100px;
1448
- display: flex;
1449
- align-items: center;
1450
- gap: 6px;
1451
- `,ai=({open:e,title:o,prompt:n,initialCode:r="",userQuery:s="",onUserQueryChange:i,onCopy:a,onLaunch:u,onSend:c,onCancel:h})=>{const[f,b]=d.useState(r),[x,E]=d.useState(""),[y,_]=d.useState(s);return d.useEffect(()=>{_(s)},[s]),e?t.jsx(Ws,{children:t.jsxs(Ks,{children:[t.jsxs(Xs,{children:[t.jsxs(qs,{children:[t.jsx(F,{name:$.TETRASCIENCE_ICON,fill:"var(--blue-600)"}),t.jsx(Qs,{children:o})]}),t.jsx(Js,{onClick:h,children:t.jsx(F,{name:$.CLOSE,width:"20",height:"20",fill:"var(--black-900)"})})]}),t.jsx(ei,{children:n}),t.jsx(ti,{children:t.jsx(oi,{value:y,onChange:M=>{_(M.target.value),i&&i(M.target.value)},rows:2,placeholder:"Type your question here..."})}),t.jsx(ni,{children:t.jsx(ri,{children:t.jsx(Me,{value:f,onChange:M=>b(M??""),language:"python",theme:"dark",height:200,onCopy:a,onLaunch:u})})}),t.jsxs(si,{children:[t.jsx(We,{value:x,onChange:M=>E(M.target.value),placeholder:"Ask us anything related to your work...",size:"small",onKeyDown:M=>{M.key==="Enter"&&c(x)}}),t.jsxs(ii,{variant:"primary",onClick:()=>c(x),children:[t.jsx(F,{name:$.PAPER_PLANE}),"Send"]})]})]})}):null},li=l.div`
1452
- display: flex;
1453
- flex-direction: ${e=>e.$vertical?"column":"row"};
1454
- border-radius: 6px;
1455
- overflow: hidden;
1456
- border: 1px solid var(--grey-200);
1457
-
1458
- & > *:not(:last-child) {
1459
- ${e=>e.$vertical?"border-bottom: 1px solid var(--grey-200);":"border-right: 1px solid var(--grey-200);"}
1460
- }
1461
-
1462
- ${e=>e.$vertical&&`
1463
- width: 40px;
1464
- `}
1465
- `,ci=l.div`
1466
- &:first-child {
1467
- button {
1468
- ${e=>e.$vertical?"border-top-right-radius: 6px;border-top-left-radius: 6px;":"border-top-left-radius: 6px;border-bottom-left-radius: 6px;"}
1469
- }
1470
- }
1471
-
1472
- &:last-child {
1473
- button {
1474
- ${e=>e.$vertical?"border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;":"border-top-right-radius: 6px;border-bottom-right-radius: 6px;"}
1475
- }
1476
- }
1477
- `,di=({controls:e,selectedId:o,onChange:n,vertical:r=!0,disabled:s=!1})=>{const i=a=>{s||n?.(a)};return t.jsx(li,{$vertical:r,children:e.map(a=>t.jsx(ci,{$vertical:r,children:t.jsx(po,{icon:a.icon,selected:o===a.id,disabled:s||a.disabled,onClick:()=>i(a.id)})},a.id))})},ui=e=>{switch(e){case"active":return"var(--blue-100)";case"hover":return"var(--grey-100)";case"disabled":return"transparent";default:return"transparent"}},hi=e=>e==="disabled"?"var(--grey-400)":"var(--black-900)",pi=e=>"var(--grey-400)",fi=e=>e==="disabled"?"var(--grey-400)":"var(--blue-600)",mi=l.div`
1478
- padding: 20px 16px;
1479
- border-radius: 8px;
1480
- background-color: ${e=>ui(e.status)};
1481
- cursor: ${e=>e.status==="disabled"?"not-allowed":"pointer"};
1482
- transition: background-color 0.2s ease;
1483
-
1484
- ${e=>e.status==="default"&&l.css`
1485
- &:hover {
1486
- background-color: var(--grey-100);
1487
- }
1488
- `}
1489
- `,xi=l.h3`
1490
- margin: 0 0 4px 0;
1491
- font-family: "Inter", sans-serif;
1492
- font-size: 16px;
1493
- font-weight: 600;
1494
- line-height: 24px;
1495
- color: ${e=>hi(e.status)};
1496
- `,gi=l.p`
1497
- margin: 0 0 16px 0;
1498
- font-family: "Inter", sans-serif;
1499
- font-size: 13px;
1500
- font-style: normal;
1501
- font-weight: 400;
1502
- line-height: 18px;
1503
- line-height: 20px;
1504
- color: ${e=>pi(e.status)};
1505
- `,Ci=l.div`
1506
- display: flex;
1507
- align-items: center;
1508
- gap: 16px;
1509
- `,bi=l(ae)`
1510
- flex-shrink: 0;
1511
- `,vi=l.a`
1512
- font-family: "Inter", sans-serif;
1513
- font-size: 13px;
1514
- font-style: normal;
1515
- font-weight: 500;
1516
- line-height: 18px;
1517
- color: ${e=>fi(e.status)};
1518
- text-decoration: none;
1519
- cursor: ${e=>e.status==="disabled"?"not-allowed":"pointer"};
1520
-
1521
- &:hover {
1522
- text-decoration: ${e=>e.status==="disabled"?"none":"underline"};
1523
- }
1524
- `,yo=({title:e,description:o,buttonText:n,linkText:r,status:s="default",onButtonClick:i,onLinkClick:a,className:u,ref:c})=>{const h=b=>{b.stopPropagation(),s!=="disabled"&&i&&i()},f=b=>{b.stopPropagation(),s!=="disabled"&&a&&a()};return t.jsxs(mi,{ref:c,status:s,className:u,children:[t.jsx(xi,{status:s,children:e}),o&&t.jsx(gi,{status:s,children:o}),t.jsxs(Ci,{children:[n&&t.jsx(bi,{variant:"secondary",size:"small",disabled:s==="disabled",onClick:h,leftIcon:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2",fill:"currentColor"})}),children:n}),r&&t.jsx(vi,{status:s,onClick:f,href:s==="disabled"?void 0:"#",children:r})]})]})},yi=l.div`
1525
- display: flex;
1526
- align-items: center;
1527
- flex-direction: row;
1528
- gap: 16px;
1529
- flex-wrap: wrap;
1530
- width: 100%;
1531
- `,wi=l.div`
1532
- margin: 16px 0;
1533
- `,ji=l.span`
1534
- font-size: 12px;
1535
- color: var(--grey-400);
1536
- `,ki=l.div`
1537
- & > button {
1538
- height: 38px;
1539
- }
1540
- `,_i=({initialCode:e="",onCodeSave:o,language:n="python",buttonText:r="Edit Code",modalTitle:s="Edit Code",buttonProps:i,modalProps:a,disabled:u=!1})=>{const[c,h]=d.useState(!1),[f,b]=d.useState(e),x=f?f.split(`
1541
- `).length:0,E=f.length,y=d.useCallback(()=>{b(e),h(!0)},[e]),_=d.useCallback(()=>{o&&o(f),h(!1)},[o,f]),M=d.useCallback(()=>{h(!1)},[]),w=d.useCallback(m=>{b(m||"")},[]);return t.jsxs(t.Fragment,{children:[t.jsxs(yi,{children:[t.jsx(ki,{children:t.jsx(ae,{leftIcon:t.jsx(F,{name:$.PENCIL}),onClick:y,size:"small",variant:"tertiary",...i,disabled:u,children:r})}),t.jsxs(ji,{title:`${x} lines, ${E} characters`,children:[x," lines / ",E," chars"]})]}),t.jsx(vt,{isOpen:c,onClose:M,onConfirm:_,onCloseLabel:"Cancel",onConfirmLabel:"Save Code",title:s,width:"80%",...a,children:t.jsx(wi,{children:t.jsx(Me,{height:"400px",language:n,value:f,onChange:w,options:{minimap:{enabled:!1}}})})})]})},Ei=l.div`
1542
- display: flex;
1543
- flex-direction: column;
1544
- gap: 6px;
1545
- width: 100%;
1546
- `,Mi=l(bt)`
1547
- margin-bottom: 2px;
1548
- `,Li=({label:e,infoText:o,supportiveText:n,showSupportiveCheck:r=!1,className:s,ref:i,...a})=>t.jsxs(Ei,{className:s,children:[t.jsx(Mi,{infoText:o,children:e}),t.jsx(We,{ref:i,...a}),n&&t.jsx(yt,{showCheck:r,children:n})]}),Ti=5e3,Ai=3e3,Ii=l.div``,Ri=l.div`
1549
- display: flex;
1550
- align-items: center;
1551
- justify-content: space-between;
1552
- margin-bottom: 16px;
1553
- background-color: var(--grey-100);
1554
- `,Si=l.h1`
1555
- color: var(--black-900);
1556
- font-family: "Inter", sans-serif;
1557
- font-size: 18px;
1558
- font-style: normal;
1559
- font-weight: 600;
1560
- line-height: 28px;
1561
- margin: 0;
1562
- `,$i=l.div`
1563
- display: flex;
1564
- align-items: center;
1565
- gap: 16px;
1566
- `,Ni=l.div`
1567
- display: flex;
1568
- align-items: center;
1569
- `,Oi=l.div`
1570
- width: 1px;
1571
- height: 20px;
1572
- background-color: var(--grey-200);
1573
- `,Bi=`protocolSchema: v3
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),N=require("lucide-react"),p=require("radix-ui"),wo=require("clsx"),yo=require("tailwind-merge"),ne=require("class-variance-authority"),m=require("react"),Co=require("@monaco-editor/react"),be=require("sonner"),V=require("plotly.js-dist"),wt=require("react-day-picker"),No=require("embla-carousel-react"),q=require("@base-ui/react"),ve=require("cmdk"),fe=require("vaul"),xa=require("input-otp"),ko=require("react-resizable-panels");function ha(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(a,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return a.default=e,Object.freeze(a)}const H=ha(m),Mt=ha(ko);function s(...e){return yo.twMerge(wo.clsx(e))}function _t({className:e,size:a="default",...o}){return t.jsx(p.Avatar.Root,{"data-slot":"avatar","data-size":a,className:s("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...o})}function St({className:e,...a}){return t.jsx(p.Avatar.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full rounded-full object-cover",e),...a})}function zt({className:e,...a}){return t.jsx(p.Avatar.Fallback,{"data-slot":"avatar-fallback",className:s("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...a})}function Mo({className:e,...a}){return t.jsx("span",{"data-slot":"avatar-badge",className:s("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none","group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden","group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2","group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",e),...a})}function _o({className:e,...a}){return t.jsx("div",{"data-slot":"avatar-group",className:s("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",e),...a})}function So({className:e,...a}){return t.jsx("div",{"data-slot":"avatar-group-count",className:s("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",e),...a})}const tt=ne.cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function L({className:e,variant:a="default",size:o="default",asChild:r=!1,...n}){const i=r?p.Slot.Root:"button";return t.jsx(i,{"data-slot":"button","data-variant":a,"data-size":o,className:s(tt({variant:a,size:o,className:e})),...n})}function ce({className:e,orientation:a="horizontal",decorative:o=!0,...r}){return t.jsx(p.Separator.Root,{"data-slot":"separator",decorative:o,orientation:a,className:s("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...r})}const ba=({hostname:e,userProfile:a,onHomeClick:o,onSettingsClick:r,onUserProfileClick:n})=>{const i=d=>d.split(" ").map(f=>f.charAt(0)).join("").toUpperCase().substring(0,2);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between h-auto w-full px-7 py-4 box-border",children:[t.jsx("div",{className:"text-lg font-medium leading-7",children:e}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(L,{variant:"outline",size:"icon-sm",onClick:o,"aria-label":"Home",children:t.jsx(N.Home,{size:20})}),t.jsx(L,{variant:"outline",size:"icon-sm",onClick:r,"aria-label":"Settings",children:t.jsx(N.Settings,{size:20})}),t.jsx(ce,{orientation:"vertical"}),t.jsxs(_t,{onClick:n,children:[t.jsx(St,{src:a.avatar,alt:a.name}),t.jsx(zt,{children:i(a.name)})]}),t.jsx("div",{className:"text-base font-normal leading-6",children:a.name})," "]})]}),t.jsx(ce,{})]})};function zo({delayDuration:e=0,...a}){return t.jsx(p.Tooltip.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...a})}function at({...e}){return t.jsx(p.Tooltip.Root,{"data-slot":"tooltip",...e})}function ot({...e}){return t.jsx(p.Tooltip.Trigger,{"data-slot":"tooltip-trigger",...e})}function rt({className:e,sideOffset:a=0,children:o,...r}){return t.jsx(p.Tooltip.Portal,{children:t.jsxs(p.Tooltip.Content,{"data-slot":"tooltip-content",sideOffset:a,className:s("z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[o,t.jsx(p.Tooltip.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function It(){const[e,a]=m.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return m.useEffect(()=>{if(typeof document>"u")return;const o=document.documentElement;a(o.classList.contains("dark"));const r=new MutationObserver(n=>{for(const i of n)i.attributeName==="class"&&a(o.classList.contains("dark"))});return r.observe(o,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e}const Io={monacoTheme:"vs",editorBg:"#ffffff",editorFg:"rgba(26, 26, 26, 1)",lineNumberColor:"rgba(26, 26, 26, 0.4)",lineNumberActiveColor:"rgba(26, 26, 26, 0.8)",selectionBg:"rgba(47, 69, 181, 0.15)",gutterBg:"#f9fafb",borderColor:"rgba(229, 231, 235, 1)",isDark:!1},Ao={monacoTheme:"vs-dark",editorBg:"rgba(20, 30, 53, 1)",editorFg:"rgba(255, 255, 255, 0.9)",lineNumberColor:"rgba(255, 255, 255, 0.35)",lineNumberActiveColor:"rgba(255, 255, 255, 0.7)",selectionBg:"rgba(84, 157, 255, 0.2)",gutterBg:"rgba(29, 40, 57, 1)",borderColor:"rgba(51, 65, 86, 1)",isDark:!0};function To(){const e=It();return m.useMemo(()=>e?Ao:Io,[e])}const Do={light:"vs",dark:"vs-dark"},je=({value:e,onChange:a,language:o="python",theme:r,height:n=400,width:i="100%",options:d={},onCopy:f,onLaunch:u,disabled:l=!1})=>{const c=To(),j=m.useRef(null),[y,x]=m.useState("Copy"),[w,C]=m.useState("Launch"),S=1e3,_=m.useCallback(g=>{f&&!l&&(f(g),x("Copied"),setTimeout(()=>{x("Copy")},S))},[f,l]),b=m.useCallback(g=>{u&&!l&&(u(g),C("Launched"),setTimeout(()=>{C("Launch")},S))},[u,l]),v=async g=>{j.current=g},M={minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"on",padding:{top:12,bottom:12,left:20,right:20},scrollbar:{vertical:"hidden",verticalScrollbarSize:0},readOnly:l,...d};return t.jsxs("div",{className:s("rounded-2xl overflow-hidden relative border",l&&"opacity-60 cursor-not-allowed"),children:[t.jsxs("div",{className:"ml-auto flex gap-2 px-4 py-2 absolute top-0 right-0 z-[1]",children:[f&&t.jsxs(at,{children:[t.jsx(ot,{asChild:!0,children:t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:t.jsx(L,{className:"w-full h-full",variant:"outline",size:"icon-sm",onClick:()=>_(e),disabled:l,children:t.jsx(N.Copy,{})})})}),t.jsx(rt,{side:"bottom",children:y})]}),u&&t.jsxs(at,{children:[t.jsx(ot,{asChild:!0,children:t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:t.jsx(L,{className:"w-full h-full",variant:"outline",size:"icon-sm",onClick:()=>b(e),disabled:l,children:t.jsx(N.Rocket,{})})})}),t.jsx(rt,{side:"bottom",children:w})]})]}),t.jsx(Co,{value:e,onChange:a,language:o,theme:r?Do[r]:c.monacoTheme,height:n,width:i,options:M,beforeMount:v})]})};function Re({...e}){return t.jsx(p.Dialog.Root,{"data-slot":"dialog",...e})}function Eo({...e}){return t.jsx(p.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}function va({...e}){return t.jsx(p.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function ja({...e}){return t.jsx(p.Dialog.Close,{"data-slot":"dialog-close",...e})}function wa({className:e,...a}){return t.jsx(p.Dialog.Overlay,{"data-slot":"dialog-overlay",className:s("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function Le({className:e,children:a,showCloseButton:o=!0,...r}){return t.jsxs(va,{children:[t.jsx(wa,{}),t.jsxs(p.Dialog.Content,{"data-slot":"dialog-content",className:s("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[a,o&&t.jsx(p.Dialog.Close,{"data-slot":"dialog-close",asChild:!0,children:t.jsxs(L,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[t.jsx(N.XIcon,{}),t.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Oe({className:e,...a}){return t.jsx("div",{"data-slot":"dialog-header",className:s("flex flex-col gap-2",e),...a})}function At({className:e,showCloseButton:a=!1,children:o,...r}){return t.jsxs("div",{"data-slot":"dialog-footer",className:s("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...r,children:[o,a&&t.jsx(p.Dialog.Close,{asChild:!0,children:t.jsx(L,{variant:"outline",children:"Close"})})]})}function Pe({className:e,...a}){return t.jsx(p.Dialog.Title,{"data-slot":"dialog-title",className:s("text-base leading-none font-medium",e),...a})}function Tt({className:e,...a}){return t.jsx(p.Dialog.Description,{"data-slot":"dialog-description",className:s("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function Ge({className:e,type:a,...o}){return t.jsx("input",{type:a,"data-slot":"input",className:s("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...o})}const Dt=H.forwardRef(({size:e=24,className:a,fill:o="currentColor",...r},n)=>t.jsxs("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s("shrink-0",a),...r,children:[t.jsx("path",{d:"M22.392 10.5705C21.693 5.4495 17.313 1.5 12 1.5C6.201 1.5 1.5 6.201 1.5 12C1.5 14.064 2.1045 15.9825 3.132 17.6055L1.5 22.5L6.3945 20.868C7.6395 21.657 9.06 22.188 10.584 22.3965",stroke:o,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M17.625 12.75L18.75 16.5L22.5 17.625L18.75 18.75L17.625 22.5L16.5 18.75L12.75 17.625L16.5 16.5L17.625 12.75Z",fill:o,stroke:o,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]}));Dt.displayName="TetraScienceIcon";function Et({className:e,...a}){return t.jsx("textarea",{"data-slot":"textarea",className:s("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}const Ro=({open:e,onOpenChange:a,title:o,prompt:r,initialCode:n="",userQuery:i="",onUserQueryChange:d,onCopy:f,onLaunch:u,onSend:l})=>{const[c,j]=m.useState(n),[y,x]=m.useState(""),[w,C]=m.useState(i);return m.useEffect(()=>{C(i)},[i]),t.jsx(Re,{open:e,onOpenChange:a,children:t.jsxs(Le,{className:"min-w-[600px]",children:[t.jsx(Oe,{children:t.jsxs(Pe,{className:"flex items-center gap-2",children:[t.jsx(Dt,{fill:"var(--primary)"}),t.jsx("span",{className:"font-semibold text-xl",children:o})]})}),t.jsx("div",{className:"px-6 py-6 text-sm font-normal leading-5",children:r}),t.jsx("div",{className:"mx-6 shadow-sm rounded-lg",children:t.jsx(Et,{value:w,onChange:S=>{C(S.target.value),d&&d(S.target.value)},rows:2,placeholder:"Type your question here..."})}),t.jsx("div",{className:"px-6 pt-6 pb-0 flex-1",children:t.jsx("div",{className:"rounded-[20px] overflow-hidden bg-[var(--primary)] min-h-[200px] relative",children:t.jsx(je,{value:c,onChange:S=>j(S??""),language:"python",height:200,onCopy:f,onLaunch:u})})}),t.jsxs("div",{className:"flex items-center gap-3 px-6 pt-4 pb-6 rounded-bl-[20px] rounded-br-[20px]",children:[t.jsx(Ge,{value:y,onChange:S=>x(S.target.value),placeholder:"Ask us anything related to your work...",onKeyDown:S=>{S.key==="Enter"&&l(y)}}),t.jsxs(L,{className:"min-w-[100px] flex items-center gap-[6px]",variant:"default",onClick:()=>l(y),children:[t.jsx(N.SendHorizontal,{}),"Send"]})]})]})})},Lo=({initialCode:e="",onCodeSave:a,language:o="python",buttonText:r="Edit Code",modalTitle:n="Edit Code",buttonProps:i,modalProps:d,disabled:f=!1})=>{const[u,l]=m.useState(!1),[c,j]=m.useState(e),y=c?c.split(`
2
+ `).length:0,x=c.length,w=m.useCallback(()=>{j(e),l(!0)},[e]),C=m.useCallback(()=>{a&&a(c),l(!1)},[a,c]),S=m.useCallback(()=>{l(!1)},[]),_=m.useCallback(b=>{j(b||"")},[]);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center flex-row gap-4 flex-wrap w-full",children:[t.jsx("div",{className:"[&>button]:h-[38px]",children:t.jsxs(L,{onClick:w,size:"sm",variant:"secondary",...i,disabled:f,children:[t.jsx(N.Pencil,{}),r]})}),t.jsxs("span",{className:"text-xs text-muted-foreground",title:`${y} lines, ${x} characters`,children:[y," lines / ",x," chars"]})]}),t.jsx(Re,{...d,open:u,onOpenChange:b=>{l(b),b||S()},children:t.jsxs(Le,{className:"min-w-[80%]",children:[t.jsx(Oe,{children:t.jsx(Pe,{children:n})}),t.jsx(je,{height:"400px",language:o,value:c,onChange:_,options:{minimap:{enabled:!1}}}),t.jsxs(At,{children:[t.jsx(ja,{asChild:!0,children:t.jsx(L,{variant:"outline",onClick:S,children:"Close"})}),t.jsx(L,{onClick:C,children:"Save changes"})]})]})})]})};function we({className:e,...a}){return t.jsx(p.Label.Root,{"data-slot":"label",className:s("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}function Be({...e}){return t.jsx(p.Select.Root,{"data-slot":"select",...e})}function Oo({className:e,...a}){return t.jsx(p.Select.Group,{"data-slot":"select-group",className:s("scroll-my-1 p-1",e),...a})}function Ue({...e}){return t.jsx(p.Select.Value,{"data-slot":"select-value",...e})}function He({className:e,size:a="default",children:o,...r}){return t.jsxs(p.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:s("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(p.Select.Icon,{asChild:!0,children:t.jsx(N.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function Fe({className:e,children:a,position:o="item-aligned",align:r="center",...n}){return t.jsx(p.Select.Portal,{children:t.jsxs(p.Select.Content,{"data-slot":"select-content","data-align-trigger":o==="item-aligned",className:s("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,align:r,...n,children:[t.jsx(ya,{}),t.jsx(p.Select.Viewport,{"data-position":o,className:s("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",o==="popper"&&""),children:a}),t.jsx(Ca,{})]})})}function Po({className:e,...a}){return t.jsx(p.Select.Label,{"data-slot":"select-label",className:s("px-1.5 py-1 text-xs text-muted-foreground",e),...a})}function $e({className:e,children:a,...o}){return t.jsxs(p.Select.Item,{"data-slot":"select-item",className:s("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[t.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:t.jsx(p.Select.ItemIndicator,{children:t.jsx(N.CheckIcon,{className:"pointer-events-none"})})}),t.jsx(p.Select.ItemText,{children:a})]})}function Go({className:e,...a}){return t.jsx(p.Select.Separator,{"data-slot":"select-separator",className:s("pointer-events-none -mx-1 my-1 h-px bg-border",e),...a})}function ya({className:e,...a}){return t.jsx(p.Select.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:s("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:t.jsx(N.ChevronUpIcon,{})})}function Ca({className:e,...a}){return t.jsx(p.Select.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:s("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:t.jsx(N.ChevronDownIcon,{})})}function _e({className:e,size:a="default",...o}){return t.jsx(p.Switch.Root,{"data-slot":"switch","data-size":a,className:s("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...o,children:t.jsx(p.Switch.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}const Bo=3e3,Uo=`protocolSchema: v3
1574
3
  name: v3
1575
4
  description: No description
1576
5
  config: {}
1577
- steps: []`,ot=l.div`
1578
- position: relative;
1579
- width: 100%;
1580
- max-width: 100%;
1581
- margin-bottom: 16px;
1582
- `,wo=({initialCode:e=Bi,onDeploy:o,versions:n=["v0.0.7","v0.0.6","v0.0.5"],currentVersion:r="v0.0.7",onVersionChange:s=()=>{}})=>{const[i,a]=d.useState(e),[u,c]=d.useState(!0),[h,f]=d.useState(!1),[b,x]=d.useState(!1),[E,y]=d.useState(!1),[_,M]=d.useState(!1),w=p=>{p!==void 0&&a(p)},m=p=>{navigator.clipboard.writeText(p)},v=p=>{console.log("Launching code:",p)},g=()=>{f(!0),x(!0),y(!1),M(!1),setTimeout(()=>{x(!1),Math.random()>.3?(y(!0),M(!1)):(y(!1),M(!0)),f(!1),o&&o(),setTimeout(()=>{y(!1),M(!1)},Ti)},Ai)};return t.jsxs(Ii,{children:[t.jsxs(Ri,{children:[t.jsx(Si,{children:"Launch"}),t.jsxs($i,{children:[t.jsx(Ke,{checked:u,onChange:c,label:"Overwrite Mode",disabled:h}),t.jsx(Oi,{}),t.jsx(Ni,{children:t.jsx(Le,{options:n.map(p=>({label:p,value:p})),value:r,onChange:p=>s(p),width:"150px",size:"small",disabled:h})}),t.jsx(ae,{variant:"primary",size:"medium",onClick:g,disabled:h,children:"Deploy"})]})]}),b&&t.jsx(ot,{children:t.jsx(Re,{type:"info",heading:"Building Protocol: Status=IN_PROGRESS, Phase=FINALIZING"})}),E&&t.jsx(ot,{children:t.jsx(Re,{type:"success",heading:`Pipeline visual-pipeline-builder-protocol-${r}-pipeline deployed successfully! Deployment complete`})}),_&&t.jsx(ot,{children:t.jsx(Re,{type:"danger",heading:`Failed to deploy pipeline visual-pipeline-builder-protocol-${r}-pipeline. Please try again.`})}),t.jsx(Me,{value:i,onChange:w,language:"yaml",theme:"light",width:"100%",onCopy:m,onLaunch:v,disabled:!u})]})},Pi=l.div`
1583
- width: 100%;
1584
- border-radius: 8px;
1585
- overflow: hidden;
1586
- box-shadow: 0px 4px 12px 0px var(--black-100),
1587
- 0px 2px 4px -2px var(--black-100);
1588
- background-color: var(--white-900);
1589
- border: 1px solid var(--grey-200);
1590
- `,Hi=l.div`
1591
- padding: 8px 16px;
1592
- font-family: "Inter", sans-serif;
1593
- font-size: 12px;
1594
- font-style: normal;
1595
- font-weight: 500;
1596
- line-height: 16px;
1597
- color: var(--grey-600);
1598
- border-bottom: 1px solid var(--grey-200);
1599
- `,Di=l.div`
1600
- display: flex;
1601
- flex-direction: column;
1602
- `,zi=({title:e,items:o,onItemClick:n,onItemCheckChange:r,activeItemId:s=null,className:i})=>{const a=c=>{n&&n(c)},u=(c,h)=>{r&&r(c,h)};return t.jsxs(Pi,{className:i,children:[e&&t.jsx(Hi,{children:e}),t.jsx(Di,{children:o.map(c=>t.jsx(go,{label:c.label,checked:c.checked,showCheckbox:c.showCheckbox,active:s===c.id||c.active,onClick:()=>a(c.id),onCheckChange:h=>u(c.id,h)},c.id))})]})},Gi=l.div`
1603
- display: flex;
1604
- align-items: center;
1605
- background-color: var(--blue-900);
1606
- height: 80px;
1607
- width: 100%;
1608
- padding: 12px 24px 12px 128px;
1609
- box-sizing: border-box;
1610
- color: var(--white-900);
1611
- gap: 40px;
1612
- `,Qt=l.div`
1613
- display: flex;
1614
- align-items: center;
1615
- height: 100%;
1616
- `,Jt=l.div`
1617
- text-transform: uppercase;
1618
- margin-bottom: 2px;
1619
- color: var(--white-900);
1620
- font-size: 10px;
1621
- font-style: normal;
1622
- font-weight: 500;
1623
- line-height: 16px;
1624
- letter-spacing: 0.2px;
1625
- font-family: "Inter", sans-serif;
1626
- `,Ui=l.div`
1627
- font-size: 14px;
1628
- font-style: normal;
1629
- font-weight: 500;
1630
- line-height: 22px;
1631
- font-family: "Inter", sans-serif;
1632
- `,Vi=l.div`
1633
- color: var(--grey-400);
1634
- font-size: 12px;
1635
- font-style: italic;
1636
- font-weight: 500;
1637
- line-height: 16px;
1638
- font-family: "Inter", sans-serif;
1639
- `,eo=l.div`
1640
- display: flex;
1641
- flex-direction: column;
1642
- `,Fi=l.div`
1643
- display: flex;
1644
- align-items: center;
1645
- justify-content: center;
1646
- `,Yi=l.div`
1647
- display: flex;
1648
- align-items: center;
1649
- padding: 6px 0;
1650
- border-radius: 4px;
1651
- gap: 8px;
1652
- `,Zi=l.div`
1653
- font-family: "Inter", sans-serif;
1654
- color: var(--grey-400);
1655
- font-size: 14px;
1656
- font-style: normal;
1657
- font-weight: 500;
1658
- line-height: 22px;
1659
- `,Wi=l.div`
1660
- display: flex;
1661
- align-items: center;
1662
- justify-content: center;
1663
- `,Ki=l.div`
1664
- display: flex;
1665
- align-items: center;
1666
- gap: 8px;
1667
- width: 320px;
1668
- `,Xi=()=>t.jsx("div",{style:{borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(F,{name:$.BUILDING,fill:"var(--white-900)",width:"20",height:"20"})}),qi=()=>t.jsx(F,{name:$.LAMP,fill:"var(--white-900)",width:"20",height:"20"}),Lt=({organization:e})=>t.jsxs(Gi,{children:[t.jsx(Qt,{children:t.jsxs(eo,{children:[t.jsx(Jt,{children:"ORGANIZATION"}),t.jsxs(Ki,{children:[t.jsx(Fi,{children:e.logo||t.jsx(Xi,{})}),t.jsxs("div",{children:[t.jsx(Ui,{children:e.name}),e.subtext&&t.jsx(Vi,{children:e.subtext})]})]})]})}),t.jsx(Qt,{children:t.jsxs(eo,{children:[t.jsx(Jt,{children:"PROJECT"}),t.jsxs(Yi,{children:[t.jsx(Wi,{children:t.jsx(qi,{})}),t.jsx(Zi,{children:"Not Selected"})]})]})})]}),Qi=l.div`
1669
- display: flex;
1670
- align-items: center;
1671
- justify-content: space-between;
1672
- background: var(--grey-100);
1673
- padding: 0 0 24px;
1674
- border-top-left-radius: 24px;
1675
- border-top-right-radius: 24px;
1676
- `,Ji=l.h2`
1677
- color: var(--blue-900);
1678
- font-family: "Inter", sans-serif;
1679
- font-size: 20px;
1680
- font-weight: 600;
1681
- line-height: 28px;
1682
- margin: 0;
1683
- `,ea=l.div`
1684
- display: flex;
1685
- align-items: center;
1686
- gap: 8px;
1687
- color: var(--grey-600);
1688
- font-size: 15px;
1689
- font-weight: 500;
1690
- `,ta=l.div`
1691
- background-color: var(--white-900);
1692
- border-radius: 24px;
1693
- border: 1px solid var(--grey-200);
1694
- width: 100%;
1695
- `,oa=l.div`
1696
- display: flex;
1697
- align-items: center;
1698
- border-bottom: 1px solid var(--grey-200);
1699
- padding-bottom: 16px;
1700
- padding: 12px 24px;
1701
- `,na=l.h3`
1702
- color: var(--blue-900);
1703
- font-family: "Inter", sans-serif;
1704
- font-size: 20px;
1705
- font-weight: 600;
1706
- line-height: 28px;
1707
- margin: 0;
1708
- `,ra=l.div`
1709
- padding: 20px 24px 36px 24px;
1710
- `,sa=l.div`
1711
- display: flex;
1712
- flex-direction: column;
1713
- align-items: flex-start;
1714
- gap: 16px;
1715
- `,ia=l.div`
1716
- color: var(--grey-400);
1717
- font-size: 14px;
1718
- font-weight: 500;
1719
- `,jo=({className:e})=>{const[o,n]=d.useState(!1);return t.jsxs("div",{className:e,children:[t.jsxs(Qi,{children:[t.jsx(Ji,{children:"Protocol Configuration"}),t.jsx(ea,{children:t.jsx(Ke,{label:"Edit Mode",checked:o,onChange:()=>n(r=>!r)})})]}),t.jsxs(ta,{children:[t.jsx(oa,{children:t.jsx(na,{children:"Configuration"})}),t.jsx(ra,{children:o?t.jsx(ae,{variant:"secondary",size:"medium",leftIcon:t.jsx(F,{name:$.PLUS,width:"20",height:"20",fill:"var(--blue-600)"}),children:"Add Input"}):t.jsx(sa,{children:t.jsx(ia,{children:"No values, Use the 'edit' button to add values"})})})]})]})},aa=l.div`
1720
- display: flex;
1721
- flex-direction: column;
1722
- align-items: flex-start;
1723
- padding: 0;
1724
- gap: 16px;
1725
- width: 928px;
1726
- background: transparent;
1727
- `,la=l.div`
1728
- display: flex;
1729
- flex-direction: row;
1730
- justify-content: space-between;
1731
- align-items: center;
1732
- width: 928px;
1733
- height: 36px;
1734
- `,ca=l.span`
1735
- font-family: "Inter", sans-serif;
1736
- font-weight: 600;
1737
- font-size: 18px;
1738
- line-height: 28px;
1739
- color: var(--black-900);
1740
- `,da=l.div`
1741
- display: flex;
1742
- flex-direction: row;
1743
- align-items: center;
1744
- gap: 16px;
1745
- justify-content: flex-end;
1746
- `,ua=l.div`
1747
- width: 1px;
1748
- height: 20px;
1749
- background: var(--grey-200);
1750
- `,ha=l.div`
1751
- width: 100%;
1752
- `,pa=l(Ke)`
1753
- min-width: 176px;
1754
- `,fa=l(Le)``,ma=({title:e,newVersionMode:o,onToggleNewVersionMode:n,versionOptions:r,selectedVersion:s,onVersionChange:i,onDeploy:a,yaml:u,onYamlChange:c})=>t.jsxs(aa,{children:[t.jsxs(la,{children:[t.jsx(ca,{children:e}),t.jsxs(da,{children:[t.jsx(pa,{checked:o,onChange:n,label:"New Version Mode"}),t.jsx(ua,{}),t.jsx(fa,{options:r,value:s,onChange:i,size:"small",width:"120px"}),t.jsx(ae,{variant:"primary",size:"medium",onClick:a,children:"Deploy"})]})]}),t.jsx(ha,{children:t.jsx(Me,{value:u,onChange:h=>c(h??""),language:"yaml",theme:"light",onCopy:()=>{},onLaunch:()=>{}})})]}),xa=l.div`
1755
- padding: 12px 0;
1756
- flex: 1;
1757
- `,ga=({open:e,initialValue:o="",title:n="",onSave:r,onCancel:s})=>{const[i,a]=d.useState(o),u=()=>{r(i)};return t.jsx(vt,{isOpen:e,onClose:s,onCloseLabel:"Cancel",onConfirm:u,onConfirmLabel:"Save Code",title:n,width:"600px",children:t.jsx(xa,{children:t.jsx(Me,{value:i,onChange:c=>a(c??""),language:"python",height:300,theme:"dark",onCopy:()=>{},onLaunch:()=>{}})})})},Ca=l.div`
1758
- display: flex;
1759
- flex-direction: column;
1760
- gap: 6px;
1761
- width: 100%;
1762
- `,ba=l(bt)`
1763
- margin-bottom: 2px;
1764
- `,va=({label:e,infoText:o,supportiveText:n,showSupportiveCheck:r=!1,className:s,ref:i,...a})=>t.jsxs(Ca,{className:s,ref:i,children:[t.jsx(ba,{infoText:o,children:e}),t.jsx(Le,{...a}),n&&t.jsx(yt,{showCheck:r,children:n})]}),ya=l.div`
1765
- width: 104px;
1766
- height: 100%;
1767
- background-color: var(--blue-900);
1768
- display: flex;
1769
- flex-direction: column;
1770
- align-items: center;
1771
- padding: 0;
1772
- `,wa=l.div`
1773
- width: 100%;
1774
- display: inline-flex;
1775
- flex-direction: column;
1776
- align-items: center;
1777
- padding: 12px 0;
1778
- cursor: pointer;
1779
- transition: background-color 0.2s ease;
1780
- background-color: ${e=>e.$active?"var(--white-100)":"transparent"};
1781
-
1782
- &:hover {
1783
- background-color: var(--white-50);
1784
- }
1785
- `,ja=l.div`
1786
- display: flex;
1787
- justify-content: center;
1788
- align-items: center;
1789
- margin-bottom: 10px;
1790
- color: var(--white-900);
1791
- `,ka=l.div`
1792
- color: var(--white-900);
1793
- text-align: center;
1794
- font-family: "Inter", sans-serif;
1795
- font-size: 12px;
1796
- font-style: normal;
1797
- font-weight: 500;
1798
- line-height: 16px;
1799
- text-align: center;
1800
- padding: 0 8px;
1801
- `,_a=({icon:e,label:o,active:n,onClick:r})=>t.jsxs(wa,{$active:n,onClick:r,children:[t.jsx(ja,{children:t.jsx(F,{name:e,fill:"var(--white-900)",width:"20",height:"20"})}),t.jsx(ka,{children:o})]}),Tt=({items:e,activeItem:o,onItemClick:n})=>{const r=s=>{n&&n(s)};return t.jsx(ya,{children:e.map(s=>t.jsx(_a,{icon:s.icon,label:s.label,active:o===s.label,onClick:()=>r(s.label)},s.label))})},Ea=l.div`
1802
- width: 100%;
1803
- border: 1px solid var(--grey-200);
1804
- border-radius: 8px;
1805
- overflow: visible;
1806
- background-color: var(--white-900);
1807
- `,Ma=l.table`
1808
- width: 100%;
1809
- border-collapse: collapse;
1810
- border-spacing: 0;
1811
- `,La=l.tbody``,Ta=l.tr`
1812
- cursor: ${e=>e.$selectable?"pointer":"default"};
1813
-
1814
- &:hover {
1815
- background-color: ${e=>e.$selectable?"var(--grey-50)":"transparent"};
1816
- }
1817
- `,Aa=l(wt)`
1818
- width: 40px;
1819
- padding: 10px 12px;
1820
- `,Ia=l(jt)`
1821
- width: 40px;
1822
- padding: 8px 12px;
1823
- `,Ra=l.div`
1824
- display: flex;
1825
- align-items: center;
1826
- justify-content: center;
1827
- gap: 16px;
1828
- padding: 10px 12px;
1829
- height: 40px;
1830
- background-color: var(--grey-50);
1831
- border-top: 1px solid var(--grey-200);
1832
- `,to=l.button`
1833
- display: flex;
1834
- align-items: center;
1835
- justify-content: center;
1836
- width: 32px;
1837
- height: 32px;
1838
- padding: 0;
1839
- border: 1px solid var(--grey-300);
1840
- border-radius: 6px;
1841
- background-color: var(--white-900);
1842
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
1843
- opacity: ${e=>e.disabled?.5:1};
1844
-
1845
- &:hover:not(:disabled) {
1846
- background-color: var(--grey-50);
1847
- }
1848
-
1849
- svg {
1850
- width: 20px;
1851
- height: 20px;
1852
- }
1853
- `,Sa=l.div`
1854
- display: flex;
1855
- align-items: center;
1856
- gap: 0;
1857
- `,$a=l.button`
1858
- display: flex;
1859
- align-items: center;
1860
- justify-content: center;
1861
- width: 32px;
1862
- height: 32px;
1863
- padding: 0;
1864
- border: none;
1865
- border-radius: 6px;
1866
- background-color: ${e=>e.$active?"var(--grey-100)":"transparent"};
1867
- font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
1868
- font-size: 13px;
1869
- font-weight: 500;
1870
- line-height: 18px;
1871
- color: var(--grey-600);
1872
- cursor: pointer;
1873
-
1874
- &:hover:not(:disabled) {
1875
- background-color: var(--grey-100);
1876
- }
1877
- `;function At({columns:e,data:o,pageSize:n=10,rowKey:r,selectable:s=!1,onRowSelect:i,sortKey:a,sortDirection:u,onSort:c,currentPage:h,onPageChange:f,totalItems:b,selectedRows:x,className:E}){const[y,_]=d.useState(null),[M,w]=d.useState(null),[m,v]=d.useState(1),[g,p]=d.useState([]),[k,T]=d.useState({}),I=a!==void 0,L=h!==void 0,j=x!==void 0,R=I?a:y,N=I?u:M,z=L?h:m,B=j?x:g,U=d.useMemo(()=>{let A=[...o];return Object.entries(k).forEach(([D,P])=>{P&&(A=A.filter(J=>J[D]?.toString()===P))}),A},[o,k]),Y=d.useMemo(()=>!R||!N?U:[...U].sort((A,D)=>{const P=A[R],J=D[R];if(P===J)return 0;let se=0;return se=typeof P=="number"&&typeof J=="number"?P-J:String(P).localeCompare(String(J)),N==="asc"?se:-se}),[U,R,N]),W=n===-1?1:Math.ceil((b||Y.length)/n),G=d.useMemo(()=>{if(b!==void 0||n===-1)return Y;const A=(z-1)*n;return Y.slice(A,A+n)},[Y,z,n,b]);d.useEffect(()=>{L||v(1)},[k,R,N,L]);const ie=A=>{I&&c?c(A,R===A&&N==="asc"?"desc":"asc"):R===A?N==="asc"?w("desc"):(_(null),w(null)):(_(A),w("asc"))},Q=A=>{L&&f?f(A):v(A)},me=A=>{const D=A?[...Y]:[];j&&i?i(D):(p(D),i?.(D))},ce=(A,D)=>r?typeof r=="function"?r(A):A[r]:D,he=(A,D)=>{const P=D?[...B,A]:B.filter(J=>J!==A);j&&i?i(P):(p(P),i?.(P))},te=A=>B.some(D=>ce(D,0)===ce(A,0)),le=Y.length>0&&Y.every(A=>te(A)),H=(A,D)=>{T(P=>({...P,[A]:D}))},re=()=>{const A=[];if(W<=5)for(let P=1;P<=W;P++)A.push(P);else{A.push(1),z>3&&A.push("...");const P=Math.max(2,z-1),J=Math.min(W-1,z+1);for(let se=P;se<=J;se++)A.push(se);z<W-2&&A.push("..."),A.push(W)}return A};return t.jsxs(Ea,{className:E,children:[t.jsxs(Ma,{children:[t.jsx("thead",{children:t.jsxs("tr",{children:[s&&t.jsx(Ia,{children:t.jsx(Ue,{checked:le,onChange:me,noPadding:!0})}),e.map(A=>t.jsx(jt,{width:A.width,sortable:A.sortable,sortDirection:R===A.key&&N||null,onSort:A.sortable?()=>ie(A.key):void 0,filterable:A.filterable,filterOptions:A.filterOptions,filterValue:k[A.key]||"",onFilterChange:A.filterable?D=>H(A.key,D):void 0,children:A.header},A.key))]})}),t.jsx(La,{children:G.map((A,D)=>t.jsxs(Ta,{$selectable:s,onClick:s?()=>he(A,!te(A)):void 0,children:[s&&t.jsx(Aa,{children:t.jsx(Ue,{checked:te(A),onChange:P=>he(A,P),noPadding:!0,onClick:P=>P.stopPropagation()})}),e.map(P=>{const J=A[P.key],se=P.render?P.render(J,A,D):J;return t.jsx(wt,{align:P.align,children:se},P.key)})]},ce(A,D)))})]}),n!==-1&&W>1&&t.jsxs(Ra,{children:[t.jsx(to,{disabled:z===1,onClick:()=>Q(z-1),"aria-label":"Previous page",children:t.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsx(Sa,{children:re().map((A,D)=>t.jsx($a,{$active:A===z,onClick:typeof A=="number"?()=>Q(A):void 0,disabled:typeof A!="number",children:A},D))}),t.jsx(to,{disabled:z===W,onClick:()=>Q(z+1),"aria-label":"Next page",children:t.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}At.displayName="Table";const Na=l.div`
1878
- display: flex;
1879
- align-items: center;
1880
- border-bottom: 1px solid var(--grey-200);
1881
- overflow-x: auto;
1882
-
1883
- &::-webkit-scrollbar {
1884
- display: none;
1885
- }
1886
-
1887
- -ms-overflow-style: none;
1888
- scrollbar-width: none;
1889
- `,mt=({tabs:e,activeTab:o,onChange:n,disabled:r=!1,size:s="medium"})=>{const[i,a]=d.useState(o||(e.length>0?e[0].id:"")),u=c=>{r||(a(c),n?.(c))};return t.jsx(Na,{children:e.map(c=>t.jsx(bo,{label:c.label,active:o?o===c.id:i===c.id,disabled:r||c.disabled,size:c.size||s,onClick:()=>u(c.id)},c.id))})},Oa=l.div`
1890
- position: fixed;
1891
- ${e=>e.position==="top"?"top: 16px;":"bottom: 16px;"}
1892
- left: 50%;
1893
- transform: translateX(-50%);
1894
- z-index: 9999;
1895
- width: 100%;
1896
- max-width: 500px;
1897
- display: flex;
1898
- flex-direction: column;
1899
- gap: 8px;
1900
- pointer-events: none;
1901
- `,Ba=l.div`
1902
- opacity: 0;
1903
- transform: translateY(
1904
- ${e=>e.theme.position==="top"?"-10px":"10px"}
1905
- );
1906
- animation: ${e=>e.theme.position==="top"?"slideDownFade":"slideUpFade"}
1907
- 0.3s forwards;
1908
- pointer-events: auto;
1909
-
1910
- @keyframes slideDownFade {
1911
- to {
1912
- opacity: 1;
1913
- transform: translateY(0);
1914
- }
1915
- }
1916
-
1917
- @keyframes slideUpFade {
1918
- to {
1919
- opacity: 1;
1920
- transform: translateY(0);
1921
- }
1922
- }
1923
- `;d.createContext(void 0);let Pa=[],nt=[];const Ha=e=>(nt.push(e),e(Pa),()=>{nt=nt.filter(o=>o!==e)}),Da=({position:e="top"})=>{const[o,n]=d.useState([]),[r,s]=d.useState(!1);return d.useEffect(()=>{s(!0);const i=Ha(n);return()=>{i(),s(!1)}},[]),r?Yo.createPortal(t.jsx(Oa,{position:e,children:o.map(i=>t.jsx(Ba,{theme:{position:e},children:t.jsx(Re,{type:i.type,heading:i.heading,description:i.description})},i.id))}),document.body):null},za=({userProfile:e,hostname:o,organization:n,children:r})=>{const s=[{icon:$.SEARCH_DOCUMENT,label:"Search"},{icon:$.SEARCH_SQL,label:"SQL Search"},{icon:$.LAMP,label:"Projects"},{icon:$.PIPELINE,label:"Pipelines"},{icon:$.COMPUTER,label:"Data & AI Workspace"},{icon:$.CUBE,label:"Artifacts"},{icon:$.DATABASE,label:"Data Sources"},{icon:$.PIE_CHART,label:"Health Monitoring"},{icon:$.BULK_CHECK,label:"Bulk Actions"},{icon:$.CODE,label:"Attribute Management"},{icon:$.GEAR,label:"Administration"}],[i,a]=d.useState("Pipelines"),u=b=>{a(b)},c=()=>{console.log("Home clicked")},h=()=>{console.log("Settings clicked")},f=()=>{console.log("User profile clicked")};return t.jsxs("div",{className:"app-layout",children:[t.jsx(Lt,{organization:n}),t.jsxs("div",{className:"content-container",children:[t.jsx(Tt,{items:s,activeItem:i,onItemClick:u}),t.jsxs("div",{className:"main-content",children:[t.jsx(Mt,{hostname:o,userProfile:e,onHomeClick:c,onSettingsClick:h,onUserProfileClick:f}),t.jsx("div",{className:"main-layout",children:r})]})]})]})},S=(e,o)=>{if(typeof window<"u")return getComputedStyle(document.documentElement).getPropertyValue("--"+e).trim()||o||"";const n=o?", "+o:"";return"var(--"+e+n+")"},C={BLACK_50:S("black-50","rgba(26, 26, 26, 0.05)"),BLACK_100:S("black-100","rgba(26, 26, 26, 0.1)"),BLACK_200:S("black-200","rgba(26, 26, 26, 0.2)"),BLACK_300:S("black-300","rgba(26, 26, 26, 0.3)"),BLACK_400:S("black-400","rgba(26, 26, 26, 0.4)"),BLACK_500:S("black-500","rgba(26, 26, 26, 0.5)"),BLACK_600:S("black-600","rgba(26, 26, 26, 0.6)"),BLACK_700:S("black-700","rgba(26, 26, 26, 0.7)"),BLACK_800:S("black-800","rgba(26, 26, 26, 0.8)"),BLACK_900:S("black-900","rgba(26, 26, 26, 1)"),BLACK:S("black-900","#1a1a1a"),BLACK_OPACITY_20:"rgba(26, 26, 26, 0.2)",WHITE_50:S("white-50","rgba(255, 255, 255, 0.05)"),WHITE_100:S("white-100","rgba(255, 255, 255, 0.1)"),WHITE_200:S("white-200","rgba(255, 255, 255, 0.2)"),WHITE_300:S("white-300","rgba(255, 255, 255, 0.3)"),WHITE_400:S("white-400","rgba(255, 255, 255, 0.4)"),WHITE_500:S("white-500","rgba(255, 255, 255, 0.5)"),WHITE_600:S("white-600","rgba(255, 255, 255, 0.6)"),WHITE_700:S("white-700","rgba(255, 255, 255, 0.7)"),WHITE_800:S("white-800","rgba(255, 255, 255, 0.8)"),WHITE_900:S("white-900","rgba(255, 255, 255, 1)"),WHITE:S("white-900","#ffffff"),BLUE_50:S("blue-50","rgba(240, 249, 255, 1)"),BLUE_100:S("blue-100","rgba(225, 243, 254, 1)"),BLUE_200:S("blue-200","rgba(185, 229, 252, 1)"),BLUE_300:S("blue-300","rgba(125, 211, 251, 1)"),BLUE_400:S("blue-400","rgba(58, 190, 247, 1)"),BLUE_500:S("blue-500","rgba(27, 173, 240, 1)"),BLUE_600:S("blue-600","rgba(64, 114, 210, 1)"),BLUE_700:S("blue-700","rgba(3, 105, 159, 1)"),BLUE_800:S("blue-800","rgba(5, 69, 103, 1)"),BLUE_900:S("blue-900","rgba(4, 38, 63, 1)"),BLUE:S("graph-primary-blue","#2D9CDB"),GREY_50:S("grey-50","rgba(248, 250, 252, 1)"),GREY_100:S("grey-100","rgba(241, 245, 249, 1)"),GREY_200:S("grey-200","rgba(225, 231, 239, 1)"),GREY_300:S("grey-300","rgba(200, 214, 229, 1)"),GREY_400:S("grey-400","rgba(158, 172, 192, 1)"),GREY_500:S("grey-500","rgba(100, 116, 139, 1)"),GREY_600:S("grey-600","rgba(72, 86, 106, 1)"),GREY_700:S("grey-700","rgba(51, 65, 86, 1)"),GREY_800:S("grey-800","rgba(29, 40, 57, 1)"),GREY_900:S("grey-900","rgba(20, 30, 53, 1)"),GREY:S("grey-400","#CCCCCC"),ORANGE:S("graph-primary-orange","#FFA62E"),RED:S("graph-primary-red","#FF5C64"),GREEN:S("graph-primary-green","#A5C34E"),YELLOW:S("graph-primary-yellow","#FBED53"),PURPLE:S("graph-primary-purple","#7A51AB"),GREEN_BG:S("green-bg","rgba(234, 254, 229, 1)"),GREEN_SUCCESS:S("green-success","rgba(8, 173, 55, 1)"),ORANGE_BG:S("orange-bg","rgba(254, 250, 229, 1)"),ORANGE_CAUTION:S("orange-caution","rgba(249, 173, 20, 1)"),RED_BG:S("red-bg","rgba(254, 234, 229, 1)"),RED_ERROR:S("red-error","rgba(216, 35, 44, 1)"),GRAPH_SECONDARY_BROWN:S("graph-secondary-brown","#AD7942"),GRAPH_SECONDARY_PINK:S("graph-secondary-pink","#FB90B4"),GRAPH_SECONDARY_TEAL:S("graph-secondary-teal","#3CCABA"),GRAPH_SECONDARY_DARK_BLUE:S("graph-secondary-dark-blue","#4072D2"),GRAPH_SECONDARY_BLACK:S("graph-secondary-black","#424E62"),GRAPH_SECONDARY_GREY:S("graph-secondary-grey","#B4B4B4")},je=[C.ORANGE,C.RED,C.GREEN,C.BLUE,C.YELLOW,C.PURPLE,C.GRAPH_SECONDARY_BROWN,C.GRAPH_SECONDARY_PINK,C.GRAPH_SECONDARY_TEAL,C.GRAPH_SECONDARY_DARK_BLUE,C.GRAPH_SECONDARY_BLACK,C.GRAPH_SECONDARY_GREY],Ga=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,variant:i="normal",xTitle:a="Columns",yTitle:u="Rows",title:c="Area Graph"})=>{const h=d.useRef(null),{xMin:f,xMax:b,yMin:x,yMax:E}=d.useMemo(()=>{let g=Number.MAX_VALUE,p=Number.MIN_VALUE,k=Number.MAX_VALUE,T=Number.MIN_VALUE;e.forEach(j=>{j.x.forEach(R=>{g=Math.min(g,R),p=Math.max(p,R)}),j.y.forEach(R=>{k=Math.min(k,R),T=Math.max(T,R)})});const I=(p-g)*.1,L=(T-k)*.1;return{xMin:g-I,xMax:p+I,yMin:i==="stacked"?0:k-L,yMax:T+L}},[e,i]),y=d.useMemo(()=>r||[f,b],[r,f,b]),_=d.useMemo(()=>s||[x,E],[s,x,E]),M=d.useMemo(()=>{const g=y[1]-y[0];let p=Math.pow(10,Math.floor(Math.log10(g)));g/p>10&&(p=p*2),g/p<4&&(p=p/2);const k=[];let T=Math.ceil(y[0]/p)*p;for(;T<=y[1];)k.push(T),T+=p;return k},[y]),w=d.useMemo(()=>{const g=_[1]-_[0];let p=Math.pow(10,Math.floor(Math.log10(g)));g/p>10&&(p=p*2),g/p<4&&(p=p/2);const k=[];let T=Math.ceil(_[0]/p)*p;for(;T<=_[1];)k.push(T),T+=p;return k},[_]),m=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),v=d.useMemo(()=>({text:c,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:C.BLACK_900,lineheight:1.2,standoff:30}}),[c]);return d.useEffect(()=>{if(!h.current)return;let g;if(i==="stacked"){const I=new Array(e[0]?.x.length||0).fill(0);g=e.map((L,j)=>{const R=L.y.map((N,z)=>{const B=I[z]+N;return I[z]=B,B});return{x:L.x,y:R,type:"scatter",mode:"lines",name:L.name,fill:j===0?"tozeroy":"tonexty",fillcolor:L.color,line:{color:L.color,width:2}}})}else g=e.map(I=>({x:I.x,y:I.y,type:"scatter",mode:"lines",name:I.name,fill:I.fill||"tozeroy",fillcolor:I.color,line:{color:I.color,width:2}}));const p={width:o,height:n,title:v,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:M,showgrid:!0,...m},yaxis:{title:{text:u,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:w,showgrid:!0,...m},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:C.BLUE_900,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},k={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(h.current,g,p,k);const T=h.current;return()=>{T&&q.purge(T)}},[e,o,n,r,s,y,_,i,a,u,v,m,M,w]),t.jsx("div",{className:"area-graph-container",children:t.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})},Ua=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,variant:i="group",xTitle:a="Columns",yTitle:u="Rows",title:c="Bar Graph",barWidth:h=24})=>{const f=d.useRef(null),{yMin:b,yMax:x}=d.useMemo(()=>{let m=Number.MAX_VALUE,v=Number.MIN_VALUE,g=Number.MAX_VALUE,p=Number.MIN_VALUE;e.forEach(I=>{I.x.forEach(L=>{m=Math.min(m,L),v=Math.max(v,L)}),I.y.forEach(L=>{g=Math.min(g,L),p=Math.max(p,L)})});const k=(v-m)*.1,T=(p-g)*.1;return{xMin:m-k,xMax:v+k,yMin:i==="stack"?0:g-T,yMax:p+T}},[e,i]),E=d.useMemo(()=>s||[b,x],[s,b,x]),y=d.useMemo(()=>[...new Set(e.flatMap(m=>m.x))],[e]),_=d.useMemo(()=>{const m=E[1]-E[0];let v=Math.pow(10,Math.floor(Math.log10(m)));m/v>10&&(v=v*2),m/v<4&&(v=v/2);const g=[];let p=Math.ceil(E[0]/v)*v;for(;p<=E[1];)g.push(p),p+=v;return g},[E]),M=d.useMemo(()=>{switch(i){case"stack":return"stack";case"overlay":return"overlay";default:return"group"}},[i]),w=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]);return d.useEffect(()=>{if(!f.current)return;const m=e.map(k=>({x:k.x,y:k.y,type:"bar",name:k.name,marker:{color:k.color},width:h,error_y:k.error_y})),v={title:{text:c,font:{size:32,family:"Inter, sans-serif",color:C.BLACK_900}},width:o,height:n,margin:{l:80,r:30,b:80,t:60,pad:0},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},barmode:M,bargap:.15,dragmode:!1,xaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:y,showgrid:!0,...w},yaxis:{title:{text:u,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:_,showgrid:!0,...w},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:C.BLUE_900,family:"Inter, sans-serif",weight:500}},showlegend:e.length>1},g={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(f.current,m,v,g);const p=f.current;return()=>{p&&q.purge(p)}},[e,o,n,r,s,a,u,c,h,M,w,y,_]),t.jsx("div",{className:"bar-graph-container",children:t.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})})},Va=-1.8,Fa=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,xTitle:i="Columns",yTitle:a="Rows",title:u="Boxplot",showPoints:c=!1})=>{const h=d.useRef(null),{yMin:f,yMax:b}=d.useMemo(()=>{let M=Number.MAX_VALUE,w=Number.MIN_VALUE;e.forEach(v=>{v.y.forEach(g=>{M=Math.min(M,g),w=Math.max(w,g)})});const m=(w-M)*.1;return{yMin:M-m,yMax:w+m}},[e]),x=d.useMemo(()=>s||[f,b],[s,f,b]),E=d.useMemo(()=>{const M=x[1]-x[0];let w=Math.pow(10,Math.floor(Math.log10(M)));M/w>10&&(w=w*2),M/w<4&&(w=w/2);const m=[];let v=Math.ceil(x[0]/w)*w;for(;v<=x[1];)m.push(v),v+=w;return m},[x]),y=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),_=d.useMemo(()=>({text:u,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:C.BLACK_900,lineheight:1.2,standoff:30}}),[u]);return d.useEffect(()=>{if(!h.current)return;const M=e.map(g=>({y:g.y,x:g.x,type:"box",name:g.name,marker:{color:g.color},line:{color:g.color},fillcolor:g.color+"40",boxpoints:c?g.boxpoints||"outliers":!1,jitter:g.jitter||.3,pointpos:g.pointpos||Va})),w={width:o,height:n,title:_,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:r,autorange:!r,showgrid:!0,...y},yaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:E,showgrid:!0,...y},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:C.BLUE_900,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},m={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(h.current,M,w,m);const v=h.current;return()=>{v&&q.purge(v)}},[e,o,n,r,s,x,i,a,c,_,y,E]),t.jsx("div",{className:"boxplot-container",children:t.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})},Ya=75,Za=1.05,Wa=e=>{const o={A:e.peakA,T:e.peakT,G:e.peakG,C:e.peakC},n=Object.values(o);if(n.every(a=>a===n[0]))return"";let s="",i=0;return Object.entries(o).forEach(([a,u])=>{u>i&&(s=a,i=u)}),s},Ka=({data:e=[],width:o=900,height:n=600,positionInterval:r=10,colorA:s="#2D9CDB",colorT:i="#A1C63C",colorG:a="#FF5C64",colorC:u="#FFA62E"})=>{const c=d.useRef(null),h=d.useMemo(()=>e.map(p=>p.position),[e]),f=d.useMemo(()=>e.map(p=>Wa(p)),[e]),b=d.useMemo(()=>e.map(p=>p.peakA),[e]),x=d.useMemo(()=>e.map(p=>p.peakT),[e]),E=d.useMemo(()=>e.map(p=>p.peakG),[e]),y=d.useMemo(()=>e.map(p=>p.peakC),[e]),_=d.useMemo(()=>({x:h,y:b,type:"scatter",mode:"lines",name:"A",line:{color:s,width:2,shape:"spline"}}),[h,b,s]),M=d.useMemo(()=>({x:h,y:x,type:"scatter",mode:"lines",name:"T",line:{color:i,width:2,shape:"spline"}}),[h,x,i]),w=d.useMemo(()=>({x:h,y:E,type:"scatter",mode:"lines",name:"G",line:{color:a,width:2,shape:"spline"}}),[h,E,a]),m=d.useMemo(()=>({x:h,y,type:"scatter",mode:"lines",name:"C",line:{color:u,width:2,shape:"spline"}}),[h,y,u]),v=d.useMemo(()=>Math.max(...b,...x,...E,...y),[b,x,E,y]);if(d.useEffect(()=>{if(!c.current||e.length===0)return;const p=[_,M,w,m],k={width:o,height:n-Ya,margin:{l:0,r:0,b:20,t:10,pad:0},paper_bgcolor:"var(--white-900)",plot_bgcolor:"var(--white-900)",font:{family:"Inter, sans-serif"},showlegend:!1,xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[Math.min(...h),Math.max(...h)],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[0,v*Za],fixedrange:!0}},T={responsive:!0,displayModeBar:!1,displaylogo:!1,fillFrame:!0};q.newPlot(c.current,p,k,T);const I=c.current;return()=>{I&&q.purge(I)}},[e,o,n,_,M,w,m,v,h]),e.length===0)return t.jsx("div",{className:"chart-container",children:"No data available"});const g=()=>{const p=()=>{const T=Math.min(...h),I=Math.max(...h),L=o;return t.jsx("div",{className:"sequence-letters-container",children:f.map((j,R)=>{const N=h[R],z=j==="A"?s:j==="T"?i:j==="G"?a:j==="C"?u:"var(--black-900)",U=(N-T)/(I-T)*L;return t.jsx("span",{className:"sequence-letter",style:{left:`${U}px`,color:z},children:j},`base-${R}`)})})},k=()=>{const T=Math.min(...h),I=Math.max(...h),L=o,j=Math.ceil(T/r)*r,R=[];for(let N=j;N<=I;N+=r)R.push({position:N,label:N.toString()});return t.jsx("div",{className:"position-numbers-container",children:R.map(N=>{const B=(N.position-T)/(I-T)*L;return t.jsx("span",{className:"position-number",style:{left:`${B}px`},children:N.label},`pos-${N.position}`)})})};return t.jsxs("div",{className:"sequence-header",children:[p(),k()]})};return t.jsxs("div",{className:"chromatogram-container",style:{width:o,height:n},children:[g(),t.jsx("div",{className:"chromatogram-chart",children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})})]})},_e={MARGIN_LEFT:70,MARGIN_RIGHT:30,MARGIN_BOTTOM:60,MARGIN_TOP_WITH_TITLE:50,MARGIN_TOP_NO_TITLE:30,MARGIN_PAD:5},oo={USER_ANNOTATION_FONT_SIZE:11,AUTO_ANNOTATION_FONT_SIZE:10},rt={default:{ax:0,ay:-35},overlap:[{ax:50,ay:-35},{ax:-60,ay:-35},{ax:70,ay:-55},{ax:-80,ay:-55},{ax:50,ay:-75},{ax:-60,ay:-75}]};function Xa(e,o){const n=[...e].sort((i,a)=>i.peak.x-a.peak.x),r=[];let s=[];for(const i of n){if(s.length===0){s.push(i);continue}const a=s[s.length-1];Math.abs(i.peak.x-a.peak.x)<o?s.push(i):(r.push(s),s=[i])}return s.length>0&&r.push(s),r}function no(e,o,n){const r=o===-1,s=r?C.GREY_500:je[o%je.length],i=r?C.BLACK_900:s,a=e.text??(e._computed?.area===void 0?"":`Area: ${e._computed.area.toFixed(2)}`),u=r&&e.ax!==void 0?e.ax:n.ax,c=r&&e.ay!==void 0?e.ay:n.ay;return{x:e.x,y:e.y,text:a,showarrow:!0,arrowhead:2,arrowsize:1,arrowwidth:1,arrowcolor:s,ax:u,ay:c,font:{size:r?oo.USER_ANNOTATION_FONT_SIZE:oo.AUTO_ANNOTATION_FONT_SIZE,color:i,family:"Inter, sans-serif"},bgcolor:C.WHITE,borderpad:2,bordercolor:r?void 0:s,borderwidth:r?0:1}}function qa(e){if(e.length===1){const{peak:n,seriesIndex:r}=e[0];return[no(n,r,rt.default)]}return[...e].sort((n,r)=>n.peak.y-r.peak.y).map(({peak:n,seriesIndex:r},s)=>{const i=rt.overlap[s%rt.overlap.length];return no(n,r,i)})}const Qa=-5,Ja=-12,ro=-16;function so(e,o,n,r){return n==="none"?[]:[{x:[e],y:[o],type:"scatter",mode:"markers",marker:{symbol:n==="diamond"?"diamond":"triangle-up",size:8,color:r},showlegend:!1,hoverinfo:"skip"}]}function el(e){const o=[];for(const{peaks:n,seriesIndex:r,x:s}of e){const i=je[r%je.length],a=Qa+r*ro,u=Ja+r*ro;for(const c of n){const h=c._computed?.startIndex??0,f=c._computed?.endIndex??0,b=s[h],x=s[f],E=c.startMarker??"triangle",y=c.endMarker??"diamond";o.push(...so(b,a,E,i)),o.push(...so(x,u,y,i))}}return o}function tl(e,o,n){let r=e[o],s=e[o];for(let i=o-1;i>=Math.max(0,o-n);i--)r=Math.min(r,e[i]);for(let i=o+1;i<Math.min(e.length,o+n);i++)s=Math.min(s,e[i]);return e[o]-Math.max(r,s)}function ol(e,o){let n=o,r=o;for(let s=o-1;s>=0&&e[s]<=e[s+1];s--)n=s;for(let s=o+1;s<e.length&&e[s]<=e[s-1];s++)r=s;return{startIndex:n,endIndex:r}}function ko(e,o,n,r){const s=Math.min(o[n],o[r]);let i=0;for(let a=n;a<r;a++){const u=e[a+1]-e[a],c=o[a]-s,h=o[a+1]-s;i+=(c+h)*u/2}return i}function nl(e,o,n,r,s){const i=Math.min(o[r],o[s]),a=(o[n]+i)/2;let u=n,c=n;for(let h=n;h>=r;h--)if(o[h]<a){u=h;break}for(let h=n;h<=s;h++)if(o[h]<a){c=h;break}return e[c]-e[u]}function rl(e,o){const n=[];for(const r of e)n.some(i=>Math.abs((i._computed?.index??0)-(r._computed?.index??0))<o)?n.length>0&&r.y>n[n.length-1].y&&(n.pop(),n.push(r)):n.push(r);return n.sort((r,s)=>r.x-s.x)}function sl(e,o,n={}){const{minHeight:r=.05,minDistance:s=5,prominence:i=.02,relativeThreshold:a=!0}=n;if(o.length<3)return[];const u=Math.max(...o),c=a?r*u:r,h=a?i*u:i,f=s*3,b=[];for(let x=1;x<o.length-1;x++){if(!(o[x]>o[x-1]&&o[x]>o[x+1]&&o[x]>=c)||tl(o,x,f)<h)continue;const{startIndex:_,endIndex:M}=ol(o,x),w=ko(e,o,_,M),m=nl(e,o,x,_,M);b.push({x:e[x],y:o[x],_computed:{area:w,index:x,startIndex:_,endIndex:M,widthAtHalfMax:m}})}return rl(b,s)}function st(e,o){if(e.length===0||e.length===1)return 0;let n=0,r=e.length-1;for(;n<r;){const s=Math.floor((n+r)/2);e[s]<o?n=s+1:r=s}return n>0&&Math.abs(e[n-1]-o)<Math.abs(e[n]-o)?n-1:n}function il(e,o,n){return e.map(r=>{if(r.startX!==void 0&&r.endX!==void 0){const s=st(o,r.startX),i=st(o,r.endX),a=st(o,r.x),u=r._computed?.area??ko(o,n,s,i);return{...r,_computed:{...r._computed,index:a,startIndex:s,endIndex:i,area:u}}}return r})}function al(e,o,n){const r=[];e.forEach(({peaks:i,seriesIndex:a})=>{r.push({peaks:i,seriesIndex:a,x:n[a].x,y:n[a].y})});const s=o.filter(i=>i._computed?.startIndex!==void 0&&i._computed?.endIndex!==void 0);return s.length>0&&n.length>0&&r.push({peaks:s,seriesIndex:0,x:n[0].x,y:n[0].y}),r}function ll(e,o){if(!o)return e;const n=[];for(const[r,s]of Object.entries(o))if(s!=null&&s!==""){const i=r.replace(/([A-Z])/g," $1").replace(/^./,a=>a.toUpperCase()).trim();n.push(`${i}: ${String(s)}`)}return n.length>0?`${e}<br>${n.join("<br>")}`:e}function cl(e,o){const n=Math.min(e.length,o.length),r=e.slice(0,n),i=o.slice(0,n).map(u=>Number.isFinite(u)?u:0);return{x:r.map(u=>Number.isFinite(u)?u:0),y:i}}function dl(e,o,n=50){if(o==="none"||e.length===0)return e;if(o==="linear"){if(e.length===1)return[0];const r=(e[e.length-1]-e[0])/(e.length-1);return e.map((s,i)=>s-(e[0]+r*i))}if(o==="rolling"){const r=[],s=Math.floor(n/2);for(let i=0;i<e.length;i++){const a=Math.max(0,i-s),u=Math.min(e.length,i+s+1),c=e.slice(a,u);r.push(Math.min(...c))}return e.map((i,a)=>i-r[a])}return e}const ul=({series:e,width:o=900,height:n=500,title:r,xAxisTitle:s="Retention Time (min)",yAxisTitle:i="Signal (mAU)",annotations:a=[],xRange:u,yRange:c,showLegend:h=!0,showGridX:f=!0,showGridY:b=!0,showMarkers:x=!1,markerSize:E=4,showCrosshairs:y=!1,baselineCorrection:_="none",baselineWindowSize:M=50,peakDetectionOptions:w,showPeakAreas:m=!1,boundaryMarkers:v="none",annotationOverlapThreshold:g=.4,showExportButton:p=!0})=>{const k=w!==void 0,T=d.useRef(null),I=d.useMemo(()=>e.map(R=>{const N=cl(R.x,R.y);return{...R,x:N.x,y:dl(N.y,_,M)}}),[e,_,M]),L=d.useMemo(()=>{if(a.length===0||I.length===0)return a;const{x:R,y:N}=I[0];return il(a,R,N)},[a,I]),j=d.useMemo(()=>{const R=[];return k&&w&&I.forEach((N,z)=>{const B=sl(N.x,N.y,w);B.length>0&&R.push({peaks:B,seriesIndex:z})}),R},[I,k,w]);return d.useEffect(()=>{const R=T.current;if(!R||e.length===0)return;const N=I.map((G,ie)=>{const Q=G.color||je[ie%je.length],me=ll(G.name,G.metadata),ce={x:G.x,y:G.y,type:"scatter",mode:x?"lines+markers":"lines",name:G.name,line:{color:Q,width:1.5},hovertemplate:`%{x:.2f} ${s}<br>%{y:.2f} ${i}<extra>${me}</extra>`};return x&&(ce.marker={size:E,color:Q}),ce});if(v!=="none"){const G=al(j,L,I);if(G.length>0){const ie=el(G);N.push(...ie)}}const z=[];L.forEach(G=>{z.push({peak:G,seriesIndex:-1})}),m&&k&&j.forEach(({peaks:G,seriesIndex:ie})=>{G.forEach(Q=>{z.push({peak:Q,seriesIndex:ie})})});const B=Xa(z,g),U=[];for(const G of B)U.push(...qa(G));const Y={title:r?{text:r,font:{size:20,family:"Inter, sans-serif",color:C.BLACK_900}}:void 0,width:o,height:n,margin:{l:_e.MARGIN_LEFT,r:_e.MARGIN_RIGHT,b:_e.MARGIN_BOTTOM,t:r?_e.MARGIN_TOP_WITH_TITLE:_e.MARGIN_TOP_NO_TITLE,pad:_e.MARGIN_PAD},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},hovermode:y?"x":"x unified",dragmode:"zoom",xaxis:{title:{text:s,font:{size:14,color:C.BLACK_600,family:"Inter, sans-serif"},standoff:15},showgrid:f,gridcolor:C.GREY_200,linecolor:C.BLACK_900,linewidth:1,range:u,autorange:!u,zeroline:!1,tickfont:{size:12,color:C.BLACK_900,family:"Inter, sans-serif"},showspikes:y,spikemode:"across",spikesnap:"cursor",spikecolor:C.GREY_500,spikethickness:1,spikedash:"dot"},yaxis:{title:{text:i,font:{size:14,color:C.BLACK_600,family:"Inter, sans-serif"},standoff:10},showgrid:b,gridcolor:C.GREY_200,linecolor:C.BLACK_900,linewidth:1,range:c,autorange:!c,zeroline:!1,tickfont:{size:12,color:C.BLACK_900,family:"Inter, sans-serif"},showspikes:y,spikemode:"across",spikesnap:"cursor",spikecolor:C.GREY_500,spikethickness:1,spikedash:"dot"},legend:{x:.5,y:-.15,xanchor:"center",yanchor:"top",orientation:"h",font:{size:12,color:C.BLACK_900,family:"Inter, sans-serif"}},showlegend:h&&e.length>1,annotations:U},W={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d",...p?[]:["toImage"]],...p&&{toImageButtonOptions:{format:"png",filename:"chromatogram",width:o,height:n}}};return q.newPlot(R,N,Y,W),()=>{R&&q.purge(R)}},[I,j,e.length,o,n,r,s,i,L,u,c,h,f,b,x,E,y,k,w,m,v,g,p]),t.jsx("div",{className:"chromatogram-chart-container",children:t.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})})},hl=({dataSeries:e,width:o=1e3,height:n=600,title:r="Dot Plot",xTitle:s="Columns",yTitle:i="Rows",variant:a="default",markerSize:u=8})=>{const c=d.useRef(null),h=d.useMemo(()=>Array.isArray(e)?e:[e],[e]),f=d.useMemo(()=>[C.ORANGE,C.RED,C.GREEN,C.BLUE,C.YELLOW,C.PURPLE],[]),b=d.useMemo(()=>["circle","square","diamond","triangle-up","triangle-down","star"],[]),x=d.useMemo(()=>h.map((w,m)=>a==="default"?{...w,color:w.color||f[0],symbol:"circle",size:w.size||u}:{...w,color:w.color||f[m%f.length],symbol:w.symbol||b[m%b.length],size:w.size||u}),[h,a,u,f,b]),E=C.GREY_200,y=d.useMemo(()=>x.map(w=>({type:"scatter",x:w.x,y:w.y,mode:"markers",name:w.name,marker:{color:w.color,size:w.size,symbol:w.symbol,line:{color:C.WHITE,width:1}},hovertemplate:`${s}: %{x}<br>${i}: %{y}<extra>${w.name}</extra>`})),[x,s,i]),_=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),M=d.useMemo(()=>({text:r,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:C.BLACK_900,lineheight:1.2,standoff:30}}),[r]);return d.useEffect(()=>{if(!c.current)return;const w={width:o,height:n,font:{family:"Inter, sans-serif"},title:M,margin:{l:80,r:40,b:80,t:80,pad:0},showlegend:!0,legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:C.BLUE_900,family:"Inter, sans-serif",weight:500,lineheight:18}},xaxis:{title:{text:s,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:E,..._},yaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:E,..._},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE},m={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(c.current,y,w,m);const v=c.current;return()=>{v&&q.purge(v)}},[o,n,s,i,y,M,_,E]),t.jsx("div",{className:"dotplot-container",style:{width:o},children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%",margin:"0"}})})},_o="96",pl="384",fl="1536",ml="custom",xl={sample:"#4575b4",control:"#d73027",empty:"#f0f0f0"},gl={[_o]:{rows:8,columns:12},[pl]:{rows:16,columns:24},[fl]:{rows:32,columns:48}},Cl=[[0,"#313695"],[.1,"#4575b4"],[.2,"#74add1"],[.3,"#abd9e9"],[.4,"#e0f3f8"],[.5,"#ffffbf"],[.6,"#fee090"],[.7,"#fdae61"],[.8,"#f46d43"],[.9,"#d73027"],[1,"#a50026"]],it={textDark:"#333",regionBorder:"#000",emptyWell:"#f0f0f0"},bl={Viridis:[[0,"#440154"],[.25,"#414487"],[.5,"#2a788e"],[.75,"#22a884"],[1,"#7ad151"]],Blues:[[0,"#f7fbff"],[.25,"#c6dbef"],[.5,"#6baed6"],[.75,"#2171b5"],[1,"#08306b"]],RdBu:[[0,"#67001f"],[.25,"#d6604d"],[.5,"#f7f7f7"],[.75,"#4393c3"],[1,"#053061"]],Greens:[[0,"#f7fcf5"],[.25,"#c7e9c0"],[.5,"#74c476"],[.75,"#238b45"],[1,"#00441b"]],Reds:[[0,"#fff5f0"],[.25,"#fcbba1"],[.5,"#fb6a4a"],[.75,"#cb181d"],[1,"#67000d"]],Greys:[[0,"#ffffff"],[.25,"#d9d9d9"],[.5,"#969696"],[.75,"#525252"],[1,"#000000"]],Hot:[[0,"#000000"],[.33,"#e60000"],[.66,"#ffff00"],[1,"#ffffff"]],YlGnBu:[[0,"#ffffd9"],[.25,"#c7e9b4"],[.5,"#41b6c4"],[.75,"#225ea8"],[1,"#081d58"]],YlOrRd:[[0,"#ffffcc"],[.25,"#fed976"],[.5,"#fd8d3c"],[.75,"#e31a1c"],[1,"#800026"]],Plasma:[[0,"#0d0887"],[.25,"#7e03a8"],[.5,"#cc4778"],[.75,"#f89540"],[1,"#f0f921"]]},X={MAX_RANDOM_VALUE:5e4,SENTINEL_RATIO:.01,COLOR_SCALE_THRESHOLD:.99,COLOR_SCALE_EPSILON:.001,MULTI_VALUE_PRIMARY_RATIO:.575,MULTI_VALUE_SECONDARY_RATIO:.425,FONT_SIZE_LARGE:11,LABEL_CENTER_OFFSET:-.5,MARGIN_TOP:70,MARGIN_RIGHT:50,MARGIN_BOTTOM:40,MARGIN_LEFT:80,COLORBAR_LENGTH:130,DOMAIN_COLORBAR_OFFSET:.15,DOMAIN_COLORBAR_END:.85},Fe=65,xt=26;function vl(e){return Array.from({length:e},(o,n)=>n<xt?String.fromCharCode(Fe+n):"A"+String.fromCharCode(Fe+(n-xt)))}function yl(e){return Array.from({length:e},(o,n)=>n+1)}function gt(e){const o=e.match(/^([A-Z]{1,2})(\d{1,2})$/i);if(!o)return null;const n=o[1].toUpperCase(),r=n.length===1?n.charCodeAt(0)-Fe:xt+(n.charCodeAt(1)-Fe),s=parseInt(o[2],10)-1;return{row:r,col:s}}function wl(e,o,n){if(!e)return!1;const{row:r,col:s}=e;return r>=0&&s>=0&&r<o&&s<n}function jl(e,o){if(!e)return null;const n=o??Object.keys(e)[0];return n?e[n]:null}function kl(e,o,n,r,s){typeof e=="number"?r[o][n]=e:typeof e=="string"&&(s[o][n]=e)}function _l(e,o,n,r){const s=Array.from({length:o},()=>Array(n).fill(null)),i=Array.from({length:o},()=>Array(n).fill(null)),a=new Map,u=new Map;for(const c of e){const h=gt(c.wellId);if(!wl(h,o,n))continue;const f=c.wellId.toUpperCase();c.values&&a.set(f,c.values),c.tooltipData&&u.set(f,c.tooltipData);const b=jl(c.values,r);kl(b,h.row,h.col,s,i)}return{grid:s,categories:i,allValues:a,tooltipData:u}}function El(e){let o=1/0,n=-1/0;for(const r of e)for(const s of r)s!==null&&Number.isFinite(s)&&(o=Math.min(o,s),n=Math.max(n,s));return Number.isFinite(o)||(o=0),Number.isFinite(n)||(n=1),o===n&&(n=o+1),{min:o,max:n}}function Ml(e){return e.some(o=>o.values&&Object.keys(o.values).length>0)}function Ll(e){const o=new Set;for(const n of e)n.values&&Object.keys(n.values).forEach(r=>o.add(r));return[...o]}function Tl(e,o){for(const n of e)if(typeof n.values?.[o]=="string")return!0;return!1}function Al(e,o){return Ll(e).map(r=>{const s=o?.find(a=>a.id===r),i=Tl(e,r);return{id:r,name:s?.name??r,visualizationMode:s?.visualizationMode??(i?"categorical":void 0),colorScale:s?.colorScale,valueMin:s?.valueMin,valueMax:s?.valueMax,valueUnit:s?.valueUnit,categoryColors:s?.categoryColors}})}function Il(e,o,n){const r=e.match(/^([A-Z]{1,2})(\d{1,2}):([A-Z]{1,2})(\d{1,2})$/i);if(!r)return null;const s=gt(`${r[1]}${r[2]}`),i=gt(`${r[3]}${r[4]}`),a=Math.min(s.row,i.row),u=Math.max(s.row,i.row),c=Math.min(s.col,i.col),h=Math.max(s.col,i.col),f=o.length,b=n.length;return a>=f||u>=f||c>=b||h>=b?null:{minRow:a,maxRow:u,minCol:c,maxCol:h}}function Rl({wellId:e,value:o,allValues:n,tooltipExtra:r,activeLayerId:s,layerConfigMap:i,precision:a,valueUnit:u}){let c=`Well ${e}`;return n?c+=Sl(n,s,i,a):o!==null?c+=`<br>Value: ${o.toFixed(a)}${u}`:s?c+=`<br>▶ ${s}: -`:c+="<br>No data",r&&(c+=$l(r)),c}function Sl(e,o,n,r){let s="";for(const[i,a]of Object.entries(e)){const c=i===o?"▶ ":"",h=n.get(i)?.valueUnit,f=h?` ${h}`:"";a===null?s+=`<br>${c}${i}: -`:typeof a=="number"?s+=`<br>${c}${i}: ${a.toFixed(r)}${f}`:s+=`<br>${c}${i}: ${a.charAt(0).toUpperCase()+a.slice(1)}`}return s}function $l(e){let o="";for(const[n,r]of Object.entries(e))o+=`<br>${n}: ${String(r)}`;return o}function Nl(e,o,n){const r=n?{text:n}:void 0;switch(e){case"bottom":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:o,y:-.15,yanchor:"top",x:.5,xanchor:"center",title:r?{...r,side:"top"}:void 0};case"top":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:o,y:1.15,yanchor:"bottom",x:.5,xanchor:"center",title:r?{...r,side:"bottom"}:void 0};case"left":return{thickness:28,len:1,outlinewidth:0,ticksuffix:o,y:.5,yanchor:"middle",x:-.15,xanchor:"right",title:r?{...r,side:"right"}:void 0};default:return{thickness:20,len:.9,outlinewidth:0,ticksuffix:o,x:.88,xanchor:"left",y:.5,yanchor:"middle",title:r?{...r,side:"right"}:void 0}}}function Ol(e,o,n){const r=n?X.MARGIN_TOP:X.MARGIN_RIGHT,s=X.MARGIN_RIGHT,i=e==="left"?r+X.MARGIN_RIGHT:r,a=e==="right"?s+X.MARGIN_RIGHT:s,u=e==="bottom"?X.MARGIN_LEFT:X.MARGIN_RIGHT;let c;return o?c=e==="top"?X.COLORBAR_LENGTH:100:c=e==="top"?X.MARGIN_TOP:X.MARGIN_BOTTOM,{l:i,r:a,b:u,t:c,pad:5}}function Bl(e){switch(e){case"left":return X.MULTI_VALUE_PRIMARY_RATIO;case"right":return X.MULTI_VALUE_SECONDARY_RATIO;default:return .5}}function Pl(e){switch(e){case"left":return[X.DOMAIN_COLORBAR_OFFSET,1];case"right":return[0,X.DOMAIN_COLORBAR_END];default:return[0,1]}}function Hl(e,o,n,r,s,i){const a=[],u=[],c=[],h=[];for(let f=0;f<r;f++)for(let b=0;b<s;b++){a.push(b+1),u.push(o[f]);const x=e[f][b];c.push(x??i),h.push(n[f][b])}return{xData:a,yData:u,colorData:c,textData:h}}const Dl=4,zl=1,Gl=.8,io=100;function Ul(e,o,n,r,s,i,a){const u=a?X.MARGIN_TOP:X.MARGIN_RIGHT,c=io,h=i?io:X.MARGIN_BOTTOM,f=X.MARGIN_RIGHT,b=e-u-c,x=o-h-f,E=b/r,y=x/n,_=s==="square"?Math.max(E,y):Math.min(E,y);return Math.max(Dl,_*(s==="square"?zl:Gl))}const Eo=({data:e,layerConfigs:o,initialLayerId:n,onLayerChange:r,plateFormat:s=_o,rows:i,columns:a,visualizationMode:u="heatmap",categoryColors:c,regions:h,title:f,xTitle:b,yTitle:x,xLabels:E,yLabels:y,colorScale:_=Cl,valueMin:M,valueMax:w,emptyWellColor:m=it.emptyWell,showColorBar:v=!0,showLegend:g=!0,legendConfig:p,width:k=800,height:T=500,precision:I=0,markerShape:L="circle",onWellClick:j})=>{const R=d.useRef(null),N=d.useRef(j);N.current=j;const[z,B]=d.useState(n);let U,Y;if(s===ml)U=i??8,Y=a??12;else{const O=gl[s];U=O.rows,Y=O.columns}const W=d.useMemo(()=>{if(Array.isArray(e)&&e.length>0&&"wellId"in e[0]){const O=e;if(Ml(O))return Al(O,o)}return null},[e,o]),G=d.useMemo(()=>!W||W.length===0?null:z?W.find(O=>O.id===z)??W[0]:W[0],[W,z]),ie=G?.visualizationMode??u,Q=G?.colorScale??_,me=G?.valueMin??M,ce=G?.valueMax??w,he=G?.valueUnit?` ${G.valueUnit}`:"",te=d.useMemo(()=>({...xl,...c,...G?.categoryColors}),[c,G?.categoryColors]),le=G?.id,{grid:H,categoriesGrid:re,allValuesMap:A,tooltipDataMap:D}=d.useMemo(()=>{let O,V=Array.from({length:U},()=>Array(Y).fill(null)),K=new Map,ne=new Map;if(Array.isArray(e)&&e.length>0){const Z=_l(e,U,Y,le);O=Z.grid,V=Z.categories,K=Z.allValues,ne=Z.tooltipData}else O=Array.from({length:U},()=>Array.from({length:Y},()=>Math.random()*X.MAX_RANDOM_VALUE));return{grid:O,categoriesGrid:V,allValuesMap:K,tooltipDataMap:ne}},[e,U,Y,le]),P=y??vl(U),J=E??yl(Y),se=El(H),xe=me??se.min,be=ce??se.max,oe=H.some(O=>O.includes(null)),fe=xe-(be-xe)*X.SENTINEL_RATIO-1,ke=oe?H.map(O=>O.map(V=>V===null?fe:V)):H,ve=d.useMemo(()=>{if(!oe)return Q;let O;if(typeof Q=="string"){const Z=bl[Q];if(Z)O=Z;else return Q}else O=Q;const V=be-fe,K=(xe-fe)/V,ne=[[0,m],[K*X.COLOR_SCALE_THRESHOLD,m]];for(const[Z,pe]of O){const ge=K+Z*(1-K);ne.push([ge,pe])}return ne},[Q,oe,xe,be,fe,m]),de=oe?fe:xe,ye=d.useMemo(()=>{const O=new Map;if(W)for(const V of W)O.set(V.id,V);return O},[W]),Rt=H.map((O,V)=>O.map((K,ne)=>{const Z=`${P[V]}${J[ne]}`,pe=String(Z).toUpperCase();return Rl({wellId:Z,value:K,allValues:A.get(pe),tooltipExtra:D.get(pe),activeLayerId:G?.id,layerConfigMap:ye,precision:I,valueUnit:he})})),{categoricalGrid:Xe,categoricalColorScale:qe,uniqueTypes:Qe,catMax:St}=d.useMemo(()=>{if(ie!=="categorical")return{categoricalGrid:null,categoricalColorScale:null,uniqueTypes:[],catMax:0};const O=new Set;let V=!1;for(const ue of re)for(const Ce of ue)Ce?O.add(Ce):V=!0;V&&O.add("empty");const K=[...O].sort(),ne=new Map;K.forEach((ue,Ce)=>ne.set(ue,Ce));const Z=re.map(ue=>ue.map(Ce=>Ce===null?ne.get("empty")??0:ne.get(Ce)??ne.get("empty")??0)),pe=K.length,ge=[];if(pe===1){const ue=te[K[0]]||m;ge.push([0,ue]),ge.push([1,ue])}else K.forEach((ue,Ce)=>{const Be=te[ue]||m,Pe=Ce/(pe-1),He=.5/(pe-1),et=Math.max(0,Pe-He),Ie=Math.min(1,Pe+He-X.COLOR_SCALE_EPSILON);ge.push([et,Be]),ge.push([Ie,Be])});return{categoricalGrid:Z,categoricalColorScale:ge,uniqueTypes:K,catMax:pe-1}},[ie,re,te,m]),$t=d.useMemo(()=>{if(!h||h.length===0)return[];const O=[];for(const V of h){const K=Il(V.wells,P,J);if(!K)continue;const ne=.49,Z=K.minCol+1-ne,pe=K.maxCol+1+ne,ge=K.minRow-ne,ue=K.maxRow+ne;O.push({type:"rect",xref:"x",yref:"y",x0:Z,x1:pe,y0:ge,y1:ue,line:{color:V.borderColor||it.textDark,width:V.borderWidth??2},fillcolor:V.fillColor||"transparent",layer:"above"})}return O},[h,P,J]);d.useEffect(()=>{const O=R.current;if(!O)return;const V=ie==="categorical",K=V&&Xe?Xe:ke,ne=V&&qe?qe:ve,Z=V?0:de,pe=V?St||1:be,ge=V?!1:v,{xData:ue,yData:Ce,colorData:Be,textData:Pe}=Hl(K,P,Rt,U,Y,Z),He=Ul(k,T,U,Y,L,!!f,!!x),et=[{x:ue,y:Ce,mode:"markers",type:"scatter",marker:{symbol:L,size:He,color:Be,colorscale:ne,cmin:Z,cmax:pe,showscale:ge,colorbar:Nl(p?.position??"right",he,p?.title),line:{color:"var(--grey-400)",width:1}},hoverinfo:"text",text:Pe}],Ie=p?.position??"right",No={autosize:!1,title:f?{text:f,font:{family:"Inter, sans-serif",size:20,color:"var(--black-300)"},x:Bl(Ie),xanchor:"center",y:.98,yanchor:"top"}:void 0,width:k,height:T,margin:Ol(Ie,!!f,!!x),xaxis:{title:{text:b||"",font:{size:16,color:"var(--black-300)",family:"Inter, sans-serif"},standoff:15},side:"top",fixedrange:!0,dtick:1,range:[.5,Y+.5],automargin:!1,tickmode:"array",tickvals:Array.from({length:Y},(tt,we)=>we+1),ticktext:J.map(String),tickangle:0,tickfont:{size:Y>24?8:X.FONT_SIZE_LARGE},domain:Pl(Ie)},yaxis:{title:{text:x||"",font:{size:16,color:"var(--black-300)",family:"Inter, sans-serif"},standoff:15},fixedrange:!0,dtick:1,range:[U+X.LABEL_CENTER_OFFSET,X.LABEL_CENTER_OFFSET],automargin:!1,tickmode:"array",tickvals:Array.from({length:U},(tt,we)=>we),ticktext:P.map(String),tickfont:{size:U>16?8:X.FONT_SIZE_LARGE}},paper_bgcolor:"var(--white-900)",plot_bgcolor:"var(--white-900)",font:{family:"Inter, sans-serif",color:"var(--grey-600)"},shapes:$t},Oo={responsive:!0,displayModeBar:!1,displaylogo:!1};return q.newPlot(O,et,No,Oo),O.on("plotly_click",tt=>{if(!N.current)return;const we=tt.points[0];if(we){const Bt=P,Pt=J,Ht=Bt.indexOf(we.y),Dt=Pt.indexOf(we.x);if(Ht>=0&&Dt>=0){const zt=`${Bt[Ht]}${Pt[Dt]}`,Gt=String(zt).toUpperCase(),Bo=A.get(Gt),Po=D.get(Gt),Ho={wellId:zt,values:Bo,tooltipData:Po};N.current?.(Ho)}}}),()=>{O&&q.purge(O)}},[ke,J,P,ve,v,de,be,he,f,b,x,k,T,Rt,I,D,A,H,ie,Xe,qe,Qe.length,St,$t,U,Y,p,L]);const Io=()=>!W||W.length<=1?null:t.jsx("div",{className:"platemap-layer-selector",children:W.map(O=>{const V=G?.id===O.id;return t.jsx("button",{type:"button",className:`platemap-layer-selector__button${V?" platemap-layer-selector__button--active":""}`,onClick:()=>{B(O.id),r?.(O.id)},children:O.name},O.id)})}),Te=p?.position??"right",Je=p?.fontSize??12,Ro=p?.itemSpacing??4,$e=p?.swatchSize??16,Nt=p?.title,Ot=120,Ae=Te==="top"||Te==="bottom",So=()=>{const O=ie==="categorical"&&Qe.length>0,V=h&&h.length>0;if(!g||!O&&!V)return Ae?null:t.jsx("div",{className:"platemap-legend-placeholder",style:{width:Ot}});const K=["platemap-legend"];Ae?K.push("platemap-legend--horizontal"):Te==="left"?K.push("platemap-legend--left"):Te==="right"&&K.push("platemap-legend--right");const ne={gap:`${Ro}px`,width:Ae?void 0:Ot};return t.jsxs("div",{className:K.join(" "),style:ne,children:[Nt&&t.jsx("div",{className:`platemap-legend__title${Ae?" platemap-legend__title--horizontal":""}`,style:{fontSize:`${Je}px`},children:Nt}),O&&Qe.map(Z=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch",style:{width:`${$e}px`,height:`${$e}px`,backgroundColor:te[Z]||m}}),t.jsx("span",{className:"platemap-legend__label platemap-legend__label--capitalize",style:{fontSize:`${Je}px`},children:Z})]},Z)),V&&h.map(Z=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch platemap-legend__swatch--region",style:{width:`${$e}px`,height:`${$e}px`,backgroundColor:Z.fillColor||"transparent",border:`${Z.borderWidth||2}px solid ${Z.borderColor||it.regionBorder}`}}),t.jsx("span",{className:"platemap-legend__label",style:{fontSize:`${Je}px`},children:Z.name})]},Z.id))]})},Ne=t.jsx("div",{ref:R,className:"platemap-plot",style:{width:k,height:T}}),Oe=So(),$o=()=>{switch(Te){case"left":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Oe,Ne]});case"top":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Oe,Ne]});case"bottom":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Ne,Oe]});default:return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Ne,Oe]})}};return t.jsxs("div",{className:"platemap-container",style:{width:Ae?void 0:k},children:[Io(),$o()]})};function Vl(e){if(!e||e.length===0)return[];const o=Math.max(...e.map(n=>n.length));return e.map(n=>{if(n.length===o)return n;const r=[...n];for(;r.length<o;)r.push(0);return r})}const Fl=({data:e,xLabels:o,yLabels:n,title:r,xTitle:s,yTitle:i,colorscale:a,width:u=800,height:c=600,showScale:h=!0,precision:f=0,zmin:b,zmax:x,valueUnit:E=""})=>{const y=e?Vl(e):void 0,_=y?.length??n?.length??16,M=y?.[0]?.length??o?.length??24,w=d.useMemo(()=>{if(!y)return;const v="ABCDEFGHIJKLMNOPQRSTUVWXYZ",g=[];for(let p=0;p<y.length;p++)for(let k=0;k<y[p].length;k++){const T=n?.[p]?.toString()??v[p]??`R${p+1}`,I=o?.[k]?.toString()??String(k+1),L=`${T}${I}`;g.push({wellId:L,values:{Value:y[p][k]}})}return g},[y,o,n]),m=a;return t.jsx(Eo,{data:w,plateFormat:"custom",rows:_,columns:M,title:r,xTitle:s,yTitle:i,xLabels:o,yLabels:n,colorScale:m,valueMin:b,valueMax:x,showColorBar:h,width:u,height:c,layerConfigs:[{id:"Value",valueUnit:E}],precision:f})},Yl=-.5,Zl=e=>e.reduce((n,r)=>n+r,0)/e.length,Wl=(e,o)=>{const r=e.map(s=>Math.pow(s-o,2)).reduce((s,i)=>s+i,0)/e.length;return Math.sqrt(r)},Kl=(e,o,n,r,s=100)=>{const i=[],a=[],u=(r-n)/(s-1);for(let c=0;c<s;c++){const h=n+c*u;i.push(h);const f=Yl*Math.pow((h-e)/o,2),b=1/(o*Math.sqrt(2*Math.PI))*Math.exp(f);a.push(b)}return{x:i,y:a}},Xl=(e,o,n)=>{const r=Math.ceil((n.end-n.start)/n.size),s=Array(r).fill(0);o.forEach(c=>{if(c>=n.start&&c<=n.end){const h=Math.floor((c-n.start)/n.size);s[h]++}});const i=Math.max(...s),a=Math.max(...e),u=i/a;return e.map(c=>c*u)},ql=({dataSeries:e,width:o=480,height:n=480,title:r="Histogram",xTitle:s="X Axis",yTitle:i="Frequency",bargap:a=.2,showDistributionLine:u=!1})=>{const c=d.useRef(null),h=d.useMemo(()=>Array.isArray(e)?e:[e],[e]),f=d.useMemo(()=>h.length>1?"stack":void 0,[h.length]),b=d.useMemo(()=>[C.ORANGE,C.RED,C.BLUE,C.GREEN,C.PURPLE,C.YELLOW],[]),x=d.useMemo(()=>h.map((m,v)=>{const g=typeof m.showDistributionLine>"u"?u:m.showDistributionLine;return{...m,color:m.color||b[v%b.length],opacity:g?.5:m.opacity||1,showDistributionLine:g,lineWidth:m.lineWidth||3}}),[h,u,b]),E=C.GREY_200,y=d.useMemo(()=>x.map(m=>({type:"histogram",x:m.x,name:m.name,marker:{color:m.color,line:{color:C.WHITE,width:1},opacity:m.opacity},autobinx:m.autobinx,xbins:m.xbins,hovertemplate:`${s}: %{x}<br>${i}: %{y}<extra>${m.name}</extra>`})),[x,s,i]),_=d.useMemo(()=>x.filter(m=>m.showDistributionLine).map(m=>{const v=Zl(m.x),g=Wl(m.x,v),p=Math.min(...m.x),k=Math.max(...m.x),T=k-p,I=p-T*.1,L=k+T*.1,j=m.xbins||{start:I,end:L,size:T/10},R=Kl(v,g,I,L,100),N=Xl(R.y,m.x,j);return{type:"scatter",x:R.x,y:N,mode:"lines",name:`${m.name} Distribution`,line:{color:m.color,width:m.lineWidth},hoverinfo:"none"}}),[x]),M=d.useMemo(()=>[...y,..._],[y,_]);d.useEffect(()=>{if(!c.current)return;const m={width:o,height:n,font:{family:"Inter, sans-serif"},showlegend:!1,margin:{l:90,r:40,b:80,t:40},xaxis:{title:{text:s,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:E,tickcolor:C.GREY_200,ticklen:8,tickwidth:1,ticks:"outside",linecolor:C.BLACK_900,linewidth:1,zeroline:!1},yaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:E,tickcolor:C.GREY_200,ticklen:8,tickwidth:1,ticks:"outside",linecolor:C.BLACK_900,linewidth:1,zeroline:!1,rangemode:"tozero"},barmode:f,bargap:a,paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE},v={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(c.current,M,m,v);const g=c.current;return()=>{g&&q.purge(g)}},[o,n,s,i,a,M,f,E]);const w=({series:m})=>{const v=m.map((k,T)=>t.jsx(d.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:k.color}}),k.name,T<m.length-1&&t.jsx("span",{className:"divider"})]})},k.name)),g=[],p=6;for(let k=0;k<v.length;k+=p)g.push(t.jsx("div",{className:"legend-row",children:v.slice(k,k+p)},k));return t.jsx("div",{className:"legend-container",children:g})};return t.jsx("div",{className:"histogram-container",style:{width:o},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:c,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(w,{series:x})]})})},Mo=[[0,"#313695"],[.25,"#4575b4"],[.5,"#ffffbf"],[.75,"#fdae61"],[1,"#a50026"]],De=["#4575b4","#d73027","#1a9850","#fdae61","#9467bd","#e377c2","#8c564b","#bcbd22","#17becf","#ff7f0e"],Ee=8,Lo=[4,20],Ct=5e3,ee={MARGIN_LEFT:80,MARGIN_RIGHT:30,MARGIN_TOP:80,MARGIN_BOTTOM:80,TITLE_FONT_SIZE:20,AXIS_TITLE_FONT_SIZE:16,AXIS_TICK_FONT_SIZE:12,LEGEND_FONT_SIZE:12,FONT_FAMILY:"Inter, sans-serif",GRID_WIDTH:1,AXIS_LINE_WIDTH:1,AUTO_RANGE_PADDING:.1},Ql={ADD:"shiftKey",REMOVE:"ctrlKey",TOGGLE:"both"};function To(e,o){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const s of e){const i=s.metadata?.[o];typeof i=="number"&&Number.isFinite(i)&&(n=Math.min(n,i),r=Math.max(r,i))}return!Number.isFinite(n)||!Number.isFinite(r)?{min:0,max:1}:n===r?{min:n-1,max:r+1}:{min:n,max:r}}function It(e,o){const n=e.map(r=>r.metadata?.[o]).filter(r=>typeof r=="string");return[...new Set(n)].sort()}function Jl(e,o){if(!o||o.type==="static"){const n=o?.value||"#4575b4";return new Array(e.length).fill(n)}if(o.type==="categorical"&&o.field){const n=It(e,o.field),r=o.categoryColors||{},s={};return n.forEach((i,a)=>{s[i]=r[i]||De[a%De.length]}),e.map(i=>{const a=i.metadata?.[o.field];return s[String(a)]||De[0]})}return new Array(e.length).fill("#4575b4")}function e1(e,o){if(!o||o.type==="static"){const n=o?.value||"circle";return new Array(e.length).fill(n)}if(o.type==="categorical"&&o.field){const n=It(e,o.field),r=o.categoryShapes||{},s=["circle","square","diamond","cross","x","triangle-up","triangle-down","star"],i={};return n.forEach((a,u)=>{i[a]=r[a]||s[u%s.length]}),e.map(a=>{const u=a.metadata?.[o.field];return i[String(u)]||"circle"})}return new Array(e.length).fill("circle")}function t1(e,o){if(!o||o.type==="static"){const n=o?.value||Ee;return new Array(e.length).fill(n)}if(o.type==="categorical"&&o.field){const n=It(e,o.field),r=o.categorySizes||{},s={};return n.forEach((i,a)=>{s[i]=r[i]||Ee+a*2}),e.map(i=>{const a=i.metadata?.[o.field];return s[String(a)]||Ee})}if(o.type==="continuous"&&o.field){const n=o.min!==void 0&&o.max!==void 0?{min:o.min,max:o.max}:To(e,o.field),r=o.sizeRange||Lo,[s,i]=r;return e.map(a=>{const u=a.metadata?.[o.field];if(typeof u=="number"&&Number.isFinite(u)){const c=(u-n.min)/(n.max-n.min);return s+c*(i-s)}return Ee})}return new Array(e.length).fill(Ee)}function o1(e,o){if(!o.enabled||e.length<=(o.maxPoints||Ct))return e;const n=o.maxPoints||Ct;return(o.strategy||"lttb")==="lttb"?r1(e,n):e}function n1(e,o,n,r){const s=n-o;if(s>0){let a=0,u=0;for(let c=o;c<n;c++)a+=e[c].x,u+=e[c].y;return{x:a/s,y:u/s}}const i=Math.max(0,Math.min(o,r-1));return{x:e[i].x,y:e[i].y}}function r1(e,o){const n=e.length;if(o<=0||n===0)return[];if(o>=n)return e;if(o===1)return[e[0]];if(o===2)return[e[0],e[n-1]];const r=(n-2)/(o-2),{floor:s,abs:i,min:a}=Math,u=[e[0]];let c=0;for(let h=0;h<o-2;h++){const f=a(s((h+1)*r)+1,n-1),b=a(s((h+2)*r)+1,n),{x,y:E}=n1(e,f,b,n),y=a(s(h*r)+1,n-1),_=a(s((h+1)*r)+1,n-1),M=e[c].x,w=e[c].y;let m=-1,v=e[y],g=y;for(let p=y;p<_;p++){const k=i((M-x)*(e[p].y-w)-(M-e[p].x)*(E-w))*.5;k>m&&(m=k,v=e[p],g=p)}u.push(v),c=g}return u.push(e[n-1]),u}function s1(e,o){const n=[];if(n.push(`X: ${e.x.toFixed(2)}`),n.push(`Y: ${e.y.toFixed(2)}`),e.label&&n.push(`Label: ${e.label}`),o&&e.metadata){for(const r of o)if(r in e.metadata){const s=e.metadata[r];n.push(`${r}: ${s}`)}}else if(e.metadata&&!o)for(const[r,s]of Object.entries(e.metadata))n.push(`${r}: ${s}`);return n.join("<br>")}function i1(e){const o=e.ctrlKey||e.metaKey;return e.shiftKey&&o?"toggle":e.shiftKey?"add":o?"remove":"replace"}function ao(e,o,n=.1,r="linear"){const s=r==="log";let i=1/0,a=-1/0;for(const c of e){const h=c[o];if(!Number.isFinite(h)||s&&h<=0)continue;const f=s?Math.log10(h):h;f<i&&(i=f),f>a&&(a=f)}if(!Number.isFinite(i))return[0,1];if(i===a)return[i-1,a+1];const u=a-i;return[i-u*n,a+u*n]}function a1(e,o,n){const r=new Set(e);switch(n){case"replace":return new Set(o);case"add":for(const s of o)r.add(s);return r;case"remove":for(const s of o)r.delete(s);return r;case"toggle":for(const s of o)r.has(s)?r.delete(s):r.add(s);return r;default:return r}}const l1=({title:e,xAxis:o,yAxis:n,width:r,height:s,xRange:i,yRange:a,enableLassoSelection:u,enableBoxSelection:c})=>({autosize:!1,width:r,height:s,title:e?{text:e,font:{family:ee.FONT_FAMILY,size:ee.TITLE_FONT_SIZE,color:"#333333"},x:.5,xanchor:"center"}:void 0,margin:{l:ee.MARGIN_LEFT,r:ee.MARGIN_RIGHT,t:e?ee.MARGIN_TOP:ee.MARGIN_TOP-ee.TITLE_FONT_SIZE,b:ee.MARGIN_BOTTOM},xaxis:{title:{text:o.title||"",font:{family:ee.FONT_FAMILY,size:ee.AXIS_TITLE_FONT_SIZE,color:"#333333"}},type:o.scale==="log"?"log":"linear",range:i,autorange:!i,gridcolor:"#e0e0e0",linecolor:"#333333",linewidth:ee.AXIS_LINE_WIDTH,tickfont:{family:ee.FONT_FAMILY,size:ee.AXIS_TICK_FONT_SIZE},zeroline:!1},yaxis:{title:{text:n.title||"",font:{family:ee.FONT_FAMILY,size:ee.AXIS_TITLE_FONT_SIZE,color:"#333333"}},type:n.scale==="log"?"log":"linear",range:a,autorange:!a,gridcolor:"#e0e0e0",linecolor:"#333333",linewidth:ee.AXIS_LINE_WIDTH,tickfont:{family:ee.FONT_FAMILY,size:ee.AXIS_TICK_FONT_SIZE},zeroline:!1},paper_bgcolor:"#ffffff",plot_bgcolor:"#ffffff",font:{family:ee.FONT_FAMILY,color:"#333333"},hovermode:"closest",dragmode:u?"lasso":c?"select":!1}),c1=({data:e,title:o,xAxis:n={},yAxis:r={},colorMapping:s,shapeMapping:i,sizeMapping:a,tooltip:u={enabled:!0},enableClickSelection:c=!0,enableBoxSelection:h=!0,enableLassoSelection:f=!0,selectedIds:b,onSelectionChange:x,onPointClick:E,downsampling:y,width:_=800,height:M=600,showColorBar:w=!0,className:m})=>{const v=d.useRef(null),g=d.useRef(x),p=d.useRef(E),k=d.useRef(new Set),T=d.useRef(!1);g.current=x,p.current=E;const[I,L]=d.useState(new Set),j=b!==void 0,R=j?b:I;k.current=R,T.current=j;const N=d.useMemo(()=>new Set([...R].map(String)),[R]),z=d.useMemo(()=>new Map(e.map(H=>[String(H.id),H.id])),[e]),B=d.useMemo(()=>y?o1(e,y):e,[e,y]),U=d.useMemo(()=>Jl(B,s),[B,s]),Y=d.useMemo(()=>e1(B,i),[B,i]),W=d.useMemo(()=>t1(B,a),[B,a]),G=d.useMemo(()=>{if(n.range)return n.range;if(n.autoRange!==!1)return ao(B,"x",n.autoRangePadding??ee.AUTO_RANGE_PADDING,n.scale)},[B,n]),ie=d.useMemo(()=>{if(r.range)return r.range;if(r.autoRange!==!1)return ao(B,"y",r.autoRangePadding??ee.AUTO_RANGE_PADDING,r.scale)},[B,r]),Q=u.enabled!==!1,me=d.useMemo(()=>Q?B.map(H=>u.content?u.content(H):s1(H,u.fields)):[],[B,u,Q]),ce=d.useMemo(()=>s?.type==="continuous"&&s.field&&B.length>0?B.map(H=>{const re=H.metadata?.[s.field];return typeof re=="number"&&Number.isFinite(re)?re:0}):U,[B,s,U]),he=d.useMemo(()=>{if(s?.type==="continuous"){const H=s.colorScale||Mo;return H}},[s]),te=d.useMemo(()=>{const H={size:W,symbol:Y,line:{color:"#ffffff",width:1}};if(s?.type==="continuous"&&he){if(H.color=ce,H.colorscale=he,H.showscale=w,s.field){const re=s.min!==void 0&&s.max!==void 0?{min:s.min,max:s.max}:To(B,s.field);H.cmin=re.min,H.cmax=re.max,H.colorbar={title:{text:s.field,side:"right"},thickness:20,len:.7}}}else H.color=U;return H},[W,Y,s,he,ce,w,B,U]);d.useEffect(()=>{const H=v.current;if(!H||B.length===0)return;const re=B.map(oe=>oe.x),A=B.map(oe=>oe.y),D=B.map(oe=>String(oe.id)),J=[{x:re,y:A,ids:D,mode:"markers",type:"scatter",marker:te,hoverinfo:Q?"text":"skip",text:me,hovertemplate:Q?"%{text}<extra></extra>":void 0,showlegend:!1,unselected:{marker:{opacity:.3}},selected:{marker:{opacity:1,line:{color:"#d73027",width:2}}}}],se=l1({title:o,xAxis:n,yAxis:r,width:_,height:M,xRange:G,yRange:ie,enableLassoSelection:f,enableBoxSelection:h}),xe={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToAdd:[],modeBarButtonsToRemove:["toImage"]};h&&xe.modeBarButtonsToAdd?.push("select2d"),f&&xe.modeBarButtonsToAdd?.push("lasso2d"),q.newPlot(H,J,se,xe);const be=H;return c&&be.on("plotly_click",oe=>{const fe=oe.points[0];if(fe&&fe.data.ids){const ke=fe.data.ids[fe.pointIndex],ve=B.find(de=>String(de.id)===ke);if(ve){p.current?.(ve,oe.event);const de=i1(oe.event),ye=a1(k.current,new Set([ve.id]),de);T.current||L(ye),g.current?.(ye,de)}}}),(h||f)&&(be.on("plotly_selected",oe=>{if(oe&&oe.points){const fe=oe.points.map(de=>{if(de.data.ids&&de.pointIndex!==void 0){const ye=de.data.ids[de.pointIndex];return z.get(ye)??ye}return null}).filter(de=>de!==null),ke="replace",ve=new Set(fe);T.current||L(ve),g.current?.(ve,ke)}}),be.on("plotly_deselect",()=>{const oe=new Set;T.current||L(oe),g.current?.(oe,"replace")})),()=>{H&&q.purge(H)}},[B,te,n,r,G,ie,o,_,M,u,me,c,h,f,z,Q]),d.useEffect(()=>{const H=v.current;if(!H||B.length===0)return;const re=H,A=B.map((D,P)=>N.has(String(D.id))?P:null).filter(D=>D!==null);A.length>0?q.restyle(re,{selectedpoints:[A]},[0]):q.restyle(re,{selectedpoints:[null]},[0])},[N,B]);const le=m?`interactive-scatter ${m}`:"interactive-scatter";return t.jsx("div",{className:le,children:t.jsx("div",{ref:v,className:"interactive-scatter__plot",style:{width:_,height:M}})})},d1=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,variant:i="lines",xTitle:a="Columns",yTitle:u="Rows",title:c="Line Graph"})=>{const h=d.useRef(null),{yMin:f,yMax:b}=d.useMemo(()=>{let w=Number.MAX_VALUE,m=Number.MIN_VALUE,v=Number.MAX_VALUE,g=Number.MIN_VALUE;e.forEach(T=>{T.x.forEach(I=>{w=Math.min(w,I),m=Math.max(m,I)}),T.y.forEach(I=>{v=Math.min(v,I),g=Math.max(g,I)})});const p=(m-w)*.1,k=(g-v)*.1;return{xMin:w-p,xMax:m+p,yMin:v-k,yMax:g+k}},[e]),x=d.useMemo(()=>s||[f,b],[s,f,b]),E=d.useMemo(()=>{const w=x[1]-x[0];let m=Math.pow(10,Math.floor(Math.log10(w)));w/m>10&&(m=m*2),w/m<4&&(m=m/2);const v=[];let g=Math.ceil(x[0]/m)*m;for(;g<=x[1];)v.push(g),g+=m;return v},[x]),y=d.useMemo(()=>[...new Set(e.flatMap(w=>w.x))],[e]),_=d.useMemo(()=>{switch(i){case"lines+markers":case"lines+markers+error_bars":return"lines+markers";default:return"lines"}},[i]),M=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]);return d.useEffect(()=>{if(!h.current)return;const w=e.map(p=>({x:p.x,y:p.y,type:"scatter",mode:_,name:p.name,line:{color:p.color,width:1.5},marker:i==="lines"?{opacity:0}:{color:p.color,size:8,symbol:p.symbol||"triangle-up"},error_y:i==="lines+markers+error_bars"?p.error_y||{type:"data",array:p.y.map(()=>10),visible:!0,color:p.color,thickness:1,width:5}:void 0})),m={title:{text:c,font:{size:32,family:"Inter, sans-serif",color:C.BLACK_900}},width:o,height:n,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:y,ticktext:y.map(String),showgrid:!0,...M},yaxis:{title:{text:u,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:E,showgrid:!0,...M},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:C.BLUE_900,family:"Inter, sans-serif",weight:500}},showlegend:!0},v={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(h.current,w,m,v);const g=h.current;return()=>{g&&q.purge(g)}},[e,o,n,r,s,a,u,c,_,M,y,E,x,i]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:h,style:{width:"100%",height:"100%"}})})},u1=l.div`
1924
- display: flex;
1925
- flex-direction: column;
1926
- width: 100vw;
1927
- height: 100vh;
1928
- `,h1=l.div`
1929
- display: flex;
1930
- flex: 1;
1931
- overflow: hidden;
1932
- `,p1=l.div`
1933
- display: flex;
1934
- flex-direction: column;
1935
- flex: 1;
1936
- overflow: hidden;
1937
- `,f1=l.div`
1938
- display: flex;
1939
- flex-direction: column;
1940
- background-color: var(--white-900);
1941
- flex: 1;
1942
- overflow: hidden;
1943
- `,m1=l.div`
1944
- border-bottom: 1px solid var(--grey-200);
1945
- display: flex;
1946
- flex-direction: column;
1947
- flex: 1;
1948
- overflow: hidden;
1949
- `,at=l.div`
1950
- display: flex;
1951
- justify-content: space-between;
1952
- align-items: center;
1953
- padding: 24px 0;
1954
- background-color: var(--white-900);
1955
- `,lt=l.h2`
1956
- font-family: "Inter", sans-serif;
1957
- font-size: 20px;
1958
- font-weight: 500;
1959
- color: var(--black-900);
1960
- margin: 0;
1961
- `,x1=l.div`
1962
- display: flex;
1963
- gap: 8px;
1964
- `,lo=l(ae)`
1965
- border-radius: 4px;
1966
- width: 32px;
1967
- height: 32px;
1968
- `,g1=l.div`
1969
- width: 360px;
1970
- height: 100%;
1971
- display: flex;
1972
- flex-direction: column;
1973
- padding: 16px 24px;
1974
- overflow: hidden;
1975
- max-height: 100%;
1976
- `,C1=l.div`
1977
- flex: 1;
1978
- height: 100%;
1979
- background-color: var(--grey-100);
1980
- display: flex;
1981
- flex-direction: column;
1982
- `,b1=l.div`
1983
- padding: 16px 24px 0 24px;
1984
- `,ct=l.div`
1985
- display: flex;
1986
- flex-direction: column;
1987
- overflow-y: auto;
1988
- flex: 1;
1989
- margin-top: 8px;
1990
- max-height: calc(100vh - 240px);
1991
- `,dt=l.div`
1992
- display: flex;
1993
- flex-direction: column;
1994
- justify-content: center;
1995
- align-items: center;
1996
- gap: 16px;
1997
- `,ut=l.div`
1998
- color: var(--grey-400);
1999
- font-size: 14px;
2000
- font-weight: 500;
2001
- `,ht=l.div`
2002
- cursor: pointer;
2003
-
2004
- &:last-child {
2005
- border-bottom: none;
2006
- }
2007
- `,pt=l(yo)``,v1=l.div`
2008
- padding: 24px;
2009
- margin-top: -1px;
2010
- flex: 1;
2011
- border-top: 1px solid var(--grey-200);
2012
- `,y1=l.div`
2013
- height: 100%;
2014
- border: 1px solid var(--grey-200);
2015
- border-radius: 8px;
2016
- overflow: hidden;
2017
- `,w1=({userProfile:e,hostname:o,organization:n})=>{const r=[{icon:$.SEARCH_DOCUMENT,label:"Search"},{icon:$.SEARCH_SQL,label:"SQL Search"},{icon:$.LAMP,label:"Projects"},{icon:$.PIPELINE,label:"Pipelines"},{icon:$.COMPUTER,label:"Data & AI Workspace"},{icon:$.CUBE,label:"Artifacts"},{icon:$.DATABASE,label:"Data Sources"},{icon:$.PIE_CHART,label:"Health Monitoring"},{icon:$.BULK_CHECK,label:"Bulk Actions"},{icon:$.CODE,label:"Attribute Management"},{icon:$.GEAR,label:"Administration"}],s=[{id:"templates",label:"Templates"},{id:"protocol",label:"Protocol"},{id:"steps",label:"Steps"}],i=[{id:"pipelineBuilder",label:"Pipeline Builder"},{id:"configuration",label:"Configuration"},{id:"launch",label:"Launch"}],[a,u]=d.useState("Pipelines"),[c,h]=d.useState("templates"),[f,b]=d.useState("pipelineBuilder"),[x,E]=d.useState("1"),y=[{id:"1",title:"Tecan D300e and PerkinElmer EnVision to Dotmatics (v1)",description:"c901ejs",buttonText:"",linkText:""},{id:"2",title:"Bruker D8 Andvanced CRD Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"3",title:"Extract and Decorate(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"4",title:"Intellict (Que3 Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"5",title:"Leica Aperio RAW to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"6",title:"IDS to Benchling(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"7",title:"Lorem Ipsum",description:"c901ejs",buttonText:"",linkText:""}],_=[],M=[],w=j=>{u(j)},m=j=>{h(j)},v=j=>{b(j)},g=()=>{console.log("Home clicked")},p=()=>{console.log("Settings clicked")},k=()=>{console.log("User profile clicked")},T=j=>{E(j===x?null:j)},I=j=>{console.log(`Using template: ${j}`)},L=j=>{console.log(`Viewing template: ${j}`)};return t.jsxs(u1,{children:[t.jsx(Lt,{organization:n}),t.jsxs(h1,{children:[t.jsx(Tt,{items:r,activeItem:a,onItemClick:w}),t.jsxs(p1,{children:[t.jsx(Mt,{hostname:o,userProfile:e,onHomeClick:g,onSettingsClick:p,onUserProfileClick:k}),t.jsx(f1,{children:t.jsx(m1,{children:t.jsxs("div",{style:{display:"flex",height:"100%"},children:[t.jsxs(g1,{children:[t.jsx(mt,{tabs:s,activeTab:c,onChange:m}),c==="templates"&&t.jsxs(t.Fragment,{children:[t.jsxs(at,{children:[t.jsx(lt,{children:"Templates"}),t.jsxs(x1,{children:[t.jsx(lo,{variant:"tertiary",size:"small","aria-label":"Delete",noPadding:!0,children:t.jsx(F,{name:$.TRASH,width:"20",height:"20",fill:"var(--red-error)"})}),t.jsx(lo,{variant:"primary",size:"small","aria-label":"Add",noPadding:!0,children:t.jsx(F,{name:$.PLUS,width:"20",height:"20",fill:"var(--white-900)"})})]})]}),t.jsx(ct,{children:y.length>0?y.map(j=>t.jsx(ht,{onClick:()=>T(j.id),children:t.jsx(pt,{title:j.title,description:j.description,buttonText:j.buttonText,linkText:j.linkText,status:x===j.id?"active":"default",onButtonClick:()=>I(j.id),onLinkClick:()=>L(j.id)})},j.id)):t.jsxs(dt,{children:[t.jsx(F,{name:$.INBOX,width:"40",height:"40",fill:"var(--grey-400)"}),t.jsx(ut,{children:"No data"})]})})]}),c==="protocol"&&t.jsxs(t.Fragment,{children:[t.jsx(at,{children:t.jsxs(lt,{children:["Protocol (",_.length,")"]})}),t.jsx(ct,{children:_.length>0?_.map(j=>t.jsx(ht,{onClick:()=>T(j.id),children:t.jsx(pt,{title:j.title,description:j.description,status:x===j.id?"active":"default",onButtonClick:()=>I(j.id),onLinkClick:()=>L(j.id)})},j.id)):t.jsxs(dt,{children:[t.jsx(F,{name:$.INBOX,width:"40",height:"40",fill:"var(--grey-400)"}),t.jsx(ut,{children:"No data"})]})})]}),c==="steps"&&t.jsxs(t.Fragment,{children:[t.jsx(at,{children:t.jsxs(lt,{children:["Task Scripts (",M.length,")"]})}),t.jsx(ct,{children:_.length>0?_.map(j=>t.jsx(ht,{onClick:()=>T(j.id),children:t.jsx(pt,{title:j.title,description:j.description,status:x===j.id?"active":"default",onButtonClick:()=>I(j.id),onLinkClick:()=>L(j.id)})},j.id)):t.jsxs(dt,{children:[t.jsx(F,{name:$.INBOX,width:"40",height:"40",fill:"var(--grey-400)"}),t.jsx(ut,{children:"No data"})]})})]})]}),t.jsxs(C1,{children:[t.jsx(b1,{children:t.jsx(mt,{tabs:i,activeTab:f,onChange:v})}),t.jsxs(v1,{children:[f==="pipelineBuilder"&&t.jsx(y1,{}),f==="configuration"&&t.jsx(jo,{}),f==="launch"&&t.jsx(wo,{})]})]})]})})})]})]})]})},co=[C.BLUE,C.GREEN,C.ORANGE,C.RED,C.YELLOW,C.PURPLE],j1=({dataSeries:e,width:o=400,height:n=400,title:r="Pie Chart",textInfo:s="percent",hole:i=0,rotation:a=0})=>{const u=d.useRef(null),c=d.useMemo(()=>{if(e.colors&&e.colors.length>=e.labels.length)return e.colors;const f=[...e.colors||[]],b=e.labels.length-f.length;if(b<=0)return f;for(let x=0;x<b;x++)f.push(co[x%co.length]);return f},[e.colors,e.labels.length]);d.useEffect(()=>{if(!u.current)return;const f=[{type:"pie",labels:e.labels,values:e.values,name:e.name,marker:{colors:c},textinfo:s,hoverinfo:"label+text+value",insidetextfont:{size:0,family:"Inter, sans-serif",color:"transparent"},hole:i,rotation:a}],b={width:o,height:n,font:{family:"Inter, sans-serif"},showlegend:!1,margin:{l:40,r:40,b:40,t:40}},x={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(u.current,f,b,x);const E=u.current;return()=>{E&&q.purge(E)}},[c,e.labels,e.name,e.values,o,n,s,i,a]);const h=({labels:f,colors:b})=>{const x=f.map((_,M)=>t.jsx(d.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:b[M]}}),_,M<f.length-1&&t.jsx("span",{className:"divider"})]})},_)),E=6,y=[];for(let _=0;_<x.length;_+=E)y.push(t.jsx("div",{className:"legend-row",children:x.slice(_,_+E)},_));return t.jsx("div",{className:"legend-container",children:y})};return t.jsx("div",{className:"card-container",style:{width:o},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:u,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(h,{labels:e.labels,colors:c})]})})},k1=({dataSeries:e,width:o=1e3,height:n=600,xRange:r,yRange:s,xTitle:i="Columns",yTitle:a="Rows",title:u="Scatter Plot"})=>{const c=d.useRef(null),{xMin:h,xMax:f,yMin:b,yMax:x}=d.useMemo(()=>{let v=Number.MAX_VALUE,g=Number.MIN_VALUE,p=Number.MAX_VALUE,k=Number.MIN_VALUE;e.forEach(L=>{L.x.forEach(j=>{v=Math.min(v,j),g=Math.max(g,j)}),L.y.forEach(j=>{p=Math.min(p,j),k=Math.max(k,j)})});const T=(g-v)*.1,I=(k-p)*.1;return{xMin:v-T,xMax:g+T,yMin:p-I,yMax:k+I}},[e]),E=d.useMemo(()=>r||[h,f],[r,h,f]),y=d.useMemo(()=>s||[b,x],[s,b,x]),_=d.useMemo(()=>{const v=E[1]-E[0];let g=Math.pow(10,Math.floor(Math.log10(v)));v/g>10&&(g=g*2),v/g<4&&(g=g/2);const p=[];let k=Math.ceil(E[0]/g)*g;for(;k<=E[1];)p.push(k),k+=g;return p},[E]),M=d.useMemo(()=>{const v=y[1]-y[0];let g=Math.pow(10,Math.floor(Math.log10(v)));v/g>10&&(g=g*2),v/g<4&&(g=g/2);const p=[];let k=Math.ceil(y[0]/g)*g;for(;k<=y[1];)p.push(k),k+=g;return p},[y]),w=d.useMemo(()=>({tickcolor:C.GREY_200,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:C.BLACK_900,family:"Inter, sans-serif",weight:400},linecolor:C.BLACK_900,linewidth:1,position:0,zeroline:!1}),[]),m=d.useMemo(()=>({showspikes:!0,spikemode:"across",spikedash:"solid",spikecolor:C.BLACK_OPACITY_20,spikethickness:2}),[]);return d.useEffect(()=>{if(!c.current)return;const v=e.map(T=>({x:T.x,y:T.y,type:"scatter",mode:"markers",name:T.name,marker:{color:T.color,size:10,symbol:"circle"},hovertemplate:`${i}: %{x}<br>${a}: %{y}<extra>${T.name}</extra>`})),g={title:{text:u,font:{size:32,family:"Inter, sans-serif",color:C.BLACK_900}},width:o,height:n,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:C.WHITE,plot_bgcolor:C.WHITE,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:C.GREY_200,range:r,autorange:!r,tickmode:"array",tickvals:_,ticktext:_.map(String),showgrid:!0,...m,...w},yaxis:{title:{text:a,font:{size:16,color:C.BLACK_600,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:C.GREY_200,range:s,autorange:!s,tickmode:"array",tickvals:M,showgrid:!0,...m,...w},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:C.BLUE_900,family:"Inter, sans-serif",weight:500}},showlegend:!0,hovermode:"closest"},p={responsive:!0,displayModeBar:!1,displaylogo:!1};q.newPlot(c.current,v,g,p);const k=c.current;return()=>{k&&q.purge(k)}},[e,o,n,r,s,i,a,u,E,y,_,M,w,m]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})})},_1=({filters:e,filterValues:o,onFilterChange:n})=>t.jsx("div",{className:"tdp-search__filters-row",children:e.map(r=>t.jsxs("div",{className:"tdp-search__filter-wrapper",children:[t.jsx("label",{className:"tdp-search__filter-label",children:r.label}),t.jsx(Le,{options:r.options,value:o[r.key]||"",onChange:s=>n(r.key,s)})]},r.key))}),E1=({results:e,total:o,currentPage:n,pageSize:r,columns:s,onPageChange:i,sortKey:a,sortDirection:u,onSort:c})=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"tdp-search__results-header",children:t.jsxs("div",{className:"tdp-search__results-count",children:["Showing ",(n-1)*r+1,"-",Math.min(n*r,o)," of ",o," results"]})}),t.jsx(At,{columns:s,data:e,pageSize:r,currentPage:n,totalItems:o,onPageChange:i,sortKey:a||void 0,sortDirection:u,onSort:c,rowKey:h=>h.id||Math.random().toString()})]}),M1=({query:e,setQuery:o,onSearch:n,isLoading:r,placeholder:s})=>{const i=a=>{a.key==="Enter"&&n()};return t.jsxs("div",{className:"tdp-search__search-bar",children:[t.jsx("div",{className:"tdp-search__search-input-wrapper",children:t.jsx(We,{value:e,onChange:a=>o(a.target.value),onKeyDown:i,placeholder:s,iconLeft:t.jsx(Ge,{}),size:"small"})}),t.jsx(ae,{variant:"primary",onClick:n,disabled:!e.trim()||r,children:r?"Searching...":"Search"})]})},Ye="ts-auth-token",Ze="x-org-slug",L1="/v1/datalake/searchEql",T1=(e,o,n)=>{const{searchTerm:r,sort:s,order:i,...a}=e,u={from:o,size:n};return r!==void 0&&r!==""&&(u.query={simple_query_string:{query:r,default_operator:"and"}}),s!==void 0&&s!==""&&(u.sort=i?[{[s]:i}]:[s]),Object.entries(a).forEach(([c,h])=>{h!==void 0&&(u[c]=h)}),u};function Ao(e){const[o,n]=d.useState([]),[r,s]=d.useState(0),[i,a]=d.useState(1),[u,c]=d.useState(!1),[h,f]=d.useState(null);return{results:o,total:r,currentPage:i,isLoading:u,error:h,executeSearch:async(x,E=1)=>{c(!0),f(null);const{pageSize:y,standalone:_,baseUrl:M,apiEndpoint:w="/api/search",authToken:m,orgSlug:v}=e,g=(E-1)*y;let p,k;if(_){if(!M)throw new Error("baseUrl is required when standalone is true");p=`${M.replace(/\/$/,"")}${L1}`,k={method:"POST",headers:{"Content-Type":"application/json",...m&&{[Ye]:m},...v&&{[Ze]:v}},body:JSON.stringify(T1(x,g,y))}}else{const T={"Content-Type":"application/json"};m&&v&&(T[Ye]=m,T[Ze]=v),p=w,k={method:"POST",headers:T,credentials:"include",body:JSON.stringify({...x,size:y,from:g})}}try{const T=await fetch(p,k);if(!T.ok){const R=await T.json().catch(()=>({error:"Unknown error"})),N=_&&R.error?.message||R.error;throw new Error(N||`HTTP ${T.status}: ${T.statusText}`)}const I=await T.json(),L=(I.hits?.hits||[]).map(R=>({id:R._id,...R._source,_score:R._score})),j=typeof I.hits?.total=="number"?I.hits.total:I.hits?.total?.value||0;return n(L),s(j),a(E),L}catch(T){return f(T.message||"An error occurred while searching"),n([]),s(0),[]}finally{c(!1)}}}}function uo(e){try{return localStorage.getItem(e)??void 0}catch{return}}function ho(e){try{const o=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return o?decodeURIComponent(o[1]):void 0}catch{return}}function A1(e,o){if(e&&o)return{authToken:e,orgSlug:o};const n=uo(Ye),r=uo(Ze);if(n&&r)return{authToken:n,orgSlug:r};const s=ho(Ye),i=ho(Ze);return s&&i?{authToken:s,orgSlug:i}:{authToken:e,orgSlug:o}}const I1=({defaultQuery:e="",columns:o,filters:n=[],defaultSort:r,advancedSearchParams:s,pageSize:i=10,searchPlaceholder:a="Enter search term...",className:u,onSearch:c,renderSearchBar:h,renderFilters:f,renderResults:b,...x})=>{const{authToken:E,orgSlug:y}=A1(x.authToken,x.orgSlug),{results:_,total:M,currentPage:w,isLoading:m,error:v,executeSearch:g}=Ao({...x,authToken:E??"",orgSlug:y??"",pageSize:i}),[p,k]=d.useState(e),[T,I]=d.useState({}),[L,j]=d.useState(null),[R,N]=d.useState("asc"),[z,B]=d.useState(!1),U=async(te=1,le)=>{if(!p.trim())return;B(!0);const H=le?.sortKey??L??r?.field,re=le==null?L?R:r?.order??R:le.sortDirection,A=Object.entries(T).filter(([,se])=>se!=="").map(([se,xe])=>({field:se,operator:"eq",value:xe}));let D=s?.expression;A.length>0&&(D={g:"AND",e:D?[...A,D]:A});const P={searchTerm:p.trim(),sort:H??void 0,order:re,...s,...D!==void 0&&{expression:D}},J=await g(P,te);c&&c({...P,from:(te-1)*i,size:i},J)},Y=()=>{U(1)},W=(te,le)=>{I(H=>({...H,[te]:le}))},G=te=>{U(te)},ie=(te,le)=>{j(te),N(le),U(1,{sortKey:te,sortDirection:le})},Q=t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(Ge,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"No results found. Try adjusting your search query or filters."})]}),me={query:p,setQuery:k,onSearch:Y,isLoading:m,placeholder:a},ce={filters:n,filterValues:T,onFilterChange:W},he={results:_,total:M,currentPage:w,pageSize:i,columns:o,onPageChange:G,sortKey:L,sortDirection:R,onSort:ie};return t.jsxs("div",{className:`tdp-search ${u||""}`,children:[h?h(me):t.jsx(M1,{...me}),n.length>0&&(f?f(ce):t.jsx(_1,{...ce})),v&&t.jsxs(t.Fragment,{children:[t.jsx(xo,{error:v,onClose:()=>{}}),Q]}),m&&t.jsx("div",{className:"tdp-search__loading-overlay",children:"Loading results..."}),!m&&!z&&t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(Ge,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"Enter a search query and click Search to get started."})]}),!m&&!v&&z&&_.length>0&&(b?b(he):t.jsx(E1,{...he})),!m&&!v&&z&&_.length===0&&Q]})},ze={colors:{primary:"var(--blue-900)",primaryHover:"var(--blue-800)",primaryActive:"var(--blue-800)",background:"var(--white-900)",text:"var(--black-900)",border:"var(--grey-200)",cardBackground:"var(--white-900)",cardBorder:"var(--grey-200)"},radius:{small:"4px",medium:"8px",large:"16px"},spacing:{small:"8px",medium:"16px",large:"24px"}},R1=l.div`
2018
- ${e=>Object.entries(e.$themeStyles).map(([o,n])=>`${o}: ${n};`).join(`
2019
- `)}
2020
- `,S1=({theme:e={},children:o})=>{const n=d.useMemo(()=>({colors:{...ze.colors,...e.colors},radius:{...ze.radius,...e.radius},spacing:{...ze.spacing,...e.spacing}}),[e]),r=d.useMemo(()=>{const s={};return n.colors&&Object.entries(n.colors).forEach(([i,a])=>{a&&(s[`--theme-${i}`]=a)}),n.radius&&Object.entries(n.radius).forEach(([i,a])=>{a&&(s[`--theme-radius-${i}`]=a)}),n.spacing&&Object.entries(n.spacing).forEach(([i,a])=>{a&&(s[`--theme-spacing-${i}`]=a)}),s},[n]);return t.jsx(l.ThemeProvider,{theme:n,children:t.jsx(R1,{$themeStyles:r,children:o})})};exports.AppHeader=Mt;exports.AppLayout=za;exports.AreaGraph=Ga;exports.AssistantModal=ai;exports.Badge=Xo;exports.BarGraph=Ua;exports.Boxplot=Fa;exports.Button=ae;exports.ButtonControl=po;exports.ButtonControlGroup=di;exports.CHART_COLORS=je;exports.COLORS=C;exports.Card=an;exports.CardSidebar=yo;exports.Checkbox=Ue;exports.Chromatogram=Ka;exports.ChromatogramChart=ul;exports.CodeEditor=Me;exports.CodeScriptEditorButton=_i;exports.DEFAULT_CATEGORY_COLORS=De;exports.DEFAULT_COLOR_SCALE=Mo;exports.DEFAULT_MARKER_SIZE=Ee;exports.DEFAULT_MAX_POINTS=Ct;exports.DEFAULT_SIZE_RANGE=Lo;exports.DotPlot=hl;exports.Dropdown=Le;exports.ErrorAlert=xo;exports.FormField=Li;exports.Heatmap=Fl;exports.Histogram=ql;exports.Icon=F;exports.IconName=$;exports.Input=We;exports.InteractiveScatter=c1;exports.Label=bt;exports.LaunchContent=wo;exports.LineGraph=d1;exports.Main=w1;exports.MarkdownDisplay=zr;exports.Menu=zi;exports.MenuItem=go;exports.Modal=vt;exports.Navbar=Lt;exports.PLOT_CONSTANTS=ee;exports.PieChart=j1;exports.PlateMap=Eo;exports.PopConfirm=Co;exports.ProtocolConfiguration=jo;exports.ProtocolYamlCard=ma;exports.PythonEditorModal=ga;exports.SELECTION_MODIFIERS=Ql;exports.ScatterGraph=k1;exports.SelectField=va;exports.Sidebar=Tt;exports.SupportiveText=yt;exports.TDPLink=Ds;exports.Tab=bo;exports.TabGroup=mt;exports.Table=At;exports.TableCell=wt;exports.TableHeaderCell=jt;exports.TdpNavigationContext=Et;exports.TdpNavigationProvider=Bs;exports.TdpSearch=I1;exports.Textarea=vs;exports.ThemeProvider=S1;exports.Toast=Re;exports.ToastManager=Da;exports.Toggle=Ke;exports.Tooltip=Ve;exports.buildTdpUrl=Se;exports.defaultTheme=ze;exports.getTdpBaseUrlFromReferrer=kt;exports.navigateToTdpUrl=_t;exports.tdpPaths=Os;exports.useSearch=Ao;exports.useTdpNavigation=Ps;exports.useTdpNavigationContext=vo;
6
+ steps: []`,Ho=({initialCode:e=Uo,onDeploy:a,versions:o=["v0.0.7","v0.0.6","v0.0.5"],currentVersion:r="v0.0.7"})=>{const[n,i]=m.useState(e),[d,f]=m.useState(!0),[u,l]=m.useState(!1),c=w=>{w!==void 0&&i(w)},j=w=>{navigator.clipboard.writeText(w)},y=w=>{console.log("Launching code:",w)},x=()=>{l(!0),be.toast.info("Building Protocol: Status=IN_PROGRESS, Phase=FINALIZING"),setTimeout(()=>{Math.random()>.3?be.toast.success(`Pipeline visual-pipeline-builder-protocol-${r}-pipeline deployed successfully! Deployment complete`):be.toast.error(`Failed to deploy pipeline visual-pipeline-builder-protocol-${r}-pipeline. Please try again.`),l(!1),a&&a()},Bo)};return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h1",{className:"text-default text-lg font-semibold leading-7 m-0",children:"Launch"}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(we,{htmlFor:"overwrite-switch",children:"Overwrite Mode"}),t.jsx(_e,{checked:d,onCheckedChange:f,disabled:u}),t.jsx(ce,{orientation:"vertical"}),t.jsx("div",{className:"flex items-center",children:t.jsxs(Be,{defaultValue:"workspace",children:[t.jsx(He,{size:"default",children:t.jsx(Ue,{placeholder:"Choose a destination"})}),t.jsx(Fe,{children:o.map(w=>t.jsx($e,{value:w,children:w},w))})]})}),t.jsx(L,{onClick:x,disabled:u,children:"Deploy"})]})]}),t.jsx(je,{value:n,onChange:c,language:"yaml",width:"100%",onCopy:j,onLaunch:y,disabled:!d})]})},Fo=()=>t.jsx("div",{className:"rounded flex items-center justify-center",children:t.jsx(N.Building,{})}),$o=()=>t.jsx(N.Lamp,{}),Na=({organization:e})=>t.jsxs("div",{className:"flex items-center h-20 w-full pt-3 pr-6 pb-3 pl-32 box-border gap-10",children:[t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 text-[10px] font-medium leading-4 tracking-[0.2px]",children:"ORGANIZATION"}),t.jsxs("div",{className:"flex items-center gap-2 w-80",children:[t.jsx("div",{className:"flex items-center justify-center",children:e.logo||t.jsx(Fo,{})}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium leading-[22px]",children:e.name}),e.subtext&&t.jsx("div",{className:"text-muted-foreground text-xs italic font-medium leading-4",children:e.subtext})]})]})]})}),t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 text-[10px] font-medium leading-4 tracking-[0.2px]",children:"PROJECT"}),t.jsxs("div",{className:"flex items-center py-1.5 rounded gap-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx($o,{})}),t.jsx("div",{className:"text-muted-foreground text-sm font-medium leading-[22px]",children:"Not Selected"})]})]})})]});function lt({className:e,size:a="default",...o}){return t.jsx("div",{"data-slot":"card","data-size":a,className:s("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o})}function Rt({className:e,...a}){return t.jsx("div",{"data-slot":"card-header",className:s("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...a})}function Lt({className:e,...a}){return t.jsx("div",{"data-slot":"card-title",className:s("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...a})}function Vo({className:e,...a}){return t.jsx("div",{"data-slot":"card-description",className:s("text-sm text-muted-foreground",e),...a})}function Yo({className:e,...a}){return t.jsx("div",{"data-slot":"card-action",className:s("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})}function dt({className:e,...a}){return t.jsx("div",{"data-slot":"card-content",className:s("px-4 group-data-[size=sm]/card:px-3",e),...a})}function Wo({className:e,...a}){return t.jsx("div",{"data-slot":"card-footer",className:s("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",e),...a})}const qo=({className:e})=>{const[a,o]=m.useState(!1);return t.jsxs("div",{className:e,children:[t.jsxs("div",{className:"flex items-center justify-between pb-6 rounded-tl-3xl rounded-tr-3xl",children:[t.jsx("h2",{className:"text-xl font-semibold leading-7 m-0",children:"Protocol Configuration"}),t.jsxs("div",{className:"flex items-center gap-2 text-[15px] font-medium",children:[t.jsx(_e,{checked:a,onCheckedChange:()=>o(r=>!r)}),t.jsx(we,{htmlFor:"edit-mode-switch",children:"Edit Mode"})]})]}),t.jsxs(lt,{children:[t.jsx(Rt,{className:"border-b",children:t.jsx(Lt,{children:"Configuration"})}),t.jsx(dt,{children:a?t.jsxs(L,{variant:"secondary",children:[t.jsx(N.Plus,{}),"Add Input"]}):t.jsx("div",{className:"flex flex-col items-start gap-4",children:t.jsx("div",{className:"text-muted-foreground text-sm font-medium",children:"No values, Use the 'edit' button to add values"})})})]})]})},Ko=({title:e,newVersionMode:a,onToggleNewVersionMode:o,versionOptions:r,selectedVersion:n,onVersionChange:i,onDeploy:d,yaml:f,onYamlChange:u})=>t.jsxs("div",{className:"flex flex-col items-start p-0 gap-4 w-[928px] bg-transparent",children:[t.jsxs("div",{className:"flex flex-row justify-between items-center w-[928px] h-9",children:[t.jsx("span",{className:"font-semibold text-lg leading-7",children:e}),t.jsxs("div",{className:"flex flex-row items-center gap-4 justify-end",children:[t.jsx(_e,{checked:a,onCheckedChange:o}),t.jsx(we,{htmlFor:"new-version-mode-switch",children:"New Version Mode"}),t.jsx("div",{className:"w-px h-5"}),t.jsxs(Be,{value:n,onValueChange:i,children:[t.jsx(He,{size:"default",children:t.jsx(Ue,{placeholder:"Choose a version"})}),t.jsx(Fe,{children:r.map(l=>t.jsx($e,{value:l.value,children:l.label},l.value))})]}),t.jsx(L,{onClick:d,children:"Deploy"})]})]}),t.jsx("div",{className:"w-full",children:t.jsx(je,{value:f,onChange:l=>u(l??""),language:"yaml",onCopy:()=>{},onLaunch:()=>{}})})]}),Xo=({open:e,onOpenChange:a,initialValue:o="",title:r="",description:n="",onSave:i,onCancel:d})=>{const[f,u]=m.useState(o),l=()=>{i(f)},c=()=>{d?.(),a(!1)};return t.jsx(Re,{open:e,onOpenChange:a,children:t.jsxs(Le,{className:"min-w-[600px]",children:[t.jsx(Oe,{children:t.jsx(Pe,{children:r})}),t.jsx(Tt,{className:"sr-only",children:n}),t.jsx("div",{className:"py-3 flex-1",children:t.jsx(je,{value:f,onChange:j=>u(j??""),language:"python",height:300,onCopy:()=>{},onLaunch:()=>{}})}),t.jsxs(At,{children:[t.jsx(L,{variant:"outline",onClick:c,children:"Cancel"}),t.jsx(L,{onClick:l,children:"Save Code"})]})]})})},Zo=({icon:e,label:a,active:o,onClick:r})=>t.jsxs("div",{className:s("w-full inline-flex flex-col rounded items-center py-3 cursor-pointer transition-colors duration-200 ease-in-out hover:bg-primary/50",o?"bg-primary":"bg-transparent"),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&r?.()},onClick:r,children:[t.jsx("div",{className:"flex justify-center items-center mb-[10px]",children:t.jsx(e,{size:20})}),t.jsx("div",{className:"text-center text-xs font-medium leading-4 px-2",children:a})]}),Ot=({items:e,activeItem:a,onItemClick:o})=>{const r=n=>{o&&o(n)};return t.jsx("div",{className:"w-[104px] h-full flex flex-col items-center pl-2 pr-2 gap-1",children:e.map(n=>t.jsx(Zo,{icon:n.icon,label:n.label,active:a===n.label,onClick:()=>r(n.label)},n.label))})},Jo="__tdp-search-empty__",Qo=e=>`${Jo}:${e}`,er=({filters:e,filterValues:a,onFilterChange:o})=>t.jsx("div",{className:"tdp-search__filters-row",children:e.map(r=>{const n=Qo(r.key),i=r.options.some(l=>l.value===""),d=a[r.key]??"",f=r.options.some(l=>l.value===d),u=d===""?i?n:void 0:f?d:void 0;return t.jsxs("div",{className:"tdp-search__filter-wrapper",children:[t.jsx("label",{className:"tdp-search__filter-label",children:r.label}),t.jsxs(Be,{value:u,onValueChange:l=>o(r.key,l===n?"":l),children:[t.jsx(He,{className:"h-[38px] w-full justify-between rounded-md",children:t.jsx(Ue,{placeholder:"Select an option"})}),t.jsx(Fe,{children:r.options.map(l=>t.jsx($e,{value:l.value===""?n:l.value,disabled:l.disabled,children:l.label},`${r.key}-${l.value||n}`))})]})]},r.key)})});function ka({className:e,...a}){return t.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:t.jsx("table",{"data-slot":"table",className:s("w-full caption-bottom text-sm",e),...a})})}function Ma({className:e,...a}){return t.jsx("thead",{"data-slot":"table-header",className:s("[&_tr]:border-b",e),...a})}function _a({className:e,...a}){return t.jsx("tbody",{"data-slot":"table-body",className:s("[&_tr:last-child]:border-0",e),...a})}function tr({className:e,...a}){return t.jsx("tfoot",{"data-slot":"table-footer",className:s("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a})}function yt({className:e,...a}){return t.jsx("tr",{"data-slot":"table-row",className:s("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a})}function Sa({className:e,...a}){return t.jsx("th",{"data-slot":"table-head",className:s("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...a})}function za({className:e,...a}){return t.jsx("td",{"data-slot":"table-cell",className:s("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...a})}function ar({className:e,...a}){return t.jsx("caption",{"data-slot":"table-caption",className:s("mt-4 text-sm text-muted-foreground",e),...a})}const or=({results:e,total:a,currentPage:o,pageSize:r,columns:n,onPageChange:i,sortKey:d,sortDirection:f,onSort:u})=>{const l=m.useMemo(()=>Math.max(1,Math.ceil(a/r)),[a,r]),c=m.useMemo(()=>{const x=[];if(l<=5)for(let C=1;C<=l;C++)x.push(C);else{x.push(1),o>3&&x.push("...");const C=Math.max(2,o-1),S=Math.min(l-1,o+1);for(let _=C;_<=S;_++)x.push(_);o<l-2&&x.push("..."),x.push(l)}return x},[l,o]),j=m.useCallback(x=>{u(x,d===x&&f==="asc"?"desc":"asc")},[d,f,u]),y=m.useCallback(x=>d!==x?t.jsx(N.ArrowUpDown,{className:"ml-1 inline size-3.5 text-muted-foreground"}):f==="asc"?t.jsx(N.ArrowUp,{className:"ml-1 inline size-3.5"}):t.jsx(N.ArrowDown,{className:"ml-1 inline size-3.5"}),[d,f]);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"tdp-search__results-header",children:t.jsxs("div",{className:"tdp-search__results-count",children:["Showing ",(o-1)*r+1,"-",Math.min(o*r,a)," of ",a," results"]})}),t.jsx("div",{className:"rounded-lg border",children:t.jsxs(ka,{children:[t.jsx(Ma,{children:t.jsx(yt,{children:n.map(x=>t.jsxs(Sa,{style:{width:x.width,textAlign:x.align},className:x.sortable?"cursor-pointer select-none":void 0,onClick:x.sortable?()=>j(x.key):void 0,children:[x.header,x.sortable&&y(x.key)]},x.key))})}),t.jsx(_a,{children:e.map((x,w)=>t.jsx(yt,{children:n.map(C=>{const S=x[C.key],_=C.render?C.render(S,x,w):S;return t.jsx(za,{style:{textAlign:C.align},children:_},C.key)})},x.id||w))})]})}),l>1&&t.jsxs("div",{className:"flex items-center justify-center gap-2 py-2.5",children:[t.jsx(L,{variant:"outline",size:"icon-sm",disabled:o===1,onClick:()=>i(o-1),"aria-label":"Previous page",children:t.jsx(N.ChevronLeft,{})}),c.map((x,w)=>typeof x=="number"?t.jsx(L,{variant:x===o?"default":"ghost",size:"icon-sm",onClick:()=>i(x),children:x},w):t.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:x},w)),t.jsx(L,{variant:"outline",size:"icon-sm",disabled:o===l,onClick:()=>i(o+1),"aria-label":"Next page",children:t.jsx(N.ChevronRight,{})})]})]})},rr=({query:e,setQuery:a,onSearch:o,isLoading:r,placeholder:n})=>{const i=d=>{d.key==="Enter"&&o()};return t.jsxs("div",{className:"tdp-search__search-bar",children:[t.jsx("div",{className:"tdp-search__search-input-wrapper",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2.5 text-muted-foreground",children:t.jsx(N.Search,{})}),t.jsx(Ge,{value:e,onChange:d=>a(d.target.value),onKeyDown:i,placeholder:n,className:"pl-9"})]})}),t.jsx(L,{variant:"default",onClick:o,disabled:!e.trim()||r,children:r?"Searching...":"Search"})]})},nt="ts-auth-token",st="x-org-slug",nr="/v1/datalake/searchEql",sr=(e,a,o)=>{const{searchTerm:r,sort:n,order:i,...d}=e,f={from:a,size:o};return r!==void 0&&r!==""&&(f.query={simple_query_string:{query:r,default_operator:"and"}}),n!==void 0&&n!==""&&(f.sort=i?[{[n]:i}]:[n]),Object.entries(d).forEach(([u,l])=>{l!==void 0&&(f[u]=l)}),f};function Ia(e){const[a,o]=m.useState([]),[r,n]=m.useState(0),[i,d]=m.useState(1),[f,u]=m.useState(!1),[l,c]=m.useState(null);return{results:a,total:r,currentPage:i,isLoading:f,error:l,executeSearch:async(y,x=1)=>{u(!0),c(null);const{pageSize:w,standalone:C,baseUrl:S,apiEndpoint:_="/api/search",authToken:b,orgSlug:v}=e,M=(x-1)*w;let g,h;if(C){if(!S)throw new Error("baseUrl is required when standalone is true");g=`${S.replace(/\/$/,"")}${nr}`,h={method:"POST",headers:{"Content-Type":"application/json",...b&&{[nt]:b},...v&&{[st]:v}},body:JSON.stringify(sr(y,M,w))}}else{const k={"Content-Type":"application/json"};b&&v&&(k[nt]=b,k[st]=v),g=_,h={method:"POST",headers:k,credentials:"include",body:JSON.stringify({...y,size:w,from:M})}}try{const k=await fetch(g,h);if(!k.ok){const D=await k.json().catch(()=>({error:"Unknown error"})),R=C&&D.error?.message||D.error;throw new Error(R||`HTTP ${k.status}: ${k.statusText}`)}const z=await k.json(),A=(z.hits?.hits||[]).map(D=>({id:D._id,...D._source,_score:D._score})),I=typeof z.hits?.total=="number"?z.hits.total:z.hits?.total?.value||0;return o(A),n(I),d(x),A}catch(k){return c(k.message||"An error occurred while searching"),o([]),n(0),[]}finally{u(!1)}}}}function sa(e){try{return localStorage.getItem(e)??void 0}catch{return}}function ia(e){try{const a=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return a?decodeURIComponent(a[1]):void 0}catch{return}}function ir(e,a){if(e&&a)return{authToken:e,orgSlug:a};const o=sa(nt),r=sa(st);if(o&&r)return{authToken:o,orgSlug:r};const n=ia(nt),i=ia(st);return n&&i?{authToken:n,orgSlug:i}:{authToken:e,orgSlug:a}}const lr=ne.cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Aa({className:e,variant:a,...o}){return t.jsx("div",{"data-slot":"alert",role:"alert",className:s(lr({variant:a}),e),...o})}function Ta({className:e,...a}){return t.jsx("div",{"data-slot":"alert-title",className:s("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...a})}function Da({className:e,...a}){return t.jsx("div",{"data-slot":"alert-description",className:s("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...a})}function dr({className:e,...a}){return t.jsx("div",{"data-slot":"alert-action",className:s("absolute top-2 right-2",e),...a})}const cr=({defaultQuery:e="",columns:a,filters:o=[],defaultSort:r,advancedSearchParams:n,pageSize:i=10,searchPlaceholder:d="Enter search term...",className:f,onSearch:u,renderSearchBar:l,renderFilters:c,renderResults:j,...y})=>{const{authToken:x,orgSlug:w}=ir(y.authToken,y.orgSlug),{results:C,total:S,currentPage:_,isLoading:b,error:v,executeSearch:M}=Ia({...y,authToken:x??"",orgSlug:w??"",pageSize:i}),[g,h]=m.useState(e),[k,z]=m.useState({}),[A,I]=m.useState(null),[D,R]=m.useState("asc"),[O,K]=m.useState(!1),Z=async(ae=1,oe)=>{if(!g.trim())return;K(!0);const Ce=oe?.sortKey??A??r?.field,me=oe==null?A?D:r?.order??D:oe.sortDirection,xe=Object.entries(k).filter(([,de])=>de!=="").map(([de,We])=>({field:de,operator:"eq",value:We}));let ue=n?.expression;xe.length>0&&(ue={g:"AND",e:ue?[...xe,ue]:xe});const Ne={searchTerm:g.trim(),sort:Ce??void 0,order:me,...n,...ue!==void 0&&{expression:ue}},pe=await M(Ne,ae);u&&u({...Ne,from:(ae-1)*i,size:i},pe)},W=()=>{Z(1)},X=(ae,oe)=>{z(Ce=>({...Ce,[ae]:oe}))},J=ae=>{Z(ae)},B=(ae,oe)=>{I(ae),R(oe),Z(1,{sortKey:ae,sortDirection:oe})},Q=t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(N.Search,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"No results found. Try adjusting your search query or filters."})]}),ee={query:g,setQuery:h,onSearch:W,isLoading:b,placeholder:d},ye={filters:o,filterValues:k,onFilterChange:X},ge={results:C,total:S,currentPage:_,pageSize:i,columns:a,onPageChange:J,sortKey:A,sortDirection:D,onSort:B};return t.jsxs("div",{className:`tdp-search ${f||""}`,children:[l?l(ee):t.jsx(rr,{...ee}),o.length>0&&(c?c(ye):t.jsx(er,{...ye})),v&&t.jsxs(t.Fragment,{children:[t.jsxs(Aa,{variant:"destructive",children:[t.jsx(N.AlertCircle,{}),t.jsx(Ta,{children:"Error"}),t.jsx(Da,{children:v})]}),Q]}),b&&t.jsx("div",{className:"tdp-search__loading-overlay",children:"Loading results..."}),!b&&!O&&t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(N.Search,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"Enter a search query and click Search to get started."})]}),!b&&!v&&O&&C.length>0&&(j?j(ge):t.jsx(or,{...ge})),!b&&!v&&O&&C.length===0&&Q]})},ur=["/data-workspace","/data-apps","/pipelines","/pipeline-edit/","/pipeline-details/","/pipeline-processing/","/file/","/file-details/","/files","/search","/search-classic","/artifacts/","/admin","/settings","/agent-studio"];function Pt(){if(typeof document>"u"||!document.referrer)return null;try{const e=new URL(document.referrer),a=e.pathname;for(const o of ur){const r=a.indexOf(o);if(r!==-1){const n=a.slice(0,r).replace(/\/$/u,"");return`${e.origin}${n}`}}return e.origin}catch{return null}}function Ee(e,a){try{const o=a.startsWith("/")?a:`/${a}`,r=new URL(e);return r.pathname=`${r.pathname.replace(/\/$/u,"")}${o}`,r.href}catch{return null}}function Gt(e,a={}){if(a.newTab){window.open(e,"_blank","noopener,noreferrer");return}if(window.parent!==window)try{window.parent.location.href}catch{try{const o=new URL(e),r=`${o.pathname}${o.search}${o.hash}`;window.parent.postMessage({type:"navigate",path:r},"*");return}catch{}}window.location.href=e}const pr={fileDetails:e=>`/file/${e}`,pipelineEdit:e=>`/pipeline-edit/${e}`,pipelineDetails:e=>`/pipeline-details/${e}`,search:e=>e?`/search?q=${encodeURIComponent(e)}`:"/search",dataWorkspace:()=>"/data-workspace",dataApps:()=>"/data-apps",artifact:(e,a,o)=>`/artifacts/${e}/${a}/${o}`},Bt=m.createContext(null);function Ea(){const e=m.useContext(Bt);if(!e)throw new Error("useTdpNavigationContext must be used within a TdpNavigationProvider. Wrap your app with <TdpNavigationProvider> or use the standalone useTdpNavigation() hook instead.");return e}const mr=({tdpBaseUrl:e,children:a})=>{const o=m.useMemo(()=>e?e.replace(/\/$/u,""):Pt(),[e]),r=m.useMemo(()=>({tdpBaseUrl:o,getTdpUrl:n=>o?Ee(o,n):null,navigateToTdp:(n,i)=>{if(!o){console.warn("[TdpNavigation] Cannot navigate: TDP base URL not resolved");return}const d=Ee(o,n);d&&Gt(d,i)}}),[o]);return t.jsx(Bt.Provider,{value:r,children:a})};function fr(e={}){const{tdpBaseUrl:a}=e,o=m.useMemo(()=>a?a.replace(/\/$/u,""):Pt(),[a]);return m.useMemo(()=>({tdpBaseUrl:o,getTdpUrl:r=>o?Ee(o,r):null,navigateToTdp:(r,n)=>{if(!o){console.warn("[useTdpNavigation] Cannot navigate: TDP base URL not resolved");return}const i=Ee(o,r);i&&Gt(i,n)}}),[o])}const gr=({path:e,navigationOptions:a={newTab:!0},children:o,onClick:r,className:n,...i})=>{const{getTdpUrl:d,navigateToTdp:f}=Ea(),u=d(e),l=c=>{c.metaKey||c.ctrlKey||c.shiftKey||(c.preventDefault(),r?.(c),f(e,a))};return t.jsx("a",{href:u??"#",target:a.newTab?"_blank":void 0,rel:a.newTab?"noopener noreferrer":void 0,onClick:l,className:`no-underline cursor-pointer hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:rounded-[2px] ${n??""}`,style:{color:"var(--primary)",outlineColor:"var(--border)"},...i,children:o})},xr=({userProfile:e,hostname:a,organization:o,children:r})=>{const n=[{icon:N.Search,label:"Search"},{icon:N.SearchCode,label:"SQL Search"},{icon:N.Lamp,label:"Projects"},{icon:N.Workflow,label:"Pipelines"},{icon:N.Monitor,label:"Data & AI Workspace"},{icon:N.Box,label:"Artifacts"},{icon:N.Database,label:"Data Sources"},{icon:N.PieChart,label:"Health Monitoring"},{icon:N.CheckCheck,label:"Bulk Actions"},{icon:N.Code,label:"Attribute Management"},{icon:N.Settings,label:"Administration"}],[i,d]=m.useState("Pipelines"),f=j=>{d(j)},u=()=>{console.log("Home clicked")},l=()=>{console.log("Settings clicked")},c=()=>{console.log("User profile clicked")};return t.jsxs("div",{className:"app-layout",children:[t.jsx(Na,{organization:o}),t.jsxs("div",{className:"content-container",children:[t.jsx(Ot,{items:n,activeItem:i,onItemClick:f}),t.jsxs("div",{className:"main-content",children:[t.jsx(ba,{hostname:a,userProfile:e,onHomeClick:u,onSettingsClick:l,onUserProfileClick:c}),t.jsx("div",{className:"main-layout",children:r})]})]})]})},hr={paperBg:"transparent",plotBg:"transparent",textColor:"rgba(26, 26, 26, 1)",textSecondary:"rgba(26, 26, 26, 0.6)",gridColor:"rgba(225, 231, 239, 1)",lineColor:"rgba(26, 26, 26, 1)",tickColor:"rgba(225, 231, 239, 1)",legendColor:"rgba(4, 38, 63, 1)",spikeColor:"rgba(100, 116, 139, 1)",isDark:!1},br={paperBg:"transparent",plotBg:"transparent",textColor:"rgba(255, 255, 255, 0.9)",textSecondary:"rgba(255, 255, 255, 0.6)",gridColor:"rgba(51, 65, 86, 1)",lineColor:"rgba(158, 172, 192, 1)",tickColor:"rgba(51, 65, 86, 1)",legendColor:"rgba(200, 214, 229, 1)",spikeColor:"rgba(158, 172, 192, 1)",isDark:!0};function le(){const e=It();return m.useMemo(()=>e?br:hr,[e])}const vr=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,variant:i="normal",xTitle:d="Columns",yTitle:f="Rows",title:u="Area Graph"})=>{const l=m.useRef(null),c=le(),{xMin:j,xMax:y,yMin:x,yMax:w}=m.useMemo(()=>{let g=Number.MAX_VALUE,h=Number.MIN_VALUE,k=Number.MAX_VALUE,z=Number.MIN_VALUE;e.forEach(D=>{D.x.forEach(R=>{g=Math.min(g,R),h=Math.max(h,R)}),D.y.forEach(R=>{k=Math.min(k,R),z=Math.max(z,R)})});const A=(h-g)*.1,I=(z-k)*.1;return{xMin:g-A,xMax:h+A,yMin:i==="stacked"?0:k-I,yMax:z+I}},[e,i]),C=m.useMemo(()=>r||[j,y],[r,j,y]),S=m.useMemo(()=>n||[x,w],[n,x,w]),_=m.useMemo(()=>{const g=C[1]-C[0];let h=Math.pow(10,Math.floor(Math.log10(g)));g/h>10&&(h=h*2),g/h<4&&(h=h/2);const k=[];let z=Math.ceil(C[0]/h)*h;for(;z<=C[1];)k.push(z),z+=h;return k},[C]),b=m.useMemo(()=>{const g=S[1]-S[0];let h=Math.pow(10,Math.floor(Math.log10(g)));g/h>10&&(h=h*2),g/h<4&&(h=h/2);const k=[];let z=Math.ceil(S[0]/h)*h;for(;z<=S[1];)k.push(z),z+=h;return k},[S]),v=m.useMemo(()=>({tickcolor:c.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:c.textColor,family:"Inter, sans-serif",weight:400},linecolor:c.lineColor,linewidth:1,position:0,zeroline:!1}),[c]),M=m.useMemo(()=>({text:u,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:c.textColor,lineheight:1.2,standoff:30}}),[u,c]);return m.useEffect(()=>{if(!l.current)return;let g;if(i==="stacked"){const A=new Array(e[0]?.x.length||0).fill(0);g=e.map((I,D)=>{const R=I.y.map((O,K)=>{const Z=A[K]+O;return A[K]=Z,Z});return{x:I.x,y:R,type:"scatter",mode:"lines",name:I.name,fill:D===0?"tozeroy":"tonexty",fillcolor:I.color,line:{color:I.color,width:2}}})}else g=e.map(A=>({x:A.x,y:A.y,type:"scatter",mode:"lines",name:A.name,fill:A.fill||"tozeroy",fillcolor:A.color,line:{color:A.color,width:2}}));const h={width:a,height:o,title:M,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:c.paperBg,plot_bgcolor:c.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:d,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:_,showgrid:!0,...v},yaxis:{title:{text:f,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:b,showgrid:!0,...v},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:c.legendColor,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},k={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(l.current,g,h,k);const z=l.current;return()=>{z&&V.purge(z)}},[e,a,o,r,n,C,S,i,d,f,M,v,_,b,c]),t.jsx("div",{className:"area-graph-container",children:t.jsx("div",{ref:l,style:{width:"100%",height:"100%"}})})},jr=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,variant:i="group",xTitle:d="Columns",yTitle:f="Rows",title:u="Bar Graph",barWidth:l=24})=>{const c=m.useRef(null),j=le(),{yMin:y,yMax:x}=m.useMemo(()=>{let v=Number.MAX_VALUE,M=Number.MIN_VALUE,g=Number.MAX_VALUE,h=Number.MIN_VALUE;e.forEach(A=>{A.x.forEach(I=>{v=Math.min(v,I),M=Math.max(M,I)}),A.y.forEach(I=>{g=Math.min(g,I),h=Math.max(h,I)})});const k=(M-v)*.1,z=(h-g)*.1;return{xMin:v-k,xMax:M+k,yMin:i==="stack"?0:g-z,yMax:h+z}},[e,i]),w=m.useMemo(()=>n||[y,x],[n,y,x]),C=m.useMemo(()=>[...new Set(e.flatMap(v=>v.x))],[e]),S=m.useMemo(()=>{const v=w[1]-w[0];let M=Math.pow(10,Math.floor(Math.log10(v)));v/M>10&&(M=M*2),v/M<4&&(M=M/2);const g=[];let h=Math.ceil(w[0]/M)*M;for(;h<=w[1];)g.push(h),h+=M;return g},[w]),_=m.useMemo(()=>{switch(i){case"stack":return"stack";case"overlay":return"overlay";default:return"group"}},[i]),b=m.useMemo(()=>({tickcolor:j.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:j.textColor,family:"Inter, sans-serif",weight:400},linecolor:j.lineColor,linewidth:1,position:0,zeroline:!1}),[j]);return m.useEffect(()=>{if(!c.current)return;const v=e.map(k=>({x:k.x,y:k.y,type:"bar",name:k.name,marker:{color:k.color},width:l,error_y:k.error_y})),M={title:{text:u,font:{size:32,family:"Inter, sans-serif",color:j.textColor}},width:a,height:o,margin:{l:80,r:30,b:80,t:60,pad:0},paper_bgcolor:j.paperBg,plot_bgcolor:j.plotBg,font:{family:"Inter, sans-serif"},barmode:_,bargap:.15,dragmode:!1,xaxis:{title:{text:d,font:{size:16,color:j.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:j.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:C,showgrid:!0,...b},yaxis:{title:{text:f,font:{size:16,color:j.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:j.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:S,showgrid:!0,...b},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:j.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:e.length>1},g={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(c.current,v,M,g);const h=c.current;return()=>{h&&V.purge(h)}},[e,a,o,r,n,d,f,u,l,_,b,C,S,j]),t.jsx("div",{className:"bar-graph-container",children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})})},wr=-1.8,yr=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,xTitle:i="Columns",yTitle:d="Rows",title:f="Boxplot",showPoints:u=!1})=>{const l=m.useRef(null),c=le(),{yMin:j,yMax:y}=m.useMemo(()=>{let _=Number.MAX_VALUE,b=Number.MIN_VALUE;e.forEach(M=>{M.y.forEach(g=>{_=Math.min(_,g),b=Math.max(b,g)})});const v=(b-_)*.1;return{yMin:_-v,yMax:b+v}},[e]),x=m.useMemo(()=>n||[j,y],[n,j,y]),w=m.useMemo(()=>{const _=x[1]-x[0];let b=Math.pow(10,Math.floor(Math.log10(_)));_/b>10&&(b=b*2),_/b<4&&(b=b/2);const v=[];let M=Math.ceil(x[0]/b)*b;for(;M<=x[1];)v.push(M),M+=b;return v},[x]),C=m.useMemo(()=>({tickcolor:c.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:c.textColor,family:"Inter, sans-serif",weight:400},linecolor:c.lineColor,linewidth:1,position:0,zeroline:!1}),[c]),S=m.useMemo(()=>({text:f,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:c.textColor,lineheight:1.2,standoff:30}}),[f,c]);return m.useEffect(()=>{if(!l.current)return;const _=e.map(g=>({y:g.y,x:g.x,type:"box",name:g.name,marker:{color:g.color},line:{color:g.color},fillcolor:g.color+"40",boxpoints:u?g.boxpoints||"outliers":!1,jitter:g.jitter||.3,pointpos:g.pointpos||wr})),b={width:a,height:o,title:S,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:c.paperBg,plot_bgcolor:c.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:r,autorange:!r,showgrid:!0,...C},yaxis:{title:{text:d,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:w,showgrid:!0,...C},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:c.legendColor,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},v={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(l.current,_,b,v);const M=l.current;return()=>{M&&V.purge(M)}},[e,a,o,r,n,x,i,d,u,S,C,w,c]),t.jsx("div",{className:"boxplot-container",children:t.jsx("div",{ref:l,style:{width:"100%",height:"100%"}})})},Cr=75,Nr=1.05,kr=e=>{const a={A:e.peakA,T:e.peakT,G:e.peakG,C:e.peakC},o=Object.values(a);if(o.every(d=>d===o[0]))return"";let n="",i=0;return Object.entries(a).forEach(([d,f])=>{f>i&&(n=d,i=f)}),n},Mr=({data:e=[],width:a=900,height:o=600,positionInterval:r=10,colorA:n="#2D9CDB",colorT:i="#A1C63C",colorG:d="#FF5C64",colorC:f="#FFA62E"})=>{const u=m.useRef(null),l=le(),c=m.useMemo(()=>e.map(h=>h.position),[e]),j=m.useMemo(()=>e.map(h=>kr(h)),[e]),y=m.useMemo(()=>e.map(h=>h.peakA),[e]),x=m.useMemo(()=>e.map(h=>h.peakT),[e]),w=m.useMemo(()=>e.map(h=>h.peakG),[e]),C=m.useMemo(()=>e.map(h=>h.peakC),[e]),S=m.useMemo(()=>({x:c,y,type:"scatter",mode:"lines",name:"A",line:{color:n,width:2,shape:"spline"}}),[c,y,n]),_=m.useMemo(()=>({x:c,y:x,type:"scatter",mode:"lines",name:"T",line:{color:i,width:2,shape:"spline"}}),[c,x,i]),b=m.useMemo(()=>({x:c,y:w,type:"scatter",mode:"lines",name:"G",line:{color:d,width:2,shape:"spline"}}),[c,w,d]),v=m.useMemo(()=>({x:c,y:C,type:"scatter",mode:"lines",name:"C",line:{color:f,width:2,shape:"spline"}}),[c,C,f]),M=m.useMemo(()=>Math.max(...y,...x,...w,...C),[y,x,w,C]);if(m.useEffect(()=>{if(!u.current||e.length===0)return;const h=[S,_,b,v],k={width:a,height:o-Cr,margin:{l:0,r:0,b:20,t:10,pad:0},paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg,font:{family:"Inter, sans-serif"},showlegend:!1,xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[Math.min(...c),Math.max(...c)],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[0,M*Nr],fixedrange:!0}},z={responsive:!0,displayModeBar:!1,displaylogo:!1,fillFrame:!0};V.newPlot(u.current,h,k,z);const A=u.current;return()=>{A&&V.purge(A)}},[e,a,o,S,_,b,v,M,c,l]),e.length===0)return t.jsx("div",{className:"chart-container",children:"No data available"});const g=()=>{const h=()=>{const z=Math.min(...c),A=Math.max(...c),I=a;return t.jsx("div",{className:"sequence-letters-container",children:j.map((D,R)=>{const O=c[R],K=D==="A"?n:D==="T"?i:D==="G"?d:D==="C"?f:l.textColor,W=(O-z)/(A-z)*I;return t.jsx("span",{className:"sequence-letter",style:{left:`${W}px`,color:K},children:D},`base-${R}`)})})},k=()=>{const z=Math.min(...c),A=Math.max(...c),I=a,D=Math.ceil(z/r)*r,R=[];for(let O=D;O<=A;O+=r)R.push({position:O,label:O.toString()});return t.jsx("div",{className:"position-numbers-container",children:R.map(O=>{const Z=(O.position-z)/(A-z)*I;return t.jsx("span",{className:"position-number",style:{left:`${Z}px`},children:O.label},`pos-${O.position}`)})})};return t.jsxs("div",{className:"sequence-header",children:[h(),k()]})};return t.jsxs("div",{className:"chromatogram-container",style:{width:a,height:o},children:[g(),t.jsx("div",{className:"chromatogram-chart",children:t.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})})]})},T=(e,a)=>{if(typeof window<"u")return getComputedStyle(document.documentElement).getPropertyValue("--"+e).trim()||a||"";const o=a?", "+a:"";return"var(--"+e+o+")"},P={BLACK_50:T("black-50","rgba(26, 26, 26, 0.05)"),BLACK_100:T("black-100","rgba(26, 26, 26, 0.1)"),BLACK_200:T("black-200","rgba(26, 26, 26, 0.2)"),BLACK_300:T("black-300","rgba(26, 26, 26, 0.3)"),BLACK_400:T("black-400","rgba(26, 26, 26, 0.4)"),BLACK_500:T("black-500","rgba(26, 26, 26, 0.5)"),BLACK_600:T("black-600","rgba(26, 26, 26, 0.6)"),BLACK_700:T("black-700","rgba(26, 26, 26, 0.7)"),BLACK_800:T("black-800","rgba(26, 26, 26, 0.8)"),BLACK_900:T("black-900","rgba(26, 26, 26, 1)"),BLACK:T("black-900","#1a1a1a"),WHITE_50:T("white-50","rgba(255, 255, 255, 0.05)"),WHITE_100:T("white-100","rgba(255, 255, 255, 0.1)"),WHITE_200:T("white-200","rgba(255, 255, 255, 0.2)"),WHITE_300:T("white-300","rgba(255, 255, 255, 0.3)"),WHITE_400:T("white-400","rgba(255, 255, 255, 0.4)"),WHITE_500:T("white-500","rgba(255, 255, 255, 0.5)"),WHITE_600:T("white-600","rgba(255, 255, 255, 0.6)"),WHITE_700:T("white-700","rgba(255, 255, 255, 0.7)"),WHITE_800:T("white-800","rgba(255, 255, 255, 0.8)"),WHITE_900:T("white-900","rgba(255, 255, 255, 1)"),WHITE:T("white-900","#ffffff"),BLUE_50:T("blue-50","rgba(240, 249, 255, 1)"),BLUE_100:T("blue-100","rgba(225, 243, 254, 1)"),BLUE_200:T("blue-200","rgba(185, 229, 252, 1)"),BLUE_300:T("blue-300","rgba(125, 211, 251, 1)"),BLUE_400:T("blue-400","rgba(58, 190, 247, 1)"),BLUE_500:T("blue-500","rgba(27, 173, 240, 1)"),BLUE_600:T("blue-600","rgba(64, 114, 210, 1)"),BLUE_700:T("blue-700","rgba(3, 105, 159, 1)"),BLUE_800:T("blue-800","rgba(5, 69, 103, 1)"),BLUE_900:T("blue-900","rgba(4, 38, 63, 1)"),BLUE:T("graph-primary-blue","#2D9CDB"),GREY_50:T("grey-50","rgba(248, 250, 252, 1)"),GREY_100:T("grey-100","rgba(241, 245, 249, 1)"),GREY_200:T("grey-200","rgba(225, 231, 239, 1)"),GREY_300:T("grey-300","rgba(200, 214, 229, 1)"),GREY_400:T("grey-400","rgba(158, 172, 192, 1)"),GREY_500:T("grey-500","rgba(100, 116, 139, 1)"),GREY_600:T("grey-600","rgba(72, 86, 106, 1)"),GREY_700:T("grey-700","rgba(51, 65, 86, 1)"),GREY_800:T("grey-800","rgba(29, 40, 57, 1)"),GREY_900:T("grey-900","rgba(20, 30, 53, 1)"),GREY:T("grey-400","#CCCCCC"),ORANGE:T("graph-primary-orange","#FFA62E"),RED:T("graph-primary-red","#FF5C64"),GREEN:T("graph-primary-green","#A5C34E"),YELLOW:T("graph-primary-yellow","#FBED53"),PURPLE:T("graph-primary-purple","#7A51AB"),GREEN_BG:T("green-bg","rgba(234, 254, 229, 1)"),GREEN_SUCCESS:T("green-success","rgba(8, 173, 55, 1)"),ORANGE_BG:T("orange-bg","rgba(254, 250, 229, 1)"),ORANGE_CAUTION:T("orange-caution","rgba(249, 173, 20, 1)"),RED_BG:T("red-bg","rgba(254, 234, 229, 1)"),RED_ERROR:T("red-error","rgba(216, 35, 44, 1)"),GRAPH_SECONDARY_BROWN:T("graph-secondary-brown","#AD7942"),GRAPH_SECONDARY_PINK:T("graph-secondary-pink","#FB90B4"),GRAPH_SECONDARY_TEAL:T("graph-secondary-teal","#3CCABA"),GRAPH_SECONDARY_DARK_BLUE:T("graph-secondary-dark-blue","#4072D2"),GRAPH_SECONDARY_BLACK:T("graph-secondary-black","#424E62"),GRAPH_SECONDARY_GREY:T("graph-secondary-grey","#B4B4B4")},Me=[P.ORANGE,P.RED,P.GREEN,P.BLUE,P.YELLOW,P.PURPLE,P.GRAPH_SECONDARY_BROWN,P.GRAPH_SECONDARY_PINK,P.GRAPH_SECONDARY_TEAL,P.GRAPH_SECONDARY_DARK_BLUE,P.GRAPH_SECONDARY_BLACK,P.GRAPH_SECONDARY_GREY],ke={MARGIN_LEFT:70,MARGIN_RIGHT:30,MARGIN_BOTTOM:60,MARGIN_TOP_WITH_TITLE:50,MARGIN_TOP_NO_TITLE:30,MARGIN_PAD:5},la={USER_ANNOTATION_FONT_SIZE:11,AUTO_ANNOTATION_FONT_SIZE:10},xt={default:{ax:0,ay:-35},overlap:[{ax:50,ay:-35},{ax:-60,ay:-35},{ax:70,ay:-55},{ax:-80,ay:-55},{ax:50,ay:-75},{ax:-60,ay:-75}]};function _r(e,a){const o=[...e].sort((i,d)=>i.peak.x-d.peak.x),r=[];let n=[];for(const i of o){if(n.length===0){n.push(i);continue}const d=n[n.length-1];Math.abs(i.peak.x-d.peak.x)<a?n.push(i):(r.push(n),n=[i])}return n.length>0&&r.push(n),r}function da(e,a,o){const r=a===-1,n=r?P.GREY_500:Me[a%Me.length],i=r?P.BLACK_900:n,d=e.text??(e._computed?.area===void 0?"":`Area: ${e._computed.area.toFixed(2)}`),f=r&&e.ax!==void 0?e.ax:o.ax,u=r&&e.ay!==void 0?e.ay:o.ay;return{x:e.x,y:e.y,text:d,showarrow:!0,arrowhead:2,arrowsize:1,arrowwidth:1,arrowcolor:n,ax:f,ay:u,font:{size:r?la.USER_ANNOTATION_FONT_SIZE:la.AUTO_ANNOTATION_FONT_SIZE,color:i,family:"Inter, sans-serif"},bgcolor:P.WHITE,borderpad:2,bordercolor:r?void 0:n,borderwidth:r?0:1}}function Sr(e){if(e.length===1){const{peak:o,seriesIndex:r}=e[0];return[da(o,r,xt.default)]}return[...e].sort((o,r)=>o.peak.y-r.peak.y).map(({peak:o,seriesIndex:r},n)=>{const i=xt.overlap[n%xt.overlap.length];return da(o,r,i)})}const zr=-5,Ir=-12,ca=-16;function ua(e,a,o,r){return o==="none"?[]:[{x:[e],y:[a],type:"scatter",mode:"markers",marker:{symbol:o==="diamond"?"diamond":"triangle-up",size:8,color:r},showlegend:!1,hoverinfo:"skip"}]}function Ar(e){const a=[];for(const{peaks:o,seriesIndex:r,x:n}of e){const i=Me[r%Me.length],d=zr+r*ca,f=Ir+r*ca;for(const u of o){const l=u._computed?.startIndex??0,c=u._computed?.endIndex??0,j=n[l],y=n[c],x=u.startMarker??"triangle",w=u.endMarker??"diamond";a.push(...ua(j,d,x,i)),a.push(...ua(y,f,w,i))}}return a}function Tr(e,a,o){let r=e[a],n=e[a];for(let i=a-1;i>=Math.max(0,a-o);i--)r=Math.min(r,e[i]);for(let i=a+1;i<Math.min(e.length,a+o);i++)n=Math.min(n,e[i]);return e[a]-Math.max(r,n)}function Dr(e,a){let o=a,r=a;for(let n=a-1;n>=0&&e[n]<=e[n+1];n--)o=n;for(let n=a+1;n<e.length&&e[n]<=e[n-1];n++)r=n;return{startIndex:o,endIndex:r}}function Ra(e,a,o,r){const n=Math.min(a[o],a[r]);let i=0;for(let d=o;d<r;d++){const f=e[d+1]-e[d],u=a[d]-n,l=a[d+1]-n;i+=(u+l)*f/2}return i}function Er(e,a,o,r,n){const i=Math.min(a[r],a[n]),d=(a[o]+i)/2;let f=o,u=o;for(let l=o;l>=r;l--)if(a[l]<d){f=l;break}for(let l=o;l<=n;l++)if(a[l]<d){u=l;break}return e[u]-e[f]}function Rr(e,a){const o=[];for(const r of e)o.some(i=>Math.abs((i._computed?.index??0)-(r._computed?.index??0))<a)?o.length>0&&r.y>o[o.length-1].y&&(o.pop(),o.push(r)):o.push(r);return o.sort((r,n)=>r.x-n.x)}function Lr(e,a,o={}){const{minHeight:r=.05,minDistance:n=5,prominence:i=.02,relativeThreshold:d=!0}=o;if(a.length<3)return[];const f=Math.max(...a),u=d?r*f:r,l=d?i*f:i,c=n*3,j=[];for(let y=1;y<a.length-1;y++){if(!(a[y]>a[y-1]&&a[y]>a[y+1]&&a[y]>=u)||Tr(a,y,c)<l)continue;const{startIndex:C,endIndex:S}=Dr(a,y),_=Ra(e,a,C,S),b=Er(e,a,y,C,S);j.push({x:e[y],y:a[y],_computed:{area:_,index:y,startIndex:C,endIndex:S,widthAtHalfMax:b}})}return Rr(j,n)}function ht(e,a){if(e.length===0||e.length===1)return 0;let o=0,r=e.length-1;for(;o<r;){const n=Math.floor((o+r)/2);e[n]<a?o=n+1:r=n}return o>0&&Math.abs(e[o-1]-a)<Math.abs(e[o]-a)?o-1:o}function Or(e,a,o){return e.map(r=>{if(r.startX!==void 0&&r.endX!==void 0){const n=ht(a,r.startX),i=ht(a,r.endX),d=ht(a,r.x),f=r._computed?.area??Ra(a,o,n,i);return{...r,_computed:{...r._computed,index:d,startIndex:n,endIndex:i,area:f}}}return r})}function Pr(e,a,o){const r=[];e.forEach(({peaks:i,seriesIndex:d})=>{r.push({peaks:i,seriesIndex:d,x:o[d].x,y:o[d].y})});const n=a.filter(i=>i._computed?.startIndex!==void 0&&i._computed?.endIndex!==void 0);return n.length>0&&o.length>0&&r.push({peaks:n,seriesIndex:0,x:o[0].x,y:o[0].y}),r}function Gr(e,a){if(!a)return e;const o=[];for(const[r,n]of Object.entries(a))if(n!=null&&n!==""){const i=r.replace(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim();o.push(`${i}: ${String(n)}`)}return o.length>0?`${e}<br>${o.join("<br>")}`:e}function Br(e,a){const o=Math.min(e.length,a.length),r=e.slice(0,o),i=a.slice(0,o).map(f=>Number.isFinite(f)?f:0);return{x:r.map(f=>Number.isFinite(f)?f:0),y:i}}function Ur(e,a,o=50){if(a==="none"||e.length===0)return e;if(a==="linear"){if(e.length===1)return[0];const r=(e[e.length-1]-e[0])/(e.length-1);return e.map((n,i)=>n-(e[0]+r*i))}if(a==="rolling"){const r=[],n=Math.floor(o/2);for(let i=0;i<e.length;i++){const d=Math.max(0,i-n),f=Math.min(e.length,i+n+1),u=e.slice(d,f);r.push(Math.min(...u))}return e.map((i,d)=>i-r[d])}return e}const Hr=({series:e,width:a=900,height:o=500,title:r,xAxisTitle:n="Retention Time (min)",yAxisTitle:i="Signal (mAU)",annotations:d=[],xRange:f,yRange:u,showLegend:l=!0,showGridX:c=!0,showGridY:j=!0,showMarkers:y=!1,markerSize:x=4,showCrosshairs:w=!1,baselineCorrection:C="none",baselineWindowSize:S=50,peakDetectionOptions:_,showPeakAreas:b=!1,boundaryMarkers:v="none",annotationOverlapThreshold:M=.4,showExportButton:g=!0})=>{const h=_!==void 0,k=m.useRef(null),z=le(),A=m.useMemo(()=>e.map(R=>{const O=Br(R.x,R.y);return{...R,x:O.x,y:Ur(O.y,C,S)}}),[e,C,S]),I=m.useMemo(()=>{if(d.length===0||A.length===0)return d;const{x:R,y:O}=A[0];return Or(d,R,O)},[d,A]),D=m.useMemo(()=>{const R=[];return h&&_&&A.forEach((O,K)=>{const Z=Lr(O.x,O.y,_);Z.length>0&&R.push({peaks:Z,seriesIndex:K})}),R},[A,h,_]);return m.useEffect(()=>{const R=k.current;if(!R||e.length===0)return;const O=A.map((B,Q)=>{const ee=B.color||Me[Q%Me.length],ye=Gr(B.name,B.metadata),ge={x:B.x,y:B.y,type:"scatter",mode:y?"lines+markers":"lines",name:B.name,line:{color:ee,width:1.5},hovertemplate:`%{x:.2f} ${n}<br>%{y:.2f} ${i}<extra>${ye}</extra>`};return y&&(ge.marker={size:x,color:ee}),ge});if(v!=="none"){const B=Pr(D,I,A);if(B.length>0){const Q=Ar(B);O.push(...Q)}}const K=[];I.forEach(B=>{K.push({peak:B,seriesIndex:-1})}),b&&h&&D.forEach(({peaks:B,seriesIndex:Q})=>{B.forEach(ee=>{K.push({peak:ee,seriesIndex:Q})})});const Z=_r(K,M),W=[];for(const B of Z)W.push(...Sr(B));const X={title:r?{text:r,font:{size:20,family:"Inter, sans-serif",color:z.textColor}}:void 0,width:a,height:o,margin:{l:ke.MARGIN_LEFT,r:ke.MARGIN_RIGHT,b:ke.MARGIN_BOTTOM,t:r?ke.MARGIN_TOP_WITH_TITLE:ke.MARGIN_TOP_NO_TITLE,pad:ke.MARGIN_PAD},paper_bgcolor:z.paperBg,plot_bgcolor:z.plotBg,font:{family:"Inter, sans-serif"},hovermode:w?"x":"x unified",dragmode:"zoom",xaxis:{title:{text:n,font:{size:14,color:z.textSecondary,family:"Inter, sans-serif"},standoff:15},showgrid:c,gridcolor:z.gridColor,linecolor:z.lineColor,linewidth:1,range:f,autorange:!f,zeroline:!1,tickfont:{size:12,color:z.textColor,family:"Inter, sans-serif"},showspikes:w,spikemode:"across",spikesnap:"cursor",spikecolor:z.spikeColor,spikethickness:1,spikedash:"dot"},yaxis:{title:{text:i,font:{size:14,color:z.textSecondary,family:"Inter, sans-serif"},standoff:10},showgrid:j,gridcolor:z.gridColor,linecolor:z.lineColor,linewidth:1,range:u,autorange:!u,zeroline:!1,tickfont:{size:12,color:z.textColor,family:"Inter, sans-serif"},showspikes:w,spikemode:"across",spikesnap:"cursor",spikecolor:z.spikeColor,spikethickness:1,spikedash:"dot"},legend:{x:.5,y:-.15,xanchor:"center",yanchor:"top",orientation:"h",font:{size:12,color:z.textColor,family:"Inter, sans-serif"}},showlegend:l&&e.length>1,annotations:W},J={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d",...g?[]:["toImage"]],...g&&{toImageButtonOptions:{format:"png",filename:"chromatogram",width:a,height:o}}};return V.newPlot(R,O,X,J),()=>{R&&V.purge(R)}},[A,D,e.length,a,o,r,n,i,I,f,u,l,c,j,y,x,w,h,_,b,v,M,g,z]),t.jsx("div",{className:"chromatogram-chart-container",children:t.jsx("div",{ref:k,style:{width:"100%",height:"100%"}})})},Fr=({dataSeries:e,width:a=1e3,height:o=600,title:r="Dot Plot",xTitle:n="Columns",yTitle:i="Rows",variant:d="default",markerSize:f=8})=>{const u=m.useRef(null),l=le(),c=m.useMemo(()=>Array.isArray(e)?e:[e],[e]),j=m.useMemo(()=>[P.ORANGE,P.RED,P.GREEN,P.BLUE,P.YELLOW,P.PURPLE],[]),y=m.useMemo(()=>["circle","square","diamond","triangle-up","triangle-down","star"],[]),x=m.useMemo(()=>c.map((b,v)=>d==="default"?{...b,color:b.color||j[0],symbol:"circle",size:b.size||f}:{...b,color:b.color||j[v%j.length],symbol:b.symbol||y[v%y.length],size:b.size||f}),[c,d,f,j,y]),w=l.gridColor,C=m.useMemo(()=>x.map(b=>({type:"scatter",x:b.x,y:b.y,mode:"markers",name:b.name,marker:{color:b.color,size:b.size,symbol:b.symbol,line:{color:l.paperBg,width:1}},hovertemplate:`${n}: %{x}<br>${i}: %{y}<extra>${b.name}</extra>`})),[x,n,i,l]),S=m.useMemo(()=>({tickcolor:l.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:l.textColor,family:"Inter, sans-serif",weight:400},linecolor:l.lineColor,linewidth:1,position:0,zeroline:!1}),[l]),_=m.useMemo(()=>({text:r,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:l.textColor,lineheight:1.2,standoff:30}}),[r,l]);return m.useEffect(()=>{if(!u.current)return;const b={width:a,height:o,font:{family:"Inter, sans-serif"},title:_,margin:{l:80,r:40,b:80,t:80,pad:0},showlegend:!0,legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:l.legendColor,family:"Inter, sans-serif",weight:500,lineheight:18}},xaxis:{title:{text:n,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:w,...S},yaxis:{title:{text:i,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:w,...S},paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg},v={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(u.current,C,b,v);const M=u.current;return()=>{M&&V.purge(M)}},[a,o,n,i,C,_,S,w,l]),t.jsx("div",{className:"dotplot-container",style:{width:a},children:t.jsx("div",{ref:u,style:{width:"100%",height:"100%",margin:"0"}})})},La="96",$r="384",Vr="1536",Yr="custom",Wr={sample:"#4575b4",control:"#d73027",empty:"#f0f0f0"},qr={[La]:{rows:8,columns:12},[$r]:{rows:16,columns:24},[Vr]:{rows:32,columns:48}},Kr=[[0,"#313695"],[.1,"#4575b4"],[.2,"#74add1"],[.3,"#abd9e9"],[.4,"#e0f3f8"],[.5,"#ffffbf"],[.6,"#fee090"],[.7,"#fdae61"],[.8,"#f46d43"],[.9,"#d73027"],[1,"#a50026"]],bt={textDark:"#333",regionBorder:"#000",emptyWell:"#f0f0f0"},Xr={Viridis:[[0,"#440154"],[.25,"#414487"],[.5,"#2a788e"],[.75,"#22a884"],[1,"#7ad151"]],Blues:[[0,"#f7fbff"],[.25,"#c6dbef"],[.5,"#6baed6"],[.75,"#2171b5"],[1,"#08306b"]],RdBu:[[0,"#67001f"],[.25,"#d6604d"],[.5,"#f7f7f7"],[.75,"#4393c3"],[1,"#053061"]],Greens:[[0,"#f7fcf5"],[.25,"#c7e9c0"],[.5,"#74c476"],[.75,"#238b45"],[1,"#00441b"]],Reds:[[0,"#fff5f0"],[.25,"#fcbba1"],[.5,"#fb6a4a"],[.75,"#cb181d"],[1,"#67000d"]],Greys:[[0,"#ffffff"],[.25,"#d9d9d9"],[.5,"#969696"],[.75,"#525252"],[1,"#000000"]],Hot:[[0,"#000000"],[.33,"#e60000"],[.66,"#ffff00"],[1,"#ffffff"]],YlGnBu:[[0,"#ffffd9"],[.25,"#c7e9b4"],[.5,"#41b6c4"],[.75,"#225ea8"],[1,"#081d58"]],YlOrRd:[[0,"#ffffcc"],[.25,"#fed976"],[.5,"#fd8d3c"],[.75,"#e31a1c"],[1,"#800026"]],Plasma:[[0,"#0d0887"],[.25,"#7e03a8"],[.5,"#cc4778"],[.75,"#f89540"],[1,"#f0f921"]]},$={MAX_RANDOM_VALUE:5e4,SENTINEL_RATIO:.01,COLOR_SCALE_THRESHOLD:.99,COLOR_SCALE_EPSILON:.001,MULTI_VALUE_PRIMARY_RATIO:.575,MULTI_VALUE_SECONDARY_RATIO:.425,FONT_SIZE_LARGE:11,LABEL_CENTER_OFFSET:-.5,MARGIN_TOP:70,MARGIN_RIGHT:50,MARGIN_BOTTOM:40,MARGIN_LEFT:80,COLORBAR_LENGTH:130,DOMAIN_COLORBAR_OFFSET:.15,DOMAIN_COLORBAR_END:.85},it=65,Ct=26;function Zr(e){return Array.from({length:e},(a,o)=>o<Ct?String.fromCharCode(it+o):"A"+String.fromCharCode(it+(o-Ct)))}function Jr(e){return Array.from({length:e},(a,o)=>o+1)}function Nt(e){const a=e.match(/^([A-Z]{1,2})(\d{1,2})$/i);if(!a)return null;const o=a[1].toUpperCase(),r=o.length===1?o.charCodeAt(0)-it:Ct+(o.charCodeAt(1)-it),n=parseInt(a[2],10)-1;return{row:r,col:n}}function Qr(e,a,o){if(!e)return!1;const{row:r,col:n}=e;return r>=0&&n>=0&&r<a&&n<o}function en(e,a){if(!e)return null;const o=a??Object.keys(e)[0];return o?e[o]:null}function tn(e,a,o,r,n){typeof e=="number"?r[a][o]=e:typeof e=="string"&&(n[a][o]=e)}function an(e,a,o,r){const n=Array.from({length:a},()=>Array(o).fill(null)),i=Array.from({length:a},()=>Array(o).fill(null)),d=new Map,f=new Map;for(const u of e){const l=Nt(u.wellId);if(!Qr(l,a,o))continue;const c=u.wellId.toUpperCase();u.values&&d.set(c,u.values),u.tooltipData&&f.set(c,u.tooltipData);const j=en(u.values,r);tn(j,l.row,l.col,n,i)}return{grid:n,categories:i,allValues:d,tooltipData:f}}function on(e){let a=1/0,o=-1/0;for(const r of e)for(const n of r)n!==null&&Number.isFinite(n)&&(a=Math.min(a,n),o=Math.max(o,n));return Number.isFinite(a)||(a=0),Number.isFinite(o)||(o=1),a===o&&(o=a+1),{min:a,max:o}}function rn(e){return e.some(a=>a.values&&Object.keys(a.values).length>0)}function nn(e){const a=new Set;for(const o of e)o.values&&Object.keys(o.values).forEach(r=>a.add(r));return[...a]}function sn(e,a){for(const o of e)if(typeof o.values?.[a]=="string")return!0;return!1}function ln(e,a){return nn(e).map(r=>{const n=a?.find(d=>d.id===r),i=sn(e,r);return{id:r,name:n?.name??r,visualizationMode:n?.visualizationMode??(i?"categorical":void 0),colorScale:n?.colorScale,valueMin:n?.valueMin,valueMax:n?.valueMax,valueUnit:n?.valueUnit,categoryColors:n?.categoryColors}})}function dn(e,a,o){const r=e.match(/^([A-Z]{1,2})(\d{1,2}):([A-Z]{1,2})(\d{1,2})$/i);if(!r)return null;const n=Nt(`${r[1]}${r[2]}`),i=Nt(`${r[3]}${r[4]}`),d=Math.min(n.row,i.row),f=Math.max(n.row,i.row),u=Math.min(n.col,i.col),l=Math.max(n.col,i.col),c=a.length,j=o.length;return d>=c||f>=c||u>=j||l>=j?null:{minRow:d,maxRow:f,minCol:u,maxCol:l}}function cn({wellId:e,value:a,allValues:o,tooltipExtra:r,activeLayerId:n,layerConfigMap:i,precision:d,valueUnit:f}){let u=`Well ${e}`;return o?u+=un(o,n,i,d):a!==null?u+=`<br>Value: ${a.toFixed(d)}${f}`:n?u+=`<br>▶ ${n}: -`:u+="<br>No data",r&&(u+=pn(r)),u}function un(e,a,o,r){let n="";for(const[i,d]of Object.entries(e)){const u=i===a?"▶ ":"",l=o.get(i)?.valueUnit,c=l?` ${l}`:"";d===null?n+=`<br>${u}${i}: -`:typeof d=="number"?n+=`<br>${u}${i}: ${d.toFixed(r)}${c}`:n+=`<br>${u}${i}: ${d.charAt(0).toUpperCase()+d.slice(1)}`}return n}function pn(e){let a="";for(const[o,r]of Object.entries(e))a+=`<br>${o}: ${String(r)}`;return a}function mn(e,a,o){const r=o?{text:o}:void 0;switch(e){case"bottom":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:a,y:-.15,yanchor:"top",x:.5,xanchor:"center",title:r?{...r,side:"top"}:void 0};case"top":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:a,y:1.15,yanchor:"bottom",x:.5,xanchor:"center",title:r?{...r,side:"bottom"}:void 0};case"left":return{thickness:28,len:1,outlinewidth:0,ticksuffix:a,y:.5,yanchor:"middle",x:-.15,xanchor:"right",title:r?{...r,side:"right"}:void 0};default:return{thickness:20,len:.9,outlinewidth:0,ticksuffix:a,x:.88,xanchor:"left",y:.5,yanchor:"middle",title:r?{...r,side:"right"}:void 0}}}function fn(e,a,o){const r=o?$.MARGIN_TOP:$.MARGIN_RIGHT,n=$.MARGIN_RIGHT,i=e==="left"?r+$.MARGIN_RIGHT:r,d=e==="right"?n+$.MARGIN_RIGHT:n,f=e==="bottom"?$.MARGIN_LEFT:$.MARGIN_RIGHT;let u;return a?u=e==="top"?$.COLORBAR_LENGTH:100:u=e==="top"?$.MARGIN_TOP:$.MARGIN_BOTTOM,{l:i,r:d,b:f,t:u,pad:5}}function gn(e){switch(e){case"left":return $.MULTI_VALUE_PRIMARY_RATIO;case"right":return $.MULTI_VALUE_SECONDARY_RATIO;default:return .5}}function xn(e){switch(e){case"left":return[$.DOMAIN_COLORBAR_OFFSET,1];case"right":return[0,$.DOMAIN_COLORBAR_END];default:return[0,1]}}function hn(e,a,o,r,n,i){const d=[],f=[],u=[],l=[];for(let c=0;c<r;c++)for(let j=0;j<n;j++){d.push(j+1),f.push(a[c]);const y=e[c][j];u.push(y??i),l.push(o[c][j])}return{xData:d,yData:f,colorData:u,textData:l}}const bn=4,vn=1,jn=.8,pa=100;function wn(e,a,o,r,n,i,d){const f=d?$.MARGIN_TOP:$.MARGIN_RIGHT,u=pa,l=i?pa:$.MARGIN_BOTTOM,c=$.MARGIN_RIGHT,j=e-f-u,y=a-l-c,x=j/r,w=y/o,C=n==="square"?Math.max(x,w):Math.min(x,w);return Math.max(bn,C*(n==="square"?vn:jn))}const Oa=({data:e,layerConfigs:a,initialLayerId:o,onLayerChange:r,plateFormat:n=La,rows:i,columns:d,visualizationMode:f="heatmap",categoryColors:u,regions:l,title:c,xTitle:j,yTitle:y,xLabels:x,yLabels:w,colorScale:C=Kr,valueMin:S,valueMax:_,emptyWellColor:b=bt.emptyWell,showColorBar:v=!0,showLegend:M=!0,legendConfig:g,width:h=800,height:k=500,precision:z=0,markerShape:A="circle",onWellClick:I})=>{const D=m.useRef(null),R=le(),O=m.useRef(I);O.current=I;const[K,Z]=m.useState(o);let W,X;if(n===Yr)W=i??8,X=d??12;else{const E=qr[n];W=E.rows,X=E.columns}const J=m.useMemo(()=>{if(Array.isArray(e)&&e.length>0&&"wellId"in e[0]){const E=e;if(rn(E))return ln(E,a)}return null},[e,a]),B=m.useMemo(()=>!J||J.length===0?null:K?J.find(E=>E.id===K)??J[0]:J[0],[J,K]),Q=B?.visualizationMode??f,ee=B?.colorScale??C,ye=B?.valueMin??S,ge=B?.valueMax??_,ae=B?.valueUnit?` ${B.valueUnit}`:"",oe=m.useMemo(()=>({...Wr,...u,...B?.categoryColors}),[u,B?.categoryColors]),Ce=B?.id,{grid:me,categoriesGrid:xe,allValuesMap:ue,tooltipDataMap:Ne}=m.useMemo(()=>{let E,G=Array.from({length:W},()=>Array(X).fill(null)),F=new Map,Y=new Map;if(Array.isArray(e)&&e.length>0){const U=an(e,W,X,Ce);E=U.grid,G=U.categories,F=U.allValues,Y=U.tooltipData}else E=Array.from({length:W},()=>Array.from({length:X},()=>Math.random()*$.MAX_RANDOM_VALUE));return{grid:E,categoriesGrid:G,allValuesMap:F,tooltipDataMap:Y}},[e,W,X,Ce]),pe=w??Zr(W),de=x??Jr(X),We=on(me),Se=ye??We.min,ze=ge??We.max,qe=me.some(E=>E.includes(null)),Ie=Se-(ze-Se)*$.SENTINEL_RATIO-1,Yt=qe?me.map(E=>E.map(G=>G===null?Ie:G)):me,Wt=m.useMemo(()=>{if(!qe)return ee;let E;if(typeof ee=="string"){const U=Xr[ee];if(U)E=U;else return ee}else E=ee;const G=ze-Ie,F=(Se-Ie)/G,Y=[[0,b],[F*$.COLOR_SCALE_THRESHOLD,b]];for(const[U,re]of E){const se=F+U*(1-F);Y.push([se,re])}return Y},[ee,qe,Se,ze,Ie,b]),qt=qe?Ie:Se,uo=m.useMemo(()=>{const E=new Map;if(J)for(const G of J)E.set(G.id,G);return E},[J]),Kt=me.map((E,G)=>E.map((F,Y)=>{const U=`${pe[G]}${de[Y]}`,re=String(U).toUpperCase();return cn({wellId:U,value:F,allValues:ue.get(re),tooltipExtra:Ne.get(re),activeLayerId:B?.id,layerConfigMap:uo,precision:z,valueUnit:ae})})),{categoricalGrid:ct,categoricalColorScale:ut,uniqueTypes:pt,catMax:Xt}=m.useMemo(()=>{if(Q!=="categorical")return{categoricalGrid:null,categoricalColorScale:null,uniqueTypes:[],catMax:0};const E=new Set;let G=!1;for(const te of xe)for(const ie of te)ie?E.add(ie):G=!0;G&&E.add("empty");const F=[...E].sort(),Y=new Map;F.forEach((te,ie)=>Y.set(te,ie));const U=xe.map(te=>te.map(ie=>ie===null?Y.get("empty")??0:Y.get(ie)??Y.get("empty")??0)),re=F.length,se=[];if(re===1){const te=oe[F[0]]||b;se.push([0,te]),se.push([1,te])}else F.forEach((te,ie)=>{const Je=oe[te]||b,Qe=ie/(re-1),et=.5/(re-1),ft=Math.max(0,Qe-et),De=Math.min(1,Qe+et-$.COLOR_SCALE_EPSILON);se.push([ft,Je]),se.push([De,Je])});return{categoricalGrid:U,categoricalColorScale:se,uniqueTypes:F,catMax:re-1}},[Q,xe,oe,b]),Zt=m.useMemo(()=>{if(!l||l.length===0)return[];const E=[];for(const G of l){const F=dn(G.wells,pe,de);if(!F)continue;const Y=.49,U=F.minCol+1-Y,re=F.maxCol+1+Y,se=F.minRow-Y,te=F.maxRow+Y;E.push({type:"rect",xref:"x",yref:"y",x0:U,x1:re,y0:se,y1:te,line:{color:G.borderColor||bt.textDark,width:G.borderWidth??2},fillcolor:G.fillColor||"transparent",layer:"above"})}return E},[l,pe,de]);m.useEffect(()=>{const E=D.current;if(!E)return;const G=Q==="categorical",F=G&&ct?ct:Yt,Y=G&&ut?ut:Wt,U=G?0:qt,re=G?Xt||1:ze,se=G?!1:v,{xData:te,yData:ie,colorData:Je,textData:Qe}=hn(F,pe,Kt,W,X,U),et=wn(h,k,W,X,A,!!c,!!y),ft=[{x:te,y:ie,mode:"markers",type:"scatter",marker:{symbol:A,size:et,color:Je,colorscale:Y,cmin:U,cmax:re,showscale:se,colorbar:mn(g?.position??"right",ae,g?.title),line:{color:R.gridColor,width:1}},hoverinfo:"text",text:Qe}],De=g?.position??"right",xo={autosize:!1,title:c?{text:c,font:{family:"Inter, sans-serif",size:20,color:R.textSecondary},x:gn(De),xanchor:"center",y:.98,yanchor:"top"}:void 0,width:h,height:k,margin:fn(De,!!c,!!y),xaxis:{title:{text:j||"",font:{size:16,color:R.textSecondary,family:"Inter, sans-serif"},standoff:15},side:"top",fixedrange:!0,dtick:1,range:[.5,X+.5],automargin:!1,tickmode:"array",tickvals:Array.from({length:X},(gt,he)=>he+1),ticktext:de.map(String),tickangle:0,tickfont:{size:X>24?8:$.FONT_SIZE_LARGE},domain:xn(De)},yaxis:{title:{text:y||"",font:{size:16,color:R.textSecondary,family:"Inter, sans-serif"},standoff:15},fixedrange:!0,dtick:1,range:[W+$.LABEL_CENTER_OFFSET,$.LABEL_CENTER_OFFSET],automargin:!1,tickmode:"array",tickvals:Array.from({length:W},(gt,he)=>he),ticktext:pe.map(String),tickfont:{size:W>16?8:$.FONT_SIZE_LARGE}},paper_bgcolor:R.paperBg,plot_bgcolor:R.plotBg,font:{family:"Inter, sans-serif",color:R.textSecondary},shapes:Zt},ho={responsive:!0,displayModeBar:!1,displaylogo:!1};return V.newPlot(E,ft,xo,ho),E.on("plotly_click",gt=>{if(!O.current)return;const he=gt.points[0];if(he){const ea=pe,ta=de,aa=ea.indexOf(he.y),oa=ta.indexOf(he.x);if(aa>=0&&oa>=0){const ra=`${ea[aa]}${ta[oa]}`,na=String(ra).toUpperCase(),bo=ue.get(na),vo=Ne.get(na),jo={wellId:ra,values:bo,tooltipData:vo};O.current?.(jo)}}}),()=>{E&&V.purge(E)}},[Yt,de,pe,Wt,v,qt,ze,ae,c,j,y,h,k,Kt,z,Ne,ue,me,Q,ct,ut,pt.length,Xt,Zt,W,X,g,A,R]);const po=()=>!J||J.length<=1?null:t.jsx("div",{className:"platemap-layer-selector",children:J.map(E=>{const G=B?.id===E.id;return t.jsx(L,{variant:G?"default":"outline",size:"sm",onClick:()=>{Z(E.id),r?.(E.id)},children:E.name},E.id)})}),Ae=g?.position??"right",mt=g?.fontSize??12,mo=g?.itemSpacing??4,Ke=g?.swatchSize??16,Jt=g?.title,Qt=120,Te=Ae==="top"||Ae==="bottom",fo=()=>{const E=Q==="categorical"&&pt.length>0,G=l&&l.length>0;if(!M||!E&&!G)return Te?null:t.jsx("div",{className:"platemap-legend-placeholder",style:{width:Qt}});const F=["platemap-legend"];Te?F.push("platemap-legend--horizontal"):Ae==="left"?F.push("platemap-legend--left"):Ae==="right"&&F.push("platemap-legend--right");const Y={gap:`${mo}px`,width:Te?void 0:Qt};return t.jsxs("div",{className:F.join(" "),style:Y,children:[Jt&&t.jsx("div",{className:`platemap-legend__title${Te?" platemap-legend__title--horizontal":""}`,style:{fontSize:`${mt}px`},children:Jt}),E&&pt.map(U=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch",style:{width:`${Ke}px`,height:`${Ke}px`,backgroundColor:oe[U]||b}}),t.jsx("span",{className:"platemap-legend__label platemap-legend__label--capitalize",style:{fontSize:`${mt}px`},children:U})]},U)),G&&l.map(U=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch platemap-legend__swatch--region",style:{width:`${Ke}px`,height:`${Ke}px`,backgroundColor:U.fillColor||"transparent",border:`${U.borderWidth||2}px solid ${U.borderColor||bt.regionBorder}`}}),t.jsx("span",{className:"platemap-legend__label",style:{fontSize:`${mt}px`},children:U.name})]},U.id))]})},Xe=t.jsx("div",{ref:D,className:"platemap-plot",style:{width:h,height:k}}),Ze=fo(),go=()=>{switch(Ae){case"left":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Ze,Xe]});case"top":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Ze,Xe]});case"bottom":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Xe,Ze]});default:return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Xe,Ze]})}};return t.jsxs("div",{className:"platemap-container",style:{width:Te?void 0:h},children:[po(),go()]})};function yn(e){if(!e||e.length===0)return[];const a=Math.max(...e.map(o=>o.length));return e.map(o=>{if(o.length===a)return o;const r=[...o];for(;r.length<a;)r.push(0);return r})}const Cn=({data:e,xLabels:a,yLabels:o,title:r,xTitle:n,yTitle:i,colorscale:d,width:f=800,height:u=600,showScale:l=!0,precision:c=0,zmin:j,zmax:y,valueUnit:x=""})=>{const w=e?yn(e):void 0,C=w?.length??o?.length??16,S=w?.[0]?.length??a?.length??24,_=m.useMemo(()=>{if(!w)return;const v="ABCDEFGHIJKLMNOPQRSTUVWXYZ",M=[];for(let g=0;g<w.length;g++)for(let h=0;h<w[g].length;h++){const k=o?.[g]?.toString()??v[g]??`R${g+1}`,z=a?.[h]?.toString()??String(h+1),A=`${k}${z}`;M.push({wellId:A,values:{Value:w[g][h]}})}return M},[w,a,o]),b=d;return t.jsx(Oa,{data:_,plateFormat:"custom",rows:C,columns:S,title:r,xTitle:n,yTitle:i,xLabels:a,yLabels:o,colorScale:b,valueMin:j,valueMax:y,showColorBar:l,width:f,height:u,layerConfigs:[{id:"Value",valueUnit:x}],precision:c})},Nn=-.5,kn=e=>e.reduce((o,r)=>o+r,0)/e.length,Mn=(e,a)=>{const r=e.map(n=>Math.pow(n-a,2)).reduce((n,i)=>n+i,0)/e.length;return Math.sqrt(r)},_n=(e,a,o,r,n=100)=>{const i=[],d=[],f=(r-o)/(n-1);for(let u=0;u<n;u++){const l=o+u*f;i.push(l);const c=Nn*Math.pow((l-e)/a,2),j=1/(a*Math.sqrt(2*Math.PI))*Math.exp(c);d.push(j)}return{x:i,y:d}},Sn=(e,a,o)=>{const r=Math.ceil((o.end-o.start)/o.size),n=Array(r).fill(0);a.forEach(u=>{if(u>=o.start&&u<=o.end){const l=Math.floor((u-o.start)/o.size);n[l]++}});const i=Math.max(...n),d=Math.max(...e),f=i/d;return e.map(u=>u*f)},zn=({dataSeries:e,width:a=480,height:o=480,title:r="Histogram",xTitle:n="X Axis",yTitle:i="Frequency",bargap:d=.2,showDistributionLine:f=!1})=>{const u=m.useRef(null),l=le(),c=m.useMemo(()=>Array.isArray(e)?e:[e],[e]),j=m.useMemo(()=>c.length>1?"stack":void 0,[c.length]),y=m.useMemo(()=>[P.ORANGE,P.RED,P.BLUE,P.GREEN,P.PURPLE,P.YELLOW],[]),x=m.useMemo(()=>c.map((v,M)=>{const g=typeof v.showDistributionLine>"u"?f:v.showDistributionLine;return{...v,color:v.color||y[M%y.length],opacity:g?.5:v.opacity||1,showDistributionLine:g,lineWidth:v.lineWidth||3}}),[c,f,y]),w=l.gridColor,C=m.useMemo(()=>x.map(v=>({type:"histogram",x:v.x,name:v.name,marker:{color:v.color,line:{color:l.paperBg,width:1},opacity:v.opacity},autobinx:v.autobinx,xbins:v.xbins,hovertemplate:`${n}: %{x}<br>${i}: %{y}<extra>${v.name}</extra>`})),[x,n,i,l]),S=m.useMemo(()=>x.filter(v=>v.showDistributionLine).map(v=>{const M=kn(v.x),g=Mn(v.x,M),h=Math.min(...v.x),k=Math.max(...v.x),z=k-h,A=h-z*.1,I=k+z*.1,D=v.xbins||{start:A,end:I,size:z/10},R=_n(M,g,A,I,100),O=Sn(R.y,v.x,D);return{type:"scatter",x:R.x,y:O,mode:"lines",name:`${v.name} Distribution`,line:{color:v.color,width:v.lineWidth},hoverinfo:"none"}}),[x]),_=m.useMemo(()=>[...C,...S],[C,S]);m.useEffect(()=>{if(!u.current)return;const v={width:a,height:o,font:{family:"Inter, sans-serif"},showlegend:!1,margin:{l:90,r:40,b:80,t:40},xaxis:{title:{text:n,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:w,tickcolor:l.tickColor,ticklen:8,tickwidth:1,ticks:"outside",linecolor:l.lineColor,linewidth:1,zeroline:!1},yaxis:{title:{text:i,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:w,tickcolor:l.tickColor,ticklen:8,tickwidth:1,ticks:"outside",linecolor:l.lineColor,linewidth:1,zeroline:!1,rangemode:"tozero"},barmode:j,bargap:d,paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg},M={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(u.current,_,v,M);const g=u.current;return()=>{g&&V.purge(g)}},[a,o,n,i,d,_,j,w,l]);const b=({series:v})=>{const M=v.map((k,z)=>t.jsx(m.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:k.color}}),k.name,z<v.length-1&&t.jsx("span",{className:"divider"})]})},k.name)),g=[],h=6;for(let k=0;k<M.length;k+=h)g.push(t.jsx("div",{className:"legend-row",children:M.slice(k,k+h)},k));return t.jsx("div",{className:"legend-container",children:g})};return t.jsx("div",{className:"histogram-container",style:{width:a},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:u,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(b,{series:x})]})})},In=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,variant:i="lines",xTitle:d="Columns",yTitle:f="Rows",title:u="Line Graph"})=>{const l=m.useRef(null),c=le(),{yMin:j,yMax:y}=m.useMemo(()=>{let b=Number.MAX_VALUE,v=Number.MIN_VALUE,M=Number.MAX_VALUE,g=Number.MIN_VALUE;e.forEach(z=>{z.x.forEach(A=>{b=Math.min(b,A),v=Math.max(v,A)}),z.y.forEach(A=>{M=Math.min(M,A),g=Math.max(g,A)})});const h=(v-b)*.1,k=(g-M)*.1;return{xMin:b-h,xMax:v+h,yMin:M-k,yMax:g+k}},[e]),x=m.useMemo(()=>n||[j,y],[n,j,y]),w=m.useMemo(()=>{const b=x[1]-x[0];let v=Math.pow(10,Math.floor(Math.log10(b)));b/v>10&&(v=v*2),b/v<4&&(v=v/2);const M=[];let g=Math.ceil(x[0]/v)*v;for(;g<=x[1];)M.push(g),g+=v;return M},[x]),C=m.useMemo(()=>[...new Set(e.flatMap(b=>b.x))],[e]),S=m.useMemo(()=>{switch(i){case"lines+markers":case"lines+markers+error_bars":return"lines+markers";default:return"lines"}},[i]),_=m.useMemo(()=>({tickcolor:c.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:c.textColor,family:"Inter, sans-serif",weight:400},linecolor:c.lineColor,linewidth:1,position:0,zeroline:!1}),[c]);return m.useEffect(()=>{if(!l.current)return;const b=e.map(h=>({x:h.x,y:h.y,type:"scatter",mode:S,name:h.name,line:{color:h.color,width:1.5},marker:i==="lines"?{opacity:0}:{color:h.color,size:8,symbol:h.symbol||"triangle-up"},error_y:i==="lines+markers+error_bars"?h.error_y||{type:"data",array:h.y.map(()=>10),visible:!0,color:h.color,thickness:1,width:5}:void 0})),v={title:{text:u,font:{size:32,family:"Inter, sans-serif",color:c.textColor}},width:a,height:o,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:c.paperBg,plot_bgcolor:c.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:d,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:c.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:C,ticktext:C.map(String),showgrid:!0,..._},yaxis:{title:{text:f,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:c.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:w,showgrid:!0,..._},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:c.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:!0},M={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(l.current,b,v,M);const g=l.current;return()=>{g&&V.purge(g)}},[e,a,o,r,n,d,f,u,S,_,C,w,x,i,c]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:l,style:{width:"100%",height:"100%"}})})},An=3e3,Tn=`protocolSchema: v3
7
+ name: v3
8
+ description: No description
9
+ config: {}
10
+ steps: []`,Dn=()=>{const e=["v0.0.7","v0.0.6","v0.0.5"],[a,o]=m.useState(Tn),[r,n]=m.useState(e[0]),[i,d]=m.useState(!0),[f,u]=m.useState(!1),l=()=>{u(!0),be.toast.info("Building Protocol: Status=IN_PROGRESS, Phase=FINALIZING"),setTimeout(()=>{Math.random()>.3?be.toast.success(`Pipeline visual-pipeline-builder-protocol-${r}-pipeline deployed successfully! Deployment complete`):be.toast.error(`Failed to deploy pipeline visual-pipeline-builder-protocol-${r}-pipeline. Please try again.`),u(!1)},An)};return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h1",{className:"m-0",children:"Launch"}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(we,{htmlFor:"overwrite-switch",children:"Overwrite Mode"}),t.jsx(_e,{checked:i,onCheckedChange:d,disabled:f}),t.jsx(ce,{orientation:"vertical"}),t.jsxs(Be,{value:r,onValueChange:n,children:[t.jsx(He,{size:"default",className:"w-[180px]",children:t.jsx(Ue,{placeholder:"Choose a version"})}),t.jsx(Fe,{children:e.map(c=>t.jsx($e,{value:c,children:c},c))})]}),t.jsx(L,{onClick:l,disabled:f,children:"Deploy"})]})]}),t.jsx(je,{value:a,onChange:c=>o(c??""),language:"yaml",theme:"light",width:"100%",onCopy:c=>navigator.clipboard.writeText(c),onLaunch:c=>console.log("Launching code:",c),disabled:!i})]})},En=e=>e.split(" ").map(a=>a.charAt(0)).join("").toUpperCase().substring(0,2),Rn=({hostname:e,userProfile:a,onHomeClick:o,onSettingsClick:r,onUserProfileClick:n})=>t.jsxs("div",{className:"flex items-center justify-between w-full px-7 py-4 box-border",children:[t.jsx("div",{children:e}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(L,{variant:"outline",size:"icon-sm",onClick:o,"aria-label":"Home",children:t.jsx(N.Home,{size:20})}),t.jsx(L,{variant:"outline",size:"icon-sm",onClick:r,"aria-label":"Settings",children:t.jsx(N.Settings,{size:20})}),t.jsx("div",{className:"h-5 w-px"}),t.jsxs(_t,{onClick:n,children:[t.jsx(St,{src:a.avatar,alt:a.name}),t.jsx(zt,{children:En(a.name)})]}),t.jsx("div",{children:a.name})]})]}),Ln=()=>t.jsx(N.Building,{}),On=()=>t.jsx(N.Lamp,{}),Pn=({organization:e})=>t.jsxs("div",{className:"flex items-center h-20 w-full pt-3 pr-6 pb-3 pl-32 box-border gap-10",children:[t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 tracking-[0.2px]",children:"ORGANIZATION"}),t.jsxs("div",{className:"flex items-center gap-2 w-80",children:[t.jsx("div",{children:e.logo||t.jsx(Ln,{})}),t.jsxs("div",{children:[t.jsx("div",{children:e.name}),e.subtext&&t.jsx("div",{children:e.subtext})]})]})]})}),t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 tracking-[0.2px]",children:"PROJECT"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(On,{}),t.jsx("div",{children:"Not Selected"})]})]})})]});function Ut({className:e,children:a,...o}){return t.jsxs(p.ScrollArea.Root,{"data-slot":"scroll-area",className:s("relative",e),...o,children:[t.jsx(p.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:a}),t.jsx(Pa,{}),t.jsx(p.ScrollArea.Corner,{})]})}function Pa({className:e,orientation:a="vertical",...o}){return t.jsx(p.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:s("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...o,children:t.jsx(p.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const Gn=({items:e,activeItem:a,onItemClick:o})=>t.jsx(Ut,{children:t.jsx(Ot,{items:e,activeItem:a,onItemClick:o})});function Ga({className:e,orientation:a="horizontal",...o}){return t.jsx(p.Tabs.Root,{"data-slot":"tabs","data-orientation":a,className:s("group/tabs flex gap-2 data-horizontal:flex-col",e),...o})}const Ba=ne.cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Ua({className:e,variant:a="default",...o}){return t.jsx(p.Tabs.List,{"data-slot":"tabs-list","data-variant":a,className:s(Ba({variant:a}),e),...o})}function Ha({className:e,...a}){return t.jsx(p.Tabs.Trigger,{"data-slot":"tabs-trigger",className:s("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...a})}function Bn({className:e,...a}){return t.jsx(p.Tabs.Content,{"data-slot":"tabs-content",className:s("flex-1 text-sm outline-none",e),...a})}const ma=({tabs:e,value:a,onChange:o})=>t.jsx(Ga,{className:"gap-0",value:a,onValueChange:o,children:t.jsx(Ua,{variant:"line",className:"w-full justify-start gap-6 p-0",children:e.map(r=>t.jsx(Ha,{className:"flex-none pb-3 px-0 pt-0",value:r.id,children:r.label},r.id))})}),Un=()=>{const[e,a]=m.useState(!1);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between pb-6",children:[t.jsx("h2",{className:"m-0 text-xl font-semibold leading-7",children:"Protocol Configuration"}),t.jsxs("div",{className:"flex items-center gap-2 text-[15px] font-medium",children:[t.jsx(_e,{checked:e,onCheckedChange:a}),t.jsx(we,{htmlFor:"edit-mode-switch",children:"Edit Mode"})]})]}),t.jsxs(lt,{children:[t.jsx(Rt,{children:t.jsx(Lt,{children:"Configuration"})}),t.jsx(dt,{children:e?t.jsxs(L,{variant:"secondary",children:[t.jsx(N.Plus,{}),"Add Input"]}):t.jsx("div",{children:"No values, Use the 'edit' button to add values"})})]})]})},vt=({title:e,description:a,buttonText:o,linkText:r,status:n="default",onButtonClick:i,onLinkClick:d,className:f})=>{const u=n==="disabled";return t.jsx(lt,{className:s("hover:bg-secondary/50 transition-colors duration-200 ease-in-out",u?"cursor-not-allowed":"cursor-pointer",f),size:"sm",children:t.jsxs(dt,{children:[t.jsx("h3",{className:s("m-0 mb-1 text-base font-semibold leading-6",u?"text-disabled":"text-default"),children:e}),a&&t.jsx("p",{className:"m-0 mb-4 text-muted-foreground text-[13px] font-normal leading-5",children:a}),(o||r)&&t.jsxs("div",{className:"flex items-center gap-4",children:[o&&t.jsx(L,{variant:"secondary",size:"sm",disabled:u,onClick:l=>{l.stopPropagation(),i?.()},children:o}),r&&t.jsx("button",{className:s("no-underline text-[13px] font-medium leading-[18px]",u?"text-[var(--muted)] cursor-not-allowed":"text-[var(--primary)] cursor-pointer hover:underline"),onClick:l=>{l.preventDefault(),l.stopPropagation(),u||d?.()},children:r})]})]})})};function Fa({...e}){return t.jsx(p.Dialog.Root,{"data-slot":"sheet",...e})}function Hn({...e}){return t.jsx(p.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}function Fn({...e}){return t.jsx(p.Dialog.Close,{"data-slot":"sheet-close",...e})}function $n({...e}){return t.jsx(p.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function Vn({className:e,...a}){return t.jsx(p.Dialog.Overlay,{"data-slot":"sheet-overlay",className:s("fixed inset-0 z-50 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function $a({className:e,children:a,side:o="right",showCloseButton:r=!0,...n}){return t.jsxs($n,{children:[t.jsx(Vn,{}),t.jsxs(p.Dialog.Content,{"data-slot":"sheet-content","data-side":o,className:s("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",e),...n,children:[a,r&&t.jsx(p.Dialog.Close,{"data-slot":"sheet-close",asChild:!0,children:t.jsxs(L,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[t.jsx(N.XIcon,{}),t.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Va({className:e,...a}){return t.jsx("div",{"data-slot":"sheet-header",className:s("flex flex-col gap-0.5 p-4",e),...a})}function Yn({className:e,...a}){return t.jsx("div",{"data-slot":"sheet-footer",className:s("mt-auto flex flex-col gap-2 p-4",e),...a})}function Ya({className:e,...a}){return t.jsx(p.Dialog.Title,{"data-slot":"sheet-title",className:s("text-base font-medium text-foreground",e),...a})}function Wa({className:e,...a}){return t.jsx(p.Dialog.Description,{"data-slot":"sheet-description",className:s("text-sm text-muted-foreground",e),...a})}function kt({className:e,...a}){return t.jsx("div",{"data-slot":"skeleton",className:s("animate-pulse rounded-md bg-muted",e),...a})}const jt=768;function Wn(){const[e,a]=H.useState();return H.useEffect(()=>{const o=window.matchMedia(`(max-width: ${jt-1}px)`),r=()=>{a(window.innerWidth<jt)};return o.addEventListener("change",r),a(window.innerWidth<jt),()=>o.removeEventListener("change",r)},[]),!!e}const fa=60,qn=24,Kn=7,Xn="sidebar_state",Zn=fa*fa*qn*Kn,Jn="16rem",Qn="18rem",es="3rem",ts="b",qa=H.createContext(null);function Ve(){const e=H.useContext(qa);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ka({defaultOpen:e=!0,open:a,onOpenChange:o,className:r,style:n,children:i,...d}){const f=Wn(),[u,l]=H.useState(!1),[c,j]=H.useState(e),y=a??c,x=H.useCallback(_=>{const b=typeof _=="function"?_(y):_;o?o(b):j(b),document.cookie=`${Xn}=${b}; path=/; max-age=${Zn}`},[o,y]),w=H.useCallback(()=>f?l(_=>!_):x(_=>!_),[f,x,l]);H.useEffect(()=>{const _=b=>{b.key===ts&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),w())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[w]);const C=y?"expanded":"collapsed",S=H.useMemo(()=>({state:C,open:y,setOpen:x,isMobile:f,openMobile:u,setOpenMobile:l,toggleSidebar:w}),[C,y,x,f,u,l,w]);return t.jsx(qa.Provider,{value:S,children:t.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Jn,"--sidebar-width-icon":es,...n},className:s("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...d,children:i})})}function as({side:e="left",variant:a="sidebar",collapsible:o="offcanvas",className:r,children:n,dir:i,...d}){const{isMobile:f,state:u,openMobile:l,setOpenMobile:c}=Ve();return o==="none"?t.jsx("div",{"data-slot":"sidebar",className:s("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...d,children:n}):f?t.jsx(Fa,{open:l,onOpenChange:c,...d,children:t.jsxs($a,{dir:i,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Qn},side:e,children:[t.jsxs(Va,{className:"sr-only",children:[t.jsx(Ya,{children:"Sidebar"}),t.jsx(Wa,{children:"Displays the mobile sidebar."})]}),t.jsx("div",{className:"flex h-full w-full flex-col",children:n})]})}):t.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":u==="collapsed"?o:"","data-variant":a,"data-side":e,"data-slot":"sidebar",children:[t.jsx("div",{"data-slot":"sidebar-gap",className:s("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),t.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:s("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...d,children:t.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n})})]})}function os({className:e,onClick:a,...o}){const{toggleSidebar:r}=Ve();return t.jsxs(L,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:s(e),onClick:n=>{a?.(n),r()},...o,children:[t.jsx(N.PanelLeftIcon,{}),t.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function rs({className:e,...a}){const{toggleSidebar:o}=Ve();return t.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:s("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})}function ns({className:e,...a}){return t.jsx("main",{"data-slot":"sidebar-inset",className:s("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...a})}function ss({className:e,...a}){return t.jsx(Ge,{"data-slot":"sidebar-input","data-sidebar":"input",className:s("h-8 w-full bg-background shadow-none",e),...a})}function is({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:s("flex flex-col gap-2 p-2",e),...a})}function ls({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s("flex flex-col gap-2 p-2",e),...a})}function ds({className:e,...a}){return t.jsx(ce,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:s("mx-2 w-auto bg-sidebar-border",e),...a})}function cs({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...a})}function us({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s("relative flex w-full min-w-0 flex-col p-2",e),...a})}function ps({className:e,asChild:a=!1,...o}){const r=a?p.Slot.Root:"div";return t.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:s("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e),...o})}function ms({className:e,asChild:a=!1,...o}){const r=a?p.Slot.Root:"button";return t.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:s("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",e),...o})}function fs({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s("w-full text-sm",e),...a})}function gs({className:e,...a}){return t.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s("flex w-full min-w-0 flex-col gap-0",e),...a})}function xs({className:e,...a}){return t.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s("group/menu-item relative",e),...a})}const hs=ne.cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function bs({asChild:e=!1,isActive:a=!1,variant:o="default",size:r="default",tooltip:n,className:i,...d}){const f=e?p.Slot.Root:"button",{isMobile:u,state:l}=Ve(),c=t.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:s(hs({variant:o,size:r}),i),...d});return n?(typeof n=="string"&&(n={children:n}),t.jsxs(at,{children:[t.jsx(ot,{asChild:!0,children:c}),t.jsx(rt,{side:"right",align:"center",hidden:l!=="collapsed"||u,...n})]})):c}function vs({className:e,asChild:a=!1,showOnHover:o=!1,...r}){const n=a?p.Slot.Root:"button";return t.jsx(n,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:s("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",e),...r})}function js({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:s("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",e),...a})}function ws({className:e,showIcon:a=!1,...o}){const[r]=H.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return t.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:s("flex h-8 items-center gap-2 rounded-md px-2",e),...o,children:[a&&t.jsx(kt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t.jsx(kt,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function ys({className:e,...a}){return t.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:s("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...a})}function Cs({className:e,...a}){return t.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:s("group/menu-sub-item relative",e),...a})}function Ns({asChild:e=!1,size:a="md",isActive:o=!1,className:r,...n}){const i=e?p.Slot.Root:"a";return t.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":o,className:s("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",r),...n})}const ks=({userProfile:e,hostname:a,organization:o})=>{const r=[{icon:N.Search,label:"Search"},{icon:N.SearchCode,label:"SQL Search"},{icon:N.Lamp,label:"Projects"},{icon:N.Workflow,label:"Pipelines"},{icon:N.Monitor,label:"Data & AI Workspace"},{icon:N.Box,label:"Artifacts"},{icon:N.Database,label:"Data Sources"},{icon:N.PieChart,label:"Health Monitoring"},{icon:N.CheckCheck,label:"Bulk Actions"},{icon:N.Code,label:"Attribute Management"},{icon:N.Settings,label:"Administration"}],n=[{id:"templates",label:"Templates"},{id:"protocol",label:"Protocol"},{id:"steps",label:"Steps"}],i=[{id:"pipelineBuilder",label:"Pipeline Builder"},{id:"configuration",label:"Configuration"},{id:"launch",label:"Launch"}],[d,f]=m.useState("Pipelines"),[u,l]=m.useState("templates"),[c,j]=m.useState("pipelineBuilder"),[y,x]=m.useState("1"),w=[{id:"1",title:"Tecan D300e and PerkinElmer EnVision to Dotmatics (v1)",description:"c901ejs",buttonText:"",linkText:""},{id:"2",title:"Bruker D8 Andvanced CRD Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"3",title:"Extract and Decorate(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"4",title:"Intellict (Que3 Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"5",title:"Leica Aperio RAW to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"6",title:"IDS to Benchling(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"7",title:"Lorem Ipsum",description:"c901ejs",buttonText:"",linkText:""}],C=[],S=[],_=I=>{f(I)},b=I=>{l(I)},v=I=>{j(I)},M=()=>{console.log("Home clicked")},g=()=>{console.log("Settings clicked")},h=()=>{console.log("User profile clicked")},k=I=>{x(I===y?null:I)},z=I=>{console.log(`Using template: ${I}`)},A=I=>{console.log(`Viewing template: ${I}`)};return t.jsxs("div",{className:"flex flex-col w-screen h-screen",children:[t.jsx(Pn,{organization:o}),t.jsx("div",{className:"flex flex-1 overflow-hidden",children:t.jsxs(Ka,{className:"min-h-0 flex-1 w-full",children:[t.jsx(Gn,{items:r,activeItem:d,onItemClick:_}),t.jsxs("div",{className:"bg-card rounded-lg flex flex-col flex-1 overflow-hidden",children:[t.jsx(ce,{}),t.jsx(Rn,{hostname:a,userProfile:e,onHomeClick:M,onSettingsClick:g,onUserProfileClick:h}),t.jsx("div",{className:"flex flex-col flex-1 overflow-hidden",children:t.jsx("div",{className:"flex flex-col flex-1 overflow-hidden",children:t.jsxs("div",{style:{display:"flex",height:"100%"},children:[t.jsxs("div",{className:"w-[360px] h-full flex flex-col py-4 px-6 overflow-hidden max-h-full",children:[t.jsx(ma,{tabs:n,value:u,onChange:b}),u==="templates"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex justify-between items-center py-6",children:[t.jsx("h2",{className:"text-xl font-medium m-0",children:"Templates"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(L,{className:"rounded-[4px] w-8 h-8",variant:"destructive",size:"icon-sm","aria-label":"Delete",children:t.jsx(N.Trash2,{size:20})}),t.jsx(L,{className:"rounded-[4px] w-8 h-8",size:"icon-sm","aria-label":"Add",children:t.jsx(N.Plus,{size:20})})]})]}),t.jsx(Ut,{className:"flex-1 h-full",children:w.length>0?w.map(I=>t.jsx("div",{className:"cursor-pointer p-1 last:border-b-0",onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&k(I.id)},onClick:()=>k(I.id),children:t.jsx(vt,{title:I.title,description:I.description,buttonText:I.buttonText,linkText:I.linkText,status:y===I.id?"active":"default",onButtonClick:()=>z(I.id),onLinkClick:()=>A(I.id)})},I.id)):t.jsxs("div",{className:"flex flex-col justify-center items-center gap-4",children:[t.jsx(N.Inbox,{size:40}),t.jsx("div",{className:"text-sm font-medium",children:"No data"})]})})]}),u==="protocol"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex justify-between items-center py-6",children:t.jsxs("h2",{className:"text-xl font-medium m-0",children:["Protocol (",C.length,")"]})}),t.jsx("div",{className:"flex flex-col overflow-y-auto flex-1 mt-2 max-h-[calc(100vh-240px)]",children:C.length>0?C.map(I=>t.jsx("div",{className:"cursor-pointer last:border-b-0",onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&k(I.id)},onClick:()=>k(I.id),children:t.jsx(vt,{title:I.title,description:I.description,status:y===I.id?"active":"default",onButtonClick:()=>z(I.id),onLinkClick:()=>A(I.id)})},I.id)):t.jsxs("div",{className:"flex flex-col justify-center items-center gap-4",children:[t.jsx(N.Inbox,{size:40}),t.jsx("div",{className:"text-sm font-medium",children:"No data"})]})})]}),u==="steps"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex justify-between items-center py-6",children:t.jsxs("h2",{className:"text-xl font-medium m-0",children:["Task Scripts (",S.length,")"]})}),t.jsx("div",{className:"flex flex-col overflow-y-auto flex-1 mt-2 max-h-[calc(100vh-240px)]",children:C.length>0?C.map(I=>t.jsx("div",{className:"cursor-pointer last:border-b-0",onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&k(I.id)},onClick:()=>k(I.id),children:t.jsx(vt,{title:I.title,description:I.description,status:y===I.id?"active":"default",onButtonClick:()=>z(I.id),onLinkClick:()=>A(I.id)})},I.id)):t.jsxs("div",{className:"flex flex-col justify-center items-center gap-4",children:[t.jsx(N.Inbox,{size:40}),t.jsx("div",{className:"text-sm font-medium",children:"No data"})]})})]})]}),t.jsxs("div",{className:"flex-1 h-full flex flex-col",children:[t.jsx("div",{className:"pt-4 px-6 pb-0",children:t.jsx(ma,{tabs:i,value:c,onChange:v})}),t.jsxs("div",{className:"p-6 -mt-px flex-1",children:[c==="pipelineBuilder"&&t.jsx("div",{className:"h-full border rounded-lg overflow-hidden"}),c==="configuration"&&t.jsx(Un,{}),c==="launch"&&t.jsx(Dn,{})]})]})]})})})]})]})})]})},ga=[P.BLUE,P.GREEN,P.ORANGE,P.RED,P.YELLOW,P.PURPLE],Ms=({dataSeries:e,width:a=400,height:o=400,title:r="Pie Chart",textInfo:n="percent",hole:i=0,rotation:d=0})=>{const f=m.useRef(null),u=le(),l=m.useMemo(()=>{if(e.colors&&e.colors.length>=e.labels.length)return e.colors;const j=[...e.colors||[]],y=e.labels.length-j.length;if(y<=0)return j;for(let x=0;x<y;x++)j.push(ga[x%ga.length]);return j},[e.colors,e.labels.length]);m.useEffect(()=>{if(!f.current)return;const j=[{type:"pie",labels:e.labels,values:e.values,name:e.name,marker:{colors:l},textinfo:n,hoverinfo:"label+text+value",insidetextfont:{size:0,family:"Inter, sans-serif",color:"transparent"},hole:i,rotation:d}],y={width:a,height:o,font:{family:"Inter, sans-serif",color:u.textColor},showlegend:!1,margin:{l:40,r:40,b:40,t:40},paper_bgcolor:u.paperBg,plot_bgcolor:u.plotBg},x={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(f.current,j,y,x);const w=f.current;return()=>{w&&V.purge(w)}},[l,e.labels,e.name,e.values,a,o,n,i,d,u]);const c=({labels:j,colors:y})=>{const x=j.map((S,_)=>t.jsx(m.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:y[_]}}),S,_<j.length-1&&t.jsx("span",{className:"divider"})]})},S)),w=6,C=[];for(let S=0;S<x.length;S+=w)C.push(t.jsx("div",{className:"legend-row",children:x.slice(S,S+w)},S));return t.jsx("div",{className:"legend-container",children:C})};return t.jsx("div",{className:"card-container",style:{width:a},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:f,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(c,{labels:e.labels,colors:l})]})})},_s=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,xTitle:i="Columns",yTitle:d="Rows",title:f="Scatter Plot"})=>{const u=m.useRef(null),l=le(),{xMin:c,xMax:j,yMin:y,yMax:x}=m.useMemo(()=>{let M=Number.MAX_VALUE,g=Number.MIN_VALUE,h=Number.MAX_VALUE,k=Number.MIN_VALUE;e.forEach(I=>{I.x.forEach(D=>{M=Math.min(M,D),g=Math.max(g,D)}),I.y.forEach(D=>{h=Math.min(h,D),k=Math.max(k,D)})});const z=(g-M)*.1,A=(k-h)*.1;return{xMin:M-z,xMax:g+z,yMin:h-A,yMax:k+A}},[e]),w=m.useMemo(()=>r||[c,j],[r,c,j]),C=m.useMemo(()=>n||[y,x],[n,y,x]),S=m.useMemo(()=>{const M=w[1]-w[0];let g=Math.pow(10,Math.floor(Math.log10(M)));M/g>10&&(g=g*2),M/g<4&&(g=g/2);const h=[];let k=Math.ceil(w[0]/g)*g;for(;k<=w[1];)h.push(k),k+=g;return h},[w]),_=m.useMemo(()=>{const M=C[1]-C[0];let g=Math.pow(10,Math.floor(Math.log10(M)));M/g>10&&(g=g*2),M/g<4&&(g=g/2);const h=[];let k=Math.ceil(C[0]/g)*g;for(;k<=C[1];)h.push(k),k+=g;return h},[C]),b=m.useMemo(()=>({tickcolor:l.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:l.textColor,family:"Inter, sans-serif",weight:400},linecolor:l.lineColor,linewidth:1,position:0,zeroline:!1}),[l]),v=m.useMemo(()=>({showspikes:!0,spikemode:"across",spikedash:"solid",spikecolor:l.spikeColor,spikethickness:2}),[l]);return m.useEffect(()=>{if(!u.current)return;const M=e.map(z=>({x:z.x,y:z.y,type:"scatter",mode:"markers",name:z.name,marker:{color:z.color,size:10,symbol:"circle"},hovertemplate:`${i}: %{x}<br>${d}: %{y}<extra>${z.name}</extra>`})),g={title:{text:f,font:{size:32,family:"Inter, sans-serif",color:l.textColor}},width:a,height:o,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:l.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:S,ticktext:S.map(String),showgrid:!0,...v,...b},yaxis:{title:{text:d,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:l.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:_,showgrid:!0,...v,...b},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:l.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:!0,hovermode:"closest"},h={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(u.current,M,g,h);const k=u.current;return()=>{k&&V.purge(k)}},[e,a,o,r,n,i,d,f,w,C,S,_,b,v,l]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})})};function Ss({className:e,...a}){return t.jsx(p.Accordion.Root,{"data-slot":"accordion",className:s("flex w-full flex-col",e),...a})}function zs({className:e,...a}){return t.jsx(p.Accordion.Item,{"data-slot":"accordion-item",className:s("not-last:border-b",e),...a})}function Is({className:e,children:a,...o}){return t.jsx(p.Accordion.Header,{className:"flex",children:t.jsxs(p.Accordion.Trigger,{"data-slot":"accordion-trigger",className:s("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",e),...o,children:[a,t.jsx(N.ChevronDownIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),t.jsx(N.ChevronUpIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function As({className:e,children:a,...o}){return t.jsx(p.Accordion.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",...o,children:t.jsx("div",{className:s("h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),children:a})})}function Ts({...e}){return t.jsx(p.AlertDialog.Root,{"data-slot":"alert-dialog",...e})}function Ds({...e}){return t.jsx(p.AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function Xa({...e}){return t.jsx(p.AlertDialog.Portal,{"data-slot":"alert-dialog-portal",...e})}function Za({className:e,...a}){return t.jsx(p.AlertDialog.Overlay,{"data-slot":"alert-dialog-overlay",className:s("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function Es({className:e,size:a="default",...o}){return t.jsxs(Xa,{children:[t.jsx(Za,{}),t.jsx(p.AlertDialog.Content,{"data-slot":"alert-dialog-content","data-size":a,className:s("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})]})}function Rs({className:e,...a}){return t.jsx("div",{"data-slot":"alert-dialog-header",className:s("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function Ls({className:e,...a}){return t.jsx("div",{"data-slot":"alert-dialog-footer",className:s("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function Os({className:e,...a}){return t.jsx("div",{"data-slot":"alert-dialog-media",className:s("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",e),...a})}function Ps({className:e,...a}){return t.jsx(p.AlertDialog.Title,{"data-slot":"alert-dialog-title",className:s("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function Gs({className:e,...a}){return t.jsx(p.AlertDialog.Description,{"data-slot":"alert-dialog-description",className:s("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function Bs({className:e,variant:a="default",size:o="default",...r}){return t.jsx(L,{variant:a,size:o,asChild:!0,children:t.jsx(p.AlertDialog.Action,{"data-slot":"alert-dialog-action",className:s(e),...r})})}function Us({className:e,variant:a="outline",size:o="default",...r}){return t.jsx(L,{variant:a,size:o,asChild:!0,children:t.jsx(p.AlertDialog.Cancel,{"data-slot":"alert-dialog-cancel",className:s(e),...r})})}function Hs({...e}){return t.jsx(p.AspectRatio.Root,{"data-slot":"aspect-ratio",...e})}const Ja=ne.cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Fs({className:e,variant:a="default",asChild:o=!1,...r}){const n=o?p.Slot.Root:"span";return t.jsx(n,{"data-slot":"badge","data-variant":a,className:s(Ja({variant:a}),e),...r})}function $s({className:e,...a}){return t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s(e),...a})}function Vs({className:e,...a}){return t.jsx("ol",{"data-slot":"breadcrumb-list",className:s("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",e),...a})}function Ys({className:e,...a}){return t.jsx("li",{"data-slot":"breadcrumb-item",className:s("inline-flex items-center gap-1",e),...a})}function Ws({asChild:e,className:a,...o}){const r=e?p.Slot.Root:"a";return t.jsx(r,{"data-slot":"breadcrumb-link",className:s("transition-colors hover:text-foreground",a),...o})}function qs({className:e,...a}){return t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s("font-normal text-foreground",e),...a})}function Ks({children:e,className:a,...o}){return t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:s("[&>svg]:size-3.5",a),...o,children:e??t.jsx(N.ChevronRightIcon,{})})}function Xs({className:e,...a}){return t.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:s("flex size-5 items-center justify-center [&>svg]:size-4",e),...a,children:[t.jsx(N.MoreHorizontalIcon,{}),t.jsx("span",{className:"sr-only",children:"More"})]})}const Qa=ne.cva("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"}},defaultVariants:{orientation:"horizontal"}});function Zs({className:e,orientation:a,...o}){return t.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:s(Qa({orientation:a}),e),...o})}function Js({className:e,asChild:a=!1,...o}){const r=a?p.Slot.Root:"div";return t.jsx(r,{className:s("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...o})}function Qs({className:e,orientation:a="vertical",...o}){return t.jsx(ce,{"data-slot":"button-group-separator",orientation:a,className:s("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",e),...o})}function ei({className:e,classNames:a,showOutsideDays:o=!0,captionLayout:r="label",buttonVariant:n="ghost",locale:i,formatters:d,components:f,...u}){const l=wt.getDefaultClassNames();return t.jsx(wt.DayPicker,{showOutsideDays:o,className:s("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,locale:i,formatters:{formatMonthDropdown:c=>c.toLocaleString(i?.code,{month:"short"}),...d},classNames:{root:s("w-fit",l.root),months:s("relative flex flex-col gap-4 md:flex-row",l.months),month:s("flex w-full flex-col gap-4",l.month),nav:s("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:s(tt({variant:n}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",l.button_previous),button_next:s(tt({variant:n}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",l.button_next),month_caption:s("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",l.month_caption),dropdowns:s("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:s("relative rounded-(--cell-radius)",l.dropdown_root),dropdown:s("absolute inset-0 bg-popover opacity-0",l.dropdown),caption_label:s("font-medium select-none",r==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",l.caption_label),table:"w-full border-collapse",weekdays:s("flex",l.weekdays),weekday:s("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",l.weekday),week:s("mt-2 flex w-full",l.week),week_number_header:s("w-(--cell-size) select-none",l.week_number_header),week_number:s("text-[0.8rem] text-muted-foreground select-none",l.week_number),day:s("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",u.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",l.day),range_start:s("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",l.range_start),range_middle:s("rounded-none",l.range_middle),range_end:s("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",l.range_end),today:s("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",l.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:s("text-muted-foreground opacity-50",l.disabled),hidden:s("invisible",l.hidden),...a},components:{Root:({className:c,rootRef:j,...y})=>t.jsx("div",{"data-slot":"calendar",ref:j,className:s(c),...y}),Chevron:({className:c,orientation:j,...y})=>j==="left"?t.jsx(N.ChevronLeftIcon,{className:s("size-4",c),...y}):j==="right"?t.jsx(N.ChevronRightIcon,{className:s("size-4",c),...y}):t.jsx(N.ChevronDownIcon,{className:s("size-4",c),...y}),DayButton:({...c})=>t.jsx(eo,{locale:i,...c}),WeekNumber:({children:c,...j})=>t.jsx("td",{...j,children:t.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:c})}),...f},...u})}function eo({className:e,day:a,modifiers:o,locale:r,...n}){const i=wt.getDefaultClassNames(),d=H.useRef(null);return H.useEffect(()=>{o.focused&&d.current?.focus()},[o.focused]),t.jsx(L,{ref:d,variant:"ghost",size:"icon","data-day":a.date.toLocaleDateString(r?.code),"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:s("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",i.day,e),...n})}const to=H.createContext(null);function Ye(){const e=H.useContext(to);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ti({orientation:e="horizontal",opts:a,setApi:o,plugins:r,className:n,children:i,...d}){const[f,u]=No({...a,axis:e==="horizontal"?"x":"y"},r),[l,c]=H.useState(!1),[j,y]=H.useState(!1),x=H.useCallback(_=>{_&&(c(_.canScrollPrev()),y(_.canScrollNext()))},[]),w=H.useCallback(()=>{u?.scrollPrev()},[u]),C=H.useCallback(()=>{u?.scrollNext()},[u]),S=H.useCallback(_=>{_.key==="ArrowLeft"?(_.preventDefault(),w()):_.key==="ArrowRight"&&(_.preventDefault(),C())},[w,C]);return H.useEffect(()=>{!u||!o||o(u)},[u,o]),H.useEffect(()=>{if(u)return x(u),u.on("reInit",x),u.on("select",x),()=>{u?.off("select",x)}},[u,x]),t.jsx(to.Provider,{value:{carouselRef:f,api:u,opts:a,orientation:e||(a?.axis==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:C,canScrollPrev:l,canScrollNext:j},children:t.jsx("div",{onKeyDownCapture:S,className:s("relative",n),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...d,children:i})})}function ai({className:e,...a}){const{carouselRef:o,orientation:r}=Ye();return t.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:t.jsx("div",{className:s("flex",r==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...a})})}function oi({className:e,...a}){const{orientation:o}=Ye();return t.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...a})}function ri({className:e,variant:a="outline",size:o="icon-sm",...r}){const{orientation:n,scrollPrev:i,canScrollPrev:d}=Ye();return t.jsxs(L,{"data-slot":"carousel-previous",variant:a,size:o,className:s("absolute touch-manipulation rounded-full",n==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!d,onClick:i,...r,children:[t.jsx(N.ChevronLeftIcon,{}),t.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function ni({className:e,variant:a="outline",size:o="icon-sm",...r}){const{orientation:n,scrollNext:i,canScrollNext:d}=Ye();return t.jsxs(L,{"data-slot":"carousel-next",variant:a,size:o,className:s("absolute touch-manipulation rounded-full",n==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!d,onClick:i,...r,children:[t.jsx(N.ChevronRightIcon,{}),t.jsx("span",{className:"sr-only",children:"Next slide"})]})}function si({className:e,...a}){return t.jsx(p.Checkbox.Root,{"data-slot":"checkbox",className:s("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:t.jsx(p.Checkbox.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:t.jsx(N.CheckIcon,{})})})}function ii({...e}){return t.jsx(p.Collapsible.Root,{"data-slot":"collapsible",...e})}function li({...e}){return t.jsx(p.Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function di({...e}){return t.jsx(p.Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",...e})}function Ht({className:e,...a}){return t.jsx("div",{"data-slot":"input-group",role:"group",className:s("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})}const ci=ne.cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function Ft({className:e,align:a="inline-start",...o}){return t.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:s(ci({align:a}),e),onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.currentTarget.click())},onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}const ui=ne.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function $t({className:e,type:a="button",variant:o="ghost",size:r="xs",...n}){return t.jsx(L,{type:a,"data-size":r,variant:o,className:s(ui({size:r}),e),...n})}function pi({className:e,...a}){return t.jsx("span",{className:s("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}function ao({className:e,...a}){return t.jsx(Ge,{"data-slot":"input-group-control",className:s("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...a})}function mi({className:e,...a}){return t.jsx(Et,{"data-slot":"input-group-control",className:s("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...a})}const fi=q.Combobox.Root;function gi({...e}){return t.jsx(q.Combobox.Value,{"data-slot":"combobox-value",...e})}function oo({className:e,children:a,...o}){return t.jsxs(q.Combobox.Trigger,{"data-slot":"combobox-trigger",className:s("[&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,t.jsx(N.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})]})}function xi({className:e,...a}){return t.jsx(q.Combobox.Clear,{"data-slot":"combobox-clear",render:t.jsx($t,{variant:"ghost",size:"icon-xs"}),className:s(e),...a,children:t.jsx(N.XIcon,{className:"pointer-events-none"})})}function hi({className:e,children:a,disabled:o=!1,showTrigger:r=!0,showClear:n=!1,...i}){return t.jsxs(Ht,{className:s("w-auto",e),children:[t.jsx(q.Combobox.Input,{render:t.jsx(ao,{disabled:o}),...i}),t.jsxs(Ft,{align:"inline-end",children:[r&&t.jsx($t,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:o,children:t.jsx(oo,{})}),n&&t.jsx(xi,{disabled:o})]}),a]})}function bi({className:e,side:a="bottom",sideOffset:o=6,align:r="start",alignOffset:n=0,anchor:i,...d}){return t.jsx(q.Combobox.Portal,{children:t.jsx(q.Combobox.Positioner,{side:a,sideOffset:o,align:r,alignOffset:n,anchor:i,className:"isolate z-50",children:t.jsx(q.Combobox.Popup,{"data-slot":"combobox-content","data-chips":!!i,className:s("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d})})})}function vi({className:e,...a}){return t.jsx(q.Combobox.List,{"data-slot":"combobox-list",className:s("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",e),...a})}function ji({className:e,children:a,...o}){return t.jsxs(q.Combobox.Item,{"data-slot":"combobox-item",className:s("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,t.jsx(q.Combobox.ItemIndicator,{render:t.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:t.jsx(N.CheckIcon,{className:"pointer-events-none"})})]})}function wi({className:e,...a}){return t.jsx(q.Combobox.Group,{"data-slot":"combobox-group",className:s(e),...a})}function yi({className:e,...a}){return t.jsx(q.Combobox.GroupLabel,{"data-slot":"combobox-label",className:s("px-2 py-1.5 text-xs text-muted-foreground",e),...a})}function Ci({...e}){return t.jsx(q.Combobox.Collection,{"data-slot":"combobox-collection",...e})}function Ni({className:e,...a}){return t.jsx(q.Combobox.Empty,{"data-slot":"combobox-empty",className:s("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",e),...a})}function ki({className:e,...a}){return t.jsx(q.Combobox.Separator,{"data-slot":"combobox-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function Mi({className:e,...a}){return t.jsx(q.Combobox.Chips,{"data-slot":"combobox-chips",className:s("flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",e),...a})}function _i({className:e,children:a,showRemove:o=!0,...r}){return t.jsxs(q.Combobox.Chip,{"data-slot":"combobox-chip",className:s("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",e),...r,children:[a,o&&t.jsx(q.Combobox.ChipRemove,{render:t.jsx(L,{variant:"ghost",size:"icon-xs"}),className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",children:t.jsx(N.XIcon,{className:"pointer-events-none"})})]})}function Si({className:e,...a}){return t.jsx(q.Combobox.Input,{"data-slot":"combobox-chip-input",className:s("min-w-16 flex-1 outline-none",e),...a})}function zi(){return H.useRef(null)}function Ii({className:e,...a}){return t.jsx(ve.Command,{"data-slot":"command",className:s("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...a})}function Ai({title:e="Command Palette",description:a="Search for a command to run...",children:o,className:r,showCloseButton:n=!1,...i}){return t.jsxs(Re,{...i,children:[t.jsxs(Oe,{className:"sr-only",children:[t.jsx(Pe,{children:e}),t.jsx(Tt,{children:a})]}),t.jsx(Le,{className:s("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",r),showCloseButton:n,children:o})]})}function Ti({className:e,...a}){return t.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:t.jsxs(Ht,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[t.jsx(ve.Command.Input,{"data-slot":"command-input",className:s("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...a}),t.jsx(Ft,{children:t.jsx(N.SearchIcon,{className:"size-4 shrink-0 opacity-50"})})]})})}function Di({className:e,...a}){return t.jsx(ve.Command.List,{"data-slot":"command-list",className:s("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...a})}function Ei({className:e,...a}){return t.jsx(ve.Command.Empty,{"data-slot":"command-empty",className:s("py-6 text-center text-sm",e),...a})}function Ri({className:e,...a}){return t.jsx(ve.Command.Group,{"data-slot":"command-group",className:s("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...a})}function Li({className:e,...a}){return t.jsx(ve.Command.Separator,{"data-slot":"command-separator",className:s("-mx-1 h-px bg-border",e),...a})}function Oi({className:e,children:a,...o}){return t.jsxs(ve.Command.Item,{"data-slot":"command-item",className:s("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...o,children:[a,t.jsx(N.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function Pi({className:e,...a}){return t.jsx("span",{"data-slot":"command-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",e),...a})}function Gi({...e}){return t.jsx(p.ContextMenu.Root,{"data-slot":"context-menu",...e})}function Bi({className:e,...a}){return t.jsx(p.ContextMenu.Trigger,{"data-slot":"context-menu-trigger",className:s("select-none",e),...a})}function Ui({...e}){return t.jsx(p.ContextMenu.Group,{"data-slot":"context-menu-group",...e})}function Hi({...e}){return t.jsx(p.ContextMenu.Portal,{"data-slot":"context-menu-portal",...e})}function Fi({...e}){return t.jsx(p.ContextMenu.Sub,{"data-slot":"context-menu-sub",...e})}function $i({...e}){return t.jsx(p.ContextMenu.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function Vi({className:e,...a}){return t.jsx(p.ContextMenu.Portal,{children:t.jsx(p.ContextMenu.Content,{"data-slot":"context-menu-content",className:s("z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})}function Yi({className:e,inset:a,variant:o="default",...r}){return t.jsx(p.ContextMenu.Item,{"data-slot":"context-menu-item","data-inset":a,"data-variant":o,className:s("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function Wi({className:e,inset:a,children:o,...r}){return t.jsxs(p.ContextMenu.SubTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":a,className:s("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(N.ChevronRightIcon,{className:"ml-auto"})]})}function qi({className:e,...a}){return t.jsx(p.ContextMenu.SubContent,{"data-slot":"context-menu-sub-content",className:s("z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})}function Ki({className:e,children:a,checked:o,inset:r,...n}){return t.jsxs(p.ContextMenu.CheckboxItem,{"data-slot":"context-menu-checkbox-item","data-inset":r,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...n,children:[t.jsx("span",{className:"pointer-events-none absolute right-2",children:t.jsx(p.ContextMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function Xi({className:e,children:a,inset:o,...r}){return t.jsxs(p.ContextMenu.RadioItem,{"data-slot":"context-menu-radio-item","data-inset":o,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute right-2",children:t.jsx(p.ContextMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function Zi({className:e,inset:a,...o}){return t.jsx(p.ContextMenu.Label,{"data-slot":"context-menu-label","data-inset":a,className:s("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...o})}function Ji({className:e,...a}){return t.jsx(p.ContextMenu.Separator,{"data-slot":"context-menu-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function Qi({className:e,...a}){return t.jsx("span",{"data-slot":"context-menu-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",e),...a})}function el({...e}){return t.jsx(fe.Drawer.Root,{"data-slot":"drawer",...e})}function tl({...e}){return t.jsx(fe.Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function ro({...e}){return t.jsx(fe.Drawer.Portal,{"data-slot":"drawer-portal",...e})}function al({...e}){return t.jsx(fe.Drawer.Close,{"data-slot":"drawer-close",...e})}function no({className:e,...a}){return t.jsx(fe.Drawer.Overlay,{"data-slot":"drawer-overlay",className:s("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function ol({className:e,children:a,...o}){return t.jsxs(ro,{"data-slot":"drawer-portal",children:[t.jsx(no,{}),t.jsxs(fe.Drawer.Content,{"data-slot":"drawer-content",className:s("group/drawer-content fixed z-50 flex h-auto flex-col bg-background text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",e),...o,children:[t.jsx("div",{className:"mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),a]})]})}function rl({className:e,...a}){return t.jsx("div",{"data-slot":"drawer-header",className:s("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left",e),...a})}function nl({className:e,...a}){return t.jsx("div",{"data-slot":"drawer-footer",className:s("mt-auto flex flex-col gap-2 p-4",e),...a})}function sl({className:e,...a}){return t.jsx(fe.Drawer.Title,{"data-slot":"drawer-title",className:s("text-base font-medium text-foreground",e),...a})}function il({className:e,...a}){return t.jsx(fe.Drawer.Description,{"data-slot":"drawer-description",className:s("text-sm text-muted-foreground",e),...a})}function ll({...e}){return t.jsx(p.DropdownMenu.Root,{"data-slot":"dropdown-menu",...e})}function dl({...e}){return t.jsx(p.DropdownMenu.Portal,{"data-slot":"dropdown-menu-portal",...e})}function cl({...e}){return t.jsx(p.DropdownMenu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function ul({className:e,align:a="start",sideOffset:o=4,...r}){return t.jsx(p.DropdownMenu.Portal,{children:t.jsx(p.DropdownMenu.Content,{"data-slot":"dropdown-menu-content",sideOffset:o,align:a,className:s("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})})}function pl({...e}){return t.jsx(p.DropdownMenu.Group,{"data-slot":"dropdown-menu-group",...e})}function ml({className:e,inset:a,variant:o="default",...r}){return t.jsx(p.DropdownMenu.Item,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":o,className:s("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function fl({className:e,children:a,checked:o,inset:r,...n}){return t.jsxs(p.DropdownMenu.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...n,children:[t.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t.jsx(p.DropdownMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function gl({...e}){return t.jsx(p.DropdownMenu.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function xl({className:e,children:a,inset:o,...r}){return t.jsxs(p.DropdownMenu.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t.jsx(p.DropdownMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function hl({className:e,inset:a,...o}){return t.jsx(p.DropdownMenu.Label,{"data-slot":"dropdown-menu-label","data-inset":a,className:s("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...o})}function bl({className:e,...a}){return t.jsx(p.DropdownMenu.Separator,{"data-slot":"dropdown-menu-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function vl({className:e,...a}){return t.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...a})}function jl({...e}){return t.jsx(p.DropdownMenu.Sub,{"data-slot":"dropdown-menu-sub",...e})}function wl({className:e,inset:a,children:o,...r}){return t.jsxs(p.DropdownMenu.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:s("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(N.ChevronRightIcon,{className:"ml-auto"})]})}function yl({className:e,...a}){return t.jsx(p.DropdownMenu.SubContent,{"data-slot":"dropdown-menu-sub-content",className:s("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})}function Cl({className:e,...a}){return t.jsx("fieldset",{"data-slot":"field-set",className:s("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...a})}function Nl({className:e,variant:a="legend",...o}){return t.jsx("legend",{"data-slot":"field-legend","data-variant":a,className:s("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",e),...o})}function kl({className:e,...a}){return t.jsx("div",{"data-slot":"field-group",className:s("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",e),...a})}const Ml=ne.cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function _l({className:e,orientation:a="vertical",...o}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":a,className:s(Ml({orientation:a}),e),...o})}function Sl({className:e,...a}){return t.jsx("div",{"data-slot":"field-content",className:s("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...a})}function zl({className:e,...a}){return t.jsx(we,{"data-slot":"field-label",className:s("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...a})}function Il({className:e,...a}){return t.jsx("div",{"data-slot":"field-label",className:s("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...a})}function Al({className:e,...a}){return t.jsx("p",{"data-slot":"field-description",className:s("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function Tl({children:e,className:a,...o}){return t.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:s("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",a),...o,children:[t.jsx(ce,{className:"absolute inset-0 top-1/2"}),e&&t.jsx("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:e})]})}function Dl({className:e,children:a,errors:o,...r}){const n=m.useMemo(()=>{if(a)return a;if(!o?.length)return null;const i=[...new Map(o.map(d=>[d?.message,d])).values()];return i?.length==1?i[0]?.message:t.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:i.map((d,f)=>d?.message&&t.jsx("li",{children:d.message},f))})},[a,o]);return n?t.jsx("div",{role:"alert","data-slot":"field-error",className:s("text-sm font-normal text-destructive",e),...r,children:n}):null}function El({...e}){return t.jsx(p.HoverCard.Root,{"data-slot":"hover-card",...e})}function Rl({...e}){return t.jsx(p.HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function Ll({className:e,align:a="center",sideOffset:o=4,...r}){return t.jsx(p.HoverCard.Portal,{"data-slot":"hover-card-portal",children:t.jsx(p.HoverCard.Content,{"data-slot":"hover-card-content",align:a,sideOffset:o,className:s("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})})}function Ol({className:e,containerClassName:a,...o}){return t.jsx(xa.OTPInput,{"data-slot":"input-otp",containerClassName:s("cn-input-otp flex items-center has-disabled:opacity-50",a),spellCheck:!1,className:s("disabled:cursor-not-allowed",e),...o})}function Pl({className:e,...a}){return t.jsx("div",{"data-slot":"input-otp-group",className:s("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",e),...a})}function Gl({index:e,className:a,...o}){const r=H.useContext(xa.OTPInputContext),{char:n,hasFakeCaret:i,isActive:d}=r?.slots[e]??{};return t.jsxs("div",{"data-slot":"input-otp-slot","data-active":d,className:s("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",a),...o,children:[n,i&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})}function Bl({...e}){return t.jsx("div",{"data-slot":"input-otp-separator",className:"flex items-center [&_svg:not([class*='size-'])]:size-4",role:"separator",...e,children:t.jsx(N.MinusIcon,{})})}function Ul({className:e,...a}){return t.jsx("div",{role:"list","data-slot":"item-group",className:s("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",e),...a})}function Hl({className:e,...a}){return t.jsx(ce,{"data-slot":"item-separator",orientation:"horizontal",className:s("my-2",e),...a})}const Fl=ne.cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",{variants:{variant:{default:"border-transparent",outline:"border-border",muted:"border-transparent bg-muted/50"},size:{default:"gap-2.5 px-3 py-2.5",sm:"gap-2.5 px-3 py-2.5",xs:"gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"}},defaultVariants:{variant:"default",size:"default"}});function $l({className:e,variant:a="default",size:o="default",asChild:r=!1,...n}){const i=r?p.Slot.Root:"div";return t.jsx(i,{"data-slot":"item","data-variant":a,"data-size":o,className:s(Fl({variant:a,size:o,className:e})),...n})}const Vl=ne.cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"[&_svg:not([class*='size-'])]:size-4",image:"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function Yl({className:e,variant:a="default",...o}){return t.jsx("div",{"data-slot":"item-media","data-variant":a,className:s(Vl({variant:a,className:e})),...o})}function Wl({className:e,...a}){return t.jsx("div",{"data-slot":"item-content",className:s("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",e),...a})}function ql({className:e,...a}){return t.jsx("div",{"data-slot":"item-title",className:s("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",e),...a})}function Kl({className:e,...a}){return t.jsx("p",{"data-slot":"item-description",className:s("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function Xl({className:e,...a}){return t.jsx("div",{"data-slot":"item-actions",className:s("flex items-center gap-2",e),...a})}function Zl({className:e,...a}){return t.jsx("div",{"data-slot":"item-header",className:s("flex basis-full items-center justify-between gap-2",e),...a})}function Jl({className:e,...a}){return t.jsx("div",{"data-slot":"item-footer",className:s("flex basis-full items-center justify-between gap-2",e),...a})}function Ql({className:e,...a}){return t.jsx("kbd",{"data-slot":"kbd",className:s("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",e),...a})}function ed({className:e,...a}){return t.jsx("kbd",{"data-slot":"kbd-group",className:s("inline-flex items-center gap-1",e),...a})}function td({className:e,...a}){return t.jsx(p.Menubar.Root,{"data-slot":"menubar",className:s("flex h-8 items-center gap-0.5 rounded-lg border bg-background p-[3px]",e),...a})}function ad({...e}){return t.jsx(p.Menubar.Menu,{"data-slot":"menubar-menu",...e})}function od({...e}){return t.jsx(p.Menubar.Group,{"data-slot":"menubar-group",...e})}function so({...e}){return t.jsx(p.Menubar.Portal,{"data-slot":"menubar-portal",...e})}function rd({...e}){return t.jsx(p.Menubar.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function nd({className:e,...a}){return t.jsx(p.Menubar.Trigger,{"data-slot":"menubar-trigger",className:s("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",e),...a})}function sd({className:e,align:a="start",alignOffset:o=-4,sideOffset:r=8,...n}){return t.jsx(so,{children:t.jsx(p.Menubar.Content,{"data-slot":"menubar-content",align:a,alignOffset:o,sideOffset:r,className:s("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",e),...n})})}function id({className:e,inset:a,variant:o="default",...r}){return t.jsx(p.Menubar.Item,{"data-slot":"menubar-item","data-inset":a,"data-variant":o,className:s("group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function ld({className:e,children:a,checked:o,inset:r,...n}){return t.jsxs(p.Menubar.CheckboxItem,{"data-slot":"menubar-checkbox-item","data-inset":r,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:o,...n,children:[t.jsx("span",{className:"pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",children:t.jsx(p.Menubar.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function dd({className:e,children:a,inset:o,...r}){return t.jsxs(p.Menubar.RadioItem,{"data-slot":"menubar-radio-item","data-inset":o,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",children:t.jsx(p.Menubar.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function cd({className:e,inset:a,...o}){return t.jsx(p.Menubar.Label,{"data-slot":"menubar-label","data-inset":a,className:s("px-1.5 py-1 text-sm font-medium data-inset:pl-7",e),...o})}function ud({className:e,...a}){return t.jsx(p.Menubar.Separator,{"data-slot":"menubar-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function pd({className:e,...a}){return t.jsx("span",{"data-slot":"menubar-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",e),...a})}function md({...e}){return t.jsx(p.Menubar.Sub,{"data-slot":"menubar-sub",...e})}function fd({className:e,inset:a,children:o,...r}){return t.jsxs(p.Menubar.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":a,className:s("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(N.ChevronRightIcon,{className:"ml-auto size-4"})]})}function gd({className:e,...a}){return t.jsx(p.Menubar.SubContent,{"data-slot":"menubar-sub-content",className:s("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})}function xd({className:e,children:a,viewport:o=!0,...r}){return t.jsxs(p.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":o,className:s("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[a,o&&t.jsx(lo,{})]})}function hd({className:e,...a}){return t.jsx(p.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:s("group flex flex-1 list-none items-center justify-center gap-0",e),...a})}function bd({className:e,...a}){return t.jsx(p.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:s("relative",e),...a})}const io=ne.cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function vd({className:e,children:a,...o}){return t.jsxs(p.NavigationMenu.Trigger,{"data-slot":"navigation-menu-trigger",className:s(io(),"group",e),...o,children:[a," ",t.jsx(N.ChevronDownIcon,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180","aria-hidden":"true"})]})}function jd({className:e,...a}){return t.jsx(p.NavigationMenu.Content,{"data-slot":"navigation-menu-content",className:s("top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",e),...a})}function lo({className:e,...a}){return t.jsx("div",{className:s("absolute top-full left-0 isolate z-50 flex justify-center"),children:t.jsx(p.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:s("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-95",e),...a})})}function wd({className:e,...a}){return t.jsx(p.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:s("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",e),...a})}function yd({className:e,...a}){return t.jsx(p.NavigationMenu.Indicator,{"data-slot":"navigation-menu-indicator",className:s("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",e),...a,children:t.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})})}function Cd({className:e,...a}){return t.jsx(p.RadioGroup.Root,{"data-slot":"radio-group",className:s("grid w-full gap-2",e),...a})}function Nd({className:e,...a}){return t.jsx(p.RadioGroup.Item,{"data-slot":"radio-group-item",className:s("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:t.jsx(p.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:t.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}function kd({className:e,...a}){return t.jsx(Mt.Group,{"data-slot":"resizable-panel-group",className:s("flex h-full w-full aria-[orientation=vertical]:flex-col",e),...a})}function Md({...e}){return t.jsx(Mt.Panel,{"data-slot":"resizable-panel",...e})}function _d({withHandle:e,className:a,...o}){return t.jsx(Mt.Separator,{"data-slot":"resizable-handle",className:s("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",a),...o,children:e&&t.jsx("div",{className:"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border"})})}function Sd({className:e,defaultValue:a,value:o,min:r=0,max:n=100,...i}){const d=H.useMemo(()=>Array.isArray(o)?o:Array.isArray(a)?a:[r,n],[o,a,r,n]);return t.jsxs(p.Slider.Root,{"data-slot":"slider",defaultValue:a,value:o,min:r,max:n,className:s("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",e),...i,children:[t.jsx(p.Slider.Track,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",children:t.jsx(p.Slider.Range,{"data-slot":"slider-range",className:"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"})}),Array.from({length:d.length},(f,u)=>t.jsx(p.Slider.Thumb,{"data-slot":"slider-thumb",className:"relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"},u))]})}const zd=({...e})=>{const o=It()?"dark":"light";return t.jsx(be.Toaster,{theme:o,className:"toaster group",icons:{success:t.jsx(N.CircleCheckIcon,{className:"size-4"}),info:t.jsx(N.InfoIcon,{className:"size-4"}),warning:t.jsx(N.TriangleAlertIcon,{className:"size-4"}),error:t.jsx(N.OctagonXIcon,{className:"size-4"}),loading:t.jsx(N.Loader2Icon,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})};function Id({className:e,...a}){return t.jsx(N.Loader2Icon,{role:"status","aria-label":"Loading",className:s("size-4 animate-spin",e),...a})}const Vt=ne.cva("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]",lg:"h-9 min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});function Ad({className:e,variant:a="default",size:o="default",...r}){return t.jsx(p.Toggle.Root,{"data-slot":"toggle",className:s(Vt({variant:a,size:o,className:e})),...r})}const co=H.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"});function Td({className:e,variant:a,size:o,spacing:r=0,orientation:n="horizontal",children:i,...d}){return t.jsx(p.ToggleGroup.Root,{"data-slot":"toggle-group","data-variant":a,"data-size":o,"data-spacing":r,"data-orientation":n,style:{"--gap":r},className:s("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...d,children:t.jsx(co.Provider,{value:{variant:a,size:o,spacing:r,orientation:n},children:i})})}function Dd({className:e,children:a,variant:o="default",size:r="default",...n}){const i=H.useContext(co);return t.jsx(p.ToggleGroup.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||o,"data-size":i.size||r,"data-spacing":i.spacing,className:s("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",Vt({variant:i.variant||o,size:i.size||r}),e),...n,children:a})}exports.Accordion=Ss;exports.AccordionContent=As;exports.AccordionItem=zs;exports.AccordionTrigger=Is;exports.Alert=Aa;exports.AlertAction=dr;exports.AlertDescription=Da;exports.AlertDialog=Ts;exports.AlertDialogAction=Bs;exports.AlertDialogCancel=Us;exports.AlertDialogContent=Es;exports.AlertDialogDescription=Gs;exports.AlertDialogFooter=Ls;exports.AlertDialogHeader=Rs;exports.AlertDialogMedia=Os;exports.AlertDialogOverlay=Za;exports.AlertDialogPortal=Xa;exports.AlertDialogTitle=Ps;exports.AlertDialogTrigger=Ds;exports.AlertTitle=Ta;exports.AppHeader=ba;exports.AppLayout=xr;exports.AppSidebar=Ot;exports.AreaGraph=vr;exports.AspectRatio=Hs;exports.AssistantModal=Ro;exports.Avatar=_t;exports.AvatarBadge=Mo;exports.AvatarFallback=zt;exports.AvatarGroup=_o;exports.AvatarGroupCount=So;exports.AvatarImage=St;exports.Badge=Fs;exports.BarGraph=jr;exports.Boxplot=yr;exports.Breadcrumb=$s;exports.BreadcrumbEllipsis=Xs;exports.BreadcrumbItem=Ys;exports.BreadcrumbLink=Ws;exports.BreadcrumbList=Vs;exports.BreadcrumbPage=qs;exports.BreadcrumbSeparator=Ks;exports.Button=L;exports.ButtonGroup=Zs;exports.ButtonGroupSeparator=Qs;exports.ButtonGroupText=Js;exports.Calendar=ei;exports.CalendarDayButton=eo;exports.Card=lt;exports.CardAction=Yo;exports.CardContent=dt;exports.CardDescription=Vo;exports.CardFooter=Wo;exports.CardHeader=Rt;exports.CardTitle=Lt;exports.Carousel=ti;exports.CarouselContent=ai;exports.CarouselItem=oi;exports.CarouselNext=ni;exports.CarouselPrevious=ri;exports.Checkbox=si;exports.Chromatogram=Mr;exports.ChromatogramChart=Hr;exports.CodeEditor=je;exports.CodeScriptEditorButton=Lo;exports.Collapsible=ii;exports.CollapsibleContent=di;exports.CollapsibleTrigger=li;exports.Combobox=fi;exports.ComboboxChip=_i;exports.ComboboxChips=Mi;exports.ComboboxChipsInput=Si;exports.ComboboxCollection=Ci;exports.ComboboxContent=bi;exports.ComboboxEmpty=Ni;exports.ComboboxGroup=wi;exports.ComboboxInput=hi;exports.ComboboxItem=ji;exports.ComboboxLabel=yi;exports.ComboboxList=vi;exports.ComboboxSeparator=ki;exports.ComboboxTrigger=oo;exports.ComboboxValue=gi;exports.Command=Ii;exports.CommandDialog=Ai;exports.CommandEmpty=Ei;exports.CommandGroup=Ri;exports.CommandInput=Ti;exports.CommandItem=Oi;exports.CommandList=Di;exports.CommandSeparator=Li;exports.CommandShortcut=Pi;exports.ContextMenu=Gi;exports.ContextMenuCheckboxItem=Ki;exports.ContextMenuContent=Vi;exports.ContextMenuGroup=Ui;exports.ContextMenuItem=Yi;exports.ContextMenuLabel=Zi;exports.ContextMenuPortal=Hi;exports.ContextMenuRadioGroup=$i;exports.ContextMenuRadioItem=Xi;exports.ContextMenuSeparator=Ji;exports.ContextMenuShortcut=Qi;exports.ContextMenuSub=Fi;exports.ContextMenuSubContent=qi;exports.ContextMenuSubTrigger=Wi;exports.ContextMenuTrigger=Bi;exports.Dialog=Re;exports.DialogClose=ja;exports.DialogContent=Le;exports.DialogDescription=Tt;exports.DialogFooter=At;exports.DialogHeader=Oe;exports.DialogOverlay=wa;exports.DialogPortal=va;exports.DialogTitle=Pe;exports.DialogTrigger=Eo;exports.DotPlot=Fr;exports.Drawer=el;exports.DrawerClose=al;exports.DrawerContent=ol;exports.DrawerDescription=il;exports.DrawerFooter=nl;exports.DrawerHeader=rl;exports.DrawerOverlay=no;exports.DrawerPortal=ro;exports.DrawerTitle=sl;exports.DrawerTrigger=tl;exports.DropdownMenu=ll;exports.DropdownMenuCheckboxItem=fl;exports.DropdownMenuContent=ul;exports.DropdownMenuGroup=pl;exports.DropdownMenuItem=ml;exports.DropdownMenuLabel=hl;exports.DropdownMenuPortal=dl;exports.DropdownMenuRadioGroup=gl;exports.DropdownMenuRadioItem=xl;exports.DropdownMenuSeparator=bl;exports.DropdownMenuShortcut=vl;exports.DropdownMenuSub=jl;exports.DropdownMenuSubContent=yl;exports.DropdownMenuSubTrigger=wl;exports.DropdownMenuTrigger=cl;exports.Field=_l;exports.FieldContent=Sl;exports.FieldDescription=Al;exports.FieldError=Dl;exports.FieldGroup=kl;exports.FieldLabel=zl;exports.FieldLegend=Nl;exports.FieldSeparator=Tl;exports.FieldSet=Cl;exports.FieldTitle=Il;exports.Heatmap=Cn;exports.Histogram=zn;exports.HoverCard=El;exports.HoverCardContent=Ll;exports.HoverCardTrigger=Rl;exports.Input=Ge;exports.InputGroup=Ht;exports.InputGroupAddon=Ft;exports.InputGroupButton=$t;exports.InputGroupInput=ao;exports.InputGroupText=pi;exports.InputGroupTextarea=mi;exports.InputOTP=Ol;exports.InputOTPGroup=Pl;exports.InputOTPSeparator=Bl;exports.InputOTPSlot=Gl;exports.Item=$l;exports.ItemActions=Xl;exports.ItemContent=Wl;exports.ItemDescription=Kl;exports.ItemFooter=Jl;exports.ItemGroup=Ul;exports.ItemHeader=Zl;exports.ItemMedia=Yl;exports.ItemSeparator=Hl;exports.ItemTitle=ql;exports.Kbd=Ql;exports.KbdGroup=ed;exports.Label=we;exports.LaunchContent=Ho;exports.LineGraph=In;exports.Main=ks;exports.Menubar=td;exports.MenubarCheckboxItem=ld;exports.MenubarContent=sd;exports.MenubarGroup=od;exports.MenubarItem=id;exports.MenubarLabel=cd;exports.MenubarMenu=ad;exports.MenubarPortal=so;exports.MenubarRadioGroup=rd;exports.MenubarRadioItem=dd;exports.MenubarSeparator=ud;exports.MenubarShortcut=pd;exports.MenubarSub=md;exports.MenubarSubContent=gd;exports.MenubarSubTrigger=fd;exports.MenubarTrigger=nd;exports.Navbar=Na;exports.NavigationMenu=xd;exports.NavigationMenuContent=jd;exports.NavigationMenuIndicator=yd;exports.NavigationMenuItem=bd;exports.NavigationMenuLink=wd;exports.NavigationMenuList=hd;exports.NavigationMenuTrigger=vd;exports.NavigationMenuViewport=lo;exports.PieChart=Ms;exports.PlateMap=Oa;exports.ProtocolConfiguration=qo;exports.ProtocolYamlCard=Ko;exports.PythonEditorModal=Xo;exports.RadioGroup=Cd;exports.RadioGroupItem=Nd;exports.ResizableHandle=_d;exports.ResizablePanel=Md;exports.ResizablePanelGroup=kd;exports.ScatterGraph=_s;exports.ScrollArea=Ut;exports.ScrollBar=Pa;exports.Select=Be;exports.SelectContent=Fe;exports.SelectGroup=Oo;exports.SelectItem=$e;exports.SelectLabel=Po;exports.SelectScrollDownButton=Ca;exports.SelectScrollUpButton=ya;exports.SelectSeparator=Go;exports.SelectTrigger=He;exports.SelectValue=Ue;exports.Separator=ce;exports.Sheet=Fa;exports.SheetClose=Fn;exports.SheetContent=$a;exports.SheetDescription=Wa;exports.SheetFooter=Yn;exports.SheetHeader=Va;exports.SheetTitle=Ya;exports.SheetTrigger=Hn;exports.Sidebar=as;exports.SidebarContent=cs;exports.SidebarFooter=ls;exports.SidebarGroup=us;exports.SidebarGroupAction=ms;exports.SidebarGroupContent=fs;exports.SidebarGroupLabel=ps;exports.SidebarHeader=is;exports.SidebarInput=ss;exports.SidebarInset=ns;exports.SidebarMenu=gs;exports.SidebarMenuAction=vs;exports.SidebarMenuBadge=js;exports.SidebarMenuButton=bs;exports.SidebarMenuItem=xs;exports.SidebarMenuSkeleton=ws;exports.SidebarMenuSub=ys;exports.SidebarMenuSubButton=Ns;exports.SidebarMenuSubItem=Cs;exports.SidebarProvider=Ka;exports.SidebarRail=rs;exports.SidebarSeparator=ds;exports.SidebarTrigger=os;exports.Skeleton=kt;exports.Slider=Sd;exports.Spinner=Id;exports.Switch=_e;exports.TDPLink=gr;exports.Table=ka;exports.TableBody=_a;exports.TableCaption=ar;exports.TableCell=za;exports.TableFooter=tr;exports.TableHead=Sa;exports.TableHeader=Ma;exports.TableRow=yt;exports.Tabs=Ga;exports.TabsContent=Bn;exports.TabsList=Ua;exports.TabsTrigger=Ha;exports.TdpNavigationContext=Bt;exports.TdpNavigationProvider=mr;exports.TdpSearch=cr;exports.TetraScienceIcon=Dt;exports.Textarea=Et;exports.Toaster=zd;exports.Toggle=Ad;exports.ToggleGroup=Td;exports.ToggleGroupItem=Dd;exports.Tooltip=at;exports.TooltipContent=rt;exports.TooltipProvider=zo;exports.TooltipTrigger=ot;exports.badgeVariants=Ja;exports.buildTdpUrl=Ee;exports.buttonGroupVariants=Qa;exports.buttonVariants=tt;exports.getTdpBaseUrlFromReferrer=Pt;exports.navigateToTdpUrl=Gt;exports.navigationMenuTriggerStyle=io;exports.tabsListVariants=Ba;exports.tdpPaths=pr;exports.toggleVariants=Vt;exports.useCarousel=Ye;exports.useComboboxAnchor=zi;exports.useSearch=Ia;exports.useSidebar=Ve;exports.useTdpNavigation=fr;exports.useTdpNavigationContext=Ea;
2021
11
  //# sourceMappingURL=index.cjs.map