@kingsimba/nc-ui 0.1.45 → 0.1.47
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/GeneratedIcons-Z-RSoFyY.cjs +1 -0
- package/dist/{GeneratedIcons-ChNhuTDj.js → GeneratedIcons-eOaZDTB3.js} +536 -197
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +162 -14
- package/dist/icons.js +44 -28
- package/dist/index.cjs +1 -1
- package/dist/index.js +42 -42
- package/package.json +1 -1
- package/dist/GeneratedIcons-DGITx4_M.cjs +0 -1
package/dist/icons.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./GeneratedIcons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./GeneratedIcons-Z-RSoFyY.cjs");exports.CameraIcon=o.CameraIcon;exports.ChevronDownIcon=o.ChevronDownIcon;exports.ChevronLeftIcon=o.ChevronLeftIcon;exports.ChevronRightIcon=o.ChevronRightIcon;exports.CloseIcon=o.CloseIcon;exports.ConsoleIcon=o.ConsoleIcon;exports.CopyFilledIcon=o.CopyFilledIcon;exports.CopyIcon=o.CopyIcon;exports.DoubleClickIcon=o.DoubleClickIcon;exports.DownloadIcon=o.DownloadIcon;exports.EditIcon=o.EditIcon;exports.EmptyFolderIcon=o.EmptyFolderIcon;exports.ExternalLinkIcon=o.ExternalLinkIcon;exports.EyeHiddenIcon=o.EyeHiddenIcon;exports.FilterIcon=o.FilterIcon;exports.HideAppsIcon=o.HideAppsIcon;exports.InfoFilledIcon=o.InfoFilledIcon;exports.InfoIcon=o.InfoIcon;exports.KeyIcon=o.KeyIcon;exports.LockIcon=o.LockIcon;exports.MenuIcon=o.MenuIcon;exports.MinusIcon=o.MinusIcon;exports.MoonFilledIcon=o.MoonFilledIcon;exports.MoonIcon=o.MoonIcon;exports.MoreHorizontalIcon=o.MoreHorizontalIcon;exports.MoreIcon=o.MoreIcon;exports.PauseFilledIcon=o.PauseFilledIcon;exports.PauseIcon=o.PauseIcon;exports.PieChartIcon=o.PieChartIcon;exports.PlayFilledIcon=o.PlayFilledIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.PowerIcon=o.PowerIcon;exports.QuestionFilledIcon=o.QuestionFilledIcon;exports.QuestionIcon=o.QuestionIcon;exports.RefreshIcon=o.RefreshIcon;exports.RevertIcon=o.RevertIcon;exports.SaveIcon=o.SaveIcon;exports.SearchIcon=o.SearchIcon;exports.SettingsIcon=o.SettingsIcon;exports.StarFilledIcon=o.StarFilledIcon;exports.StarIcon=o.StarIcon;exports.StopFilledIcon=o.StopFilledIcon;exports.StopIcon=o.StopIcon;exports.SunFilledIcon=o.SunFilledIcon;exports.SunIcon=o.SunIcon;exports.TrashFilledIcon=o.TrashFilledIcon;exports.TrashIcon=o.TrashIcon;exports.UnlockIcon=o.UnlockIcon;exports.UserIcon=o.UserIcon;exports.ViewIcon=o.ViewIcon;exports.WifiIcon=o.WifiIcon;
|
package/dist/icons.d.ts
CHANGED
|
@@ -40,7 +40,18 @@ export declare function CloseIcon({ size, color, strokeWidth, className, style }
|
|
|
40
40
|
export declare function ConsoleIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* Copy icon -
|
|
43
|
+
* Copy icon, filled - the front sheet painted solid, the top one being the sheet
|
|
44
|
+
* whose interior is otherwise empty. The back sheet keeps stroke only: two
|
|
45
|
+
* filled sheets would merge into a single blob and lose the pair. Holding the
|
|
46
|
+
* 2-unit stroke keeps CopyIcon's 20x20 outline.
|
|
47
|
+
*/
|
|
48
|
+
export declare function CopyFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Copy icon - Two overlapping sheets for copy-to-clipboard actions. Scaled to an
|
|
52
|
+
* 18-unit canvas (20x20 with stroke): the two-square silhouette is the widest
|
|
53
|
+
* shape in the set, so at full size it reads heavier than the single-mass icons
|
|
54
|
+
* beside it.
|
|
44
55
|
*/
|
|
45
56
|
export declare function CopyIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
46
57
|
|
|
@@ -51,9 +62,21 @@ export declare function CopyIcon({ size, className, style }: IconProps): JSX_2.E
|
|
|
51
62
|
export declare function DoubleClickIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
52
63
|
|
|
53
64
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
65
|
+
* Download icon - Arrow over a baseline, for saving to disk. The tray is reduced
|
|
66
|
+
* to a single line: an open dish needs two verticals and two corner arcs to say
|
|
67
|
+
* the same thing, and at 16px those melt into the baseline anyway. The line spans
|
|
68
|
+
* the same 3 to 21 as the old tray, so the 20x20 ink box is unchanged; the arrow
|
|
69
|
+
* runs 3 to 17, leaving 4 units of clearance above the line.
|
|
70
|
+
*/
|
|
71
|
+
export declare function DownloadIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Edit icon - Document with a pencil for editing mode.
|
|
75
|
+
* Optically sized to 85%: the sheet fills its box corner-to-corner, so at full
|
|
76
|
+
* size it reads heavier than round icons like InfoIcon. The sheet's corners are
|
|
77
|
+
* cut at r=3 rather than the set's usual 2 - three of them are visible at once on
|
|
78
|
+
* a large flat shape, so the softer radius keeps it from reading as a hard box.
|
|
79
|
+
* The sheet stays open along the top-right because the pencil crosses there.
|
|
57
80
|
*/
|
|
58
81
|
export declare function EditIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
59
82
|
|
|
@@ -64,6 +87,11 @@ export declare function EmptyFolderIcon({ size, className, style }: IconProps):
|
|
|
64
87
|
|
|
65
88
|
/**
|
|
66
89
|
* External Link icon - "box with arrow" icon for opening external links.
|
|
90
|
+
* The box corners are cut at r=3 to match EditIcon's sheet; both are large flat
|
|
91
|
+
* shapes seen three corners at a time, so they share the softer radius. The box
|
|
92
|
+
* stays open along the top-right where the arrow leaves it. The stroke is 1.7
|
|
93
|
+
* rather than 2 so it renders as thick as EditIcon's, whose 28.2-wide viewBox
|
|
94
|
+
* already thins its 2-unit stroke to the same weight.
|
|
67
95
|
*/
|
|
68
96
|
export declare function ExternalLinkIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
69
97
|
|
|
@@ -92,10 +120,38 @@ declare interface IconProps {
|
|
|
92
120
|
}
|
|
93
121
|
|
|
94
122
|
/**
|
|
95
|
-
* Info icon -
|
|
123
|
+
* Info icon, filled - the ring swapped for a solid disc with the "i" knocked
|
|
124
|
+
* out: a glyph of the same colour inside a filled shape has nowhere to read, so
|
|
125
|
+
* it becomes a hole and takes the surface behind the icon instead, the way a
|
|
126
|
+
* counter does on the outline version. The disc is a 11-radius circle, exactly
|
|
127
|
+
* the outer edge the 2-unit ring occupied, so both icons hold one 22x22
|
|
128
|
+
* silhouette. The glyph follows InfoIcon's metrics - the same dot centre, the
|
|
129
|
+
* same 11-to-18.5 stem span - but each counter is cut 0.2 wider than the
|
|
130
|
+
* matching stroke, because a counter is closed in on by the ink around it and
|
|
131
|
+
* reads thinner than the same measurement drawn as a line.
|
|
132
|
+
*/
|
|
133
|
+
export declare function InfoFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Info icon - circle with "i" for information. The dot is a filled circle rather
|
|
137
|
+
* than a zero-length round-capped line, which can never exceed the stroke width;
|
|
138
|
+
* stroke="none" is required, or it would inherit the parent's stroke and render
|
|
139
|
+
* at over double this size. The glyph is drawn heavier than the ring - a 2.6
|
|
140
|
+
* stroke and a 3.2 dot against the ring's 2 - because a short stem at the same
|
|
141
|
+
* nominal weight reads lighter than the long ring around it. InfoFilledIcon cuts
|
|
142
|
+
* the "i" to the same metrics so neither variant reads as the smaller one.
|
|
96
143
|
*/
|
|
97
144
|
export declare function InfoIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
98
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Key icon - Ring bow on the left, blade with two teeth on the right. The bow
|
|
148
|
+
* is r=4 so its 2-unit stroke stops at x=2, level with LockIcon's left edge,
|
|
149
|
+
* and the blade starts at x=11, the inner edge of that ring band, so it meets
|
|
150
|
+
* the hole exactly and leaves the full 6-unit opening. The teeth stop at y=15,
|
|
151
|
+
* short of the bow's own bottom edge at 16, so the blade stays the lowest ink.
|
|
152
|
+
*/
|
|
153
|
+
export declare function KeyIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
154
|
+
|
|
99
155
|
/**
|
|
100
156
|
* Lock icon for secured WiFi networks.
|
|
101
157
|
*/
|
|
@@ -113,6 +169,12 @@ export declare function MenuIcon({ size, className, style }: IconProps): JSX_2.E
|
|
|
113
169
|
*/
|
|
114
170
|
export declare function MinusIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
115
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Moon icon, filled - MoonIcon with the crescent painted. Same geometry, stroke
|
|
174
|
+
* and outline as MoonIcon; filling only closes the crescent's interior.
|
|
175
|
+
*/
|
|
176
|
+
export declare function MoonFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
177
|
+
|
|
116
178
|
/**
|
|
117
179
|
* Moon icon - Dark theme. Outer arc is a circle of radius 8.5 rather than the
|
|
118
180
|
* full 10: a crescent is one compact solid mass, so matching the sun's ink area
|
|
@@ -133,10 +195,39 @@ export declare function MoreHorizontalIcon({ size, className, style }: IconProps
|
|
|
133
195
|
export declare function MoreIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
134
196
|
|
|
135
197
|
/**
|
|
136
|
-
*
|
|
198
|
+
* Pause icon, filled - the two bars of PauseIcon, solid (16x20 ink).
|
|
199
|
+
*/
|
|
200
|
+
export declare function PauseFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Pause icon - Two vertical bars, sized to the 16x20 footprint of
|
|
204
|
+
* PauseFilledIcon so the outline matches the solid version. The 1.7 stroke costs
|
|
205
|
+
* 0.15 of ink per side, so the bars sit that much wider and the fillets grow with
|
|
206
|
+
* them, holding the outer silhouette where the 2-stroke version had it.
|
|
207
|
+
*/
|
|
208
|
+
export declare function PauseIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* PieChart icon for statistics/analytics. A 10-unit radius circle, so the 1.7
|
|
212
|
+
* stroke lands it on the set's 21.7x21.7 ink box.
|
|
137
213
|
*/
|
|
138
214
|
export declare function PieChartIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
139
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Play icon, filled - same filleted triangle as PlayIcon with the interior
|
|
218
|
+
* painted instead of stroked, so it carries the same 17x20 footprint with no
|
|
219
|
+
* stroke to inset.
|
|
220
|
+
*/
|
|
221
|
+
export declare function PlayFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Play icon - Right-pointing triangle for starting playback. The outline sits on
|
|
225
|
+
* the same 17x20 footprint as PlayFilledIcon: the 1.7 stroke adds 0.85 of ink per
|
|
226
|
+
* side, so the geometry is offset 0.15 further out than the 2-stroke version and
|
|
227
|
+
* the fillet radii grow by the same 0.15, keeping the outer silhouette identical.
|
|
228
|
+
*/
|
|
229
|
+
export declare function PlayIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
230
|
+
|
|
140
231
|
/**
|
|
141
232
|
* Plus icon for zoom in functionality.
|
|
142
233
|
*/
|
|
@@ -147,22 +238,34 @@ export declare function PlusIcon({ size, className, style }: IconProps): JSX_2.E
|
|
|
147
238
|
*/
|
|
148
239
|
export declare function PowerIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
149
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Question icon, filled - InfoFilledIcon's disc with the "?" knocked out. The
|
|
243
|
+
* outline's hook, tail and dot all sit on one 3-unit circle about 12,10, so the
|
|
244
|
+
* hole is that circle widened to a 2-to-4 ring and cut with 1-unit caps, ending
|
|
245
|
+
* near where the outline's tail cap did and leaving a comparable gap above the
|
|
246
|
+
* dot. Drawing it as a ring rather than offsetting the tail's curve keeps the
|
|
247
|
+
* hole's two edges concentric.
|
|
248
|
+
*/
|
|
249
|
+
export declare function QuestionFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
250
|
+
|
|
150
251
|
/**
|
|
151
252
|
* Question icon - circle with "?" for help and unknown values. Same 10-unit
|
|
152
253
|
* ring as InfoIcon so the two pair cleanly; the hook and dot mirror the "i"
|
|
153
|
-
* stem and dot,
|
|
254
|
+
* stem and dot, with the same 1.2-radius filled dot and 4 units between dot
|
|
255
|
+
* centre and the glyph above it.
|
|
154
256
|
*/
|
|
155
257
|
export declare function QuestionIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
156
258
|
|
|
157
259
|
/**
|
|
158
|
-
* Refresh icon for scanning networks.
|
|
159
|
-
*
|
|
160
|
-
*
|
|
260
|
+
* Refresh icon for scanning networks. Two 8-unit arcs with 4.44-unit arrow heads,
|
|
261
|
+
* held to an 18x18 ink box rather than filling the frame. Keep the arcs and heads
|
|
262
|
+
* scaled together.
|
|
161
263
|
*/
|
|
162
264
|
export declare function RefreshIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
163
265
|
|
|
164
266
|
/**
|
|
165
|
-
* Revert icon - undo/revert action icon with counter-clockwise arrow.
|
|
267
|
+
* Revert icon - undo/revert action icon with counter-clockwise arrow. An 8-unit
|
|
268
|
+
* circle with the same 4.44-unit head as RefreshIcon, on the shared 18x18 ink box.
|
|
166
269
|
*/
|
|
167
270
|
export declare function RevertIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
168
271
|
|
|
@@ -170,7 +273,7 @@ export declare function RevertIcon({ size, className, style }: IconProps): JSX_2
|
|
|
170
273
|
* Save icon - Floppy disk. The body is a rounded square spanning 3 to 21 with a
|
|
171
274
|
* 45° cut across the top-right corner: a solid square silhouette reads heavier
|
|
172
275
|
* than the set's circles and sparse glyphs, so it is held to a 20-unit ink box
|
|
173
|
-
* (2 units of margin per side)
|
|
276
|
+
* (2 units of margin per side) rather than the full 22.
|
|
174
277
|
*/
|
|
175
278
|
export declare function SaveIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
176
279
|
|
|
@@ -183,11 +286,20 @@ export declare function SearchIcon({ size, className, style }: IconProps): JSX_2
|
|
|
183
286
|
* Settings icon - Gear. Six lobes joined to the hub by rounded webs rather than
|
|
184
287
|
* straight flanks: the profile is built from 1.963-unit arcs throughout, so the
|
|
185
288
|
* tooth/valley transition carries no straight run and reads soft at every size.
|
|
186
|
-
* 1.
|
|
187
|
-
* box
|
|
289
|
+
* 1.7px stroke and a 3.417-unit bore, so the 20.5-unit gear fills a 22.2x22.2
|
|
290
|
+
* outer box - just over the set's usual 22, and level with it at any real size.
|
|
188
291
|
*/
|
|
189
292
|
export declare function SettingsIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
190
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Star icon, filled - StarIcon's star with the interior painted, but with a
|
|
296
|
+
* tighter 1.2-unit tip fillet: a solid body shows the tip shape the way no
|
|
297
|
+
* stroke does, so 1.55 reads as blobby once filled. The star radius drops to
|
|
298
|
+
* 12.36 to hold the tips exactly where the 1.55 version had them, leaving the
|
|
299
|
+
* outline and the 21.85x20.88 ink box unchanged.
|
|
300
|
+
*/
|
|
301
|
+
export declare function StarFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
302
|
+
|
|
191
303
|
/**
|
|
192
304
|
* Star icon - Five-pointed star for favourites and ratings. Outer radius 12.92
|
|
193
305
|
* with a 0.45 inner ratio: the classic 0.382 pentagram proportion goes
|
|
@@ -201,12 +313,41 @@ export declare function SettingsIcon({ size, className, style }: IconProps): JSX
|
|
|
201
313
|
*/
|
|
202
314
|
export declare function StarIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
203
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Stop icon, filled - the StopIcon square, solid (16x16 ink).
|
|
318
|
+
*/
|
|
319
|
+
export declare function StopFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Stop icon - Square. Sized to the 16x16 footprint of StopFilledIcon; the 1.7
|
|
323
|
+
* stroke costs 0.15 of ink per side, so the square and its fillets are drawn that
|
|
324
|
+
* much wider to hold the silhouette.
|
|
325
|
+
*/
|
|
326
|
+
export declare function StopIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Sun icon, filled - SunIcon with the disc painted, so the glyph carries the
|
|
330
|
+
* identical geometry, stroke and 22x22 outline. Only the disc has area; the rays
|
|
331
|
+
* are zero-width lines, so filling leaves them exactly as they were.
|
|
332
|
+
*/
|
|
333
|
+
export declare function SunFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
334
|
+
|
|
204
335
|
/**
|
|
205
336
|
* Sun icon - Light theme. Pairs with MoonIcon as a matched toggle set:
|
|
206
337
|
* both fill the same 22x22 ink box with 1 unit of margin on every side.
|
|
207
338
|
*/
|
|
208
339
|
export declare function SunIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
209
340
|
|
|
341
|
+
/**
|
|
342
|
+
* Trash icon, filled - TrashIcon's can painted solid. The two grip lines stay as
|
|
343
|
+
* counters rather than being dropped: a glyph of the icon's own colour cannot
|
|
344
|
+
* read inside a filled body, so the lines are knocked out of one evenodd path
|
|
345
|
+
* and take the surface behind the icon instead. Every edge is drawn where the
|
|
346
|
+
* 1.7 stroke's outer edge was, so the can, lid bar, handle and both grips hold
|
|
347
|
+
* the outline's 19.7x21.7 ink box.
|
|
348
|
+
*/
|
|
349
|
+
export declare function TrashFilledIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
350
|
+
|
|
210
351
|
/**
|
|
211
352
|
* Trash icon for deleting items.
|
|
212
353
|
*/
|
|
@@ -217,6 +358,13 @@ export declare function TrashIcon({ size, className, style }: IconProps): JSX_2.
|
|
|
217
358
|
*/
|
|
218
359
|
export declare function UnlockIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
219
360
|
|
|
361
|
+
/**
|
|
362
|
+
* User icon - Single person: a 4.47-radius head over a shoulder shape left open
|
|
363
|
+
* along the bottom edge. Sized so the ink box comes to 19.6x21.8 - the set's
|
|
364
|
+
* full-size height, with the narrower width a person silhouette carries.
|
|
365
|
+
*/
|
|
366
|
+
export declare function UserIcon({ size, className, style }: IconProps): JSX_2.Element;
|
|
367
|
+
|
|
220
368
|
/**
|
|
221
369
|
* View icon - "eye" icon for viewing content.
|
|
222
370
|
*/
|
package/dist/icons.js
CHANGED
|
@@ -1,39 +1,55 @@
|
|
|
1
|
-
import { C as a, a as s, b as c, c as I, d as e, e as
|
|
1
|
+
import { C as a, a as s, b as c, c as I, d as e, e as l, f as i, g as r, D as t, h as d, E as F, i as u, j as C, k as h, F as S, H as p, I as y, l as P, K as f, L as M, M as v, m as k, n as w, o as E, p as m, q as D, P as H, r as L, s as R, t as g, u as x, v as Q, w as T, Q as U, x as b, R as z, y as A, S as K, z as V, A as W, B as j, G as q, J as B, N as G, O as J, T as N, U as O, V as X, W as Y, X as Z, Y as _, Z as $ } from "./GeneratedIcons-eOaZDTB3.js";
|
|
2
2
|
export {
|
|
3
3
|
a as CameraIcon,
|
|
4
4
|
s as ChevronDownIcon,
|
|
5
5
|
c as ChevronLeftIcon,
|
|
6
6
|
I as ChevronRightIcon,
|
|
7
7
|
e as CloseIcon,
|
|
8
|
-
|
|
9
|
-
i as
|
|
8
|
+
l as ConsoleIcon,
|
|
9
|
+
i as CopyFilledIcon,
|
|
10
|
+
r as CopyIcon,
|
|
10
11
|
t as DoubleClickIcon,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
d as DownloadIcon,
|
|
13
|
+
F as EditIcon,
|
|
14
|
+
u as EmptyFolderIcon,
|
|
15
|
+
C as ExternalLinkIcon,
|
|
16
|
+
h as EyeHiddenIcon,
|
|
17
|
+
S as FilterIcon,
|
|
16
18
|
p as HideAppsIcon,
|
|
17
|
-
|
|
19
|
+
y as InfoFilledIcon,
|
|
20
|
+
P as InfoIcon,
|
|
21
|
+
f as KeyIcon,
|
|
18
22
|
M as LockIcon,
|
|
19
|
-
|
|
23
|
+
v as MenuIcon,
|
|
20
24
|
k as MinusIcon,
|
|
21
|
-
|
|
22
|
-
E as
|
|
23
|
-
m as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
R as
|
|
28
|
-
g as
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
b as
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
w as MoonFilledIcon,
|
|
26
|
+
E as MoonIcon,
|
|
27
|
+
m as MoreHorizontalIcon,
|
|
28
|
+
D as MoreIcon,
|
|
29
|
+
H as PauseFilledIcon,
|
|
30
|
+
L as PauseIcon,
|
|
31
|
+
R as PieChartIcon,
|
|
32
|
+
g as PlayFilledIcon,
|
|
33
|
+
x as PlayIcon,
|
|
34
|
+
Q as PlusIcon,
|
|
35
|
+
T as PowerIcon,
|
|
36
|
+
U as QuestionFilledIcon,
|
|
37
|
+
b as QuestionIcon,
|
|
38
|
+
z as RefreshIcon,
|
|
39
|
+
A as RevertIcon,
|
|
40
|
+
K as SaveIcon,
|
|
41
|
+
V as SearchIcon,
|
|
42
|
+
W as SettingsIcon,
|
|
43
|
+
j as StarFilledIcon,
|
|
44
|
+
q as StarIcon,
|
|
45
|
+
B as StopFilledIcon,
|
|
46
|
+
G as StopIcon,
|
|
47
|
+
J as SunFilledIcon,
|
|
48
|
+
N as SunIcon,
|
|
49
|
+
O as TrashFilledIcon,
|
|
50
|
+
X as TrashIcon,
|
|
51
|
+
Y as UnlockIcon,
|
|
52
|
+
Z as UserIcon,
|
|
53
|
+
_ as ViewIcon,
|
|
54
|
+
$ as WifiIcon
|
|
39
55
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var pt=Object.defineProperty;var ft=(e,t,r)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ne=(e,t,r)=>ft(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),X=require("./GeneratedIcons-DGITx4_M.cjs"),l=require("react"),ve=require("react-dom"),te=require("react-i18next"),ht=require("i18next"),mt=require("./clsx-C11secjj.cjs");function Ce({size:e="default",color:t,overlay:r=!1,className:s=""}){const o=n.jsx("svg",{className:`nc-activity-indicator nc-${e} ${s}`,viewBox:"0 0 50 50",style:t?{color:t}:void 0,children:n.jsx("circle",{className:"nc-activity-indicator-circle",cx:"25",cy:"25",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round"})});return r?n.jsx("div",{className:"nc-activity-indicator-overlay",children:o}):o}function J({variant:e="default",block:t,size:r="default",appearance:s="default",className:o,disabled:i,textSelectable:a,loading:c,onClick:d,children:p,...f}){const w=["nc-button",e!=="default"?`nc-${e}`:"",t?"nc-block":"",r==="small"?"nc-small":"",r==="large"?"nc-large":"",s==="transparent"?"nc-transparent":"",i||c?"nc-disabled":"",a?"nc-text-selectable":"",c?"nc-loading":"",o??""].filter(Boolean).join(" "),u=b=>{if(!c){if(a){const k=window.getSelection();if(k&&k.toString().length>0)return}d==null||d(b)}};return n.jsxs("button",{className:w,disabled:i||c,onClick:u,...f,children:[c&&n.jsx(Ce,{size:"small",className:"nc-button-spinner",color:s==="transparent"||e!=="default"&&e!=="ghost"?"white":void 0}),p]})}const gt={info:"primary",success:"success",warning:"warning",error:"danger",danger:"danger"};function bt({code:e,text:t,type:r,button:s,onAction:o,children:i,onClose:a,className:c="",style:d}){const p=i??n.jsxs(n.Fragment,{children:[e!==void 0&&n.jsx("span",{className:"nc-alert-code",children:e}),t]});return n.jsxs("div",{className:`nc-alert nc-${r} ${c}`.trim(),style:d,children:[n.jsxs("div",{className:"nc-alert-main",children:[n.jsx("div",{className:`nc-alert-message nc-${r}`,children:p}),a&&n.jsx("button",{type:"button",className:"nc-alert-close","aria-label":"Close alert",onClick:a,children:n.jsx(X.CloseIcon,{size:16})})]}),s&&n.jsx("span",{className:"nc-alert-action",children:n.jsx(J,{size:"small",variant:s.variant??gt[r],onClick:o,children:s.text})})]})}function xt({percentage:e=.5,status:t="discharging",darkMode:r=!1,colored:s=!1}){const o=Math.max(0,Math.min(1,Number(e)||0)),i=o===0?"-":String(Math.round(o*100));let a;s?o<.1?a="var(--nc-danger)":o<.2?a="var(--nc-warning)":a="var(--nc-success)":a=r?"rgba(255,255,255,0.35)":"#000000";const c="var(--nc-battery-shell-bg)",d=24,p=14,f=2,w=0,u=12,b=0,k=0,x=0,v=d,y=p,m=y-b*2,h=v-b*2,g=Math.max(1,Math.min(4,y/4)),N=o===0?0:.05+o*.95,A=d+f+u,$=20,L=.65,S=Math.max(p,$*L),T=d+f+1,j=(p-$*L)/2;return n.jsxs("svg",{className:"nc-battery",width:A,height:S,viewBox:`0 0 ${A} ${S}`,role:"img","aria-label":`Battery ${i==="-"?"-":`${i}%`} ${t}`,children:[n.jsx("defs",{children:n.jsx("mask",{id:`nc-battery-fill-mask-${o}`,children:n.jsx("rect",{x:"0",y:"0",width:h*N,height:m,fill:"white"})})}),n.jsx("rect",{x:k,y:x,rx:g,ry:g,width:v,height:y,fill:c}),n.jsx("rect",{x:k+b,y:x+b,width:h,height:m,fill:a,rx:g,ry:g,mask:`url(#nc-battery-fill-mask-${o})`}),n.jsx("text",{x:k+v/2,y:p-3,fontSize:11,fontWeight:"bold",fill:"var(--nc-battery-text-contrast)",textAnchor:"middle",children:i}),n.jsx("rect",{x:d+w,y:p*.26,width:f,height:p*.48,rx:.8,ry:.8,fill:o===1?a:c}),t==="charging"?n.jsx("g",{transform:`translate(${T}, ${j}) scale(${L})`,fill:a,children:n.jsx("path",{d:"M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z"})}):null]})}function vt({value:e,onChange:t,options:r,disabled:s,size:o="default"}){return n.jsx("div",{className:`nc-button-group ${o==="small"?"nc-small":o==="tiny"?"nc-tiny":""}`,children:r.map(i=>{const a=s||!!i.disabled;return n.jsx("button",{type:"button",className:`nc-button-group-item ${e===i.key?"nc-active":""}`,onClick:()=>!a&&t(i.key),disabled:a,children:i.label},i.key)})})}function wt({size:e}){return n.jsx("svg",{className:`nc-checkbox-icon ${e==="small"?"nc-small":e==="tiny"?"nc-tiny":""}`,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M2 6L5 9L10 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function yt({checked:e,onChange:t,disabled:r,label:s,size:o="default",labelColor:i,style:a,className:c=""}){const d=o==="small",p=o==="tiny";return n.jsxs("label",{className:`nc-checkbox-label ${d?"nc-small":""} ${p?"nc-tiny":""} ${r?"nc-disabled":""} ${c}`.trim(),style:a,onClick:f=>{r||(f.preventDefault(),t(!e))},children:[n.jsx("span",{role:"checkbox","aria-checked":e,tabIndex:0,className:`nc-checkbox-box ${d?"nc-small":""} ${p?"nc-tiny":""} ${e?"nc-checked":""}`,onKeyDown:f=>{r||(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),t(!e))},children:e&&n.jsx(wt,{size:o})}),s&&n.jsx("span",{className:"nc-checkbox-text",style:i?{color:i}:void 0,children:s})]})}function jt({option:e,onChange:t,selected:r,highlighted:s,small:o,renderOption:i,index:a}){const c=l.useRef(null),{t:d}=te.useTranslation(),p=e.disabled===!0;return l.useEffect(()=>{s&&c.current&&c.current.scrollIntoView({block:"nearest"})},[s]),n.jsx("div",{ref:c,className:`nc-combo-dropdown-option ${o?"nc-small":""} ${s?"nc-highlighted":""} ${p?"nc-disabled":""}`,role:"option",onClick:()=>{p||t(e.value,e.label)},"aria-selected":r,"aria-disabled":p,style:{cursor:p?"default":"pointer",opacity:p?.4:void 0,background:s&&!p?"rgba(59,130,246,0.18)":r&&!p?"rgba(59,130,246,0.12)":void 0},children:i?i(e,a,!!s):n.jsxs(n.Fragment,{children:[e.label,e.default&&n.jsxs("span",{style:{fontSize:"0.85em",color:"var(--nc-text-weak)",marginLeft:6},children:["(",d("common.default"),")"]})]})})}function kt({isOpen:e,options:t,onSelect:r,selectedValue:s,placement:o="bottom",anchorRef:i,small:a,highlightedIndex:c=-1,renderOption:d}){const[p,f]=l.useState({top:0,left:0,width:0}),[w,u]=l.useState(o),{t:b}=te.useTranslation();if(l.useEffect(()=>{if(e&&i.current){const x=i.current.getBoundingClientRect();let v=o;if(o==="bottom"){const y=window.innerHeight-x.bottom,m=x.top;y<320&&m>y&&(v="top")}u(v),f({top:v==="top"?x.top-4:x.bottom+4,left:x.left,width:x.width})}},[e,i,o]),!e)return null;const k=n.jsx("div",{className:"nc-combo-dropdown",onMouseDown:x=>x.stopPropagation(),style:{position:"fixed",top:w==="top"?void 0:p.top,bottom:w==="top"?window.innerHeight-p.top:void 0,left:p.left,width:p.width,zIndex:1e3,maxHeight:300,overflowY:"auto"},children:t.length===0?n.jsx("div",{className:`nc-combo-dropdown-option nc-no-results ${a?"nc-small":""}`,children:b("common.noResults")}):t.map((x,v)=>n.jsx(jt,{option:x,onChange:r,selected:x.value===s,highlighted:v===c,small:a,renderOption:d,index:v},x.value))});return ve.createPortal(k,document.body)}function Nt({onClick:e,small:t}){return n.jsx("span",{role:"button",tabIndex:0,className:`nc-combo-button nc-combo-clear ${t?"nc-small":""}`,onClick:r=>{r.stopPropagation(),e()},onMouseDown:r=>r.stopPropagation(),onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation(),e())},"aria-label":"Clear selection",children:"✕"})}function St({open:e,small:t}){return n.jsx("span",{"aria-hidden":!0,className:`nc-combo-button nc-combo-toggle ${t?"nc-small":""} ${e?"nc-open":""}`,children:"▾"})}function At({value:e,onChange:t,placeholder:r="Select…",options:s,candidates:o,renderOption:i,renderSelected:a,selectedOption:c,disabled:d,label:p,clearable:f=!0,allowTyping:w=!1,placement:u="bottom",size:b="default",appearance:k="default",textAlign:x="left",style:v,className:y}){const[m,h]=l.useState(!1),[g,N]=l.useState(""),[A,$]=l.useState(-1),L=l.useRef(null),S=l.useRef(null),T=l.useRef(null),j=b==="small",{t:C}=te.useTranslation(),P=!!o,V=w||P,[M,E]=l.useState([]),[D,K]=l.useState(()=>{if(s&&e){const I=s.find(H=>H.value===e);return I?I.label:""}return o&&e?e:""});l.useEffect(()=>{if(!e){K("");return}if(s){const I=s.find(H=>H.value===e);I&&K(I.label)}else o&&K(e)},[e,s,o]);const W=(I,H=!1)=>{if(!o)return;T.current&&clearTimeout(T.current);const z=async()=>{try{const Y=await o(I);E(Y),$(-1)}catch{E([])}};H?z():T.current=setTimeout(z,200)},G=l.useMemo(()=>{if(P)return M;const I=g.toLowerCase();return V?(s||[]).filter(H=>H.label.toLowerCase().includes(I)):s||[]},[s,g,V,P,M]);l.useEffect(()=>{m&&$(-1)},[m,G]),l.useEffect(()=>{if(!f&&!e&&s&&s.length>0&&t){const I=s.find(H=>H.default)||s[0];t(I.value)}},[f,e,s,t]),l.useEffect(()=>{function I(H){var z;H.target instanceof Node&&L.current&&((z=L.current.parentElement)!=null&&z.contains(H.target)||h(!1))}return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]);const B=c??(s?s.find(I=>I.value===e):e?{label:D,value:e}:void 0),_=B&&f,oe=!d&&!_,de=`nc-align-${x}`,fe=!(m&&V)&&!!B,ie=(I,H,z=!1)=>{var Y;K(H),t==null||t(I),h(!1),N(""),z&&((Y=L.current)==null||Y.blur())},he=()=>{t==null||t(void 0),N(""),h(!1)},me=I=>{if(!m){(I.key==="ArrowDown"||I.key==="ArrowUp")&&(h(!0),I.preventDefault());return}const H=(z,Y)=>{if(Y===1){for(let F=z;F<G.length;F++)if(!G[F].disabled)return F;for(let F=0;F<z;F++)if(!G[F].disabled)return F}else{for(let F=z;F>=0;F--)if(!G[F].disabled)return F;for(let F=G.length-1;F>z;F--)if(!G[F].disabled)return F}return z};switch(I.key){case"ArrowDown":I.preventDefault(),$(z=>{const Y=z+1,F=Y>=G.length?0:Y;return H(F,1)});break;case"ArrowUp":I.preventDefault(),$(z=>{const Y=z-1,F=Y<0?G.length-1:Y;return H(F,-1)});break;case"Enter":I.preventDefault(),A>=0&&A<G.length&&!G[A].disabled&&ie(G[A].value,G[A].label,!0);break;case"Escape":I.preventDefault(),h(!1),N("");break}};return n.jsxs("div",{className:`nc-combo-container ${k==="transparent"?"nc-transparent":""} ${k==="plain"?"nc-plain":""} ${m?"nc-open":""} ${de} ${y||""}`.trim(),style:{position:"relative",...v},children:[p&&n.jsx("span",{className:`nc-label ${j?"nc-small":""}`,children:p}),n.jsxs("div",{ref:S,style:{position:"relative",display:"flex",alignItems:"center"},onMouseDown:I=>{if(d||V&&I.target===L.current)return;const H=!m;if(h(z=>(!z&&V&&B&&N(B.label),!z)),P&&H){const z=V&&B?B.label:"";E([]),setTimeout(()=>W(z,!0),0)}V&&!m&&setTimeout(()=>{var z,Y;(z=L.current)==null||z.focus(),(Y=L.current)==null||Y.select()},0)},children:[n.jsx("input",{ref:L,className:`nc-input ${j?"nc-small":""}`,placeholder:r,onFocus:()=>{if(!d&&V){h(!0);const I=B?B.label:"";B&&(N(I),setTimeout(()=>{var H;return(H=L.current)==null?void 0:H.select()},0)),P&&(E([]),W(I,!0))}},onChange:I=>{const H=I.target.value;V&&(N(H),P&&W(H))},onKeyDown:me,value:m&&V?g:(B==null?void 0:B.label)||"",readOnly:d||!V,style:{width:"100%",paddingRight:oe||_?j?32:44:12,caretColor:w?void 0:"transparent",cursor:w?void 0:"pointer",userSelect:w?void 0:"none",color:fe?"transparent":"var(--nc-text)"}}),fe&&n.jsx("div",{"aria-hidden":!0,className:`nc-combo-overlay ${de}`,style:{position:"absolute",left:j?8:12,right:oe||_?j?12:24:j?8:12,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",display:"flex",alignItems:"center",gap:6},children:a&&B?a(B):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:`nc-combo-overlay-text ${j?"nc-small":""}`,children:B==null?void 0:B.label}),(B==null?void 0:B.default)&&n.jsxs("span",{className:`nc-combo-overlay-default ${j?"nc-small":""}`,children:["(",C("common.default"),")"]})]})}),_&&n.jsx(Nt,{onClick:he,small:j}),oe&&n.jsx(St,{open:m,small:j})]}),n.jsx(kt,{isOpen:m,options:G,onSelect:ie,selectedValue:e,placement:u,anchorRef:S,small:j,highlightedIndex:A,renderOption:i})]})}function Ct({onClick:e,loading:t=!1,disabled:r=!1,size:s="default",title:o,"aria-label":i}){const a=s==="small"?14:s==="large"?20:18,c=t?"Refreshing...":"Refresh",d=t?"Refreshing":"Refresh";return n.jsx("button",{className:"nc-icon-button",onClick:e,disabled:r||t,title:o??c,"aria-label":i??d,"data-size":s,children:n.jsx(X.RefreshIcon,{size:a,className:t?"nc-spinning":""})})}function Re({onClick:e,disabled:t=!1,size:r="default",title:s="Close","aria-label":o="Close"}){const i=r==="small"?14:r==="large"?20:18;return n.jsx("button",{className:"nc-icon-button nc-icon-button-close",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":r,children:n.jsx(X.CloseIcon,{size:i})})}function Rt({onClick:e,disabled:t=!1,size:r="default",title:s="Edit","aria-label":o="Edit"}){const i=r==="small"?14:r==="large"?20:18;return n.jsx("button",{className:"nc-icon-button nc-icon-button-edit",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":r,children:n.jsx(X.EditIcon,{size:i})})}function Mt({onClick:e,disabled:t=!1,size:r="default",title:s="Delete","aria-label":o="Delete"}){const i=r==="small"?14:r==="large"?20:18;return n.jsx("button",{className:"nc-icon-button nc-icon-button-trash",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":r,children:n.jsx(X.TrashIcon,{size:i})})}function It({onClick:e,disabled:t=!1,children:r,title:s,"aria-label":o,size:i="default"}){return n.jsx("button",{className:"nc-hyperlink",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":i,children:r})}function Et({open:e,onClose:t,options:r,anchorRef:s,anchor:o,preferredDirection:i="down"}){const a=l.useRef(null),[c,d]=l.useState({top:0,left:0}),p=o||(s==null?void 0:s.current);if(l.useEffect(()=>{if(!e||!p||!a.current)return;const u=p.getBoundingClientRect(),b=a.current.getBoundingClientRect(),k=window.innerHeight,x=window.innerWidth,v=u.bottom+8,y=v+b.height<=k-8;let m=i;(!y&&i==="down"||i==="up"&&y)&&(m="up");let h;m==="down"?h=v:h=u.top-b.height-8;let g=u.left;g+b.width>x-8&&(g=u.right-b.width),d({top:Math.max(8,h),left:Math.max(8,g)})},[e,p,i]),l.useEffect(()=>{if(!e)return;const u=k=>{a.current&&!a.current.contains(k.target)&&p&&!p.contains(k.target)&&t()},b=k=>{k.key==="Escape"&&t()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",b)}},[e,t,p]),!e)return null;const f=u=>{u.type!=="separator"&&!u.disabled&&u.onClick&&(u.onClick(),t())},w=r.some(u=>u.icon);return ve.createPortal(n.jsx("div",{ref:a,className:"nc-context-menu",style:{position:"fixed",top:`${c.top}px`,left:`${c.left}px`,zIndex:1e4},role:"menu",children:r.map(u=>{if(u.type==="separator")return n.jsx("div",{className:"nc-context-menu-separator",role:"separator"},u.id);const b=["nc-context-menu-item",u.variant&&u.variant!=="default"?`nc-${u.variant}`:"",u.disabled?"nc-disabled":"",w&&!u.icon?"nc-indented":""].filter(Boolean).join(" ");return n.jsxs("button",{className:b,onClick:()=>f(u),disabled:u.disabled,role:"menuitem",children:[u.icon&&n.jsx("span",{className:"nc-context-menu-icon",children:u.icon}),n.jsx("span",{className:"nc-context-menu-label",children:u.label})]},u.id)})}),document.body)}const Ue=l.createContext(null);function qe(){const e=l.useContext(Ue);if(!e)throw new Error("useDialog must be used inside a Dialog component");return e}function ce({children:e,onClick:t,...r}){const{close:s}=qe(),{t:o}=te.useTranslation(),i=a=>{t==null||t(a),s()};return n.jsx(J,{onClick:i,...r,children:e??o("common.close")})}function $t({open:e,onClose:t,title:r,children:s,style:o,footerType:i="ok-cancel",footer:a,onOk:c,onSave:d,onDelete:p,onCancel:f,onConnect:w,closeOnOverlay:u=!0,primaryDisabled:b=!1,fullScreen:k=!1,hideTitleBar:x=!1,className:v="",onContentHeightChange:y}){const m=l.useRef(null),h=l.useRef(null),{t:g}=te.useTranslation(),N={close:t},A=S=>{u&&S.target===S.currentTarget&&t()};if(l.useEffect(()=>{e&&m.current&&m.current.focus()},[e]),l.useEffect(()=>{if(!y||!h.current)return;const S=new ResizeObserver(T=>{for(const j of T){const C=j.contentRect.height;y(C)}});return S.observe(h.current),()=>{S.disconnect()}},[y]),!e)return null;const $=()=>{switch(i){case"ok":return n.jsx("div",{className:"nc-dialog-footer",children:n.jsx(J,{variant:"primary",onClick:c??t,disabled:b,children:g("common.ok")})});case"ok-cancel":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"primary",onClick:c??t,disabled:b,children:g("common.ok")})]});case"save-cancel":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"primary",onClick:d,disabled:b,children:g("common.save")})]});case"delete-cancel":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"danger",onClick:p,disabled:b,children:g("common.delete")})]});case"connect":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"primary",onClick:w,disabled:b,children:g("common.connect")})]});case"close":return n.jsx("div",{className:"nc-dialog-footer",children:n.jsx(ce,{variant:"primary"})});case"gotit":return n.jsx("div",{className:"nc-dialog-footer",children:n.jsx(ce,{variant:"primary",children:g("common.gotit")})});case"custom":return n.jsx("div",{className:"nc-dialog-footer",children:a});case"none":return null;default:return null}},L=n.jsx(Ue.Provider,{value:N,children:n.jsx("div",{className:`nc-dialog-overlay${k?" nc-fullscreen":""}`,onClick:A,children:n.jsxs("div",{ref:m,className:`nc-dialog-container ${v}`,style:o,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":x?void 0:"nc-dialog-title",children:[!x&&n.jsxs("div",{className:"nc-dialog-header",children:[n.jsx("h3",{id:"nc-dialog-title",className:"nc-dialog-title",children:r}),n.jsx(Re,{onClick:t,"aria-label":"Close dialog"})]}),n.jsx("div",{ref:h,className:"nc-dialog-content",children:s}),$()]})})});return k?ve.createPortal(L,document.body):L}function Tt({onClick:e,size:t="default",rightOffset:r=4}){const s=t==="small"?28:34;return n.jsx("button",{className:"nc-button nc-ghost",onClick:e,onMouseDown:o=>{o.preventDefault(),o.stopPropagation()},tabIndex:-1,"aria-label":"Clear input",style:{position:"absolute",right:r,padding:0,minHeight:0,height:s,width:s,border:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:t==="small"?"12px":"14px"},children:"✕"})}function Pt({visible:e,onClick:t,size:r="default"}){const s=r==="small"?28:34,o=r==="small"?16:18;return n.jsx("button",{className:"nc-button nc-ghost",onClick:t,onMouseDown:i=>{i.preventDefault(),i.stopPropagation()},tabIndex:-1,"aria-label":e?"Hide password":"Show password",style:{position:"absolute",right:4,padding:0,minHeight:0,height:s,width:s,border:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:e?n.jsx(X.EyeHiddenIcon,{size:o}):n.jsx(X.ViewIcon,{size:o})})}function Lt({value:e,defaultValue:t="",onChange:r,onChangeConfirmed:s,onEnter:o,onClear:i,placeholder:a,disabled:c,label:d,clearable:p=!0,type:f="text",className:w="",size:u="default",appearance:b="default",style:k,leadingIcon:x,showPasswordToggle:v=!1,multiline:y=!1,rows:m=3,validator:h,showErrorMessage:g=!0}){const N=l.useRef(null),A=l.useRef(null),$=l.useRef(!1),[L,S]=l.useState(!1),[T,j]=l.useState(!1),[C,P]=l.useState(!1),V=e!==void 0,[M,E]=l.useState(t),D=V?e:M,[K,W]=l.useState(D),G=h?h(D):null,B=!!G,_=!y&&b==="plain",oe=_&&T,de=oe?K:D;l.useEffect(()=>{oe||W(D)},[D,oe]);const fe=f==="password",ie=fe&&v&&!c&&!y,he=p&&de&&!c&&(T||C),me=u==="small"?32:44;let I=12;he&&ie?I=me*2:(he||ie)&&(I=me);const z=x?u==="small"?28:34:void 0,Y=()=>{if(!_)return D;const U=K!==D;return V||E(K),U&&(r==null||r(K),s==null||s(K)),K},F=()=>{W(D)},ut=()=>{var U,Z,We;if(_){W(""),i==null||i(),(U=N.current)==null||U.focus();return}V||E(""),r==null||r(""),i==null||i(),y?(Z=A.current)==null||Z.focus():(We=N.current)==null||We.focus()},Le=U=>{if(_&&U.key==="Escape"){U.preventDefault(),$.current=!0,F(),U.currentTarget.blur();return}if(U.key==="Enter"&&!y){const Z=_?Y():D;_&&(U.preventDefault(),$.current=!0,U.currentTarget.blur()),o==null||o(Z)}},Be=U=>{const Z=U.target.value;if(_){W(Z),r==null||r(Z);return}V||E(Z),r==null||r(Z)},ze=()=>{j(!0),_&&W(D)},De=()=>{if(_&&$.current){$.current=!1,j(!1);return}_&&Y(),j(!1)},Ve=`nc-input ${u==="small"?"nc-small ":""}${!y&&b==="plain"?"nc-plain ":""}${B?"nc-error ":""}${w}`;return n.jsxs("div",{className:"nc-col",style:{position:"relative",flex:1,...k},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[d&&n.jsx("span",{className:"nc-label",children:d}),n.jsxs("div",{style:{position:"relative",display:"flex",alignItems:y?"flex-start":"center"},children:[x&&n.jsx("span",{className:"nc-input-leading-icon",style:{height:y?void 0:"100%",top:y?10:void 0},children:x}),y?n.jsx("textarea",{ref:A,className:Ve,placeholder:a,value:de,onChange:Be,onKeyDown:Le,onFocus:ze,onBlur:De,readOnly:c,"aria-disabled":c,tabIndex:c?-1:void 0,rows:m,style:{width:"100%",paddingRight:I,...z!==void 0?{paddingLeft:z}:{}}}):n.jsx("input",{ref:N,type:fe&&L?"text":f,className:Ve,placeholder:a,value:de,onChange:Be,onKeyDown:Le,onFocus:ze,onBlur:De,readOnly:c,"aria-disabled":c,tabIndex:c?-1:void 0,style:{width:"100%",paddingRight:I,...z!==void 0?{paddingLeft:z}:{}}}),he&&n.jsx(Tt,{onClick:ut,size:u,rightOffset:ie?me+4:4}),ie&&n.jsx(Pt,{visible:L,onClick:()=>S(!L),size:u})]}),B&&g&&n.jsx("span",{className:"nc-error-message",children:G})]})}function Bt({children:e,onClick:t,showBorder:r=!0,selectable:s=!1,style:o}){const[i,a]=l.useState(!1),c=d=>{if(t){if(s){const p=window.getSelection();if(p&&p.toString().length>0)return}t(d)}};return n.jsx("div",{onClick:c,onMouseDown:()=>t&&a(!0),onMouseUp:()=>a(!1),onMouseLeave:()=>a(!1),style:{cursor:t?"pointer":"default",userSelect:s?"text":void 0,borderBottom:r?void 0:"none",...o},className:`nc-list-group-item ${t?"nc-list-group-item-clickable":""} ${i?"nc-list-group-item-active":""}`,children:n.jsx("div",{style:{flex:1},children:e})})}function zt({title:e,titleTools:t,children:r,style:s}){return n.jsxs("div",{className:"nc-list-group",style:s,children:[(e||t)&&n.jsxs("div",{className:"nc-list-group-title",children:[n.jsx("div",{children:e}),t&&n.jsx("div",{className:"nc-list-group-title-tools",children:t})]}),n.jsx("div",{className:"nc-list-group-content",children:r})]})}function Dt({values:e,onChange:t,options:r,placeholder:s="Select…",label:o}){const[i,a]=l.useState(!1),[c,d]=l.useState(""),p=l.useRef(null),f=l.useMemo(()=>r.filter(u=>u.label.toLowerCase().includes(c.toLowerCase())),[r,c]);l.useEffect(()=>{function u(b){!(b.target instanceof Node)||!p.current||p.current.contains(b.target)||a(!1)}return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const w=u=>{e.includes(u)?t(e.filter(b=>b!==u)):t([...e,u])};return n.jsxs("div",{ref:p,className:"nc-col",style:{position:"relative"},children:[o&&n.jsx("span",{className:"nc-label",children:o}),n.jsxs("div",{className:"nc-row",style:{flexWrap:"wrap",gap:6,minHeight:42,alignItems:"center",border:"1px solid var(--nc-button-border)",borderRadius:8,background:"var(--nc-button-bg)",padding:"4px 8px"},children:[e.length===0&&n.jsx("span",{className:"nc-label",children:s}),e.map(u=>{const b=r.find(k=>k.value===u);return b?n.jsxs("span",{style:{padding:"4px 8px",borderRadius:6,display:"inline-flex",alignItems:"center",gap:4,background:"var(--nc-button-bg)",border:"1px solid var(--nc-button-border)"},children:[b.label,n.jsx("button",{className:"nc-button nc-ghost",style:{padding:0,minHeight:0,height:20,width:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none"},onClick:()=>w(u),"aria-label":`Remove ${b.label}`,children:"✕"})]},u):null}),n.jsx("input",{className:"nc-input",value:c,onChange:u=>d(u.target.value),onFocus:()=>a(!0),style:{minWidth:50,border:"none",background:"transparent",padding:4,minHeight:32,flex:1}})]}),i&&n.jsxs("div",{className:"nc-combo-dropdown",style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,marginTop:4,boxShadow:"0 4px 12px var(--nc-shadow)"},children:[f.map(u=>{const b=e.includes(u.value);return n.jsxs("div",{className:"nc-section nc-row",style:{justifyContent:"space-between",cursor:"pointer",padding:12},onMouseDown:()=>w(u.value),children:[n.jsx("span",{children:u.label}),n.jsx("span",{children:b?"✔️":""})]},u.value)}),f.length===0&&n.jsx("div",{className:"nc-section nc-label",children:"No results"})]})]})}function we(e){if(!e)return null;const t=/^\d{2}-\d{1,2}$/,r=/^\d{4}-\d{1,2}$/;if(!t.test(e)&&!r.test(e))return"Format must be YY-M(M) or YYYY-M(M)";const s=e.split("-"),o=parseInt(s[1],10);return o<1||o>12?"Month must be between 1 and 12":null}function xe(e){if(!e)return"";const t=e.split("-");if(t.length!==2)return e;let r=t[0];const s=t[1].padStart(2,"0");if(r.length===2){const o=parseInt(r,10);r=String(o<50?2e3+o:1900+o)}return`${r}-${s}`}function He(e){if(!e)return"";const t=xe(e);if(!/^\d{4}-\d{2}$/.test(t))return e;const[r,s]=t.split("-");return`${r}/${s}`}function Fe(){const e=new Date,t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0");return`${t}-${r}`}function Vt({startMonth:e,endMonth:t,onChange:r,label:s,className:o="",disabled:i=!1,size:a="default"}){const[c,d]=l.useState(!1),[p,f]=l.useState(""),[w,u]=l.useState(""),[b,k]=l.useState({top:0,left:0,width:0,right:void 0}),x=l.useRef(null),v=l.useRef(null);l.useEffect(()=>{if(c&&x.current){const j=x.current.getBoundingClientRect(),P=Math.max(j.width,400);window.innerWidth-j.left<P&&j.right>=P?k({top:j.bottom+4,left:0,right:window.innerWidth-j.right,width:P}):k({top:j.bottom+4,left:j.left,right:void 0,width:P})}},[c]),l.useEffect(()=>{if(!c)return;const j=C=>{x.current&&!x.current.contains(C.target)&&v.current&&!v.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[c]);const y=()=>{f(e||Fe()),u(t||Fe()),d(!0)},m=()=>{d(!1)},h=()=>{const j=we(p),C=we(w);if(j||C)return;const P=xe(p),V=xe(w);P&&V&&(r==null||r(P,V)),d(!1)},g=e&&t?`${He(e)} - ${He(t)}`:"Select month range",N=we(p),A=we(w),$=xe(p),L=xe(w),S=$&&L&&$>L,T=c?ve.createPortal(n.jsx("div",{ref:v,className:"nc-month-range-picker-popup",style:{position:"fixed",top:b.top,...b.right!==void 0?{right:b.right}:{left:b.left},width:b.width,zIndex:1e3},children:n.jsxs("div",{className:"nc-month-range-picker-content",children:[n.jsxs("div",{className:"nc-month-range-picker-row",children:[n.jsxs("div",{className:"nc-month-range-picker-column",children:[n.jsx("label",{className:"nc-label",children:"Start Month"}),n.jsx("input",{type:"text",className:`nc-month-input ${N?"nc-error":""}`,value:p,onChange:j=>f(j.target.value),placeholder:"YY-M(M) or YYYY-M(M)"}),N&&n.jsx("div",{className:"nc-month-error-text",children:N})]}),n.jsxs("div",{className:"nc-month-range-picker-column",children:[n.jsx("label",{className:"nc-label",children:"End Month"}),n.jsx("input",{type:"text",className:`nc-month-input ${A?"nc-error":""}`,value:w,onChange:j=>u(j.target.value),placeholder:"YY-M(M) or YYYY-M(M)"}),A&&n.jsx("div",{className:"nc-month-error-text",children:A})]})]}),S&&!N&&!A&&n.jsx("div",{className:"nc-month-range-error",children:"End month must be after or equal to start month"}),n.jsxs("div",{className:"nc-month-range-picker-footer",children:[n.jsx(J,{variant:"primary",onClick:h,disabled:!p||!w||!!N||!!A||!!S,children:"Apply"}),n.jsx(J,{variant:"ghost",onClick:m,children:"Cancel"})]})]})}),document.body):null;return n.jsxs("div",{className:`nc-month-range-picker ${a==="small"?"nc-small ":""}${o}`,children:[s&&n.jsx("label",{className:`nc-label${a==="small"?" nc-small":""}`,children:s}),n.jsx("button",{ref:x,className:`nc-month-range-picker-input${a==="small"?" nc-small":""}`,onClick:y,disabled:i,children:g}),T]})}const Wt=5,Ht=3;function Ft({value:e,onChange:t,min:r,max:s,step:o=1,label:i,disabled:a,className:c="",style:d,size:p="default"}){const f=p==="small",w=(String(o).split(".")[1]||"").length,u=l.useRef(null),b=l.useRef(!1),k=l.useRef(null),[x,v]=l.useState(!1),[y,m]=l.useState(()=>String(e)),h=M=>parseFloat(M.toFixed(w)),g=M=>{const E=h(M);m(String(E)),t(E)},N=()=>{const M=e-o;r!==void 0&&M<r||g(parseFloat(M.toFixed(10)))},A=()=>{const M=e+o;s!==void 0&&M>s||g(parseFloat(M.toFixed(10)))},$=M=>{const E=M.target.value;if(m(E),E==="")return;const D=parseFloat(E);isNaN(D)||t(D)},L=()=>{const M=y;if(M===""){g(r!==void 0?r:0);return}const E=parseFloat(M);if(isNaN(E)){g(r!==void 0?r:0);return}let D=h(E);r!==void 0&&(D=Math.max(r,D)),s!==void 0&&(D=Math.min(s,D)),D!==E?g(D):m(String(D))},S=M=>{a||M.button!==0||(b.current=!1,u.current={startY:M.clientY,startValue:e,pointerId:M.pointerId,hasMoved:!1,lastValue:e},k.current=setTimeout(()=>{b.current=!0,v(!0)},200),M.currentTarget.setPointerCapture(M.pointerId))},T=M=>{const E=u.current;if(!E||E.pointerId!==M.pointerId)return;const D=E.startY-M.clientY;if(Math.abs(D)>=Ht&&(E.hasMoved=!0,b.current=!0,k.current&&(clearTimeout(k.current),k.current=null),v(!0)),!E.hasMoved)return;const K=Math.trunc(D/Wt);let W=E.startValue+K*o;r!==void 0&&(W=Math.max(r,W)),s!==void 0&&(W=Math.min(s,W)),W=h(W),W!==E.lastValue&&(E.lastValue=W,m(String(W)),t(W))},j=M=>{const E=u.current;!E||E.pointerId!==M.pointerId||(k.current&&(clearTimeout(k.current),k.current=null),M.currentTarget.hasPointerCapture(M.pointerId)&&M.currentTarget.releasePointerCapture(M.pointerId),u.current=null,v(!1))},C=M=>E=>{if(b.current){b.current=!1,E.preventDefault();return}M()},P=y===""?NaN:parseFloat(y),V=y===""||isNaN(P)||r!==void 0&&P<r||s!==void 0&&P>s;return n.jsxs("div",{className:`nc-col nc-number-input-col ${f?"nc-small":""}`,children:[i&&n.jsx("span",{className:`nc-label ${f?"nc-small":""}`,children:i}),n.jsxs("div",{className:`nc-number-input-container ${f?"nc-small":""} ${c}`,style:d,children:[n.jsx("input",{className:`nc-input nc-number-input ${f?"nc-small":""} ${V?"nc-error":""}`,type:"number",value:y,onChange:$,onBlur:L,min:r,max:s,step:o,disabled:a}),n.jsxs("div",{className:`nc-number-input-spinners ${f?"nc-small":""} ${a?"nc-disabled":""} ${x?"nc-dragging":""}`,children:[n.jsx("button",{className:`nc-number-input-spin nc-number-input-spin-up ${f?"nc-small":""}`,onClick:C(A),onPointerDown:S,onPointerMove:T,onPointerUp:j,onPointerCancel:j,disabled:a||s!==void 0&&e>=s,tabIndex:-1,children:"▲"}),n.jsx("button",{className:`nc-number-input-spin nc-number-input-spin-down ${f?"nc-small":""}`,onClick:C(N),onPointerDown:S,onPointerMove:T,onPointerUp:j,onPointerCancel:j,disabled:a||r!==void 0&&e<=r,tabIndex:-1,children:"▼"})]})]})]})}function Ot({value:e,onChange:t,min:r=0,max:s=100,step:o=1,label:i,disabled:a,showValue:c=!0,formatValue:d=f=>f.toString(),width:p=200}){const f=u=>{const b=parseFloat(u.target.value);t(b)},w=(e-r)/(s-r)*100;return n.jsxs("div",{className:"nc-col",style:{gap:6},children:[i&&n.jsx("span",{className:"nc-label",children:i}),n.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[n.jsx("input",{type:"range",className:"nc-slider",value:e,onChange:f,min:r,max:s,step:o,disabled:a,style:{width:p,"--nc-slider-percentage":`${w}%`}}),c&&n.jsx("span",{style:{color:"var(--nc-text)",fontFamily:"monospace",fontSize:14,minWidth:60,textAlign:"right"},children:d(e)})]})]})}const Gt=({size:e=24,className:t,style:r})=>n.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:t,style:r,children:n.jsx("polyline",{points:"18 15 12 9 6 15"})});function Xe({children:e,className:t="",style:r}){return n.jsx("div",{className:`nc-tab-panel ${t}`,style:r,children:e})}function Yt({active:e,children:t,keepMounted:r=!1,className:s="",style:o}){const i=l.Children.toArray(t).filter(c=>l.isValidElement(c)&&(c.type===Xe||c.type.displayName==="TabPanel"));if(r)return n.jsx("div",{className:`nc-tab-panels ${s}`,style:o,children:i.map(c=>{const d=c.props.tab===e;return n.jsx("div",{className:`nc-tab-panel-wrapper ${d?"nc-active":""}`,style:{display:d?void 0:"none"},"aria-hidden":!d,children:c},c.props.tab)})});const a=i.find(c=>c.props.tab===e);return n.jsx("div",{className:`nc-tab-panels ${s}`,style:o,children:a})}function Kt({tabs:e,active:t,onChange:r,onClose:s,permanentTabs:o,className:i,toolbar:a,multiline:c,orientation:d="horizontal",style:p}){const f=l.useRef(null),[w,u]=l.useState(!1),[b,k]=l.useState(!1),x=d==="verticalLeft"||d==="verticalRight",v=l.useRef(!1),y=l.useRef(0),m=l.useRef(0),h=l.useRef(!1);l.useEffect(()=>{const S=()=>{if(f.current)if(x){const{scrollTop:j,scrollHeight:C,clientHeight:P}=f.current;u(j>1),k(j<C-P-1)}else{const{scrollLeft:j,scrollWidth:C,clientWidth:P}=f.current;u(j>1),k(j<C-P-1)}},T=f.current;if(T)return S(),T.addEventListener("scroll",S),window.addEventListener("resize",S),()=>{T.removeEventListener("scroll",S),window.removeEventListener("resize",S)}},[e,x]);const g=S=>{f.current&&(v.current=!0,h.current=!1,y.current=x?S.clientY:S.clientX,m.current=x?f.current.scrollTop:f.current.scrollLeft,f.current.style.cursor="grabbing",f.current.style.userSelect="none")},N=S=>{if(!v.current||!f.current)return;const T=x?S.clientY:S.clientX,j=y.current-T;Math.abs(j)>3&&(h.current=!0),x?f.current.scrollTop=m.current+j:f.current.scrollLeft=m.current+j},A=()=>{f.current&&(v.current=!1,f.current.style.cursor="",f.current.style.userSelect="")},$=()=>{A()};l.useEffect(()=>{const S=f.current;if(!S||x)return;const T=j=>{j.deltaY!==0&&(j.preventDefault(),S.scrollLeft+=j.deltaY*.3)};return S.addEventListener("wheel",T,{passive:!1}),()=>{S.removeEventListener("wheel",T)}},[x]);const L=S=>{h.current||r(S)};return n.jsxs("div",{className:`nc-tab-container ${x?`nc-vertical nc-${d}`:""} ${i||""}`,style:p,children:[n.jsxs("div",{className:"nc-tab-scroll-wrapper",children:[w&&n.jsx("div",{className:`nc-tab-scroll-indicator ${x?"nc-top":"nc-left"}`,children:x?n.jsx(Gt,{size:16}):n.jsx(X.ChevronLeftIcon,{size:16})}),n.jsx("div",{ref:f,className:`nc-tab-scroll ${c?"nc-multiline":""}`,onMouseDown:g,onMouseMove:N,onMouseUp:A,onMouseLeave:$,style:{cursor:"grab"},children:e.map(S=>{const T=typeof S=="string"?S:S.id,j=typeof S=="string"?S:S.label,C=s&&!(o!=null&&o.includes(T));return n.jsxs("div",{className:`nc-tab-item ${t===T?"nc-active":""} ${C?"nc-closable":""}`,onClick:()=>L(T),role:"button",tabIndex:0,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&r(T)},children:[n.jsx("span",{className:"nc-tab-label",children:x?j:typeof j=="string"?j.toUpperCase():j}),C&&n.jsx("span",{className:"nc-tab-close",role:"button",tabIndex:0,"aria-label":`Close ${typeof j=="string"?j:T}`,onClick:P=>{P.stopPropagation(),s(T)},onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.stopPropagation(),s(T))},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},T)})}),b&&n.jsx("div",{className:`nc-tab-scroll-indicator ${x?"nc-bottom":"nc-right"}`,children:x?n.jsx(X.ChevronDownIcon,{size:16}):n.jsx(X.ChevronRightIcon,{size:16})})]}),a&&n.jsx("div",{className:"nc-tab-toolbar",children:a})]})}function _t({checked:e,onChange:t,disabled:r,label:s}){return n.jsxs("label",{className:"nc-row",style:{gap:10,alignItems:"center",cursor:r?"not-allowed":"pointer"},children:[s&&n.jsx("span",{className:"nc-label",children:s}),n.jsx("span",{role:"switch","aria-checked":e,tabIndex:0,onKeyDown:o=>{r||(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t(!e))},onClick:()=>!r&&t(!e),style:{position:"relative",width:56,height:30,borderRadius:18,padding:4,display:"inline-flex",alignItems:"center",justifyContent:"flex-start",border:`2px solid ${e?"var(--nc-primary)":"var(--nc-button-border)"}`,background:e?"rgba(99,102,241,0.08)":"transparent",transition:"border-color 160ms, background 160ms"},children:n.jsx("span",{style:{width:22,height:22,borderRadius:12,background:e?"var(--nc-text)":"var(--nc-muted)",transform:`translateX(${e?24:0}px)`,transition:"transform 160ms, background 160ms",boxShadow:e?"0 2px 6px rgba(99,102,241,0.28)":"0 1px 2px rgba(0,0,0,0.08)",border:"none"}})})]})}const Oe=["var(--nc-csv-col-0)","var(--nc-csv-col-1)","var(--nc-csv-col-2)","var(--nc-csv-col-3)","var(--nc-csv-col-4)","var(--nc-csv-col-5)","var(--nc-csv-col-6)","var(--nc-csv-col-7)","var(--nc-csv-col-8)","var(--nc-csv-col-9)"];function Ut(e,t){const s=e.slice(0,t).split(`
|
|
1
|
+
"use strict";var pt=Object.defineProperty;var ft=(e,t,r)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ne=(e,t,r)=>ft(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),X=require("./GeneratedIcons-Z-RSoFyY.cjs"),l=require("react"),ve=require("react-dom"),te=require("react-i18next"),ht=require("i18next"),mt=require("./clsx-C11secjj.cjs");function Ce({size:e="default",color:t,overlay:r=!1,className:s=""}){const o=n.jsx("svg",{className:`nc-activity-indicator nc-${e} ${s}`,viewBox:"0 0 50 50",style:t?{color:t}:void 0,children:n.jsx("circle",{className:"nc-activity-indicator-circle",cx:"25",cy:"25",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round"})});return r?n.jsx("div",{className:"nc-activity-indicator-overlay",children:o}):o}function J({variant:e="default",block:t,size:r="default",appearance:s="default",className:o,disabled:i,textSelectable:a,loading:c,onClick:d,children:p,...f}){const w=["nc-button",e!=="default"?`nc-${e}`:"",t?"nc-block":"",r==="small"?"nc-small":"",r==="large"?"nc-large":"",s==="transparent"?"nc-transparent":"",i||c?"nc-disabled":"",a?"nc-text-selectable":"",c?"nc-loading":"",o??""].filter(Boolean).join(" "),u=b=>{if(!c){if(a){const k=window.getSelection();if(k&&k.toString().length>0)return}d==null||d(b)}};return n.jsxs("button",{className:w,disabled:i||c,onClick:u,...f,children:[c&&n.jsx(Ce,{size:"small",className:"nc-button-spinner",color:s==="transparent"||e!=="default"&&e!=="ghost"?"white":void 0}),p]})}const gt={info:"primary",success:"success",warning:"warning",error:"danger",danger:"danger"};function bt({code:e,text:t,type:r,button:s,onAction:o,children:i,onClose:a,className:c="",style:d}){const p=i??n.jsxs(n.Fragment,{children:[e!==void 0&&n.jsx("span",{className:"nc-alert-code",children:e}),t]});return n.jsxs("div",{className:`nc-alert nc-${r} ${c}`.trim(),style:d,children:[n.jsxs("div",{className:"nc-alert-main",children:[n.jsx("div",{className:`nc-alert-message nc-${r}`,children:p}),a&&n.jsx("button",{type:"button",className:"nc-alert-close","aria-label":"Close alert",onClick:a,children:n.jsx(X.CloseIcon,{size:16})})]}),s&&n.jsx("span",{className:"nc-alert-action",children:n.jsx(J,{size:"small",variant:s.variant??gt[r],onClick:o,children:s.text})})]})}function xt({percentage:e=.5,status:t="discharging",darkMode:r=!1,colored:s=!1}){const o=Math.max(0,Math.min(1,Number(e)||0)),i=o===0?"-":String(Math.round(o*100));let a;s?o<.1?a="var(--nc-danger)":o<.2?a="var(--nc-warning)":a="var(--nc-success)":a=r?"rgba(255,255,255,0.35)":"#000000";const c="var(--nc-battery-shell-bg)",d=24,p=14,f=2,w=0,u=12,b=0,k=0,x=0,v=d,y=p,m=y-b*2,h=v-b*2,g=Math.max(1,Math.min(4,y/4)),N=o===0?0:.05+o*.95,A=d+f+u,$=20,L=.65,S=Math.max(p,$*L),T=d+f+1,j=(p-$*L)/2;return n.jsxs("svg",{className:"nc-battery",width:A,height:S,viewBox:`0 0 ${A} ${S}`,role:"img","aria-label":`Battery ${i==="-"?"-":`${i}%`} ${t}`,children:[n.jsx("defs",{children:n.jsx("mask",{id:`nc-battery-fill-mask-${o}`,children:n.jsx("rect",{x:"0",y:"0",width:h*N,height:m,fill:"white"})})}),n.jsx("rect",{x:k,y:x,rx:g,ry:g,width:v,height:y,fill:c}),n.jsx("rect",{x:k+b,y:x+b,width:h,height:m,fill:a,rx:g,ry:g,mask:`url(#nc-battery-fill-mask-${o})`}),n.jsx("text",{x:k+v/2,y:p-3,fontSize:11,fontWeight:"bold",fill:"var(--nc-battery-text-contrast)",textAnchor:"middle",children:i}),n.jsx("rect",{x:d+w,y:p*.26,width:f,height:p*.48,rx:.8,ry:.8,fill:o===1?a:c}),t==="charging"?n.jsx("g",{transform:`translate(${T}, ${j}) scale(${L})`,fill:a,children:n.jsx("path",{d:"M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z"})}):null]})}function vt({value:e,onChange:t,options:r,disabled:s,size:o="default"}){return n.jsx("div",{className:`nc-button-group ${o==="small"?"nc-small":o==="tiny"?"nc-tiny":""}`,children:r.map(i=>{const a=s||!!i.disabled;return n.jsx("button",{type:"button",className:`nc-button-group-item ${e===i.key?"nc-active":""}`,onClick:()=>!a&&t(i.key),disabled:a,children:i.label},i.key)})})}function wt({size:e}){return n.jsx("svg",{className:`nc-checkbox-icon ${e==="small"?"nc-small":e==="tiny"?"nc-tiny":""}`,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M2 6L5 9L10 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function yt({checked:e,onChange:t,disabled:r,label:s,size:o="default",labelColor:i,style:a,className:c=""}){const d=o==="small",p=o==="tiny";return n.jsxs("label",{className:`nc-checkbox-label ${d?"nc-small":""} ${p?"nc-tiny":""} ${r?"nc-disabled":""} ${c}`.trim(),style:a,onClick:f=>{r||(f.preventDefault(),t(!e))},children:[n.jsx("span",{role:"checkbox","aria-checked":e,tabIndex:0,className:`nc-checkbox-box ${d?"nc-small":""} ${p?"nc-tiny":""} ${e?"nc-checked":""}`,onKeyDown:f=>{r||(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),t(!e))},children:e&&n.jsx(wt,{size:o})}),s&&n.jsx("span",{className:"nc-checkbox-text",style:i?{color:i}:void 0,children:s})]})}function jt({option:e,onChange:t,selected:r,highlighted:s,small:o,renderOption:i,index:a}){const c=l.useRef(null),{t:d}=te.useTranslation(),p=e.disabled===!0;return l.useEffect(()=>{s&&c.current&&c.current.scrollIntoView({block:"nearest"})},[s]),n.jsx("div",{ref:c,className:`nc-combo-dropdown-option ${o?"nc-small":""} ${s?"nc-highlighted":""} ${p?"nc-disabled":""}`,role:"option",onClick:()=>{p||t(e.value,e.label)},"aria-selected":r,"aria-disabled":p,style:{cursor:p?"default":"pointer",opacity:p?.4:void 0,background:s&&!p?"rgba(59,130,246,0.18)":r&&!p?"rgba(59,130,246,0.12)":void 0},children:i?i(e,a,!!s):n.jsxs(n.Fragment,{children:[e.label,e.default&&n.jsxs("span",{style:{fontSize:"0.85em",color:"var(--nc-text-weak)",marginLeft:6},children:["(",d("common.default"),")"]})]})})}function kt({isOpen:e,options:t,onSelect:r,selectedValue:s,placement:o="bottom",anchorRef:i,small:a,highlightedIndex:c=-1,renderOption:d}){const[p,f]=l.useState({top:0,left:0,width:0}),[w,u]=l.useState(o),{t:b}=te.useTranslation();if(l.useEffect(()=>{if(e&&i.current){const x=i.current.getBoundingClientRect();let v=o;if(o==="bottom"){const y=window.innerHeight-x.bottom,m=x.top;y<320&&m>y&&(v="top")}u(v),f({top:v==="top"?x.top-4:x.bottom+4,left:x.left,width:x.width})}},[e,i,o]),!e)return null;const k=n.jsx("div",{className:"nc-combo-dropdown",onMouseDown:x=>x.stopPropagation(),style:{position:"fixed",top:w==="top"?void 0:p.top,bottom:w==="top"?window.innerHeight-p.top:void 0,left:p.left,width:p.width,zIndex:1e3,maxHeight:300,overflowY:"auto"},children:t.length===0?n.jsx("div",{className:`nc-combo-dropdown-option nc-no-results ${a?"nc-small":""}`,children:b("common.noResults")}):t.map((x,v)=>n.jsx(jt,{option:x,onChange:r,selected:x.value===s,highlighted:v===c,small:a,renderOption:d,index:v},x.value))});return ve.createPortal(k,document.body)}function Nt({onClick:e,small:t}){return n.jsx("span",{role:"button",tabIndex:0,className:`nc-combo-button nc-combo-clear ${t?"nc-small":""}`,onClick:r=>{r.stopPropagation(),e()},onMouseDown:r=>r.stopPropagation(),onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation(),e())},"aria-label":"Clear selection",children:"✕"})}function St({open:e,small:t}){return n.jsx("span",{"aria-hidden":!0,className:`nc-combo-button nc-combo-toggle ${t?"nc-small":""} ${e?"nc-open":""}`,children:"▾"})}function At({value:e,onChange:t,placeholder:r="Select…",options:s,candidates:o,renderOption:i,renderSelected:a,selectedOption:c,disabled:d,label:p,clearable:f=!0,allowTyping:w=!1,placement:u="bottom",size:b="default",appearance:k="default",textAlign:x="left",style:v,className:y}){const[m,h]=l.useState(!1),[g,N]=l.useState(""),[A,$]=l.useState(-1),L=l.useRef(null),S=l.useRef(null),T=l.useRef(null),j=b==="small",{t:C}=te.useTranslation(),P=!!o,V=w||P,[M,E]=l.useState([]),[D,K]=l.useState(()=>{if(s&&e){const I=s.find(H=>H.value===e);return I?I.label:""}return o&&e?e:""});l.useEffect(()=>{if(!e){K("");return}if(s){const I=s.find(H=>H.value===e);I&&K(I.label)}else o&&K(e)},[e,s,o]);const W=(I,H=!1)=>{if(!o)return;T.current&&clearTimeout(T.current);const z=async()=>{try{const Y=await o(I);E(Y),$(-1)}catch{E([])}};H?z():T.current=setTimeout(z,200)},G=l.useMemo(()=>{if(P)return M;const I=g.toLowerCase();return V?(s||[]).filter(H=>H.label.toLowerCase().includes(I)):s||[]},[s,g,V,P,M]);l.useEffect(()=>{m&&$(-1)},[m,G]),l.useEffect(()=>{if(!f&&!e&&s&&s.length>0&&t){const I=s.find(H=>H.default)||s[0];t(I.value)}},[f,e,s,t]),l.useEffect(()=>{function I(H){var z;H.target instanceof Node&&L.current&&((z=L.current.parentElement)!=null&&z.contains(H.target)||h(!1))}return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]);const B=c??(s?s.find(I=>I.value===e):e?{label:D,value:e}:void 0),_=B&&f,oe=!d&&!_,de=`nc-align-${x}`,fe=!(m&&V)&&!!B,ie=(I,H,z=!1)=>{var Y;K(H),t==null||t(I),h(!1),N(""),z&&((Y=L.current)==null||Y.blur())},he=()=>{t==null||t(void 0),N(""),h(!1)},me=I=>{if(!m){(I.key==="ArrowDown"||I.key==="ArrowUp")&&(h(!0),I.preventDefault());return}const H=(z,Y)=>{if(Y===1){for(let F=z;F<G.length;F++)if(!G[F].disabled)return F;for(let F=0;F<z;F++)if(!G[F].disabled)return F}else{for(let F=z;F>=0;F--)if(!G[F].disabled)return F;for(let F=G.length-1;F>z;F--)if(!G[F].disabled)return F}return z};switch(I.key){case"ArrowDown":I.preventDefault(),$(z=>{const Y=z+1,F=Y>=G.length?0:Y;return H(F,1)});break;case"ArrowUp":I.preventDefault(),$(z=>{const Y=z-1,F=Y<0?G.length-1:Y;return H(F,-1)});break;case"Enter":I.preventDefault(),A>=0&&A<G.length&&!G[A].disabled&&ie(G[A].value,G[A].label,!0);break;case"Escape":I.preventDefault(),h(!1),N("");break}};return n.jsxs("div",{className:`nc-combo-container ${k==="transparent"?"nc-transparent":""} ${k==="plain"?"nc-plain":""} ${m?"nc-open":""} ${de} ${y||""}`.trim(),style:{position:"relative",...v},children:[p&&n.jsx("span",{className:`nc-label ${j?"nc-small":""}`,children:p}),n.jsxs("div",{ref:S,style:{position:"relative",display:"flex",alignItems:"center"},onMouseDown:I=>{if(d||V&&I.target===L.current)return;const H=!m;if(h(z=>(!z&&V&&B&&N(B.label),!z)),P&&H){const z=V&&B?B.label:"";E([]),setTimeout(()=>W(z,!0),0)}V&&!m&&setTimeout(()=>{var z,Y;(z=L.current)==null||z.focus(),(Y=L.current)==null||Y.select()},0)},children:[n.jsx("input",{ref:L,className:`nc-input ${j?"nc-small":""}`,placeholder:r,onFocus:()=>{if(!d&&V){h(!0);const I=B?B.label:"";B&&(N(I),setTimeout(()=>{var H;return(H=L.current)==null?void 0:H.select()},0)),P&&(E([]),W(I,!0))}},onChange:I=>{const H=I.target.value;V&&(N(H),P&&W(H))},onKeyDown:me,value:m&&V?g:(B==null?void 0:B.label)||"",readOnly:d||!V,style:{width:"100%",paddingRight:oe||_?j?32:44:12,caretColor:w?void 0:"transparent",cursor:w?void 0:"pointer",userSelect:w?void 0:"none",color:fe?"transparent":"var(--nc-text)"}}),fe&&n.jsx("div",{"aria-hidden":!0,className:`nc-combo-overlay ${de}`,style:{position:"absolute",left:j?8:12,right:oe||_?j?12:24:j?8:12,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",display:"flex",alignItems:"center",gap:6},children:a&&B?a(B):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:`nc-combo-overlay-text ${j?"nc-small":""}`,children:B==null?void 0:B.label}),(B==null?void 0:B.default)&&n.jsxs("span",{className:`nc-combo-overlay-default ${j?"nc-small":""}`,children:["(",C("common.default"),")"]})]})}),_&&n.jsx(Nt,{onClick:he,small:j}),oe&&n.jsx(St,{open:m,small:j})]}),n.jsx(kt,{isOpen:m,options:G,onSelect:ie,selectedValue:e,placement:u,anchorRef:S,small:j,highlightedIndex:A,renderOption:i})]})}function Ct({onClick:e,loading:t=!1,disabled:r=!1,size:s="default",title:o,"aria-label":i}){const a=s==="small"?14:s==="large"?20:18,c=t?"Refreshing...":"Refresh",d=t?"Refreshing":"Refresh";return n.jsx("button",{className:"nc-icon-button",onClick:e,disabled:r||t,title:o??c,"aria-label":i??d,"data-size":s,children:n.jsx(X.RefreshIcon,{size:a,className:t?"nc-spinning":""})})}function Re({onClick:e,disabled:t=!1,size:r="default",title:s="Close","aria-label":o="Close"}){const i=r==="small"?14:r==="large"?20:18;return n.jsx("button",{className:"nc-icon-button nc-icon-button-close",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":r,children:n.jsx(X.CloseIcon,{size:i})})}function Rt({onClick:e,disabled:t=!1,size:r="default",title:s="Edit","aria-label":o="Edit"}){const i=r==="small"?14:r==="large"?20:18;return n.jsx("button",{className:"nc-icon-button nc-icon-button-edit",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":r,children:n.jsx(X.EditIcon,{size:i})})}function Mt({onClick:e,disabled:t=!1,size:r="default",title:s="Delete","aria-label":o="Delete"}){const i=r==="small"?14:r==="large"?20:18;return n.jsx("button",{className:"nc-icon-button nc-icon-button-trash",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":r,children:n.jsx(X.TrashIcon,{size:i})})}function It({onClick:e,disabled:t=!1,children:r,title:s,"aria-label":o,size:i="default"}){return n.jsx("button",{className:"nc-hyperlink",onClick:e,disabled:t,title:s,"aria-label":o,"data-size":i,children:r})}function Et({open:e,onClose:t,options:r,anchorRef:s,anchor:o,preferredDirection:i="down"}){const a=l.useRef(null),[c,d]=l.useState({top:0,left:0}),p=o||(s==null?void 0:s.current);if(l.useEffect(()=>{if(!e||!p||!a.current)return;const u=p.getBoundingClientRect(),b=a.current.getBoundingClientRect(),k=window.innerHeight,x=window.innerWidth,v=u.bottom+8,y=v+b.height<=k-8;let m=i;(!y&&i==="down"||i==="up"&&y)&&(m="up");let h;m==="down"?h=v:h=u.top-b.height-8;let g=u.left;g+b.width>x-8&&(g=u.right-b.width),d({top:Math.max(8,h),left:Math.max(8,g)})},[e,p,i]),l.useEffect(()=>{if(!e)return;const u=k=>{a.current&&!a.current.contains(k.target)&&p&&!p.contains(k.target)&&t()},b=k=>{k.key==="Escape"&&t()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",b)}},[e,t,p]),!e)return null;const f=u=>{u.type!=="separator"&&!u.disabled&&u.onClick&&(u.onClick(),t())},w=r.some(u=>u.icon);return ve.createPortal(n.jsx("div",{ref:a,className:"nc-context-menu",style:{position:"fixed",top:`${c.top}px`,left:`${c.left}px`,zIndex:1e4},role:"menu",children:r.map(u=>{if(u.type==="separator")return n.jsx("div",{className:"nc-context-menu-separator",role:"separator"},u.id);const b=["nc-context-menu-item",u.variant&&u.variant!=="default"?`nc-${u.variant}`:"",u.disabled?"nc-disabled":"",w&&!u.icon?"nc-indented":""].filter(Boolean).join(" ");return n.jsxs("button",{className:b,onClick:()=>f(u),disabled:u.disabled,role:"menuitem",children:[u.icon&&n.jsx("span",{className:"nc-context-menu-icon",children:u.icon}),n.jsx("span",{className:"nc-context-menu-label",children:u.label})]},u.id)})}),document.body)}const Ue=l.createContext(null);function qe(){const e=l.useContext(Ue);if(!e)throw new Error("useDialog must be used inside a Dialog component");return e}function ce({children:e,onClick:t,...r}){const{close:s}=qe(),{t:o}=te.useTranslation(),i=a=>{t==null||t(a),s()};return n.jsx(J,{onClick:i,...r,children:e??o("common.close")})}function $t({open:e,onClose:t,title:r,children:s,style:o,footerType:i="ok-cancel",footer:a,onOk:c,onSave:d,onDelete:p,onCancel:f,onConnect:w,closeOnOverlay:u=!0,primaryDisabled:b=!1,fullScreen:k=!1,hideTitleBar:x=!1,className:v="",onContentHeightChange:y}){const m=l.useRef(null),h=l.useRef(null),{t:g}=te.useTranslation(),N={close:t},A=S=>{u&&S.target===S.currentTarget&&t()};if(l.useEffect(()=>{e&&m.current&&m.current.focus()},[e]),l.useEffect(()=>{if(!y||!h.current)return;const S=new ResizeObserver(T=>{for(const j of T){const C=j.contentRect.height;y(C)}});return S.observe(h.current),()=>{S.disconnect()}},[y]),!e)return null;const $=()=>{switch(i){case"ok":return n.jsx("div",{className:"nc-dialog-footer",children:n.jsx(J,{variant:"primary",onClick:c??t,disabled:b,children:g("common.ok")})});case"ok-cancel":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"primary",onClick:c??t,disabled:b,children:g("common.ok")})]});case"save-cancel":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"primary",onClick:d,disabled:b,children:g("common.save")})]});case"delete-cancel":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"danger",onClick:p,disabled:b,children:g("common.delete")})]});case"connect":return n.jsxs("div",{className:"nc-dialog-footer",children:[n.jsx(ce,{onClick:f,children:g("common.cancel")}),n.jsx(J,{variant:"primary",onClick:w,disabled:b,children:g("common.connect")})]});case"close":return n.jsx("div",{className:"nc-dialog-footer",children:n.jsx(ce,{variant:"primary"})});case"gotit":return n.jsx("div",{className:"nc-dialog-footer",children:n.jsx(ce,{variant:"primary",children:g("common.gotit")})});case"custom":return n.jsx("div",{className:"nc-dialog-footer",children:a});case"none":return null;default:return null}},L=n.jsx(Ue.Provider,{value:N,children:n.jsx("div",{className:`nc-dialog-overlay${k?" nc-fullscreen":""}`,onClick:A,children:n.jsxs("div",{ref:m,className:`nc-dialog-container ${v}`,style:o,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":x?void 0:"nc-dialog-title",children:[!x&&n.jsxs("div",{className:"nc-dialog-header",children:[n.jsx("h3",{id:"nc-dialog-title",className:"nc-dialog-title",children:r}),n.jsx(Re,{onClick:t,"aria-label":"Close dialog"})]}),n.jsx("div",{ref:h,className:"nc-dialog-content",children:s}),$()]})})});return k?ve.createPortal(L,document.body):L}function Tt({onClick:e,size:t="default",rightOffset:r=4}){const s=t==="small"?28:34;return n.jsx("button",{className:"nc-button nc-ghost",onClick:e,onMouseDown:o=>{o.preventDefault(),o.stopPropagation()},tabIndex:-1,"aria-label":"Clear input",style:{position:"absolute",right:r,padding:0,minHeight:0,height:s,width:s,border:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:t==="small"?"12px":"14px"},children:"✕"})}function Pt({visible:e,onClick:t,size:r="default"}){const s=r==="small"?28:34,o=r==="small"?16:18;return n.jsx("button",{className:"nc-button nc-ghost",onClick:t,onMouseDown:i=>{i.preventDefault(),i.stopPropagation()},tabIndex:-1,"aria-label":e?"Hide password":"Show password",style:{position:"absolute",right:4,padding:0,minHeight:0,height:s,width:s,border:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:e?n.jsx(X.EyeHiddenIcon,{size:o}):n.jsx(X.ViewIcon,{size:o})})}function Lt({value:e,defaultValue:t="",onChange:r,onChangeConfirmed:s,onEnter:o,onClear:i,placeholder:a,disabled:c,label:d,clearable:p=!0,type:f="text",className:w="",size:u="default",appearance:b="default",style:k,leadingIcon:x,showPasswordToggle:v=!1,multiline:y=!1,rows:m=3,validator:h,showErrorMessage:g=!0}){const N=l.useRef(null),A=l.useRef(null),$=l.useRef(!1),[L,S]=l.useState(!1),[T,j]=l.useState(!1),[C,P]=l.useState(!1),V=e!==void 0,[M,E]=l.useState(t),D=V?e:M,[K,W]=l.useState(D),G=h?h(D):null,B=!!G,_=!y&&b==="plain",oe=_&&T,de=oe?K:D;l.useEffect(()=>{oe||W(D)},[D,oe]);const fe=f==="password",ie=fe&&v&&!c&&!y,he=p&&de&&!c&&(T||C),me=u==="small"?32:44;let I=12;he&&ie?I=me*2:(he||ie)&&(I=me);const z=x?u==="small"?28:34:void 0,Y=()=>{if(!_)return D;const U=K!==D;return V||E(K),U&&(r==null||r(K),s==null||s(K)),K},F=()=>{W(D)},ut=()=>{var U,Z,We;if(_){W(""),i==null||i(),(U=N.current)==null||U.focus();return}V||E(""),r==null||r(""),i==null||i(),y?(Z=A.current)==null||Z.focus():(We=N.current)==null||We.focus()},Le=U=>{if(_&&U.key==="Escape"){U.preventDefault(),$.current=!0,F(),U.currentTarget.blur();return}if(U.key==="Enter"&&!y){const Z=_?Y():D;_&&(U.preventDefault(),$.current=!0,U.currentTarget.blur()),o==null||o(Z)}},Be=U=>{const Z=U.target.value;if(_){W(Z),r==null||r(Z);return}V||E(Z),r==null||r(Z)},ze=()=>{j(!0),_&&W(D)},De=()=>{if(_&&$.current){$.current=!1,j(!1);return}_&&Y(),j(!1)},Ve=`nc-input ${u==="small"?"nc-small ":""}${!y&&b==="plain"?"nc-plain ":""}${B?"nc-error ":""}${w}`;return n.jsxs("div",{className:"nc-col",style:{position:"relative",flex:1,...k},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[d&&n.jsx("span",{className:"nc-label",children:d}),n.jsxs("div",{style:{position:"relative",display:"flex",alignItems:y?"flex-start":"center"},children:[x&&n.jsx("span",{className:"nc-input-leading-icon",style:{height:y?void 0:"100%",top:y?10:void 0},children:x}),y?n.jsx("textarea",{ref:A,className:Ve,placeholder:a,value:de,onChange:Be,onKeyDown:Le,onFocus:ze,onBlur:De,readOnly:c,"aria-disabled":c,tabIndex:c?-1:void 0,rows:m,style:{width:"100%",paddingRight:I,...z!==void 0?{paddingLeft:z}:{}}}):n.jsx("input",{ref:N,type:fe&&L?"text":f,className:Ve,placeholder:a,value:de,onChange:Be,onKeyDown:Le,onFocus:ze,onBlur:De,readOnly:c,"aria-disabled":c,tabIndex:c?-1:void 0,style:{width:"100%",paddingRight:I,...z!==void 0?{paddingLeft:z}:{}}}),he&&n.jsx(Tt,{onClick:ut,size:u,rightOffset:ie?me+4:4}),ie&&n.jsx(Pt,{visible:L,onClick:()=>S(!L),size:u})]}),B&&g&&n.jsx("span",{className:"nc-error-message",children:G})]})}function Bt({children:e,onClick:t,showBorder:r=!0,selectable:s=!1,style:o}){const[i,a]=l.useState(!1),c=d=>{if(t){if(s){const p=window.getSelection();if(p&&p.toString().length>0)return}t(d)}};return n.jsx("div",{onClick:c,onMouseDown:()=>t&&a(!0),onMouseUp:()=>a(!1),onMouseLeave:()=>a(!1),style:{cursor:t?"pointer":"default",userSelect:s?"text":void 0,borderBottom:r?void 0:"none",...o},className:`nc-list-group-item ${t?"nc-list-group-item-clickable":""} ${i?"nc-list-group-item-active":""}`,children:n.jsx("div",{style:{flex:1},children:e})})}function zt({title:e,titleTools:t,children:r,style:s}){return n.jsxs("div",{className:"nc-list-group",style:s,children:[(e||t)&&n.jsxs("div",{className:"nc-list-group-title",children:[n.jsx("div",{children:e}),t&&n.jsx("div",{className:"nc-list-group-title-tools",children:t})]}),n.jsx("div",{className:"nc-list-group-content",children:r})]})}function Dt({values:e,onChange:t,options:r,placeholder:s="Select…",label:o}){const[i,a]=l.useState(!1),[c,d]=l.useState(""),p=l.useRef(null),f=l.useMemo(()=>r.filter(u=>u.label.toLowerCase().includes(c.toLowerCase())),[r,c]);l.useEffect(()=>{function u(b){!(b.target instanceof Node)||!p.current||p.current.contains(b.target)||a(!1)}return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const w=u=>{e.includes(u)?t(e.filter(b=>b!==u)):t([...e,u])};return n.jsxs("div",{ref:p,className:"nc-col",style:{position:"relative"},children:[o&&n.jsx("span",{className:"nc-label",children:o}),n.jsxs("div",{className:"nc-row",style:{flexWrap:"wrap",gap:6,minHeight:42,alignItems:"center",border:"1px solid var(--nc-button-border)",borderRadius:8,background:"var(--nc-button-bg)",padding:"4px 8px"},children:[e.length===0&&n.jsx("span",{className:"nc-label",children:s}),e.map(u=>{const b=r.find(k=>k.value===u);return b?n.jsxs("span",{style:{padding:"4px 8px",borderRadius:6,display:"inline-flex",alignItems:"center",gap:4,background:"var(--nc-button-bg)",border:"1px solid var(--nc-button-border)"},children:[b.label,n.jsx("button",{className:"nc-button nc-ghost",style:{padding:0,minHeight:0,height:20,width:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none"},onClick:()=>w(u),"aria-label":`Remove ${b.label}`,children:"✕"})]},u):null}),n.jsx("input",{className:"nc-input",value:c,onChange:u=>d(u.target.value),onFocus:()=>a(!0),style:{minWidth:50,border:"none",background:"transparent",padding:4,minHeight:32,flex:1}})]}),i&&n.jsxs("div",{className:"nc-combo-dropdown",style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,marginTop:4,boxShadow:"0 4px 12px var(--nc-shadow)"},children:[f.map(u=>{const b=e.includes(u.value);return n.jsxs("div",{className:"nc-section nc-row",style:{justifyContent:"space-between",cursor:"pointer",padding:12},onMouseDown:()=>w(u.value),children:[n.jsx("span",{children:u.label}),n.jsx("span",{children:b?"✔️":""})]},u.value)}),f.length===0&&n.jsx("div",{className:"nc-section nc-label",children:"No results"})]})]})}function we(e){if(!e)return null;const t=/^\d{2}-\d{1,2}$/,r=/^\d{4}-\d{1,2}$/;if(!t.test(e)&&!r.test(e))return"Format must be YY-M(M) or YYYY-M(M)";const s=e.split("-"),o=parseInt(s[1],10);return o<1||o>12?"Month must be between 1 and 12":null}function xe(e){if(!e)return"";const t=e.split("-");if(t.length!==2)return e;let r=t[0];const s=t[1].padStart(2,"0");if(r.length===2){const o=parseInt(r,10);r=String(o<50?2e3+o:1900+o)}return`${r}-${s}`}function He(e){if(!e)return"";const t=xe(e);if(!/^\d{4}-\d{2}$/.test(t))return e;const[r,s]=t.split("-");return`${r}/${s}`}function Fe(){const e=new Date,t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0");return`${t}-${r}`}function Vt({startMonth:e,endMonth:t,onChange:r,label:s,className:o="",disabled:i=!1,size:a="default"}){const[c,d]=l.useState(!1),[p,f]=l.useState(""),[w,u]=l.useState(""),[b,k]=l.useState({top:0,left:0,width:0,right:void 0}),x=l.useRef(null),v=l.useRef(null);l.useEffect(()=>{if(c&&x.current){const j=x.current.getBoundingClientRect(),P=Math.max(j.width,400);window.innerWidth-j.left<P&&j.right>=P?k({top:j.bottom+4,left:0,right:window.innerWidth-j.right,width:P}):k({top:j.bottom+4,left:j.left,right:void 0,width:P})}},[c]),l.useEffect(()=>{if(!c)return;const j=C=>{x.current&&!x.current.contains(C.target)&&v.current&&!v.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[c]);const y=()=>{f(e||Fe()),u(t||Fe()),d(!0)},m=()=>{d(!1)},h=()=>{const j=we(p),C=we(w);if(j||C)return;const P=xe(p),V=xe(w);P&&V&&(r==null||r(P,V)),d(!1)},g=e&&t?`${He(e)} - ${He(t)}`:"Select month range",N=we(p),A=we(w),$=xe(p),L=xe(w),S=$&&L&&$>L,T=c?ve.createPortal(n.jsx("div",{ref:v,className:"nc-month-range-picker-popup",style:{position:"fixed",top:b.top,...b.right!==void 0?{right:b.right}:{left:b.left},width:b.width,zIndex:1e3},children:n.jsxs("div",{className:"nc-month-range-picker-content",children:[n.jsxs("div",{className:"nc-month-range-picker-row",children:[n.jsxs("div",{className:"nc-month-range-picker-column",children:[n.jsx("label",{className:"nc-label",children:"Start Month"}),n.jsx("input",{type:"text",className:`nc-month-input ${N?"nc-error":""}`,value:p,onChange:j=>f(j.target.value),placeholder:"YY-M(M) or YYYY-M(M)"}),N&&n.jsx("div",{className:"nc-month-error-text",children:N})]}),n.jsxs("div",{className:"nc-month-range-picker-column",children:[n.jsx("label",{className:"nc-label",children:"End Month"}),n.jsx("input",{type:"text",className:`nc-month-input ${A?"nc-error":""}`,value:w,onChange:j=>u(j.target.value),placeholder:"YY-M(M) or YYYY-M(M)"}),A&&n.jsx("div",{className:"nc-month-error-text",children:A})]})]}),S&&!N&&!A&&n.jsx("div",{className:"nc-month-range-error",children:"End month must be after or equal to start month"}),n.jsxs("div",{className:"nc-month-range-picker-footer",children:[n.jsx(J,{variant:"primary",onClick:h,disabled:!p||!w||!!N||!!A||!!S,children:"Apply"}),n.jsx(J,{variant:"ghost",onClick:m,children:"Cancel"})]})]})}),document.body):null;return n.jsxs("div",{className:`nc-month-range-picker ${a==="small"?"nc-small ":""}${o}`,children:[s&&n.jsx("label",{className:`nc-label${a==="small"?" nc-small":""}`,children:s}),n.jsx("button",{ref:x,className:`nc-month-range-picker-input${a==="small"?" nc-small":""}`,onClick:y,disabled:i,children:g}),T]})}const Wt=5,Ht=3;function Ft({value:e,onChange:t,min:r,max:s,step:o=1,label:i,disabled:a,className:c="",style:d,size:p="default"}){const f=p==="small",w=(String(o).split(".")[1]||"").length,u=l.useRef(null),b=l.useRef(!1),k=l.useRef(null),[x,v]=l.useState(!1),[y,m]=l.useState(()=>String(e)),h=M=>parseFloat(M.toFixed(w)),g=M=>{const E=h(M);m(String(E)),t(E)},N=()=>{const M=e-o;r!==void 0&&M<r||g(parseFloat(M.toFixed(10)))},A=()=>{const M=e+o;s!==void 0&&M>s||g(parseFloat(M.toFixed(10)))},$=M=>{const E=M.target.value;if(m(E),E==="")return;const D=parseFloat(E);isNaN(D)||t(D)},L=()=>{const M=y;if(M===""){g(r!==void 0?r:0);return}const E=parseFloat(M);if(isNaN(E)){g(r!==void 0?r:0);return}let D=h(E);r!==void 0&&(D=Math.max(r,D)),s!==void 0&&(D=Math.min(s,D)),D!==E?g(D):m(String(D))},S=M=>{a||M.button!==0||(b.current=!1,u.current={startY:M.clientY,startValue:e,pointerId:M.pointerId,hasMoved:!1,lastValue:e},k.current=setTimeout(()=>{b.current=!0,v(!0)},200),M.currentTarget.setPointerCapture(M.pointerId))},T=M=>{const E=u.current;if(!E||E.pointerId!==M.pointerId)return;const D=E.startY-M.clientY;if(Math.abs(D)>=Ht&&(E.hasMoved=!0,b.current=!0,k.current&&(clearTimeout(k.current),k.current=null),v(!0)),!E.hasMoved)return;const K=Math.trunc(D/Wt);let W=E.startValue+K*o;r!==void 0&&(W=Math.max(r,W)),s!==void 0&&(W=Math.min(s,W)),W=h(W),W!==E.lastValue&&(E.lastValue=W,m(String(W)),t(W))},j=M=>{const E=u.current;!E||E.pointerId!==M.pointerId||(k.current&&(clearTimeout(k.current),k.current=null),M.currentTarget.hasPointerCapture(M.pointerId)&&M.currentTarget.releasePointerCapture(M.pointerId),u.current=null,v(!1))},C=M=>E=>{if(b.current){b.current=!1,E.preventDefault();return}M()},P=y===""?NaN:parseFloat(y),V=y===""||isNaN(P)||r!==void 0&&P<r||s!==void 0&&P>s;return n.jsxs("div",{className:`nc-col nc-number-input-col ${f?"nc-small":""}`,children:[i&&n.jsx("span",{className:`nc-label ${f?"nc-small":""}`,children:i}),n.jsxs("div",{className:`nc-number-input-container ${f?"nc-small":""} ${c}`,style:d,children:[n.jsx("input",{className:`nc-input nc-number-input ${f?"nc-small":""} ${V?"nc-error":""}`,type:"number",value:y,onChange:$,onBlur:L,min:r,max:s,step:o,disabled:a}),n.jsxs("div",{className:`nc-number-input-spinners ${f?"nc-small":""} ${a?"nc-disabled":""} ${x?"nc-dragging":""}`,children:[n.jsx("button",{className:`nc-number-input-spin nc-number-input-spin-up ${f?"nc-small":""}`,onClick:C(A),onPointerDown:S,onPointerMove:T,onPointerUp:j,onPointerCancel:j,disabled:a||s!==void 0&&e>=s,tabIndex:-1,children:"▲"}),n.jsx("button",{className:`nc-number-input-spin nc-number-input-spin-down ${f?"nc-small":""}`,onClick:C(N),onPointerDown:S,onPointerMove:T,onPointerUp:j,onPointerCancel:j,disabled:a||r!==void 0&&e<=r,tabIndex:-1,children:"▼"})]})]})]})}function Ot({value:e,onChange:t,min:r=0,max:s=100,step:o=1,label:i,disabled:a,showValue:c=!0,formatValue:d=f=>f.toString(),width:p=200}){const f=u=>{const b=parseFloat(u.target.value);t(b)},w=(e-r)/(s-r)*100;return n.jsxs("div",{className:"nc-col",style:{gap:6},children:[i&&n.jsx("span",{className:"nc-label",children:i}),n.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[n.jsx("input",{type:"range",className:"nc-slider",value:e,onChange:f,min:r,max:s,step:o,disabled:a,style:{width:p,"--nc-slider-percentage":`${w}%`}}),c&&n.jsx("span",{style:{color:"var(--nc-text)",fontFamily:"monospace",fontSize:14,minWidth:60,textAlign:"right"},children:d(e)})]})]})}const Gt=({size:e=24,className:t,style:r})=>n.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:t,style:r,children:n.jsx("polyline",{points:"18 15 12 9 6 15"})});function Xe({children:e,className:t="",style:r}){return n.jsx("div",{className:`nc-tab-panel ${t}`,style:r,children:e})}function Yt({active:e,children:t,keepMounted:r=!1,className:s="",style:o}){const i=l.Children.toArray(t).filter(c=>l.isValidElement(c)&&(c.type===Xe||c.type.displayName==="TabPanel"));if(r)return n.jsx("div",{className:`nc-tab-panels ${s}`,style:o,children:i.map(c=>{const d=c.props.tab===e;return n.jsx("div",{className:`nc-tab-panel-wrapper ${d?"nc-active":""}`,style:{display:d?void 0:"none"},"aria-hidden":!d,children:c},c.props.tab)})});const a=i.find(c=>c.props.tab===e);return n.jsx("div",{className:`nc-tab-panels ${s}`,style:o,children:a})}function Kt({tabs:e,active:t,onChange:r,onClose:s,permanentTabs:o,className:i,toolbar:a,multiline:c,orientation:d="horizontal",style:p}){const f=l.useRef(null),[w,u]=l.useState(!1),[b,k]=l.useState(!1),x=d==="verticalLeft"||d==="verticalRight",v=l.useRef(!1),y=l.useRef(0),m=l.useRef(0),h=l.useRef(!1);l.useEffect(()=>{const S=()=>{if(f.current)if(x){const{scrollTop:j,scrollHeight:C,clientHeight:P}=f.current;u(j>1),k(j<C-P-1)}else{const{scrollLeft:j,scrollWidth:C,clientWidth:P}=f.current;u(j>1),k(j<C-P-1)}},T=f.current;if(T)return S(),T.addEventListener("scroll",S),window.addEventListener("resize",S),()=>{T.removeEventListener("scroll",S),window.removeEventListener("resize",S)}},[e,x]);const g=S=>{f.current&&(v.current=!0,h.current=!1,y.current=x?S.clientY:S.clientX,m.current=x?f.current.scrollTop:f.current.scrollLeft,f.current.style.cursor="grabbing",f.current.style.userSelect="none")},N=S=>{if(!v.current||!f.current)return;const T=x?S.clientY:S.clientX,j=y.current-T;Math.abs(j)>3&&(h.current=!0),x?f.current.scrollTop=m.current+j:f.current.scrollLeft=m.current+j},A=()=>{f.current&&(v.current=!1,f.current.style.cursor="",f.current.style.userSelect="")},$=()=>{A()};l.useEffect(()=>{const S=f.current;if(!S||x)return;const T=j=>{j.deltaY!==0&&(j.preventDefault(),S.scrollLeft+=j.deltaY*.3)};return S.addEventListener("wheel",T,{passive:!1}),()=>{S.removeEventListener("wheel",T)}},[x]);const L=S=>{h.current||r(S)};return n.jsxs("div",{className:`nc-tab-container ${x?`nc-vertical nc-${d}`:""} ${i||""}`,style:p,children:[n.jsxs("div",{className:"nc-tab-scroll-wrapper",children:[w&&n.jsx("div",{className:`nc-tab-scroll-indicator ${x?"nc-top":"nc-left"}`,children:x?n.jsx(Gt,{size:16}):n.jsx(X.ChevronLeftIcon,{size:16})}),n.jsx("div",{ref:f,className:`nc-tab-scroll ${c?"nc-multiline":""}`,onMouseDown:g,onMouseMove:N,onMouseUp:A,onMouseLeave:$,style:{cursor:"grab"},children:e.map(S=>{const T=typeof S=="string"?S:S.id,j=typeof S=="string"?S:S.label,C=s&&!(o!=null&&o.includes(T));return n.jsxs("div",{className:`nc-tab-item ${t===T?"nc-active":""} ${C?"nc-closable":""}`,onClick:()=>L(T),role:"button",tabIndex:0,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&r(T)},children:[n.jsx("span",{className:"nc-tab-label",children:x?j:typeof j=="string"?j.toUpperCase():j}),C&&n.jsx("span",{className:"nc-tab-close",role:"button",tabIndex:0,"aria-label":`Close ${typeof j=="string"?j:T}`,onClick:P=>{P.stopPropagation(),s(T)},onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.stopPropagation(),s(T))},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},T)})}),b&&n.jsx("div",{className:`nc-tab-scroll-indicator ${x?"nc-bottom":"nc-right"}`,children:x?n.jsx(X.ChevronDownIcon,{size:16}):n.jsx(X.ChevronRightIcon,{size:16})})]}),a&&n.jsx("div",{className:"nc-tab-toolbar",children:a})]})}function _t({checked:e,onChange:t,disabled:r,label:s}){return n.jsxs("label",{className:"nc-row",style:{gap:10,alignItems:"center",cursor:r?"not-allowed":"pointer"},children:[s&&n.jsx("span",{className:"nc-label",children:s}),n.jsx("span",{role:"switch","aria-checked":e,tabIndex:0,onKeyDown:o=>{r||(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t(!e))},onClick:()=>!r&&t(!e),style:{position:"relative",width:56,height:30,borderRadius:18,padding:4,display:"inline-flex",alignItems:"center",justifyContent:"flex-start",border:`2px solid ${e?"var(--nc-primary)":"var(--nc-button-border)"}`,background:e?"rgba(99,102,241,0.08)":"transparent",transition:"border-color 160ms, background 160ms"},children:n.jsx("span",{style:{width:22,height:22,borderRadius:12,background:e?"var(--nc-text)":"var(--nc-muted)",transform:`translateX(${e?24:0}px)`,transition:"transform 160ms, background 160ms",boxShadow:e?"0 2px 6px rgba(99,102,241,0.28)":"0 1px 2px rgba(0,0,0,0.08)",border:"none"}})})]})}const Oe=["var(--nc-csv-col-0)","var(--nc-csv-col-1)","var(--nc-csv-col-2)","var(--nc-csv-col-3)","var(--nc-csv-col-4)","var(--nc-csv-col-5)","var(--nc-csv-col-6)","var(--nc-csv-col-7)","var(--nc-csv-col-8)","var(--nc-csv-col-9)"];function Ut(e,t){const s=e.slice(0,t).split(`
|
|
2
2
|
`),o=s.length,a=s[o-1].split(" "),c=a.length,d=a[c-1].length+1;return{line:o,column:c,character:d,offset:t}}function qt(e,t,r,s){const o=e.split(`
|
|
3
3
|
`),i=Math.max(1,Math.min(t,o.length));let a=0;for(let w=0;w<i-1;w++)a+=o[w].length+1;const d=o[i-1].split(" "),p=Math.max(1,Math.min(r,d.length));for(let w=0;w<p-1;w++)a+=d[w].length+1;const f=Math.max(1,Math.min(s,d[p-1].length+1));return a+=f-1,a}function Xt(e,t){const r=e.split(`
|
|
4
4
|
`),s=Math.max(1,Math.min(t,r.length));let o=0;for(let i=0;i<s-1;i++)o+=r[i].length+1;return o}const Jt=l.forwardRef(function({value:t,onChange:r,placeholder:s,className:o,style:i,showLineNumbers:a=!1,onCursorChange:c,highlightLine:d},p){const f=l.useRef(null),w=l.useRef(null),u=l.useRef(null);l.useImperativeHandle(p,()=>({goToLine(m){const h=f.current;if(!h)return;const g=Xt(t,m);h.focus(),h.setSelectionRange(g,g);const N=parseFloat(getComputedStyle(h).lineHeight)||18;h.scrollTop=(Math.max(1,m)-1)*N,k(),b()},goToPosition(m,h,g){const N=f.current;if(!N)return;const A=qt(t,m,h,g);N.focus(),N.setSelectionRange(A,A);const $=parseFloat(getComputedStyle(N).lineHeight)||18;N.scrollTop=(Math.max(1,m)-1)*$,k(),b()}}),[t]);const b=l.useCallback(()=>{if(!c||!f.current)return;const m=Ut(t,f.current.selectionStart);c(m)},[c,t]),k=l.useCallback(()=>{const m=f.current;m&&(w.current&&(w.current.scrollTop=m.scrollTop,w.current.scrollLeft=m.scrollLeft),u.current&&(u.current.scrollTop=m.scrollTop))},[]);l.useEffect(()=>{if(d==null||d<1)return;const m=f.current;if(!m)return;const h=parseFloat(getComputedStyle(m).lineHeight)||18,g=(d-1)*h,N=g+h;(g<m.scrollTop||N>m.scrollTop+m.clientHeight)&&(m.scrollTop=g-m.clientHeight/2+h/2),k()},[d]);const x=l.useMemo(()=>t.split(`
|