@donkit-ai/design-system 1.4.52 → 1.4.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +126 -0
- package/dist/index.es.js +1837 -1470
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Check as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import Y, { useState as A, useRef as T, useEffect as D, useLayoutEffect as Qe, useContext as $e, createContext as et, useCallback as He } from "react";
|
|
2
|
+
import { Check as Te, X as ee, ChevronDown as _e, Minus as tt, Plus as st, XCircle as Re, AlertTriangle as Se, CheckCircle as Ae, Info as Be, ChevronUp as nt, ChevronsUpDown as rt, ChevronLeft as at, ChevronRight as ot, Copy as it, Brain as lt, Loader as ct, Paperclip as Pe, Square as dt, ArrowUp as ut, Zap as ft, Cpu as Me, FileText as mt, ThumbsUp as pt, ThumbsDown as ht } from "lucide-react";
|
|
3
|
+
import he from "react-dom";
|
|
4
|
+
const P = {
|
|
5
5
|
1: 16,
|
|
6
6
|
2: 20,
|
|
7
7
|
3: 24,
|
|
8
8
|
4: 28,
|
|
9
9
|
5: 48
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var ye = { exports: {} }, xe = {};
|
|
12
12
|
/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
@@ -18,29 +18,29 @@ var je = { exports: {} }, fe = {};
|
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
function n(
|
|
21
|
+
var ze;
|
|
22
|
+
function xt() {
|
|
23
|
+
if (ze) return xe;
|
|
24
|
+
ze = 1;
|
|
25
|
+
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
26
|
+
function n(a, o, r) {
|
|
27
27
|
var i = null;
|
|
28
|
-
if (r !== void 0 && (i = "" + r),
|
|
28
|
+
if (r !== void 0 && (i = "" + r), o.key !== void 0 && (i = "" + o.key), "key" in o) {
|
|
29
29
|
r = {};
|
|
30
|
-
for (var l in
|
|
31
|
-
l !== "key" && (r[l] =
|
|
32
|
-
} else r =
|
|
33
|
-
return
|
|
34
|
-
$$typeof:
|
|
35
|
-
type:
|
|
30
|
+
for (var l in o)
|
|
31
|
+
l !== "key" && (r[l] = o[l]);
|
|
32
|
+
} else r = o;
|
|
33
|
+
return o = r.ref, {
|
|
34
|
+
$$typeof: t,
|
|
35
|
+
type: a,
|
|
36
36
|
key: i,
|
|
37
|
-
ref:
|
|
37
|
+
ref: o !== void 0 ? o : null,
|
|
38
38
|
props: r
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return xe.Fragment = s, xe.jsx = n, xe.jsxs = n, xe;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var ve = {};
|
|
44
44
|
/**
|
|
45
45
|
* @license React
|
|
46
46
|
* react-jsx-runtime.development.js
|
|
@@ -50,295 +50,295 @@ var me = {};
|
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
function
|
|
57
|
-
if (
|
|
58
|
-
if (typeof
|
|
59
|
-
return
|
|
60
|
-
if (typeof
|
|
61
|
-
switch (
|
|
62
|
-
case
|
|
53
|
+
var Ce;
|
|
54
|
+
function vt() {
|
|
55
|
+
return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
|
+
function t(f) {
|
|
57
|
+
if (f == null) return null;
|
|
58
|
+
if (typeof f == "function")
|
|
59
|
+
return f.$$typeof === I ? null : f.displayName || f.name || null;
|
|
60
|
+
if (typeof f == "string") return f;
|
|
61
|
+
switch (f) {
|
|
62
|
+
case g:
|
|
63
63
|
return "Fragment";
|
|
64
|
-
case
|
|
64
|
+
case k:
|
|
65
65
|
return "Profiler";
|
|
66
|
-
case
|
|
66
|
+
case w:
|
|
67
67
|
return "StrictMode";
|
|
68
|
-
case
|
|
68
|
+
case L:
|
|
69
69
|
return "Suspense";
|
|
70
|
-
case
|
|
70
|
+
case W:
|
|
71
71
|
return "SuspenseList";
|
|
72
|
-
case
|
|
72
|
+
case b:
|
|
73
73
|
return "Activity";
|
|
74
74
|
}
|
|
75
|
-
if (typeof
|
|
76
|
-
switch (typeof
|
|
75
|
+
if (typeof f == "object")
|
|
76
|
+
switch (typeof f.tag == "number" && console.error(
|
|
77
77
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
78
|
-
),
|
|
79
|
-
case
|
|
78
|
+
), f.$$typeof) {
|
|
79
|
+
case v:
|
|
80
80
|
return "Portal";
|
|
81
|
-
case
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
return (
|
|
85
|
-
case
|
|
86
|
-
var
|
|
87
|
-
return
|
|
81
|
+
case E:
|
|
82
|
+
return f.displayName || "Context";
|
|
83
|
+
case j:
|
|
84
|
+
return (f._context.displayName || "Context") + ".Consumer";
|
|
85
|
+
case M:
|
|
86
|
+
var $ = f.render;
|
|
87
|
+
return f = f.displayName, f || (f = $.displayName || $.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
88
88
|
case H:
|
|
89
|
-
return
|
|
90
|
-
case
|
|
91
|
-
|
|
89
|
+
return $ = f.displayName || null, $ !== null ? $ : t(f.type) || "Memo";
|
|
90
|
+
case z:
|
|
91
|
+
$ = f._payload, f = f._init;
|
|
92
92
|
try {
|
|
93
|
-
return
|
|
93
|
+
return t(f($));
|
|
94
94
|
} catch {
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
return "" +
|
|
99
|
+
function s(f) {
|
|
100
|
+
return "" + f;
|
|
101
101
|
}
|
|
102
|
-
function n(
|
|
102
|
+
function n(f) {
|
|
103
103
|
try {
|
|
104
|
-
|
|
105
|
-
var
|
|
104
|
+
s(f);
|
|
105
|
+
var $ = !1;
|
|
106
106
|
} catch {
|
|
107
|
-
|
|
107
|
+
$ = !0;
|
|
108
108
|
}
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
var
|
|
112
|
-
return
|
|
113
|
-
|
|
109
|
+
if ($) {
|
|
110
|
+
$ = console;
|
|
111
|
+
var F = $.error, V = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
112
|
+
return F.call(
|
|
113
|
+
$,
|
|
114
114
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
115
|
-
|
|
116
|
-
),
|
|
115
|
+
V
|
|
116
|
+
), s(f);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
if (
|
|
121
|
-
if (typeof
|
|
119
|
+
function a(f) {
|
|
120
|
+
if (f === g) return "<>";
|
|
121
|
+
if (typeof f == "object" && f !== null && f.$$typeof === z)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
124
|
+
var $ = t(f);
|
|
125
|
+
return $ ? "<" + $ + ">" : "<...>";
|
|
126
126
|
} catch {
|
|
127
127
|
return "<...>";
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
132
|
-
return
|
|
130
|
+
function o() {
|
|
131
|
+
var f = O.A;
|
|
132
|
+
return f === null ? null : f.getOwner();
|
|
133
133
|
}
|
|
134
134
|
function r() {
|
|
135
135
|
return Error("react-stack-top-frame");
|
|
136
136
|
}
|
|
137
|
-
function i(
|
|
138
|
-
if (
|
|
139
|
-
var
|
|
140
|
-
if (
|
|
137
|
+
function i(f) {
|
|
138
|
+
if (U.call(f, "key")) {
|
|
139
|
+
var $ = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
140
|
+
if ($ && $.isReactWarning) return !1;
|
|
141
141
|
}
|
|
142
|
-
return
|
|
142
|
+
return f.key !== void 0;
|
|
143
143
|
}
|
|
144
|
-
function l(
|
|
145
|
-
function
|
|
144
|
+
function l(f, $) {
|
|
145
|
+
function F() {
|
|
146
146
|
S || (S = !0, console.error(
|
|
147
147
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
148
|
-
|
|
148
|
+
$
|
|
149
149
|
));
|
|
150
150
|
}
|
|
151
|
-
|
|
152
|
-
get:
|
|
151
|
+
F.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
152
|
+
get: F,
|
|
153
153
|
configurable: !0
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
var
|
|
158
|
-
return
|
|
156
|
+
function u() {
|
|
157
|
+
var f = t(this.type);
|
|
158
|
+
return C[f] || (C[f] = !0, console.error(
|
|
159
159
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
160
|
-
)),
|
|
160
|
+
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
161
161
|
}
|
|
162
|
-
function d(
|
|
163
|
-
var
|
|
164
|
-
return
|
|
165
|
-
$$typeof:
|
|
166
|
-
type:
|
|
167
|
-
key:
|
|
168
|
-
props:
|
|
169
|
-
_owner:
|
|
170
|
-
}, (
|
|
162
|
+
function d(f, $, F, V, ne, oe) {
|
|
163
|
+
var q = F.ref;
|
|
164
|
+
return f = {
|
|
165
|
+
$$typeof: x,
|
|
166
|
+
type: f,
|
|
167
|
+
key: $,
|
|
168
|
+
props: F,
|
|
169
|
+
_owner: V
|
|
170
|
+
}, (q !== void 0 ? q : null) !== null ? Object.defineProperty(f, "ref", {
|
|
171
171
|
enumerable: !1,
|
|
172
|
-
get:
|
|
173
|
-
}) : Object.defineProperty(
|
|
172
|
+
get: u
|
|
173
|
+
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
174
174
|
configurable: !1,
|
|
175
175
|
enumerable: !1,
|
|
176
176
|
writable: !0,
|
|
177
177
|
value: 0
|
|
178
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(f, "_debugInfo", {
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
182
|
value: null
|
|
183
|
-
}), Object.defineProperty(
|
|
183
|
+
}), Object.defineProperty(f, "_debugStack", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
187
|
value: ne
|
|
188
|
-
}), Object.defineProperty(
|
|
188
|
+
}), Object.defineProperty(f, "_debugTask", {
|
|
189
189
|
configurable: !1,
|
|
190
190
|
enumerable: !1,
|
|
191
191
|
writable: !0,
|
|
192
|
-
value:
|
|
193
|
-
}), Object.freeze && (Object.freeze(
|
|
192
|
+
value: oe
|
|
193
|
+
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
194
194
|
}
|
|
195
|
-
function f
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
198
|
-
if (
|
|
199
|
-
if (
|
|
200
|
-
for (
|
|
201
|
-
p(
|
|
202
|
-
Object.freeze && Object.freeze(
|
|
195
|
+
function m(f, $, F, V, ne, oe) {
|
|
196
|
+
var q = $.children;
|
|
197
|
+
if (q !== void 0)
|
|
198
|
+
if (V)
|
|
199
|
+
if (_(q)) {
|
|
200
|
+
for (V = 0; V < q.length; V++)
|
|
201
|
+
p(q[V]);
|
|
202
|
+
Object.freeze && Object.freeze(q);
|
|
203
203
|
} else
|
|
204
204
|
console.error(
|
|
205
205
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
206
206
|
);
|
|
207
|
-
else p(
|
|
208
|
-
if (
|
|
209
|
-
|
|
210
|
-
var Q = Object.keys(
|
|
211
|
-
return
|
|
207
|
+
else p(q);
|
|
208
|
+
if (U.call($, "key")) {
|
|
209
|
+
q = t(f);
|
|
210
|
+
var Q = Object.keys($).filter(function(Ne) {
|
|
211
|
+
return Ne !== "key";
|
|
212
212
|
});
|
|
213
|
-
|
|
213
|
+
V = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", R[q + V] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
214
214
|
`A props object containing a "key" prop is being spread into JSX:
|
|
215
215
|
let props = %s;
|
|
216
216
|
<%s {...props} />
|
|
217
217
|
React keys must be passed directly to JSX without using spread:
|
|
218
218
|
let props = %s;
|
|
219
219
|
<%s key={someKey} {...props} />`,
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
V,
|
|
221
|
+
q,
|
|
222
222
|
Q,
|
|
223
|
-
|
|
224
|
-
),
|
|
223
|
+
q
|
|
224
|
+
), R[q + V] = !0);
|
|
225
225
|
}
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
for (var
|
|
229
|
-
|
|
230
|
-
} else
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
typeof
|
|
226
|
+
if (q = null, F !== void 0 && (n(F), q = "" + F), i($) && (n($.key), q = "" + $.key), "key" in $) {
|
|
227
|
+
F = {};
|
|
228
|
+
for (var ie in $)
|
|
229
|
+
ie !== "key" && (F[ie] = $[ie]);
|
|
230
|
+
} else F = $;
|
|
231
|
+
return q && l(
|
|
232
|
+
F,
|
|
233
|
+
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
234
234
|
), d(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
f,
|
|
236
|
+
q,
|
|
237
|
+
F,
|
|
238
|
+
o(),
|
|
239
239
|
ne,
|
|
240
|
-
|
|
240
|
+
oe
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
function p(
|
|
244
|
-
h(
|
|
243
|
+
function p(f) {
|
|
244
|
+
h(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? h(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
245
245
|
}
|
|
246
|
-
function h(
|
|
247
|
-
return typeof
|
|
246
|
+
function h(f) {
|
|
247
|
+
return typeof f == "object" && f !== null && f.$$typeof === x;
|
|
248
248
|
}
|
|
249
|
-
var
|
|
249
|
+
var c = Y, x = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), E = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), b = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), O = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, _ = Array.isArray, y = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
|
-
|
|
253
|
-
react_stack_bottom_frame: function(
|
|
254
|
-
return
|
|
252
|
+
c = {
|
|
253
|
+
react_stack_bottom_frame: function(f) {
|
|
254
|
+
return f();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var S,
|
|
258
|
-
|
|
257
|
+
var S, C = {}, K = c.react_stack_bottom_frame.bind(
|
|
258
|
+
c,
|
|
259
259
|
r
|
|
260
|
-
)(),
|
|
261
|
-
|
|
262
|
-
var
|
|
263
|
-
return
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
260
|
+
)(), X = y(a(r)), R = {};
|
|
261
|
+
ve.Fragment = g, ve.jsx = function(f, $, F) {
|
|
262
|
+
var V = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
263
|
+
return m(
|
|
264
|
+
f,
|
|
265
|
+
$,
|
|
266
|
+
F,
|
|
267
267
|
!1,
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
V ? Error("react-stack-top-frame") : K,
|
|
269
|
+
V ? y(a(f)) : X
|
|
270
270
|
);
|
|
271
|
-
},
|
|
272
|
-
var
|
|
273
|
-
return
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
271
|
+
}, ve.jsxs = function(f, $, F) {
|
|
272
|
+
var V = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
273
|
+
return m(
|
|
274
|
+
f,
|
|
275
|
+
$,
|
|
276
|
+
F,
|
|
277
277
|
!0,
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
V ? Error("react-stack-top-frame") : K,
|
|
279
|
+
V ? y(a(f)) : X
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
|
-
}()),
|
|
282
|
+
}()), ve;
|
|
283
283
|
}
|
|
284
|
-
process.env.NODE_ENV === "production" ?
|
|
285
|
-
var e =
|
|
286
|
-
function
|
|
284
|
+
process.env.NODE_ENV === "production" ? ye.exports = xt() : ye.exports = vt();
|
|
285
|
+
var e = ye.exports;
|
|
286
|
+
function _t({ size: t = "m", color: s = "default", className: n = "", ...a }) {
|
|
287
287
|
return /* @__PURE__ */ e.jsx(
|
|
288
288
|
"span",
|
|
289
289
|
{
|
|
290
|
-
className: ["ds-spinner", `ds-spinner--${
|
|
290
|
+
className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${s}`, n].filter(Boolean).join(" "),
|
|
291
291
|
role: "status",
|
|
292
292
|
"aria-label": "Loading",
|
|
293
|
-
...
|
|
293
|
+
...a
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
|
-
const
|
|
298
|
-
function
|
|
299
|
-
children:
|
|
300
|
-
variant:
|
|
297
|
+
const bt = { xs: 12, s: 14, m: 16, l: 20 };
|
|
298
|
+
function ae({
|
|
299
|
+
children: t,
|
|
300
|
+
variant: s = "primary",
|
|
301
301
|
size: n = "m",
|
|
302
|
-
fullWidth:
|
|
303
|
-
icon:
|
|
302
|
+
fullWidth: a = !1,
|
|
303
|
+
icon: o,
|
|
304
304
|
disabled: r = !1,
|
|
305
305
|
state: i = "idle",
|
|
306
306
|
onClick: l,
|
|
307
|
-
type:
|
|
307
|
+
type: u = "button",
|
|
308
308
|
href: d,
|
|
309
|
-
"aria-label":
|
|
309
|
+
"aria-label": m,
|
|
310
310
|
className: p = "",
|
|
311
311
|
...h
|
|
312
312
|
}) {
|
|
313
|
-
const
|
|
313
|
+
const c = o && !t, x = i === "loading", v = i === "success", g = i === "error", w = x || v || g, k = n === "xs" ? "s" : "m", j = s === "danger" ? "on-accent" : "default", E = bt[n] ?? 16, M = x ? /* @__PURE__ */ e.jsx(_t, { size: k, color: j }) : v ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Te, { size: E, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: E, strokeWidth: 2.5 }) }) : null, L = [
|
|
314
314
|
"ds-button",
|
|
315
|
-
`ds-button--${
|
|
315
|
+
`ds-button--${s}`,
|
|
316
316
|
`ds-button--${n}`,
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
a && "ds-button--full",
|
|
318
|
+
c && "ds-button--icon-only",
|
|
319
319
|
p
|
|
320
|
-
].filter(Boolean).join(" "),
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
].filter(Boolean).join(" "), W = i !== "idle" ? i : void 0, H = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
321
|
+
w ? M : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
|
|
322
|
+
t
|
|
323
323
|
] });
|
|
324
324
|
if (d) {
|
|
325
|
-
const
|
|
326
|
-
if (r ||
|
|
327
|
-
|
|
325
|
+
const z = (b) => {
|
|
326
|
+
if (r || x) {
|
|
327
|
+
b.preventDefault();
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), l == null || l(b));
|
|
331
331
|
};
|
|
332
332
|
return /* @__PURE__ */ e.jsx(
|
|
333
333
|
"a",
|
|
334
334
|
{
|
|
335
|
-
className:
|
|
336
|
-
href: r ||
|
|
337
|
-
onClick:
|
|
338
|
-
"aria-label":
|
|
339
|
-
"aria-disabled": r ||
|
|
340
|
-
"aria-busy":
|
|
341
|
-
"data-state":
|
|
335
|
+
className: L,
|
|
336
|
+
href: r || x ? void 0 : d,
|
|
337
|
+
onClick: z,
|
|
338
|
+
"aria-label": m,
|
|
339
|
+
"aria-disabled": r || x ? "true" : void 0,
|
|
340
|
+
"aria-busy": x ? "true" : void 0,
|
|
341
|
+
"data-state": W,
|
|
342
342
|
...h,
|
|
343
343
|
children: H
|
|
344
344
|
}
|
|
@@ -347,45 +347,45 @@ function ce({
|
|
|
347
347
|
return /* @__PURE__ */ e.jsx(
|
|
348
348
|
"button",
|
|
349
349
|
{
|
|
350
|
-
type:
|
|
351
|
-
className:
|
|
350
|
+
type: u,
|
|
351
|
+
className: L,
|
|
352
352
|
disabled: r,
|
|
353
|
-
onClick:
|
|
354
|
-
"aria-label":
|
|
355
|
-
"aria-busy":
|
|
356
|
-
"data-state":
|
|
353
|
+
onClick: x ? void 0 : l,
|
|
354
|
+
"aria-label": m,
|
|
355
|
+
"aria-busy": x ? "true" : void 0,
|
|
356
|
+
"data-state": W,
|
|
357
357
|
...h,
|
|
358
358
|
children: H
|
|
359
359
|
}
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
label:
|
|
364
|
-
error:
|
|
362
|
+
function as({
|
|
363
|
+
label: t,
|
|
364
|
+
error: s,
|
|
365
365
|
hint: n,
|
|
366
|
-
fullWidth:
|
|
367
|
-
icon:
|
|
366
|
+
fullWidth: a = !0,
|
|
367
|
+
icon: o,
|
|
368
368
|
iconRight: r,
|
|
369
369
|
onIconRightClick: i,
|
|
370
370
|
size: l = "m",
|
|
371
|
-
disabled:
|
|
371
|
+
disabled: u,
|
|
372
372
|
id: d,
|
|
373
|
-
...
|
|
373
|
+
...m
|
|
374
374
|
}) {
|
|
375
|
-
const p = d || `input-${
|
|
376
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${
|
|
377
|
-
|
|
375
|
+
const p = d || `input-${Y.useId()}`, h = n ? `${p}-hint` : void 0, c = s ? `${p}-error` : void 0, x = c || h;
|
|
376
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${u ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
|
|
377
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
|
|
378
378
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
|
|
379
|
-
|
|
379
|
+
o && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: o }),
|
|
380
380
|
/* @__PURE__ */ e.jsx(
|
|
381
381
|
"input",
|
|
382
382
|
{
|
|
383
383
|
id: p,
|
|
384
|
-
className: `ds-input ds-input--${l} ${
|
|
385
|
-
disabled:
|
|
386
|
-
"aria-invalid":
|
|
387
|
-
"aria-describedby":
|
|
388
|
-
...
|
|
384
|
+
className: `ds-input ds-input--${l} ${o ? "ds-input--with-icon" : ""} ${r ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
|
|
385
|
+
disabled: u,
|
|
386
|
+
"aria-invalid": s ? "true" : "false",
|
|
387
|
+
"aria-describedby": x,
|
|
388
|
+
...m
|
|
389
389
|
}
|
|
390
390
|
),
|
|
391
391
|
r && /* @__PURE__ */ e.jsx(
|
|
@@ -400,246 +400,246 @@ function Vs({
|
|
|
400
400
|
}
|
|
401
401
|
)
|
|
402
402
|
] }),
|
|
403
|
-
n && !
|
|
404
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children:
|
|
403
|
+
n && !s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
|
|
404
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: c, className: "ds-input-error", role: "alert", children: s }) }) })
|
|
405
405
|
] });
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
label:
|
|
409
|
-
error:
|
|
407
|
+
function os({
|
|
408
|
+
label: t,
|
|
409
|
+
error: s,
|
|
410
410
|
hint: n,
|
|
411
|
-
fullWidth:
|
|
412
|
-
size:
|
|
411
|
+
fullWidth: a = !0,
|
|
412
|
+
size: o = "m",
|
|
413
413
|
disabled: r,
|
|
414
414
|
id: i,
|
|
415
415
|
resize: l = !0,
|
|
416
|
-
rows:
|
|
416
|
+
rows: u = 3,
|
|
417
417
|
...d
|
|
418
418
|
}) {
|
|
419
|
-
const
|
|
420
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${
|
|
421
|
-
|
|
419
|
+
const m = i || `textarea-${Y.useId()}`, p = n ? `${m}-hint` : void 0, h = s ? `${m}-error` : void 0, c = h || p;
|
|
420
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
421
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: m, children: t }),
|
|
422
422
|
/* @__PURE__ */ e.jsx(
|
|
423
423
|
"textarea",
|
|
424
424
|
{
|
|
425
|
-
id:
|
|
426
|
-
className: `ds-textarea ds-textarea--${
|
|
425
|
+
id: m,
|
|
426
|
+
className: `ds-textarea ds-textarea--${o} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
|
|
427
427
|
disabled: r,
|
|
428
|
-
"aria-invalid":
|
|
429
|
-
"aria-describedby":
|
|
430
|
-
rows:
|
|
428
|
+
"aria-invalid": s ? "true" : "false",
|
|
429
|
+
"aria-describedby": c,
|
|
430
|
+
rows: u,
|
|
431
431
|
...d
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
|
-
n && !
|
|
435
|
-
|
|
434
|
+
n && !s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
|
|
435
|
+
s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
|
|
436
436
|
] });
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
label:
|
|
440
|
-
value:
|
|
438
|
+
function is({
|
|
439
|
+
label: t,
|
|
440
|
+
value: s,
|
|
441
441
|
onChange: n,
|
|
442
|
-
options:
|
|
443
|
-
placeholder:
|
|
442
|
+
options: a = [],
|
|
443
|
+
placeholder: o = "Select option",
|
|
444
444
|
error: r,
|
|
445
445
|
fullWidth: i = !0,
|
|
446
446
|
size: l = "m",
|
|
447
|
-
disabled:
|
|
447
|
+
disabled: u = !1,
|
|
448
448
|
id: d,
|
|
449
|
-
...
|
|
449
|
+
...m
|
|
450
450
|
}) {
|
|
451
|
-
const [p, h] =
|
|
452
|
-
|
|
453
|
-
var
|
|
454
|
-
h(!1),
|
|
455
|
-
},
|
|
456
|
-
},
|
|
457
|
-
clearTimeout(H.current),
|
|
458
|
-
const
|
|
459
|
-
|
|
451
|
+
const [p, h] = A(!1), [c, x] = A(!1), [v, g] = A({}), [w, k] = A("down"), [j, E] = A(-1), M = T(null), L = T(null), W = T(null), H = T(null), z = d || `select-${Y.useId()}`, b = `${z}-label`, I = r ? `${z}-error` : void 0, O = 150, U = (R = !1) => {
|
|
452
|
+
c || (x(!0), E(-1), H.current = setTimeout(() => {
|
|
453
|
+
var f;
|
|
454
|
+
h(!1), x(!1), R && ((f = W.current) == null || f.focus());
|
|
455
|
+
}, O));
|
|
456
|
+
}, _ = (R) => {
|
|
457
|
+
clearTimeout(H.current), x(!1);
|
|
458
|
+
const f = R !== void 0 ? R : Math.max(a.findIndex(($) => $.value === s), 0);
|
|
459
|
+
E(f), h(!0);
|
|
460
460
|
};
|
|
461
|
-
|
|
462
|
-
const
|
|
463
|
-
var
|
|
464
|
-
const
|
|
465
|
-
if (!
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
ne ? { bottom:
|
|
461
|
+
D(() => () => clearTimeout(H.current), []);
|
|
462
|
+
const y = () => {
|
|
463
|
+
var oe;
|
|
464
|
+
const R = (oe = M.current) == null ? void 0 : oe.getBoundingClientRect();
|
|
465
|
+
if (!R) return;
|
|
466
|
+
const f = window.innerHeight, $ = f - R.bottom, F = R.top, ne = $ < 300 && F > $;
|
|
467
|
+
k(ne ? "up" : "down"), g(
|
|
468
|
+
ne ? { bottom: f - R.top + 4, left: R.left, width: R.width } : { top: R.bottom + 4, left: R.left, width: R.width }
|
|
469
469
|
);
|
|
470
470
|
};
|
|
471
|
-
|
|
471
|
+
D(() => {
|
|
472
472
|
if (p)
|
|
473
|
-
return
|
|
474
|
-
window.removeEventListener("scroll",
|
|
473
|
+
return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
|
|
474
|
+
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
|
|
475
475
|
};
|
|
476
|
-
}, [p]),
|
|
477
|
-
const
|
|
478
|
-
|
|
476
|
+
}, [p]), D(() => {
|
|
477
|
+
const R = (f) => {
|
|
478
|
+
M.current && !M.current.contains(f.target) && L.current && !L.current.contains(f.target) && U();
|
|
479
479
|
};
|
|
480
|
-
return document.addEventListener("mousedown",
|
|
481
|
-
}, [
|
|
482
|
-
var
|
|
483
|
-
if (!p ||
|
|
484
|
-
(
|
|
485
|
-
}, [
|
|
486
|
-
const S = (
|
|
487
|
-
switch (
|
|
480
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
481
|
+
}, [c]), D(() => {
|
|
482
|
+
var f;
|
|
483
|
+
if (!p || j < 0 || !L.current) return;
|
|
484
|
+
(f = L.current.querySelectorAll(".ds-select-option")[j]) == null || f.scrollIntoView({ block: "nearest" });
|
|
485
|
+
}, [j, p]);
|
|
486
|
+
const S = (R) => {
|
|
487
|
+
switch (R.key) {
|
|
488
488
|
case "ArrowDown":
|
|
489
|
-
|
|
489
|
+
R.preventDefault(), p ? E((f) => Math.min(f + 1, a.length - 1)) : _();
|
|
490
490
|
break;
|
|
491
491
|
case "ArrowUp":
|
|
492
|
-
|
|
492
|
+
R.preventDefault(), p ? E((f) => Math.max(f - 1, 0)) : _(a.length - 1);
|
|
493
493
|
break;
|
|
494
494
|
case "Home":
|
|
495
|
-
p && (
|
|
495
|
+
p && (R.preventDefault(), E(0));
|
|
496
496
|
break;
|
|
497
497
|
case "End":
|
|
498
|
-
p && (
|
|
498
|
+
p && (R.preventDefault(), E(a.length - 1));
|
|
499
499
|
break;
|
|
500
500
|
case "Enter":
|
|
501
501
|
case " ":
|
|
502
|
-
|
|
502
|
+
R.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value), U(!0)) : _();
|
|
503
503
|
break;
|
|
504
504
|
case "Escape":
|
|
505
|
-
p && (
|
|
505
|
+
p && (R.preventDefault(), U(!0));
|
|
506
506
|
break;
|
|
507
507
|
case "Tab":
|
|
508
|
-
p &&
|
|
508
|
+
p && U(!1);
|
|
509
509
|
break;
|
|
510
510
|
}
|
|
511
|
-
},
|
|
511
|
+
}, C = a.find((R) => R.value === s), K = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], X = p && /* @__PURE__ */ e.jsx(
|
|
512
512
|
"div",
|
|
513
513
|
{
|
|
514
|
-
ref:
|
|
514
|
+
ref: L,
|
|
515
515
|
"data-ds-portal": "",
|
|
516
516
|
role: "listbox",
|
|
517
|
-
"aria-labelledby":
|
|
517
|
+
"aria-labelledby": t ? b : void 0,
|
|
518
518
|
tabIndex: -1,
|
|
519
519
|
className: [
|
|
520
520
|
"ds-select-dropdown ds-scrollable",
|
|
521
521
|
`ds-select-dropdown--${l}`,
|
|
522
|
-
`ds-select-dropdown--${
|
|
523
|
-
|
|
522
|
+
`ds-select-dropdown--${w}`,
|
|
523
|
+
c && "ds-select-dropdown--closing"
|
|
524
524
|
].filter(Boolean).join(" "),
|
|
525
|
-
style:
|
|
526
|
-
children:
|
|
525
|
+
style: v,
|
|
526
|
+
children: a.map((R, f) => /* @__PURE__ */ e.jsx(
|
|
527
527
|
"button",
|
|
528
528
|
{
|
|
529
|
-
id: `${
|
|
529
|
+
id: `${z}-opt-${f}`,
|
|
530
530
|
type: "button",
|
|
531
531
|
role: "option",
|
|
532
532
|
tabIndex: -1,
|
|
533
|
-
"aria-selected":
|
|
533
|
+
"aria-selected": s === R.value,
|
|
534
534
|
className: [
|
|
535
535
|
"ds-select-option",
|
|
536
536
|
`ds-select-option--${l}`,
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
s === R.value && "ds-select-option--selected",
|
|
538
|
+
f === j && "ds-select-option--active"
|
|
539
539
|
].filter(Boolean).join(" "),
|
|
540
540
|
onClick: () => {
|
|
541
|
-
n == null || n(
|
|
541
|
+
n == null || n(R.value), U(!0);
|
|
542
542
|
},
|
|
543
|
-
children:
|
|
543
|
+
children: R.label
|
|
544
544
|
},
|
|
545
|
-
|
|
545
|
+
R.value
|
|
546
546
|
))
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${
|
|
550
|
-
|
|
551
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref:
|
|
549
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${u ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
550
|
+
t && /* @__PURE__ */ e.jsx("label", { id: b, className: "ds-select-label", children: t }),
|
|
551
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: M, children: /* @__PURE__ */ e.jsxs(
|
|
552
552
|
"button",
|
|
553
553
|
{
|
|
554
|
-
ref:
|
|
554
|
+
ref: W,
|
|
555
555
|
type: "button",
|
|
556
|
-
id:
|
|
556
|
+
id: z,
|
|
557
557
|
role: "combobox",
|
|
558
558
|
"aria-haspopup": "listbox",
|
|
559
559
|
"aria-expanded": p,
|
|
560
|
-
"aria-activedescendant": p &&
|
|
561
|
-
"aria-labelledby":
|
|
560
|
+
"aria-activedescendant": p && j >= 0 ? `${z}-opt-${j}` : void 0,
|
|
561
|
+
"aria-labelledby": t ? b : void 0,
|
|
562
562
|
"aria-invalid": r ? "true" : "false",
|
|
563
|
-
"aria-describedby":
|
|
563
|
+
"aria-describedby": I,
|
|
564
564
|
className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
|
|
565
565
|
onClick: () => {
|
|
566
|
-
|
|
566
|
+
u || (p ? U() : _());
|
|
567
567
|
},
|
|
568
568
|
onKeyDown: S,
|
|
569
|
-
disabled:
|
|
570
|
-
...
|
|
569
|
+
disabled: u,
|
|
570
|
+
...m,
|
|
571
571
|
children: [
|
|
572
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
572
|
+
/* @__PURE__ */ e.jsx("span", { className: C ? "" : "ds-select-placeholder", children: (C == null ? void 0 : C.label) || o }),
|
|
573
573
|
/* @__PURE__ */ e.jsx(
|
|
574
|
-
|
|
574
|
+
_e,
|
|
575
575
|
{
|
|
576
576
|
size: K,
|
|
577
577
|
strokeWidth: 1.5,
|
|
578
|
-
className: `ds-select-icon ${p &&
|
|
578
|
+
className: `ds-select-icon ${p && w === "down" ? "ds-select-icon--open" : ""} ${p && w === "up" ? "ds-select-icon--up" : ""}`,
|
|
579
579
|
"aria-hidden": "true"
|
|
580
580
|
}
|
|
581
581
|
)
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
r && /* @__PURE__ */ e.jsx("span", { id:
|
|
586
|
-
typeof document < "u" &&
|
|
585
|
+
r && /* @__PURE__ */ e.jsx("span", { id: I, className: "ds-select-error", role: "alert", children: r }),
|
|
586
|
+
typeof document < "u" && he.createPortal(X, document.body)
|
|
587
587
|
] });
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
label:
|
|
591
|
-
value:
|
|
589
|
+
function ls({
|
|
590
|
+
label: t,
|
|
591
|
+
value: s = 0,
|
|
592
592
|
onChange: n,
|
|
593
|
-
min:
|
|
594
|
-
max:
|
|
593
|
+
min: a = 0,
|
|
594
|
+
max: o = 100,
|
|
595
595
|
step: r = 1,
|
|
596
596
|
size: i = "m",
|
|
597
597
|
disabled: l = !1,
|
|
598
|
-
hint:
|
|
598
|
+
hint: u,
|
|
599
599
|
error: d,
|
|
600
|
-
...
|
|
600
|
+
...m
|
|
601
601
|
}) {
|
|
602
602
|
const p = () => {
|
|
603
603
|
if (l) return;
|
|
604
|
-
const
|
|
605
|
-
n == null || n(
|
|
604
|
+
const w = Math.min(Number(s) + r, o);
|
|
605
|
+
n == null || n(w);
|
|
606
606
|
}, h = () => {
|
|
607
607
|
if (l) return;
|
|
608
|
-
const
|
|
609
|
-
n == null || n(
|
|
610
|
-
},
|
|
608
|
+
const w = Math.max(Number(s) - r, a);
|
|
609
|
+
n == null || n(w);
|
|
610
|
+
}, c = (w) => {
|
|
611
611
|
if (l) return;
|
|
612
|
-
const
|
|
613
|
-
if (
|
|
614
|
-
n == null || n(
|
|
612
|
+
const k = w.target.value;
|
|
613
|
+
if (k === "") {
|
|
614
|
+
n == null || n(a);
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
|
-
const
|
|
618
|
-
if (!isNaN(
|
|
619
|
-
const
|
|
620
|
-
n == null || n(
|
|
617
|
+
const j = Number(k);
|
|
618
|
+
if (!isNaN(j)) {
|
|
619
|
+
const E = Math.min(Math.max(j, a), o);
|
|
620
|
+
n == null || n(E);
|
|
621
621
|
}
|
|
622
|
-
},
|
|
622
|
+
}, x = [
|
|
623
623
|
"ds-stepper-wrapper",
|
|
624
624
|
l && "ds-stepper-wrapper--disabled",
|
|
625
625
|
d && "ds-stepper-wrapper--error"
|
|
626
|
-
].filter(Boolean).join(" "),
|
|
626
|
+
].filter(Boolean).join(" "), v = [
|
|
627
627
|
"ds-stepper",
|
|
628
628
|
`ds-stepper--${i}`,
|
|
629
629
|
l && "ds-stepper--disabled"
|
|
630
|
-
].filter(Boolean).join(" "),
|
|
631
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
632
|
-
|
|
633
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
630
|
+
].filter(Boolean).join(" "), g = i === "xs" ? P[1] : i === "small" ? P[2] : P[3];
|
|
631
|
+
return /* @__PURE__ */ e.jsxs("div", { className: x, children: [
|
|
632
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
633
|
+
/* @__PURE__ */ e.jsxs("div", { className: v, children: [
|
|
634
634
|
/* @__PURE__ */ e.jsx(
|
|
635
635
|
"button",
|
|
636
636
|
{
|
|
637
637
|
type: "button",
|
|
638
638
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
639
639
|
onClick: h,
|
|
640
|
-
disabled: l ||
|
|
640
|
+
disabled: l || s <= a,
|
|
641
641
|
"aria-label": "Decrease",
|
|
642
|
-
children: /* @__PURE__ */ e.jsx(
|
|
642
|
+
children: /* @__PURE__ */ e.jsx(tt, { size: g, strokeWidth: 1.5 })
|
|
643
643
|
}
|
|
644
644
|
),
|
|
645
645
|
/* @__PURE__ */ e.jsx(
|
|
@@ -647,13 +647,13 @@ function Hs({
|
|
|
647
647
|
{
|
|
648
648
|
type: "number",
|
|
649
649
|
className: "ds-stepper-input",
|
|
650
|
-
value:
|
|
651
|
-
onChange:
|
|
652
|
-
min:
|
|
653
|
-
max:
|
|
650
|
+
value: s,
|
|
651
|
+
onChange: c,
|
|
652
|
+
min: a,
|
|
653
|
+
max: o,
|
|
654
654
|
step: r,
|
|
655
655
|
disabled: l,
|
|
656
|
-
...
|
|
656
|
+
...m
|
|
657
657
|
}
|
|
658
658
|
),
|
|
659
659
|
/* @__PURE__ */ e.jsx(
|
|
@@ -662,228 +662,228 @@ function Hs({
|
|
|
662
662
|
type: "button",
|
|
663
663
|
className: "ds-stepper-button ds-stepper-button--plus",
|
|
664
664
|
onClick: p,
|
|
665
|
-
disabled: l ||
|
|
665
|
+
disabled: l || s >= o,
|
|
666
666
|
"aria-label": "Increase",
|
|
667
|
-
children: /* @__PURE__ */ e.jsx(
|
|
667
|
+
children: /* @__PURE__ */ e.jsx(st, { size: g, strokeWidth: 1.5 })
|
|
668
668
|
}
|
|
669
669
|
)
|
|
670
670
|
] }),
|
|
671
|
-
|
|
671
|
+
u && !d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: u }),
|
|
672
672
|
d && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: d })
|
|
673
673
|
] });
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
children:
|
|
677
|
-
padding:
|
|
675
|
+
function cs({
|
|
676
|
+
children: t,
|
|
677
|
+
padding: s = "m",
|
|
678
678
|
variant: n = "info",
|
|
679
|
-
hover:
|
|
679
|
+
hover: a = !1,
|
|
680
680
|
// deprecated, use variant="interactive"
|
|
681
|
-
onClick:
|
|
681
|
+
onClick: o,
|
|
682
682
|
href: r,
|
|
683
683
|
disabled: i = !1,
|
|
684
684
|
...l
|
|
685
685
|
}) {
|
|
686
|
-
const d = (
|
|
686
|
+
const d = (a ? "interactive" : n) === "interactive" || o || r, m = [
|
|
687
687
|
"ds-card",
|
|
688
|
-
`ds-card--${
|
|
688
|
+
`ds-card--${s}`,
|
|
689
689
|
d && "ds-card--interactive"
|
|
690
690
|
].filter(Boolean).join(" ");
|
|
691
691
|
if (r) {
|
|
692
|
-
const
|
|
692
|
+
const c = (x) => {
|
|
693
693
|
if (i) {
|
|
694
|
-
|
|
694
|
+
x.preventDefault();
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
x.metaKey || x.ctrlKey || x.button === 1 || (x.preventDefault(), o == null || o(x));
|
|
698
698
|
};
|
|
699
699
|
return /* @__PURE__ */ e.jsx(
|
|
700
700
|
"a",
|
|
701
701
|
{
|
|
702
|
-
className:
|
|
702
|
+
className: m,
|
|
703
703
|
href: i ? void 0 : r,
|
|
704
|
-
onClick:
|
|
704
|
+
onClick: c,
|
|
705
705
|
"aria-disabled": i ? "true" : void 0,
|
|
706
706
|
...l,
|
|
707
|
-
children:
|
|
707
|
+
children: t
|
|
708
708
|
}
|
|
709
709
|
);
|
|
710
710
|
}
|
|
711
|
-
const p = d &&
|
|
711
|
+
const p = d && o ? "button" : "div", h = d && o ? {
|
|
712
712
|
type: "button",
|
|
713
|
-
onClick:
|
|
713
|
+
onClick: o,
|
|
714
714
|
disabled: i
|
|
715
715
|
} : {};
|
|
716
716
|
return /* @__PURE__ */ e.jsx(
|
|
717
717
|
p,
|
|
718
718
|
{
|
|
719
|
-
className:
|
|
720
|
-
role: d && !
|
|
719
|
+
className: m,
|
|
720
|
+
role: d && !o ? "article" : void 0,
|
|
721
721
|
...h,
|
|
722
722
|
...l,
|
|
723
|
-
children:
|
|
723
|
+
children: t
|
|
724
724
|
}
|
|
725
725
|
);
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...
|
|
727
|
+
function ds({ children: t, ...s }) {
|
|
728
|
+
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...
|
|
730
|
+
function us({ children: t, ...s }) {
|
|
731
|
+
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...
|
|
733
|
+
function fs({ children: t, ...s }) {
|
|
734
|
+
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...
|
|
736
|
+
function ms({ children: t, ...s }) {
|
|
737
|
+
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${
|
|
739
|
+
function ps({ children: t, secondary: s = !1, ...n }) {
|
|
740
|
+
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${
|
|
742
|
+
function jt({ children: t, secondary: s = !1, ...n }) {
|
|
743
|
+
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${
|
|
745
|
+
function Ke({ children: t, secondary: s = !1, ...n }) {
|
|
746
|
+
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
children:
|
|
750
|
-
variant:
|
|
748
|
+
function ue({
|
|
749
|
+
children: t,
|
|
750
|
+
variant: s = "default",
|
|
751
751
|
size: n = "m",
|
|
752
|
-
role:
|
|
753
|
-
...
|
|
752
|
+
role: a,
|
|
753
|
+
...o
|
|
754
754
|
}) {
|
|
755
755
|
const r = [
|
|
756
756
|
"ds-badge",
|
|
757
|
-
`ds-badge--${
|
|
757
|
+
`ds-badge--${s}`,
|
|
758
758
|
`ds-badge--${n}`
|
|
759
|
-
].filter(Boolean).join(" "), i =
|
|
760
|
-
return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...
|
|
761
|
-
}
|
|
762
|
-
const
|
|
763
|
-
info:
|
|
764
|
-
success:
|
|
765
|
-
warning:
|
|
766
|
-
error:
|
|
759
|
+
].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
|
|
760
|
+
return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...o, children: t });
|
|
761
|
+
}
|
|
762
|
+
const Nt = {
|
|
763
|
+
info: Be,
|
|
764
|
+
success: Ae,
|
|
765
|
+
warning: Se,
|
|
766
|
+
error: Re
|
|
767
767
|
};
|
|
768
|
-
function
|
|
769
|
-
children:
|
|
770
|
-
variant:
|
|
768
|
+
function hs({
|
|
769
|
+
children: t,
|
|
770
|
+
variant: s = "info",
|
|
771
771
|
title: n,
|
|
772
|
-
onClose:
|
|
773
|
-
role:
|
|
772
|
+
onClose: a,
|
|
773
|
+
role: o,
|
|
774
774
|
...r
|
|
775
775
|
}) {
|
|
776
|
-
const i =
|
|
777
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${
|
|
778
|
-
i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size:
|
|
776
|
+
const i = Nt[s], l = o || (s === "error" ? "alert" : "status");
|
|
777
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${s} ${n ? "" : "ds-alert--no-title"}`, role: l, ...r, children: [
|
|
778
|
+
i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: P[3], strokeWidth: 1.5 }) }),
|
|
779
779
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
|
|
780
780
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: n }),
|
|
781
|
-
|
|
781
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: t })
|
|
782
782
|
] }),
|
|
783
|
-
|
|
783
|
+
a && /* @__PURE__ */ e.jsx(
|
|
784
784
|
"button",
|
|
785
785
|
{
|
|
786
786
|
type: "button",
|
|
787
787
|
className: "ds-alert__close",
|
|
788
|
-
onClick:
|
|
788
|
+
onClick: a,
|
|
789
789
|
"aria-label": "Close alert",
|
|
790
|
-
children: /* @__PURE__ */ e.jsx(
|
|
790
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: P[3], strokeWidth: 1.5 })
|
|
791
791
|
}
|
|
792
792
|
)
|
|
793
793
|
] });
|
|
794
794
|
}
|
|
795
|
-
const
|
|
796
|
-
function
|
|
797
|
-
children:
|
|
798
|
-
title:
|
|
795
|
+
const gt = 200;
|
|
796
|
+
function xs({
|
|
797
|
+
children: t,
|
|
798
|
+
title: s,
|
|
799
799
|
onClose: n,
|
|
800
|
-
size:
|
|
801
|
-
scrollable:
|
|
800
|
+
size: a = "m",
|
|
801
|
+
scrollable: o = !1,
|
|
802
802
|
subHeader: r,
|
|
803
803
|
...i
|
|
804
804
|
}) {
|
|
805
|
-
const l = T(null),
|
|
806
|
-
!n || d || (
|
|
807
|
-
|
|
808
|
-
},
|
|
805
|
+
const l = T(null), u = Y.useId(), [d, m] = A(!1), p = () => {
|
|
806
|
+
!n || d || (m(!0), setTimeout(() => {
|
|
807
|
+
m(!1), n();
|
|
808
|
+
}, gt));
|
|
809
809
|
};
|
|
810
|
-
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
var
|
|
815
|
-
const
|
|
816
|
-
l.current && !l.current.contains(
|
|
810
|
+
D(() => {
|
|
811
|
+
const v = (w) => {
|
|
812
|
+
w.key === "Escape" && p();
|
|
813
|
+
}, g = (w) => {
|
|
814
|
+
var j, E, M;
|
|
815
|
+
const k = ((E = (j = w.composedPath) == null ? void 0 : j.call(w)) == null ? void 0 : E[0]) ?? w.target;
|
|
816
|
+
l.current && !l.current.contains(k) && !((M = k.closest) != null && M.call(k, "[data-ds-portal]")) && p();
|
|
817
817
|
};
|
|
818
|
-
return document.addEventListener("keydown",
|
|
819
|
-
document.removeEventListener("keydown",
|
|
818
|
+
return document.addEventListener("keydown", v), document.addEventListener("mousedown", g), () => {
|
|
819
|
+
document.removeEventListener("keydown", v), document.removeEventListener("mousedown", g);
|
|
820
820
|
};
|
|
821
821
|
}, [n, d]);
|
|
822
|
-
const h =
|
|
822
|
+
const h = Y.Children.toArray(t), c = h.find((v) => (v == null ? void 0 : v.type) === me), x = h.filter((v) => (v == null ? void 0 : v.type) !== me);
|
|
823
823
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
|
|
824
824
|
"div",
|
|
825
825
|
{
|
|
826
|
-
className: [`ds-modal ds-modal--${
|
|
826
|
+
className: [`ds-modal ds-modal--${a}`, o && "ds-modal--scrollable"].filter(Boolean).join(" "),
|
|
827
827
|
ref: l,
|
|
828
828
|
role: "dialog",
|
|
829
829
|
"aria-modal": "true",
|
|
830
|
-
"aria-labelledby":
|
|
830
|
+
"aria-labelledby": s ? u : void 0,
|
|
831
831
|
children: [
|
|
832
832
|
n && /* @__PURE__ */ e.jsx(
|
|
833
|
-
|
|
833
|
+
ae,
|
|
834
834
|
{
|
|
835
835
|
className: "ds-modal__close",
|
|
836
836
|
variant: "ghost",
|
|
837
837
|
size: "small",
|
|
838
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
838
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
|
|
839
839
|
onClick: p,
|
|
840
840
|
"aria-label": "Close modal"
|
|
841
841
|
}
|
|
842
842
|
),
|
|
843
|
-
(
|
|
844
|
-
|
|
843
|
+
(s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
|
|
844
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-modal__title", children: s }),
|
|
845
845
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
|
|
846
846
|
] }),
|
|
847
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children:
|
|
848
|
-
|
|
847
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: x }),
|
|
848
|
+
c
|
|
849
849
|
]
|
|
850
850
|
}
|
|
851
851
|
) });
|
|
852
852
|
}
|
|
853
|
-
function
|
|
854
|
-
return !
|
|
853
|
+
function me({ children: t }) {
|
|
854
|
+
return !t || Y.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
|
|
855
855
|
}
|
|
856
|
-
const
|
|
857
|
-
function
|
|
858
|
-
children:
|
|
859
|
-
title:
|
|
856
|
+
const wt = 320;
|
|
857
|
+
function vs({
|
|
858
|
+
children: t,
|
|
859
|
+
title: s,
|
|
860
860
|
onClose: n,
|
|
861
|
-
subHeader:
|
|
862
|
-
...
|
|
861
|
+
subHeader: a,
|
|
862
|
+
...o
|
|
863
863
|
}) {
|
|
864
|
-
const r = T(null), i =
|
|
865
|
-
!n || l || (
|
|
866
|
-
|
|
867
|
-
},
|
|
864
|
+
const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
|
|
865
|
+
!n || l || (u(!0), setTimeout(() => {
|
|
866
|
+
u(!1), n();
|
|
867
|
+
}, wt));
|
|
868
868
|
};
|
|
869
|
-
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
},
|
|
873
|
-
var
|
|
874
|
-
const
|
|
875
|
-
r.current && !r.current.contains(
|
|
869
|
+
D(() => {
|
|
870
|
+
const c = (v) => {
|
|
871
|
+
v.key === "Escape" && d();
|
|
872
|
+
}, x = (v) => {
|
|
873
|
+
var w, k, j;
|
|
874
|
+
const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
|
|
875
|
+
r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
|
|
876
876
|
};
|
|
877
|
-
return document.addEventListener("keydown",
|
|
878
|
-
document.removeEventListener("keydown",
|
|
877
|
+
return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
|
|
878
|
+
document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
|
|
879
879
|
};
|
|
880
880
|
}, [n, l]);
|
|
881
|
-
const
|
|
881
|
+
const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === me), h = m.filter((c) => (c == null ? void 0 : c.type) !== me);
|
|
882
882
|
return /* @__PURE__ */ e.jsx(
|
|
883
883
|
"div",
|
|
884
884
|
{
|
|
885
885
|
className: ["ds-bottom-sheet-overlay", l && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
|
|
886
|
-
...
|
|
886
|
+
...o,
|
|
887
887
|
children: /* @__PURE__ */ e.jsxs(
|
|
888
888
|
"div",
|
|
889
889
|
{
|
|
@@ -891,23 +891,23 @@ function tt({
|
|
|
891
891
|
className: ["ds-bottom-sheet", l && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
|
|
892
892
|
role: "dialog",
|
|
893
893
|
"aria-modal": "true",
|
|
894
|
-
"aria-labelledby":
|
|
894
|
+
"aria-labelledby": s ? i : void 0,
|
|
895
895
|
children: [
|
|
896
896
|
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__handle", "aria-hidden": "true" }),
|
|
897
897
|
n && /* @__PURE__ */ e.jsx(
|
|
898
|
-
|
|
898
|
+
ae,
|
|
899
899
|
{
|
|
900
900
|
className: "ds-bottom-sheet__close",
|
|
901
901
|
variant: "ghost",
|
|
902
902
|
size: "small",
|
|
903
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
903
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
|
|
904
904
|
onClick: d,
|
|
905
905
|
"aria-label": "Close"
|
|
906
906
|
}
|
|
907
907
|
),
|
|
908
|
-
(
|
|
909
|
-
|
|
910
|
-
|
|
908
|
+
(s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
|
|
909
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: s }),
|
|
910
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: a })
|
|
911
911
|
] }),
|
|
912
912
|
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: h }),
|
|
913
913
|
p
|
|
@@ -917,25 +917,25 @@ function tt({
|
|
|
917
917
|
}
|
|
918
918
|
);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
children:
|
|
922
|
-
title:
|
|
920
|
+
function yt({
|
|
921
|
+
children: t,
|
|
922
|
+
title: s = "Code",
|
|
923
923
|
defaultExpanded: n = !1,
|
|
924
|
-
expanded:
|
|
925
|
-
onToggle:
|
|
924
|
+
expanded: a,
|
|
925
|
+
onToggle: o,
|
|
926
926
|
padding: r = "s",
|
|
927
927
|
className: i = "",
|
|
928
928
|
...l
|
|
929
929
|
}) {
|
|
930
|
-
const [
|
|
931
|
-
|
|
932
|
-
},
|
|
930
|
+
const [u, d] = A(n), m = a !== void 0, p = m ? a : u, h = () => {
|
|
931
|
+
m ? o == null || o(!a) : d((x) => !x);
|
|
932
|
+
}, c = [
|
|
933
933
|
"ds-code-accordion",
|
|
934
934
|
`ds-code-accordion--${r}`,
|
|
935
935
|
p && "ds-code-accordion--expanded",
|
|
936
936
|
i
|
|
937
937
|
].filter(Boolean).join(" ");
|
|
938
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
938
|
+
return /* @__PURE__ */ e.jsxs("div", { className: c, ...l, children: [
|
|
939
939
|
/* @__PURE__ */ e.jsxs(
|
|
940
940
|
"button",
|
|
941
941
|
{
|
|
@@ -944,11 +944,11 @@ function ps({
|
|
|
944
944
|
onClick: h,
|
|
945
945
|
"aria-expanded": p,
|
|
946
946
|
children: [
|
|
947
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children:
|
|
947
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: s }),
|
|
948
948
|
/* @__PURE__ */ e.jsx(
|
|
949
|
-
|
|
949
|
+
_e,
|
|
950
950
|
{
|
|
951
|
-
size:
|
|
951
|
+
size: P[2],
|
|
952
952
|
strokeWidth: 1.5,
|
|
953
953
|
className: `ds-code-accordion__icon ${p ? "ds-code-accordion__icon--expanded" : ""}`
|
|
954
954
|
}
|
|
@@ -956,59 +956,59 @@ function ps({
|
|
|
956
956
|
]
|
|
957
957
|
}
|
|
958
958
|
),
|
|
959
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children:
|
|
959
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
|
|
960
960
|
] });
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
962
|
+
function _s({ children: t, block: s = !1, collapsible: n = !1, title: a = "Code", defaultExpanded: o = !1, ...r }) {
|
|
963
|
+
return s ? n ? /* @__PURE__ */ e.jsx(yt, { title: a, defaultExpanded: o, ...r, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: t });
|
|
964
964
|
}
|
|
965
|
-
function
|
|
966
|
-
const l =
|
|
965
|
+
function bs({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
|
|
966
|
+
const l = a === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
|
|
967
967
|
return /* @__PURE__ */ e.jsx(
|
|
968
968
|
"a",
|
|
969
969
|
{
|
|
970
|
-
href:
|
|
970
|
+
href: t,
|
|
971
971
|
className: "ds-link",
|
|
972
972
|
onClick: n,
|
|
973
|
-
target:
|
|
973
|
+
target: a,
|
|
974
974
|
rel: l,
|
|
975
975
|
...r,
|
|
976
|
-
children:
|
|
976
|
+
children: s
|
|
977
977
|
}
|
|
978
978
|
);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
981
|
-
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...
|
|
980
|
+
function js({ children: t, size: s = "m", variant: n = "ghost", ...a }) {
|
|
981
|
+
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: Y.Children.map(t, (o) => Y.isValidElement(o) ? Y.cloneElement(o, { size: s, variant: n }) : o) });
|
|
982
982
|
}
|
|
983
|
-
function
|
|
984
|
-
const d = i && !
|
|
983
|
+
function Ns({ children: t, selected: s = !1, onClick: n, size: a = "m", variant: o = "ghost", disabled: r = !1, icon: i, href: l, ...u }) {
|
|
984
|
+
const d = i && !t, m = [
|
|
985
985
|
"ds-tab",
|
|
986
|
-
`ds-tab--${o}`,
|
|
987
986
|
`ds-tab--${a}`,
|
|
988
|
-
|
|
987
|
+
`ds-tab--${o}`,
|
|
988
|
+
s && "ds-tab--selected",
|
|
989
989
|
d && "ds-tab--icon-only"
|
|
990
990
|
].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
991
991
|
i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
|
|
992
|
-
|
|
992
|
+
t
|
|
993
993
|
] });
|
|
994
994
|
if (l) {
|
|
995
|
-
const h = (
|
|
995
|
+
const h = (c) => {
|
|
996
996
|
if (r) {
|
|
997
|
-
|
|
997
|
+
c.preventDefault();
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
|
-
|
|
1000
|
+
c.metaKey || c.ctrlKey || c.button === 1 || (c.preventDefault(), n == null || n(c));
|
|
1001
1001
|
};
|
|
1002
1002
|
return /* @__PURE__ */ e.jsx(
|
|
1003
1003
|
"a",
|
|
1004
1004
|
{
|
|
1005
1005
|
role: "tab",
|
|
1006
|
-
"aria-current":
|
|
1006
|
+
"aria-current": s ? "page" : void 0,
|
|
1007
1007
|
"aria-disabled": r ? "true" : void 0,
|
|
1008
|
-
className:
|
|
1008
|
+
className: m,
|
|
1009
1009
|
href: r ? void 0 : l,
|
|
1010
1010
|
onClick: h,
|
|
1011
|
-
...
|
|
1011
|
+
...u,
|
|
1012
1012
|
children: p
|
|
1013
1013
|
}
|
|
1014
1014
|
);
|
|
@@ -1017,45 +1017,45 @@ function ot({ children: s, selected: t = !1, onClick: n, size: o = "m", variant:
|
|
|
1017
1017
|
"button",
|
|
1018
1018
|
{
|
|
1019
1019
|
role: "tab",
|
|
1020
|
-
"aria-selected":
|
|
1021
|
-
className:
|
|
1020
|
+
"aria-selected": s,
|
|
1021
|
+
className: m,
|
|
1022
1022
|
onClick: n,
|
|
1023
1023
|
disabled: r,
|
|
1024
|
-
...
|
|
1024
|
+
...u,
|
|
1025
1025
|
children: p
|
|
1026
1026
|
}
|
|
1027
1027
|
);
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const r = T(null), i = T(null), [l,
|
|
1029
|
+
function gs({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1 }) {
|
|
1030
|
+
const r = T(null), i = T(null), [l, u] = A(!1), d = T(!1), m = T(null), p = T(null), h = () => {
|
|
1031
1031
|
if (!r.current) return;
|
|
1032
|
-
const
|
|
1033
|
-
if (!
|
|
1034
|
-
const
|
|
1035
|
-
i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left =
|
|
1032
|
+
const c = r.current.querySelector(`[data-value="${s}"]`);
|
|
1033
|
+
if (!c) return;
|
|
1034
|
+
const x = r.current.getBoundingClientRect(), v = c.getBoundingClientRect(), g = v.left - x.left, w = v.width;
|
|
1035
|
+
i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = w + "px", d.current = !1) : (u(!0), requestAnimationFrame(() => {
|
|
1036
1036
|
if (!i.current || !r.current) return;
|
|
1037
|
-
const
|
|
1038
|
-
if (!
|
|
1039
|
-
const
|
|
1040
|
-
i.current.style.transition = "none", i.current.style.left =
|
|
1037
|
+
const k = r.current.querySelector(`[data-value="${s}"]`);
|
|
1038
|
+
if (!k) return;
|
|
1039
|
+
const j = r.current.getBoundingClientRect(), E = k.getBoundingClientRect();
|
|
1040
|
+
i.current.style.transition = "none", i.current.style.left = E.left - j.left + "px", i.current.style.width = E.width + "px";
|
|
1041
1041
|
}));
|
|
1042
1042
|
};
|
|
1043
|
-
return p.current = h,
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
}),
|
|
1043
|
+
return p.current = h, Qe(() => {
|
|
1044
|
+
const c = m.current !== s;
|
|
1045
|
+
m.current = s, d.current = l && c, h();
|
|
1046
|
+
}), D(() => {
|
|
1047
1047
|
if (!r.current) return;
|
|
1048
|
-
const
|
|
1048
|
+
const c = new ResizeObserver(() => {
|
|
1049
1049
|
d.current = !1, p.current();
|
|
1050
1050
|
});
|
|
1051
|
-
return
|
|
1051
|
+
return c.observe(r.current), () => c.disconnect();
|
|
1052
1052
|
}, []), /* @__PURE__ */ e.jsxs(
|
|
1053
1053
|
"div",
|
|
1054
1054
|
{
|
|
1055
1055
|
className: [
|
|
1056
1056
|
"ds-seg",
|
|
1057
|
-
`ds-seg--${
|
|
1058
|
-
|
|
1057
|
+
`ds-seg--${a}`,
|
|
1058
|
+
o && "ds-seg--disabled"
|
|
1059
1059
|
].filter(Boolean).join(" "),
|
|
1060
1060
|
ref: r,
|
|
1061
1061
|
role: "group",
|
|
@@ -1068,41 +1068,41 @@ function it({ options: s, value: t, onChange: n, size: o = "m", disabled: a = !1
|
|
|
1068
1068
|
"aria-hidden": "true"
|
|
1069
1069
|
}
|
|
1070
1070
|
),
|
|
1071
|
-
|
|
1071
|
+
t.map((c) => /* @__PURE__ */ e.jsxs(
|
|
1072
1072
|
"button",
|
|
1073
1073
|
{
|
|
1074
1074
|
type: "button",
|
|
1075
|
-
"data-value":
|
|
1076
|
-
className: ["ds-seg__btn",
|
|
1077
|
-
onClick: () => !
|
|
1078
|
-
"aria-pressed":
|
|
1079
|
-
disabled:
|
|
1075
|
+
"data-value": c.value,
|
|
1076
|
+
className: ["ds-seg__btn", s === c.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
|
|
1077
|
+
onClick: () => !o && n(c.value),
|
|
1078
|
+
"aria-pressed": s === c.value,
|
|
1079
|
+
disabled: o,
|
|
1080
1080
|
children: [
|
|
1081
|
-
|
|
1082
|
-
|
|
1081
|
+
c.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: c.icon }),
|
|
1082
|
+
c.label
|
|
1083
1083
|
]
|
|
1084
1084
|
},
|
|
1085
|
-
|
|
1085
|
+
c.value
|
|
1086
1086
|
))
|
|
1087
1087
|
]
|
|
1088
1088
|
}
|
|
1089
1089
|
);
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1092
|
-
children:
|
|
1093
|
-
title:
|
|
1091
|
+
function De({
|
|
1092
|
+
children: t,
|
|
1093
|
+
title: s,
|
|
1094
1094
|
defaultExpanded: n = !1,
|
|
1095
|
-
expanded:
|
|
1096
|
-
onToggle:
|
|
1095
|
+
expanded: a,
|
|
1096
|
+
onToggle: o,
|
|
1097
1097
|
padding: r = "m",
|
|
1098
1098
|
...i
|
|
1099
1099
|
}) {
|
|
1100
|
-
const [l,
|
|
1101
|
-
d ?
|
|
1100
|
+
const [l, u] = A(n), d = a !== void 0, m = d ? a : l, p = () => {
|
|
1101
|
+
d ? o == null || o(!a) : u((c) => !c);
|
|
1102
1102
|
}, h = [
|
|
1103
1103
|
"ds-accordion",
|
|
1104
1104
|
`ds-accordion--${r}`,
|
|
1105
|
-
|
|
1105
|
+
m && "ds-accordion--expanded"
|
|
1106
1106
|
].filter(Boolean).join(" ");
|
|
1107
1107
|
return /* @__PURE__ */ e.jsxs("div", { className: h, ...i, children: [
|
|
1108
1108
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -1111,96 +1111,96 @@ function $e({
|
|
|
1111
1111
|
type: "button",
|
|
1112
1112
|
className: "ds-accordion__header",
|
|
1113
1113
|
onClick: p,
|
|
1114
|
-
"aria-expanded":
|
|
1114
|
+
"aria-expanded": m,
|
|
1115
1115
|
children: [
|
|
1116
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children:
|
|
1116
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: s }),
|
|
1117
1117
|
/* @__PURE__ */ e.jsx(
|
|
1118
|
-
|
|
1118
|
+
_e,
|
|
1119
1119
|
{
|
|
1120
|
-
size:
|
|
1120
|
+
size: P[2],
|
|
1121
1121
|
strokeWidth: 1.5,
|
|
1122
|
-
className: `ds-accordion__icon ${
|
|
1122
|
+
className: `ds-accordion__icon ${m ? "ds-accordion__icon--expanded" : ""}`
|
|
1123
1123
|
}
|
|
1124
1124
|
)
|
|
1125
1125
|
]
|
|
1126
1126
|
}
|
|
1127
1127
|
),
|
|
1128
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children:
|
|
1128
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children: t }) }) })
|
|
1129
1129
|
] });
|
|
1130
1130
|
}
|
|
1131
|
-
const re = 8,
|
|
1132
|
-
function
|
|
1133
|
-
const
|
|
1134
|
-
let
|
|
1135
|
-
switch (
|
|
1131
|
+
const re = 8, fe = 8;
|
|
1132
|
+
function kt(t, s, n) {
|
|
1133
|
+
const a = window.innerWidth;
|
|
1134
|
+
let o, r;
|
|
1135
|
+
switch (t) {
|
|
1136
1136
|
case "top":
|
|
1137
|
-
|
|
1137
|
+
o = s.top - n.height - re, r = s.left + s.width / 2 - n.width / 2;
|
|
1138
1138
|
break;
|
|
1139
1139
|
case "bottom":
|
|
1140
|
-
|
|
1140
|
+
o = s.bottom + re, r = s.left + s.width / 2 - n.width / 2;
|
|
1141
1141
|
break;
|
|
1142
1142
|
case "left":
|
|
1143
|
-
|
|
1143
|
+
o = s.top + s.height / 2 - n.height / 2, r = s.left - n.width - re;
|
|
1144
1144
|
break;
|
|
1145
1145
|
case "right":
|
|
1146
|
-
|
|
1146
|
+
o = s.top + s.height / 2 - n.height / 2, r = s.right + re;
|
|
1147
1147
|
break;
|
|
1148
1148
|
default:
|
|
1149
|
-
|
|
1149
|
+
o = s.bottom + re, r = s.left;
|
|
1150
1150
|
}
|
|
1151
|
-
const i = Math.max(
|
|
1152
|
-
return { top:
|
|
1153
|
-
}
|
|
1154
|
-
function
|
|
1155
|
-
const
|
|
1156
|
-
if (
|
|
1157
|
-
if (
|
|
1158
|
-
if (
|
|
1159
|
-
if (
|
|
1160
|
-
const r = Math.max(
|
|
1161
|
-
return r ===
|
|
1162
|
-
}
|
|
1163
|
-
function
|
|
1164
|
-
const [
|
|
1165
|
-
if (!
|
|
1166
|
-
const
|
|
1167
|
-
d(
|
|
1151
|
+
const i = Math.max(fe, Math.min(a - n.width - fe, r)), l = r - i;
|
|
1152
|
+
return { top: o, left: i, arrowOffset: l };
|
|
1153
|
+
}
|
|
1154
|
+
function Et(t, s, n) {
|
|
1155
|
+
const a = window.innerWidth, o = window.innerHeight;
|
|
1156
|
+
if (t.top >= s + re + fe) return "top";
|
|
1157
|
+
if (o - t.bottom >= s + re + fe) return "bottom";
|
|
1158
|
+
if (a - t.right >= n + re + fe) return "right";
|
|
1159
|
+
if (t.left >= n + re + fe) return "left";
|
|
1160
|
+
const r = Math.max(t.top, o - t.bottom, t.left, a - t.right);
|
|
1161
|
+
return r === t.top ? "top" : r === o - t.bottom ? "bottom" : r === a - t.right ? "right" : "left";
|
|
1162
|
+
}
|
|
1163
|
+
function Ge({ children: t, content: s, position: n, ...a }) {
|
|
1164
|
+
const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u, d] = A(n || "top"), m = T(null), p = T(null), h = T(!1), c = () => {
|
|
1165
|
+
if (!m.current || !p.current) return;
|
|
1166
|
+
const v = m.current.getBoundingClientRect(), g = p.current.getBoundingClientRect(), w = n || Et(v, g.height, g.width), { top: k, left: j, arrowOffset: E } = kt(w, v, g);
|
|
1167
|
+
d(w), l({
|
|
1168
1168
|
position: "fixed",
|
|
1169
|
-
top:
|
|
1170
|
-
left:
|
|
1169
|
+
top: k,
|
|
1170
|
+
left: j,
|
|
1171
1171
|
visibility: "visible",
|
|
1172
|
-
"--arrow-offset": `${
|
|
1172
|
+
"--arrow-offset": `${E}px`
|
|
1173
1173
|
});
|
|
1174
1174
|
};
|
|
1175
|
-
if (
|
|
1176
|
-
if (!
|
|
1175
|
+
if (D(() => {
|
|
1176
|
+
if (!o) return;
|
|
1177
1177
|
l({ position: "fixed", visibility: "hidden" });
|
|
1178
|
-
const
|
|
1179
|
-
return window.addEventListener("scroll",
|
|
1180
|
-
cancelAnimationFrame(
|
|
1178
|
+
const v = requestAnimationFrame(c);
|
|
1179
|
+
return window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
|
|
1180
|
+
cancelAnimationFrame(v), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
|
|
1181
1181
|
};
|
|
1182
|
-
}, [
|
|
1183
|
-
if (!
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1182
|
+
}, [o, n]), D(() => {
|
|
1183
|
+
if (!o) return;
|
|
1184
|
+
const v = (g) => {
|
|
1185
|
+
m.current && !m.current.contains(g.target) && r(!1);
|
|
1186
1186
|
};
|
|
1187
|
-
return document.addEventListener("touchstart",
|
|
1188
|
-
}, [
|
|
1189
|
-
const
|
|
1187
|
+
return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
|
|
1188
|
+
}, [o]), !s) return t;
|
|
1189
|
+
const x = o && /* @__PURE__ */ e.jsx(
|
|
1190
1190
|
"div",
|
|
1191
1191
|
{
|
|
1192
1192
|
ref: p,
|
|
1193
1193
|
"data-ds-portal": "",
|
|
1194
|
-
className: `ds-tooltip ds-tooltip--${
|
|
1194
|
+
className: `ds-tooltip ds-tooltip--${u}`,
|
|
1195
1195
|
role: "tooltip",
|
|
1196
1196
|
style: i,
|
|
1197
|
-
children:
|
|
1197
|
+
children: s
|
|
1198
1198
|
}
|
|
1199
1199
|
);
|
|
1200
1200
|
return /* @__PURE__ */ e.jsxs(
|
|
1201
1201
|
"div",
|
|
1202
1202
|
{
|
|
1203
|
-
ref:
|
|
1203
|
+
ref: m,
|
|
1204
1204
|
className: "ds-tooltip-wrapper",
|
|
1205
1205
|
onMouseEnter: () => {
|
|
1206
1206
|
h.current || r(!0);
|
|
@@ -1209,387 +1209,387 @@ function lt({ children: s, content: t, position: n, ...o }) {
|
|
|
1209
1209
|
h.current || r(!1);
|
|
1210
1210
|
},
|
|
1211
1211
|
onTouchStart: () => {
|
|
1212
|
-
h.current = !0, r((
|
|
1212
|
+
h.current = !0, r((v) => !v);
|
|
1213
1213
|
},
|
|
1214
|
-
...
|
|
1214
|
+
...a,
|
|
1215
1215
|
children: [
|
|
1216
|
-
|
|
1217
|
-
typeof document < "u" &&
|
|
1216
|
+
t,
|
|
1217
|
+
typeof document < "u" && he.createPortal(x, document.body)
|
|
1218
1218
|
]
|
|
1219
1219
|
}
|
|
1220
1220
|
);
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1223
|
-
checked:
|
|
1224
|
-
onChange:
|
|
1222
|
+
function ws({
|
|
1223
|
+
checked: t = !1,
|
|
1224
|
+
onChange: s,
|
|
1225
1225
|
size: n = "m",
|
|
1226
|
-
disabled:
|
|
1227
|
-
label:
|
|
1226
|
+
disabled: a = !1,
|
|
1227
|
+
label: o,
|
|
1228
1228
|
id: r,
|
|
1229
1229
|
...i
|
|
1230
1230
|
}) {
|
|
1231
|
-
const l = r || `toggle-${
|
|
1231
|
+
const l = r || `toggle-${Y.useId()}`, u = [
|
|
1232
1232
|
"ds-toggle",
|
|
1233
1233
|
`ds-toggle--${n}`,
|
|
1234
|
-
|
|
1234
|
+
a && "ds-toggle--disabled"
|
|
1235
1235
|
].filter(Boolean).join(" ");
|
|
1236
|
-
return /* @__PURE__ */ e.jsxs("label", { className:
|
|
1236
|
+
return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: l, children: [
|
|
1237
1237
|
/* @__PURE__ */ e.jsx(
|
|
1238
1238
|
"input",
|
|
1239
1239
|
{
|
|
1240
1240
|
type: "checkbox",
|
|
1241
1241
|
id: l,
|
|
1242
1242
|
className: "ds-toggle__input",
|
|
1243
|
-
checked:
|
|
1244
|
-
onChange: (d) =>
|
|
1245
|
-
disabled:
|
|
1243
|
+
checked: t,
|
|
1244
|
+
onChange: (d) => s == null ? void 0 : s(d.target.checked),
|
|
1245
|
+
disabled: a,
|
|
1246
1246
|
...i
|
|
1247
1247
|
}
|
|
1248
1248
|
),
|
|
1249
1249
|
/* @__PURE__ */ e.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__thumb" }) }),
|
|
1250
|
-
|
|
1250
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: o })
|
|
1251
1251
|
] });
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1254
|
-
checked:
|
|
1255
|
-
onChange:
|
|
1253
|
+
function ys({
|
|
1254
|
+
checked: t = !1,
|
|
1255
|
+
onChange: s,
|
|
1256
1256
|
size: n = "m",
|
|
1257
|
-
disabled:
|
|
1258
|
-
label:
|
|
1257
|
+
disabled: a = !1,
|
|
1258
|
+
label: o,
|
|
1259
1259
|
id: r,
|
|
1260
1260
|
...i
|
|
1261
1261
|
}) {
|
|
1262
|
-
const l = r || `checkbox-${
|
|
1262
|
+
const l = r || `checkbox-${Y.useId()}`, u = [
|
|
1263
1263
|
"ds-checkbox",
|
|
1264
1264
|
`ds-checkbox--${n}`,
|
|
1265
|
-
|
|
1265
|
+
a && "ds-checkbox--disabled"
|
|
1266
1266
|
].filter(Boolean).join(" "), d = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
|
|
1267
|
-
return /* @__PURE__ */ e.jsxs("label", { className:
|
|
1267
|
+
return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: l, children: [
|
|
1268
1268
|
/* @__PURE__ */ e.jsx(
|
|
1269
1269
|
"input",
|
|
1270
1270
|
{
|
|
1271
1271
|
type: "checkbox",
|
|
1272
1272
|
id: l,
|
|
1273
1273
|
className: "ds-checkbox__input",
|
|
1274
|
-
checked:
|
|
1275
|
-
onChange: (
|
|
1276
|
-
disabled:
|
|
1274
|
+
checked: t,
|
|
1275
|
+
onChange: (m) => s == null ? void 0 : s(m.target.checked),
|
|
1276
|
+
disabled: a,
|
|
1277
1277
|
...i
|
|
1278
1278
|
}
|
|
1279
1279
|
),
|
|
1280
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children:
|
|
1281
|
-
|
|
1280
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
|
|
1281
|
+
Te,
|
|
1282
1282
|
{
|
|
1283
1283
|
size: d,
|
|
1284
1284
|
strokeWidth: 2.5,
|
|
1285
1285
|
className: "ds-checkbox__icon"
|
|
1286
1286
|
}
|
|
1287
1287
|
) }),
|
|
1288
|
-
|
|
1288
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: o })
|
|
1289
1289
|
] });
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1292
|
-
checked:
|
|
1293
|
-
onChange:
|
|
1291
|
+
function ks({
|
|
1292
|
+
checked: t = !1,
|
|
1293
|
+
onChange: s,
|
|
1294
1294
|
size: n = "m",
|
|
1295
|
-
disabled:
|
|
1296
|
-
label:
|
|
1295
|
+
disabled: a = !1,
|
|
1296
|
+
label: o,
|
|
1297
1297
|
name: r,
|
|
1298
1298
|
value: i,
|
|
1299
1299
|
id: l,
|
|
1300
|
-
...
|
|
1300
|
+
...u
|
|
1301
1301
|
}) {
|
|
1302
|
-
const d = l || `radio-${
|
|
1302
|
+
const d = l || `radio-${Y.useId()}`, m = [
|
|
1303
1303
|
"ds-radio",
|
|
1304
1304
|
`ds-radio--${n}`,
|
|
1305
|
-
|
|
1305
|
+
a && "ds-radio--disabled"
|
|
1306
1306
|
].filter(Boolean).join(" ");
|
|
1307
|
-
return /* @__PURE__ */ e.jsxs("label", { className:
|
|
1307
|
+
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: d, children: [
|
|
1308
1308
|
/* @__PURE__ */ e.jsx(
|
|
1309
1309
|
"input",
|
|
1310
1310
|
{
|
|
1311
1311
|
type: "radio",
|
|
1312
1312
|
id: d,
|
|
1313
1313
|
className: "ds-radio__input",
|
|
1314
|
-
checked:
|
|
1315
|
-
onChange: (p) =>
|
|
1316
|
-
disabled:
|
|
1314
|
+
checked: t,
|
|
1315
|
+
onChange: (p) => s == null ? void 0 : s(p.target.checked),
|
|
1316
|
+
disabled: a,
|
|
1317
1317
|
name: r,
|
|
1318
1318
|
value: i,
|
|
1319
|
-
...
|
|
1319
|
+
...u
|
|
1320
1320
|
}
|
|
1321
1321
|
),
|
|
1322
1322
|
/* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
|
|
1323
|
-
|
|
1323
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
|
|
1324
1324
|
] });
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function $t({ width: t, height: s, shape: n = "rect", aspectRatio: a, className: o = "", style: r = {}, ...i }) {
|
|
1327
1327
|
return /* @__PURE__ */ e.jsx(
|
|
1328
1328
|
"span",
|
|
1329
1329
|
{
|
|
1330
|
-
className: ["ds-skeleton", `ds-skeleton--${n}`,
|
|
1331
|
-
style: { width:
|
|
1330
|
+
className: ["ds-skeleton", `ds-skeleton--${n}`, o].filter(Boolean).join(" "),
|
|
1331
|
+
style: { width: t, height: s, aspectRatio: a, ...r },
|
|
1332
1332
|
"aria-hidden": "true",
|
|
1333
1333
|
...i
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Tt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "", style: o = {}, ...r }) {
|
|
1338
1338
|
return /* @__PURE__ */ e.jsx(
|
|
1339
1339
|
"span",
|
|
1340
1340
|
{
|
|
1341
|
-
className: ["ds-skeleton-text",
|
|
1342
|
-
style: { gap: n, ...
|
|
1341
|
+
className: ["ds-skeleton-text", a].filter(Boolean).join(" "),
|
|
1342
|
+
style: { gap: n, ...o },
|
|
1343
1343
|
"aria-hidden": "true",
|
|
1344
1344
|
...r,
|
|
1345
|
-
children: Array.from({ length:
|
|
1345
|
+
children: Array.from({ length: t }, (i, l) => /* @__PURE__ */ e.jsx(
|
|
1346
1346
|
"span",
|
|
1347
1347
|
{
|
|
1348
1348
|
className: "ds-skeleton ds-skeleton--text",
|
|
1349
|
-
style: l ===
|
|
1349
|
+
style: l === t - 1 && t > 1 ? { width: s } : void 0
|
|
1350
1350
|
},
|
|
1351
1351
|
l
|
|
1352
1352
|
))
|
|
1353
1353
|
}
|
|
1354
1354
|
);
|
|
1355
1355
|
}
|
|
1356
|
-
|
|
1357
|
-
function
|
|
1358
|
-
let
|
|
1359
|
-
for (let n = 0; n <
|
|
1360
|
-
|
|
1361
|
-
return
|
|
1356
|
+
$t.Text = Tt;
|
|
1357
|
+
function Rt(t) {
|
|
1358
|
+
let s = 2166136261;
|
|
1359
|
+
for (let n = 0; n < t.length; n++)
|
|
1360
|
+
s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
|
|
1361
|
+
return s % 360;
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1364
|
-
if (!
|
|
1365
|
-
const
|
|
1366
|
-
return
|
|
1363
|
+
function St(t) {
|
|
1364
|
+
if (!t) return "";
|
|
1365
|
+
const s = t.trim().split(/\s+/);
|
|
1366
|
+
return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1369
|
-
const l =
|
|
1368
|
+
function Es({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style: r = {}, ...i }) {
|
|
1369
|
+
const l = Rt(t ?? ""), [u, d] = A(!1), m = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: St(t) });
|
|
1370
1370
|
return /* @__PURE__ */ e.jsx(
|
|
1371
1371
|
"div",
|
|
1372
1372
|
{
|
|
1373
|
-
className: ["ds-avatar",
|
|
1374
|
-
style: { width:
|
|
1373
|
+
className: ["ds-avatar", o].filter(Boolean).join(" "),
|
|
1374
|
+
style: { width: a, height: a, "--ds-avatar-h": l, ...r },
|
|
1375
1375
|
"aria-hidden": "true",
|
|
1376
1376
|
...i,
|
|
1377
|
-
children: n && !
|
|
1377
|
+
children: n && !u ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => d(!0) }) : m
|
|
1378
1378
|
}
|
|
1379
1379
|
);
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
children:
|
|
1383
|
-
size:
|
|
1381
|
+
function $s({
|
|
1382
|
+
children: t,
|
|
1383
|
+
size: s = "compact",
|
|
1384
1384
|
stickyTop: n,
|
|
1385
|
-
maxHeight:
|
|
1386
|
-
className:
|
|
1385
|
+
maxHeight: a,
|
|
1386
|
+
className: o = "",
|
|
1387
1387
|
style: r = {},
|
|
1388
1388
|
...i
|
|
1389
1389
|
}) {
|
|
1390
1390
|
const l = {
|
|
1391
|
-
...
|
|
1391
|
+
...a ? { maxHeight: a } : {},
|
|
1392
1392
|
...n !== void 0 ? { "--ds-table-sticky-top": typeof n == "number" ? `${n}px` : n } : {},
|
|
1393
1393
|
...r
|
|
1394
1394
|
};
|
|
1395
1395
|
return /* @__PURE__ */ e.jsx(
|
|
1396
1396
|
"div",
|
|
1397
1397
|
{
|
|
1398
|
-
className: ["ds-table-wrap", "ds-scrollable",
|
|
1398
|
+
className: ["ds-table-wrap", "ds-scrollable", a ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
|
|
1399
1399
|
style: l,
|
|
1400
1400
|
children: /* @__PURE__ */ e.jsx(
|
|
1401
1401
|
"table",
|
|
1402
1402
|
{
|
|
1403
|
-
className: ["ds-table", `ds-table--${
|
|
1403
|
+
className: ["ds-table", `ds-table--${s}`, o].filter(Boolean).join(" "),
|
|
1404
1404
|
...i,
|
|
1405
|
-
children:
|
|
1405
|
+
children: t
|
|
1406
1406
|
}
|
|
1407
1407
|
)
|
|
1408
1408
|
}
|
|
1409
1409
|
);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
return /* @__PURE__ */ e.jsx("thead", { ...
|
|
1411
|
+
function Ts({ children: t, ...s }) {
|
|
1412
|
+
return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return /* @__PURE__ */ e.jsx("tbody", { ...
|
|
1414
|
+
function Rs({ children: t, ...s }) {
|
|
1415
|
+
return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function Ss({ children: t, interactive: s, selected: n, subheader: a, exiting: o, updated: r, className: i = "", onClick: l, ...u }) {
|
|
1418
1418
|
return /* @__PURE__ */ e.jsx(
|
|
1419
1419
|
"tr",
|
|
1420
1420
|
{
|
|
1421
1421
|
className: [
|
|
1422
1422
|
"ds-table-row",
|
|
1423
|
-
|
|
1423
|
+
s || l ? "ds-table-row--interactive" : "",
|
|
1424
1424
|
n ? "ds-table-row--selected" : "",
|
|
1425
|
-
|
|
1426
|
-
|
|
1425
|
+
a ? "ds-table-row--subheader" : "",
|
|
1426
|
+
o ? "ds-table-row--exiting" : "",
|
|
1427
1427
|
r ? "ds-table-row--updated" : "",
|
|
1428
1428
|
i
|
|
1429
1429
|
].filter(Boolean).join(" "),
|
|
1430
1430
|
onClick: l,
|
|
1431
|
-
...
|
|
1432
|
-
children:
|
|
1431
|
+
...u,
|
|
1432
|
+
children: t
|
|
1433
1433
|
}
|
|
1434
1434
|
);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan:
|
|
1436
|
+
function As({ children: t, colSpan: s = 999, ...n }) {
|
|
1437
|
+
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
const
|
|
1439
|
+
function Bs({ children: t, align: s = "left", sortDir: n, onSort: a, width: o, className: r = "", style: i = {}, ...l }) {
|
|
1440
|
+
const u = !!a || n !== void 0, d = n === "asc" ? nt : n === "desc" ? _e : rt;
|
|
1441
1441
|
return /* @__PURE__ */ e.jsx(
|
|
1442
1442
|
"th",
|
|
1443
1443
|
{
|
|
1444
1444
|
className: [
|
|
1445
1445
|
"ds-th",
|
|
1446
|
-
|
|
1446
|
+
u ? "ds-th--sortable" : "",
|
|
1447
1447
|
n ? "ds-th--sorted" : "",
|
|
1448
|
-
|
|
1448
|
+
s !== "left" ? `ds-table-cell--${s}` : "",
|
|
1449
1449
|
r
|
|
1450
1450
|
].filter(Boolean).join(" "),
|
|
1451
|
-
onClick:
|
|
1452
|
-
style: { width:
|
|
1451
|
+
onClick: a,
|
|
1452
|
+
style: { width: o, ...i },
|
|
1453
1453
|
...l,
|
|
1454
|
-
children:
|
|
1455
|
-
|
|
1454
|
+
children: u ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
|
|
1455
|
+
t,
|
|
1456
1456
|
/* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(d, { size: 11, strokeWidth: 2.5 }) })
|
|
1457
|
-
] }) :
|
|
1457
|
+
] }) : t
|
|
1458
1458
|
}
|
|
1459
1459
|
);
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function Ds({ children: t, align: s = "left", secondary: n, muted: a, truncate: o, nowrap: r, className: i = "", ...l }) {
|
|
1462
1462
|
return /* @__PURE__ */ e.jsx(
|
|
1463
1463
|
"td",
|
|
1464
1464
|
{
|
|
1465
1465
|
className: [
|
|
1466
1466
|
"ds-td",
|
|
1467
|
-
|
|
1467
|
+
s !== "left" ? `ds-table-cell--${s}` : "",
|
|
1468
1468
|
n ? "ds-table-cell--secondary" : "",
|
|
1469
|
-
|
|
1470
|
-
|
|
1469
|
+
a ? "ds-table-cell--muted" : "",
|
|
1470
|
+
o ? "ds-table-cell--truncate" : "",
|
|
1471
1471
|
r ? "ds-table-cell--nowrap" : "",
|
|
1472
1472
|
i
|
|
1473
1473
|
].filter(Boolean).join(" "),
|
|
1474
1474
|
...l,
|
|
1475
|
-
children:
|
|
1475
|
+
children: t
|
|
1476
1476
|
}
|
|
1477
1477
|
);
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1480
|
-
icon:
|
|
1481
|
-
title:
|
|
1479
|
+
function Is({
|
|
1480
|
+
icon: t,
|
|
1481
|
+
title: s,
|
|
1482
1482
|
description: n,
|
|
1483
|
-
action:
|
|
1484
|
-
size:
|
|
1483
|
+
action: a,
|
|
1484
|
+
size: o = "m",
|
|
1485
1485
|
className: r = "",
|
|
1486
1486
|
...i
|
|
1487
1487
|
}) {
|
|
1488
1488
|
return /* @__PURE__ */ e.jsxs(
|
|
1489
1489
|
"div",
|
|
1490
1490
|
{
|
|
1491
|
-
className: ["ds-empty-state", `ds-empty-state--${
|
|
1491
|
+
className: ["ds-empty-state", `ds-empty-state--${o}`, r].filter(Boolean).join(" "),
|
|
1492
1492
|
...i,
|
|
1493
1493
|
children: [
|
|
1494
|
-
|
|
1495
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children:
|
|
1494
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: t }),
|
|
1495
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: s }),
|
|
1496
1496
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: n }),
|
|
1497
|
-
|
|
1497
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: a })
|
|
1498
1498
|
]
|
|
1499
1499
|
}
|
|
1500
1500
|
);
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1503
|
-
label:
|
|
1504
|
-
hint:
|
|
1502
|
+
function Ls({
|
|
1503
|
+
label: t,
|
|
1504
|
+
hint: s,
|
|
1505
1505
|
error: n,
|
|
1506
|
-
required:
|
|
1507
|
-
disabled:
|
|
1506
|
+
required: a = !1,
|
|
1507
|
+
disabled: o = !1,
|
|
1508
1508
|
htmlFor: r,
|
|
1509
1509
|
children: i,
|
|
1510
1510
|
className: l = "",
|
|
1511
|
-
style:
|
|
1511
|
+
style: u,
|
|
1512
1512
|
...d
|
|
1513
1513
|
}) {
|
|
1514
|
-
const
|
|
1514
|
+
const m = Y.useId(), p = r ?? m, h = `${p}-hint`, c = `${p}-error`;
|
|
1515
1515
|
return /* @__PURE__ */ e.jsxs(
|
|
1516
1516
|
"div",
|
|
1517
1517
|
{
|
|
1518
1518
|
className: `ds-field${l ? ` ${l}` : ""}`,
|
|
1519
1519
|
"data-state": n ? "error" : void 0,
|
|
1520
|
-
"data-required":
|
|
1521
|
-
"data-disabled":
|
|
1522
|
-
style:
|
|
1520
|
+
"data-required": a ? "" : void 0,
|
|
1521
|
+
"data-disabled": o ? "" : void 0,
|
|
1522
|
+
style: u,
|
|
1523
1523
|
...d,
|
|
1524
1524
|
children: [
|
|
1525
|
-
|
|
1525
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: t }),
|
|
1526
1526
|
/* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
|
|
1527
|
-
|
|
1528
|
-
n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id:
|
|
1527
|
+
s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: s }),
|
|
1528
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: c, role: "alert", children: n })
|
|
1529
1529
|
]
|
|
1530
1530
|
}
|
|
1531
1531
|
);
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1534
|
-
const
|
|
1533
|
+
function Ps({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, className: r = "", style: i, ...l }) {
|
|
1534
|
+
const u = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
|
|
1535
1535
|
return /* @__PURE__ */ e.jsxs(
|
|
1536
1536
|
"div",
|
|
1537
1537
|
{
|
|
1538
1538
|
className: [
|
|
1539
1539
|
"ds-stat",
|
|
1540
|
-
`ds-stat--${
|
|
1541
|
-
|
|
1540
|
+
`ds-stat--${a}`,
|
|
1541
|
+
o && "ds-stat--inline",
|
|
1542
1542
|
r
|
|
1543
1543
|
].filter(Boolean).join(" "),
|
|
1544
1544
|
style: i,
|
|
1545
1545
|
...l,
|
|
1546
1546
|
children: [
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${
|
|
1547
|
+
t && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: t }),
|
|
1548
|
+
s != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: s }),
|
|
1549
|
+
n != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${u}`, children: n })
|
|
1550
1550
|
]
|
|
1551
1551
|
}
|
|
1552
1552
|
);
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1555
|
-
children:
|
|
1556
|
-
separator:
|
|
1554
|
+
function Ms({
|
|
1555
|
+
children: t,
|
|
1556
|
+
separator: s = "/",
|
|
1557
1557
|
"aria-label": n = "Breadcrumb",
|
|
1558
|
-
className:
|
|
1559
|
-
style:
|
|
1558
|
+
className: a = "",
|
|
1559
|
+
style: o,
|
|
1560
1560
|
...r
|
|
1561
1561
|
}) {
|
|
1562
|
-
const i =
|
|
1562
|
+
const i = Y.Children.toArray(t).filter(Boolean);
|
|
1563
1563
|
return /* @__PURE__ */ e.jsx(
|
|
1564
1564
|
"nav",
|
|
1565
1565
|
{
|
|
1566
|
-
className: `ds-breadcrumb${
|
|
1566
|
+
className: `ds-breadcrumb${a ? ` ${a}` : ""}`,
|
|
1567
1567
|
"aria-label": n,
|
|
1568
|
-
style:
|
|
1568
|
+
style: o,
|
|
1569
1569
|
...r,
|
|
1570
|
-
children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l,
|
|
1570
|
+
children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((l, u) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
|
|
1571
1571
|
l,
|
|
1572
|
-
|
|
1573
|
-
] },
|
|
1572
|
+
u < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
|
|
1573
|
+
] }, u)) })
|
|
1574
1574
|
}
|
|
1575
1575
|
);
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1578
|
-
page:
|
|
1579
|
-
total:
|
|
1577
|
+
function zs({
|
|
1578
|
+
page: t,
|
|
1579
|
+
total: s,
|
|
1580
1580
|
onChange: n,
|
|
1581
|
-
siblings:
|
|
1582
|
-
"aria-label":
|
|
1581
|
+
siblings: a = 1,
|
|
1582
|
+
"aria-label": o = "Pagination",
|
|
1583
1583
|
className: r = "",
|
|
1584
1584
|
style: i,
|
|
1585
1585
|
...l
|
|
1586
1586
|
}) {
|
|
1587
|
-
const
|
|
1587
|
+
const u = At(t, s, a);
|
|
1588
1588
|
return /* @__PURE__ */ e.jsxs(
|
|
1589
1589
|
"nav",
|
|
1590
1590
|
{
|
|
1591
1591
|
className: `ds-pagination${r ? ` ${r}` : ""}`,
|
|
1592
|
-
"aria-label":
|
|
1592
|
+
"aria-label": o,
|
|
1593
1593
|
style: i,
|
|
1594
1594
|
...l,
|
|
1595
1595
|
children: [
|
|
@@ -1597,19 +1597,19 @@ function yt({
|
|
|
1597
1597
|
"button",
|
|
1598
1598
|
{
|
|
1599
1599
|
className: "ds-pagination-arrow",
|
|
1600
|
-
onClick: () => n == null ? void 0 : n(
|
|
1601
|
-
disabled:
|
|
1600
|
+
onClick: () => n == null ? void 0 : n(t - 1),
|
|
1601
|
+
disabled: t <= 1,
|
|
1602
1602
|
"aria-label": "Previous page",
|
|
1603
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1603
|
+
children: /* @__PURE__ */ e.jsx(at, { size: 16 })
|
|
1604
1604
|
}
|
|
1605
1605
|
),
|
|
1606
|
-
|
|
1607
|
-
(d,
|
|
1606
|
+
u.map(
|
|
1607
|
+
(d, m) => d === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${m}`) : /* @__PURE__ */ e.jsx(
|
|
1608
1608
|
"button",
|
|
1609
1609
|
{
|
|
1610
|
-
className: `ds-pagination-page${d ===
|
|
1611
|
-
onClick: () => d !==
|
|
1612
|
-
"aria-current": d ===
|
|
1610
|
+
className: `ds-pagination-page${d === t ? " ds-pagination-page--current" : ""}`,
|
|
1611
|
+
onClick: () => d !== t && (n == null ? void 0 : n(d)),
|
|
1612
|
+
"aria-current": d === t ? "page" : void 0,
|
|
1613
1613
|
"aria-label": `Page ${d}`,
|
|
1614
1614
|
children: d
|
|
1615
1615
|
},
|
|
@@ -1620,67 +1620,67 @@ function yt({
|
|
|
1620
1620
|
"button",
|
|
1621
1621
|
{
|
|
1622
1622
|
className: "ds-pagination-arrow",
|
|
1623
|
-
onClick: () => n == null ? void 0 : n(
|
|
1624
|
-
disabled:
|
|
1623
|
+
onClick: () => n == null ? void 0 : n(t + 1),
|
|
1624
|
+
disabled: t >= s,
|
|
1625
1625
|
"aria-label": "Next page",
|
|
1626
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1626
|
+
children: /* @__PURE__ */ e.jsx(ot, { size: 16 })
|
|
1627
1627
|
}
|
|
1628
1628
|
)
|
|
1629
1629
|
]
|
|
1630
1630
|
}
|
|
1631
1631
|
);
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1634
|
-
if (
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
for (let i =
|
|
1638
|
-
return
|
|
1639
|
-
}
|
|
1640
|
-
const
|
|
1641
|
-
function
|
|
1642
|
-
children:
|
|
1643
|
-
title:
|
|
1633
|
+
function At(t, s, n) {
|
|
1634
|
+
if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
|
|
1635
|
+
const a = Math.max(2, t - n), o = Math.min(s - 1, t + n), r = [1];
|
|
1636
|
+
a > 2 && r.push("…");
|
|
1637
|
+
for (let i = a; i <= o; i++) r.push(i);
|
|
1638
|
+
return o < s - 1 && r.push("…"), r.push(s), r;
|
|
1639
|
+
}
|
|
1640
|
+
const Bt = 200;
|
|
1641
|
+
function Cs({
|
|
1642
|
+
children: t,
|
|
1643
|
+
title: s,
|
|
1644
1644
|
onClose: n,
|
|
1645
|
-
side:
|
|
1646
|
-
...
|
|
1645
|
+
side: a = "right",
|
|
1646
|
+
...o
|
|
1647
1647
|
}) {
|
|
1648
|
-
const r = T(null), i =
|
|
1649
|
-
!n || l || (
|
|
1650
|
-
|
|
1651
|
-
},
|
|
1648
|
+
const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
|
|
1649
|
+
!n || l || (u(!0), setTimeout(() => {
|
|
1650
|
+
u(!1), n();
|
|
1651
|
+
}, Bt));
|
|
1652
1652
|
};
|
|
1653
|
-
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
-
},
|
|
1657
|
-
var
|
|
1658
|
-
const
|
|
1659
|
-
r.current && !r.current.contains(
|
|
1653
|
+
D(() => {
|
|
1654
|
+
const c = (v) => {
|
|
1655
|
+
v.key === "Escape" && d();
|
|
1656
|
+
}, x = (v) => {
|
|
1657
|
+
var w, k, j;
|
|
1658
|
+
const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
|
|
1659
|
+
r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
|
|
1660
1660
|
};
|
|
1661
|
-
return document.addEventListener("keydown",
|
|
1662
|
-
document.removeEventListener("keydown",
|
|
1661
|
+
return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
|
|
1662
|
+
document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
|
|
1663
1663
|
};
|
|
1664
1664
|
}, [n, l]);
|
|
1665
|
-
const
|
|
1665
|
+
const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Oe), h = m.filter((c) => (c == null ? void 0 : c.type) !== Oe);
|
|
1666
1666
|
return /* @__PURE__ */ e.jsx(
|
|
1667
1667
|
"div",
|
|
1668
1668
|
{
|
|
1669
1669
|
className: ["ds-drawer-overlay", l && "ds-drawer-overlay--closing"].filter(Boolean).join(" "),
|
|
1670
|
-
...
|
|
1670
|
+
...o,
|
|
1671
1671
|
children: /* @__PURE__ */ e.jsxs(
|
|
1672
1672
|
"aside",
|
|
1673
1673
|
{
|
|
1674
1674
|
className: ["ds-drawer", l && "ds-drawer--closing"].filter(Boolean).join(" "),
|
|
1675
|
-
"data-side":
|
|
1675
|
+
"data-side": a,
|
|
1676
1676
|
ref: r,
|
|
1677
1677
|
role: "dialog",
|
|
1678
1678
|
"aria-modal": "true",
|
|
1679
|
-
"aria-labelledby":
|
|
1679
|
+
"aria-labelledby": s ? i : void 0,
|
|
1680
1680
|
children: [
|
|
1681
1681
|
/* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
|
|
1682
|
-
|
|
1683
|
-
n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(
|
|
1682
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: s }),
|
|
1683
|
+
n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: d, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }) })
|
|
1684
1684
|
] }),
|
|
1685
1685
|
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: h }),
|
|
1686
1686
|
p
|
|
@@ -1690,195 +1690,370 @@ function kt({
|
|
|
1690
1690
|
}
|
|
1691
1691
|
);
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1694
|
-
return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children:
|
|
1693
|
+
function Oe({ children: t }) {
|
|
1694
|
+
return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: t });
|
|
1695
|
+
}
|
|
1696
|
+
const Dt = 320;
|
|
1697
|
+
function Os({
|
|
1698
|
+
children: t,
|
|
1699
|
+
title: s,
|
|
1700
|
+
onClose: n,
|
|
1701
|
+
subHeader: a,
|
|
1702
|
+
...o
|
|
1703
|
+
}) {
|
|
1704
|
+
const r = T(null), i = Y.useId(), [l, u] = A(!1), d = () => {
|
|
1705
|
+
!n || l || (u(!0), setTimeout(() => {
|
|
1706
|
+
u(!1), n();
|
|
1707
|
+
}, Dt));
|
|
1708
|
+
};
|
|
1709
|
+
D(() => {
|
|
1710
|
+
const c = (v) => {
|
|
1711
|
+
v.key === "Escape" && d();
|
|
1712
|
+
}, x = (v) => {
|
|
1713
|
+
var w, k, j;
|
|
1714
|
+
const g = ((k = (w = v.composedPath) == null ? void 0 : w.call(v)) == null ? void 0 : k[0]) ?? v.target;
|
|
1715
|
+
r.current && !r.current.contains(g) && !((j = g.closest) != null && j.call(g, "[data-ds-portal]")) && d();
|
|
1716
|
+
};
|
|
1717
|
+
return document.addEventListener("keydown", c), document.addEventListener("mousedown", x), () => {
|
|
1718
|
+
document.removeEventListener("keydown", c), document.removeEventListener("mousedown", x);
|
|
1719
|
+
};
|
|
1720
|
+
}, [n, l]);
|
|
1721
|
+
const m = Y.Children.toArray(t), p = m.find((c) => (c == null ? void 0 : c.type) === Fe || (c == null ? void 0 : c.type) === me), h = m.filter((c) => (c == null ? void 0 : c.type) !== Fe && (c == null ? void 0 : c.type) !== me);
|
|
1722
|
+
return /* @__PURE__ */ e.jsx(
|
|
1723
|
+
"div",
|
|
1724
|
+
{
|
|
1725
|
+
className: ["ds-side-page-overlay", l && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
|
|
1726
|
+
...o,
|
|
1727
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
1728
|
+
"div",
|
|
1729
|
+
{
|
|
1730
|
+
ref: r,
|
|
1731
|
+
className: ["ds-side-page", l && "ds-side-page--closing"].filter(Boolean).join(" "),
|
|
1732
|
+
role: "dialog",
|
|
1733
|
+
"aria-modal": "true",
|
|
1734
|
+
"aria-labelledby": s ? i : void 0,
|
|
1735
|
+
children: [
|
|
1736
|
+
n && /* @__PURE__ */ e.jsx(
|
|
1737
|
+
ae,
|
|
1738
|
+
{
|
|
1739
|
+
className: "ds-side-page__close",
|
|
1740
|
+
variant: "ghost",
|
|
1741
|
+
size: "small",
|
|
1742
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
|
|
1743
|
+
onClick: d,
|
|
1744
|
+
"aria-label": "Close"
|
|
1745
|
+
}
|
|
1746
|
+
),
|
|
1747
|
+
(s || a) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
|
|
1748
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-side-page__title", children: s }),
|
|
1749
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: a })
|
|
1750
|
+
] }),
|
|
1751
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: h }),
|
|
1752
|
+
p
|
|
1753
|
+
]
|
|
1754
|
+
}
|
|
1755
|
+
)
|
|
1756
|
+
}
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
function Fe({ children: t }) {
|
|
1760
|
+
return !t || Y.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
|
|
1761
|
+
}
|
|
1762
|
+
const je = et({ collapsed: !1, side: "left" });
|
|
1763
|
+
function Fs({
|
|
1764
|
+
children: t,
|
|
1765
|
+
collapsed: s = !1,
|
|
1766
|
+
side: n = "left",
|
|
1767
|
+
className: a = "",
|
|
1768
|
+
...o
|
|
1769
|
+
}) {
|
|
1770
|
+
const r = [
|
|
1771
|
+
"ds-nav-rail",
|
|
1772
|
+
s && "ds-nav-rail--collapsed",
|
|
1773
|
+
`ds-nav-rail--${n}`,
|
|
1774
|
+
a
|
|
1775
|
+
].filter(Boolean).join(" ");
|
|
1776
|
+
return /* @__PURE__ */ e.jsx(je.Provider, { value: { collapsed: s, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: r, ...o, children: t }) });
|
|
1777
|
+
}
|
|
1778
|
+
function Ws({
|
|
1779
|
+
icon: t,
|
|
1780
|
+
label: s,
|
|
1781
|
+
selected: n = !1,
|
|
1782
|
+
disabled: a = !1,
|
|
1783
|
+
href: o,
|
|
1784
|
+
onClick: r,
|
|
1785
|
+
count: i,
|
|
1786
|
+
updated: l = !1,
|
|
1787
|
+
open: u = !1,
|
|
1788
|
+
onboarding: d = !1,
|
|
1789
|
+
className: m = "",
|
|
1790
|
+
...p
|
|
1791
|
+
}) {
|
|
1792
|
+
const { collapsed: h, side: c } = $e(je), g = {
|
|
1793
|
+
className: [
|
|
1794
|
+
"ds-nav-rail__item",
|
|
1795
|
+
m
|
|
1796
|
+
].filter(Boolean).join(" "),
|
|
1797
|
+
onClick: a ? void 0 : r,
|
|
1798
|
+
"aria-current": n ? "page" : void 0,
|
|
1799
|
+
"aria-disabled": a ? "true" : void 0,
|
|
1800
|
+
"aria-label": h ? s : void 0,
|
|
1801
|
+
tabIndex: a ? -1 : void 0,
|
|
1802
|
+
...{
|
|
1803
|
+
"data-selected": n || void 0,
|
|
1804
|
+
"data-disabled": a || void 0,
|
|
1805
|
+
"data-open": u || void 0,
|
|
1806
|
+
"data-onboarding": d || void 0
|
|
1807
|
+
},
|
|
1808
|
+
...p
|
|
1809
|
+
}, w = i != null, k = c === "left" ? "right" : "left", j = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1810
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
1811
|
+
!h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
|
|
1812
|
+
!h && l && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
|
|
1813
|
+
!h && w && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
|
|
1814
|
+
h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
|
|
1815
|
+
] }), E = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...g, children: j }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...g, children: j });
|
|
1816
|
+
return h ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: k, children: E }) : E;
|
|
1817
|
+
}
|
|
1818
|
+
function Us({ children: t, className: s = "", ...n }) {
|
|
1819
|
+
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1820
|
+
}
|
|
1821
|
+
function Vs({ children: t, className: s = "", ...n }) {
|
|
1822
|
+
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1823
|
+
}
|
|
1824
|
+
function Ys({ children: t, className: s = "", ...n }) {
|
|
1825
|
+
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1826
|
+
}
|
|
1827
|
+
function qs({ className: t = "", ...s }) {
|
|
1828
|
+
return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
|
|
1829
|
+
}
|
|
1830
|
+
function Hs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: a = "", ...o }) {
|
|
1831
|
+
const { collapsed: r } = $e(je), [i, l] = A(n);
|
|
1832
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", a].filter(Boolean).join(" "), ...o, children: [
|
|
1833
|
+
!r && /* @__PURE__ */ e.jsxs(
|
|
1834
|
+
"button",
|
|
1835
|
+
{
|
|
1836
|
+
type: "button",
|
|
1837
|
+
className: ["ds-nav-rail__recents-toggle", !i && "ds-nav-rail__recents-toggle--closed"].filter(Boolean).join(" "),
|
|
1838
|
+
onClick: () => l((u) => !u),
|
|
1839
|
+
"aria-expanded": i,
|
|
1840
|
+
children: [
|
|
1841
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__recents-label", children: s }),
|
|
1842
|
+
/* @__PURE__ */ e.jsx(_e, { size: 12, strokeWidth: 2, className: "ds-nav-rail__recents-chevron", "aria-hidden": "true" })
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
),
|
|
1846
|
+
(i || r) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
|
|
1847
|
+
] });
|
|
1695
1848
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1849
|
+
function Ks({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o, onClick: r, className: i = "", ...l }) {
|
|
1850
|
+
const { collapsed: u, side: d } = $e(je), h = {
|
|
1851
|
+
className: [
|
|
1852
|
+
"ds-nav-rail__item",
|
|
1853
|
+
"ds-nav-rail__agent",
|
|
1854
|
+
i
|
|
1855
|
+
].filter(Boolean).join(" "),
|
|
1856
|
+
onClick: a ? void 0 : r,
|
|
1857
|
+
"aria-current": n ? "page" : void 0,
|
|
1858
|
+
"aria-disabled": a ? "true" : void 0,
|
|
1859
|
+
tabIndex: a ? -1 : void 0,
|
|
1860
|
+
...{
|
|
1861
|
+
"data-selected": n || void 0,
|
|
1862
|
+
"data-disabled": a || void 0
|
|
1863
|
+
},
|
|
1864
|
+
...l
|
|
1865
|
+
}, c = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1866
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
1867
|
+
!u && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
|
|
1868
|
+
] }), x = d === "left" ? "right" : "left", v = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: c }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: c });
|
|
1869
|
+
return u ? /* @__PURE__ */ e.jsx(Ge, { content: s, position: x, children: v }) : v;
|
|
1870
|
+
}
|
|
1871
|
+
const It = {
|
|
1872
|
+
info: Be,
|
|
1873
|
+
success: Ae,
|
|
1874
|
+
warning: Se,
|
|
1875
|
+
error: Re
|
|
1701
1876
|
};
|
|
1702
|
-
function
|
|
1703
|
-
children:
|
|
1704
|
-
variant:
|
|
1877
|
+
function Gs({
|
|
1878
|
+
children: t,
|
|
1879
|
+
variant: s = "info",
|
|
1705
1880
|
action: n,
|
|
1706
|
-
onAction:
|
|
1707
|
-
onDismiss:
|
|
1881
|
+
onAction: a,
|
|
1882
|
+
onDismiss: o,
|
|
1708
1883
|
role: r,
|
|
1709
1884
|
...i
|
|
1710
1885
|
}) {
|
|
1711
|
-
const l =
|
|
1886
|
+
const l = It[s], u = r || (s === "error" ? "alert" : "status");
|
|
1712
1887
|
return /* @__PURE__ */ e.jsxs(
|
|
1713
1888
|
"div",
|
|
1714
1889
|
{
|
|
1715
|
-
className: `ds-banner ds-banner--${
|
|
1716
|
-
role:
|
|
1890
|
+
className: `ds-banner ds-banner--${s}`,
|
|
1891
|
+
role: u,
|
|
1717
1892
|
...i,
|
|
1718
1893
|
children: [
|
|
1719
|
-
l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size:
|
|
1720
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children:
|
|
1894
|
+
l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: P[2], strokeWidth: 1.5 }) }),
|
|
1895
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: t }),
|
|
1721
1896
|
n && /* @__PURE__ */ e.jsx(
|
|
1722
1897
|
"button",
|
|
1723
1898
|
{
|
|
1724
1899
|
type: "button",
|
|
1725
1900
|
className: "ds-banner-action",
|
|
1726
|
-
onClick:
|
|
1901
|
+
onClick: a,
|
|
1727
1902
|
children: n
|
|
1728
1903
|
}
|
|
1729
1904
|
),
|
|
1730
|
-
|
|
1905
|
+
o && /* @__PURE__ */ e.jsx(
|
|
1731
1906
|
"button",
|
|
1732
1907
|
{
|
|
1733
1908
|
type: "button",
|
|
1734
1909
|
className: "ds-banner-dismiss",
|
|
1735
|
-
onClick:
|
|
1910
|
+
onClick: o,
|
|
1736
1911
|
"aria-label": "Dismiss",
|
|
1737
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1912
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 })
|
|
1738
1913
|
}
|
|
1739
1914
|
)
|
|
1740
1915
|
]
|
|
1741
1916
|
}
|
|
1742
1917
|
);
|
|
1743
1918
|
}
|
|
1744
|
-
function
|
|
1745
|
-
trigger:
|
|
1746
|
-
items:
|
|
1919
|
+
function Xs({
|
|
1920
|
+
trigger: t,
|
|
1921
|
+
items: s = [],
|
|
1747
1922
|
open: n,
|
|
1748
|
-
onOpenChange:
|
|
1749
|
-
align:
|
|
1923
|
+
onOpenChange: a,
|
|
1924
|
+
align: o = "left",
|
|
1750
1925
|
className: r = "",
|
|
1751
1926
|
style: i,
|
|
1752
1927
|
...l
|
|
1753
1928
|
}) {
|
|
1754
|
-
const [
|
|
1929
|
+
const [u, d] = A(!1), [m, p] = A(!1), h = n !== void 0, c = h ? n : u, x = T(null), v = T(null), g = T(null), w = T(null), [k, j] = A({}), E = T(null), M = 150, L = () => {
|
|
1755
1930
|
if (h)
|
|
1756
|
-
|
|
1931
|
+
a == null || a(!1);
|
|
1757
1932
|
else {
|
|
1758
|
-
if (
|
|
1759
|
-
p(!0),
|
|
1933
|
+
if (m) return;
|
|
1934
|
+
p(!0), E.current = setTimeout(() => {
|
|
1760
1935
|
d(!1), p(!1);
|
|
1761
|
-
},
|
|
1936
|
+
}, M);
|
|
1762
1937
|
}
|
|
1763
|
-
},
|
|
1764
|
-
const
|
|
1765
|
-
h ?
|
|
1938
|
+
}, W = () => {
|
|
1939
|
+
const _ = !c;
|
|
1940
|
+
h ? a == null || a(_) : _ ? (clearTimeout(E.current), p(!1), d(!0)) : L();
|
|
1766
1941
|
}, H = () => {
|
|
1767
|
-
|
|
1942
|
+
c || (h ? a == null || a(!0) : (clearTimeout(E.current), p(!1), d(!0)));
|
|
1768
1943
|
};
|
|
1769
|
-
|
|
1770
|
-
if (!
|
|
1771
|
-
const
|
|
1772
|
-
var
|
|
1773
|
-
const S = (
|
|
1944
|
+
D(() => () => clearTimeout(E.current), []), D(() => {
|
|
1945
|
+
if (!c) return;
|
|
1946
|
+
const _ = 300, y = () => {
|
|
1947
|
+
var X;
|
|
1948
|
+
const S = (X = x.current) == null ? void 0 : X.getBoundingClientRect();
|
|
1774
1949
|
if (!S) return;
|
|
1775
|
-
const
|
|
1776
|
-
|
|
1777
|
-
|
|
1950
|
+
const C = window.innerHeight - S.bottom, K = C < _ + 8 && S.top > C;
|
|
1951
|
+
j(
|
|
1952
|
+
o === "right" ? K ? { bottom: window.innerHeight - S.top + 4, top: "auto", right: window.innerWidth - S.right } : { top: S.bottom + 4, bottom: "auto", right: window.innerWidth - S.right } : K ? { bottom: window.innerHeight - S.top + 4, top: "auto", left: S.left } : { top: S.bottom + 4, bottom: "auto", left: S.left }
|
|
1778
1953
|
);
|
|
1779
1954
|
};
|
|
1780
|
-
return
|
|
1781
|
-
window.removeEventListener("scroll",
|
|
1955
|
+
return y(), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
|
|
1956
|
+
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
|
|
1782
1957
|
};
|
|
1783
|
-
}, [
|
|
1784
|
-
const
|
|
1785
|
-
var
|
|
1786
|
-
const
|
|
1958
|
+
}, [c, o]);
|
|
1959
|
+
const z = () => {
|
|
1960
|
+
var y;
|
|
1961
|
+
const _ = (y = g.current) == null ? void 0 : y.querySelector(
|
|
1787
1962
|
'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
|
|
1788
1963
|
);
|
|
1789
|
-
|
|
1964
|
+
_ == null || _.focus();
|
|
1790
1965
|
};
|
|
1791
|
-
|
|
1792
|
-
if (!
|
|
1793
|
-
const
|
|
1794
|
-
var
|
|
1795
|
-
!((
|
|
1796
|
-
},
|
|
1797
|
-
S.key === "Escape" && (
|
|
1966
|
+
D(() => {
|
|
1967
|
+
if (!c) return;
|
|
1968
|
+
const _ = (S) => {
|
|
1969
|
+
var C, K;
|
|
1970
|
+
!((C = x.current) != null && C.contains(S.target)) && !((K = v.current) != null && K.contains(S.target)) && L();
|
|
1971
|
+
}, y = (S) => {
|
|
1972
|
+
S.key === "Escape" && (L(), z());
|
|
1798
1973
|
};
|
|
1799
|
-
return document.addEventListener("mousedown",
|
|
1800
|
-
document.removeEventListener("mousedown",
|
|
1974
|
+
return document.addEventListener("mousedown", _), document.addEventListener("keydown", y), () => {
|
|
1975
|
+
document.removeEventListener("mousedown", _), document.removeEventListener("keydown", y);
|
|
1801
1976
|
};
|
|
1802
|
-
}, [
|
|
1803
|
-
if (!
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
}, [
|
|
1807
|
-
const
|
|
1977
|
+
}, [c]), D(() => {
|
|
1978
|
+
if (!c || !w.current || !v.current) return;
|
|
1979
|
+
const _ = b(), y = w.current === "last" ? _[_.length - 1] : _[0];
|
|
1980
|
+
y == null || y.focus(), w.current = null;
|
|
1981
|
+
}, [c]);
|
|
1982
|
+
const b = () => v.current ? [...v.current.querySelectorAll(
|
|
1808
1983
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
1809
|
-
)] : [],
|
|
1810
|
-
var
|
|
1811
|
-
if (
|
|
1812
|
-
|
|
1813
|
-
else if (
|
|
1814
|
-
if (
|
|
1815
|
-
|
|
1984
|
+
)] : [], I = (_) => {
|
|
1985
|
+
var y, S;
|
|
1986
|
+
if (_.key === "ArrowDown")
|
|
1987
|
+
_.preventDefault(), c ? (y = b()[0]) == null || y.focus() : (w.current = "first", H());
|
|
1988
|
+
else if (_.key === "ArrowUp")
|
|
1989
|
+
if (_.preventDefault(), !c)
|
|
1990
|
+
w.current = "last", H();
|
|
1816
1991
|
else {
|
|
1817
|
-
const
|
|
1818
|
-
(S =
|
|
1992
|
+
const C = b();
|
|
1993
|
+
(S = C[C.length - 1]) == null || S.focus();
|
|
1819
1994
|
}
|
|
1820
|
-
},
|
|
1821
|
-
var
|
|
1822
|
-
const
|
|
1823
|
-
switch (
|
|
1995
|
+
}, O = (_) => {
|
|
1996
|
+
var C, K, X, R;
|
|
1997
|
+
const y = b(), S = y.findIndex((f) => f === document.activeElement);
|
|
1998
|
+
switch (_.key) {
|
|
1824
1999
|
case "ArrowDown":
|
|
1825
|
-
|
|
2000
|
+
_.preventDefault(), (C = y[Math.min(S + 1, y.length - 1)]) == null || C.focus();
|
|
1826
2001
|
break;
|
|
1827
2002
|
case "ArrowUp":
|
|
1828
|
-
|
|
2003
|
+
_.preventDefault(), S <= 0 ? z() : (K = y[S - 1]) == null || K.focus();
|
|
1829
2004
|
break;
|
|
1830
2005
|
case "Home":
|
|
1831
|
-
|
|
2006
|
+
_.preventDefault(), (X = y[0]) == null || X.focus();
|
|
1832
2007
|
break;
|
|
1833
2008
|
case "End":
|
|
1834
|
-
|
|
2009
|
+
_.preventDefault(), (R = y[y.length - 1]) == null || R.focus();
|
|
1835
2010
|
break;
|
|
1836
2011
|
case "Tab":
|
|
1837
|
-
|
|
2012
|
+
L();
|
|
1838
2013
|
break;
|
|
1839
2014
|
}
|
|
1840
|
-
},
|
|
2015
|
+
}, U = c && /* @__PURE__ */ e.jsx(
|
|
1841
2016
|
"div",
|
|
1842
2017
|
{
|
|
1843
|
-
ref:
|
|
2018
|
+
ref: v,
|
|
1844
2019
|
role: "menu",
|
|
1845
2020
|
"data-ds-portal": "",
|
|
1846
2021
|
className: [
|
|
1847
2022
|
"ds-dropdown__menu",
|
|
1848
|
-
`ds-dropdown__menu--${
|
|
1849
|
-
|
|
2023
|
+
`ds-dropdown__menu--${o}`,
|
|
2024
|
+
m && "ds-dropdown__menu--closing"
|
|
1850
2025
|
].filter(Boolean).join(" "),
|
|
1851
|
-
style:
|
|
1852
|
-
onKeyDown:
|
|
1853
|
-
children:
|
|
1854
|
-
if (
|
|
1855
|
-
return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" },
|
|
1856
|
-
if (
|
|
2026
|
+
style: k,
|
|
2027
|
+
onKeyDown: O,
|
|
2028
|
+
children: s.map((_, y) => {
|
|
2029
|
+
if (_.separator)
|
|
2030
|
+
return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, y);
|
|
2031
|
+
if (_.type === "section")
|
|
1857
2032
|
return /* @__PURE__ */ e.jsxs("div", { className: "ds-dropdown__section", children: [
|
|
1858
|
-
|
|
1859
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children:
|
|
1860
|
-
] },
|
|
1861
|
-
const S = !!
|
|
2033
|
+
_.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: _.label }),
|
|
2034
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: _.content })
|
|
2035
|
+
] }, y);
|
|
2036
|
+
const S = !!_.href, C = S ? "a" : "button", K = S ? { href: _.disabled ? void 0 : _.href, "aria-disabled": _.disabled ? "true" : void 0 } : { type: "button", disabled: _.disabled };
|
|
1862
2037
|
return /* @__PURE__ */ e.jsxs(
|
|
1863
|
-
|
|
2038
|
+
C,
|
|
1864
2039
|
{
|
|
1865
2040
|
role: "menuitem",
|
|
1866
2041
|
className: [
|
|
1867
2042
|
"ds-dropdown__item",
|
|
1868
|
-
|
|
2043
|
+
_.danger && "ds-dropdown__item--danger"
|
|
1869
2044
|
].filter(Boolean).join(" "),
|
|
1870
2045
|
...K,
|
|
1871
2046
|
onClick: () => {
|
|
1872
|
-
var
|
|
1873
|
-
(
|
|
2047
|
+
var X;
|
|
2048
|
+
(X = _.onClick) == null || X.call(_), L();
|
|
1874
2049
|
},
|
|
1875
2050
|
children: [
|
|
1876
|
-
|
|
1877
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children:
|
|
1878
|
-
|
|
2051
|
+
_.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: _.icon }),
|
|
2052
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-label", children: _.label }),
|
|
2053
|
+
_.shortcut && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-shortcut", children: _.shortcut })
|
|
1879
2054
|
]
|
|
1880
2055
|
},
|
|
1881
|
-
|
|
2056
|
+
y
|
|
1882
2057
|
);
|
|
1883
2058
|
})
|
|
1884
2059
|
}
|
|
@@ -1886,7 +2061,7 @@ function $t({
|
|
|
1886
2061
|
return /* @__PURE__ */ e.jsxs(
|
|
1887
2062
|
"div",
|
|
1888
2063
|
{
|
|
1889
|
-
ref:
|
|
2064
|
+
ref: x,
|
|
1890
2065
|
className: ["ds-dropdown", r].filter(Boolean).join(" "),
|
|
1891
2066
|
style: i,
|
|
1892
2067
|
...l,
|
|
@@ -1894,33 +2069,33 @@ function $t({
|
|
|
1894
2069
|
/* @__PURE__ */ e.jsx(
|
|
1895
2070
|
"div",
|
|
1896
2071
|
{
|
|
1897
|
-
ref:
|
|
2072
|
+
ref: g,
|
|
1898
2073
|
className: "ds-dropdown__trigger",
|
|
1899
|
-
onClick:
|
|
1900
|
-
onKeyDown:
|
|
1901
|
-
children:
|
|
2074
|
+
onClick: W,
|
|
2075
|
+
onKeyDown: I,
|
|
2076
|
+
children: t
|
|
1902
2077
|
}
|
|
1903
2078
|
),
|
|
1904
|
-
typeof document < "u" &&
|
|
2079
|
+
typeof document < "u" && he.createPortal(U, document.body)
|
|
1905
2080
|
]
|
|
1906
2081
|
}
|
|
1907
2082
|
);
|
|
1908
2083
|
}
|
|
1909
|
-
function
|
|
1910
|
-
value:
|
|
1911
|
-
size:
|
|
2084
|
+
function Js({
|
|
2085
|
+
value: t = 0,
|
|
2086
|
+
size: s = "m",
|
|
1912
2087
|
variant: n = "default",
|
|
1913
|
-
showValue:
|
|
1914
|
-
min:
|
|
2088
|
+
showValue: a = !1,
|
|
2089
|
+
min: o = 2,
|
|
1915
2090
|
animate: r = !0
|
|
1916
2091
|
}) {
|
|
1917
|
-
const i = Math.min(100, Math.max(0,
|
|
2092
|
+
const i = Math.min(100, Math.max(0, t)), l = Math.max(o, i), u = n === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : n;
|
|
1918
2093
|
return /* @__PURE__ */ e.jsxs(
|
|
1919
2094
|
"div",
|
|
1920
2095
|
{
|
|
1921
2096
|
className: [
|
|
1922
2097
|
"ds-progress",
|
|
1923
|
-
`ds-progress--${
|
|
2098
|
+
`ds-progress--${s}`,
|
|
1924
2099
|
!r && "ds-progress--instant"
|
|
1925
2100
|
].filter(Boolean).join(" "),
|
|
1926
2101
|
role: "progressbar",
|
|
@@ -1931,11 +2106,11 @@ function Tt({
|
|
|
1931
2106
|
/* @__PURE__ */ e.jsx("div", { className: "ds-progress__track", children: /* @__PURE__ */ e.jsx(
|
|
1932
2107
|
"div",
|
|
1933
2108
|
{
|
|
1934
|
-
className: `ds-progress__fill ds-progress__fill--${
|
|
2109
|
+
className: `ds-progress__fill ds-progress__fill--${u}`,
|
|
1935
2110
|
style: { width: `${l}%` }
|
|
1936
2111
|
}
|
|
1937
2112
|
) }),
|
|
1938
|
-
|
|
2113
|
+
a && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
|
|
1939
2114
|
Math.round(i),
|
|
1940
2115
|
"%"
|
|
1941
2116
|
] })
|
|
@@ -1943,169 +2118,169 @@ function Tt({
|
|
|
1943
2118
|
}
|
|
1944
2119
|
);
|
|
1945
2120
|
}
|
|
1946
|
-
const
|
|
1947
|
-
function
|
|
1948
|
-
const [n,
|
|
1949
|
-
return
|
|
1950
|
-
if (
|
|
1951
|
-
|
|
2121
|
+
const Lt = (t) => 1 - Math.pow(1 - t, 3), Pt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2122
|
+
function Mt(t, { duration: s = 600 } = {}) {
|
|
2123
|
+
const [n, a] = A(t), o = T(t), r = T(null);
|
|
2124
|
+
return D(() => {
|
|
2125
|
+
if (Pt()) {
|
|
2126
|
+
a(t), o.current = t;
|
|
1952
2127
|
return;
|
|
1953
2128
|
}
|
|
1954
|
-
const i =
|
|
2129
|
+
const i = o.current, l = t - i;
|
|
1955
2130
|
if (l === 0) return;
|
|
1956
|
-
let
|
|
1957
|
-
const d = (
|
|
1958
|
-
|
|
1959
|
-
const p = Math.min((
|
|
1960
|
-
|
|
2131
|
+
let u = null;
|
|
2132
|
+
const d = (m) => {
|
|
2133
|
+
u || (u = m);
|
|
2134
|
+
const p = Math.min((m - u) / s, 1);
|
|
2135
|
+
a(i + l * Lt(p)), p < 1 ? r.current = requestAnimationFrame(d) : o.current = t;
|
|
1961
2136
|
};
|
|
1962
2137
|
return r.current = requestAnimationFrame(d), () => cancelAnimationFrame(r.current);
|
|
1963
|
-
}, [
|
|
2138
|
+
}, [t, s]), n;
|
|
1964
2139
|
}
|
|
1965
|
-
function
|
|
1966
|
-
value:
|
|
1967
|
-
duration:
|
|
2140
|
+
function Zs({
|
|
2141
|
+
value: t,
|
|
2142
|
+
duration: s = 600,
|
|
1968
2143
|
decimals: n = 0,
|
|
1969
|
-
prefix:
|
|
1970
|
-
suffix:
|
|
2144
|
+
prefix: a = "",
|
|
2145
|
+
suffix: o = ""
|
|
1971
2146
|
}) {
|
|
1972
|
-
const i =
|
|
1973
|
-
return `${
|
|
2147
|
+
const i = Mt(t, { duration: s }).toFixed(n);
|
|
2148
|
+
return `${a}${i}${o}`;
|
|
1974
2149
|
}
|
|
1975
|
-
function
|
|
1976
|
-
const
|
|
1977
|
-
return
|
|
1978
|
-
const i =
|
|
2150
|
+
function zt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
2151
|
+
const a = T(null), [o, r] = A(!1);
|
|
2152
|
+
return D(() => {
|
|
2153
|
+
const i = a.current;
|
|
1979
2154
|
if (!i) return;
|
|
1980
2155
|
const l = new IntersectionObserver(
|
|
1981
|
-
([
|
|
1982
|
-
|
|
2156
|
+
([u]) => {
|
|
2157
|
+
u.isIntersecting ? (r(!0), n && l.disconnect()) : n || r(!1);
|
|
1983
2158
|
},
|
|
1984
|
-
{ threshold:
|
|
2159
|
+
{ threshold: t, rootMargin: s }
|
|
1985
2160
|
);
|
|
1986
2161
|
return l.observe(i), () => l.disconnect();
|
|
1987
|
-
}, [
|
|
2162
|
+
}, [t, s, n]), { ref: a, inView: o };
|
|
1988
2163
|
}
|
|
1989
|
-
function
|
|
1990
|
-
children:
|
|
1991
|
-
as:
|
|
2164
|
+
function Qs({
|
|
2165
|
+
children: t,
|
|
2166
|
+
as: s = "div",
|
|
1992
2167
|
once: n = !1,
|
|
1993
|
-
threshold:
|
|
1994
|
-
rootMargin:
|
|
2168
|
+
threshold: a = 0.1,
|
|
2169
|
+
rootMargin: o = "0px",
|
|
1995
2170
|
onEnter: r,
|
|
1996
2171
|
onLeave: i,
|
|
1997
2172
|
...l
|
|
1998
2173
|
}) {
|
|
1999
|
-
const { ref:
|
|
2000
|
-
return
|
|
2001
|
-
d && !
|
|
2002
|
-
}, [d]), /* @__PURE__ */ e.jsx(
|
|
2003
|
-
}
|
|
2004
|
-
const
|
|
2005
|
-
default:
|
|
2006
|
-
success:
|
|
2007
|
-
warning:
|
|
2008
|
-
error:
|
|
2174
|
+
const { ref: u, inView: d } = zt({ threshold: a, rootMargin: o, once: n }), m = T(!1);
|
|
2175
|
+
return D(() => {
|
|
2176
|
+
d && !m.current && (r == null || r()), !d && m.current && (i == null || i()), m.current = d;
|
|
2177
|
+
}, [d]), /* @__PURE__ */ e.jsx(s, { ref: u, ...l, children: typeof t == "function" ? t(d) : t });
|
|
2178
|
+
}
|
|
2179
|
+
const We = {
|
|
2180
|
+
default: Be,
|
|
2181
|
+
success: Ae,
|
|
2182
|
+
warning: Se,
|
|
2183
|
+
error: Re
|
|
2009
2184
|
};
|
|
2010
|
-
let
|
|
2011
|
-
const
|
|
2012
|
-
function
|
|
2013
|
-
|
|
2185
|
+
let pe = [];
|
|
2186
|
+
const ke = /* @__PURE__ */ new Set();
|
|
2187
|
+
function Xe() {
|
|
2188
|
+
ke.forEach((t) => t([...pe]));
|
|
2014
2189
|
}
|
|
2015
|
-
function
|
|
2016
|
-
|
|
2190
|
+
function Ct(t) {
|
|
2191
|
+
pe = [...pe, t], Xe();
|
|
2017
2192
|
}
|
|
2018
|
-
function
|
|
2019
|
-
|
|
2193
|
+
function Ot(t) {
|
|
2194
|
+
pe = pe.filter((s) => s.id !== t), Xe();
|
|
2020
2195
|
}
|
|
2021
|
-
function
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2196
|
+
function en() {
|
|
2197
|
+
const t = (s, n = {}) => {
|
|
2198
|
+
Ct({
|
|
2024
2199
|
id: `${Date.now()}-${Math.random()}`,
|
|
2025
|
-
message:
|
|
2200
|
+
message: s,
|
|
2026
2201
|
type: "default",
|
|
2027
2202
|
duration: 4e3,
|
|
2028
2203
|
...n
|
|
2029
2204
|
});
|
|
2030
2205
|
};
|
|
2031
|
-
return
|
|
2206
|
+
return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
|
|
2032
2207
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const [n,
|
|
2035
|
-
|
|
2208
|
+
function Ft({ data: t, onDismiss: s }) {
|
|
2209
|
+
const [n, a] = A(!1), o = T(null);
|
|
2210
|
+
D(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => r(), t.duration)), () => clearTimeout(o.current)), []);
|
|
2036
2211
|
function r() {
|
|
2037
|
-
|
|
2212
|
+
a(!1), setTimeout(() => s(t.id), 250);
|
|
2038
2213
|
}
|
|
2039
|
-
const i =
|
|
2214
|
+
const i = We[t.type] ?? We.default;
|
|
2040
2215
|
return /* @__PURE__ */ e.jsxs(
|
|
2041
2216
|
"div",
|
|
2042
2217
|
{
|
|
2043
2218
|
className: [
|
|
2044
2219
|
"ds-toast",
|
|
2045
|
-
`ds-toast--${
|
|
2220
|
+
`ds-toast--${t.type}`,
|
|
2046
2221
|
n && "ds-toast--visible"
|
|
2047
2222
|
].filter(Boolean).join(" "),
|
|
2048
|
-
role:
|
|
2223
|
+
role: t.type === "error" ? "alert" : "status",
|
|
2049
2224
|
"aria-live": "polite",
|
|
2050
2225
|
children: [
|
|
2051
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size:
|
|
2052
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children:
|
|
2226
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: P[3], strokeWidth: 1.5 }) }),
|
|
2227
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: t.message }),
|
|
2053
2228
|
/* @__PURE__ */ e.jsx(
|
|
2054
2229
|
"button",
|
|
2055
2230
|
{
|
|
2056
2231
|
className: "ds-toast__close",
|
|
2057
2232
|
onClick: r,
|
|
2058
2233
|
"aria-label": "Закрыть",
|
|
2059
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2234
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: P[3], strokeWidth: 1.5 })
|
|
2060
2235
|
}
|
|
2061
2236
|
)
|
|
2062
2237
|
]
|
|
2063
2238
|
}
|
|
2064
2239
|
);
|
|
2065
2240
|
}
|
|
2066
|
-
function
|
|
2067
|
-
const [
|
|
2068
|
-
return
|
|
2069
|
-
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${
|
|
2241
|
+
function tn({ position: t = "bottom-right" }) {
|
|
2242
|
+
const [s, n] = A(() => [...pe]);
|
|
2243
|
+
return D(() => (ke.add(n), () => ke.delete(n)), []), !s.length || typeof document > "u" ? null : he.createPortal(
|
|
2244
|
+
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(Ft, { data: a, onDismiss: Ot }, a.id)) }),
|
|
2070
2245
|
document.body
|
|
2071
2246
|
);
|
|
2072
2247
|
}
|
|
2073
|
-
const
|
|
2074
|
-
running: /* @__PURE__ */ e.jsx(
|
|
2075
|
-
success: /* @__PURE__ */ e.jsx(
|
|
2076
|
-
error: /* @__PURE__ */ e.jsx(
|
|
2248
|
+
const Wt = {
|
|
2249
|
+
running: /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "info", children: "Running..." }),
|
|
2250
|
+
success: /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "success", children: "Done" }),
|
|
2251
|
+
error: /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: "error", children: "Error" })
|
|
2077
2252
|
};
|
|
2078
|
-
function
|
|
2079
|
-
label:
|
|
2080
|
-
status:
|
|
2253
|
+
function sn({
|
|
2254
|
+
label: t,
|
|
2255
|
+
status: s = "idle",
|
|
2081
2256
|
icon: n,
|
|
2082
|
-
badge:
|
|
2083
|
-
defaultExpanded:
|
|
2257
|
+
badge: a,
|
|
2258
|
+
defaultExpanded: o = !1,
|
|
2084
2259
|
expanded: r,
|
|
2085
2260
|
onToggle: i,
|
|
2086
2261
|
children: l,
|
|
2087
|
-
className:
|
|
2262
|
+
className: u = "",
|
|
2088
2263
|
...d
|
|
2089
2264
|
}) {
|
|
2090
|
-
const
|
|
2265
|
+
const m = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
|
|
2091
2266
|
n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
|
|
2092
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children:
|
|
2093
|
-
|
|
2094
|
-
|
|
2267
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
|
|
2268
|
+
Wt[s],
|
|
2269
|
+
a
|
|
2095
2270
|
] });
|
|
2096
2271
|
return l ? /* @__PURE__ */ e.jsx(
|
|
2097
2272
|
"div",
|
|
2098
2273
|
{
|
|
2099
|
-
className: ["ds-tool-card",
|
|
2274
|
+
className: ["ds-tool-card", m && "ds-tool-card--running", u].filter(Boolean).join(" "),
|
|
2100
2275
|
...d,
|
|
2101
2276
|
children: /* @__PURE__ */ e.jsx(
|
|
2102
|
-
|
|
2277
|
+
De,
|
|
2103
2278
|
{
|
|
2104
2279
|
title: p,
|
|
2105
2280
|
padding: "s",
|
|
2106
|
-
defaultExpanded:
|
|
2107
|
-
expanded:
|
|
2108
|
-
onToggle:
|
|
2281
|
+
defaultExpanded: o,
|
|
2282
|
+
expanded: m ? !1 : r,
|
|
2283
|
+
onToggle: m ? void 0 : i,
|
|
2109
2284
|
children: /* @__PURE__ */ e.jsx("div", { className: "ds-tool-card__body", children: l })
|
|
2110
2285
|
}
|
|
2111
2286
|
)
|
|
@@ -2113,320 +2288,320 @@ function At({
|
|
|
2113
2288
|
) : /* @__PURE__ */ e.jsx(
|
|
2114
2289
|
"div",
|
|
2115
2290
|
{
|
|
2116
|
-
className: ["ds-tool-card", "ds-tool-card--bubble",
|
|
2291
|
+
className: ["ds-tool-card", "ds-tool-card--bubble", u].filter(Boolean).join(" "),
|
|
2117
2292
|
...d,
|
|
2118
2293
|
children: p
|
|
2119
2294
|
}
|
|
2120
2295
|
);
|
|
2121
2296
|
}
|
|
2122
|
-
function
|
|
2123
|
-
text:
|
|
2124
|
-
size:
|
|
2297
|
+
function Ut({
|
|
2298
|
+
text: t,
|
|
2299
|
+
size: s = "xs",
|
|
2125
2300
|
timeout: n = 800,
|
|
2126
|
-
"aria-label":
|
|
2127
|
-
...
|
|
2301
|
+
"aria-label": a = "Copy to clipboard",
|
|
2302
|
+
...o
|
|
2128
2303
|
}) {
|
|
2129
|
-
const [r, i] =
|
|
2130
|
-
|
|
2304
|
+
const [r, i] = A(!1), l = (u) => {
|
|
2305
|
+
u.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
|
|
2131
2306
|
i(!0), setTimeout(() => i(!1), n);
|
|
2132
2307
|
});
|
|
2133
2308
|
};
|
|
2134
2309
|
return /* @__PURE__ */ e.jsx(
|
|
2135
|
-
|
|
2310
|
+
ae,
|
|
2136
2311
|
{
|
|
2137
2312
|
variant: "ghost",
|
|
2138
|
-
size:
|
|
2313
|
+
size: s,
|
|
2139
2314
|
state: r ? "success" : "idle",
|
|
2140
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2141
|
-
"aria-label":
|
|
2315
|
+
icon: /* @__PURE__ */ e.jsx(it, { size: P[1], strokeWidth: 1.5 }),
|
|
2316
|
+
"aria-label": a,
|
|
2142
2317
|
onClick: l,
|
|
2143
|
-
...
|
|
2318
|
+
...o
|
|
2144
2319
|
}
|
|
2145
2320
|
);
|
|
2146
2321
|
}
|
|
2147
|
-
function
|
|
2148
|
-
const [
|
|
2149
|
-
return
|
|
2150
|
-
|
|
2151
|
-
}, [
|
|
2152
|
-
|
|
2322
|
+
function nn({ content: t, streaming: s = !1, ...n }) {
|
|
2323
|
+
const [a, o] = A(s);
|
|
2324
|
+
return D(() => {
|
|
2325
|
+
o(!!s);
|
|
2326
|
+
}, [s]), /* @__PURE__ */ e.jsx(
|
|
2327
|
+
De,
|
|
2153
2328
|
{
|
|
2154
|
-
expanded:
|
|
2155
|
-
onToggle:
|
|
2329
|
+
expanded: a,
|
|
2330
|
+
onToggle: o,
|
|
2156
2331
|
padding: "s",
|
|
2157
2332
|
title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
|
|
2158
|
-
/* @__PURE__ */ e.jsx(
|
|
2159
|
-
/* @__PURE__ */ e.jsx(
|
|
2333
|
+
/* @__PURE__ */ e.jsx(lt, { size: P[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
|
|
2334
|
+
/* @__PURE__ */ e.jsx(jt, { secondary: !0, children: "Thinking" })
|
|
2160
2335
|
] }),
|
|
2161
2336
|
...n,
|
|
2162
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2163
|
-
|
|
2164
|
-
|
|
2337
|
+
children: /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
|
|
2338
|
+
t,
|
|
2339
|
+
s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
|
|
2165
2340
|
] })
|
|
2166
2341
|
}
|
|
2167
2342
|
);
|
|
2168
2343
|
}
|
|
2169
|
-
function
|
|
2170
|
-
count:
|
|
2171
|
-
current:
|
|
2344
|
+
function rn({
|
|
2345
|
+
count: t,
|
|
2346
|
+
current: s = 0,
|
|
2172
2347
|
done: n = [],
|
|
2173
|
-
onChange:
|
|
2174
|
-
showCounter:
|
|
2348
|
+
onChange: a,
|
|
2349
|
+
showCounter: o = !0,
|
|
2175
2350
|
className: r = "",
|
|
2176
2351
|
"aria-label": i = "Steps",
|
|
2177
2352
|
...l
|
|
2178
2353
|
}) {
|
|
2179
2354
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
|
|
2180
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length:
|
|
2181
|
-
const
|
|
2355
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (u, d) => {
|
|
2356
|
+
const m = d === s, p = n.includes(d) && !m, h = a && (d <= s || n.includes(d)), c = [
|
|
2182
2357
|
"ds-step-indicator__dot",
|
|
2183
|
-
|
|
2358
|
+
m && "ds-step-indicator__dot--active",
|
|
2184
2359
|
p && "ds-step-indicator__dot--done"
|
|
2185
2360
|
].filter(Boolean).join(" ");
|
|
2186
2361
|
return /* @__PURE__ */ e.jsx(
|
|
2187
2362
|
"button",
|
|
2188
2363
|
{
|
|
2189
2364
|
type: "button",
|
|
2190
|
-
className:
|
|
2365
|
+
className: c,
|
|
2191
2366
|
role: "tab",
|
|
2192
|
-
"aria-selected":
|
|
2367
|
+
"aria-selected": m,
|
|
2193
2368
|
"aria-label": `Step ${d + 1}`,
|
|
2194
|
-
disabled: !h || d ===
|
|
2195
|
-
onClick: () =>
|
|
2196
|
-
children: p ? /* @__PURE__ */ e.jsx(
|
|
2369
|
+
disabled: !h || d === s,
|
|
2370
|
+
onClick: () => a == null ? void 0 : a(d),
|
|
2371
|
+
children: p ? /* @__PURE__ */ e.jsx(Te, { size: 8, strokeWidth: 3 }) : null
|
|
2197
2372
|
},
|
|
2198
2373
|
d
|
|
2199
2374
|
);
|
|
2200
2375
|
}) }),
|
|
2201
|
-
|
|
2202
|
-
|
|
2376
|
+
o && /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, className: "ds-step-indicator__counter", children: [
|
|
2377
|
+
s + 1,
|
|
2203
2378
|
" / ",
|
|
2204
|
-
|
|
2379
|
+
t
|
|
2205
2380
|
] })
|
|
2206
2381
|
] });
|
|
2207
2382
|
}
|
|
2208
|
-
function
|
|
2209
|
-
content:
|
|
2210
|
-
isStreaming:
|
|
2383
|
+
function an({
|
|
2384
|
+
content: t,
|
|
2385
|
+
isStreaming: s = !1,
|
|
2211
2386
|
cursor: n = "line",
|
|
2212
|
-
onChunk:
|
|
2213
|
-
className:
|
|
2387
|
+
onChunk: a,
|
|
2388
|
+
className: o = "",
|
|
2214
2389
|
...r
|
|
2215
2390
|
}) {
|
|
2216
|
-
const i = T(
|
|
2217
|
-
return
|
|
2218
|
-
|
|
2219
|
-
}, [
|
|
2220
|
-
|
|
2221
|
-
|
|
2391
|
+
const i = T(t);
|
|
2392
|
+
return D(() => {
|
|
2393
|
+
t !== i.current && (a == null || a(t), i.current = t);
|
|
2394
|
+
}, [t, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...r, children: [
|
|
2395
|
+
t,
|
|
2396
|
+
s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
|
|
2222
2397
|
] });
|
|
2223
2398
|
}
|
|
2224
|
-
function
|
|
2225
|
-
role:
|
|
2226
|
-
header:
|
|
2399
|
+
function on({
|
|
2400
|
+
role: t = "assistant",
|
|
2401
|
+
header: s,
|
|
2227
2402
|
footer: n,
|
|
2228
|
-
attachments:
|
|
2229
|
-
isStreaming:
|
|
2403
|
+
attachments: a,
|
|
2404
|
+
isStreaming: o = !1,
|
|
2230
2405
|
children: r,
|
|
2231
2406
|
className: i = "",
|
|
2232
2407
|
...l
|
|
2233
2408
|
}) {
|
|
2234
|
-
const
|
|
2409
|
+
const u = [
|
|
2235
2410
|
"ds-chat-message",
|
|
2236
|
-
`ds-chat-message--${
|
|
2237
|
-
|
|
2411
|
+
`ds-chat-message--${t}`,
|
|
2412
|
+
o && "ds-chat-message--streaming",
|
|
2238
2413
|
i
|
|
2239
2414
|
].filter(Boolean).join(" ");
|
|
2240
|
-
return
|
|
2241
|
-
|
|
2415
|
+
return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: u, ...l, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: r }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: u, ...l, children: [
|
|
2416
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
|
|
2242
2417
|
/* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: r }),
|
|
2243
2418
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
|
|
2244
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className:
|
|
2245
|
-
|
|
2246
|
-
|
|
2419
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: u, ...l, children: [
|
|
2420
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
|
|
2421
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
|
|
2247
2422
|
/* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: r }),
|
|
2248
2423
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
|
|
2249
2424
|
] });
|
|
2250
2425
|
}
|
|
2251
|
-
function
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2254
|
-
const r =
|
|
2426
|
+
function ln(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
2427
|
+
const a = T(!1), o = T(0);
|
|
2428
|
+
D(() => {
|
|
2429
|
+
const r = s == null ? void 0 : s.current;
|
|
2255
2430
|
if (!r) return;
|
|
2256
2431
|
const i = () => {
|
|
2257
2432
|
const l = r.scrollHeight - r.scrollTop - r.clientHeight < 64;
|
|
2258
|
-
!l && r.scrollTop <
|
|
2433
|
+
!l && r.scrollTop < o.current && (a.current = !0), l && (a.current = !1), o.current = r.scrollTop;
|
|
2259
2434
|
};
|
|
2260
2435
|
return r.addEventListener("scroll", i, { passive: !0 }), () => r.removeEventListener("scroll", i);
|
|
2261
|
-
}, [
|
|
2262
|
-
const r =
|
|
2263
|
-
r && (n &&
|
|
2264
|
-
},
|
|
2265
|
-
}
|
|
2266
|
-
function
|
|
2267
|
-
prompts:
|
|
2268
|
-
enabled:
|
|
2436
|
+
}, [s]), D(() => {
|
|
2437
|
+
const r = s == null ? void 0 : s.current;
|
|
2438
|
+
r && (n && a.current || (r.scrollTop = r.scrollHeight));
|
|
2439
|
+
}, t);
|
|
2440
|
+
}
|
|
2441
|
+
function Vt({
|
|
2442
|
+
prompts: t,
|
|
2443
|
+
enabled: s,
|
|
2269
2444
|
typingSpeed: n = 38,
|
|
2270
|
-
erasingSpeed:
|
|
2271
|
-
holdTime:
|
|
2445
|
+
erasingSpeed: a = 18,
|
|
2446
|
+
holdTime: o = 2200,
|
|
2272
2447
|
betweenTime: r = 380,
|
|
2273
2448
|
manualPauseMs: i = 5e3
|
|
2274
2449
|
}) {
|
|
2275
|
-
const [l,
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
}, [l]),
|
|
2279
|
-
if (
|
|
2280
|
-
|
|
2450
|
+
const [l, u] = A(0), [d, m] = A(""), p = T("typing"), h = T(0), c = T(0), x = T(null), v = T(0);
|
|
2451
|
+
D(() => {
|
|
2452
|
+
c.current = l;
|
|
2453
|
+
}, [l]), D(() => {
|
|
2454
|
+
if (x.current && (clearTimeout(x.current), x.current = null), !s || t.length === 0) {
|
|
2455
|
+
m(""), h.current = 0, p.current = "typing";
|
|
2281
2456
|
return;
|
|
2282
2457
|
}
|
|
2283
|
-
const
|
|
2284
|
-
const
|
|
2285
|
-
if (
|
|
2286
|
-
|
|
2458
|
+
const E = () => {
|
|
2459
|
+
const M = Date.now();
|
|
2460
|
+
if (v.current > M) {
|
|
2461
|
+
x.current = setTimeout(E, v.current - M);
|
|
2287
2462
|
return;
|
|
2288
2463
|
}
|
|
2289
|
-
const
|
|
2290
|
-
p.current === "typing" ? (h.current += 1,
|
|
2464
|
+
const L = t[c.current % t.length] ?? "";
|
|
2465
|
+
p.current === "typing" ? (h.current += 1, m(L.slice(0, h.current)), h.current >= L.length ? (p.current = "holding", x.current = setTimeout(E, o)) : x.current = setTimeout(E, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", x.current = setTimeout(E, a)) : (h.current = Math.max(0, h.current - 1), m(L.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", c.current = (c.current + 1) % t.length, u(c.current), x.current = setTimeout(E, r)) : x.current = setTimeout(E, a));
|
|
2291
2466
|
};
|
|
2292
|
-
return
|
|
2293
|
-
|
|
2467
|
+
return x.current = setTimeout(E, 260), () => {
|
|
2468
|
+
x.current && clearTimeout(x.current);
|
|
2294
2469
|
};
|
|
2295
|
-
}, [
|
|
2296
|
-
const
|
|
2297
|
-
if (
|
|
2298
|
-
const
|
|
2299
|
-
|
|
2300
|
-
},
|
|
2301
|
-
return { displayed: d, currentPrompt:
|
|
2302
|
-
}
|
|
2303
|
-
let
|
|
2304
|
-
function
|
|
2305
|
-
value:
|
|
2306
|
-
onChange:
|
|
2470
|
+
}, [s, t, n, a, o, r]);
|
|
2471
|
+
const g = (E) => {
|
|
2472
|
+
if (t.length === 0) return;
|
|
2473
|
+
const M = (E % t.length + t.length) % t.length, L = t[M];
|
|
2474
|
+
c.current = M, h.current = L.length, p.current = "holding", v.current = Date.now() + i, u(M), m(L);
|
|
2475
|
+
}, w = () => g(c.current + 1), k = () => g(c.current - 1), j = t[l % t.length] ?? "";
|
|
2476
|
+
return { displayed: d, currentPrompt: j, index: l, next: w, prev: k };
|
|
2477
|
+
}
|
|
2478
|
+
let Yt = 0;
|
|
2479
|
+
function cn({
|
|
2480
|
+
value: t = "",
|
|
2481
|
+
onChange: s,
|
|
2307
2482
|
onSubmit: n,
|
|
2308
|
-
onStop:
|
|
2309
|
-
onKeyDown:
|
|
2483
|
+
onStop: a,
|
|
2484
|
+
onKeyDown: o,
|
|
2310
2485
|
loading: r = !1,
|
|
2311
2486
|
disabled: i = !1,
|
|
2312
2487
|
placeholder: l = "Let's get things done...",
|
|
2313
|
-
animatedPlaceholders:
|
|
2488
|
+
animatedPlaceholders: u,
|
|
2314
2489
|
attachments: d,
|
|
2315
|
-
images:
|
|
2490
|
+
images: m,
|
|
2316
2491
|
onAttachFiles: p,
|
|
2317
2492
|
onAttachImages: h,
|
|
2318
|
-
onRemoveAttachment:
|
|
2319
|
-
onRemoveImage:
|
|
2320
|
-
acceptImage:
|
|
2321
|
-
acceptFile:
|
|
2322
|
-
maxImages:
|
|
2323
|
-
maxImageSize:
|
|
2324
|
-
leftSlot:
|
|
2325
|
-
rightSlot:
|
|
2326
|
-
className:
|
|
2327
|
-
...
|
|
2493
|
+
onRemoveAttachment: c,
|
|
2494
|
+
onRemoveImage: x,
|
|
2495
|
+
acceptImage: v,
|
|
2496
|
+
acceptFile: g,
|
|
2497
|
+
maxImages: w,
|
|
2498
|
+
maxImageSize: k,
|
|
2499
|
+
leftSlot: j,
|
|
2500
|
+
rightSlot: E,
|
|
2501
|
+
className: M = "",
|
|
2502
|
+
...L
|
|
2328
2503
|
}) {
|
|
2329
|
-
const
|
|
2330
|
-
const
|
|
2331
|
-
|
|
2332
|
-
},
|
|
2333
|
-
const
|
|
2334
|
-
let
|
|
2335
|
-
for (const se of
|
|
2336
|
-
K(se) ?
|
|
2337
|
-
return { imageFiles:
|
|
2338
|
-
},
|
|
2339
|
-
const { imageFiles:
|
|
2340
|
-
J.length &&
|
|
2341
|
-
const
|
|
2342
|
-
p &&
|
|
2504
|
+
const W = T(null), H = T(null), z = T(0), [b, I] = A(!1), [O, U] = A([]), _ = (N) => {
|
|
2505
|
+
const B = ++Yt;
|
|
2506
|
+
U((G) => [...G, { id: B, msg: N }]), setTimeout(() => U((G) => G.filter((J) => J.id !== B)), 6e3);
|
|
2507
|
+
}, y = (N) => U((B) => B.filter((G) => G.id !== N)), S = (N) => N.type.startsWith("image/"), C = () => !0, K = v ?? S, X = g ?? C, R = (N) => {
|
|
2508
|
+
const B = [], G = [], J = [], Z = [];
|
|
2509
|
+
let te = 0, de = w != null ? w - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
|
|
2510
|
+
for (const se of N)
|
|
2511
|
+
K(se) ? k && se.size > k ? J.push(se.name) : de > 0 ? (B.push(se), de--) : te++ : X(se) ? G.push(se) : Z.push(se.name);
|
|
2512
|
+
return { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te };
|
|
2513
|
+
}, f = (N) => {
|
|
2514
|
+
const { imageFiles: B, docFiles: G, tooLarge: J, skipped: Z, limitExceeded: te } = R(N);
|
|
2515
|
+
J.length && _(`File${J.length > 1 ? "s" : ""} too large${k ? ` (max ${k / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && _(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), te && _(`Max ${w} images per message`), h && B.length && h(B);
|
|
2516
|
+
const de = G.concat(h ? [] : B);
|
|
2517
|
+
p && de.length && p(de);
|
|
2343
2518
|
};
|
|
2344
|
-
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2347
|
-
}, [
|
|
2348
|
-
const
|
|
2349
|
-
var J, Z,
|
|
2519
|
+
D(() => {
|
|
2520
|
+
const N = H.current;
|
|
2521
|
+
N && (N.style.height = "auto", N.style.height = `${Math.min(N.scrollHeight, 200)}px`);
|
|
2522
|
+
}, [t]), D(() => {
|
|
2523
|
+
const N = (B) => {
|
|
2524
|
+
var J, Z, te;
|
|
2350
2525
|
if (r || i) return;
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2526
|
+
const G = (J = B.target) == null ? void 0 : J.tagName;
|
|
2527
|
+
G === "INPUT" || G === "TEXTAREA" || G === "SELECT" || (Z = B.target) != null && Z.isContentEditable || B.ctrlKey || B.metaKey || B.altKey || B.key.length !== 1 && B.key !== "Backspace" && B.key !== "Delete" || (te = H.current) == null || te.focus();
|
|
2353
2528
|
};
|
|
2354
|
-
return document.addEventListener("keydown",
|
|
2529
|
+
return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
|
|
2355
2530
|
}, [r, i]);
|
|
2356
|
-
const
|
|
2357
|
-
|
|
2358
|
-
},
|
|
2359
|
-
|
|
2360
|
-
},
|
|
2361
|
-
|
|
2362
|
-
const
|
|
2363
|
-
|
|
2364
|
-
},
|
|
2365
|
-
const
|
|
2366
|
-
|
|
2367
|
-
},
|
|
2531
|
+
const $ = (N) => {
|
|
2532
|
+
N.preventDefault(), z.current++, N.dataTransfer.types.includes("Files") && I(!0);
|
|
2533
|
+
}, F = (N) => {
|
|
2534
|
+
N.preventDefault(), z.current--, z.current === 0 && I(!1);
|
|
2535
|
+
}, V = (N) => N.preventDefault(), ne = (N) => {
|
|
2536
|
+
N.preventDefault(), z.current = 0, I(!1);
|
|
2537
|
+
const B = Array.from(N.dataTransfer.files);
|
|
2538
|
+
B.length && f(B);
|
|
2539
|
+
}, oe = (N) => {
|
|
2540
|
+
const B = Array.from(N.target.files || []);
|
|
2541
|
+
W.current && (W.current.value = ""), B.length && f(B);
|
|
2542
|
+
}, q = (N) => {
|
|
2368
2543
|
var se;
|
|
2369
2544
|
if (!h) return;
|
|
2370
|
-
const
|
|
2371
|
-
if (!
|
|
2372
|
-
const
|
|
2373
|
-
for (const
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2545
|
+
const B = (se = N.clipboardData) == null ? void 0 : se.items;
|
|
2546
|
+
if (!B) return;
|
|
2547
|
+
const G = [];
|
|
2548
|
+
for (const Ze of B) {
|
|
2549
|
+
const Le = Ze.getAsFile();
|
|
2550
|
+
Le && G.push(Le);
|
|
2376
2551
|
}
|
|
2377
|
-
if (
|
|
2378
|
-
const { imageFiles: J, tooLarge: Z, skipped:
|
|
2379
|
-
Z.length &&
|
|
2380
|
-
}, Q = !r && !i && !!(
|
|
2381
|
-
prompts:
|
|
2552
|
+
if (G.length === 0) return;
|
|
2553
|
+
const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: de } = R(G);
|
|
2554
|
+
Z.length && _(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && _(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), de && _(`Max ${w} images per message`), J.length && (N.preventDefault(), h(J));
|
|
2555
|
+
}, Q = !r && !i && !!(u != null && u.length) && t.length === 0, ie = Vt({
|
|
2556
|
+
prompts: u ?? [],
|
|
2382
2557
|
enabled: Q
|
|
2383
|
-
}),
|
|
2558
|
+
}), Ne = (N) => {
|
|
2384
2559
|
if (Q) {
|
|
2385
|
-
if (
|
|
2386
|
-
|
|
2560
|
+
if (N.key === "ArrowDown" || N.key === "ArrowRight") {
|
|
2561
|
+
N.preventDefault(), ie.next();
|
|
2387
2562
|
return;
|
|
2388
2563
|
}
|
|
2389
|
-
if (
|
|
2390
|
-
|
|
2564
|
+
if (N.key === "ArrowUp" || N.key === "ArrowLeft") {
|
|
2565
|
+
N.preventDefault(), ie.prev();
|
|
2391
2566
|
return;
|
|
2392
2567
|
}
|
|
2393
|
-
if (
|
|
2394
|
-
|
|
2568
|
+
if (N.key === "Tab" && !N.shiftKey) {
|
|
2569
|
+
N.preventDefault(), s == null || s(ie.currentPrompt);
|
|
2395
2570
|
return;
|
|
2396
2571
|
}
|
|
2397
2572
|
}
|
|
2398
|
-
|
|
2399
|
-
},
|
|
2400
|
-
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input",
|
|
2401
|
-
|
|
2573
|
+
o == null || o(N);
|
|
2574
|
+
}, Je = (t.trim() || (m == null ? void 0 : m.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Ie = p || h;
|
|
2575
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...L, children: [
|
|
2576
|
+
Ie && /* @__PURE__ */ e.jsx(
|
|
2402
2577
|
"input",
|
|
2403
2578
|
{
|
|
2404
|
-
ref:
|
|
2579
|
+
ref: W,
|
|
2405
2580
|
type: "file",
|
|
2406
2581
|
multiple: !0,
|
|
2407
2582
|
accept: "*/*",
|
|
2408
2583
|
className: "ds-prompt-input__file-input",
|
|
2409
|
-
onChange:
|
|
2584
|
+
onChange: oe
|
|
2410
2585
|
}
|
|
2411
2586
|
),
|
|
2412
2587
|
/* @__PURE__ */ e.jsxs(
|
|
2413
2588
|
"div",
|
|
2414
2589
|
{
|
|
2415
|
-
className: ["ds-prompt-input__box",
|
|
2416
|
-
onDragEnter:
|
|
2417
|
-
onDragLeave:
|
|
2418
|
-
onDragOver:
|
|
2590
|
+
className: ["ds-prompt-input__box", b && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
|
|
2591
|
+
onDragEnter: $,
|
|
2592
|
+
onDragLeave: F,
|
|
2593
|
+
onDragOver: V,
|
|
2419
2594
|
onDrop: ne,
|
|
2420
2595
|
children: [
|
|
2421
|
-
|
|
2596
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
|
|
2422
2597
|
/* @__PURE__ */ e.jsx(
|
|
2423
2598
|
"textarea",
|
|
2424
2599
|
{
|
|
2425
2600
|
ref: H,
|
|
2426
|
-
value:
|
|
2427
|
-
onChange: (
|
|
2428
|
-
onKeyDown:
|
|
2429
|
-
onPaste:
|
|
2601
|
+
value: t,
|
|
2602
|
+
onChange: (N) => s == null ? void 0 : s(N.target.value),
|
|
2603
|
+
onKeyDown: Ne,
|
|
2604
|
+
onPaste: q,
|
|
2430
2605
|
placeholder: Q ? "" : l,
|
|
2431
2606
|
disabled: r || i,
|
|
2432
2607
|
rows: 1,
|
|
@@ -2434,82 +2609,82 @@ function Ot({
|
|
|
2434
2609
|
}
|
|
2435
2610
|
),
|
|
2436
2611
|
Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
|
|
2437
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children:
|
|
2612
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ie.displayed }),
|
|
2438
2613
|
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
|
|
2439
2614
|
] }),
|
|
2440
|
-
|
|
2441
|
-
/* @__PURE__ */ e.jsx("img", { src:
|
|
2615
|
+
m && m.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: m.map((N, B) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
|
|
2616
|
+
/* @__PURE__ */ e.jsx("img", { src: N.preview, alt: "" }),
|
|
2442
2617
|
/* @__PURE__ */ e.jsx(
|
|
2443
2618
|
"button",
|
|
2444
2619
|
{
|
|
2445
2620
|
className: "ds-prompt-input__image-remove",
|
|
2446
|
-
onClick: () =>
|
|
2621
|
+
onClick: () => x == null ? void 0 : x(B),
|
|
2447
2622
|
"aria-label": "Remove image",
|
|
2448
2623
|
type: "button",
|
|
2449
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2624
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
|
|
2450
2625
|
}
|
|
2451
2626
|
)
|
|
2452
|
-
] },
|
|
2453
|
-
|
|
2454
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2627
|
+
] }, B)) }),
|
|
2628
|
+
O.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: O.map((N) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
|
|
2629
|
+
/* @__PURE__ */ e.jsx("span", { children: N.msg }),
|
|
2455
2630
|
/* @__PURE__ */ e.jsx(
|
|
2456
2631
|
"button",
|
|
2457
2632
|
{
|
|
2458
2633
|
type: "button",
|
|
2459
2634
|
className: "ds-prompt-input__warning-close",
|
|
2460
|
-
onClick: () =>
|
|
2635
|
+
onClick: () => y(N.id),
|
|
2461
2636
|
"aria-label": "Dismiss",
|
|
2462
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2637
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
|
|
2463
2638
|
}
|
|
2464
2639
|
)
|
|
2465
|
-
] },
|
|
2466
|
-
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2640
|
+
] }, N.id)) }),
|
|
2641
|
+
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((N, B) => /* @__PURE__ */ e.jsx(ue, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
|
|
2642
|
+
N.uploading ? /* @__PURE__ */ e.jsx(ct, { size: P[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Pe, { size: P[1], strokeWidth: 1.5 }),
|
|
2643
|
+
N.filename,
|
|
2644
|
+
N.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
|
|
2470
2645
|
"button",
|
|
2471
2646
|
{
|
|
2472
2647
|
type: "button",
|
|
2473
2648
|
className: "ds-prompt-input__remove-btn",
|
|
2474
|
-
onClick: () =>
|
|
2475
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2649
|
+
onClick: () => c == null ? void 0 : c(B),
|
|
2650
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
|
|
2476
2651
|
}
|
|
2477
2652
|
)
|
|
2478
|
-
] }) },
|
|
2653
|
+
] }) }, B)) }),
|
|
2479
2654
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
|
|
2480
|
-
|
|
2481
|
-
|
|
2655
|
+
Ie && /* @__PURE__ */ e.jsx(
|
|
2656
|
+
ae,
|
|
2482
2657
|
{
|
|
2483
2658
|
variant: "ghost",
|
|
2484
2659
|
size: "xs",
|
|
2485
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2660
|
+
icon: /* @__PURE__ */ e.jsx(Pe, { size: P[2], strokeWidth: 1.5 }),
|
|
2486
2661
|
"aria-label": "Attach files",
|
|
2487
2662
|
onClick: () => {
|
|
2488
|
-
var
|
|
2489
|
-
return (
|
|
2663
|
+
var N;
|
|
2664
|
+
return (N = W.current) == null ? void 0 : N.click();
|
|
2490
2665
|
}
|
|
2491
2666
|
}
|
|
2492
2667
|
),
|
|
2493
|
-
|
|
2494
|
-
|
|
2668
|
+
j,
|
|
2669
|
+
E,
|
|
2495
2670
|
/* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
|
|
2496
2671
|
r ? /* @__PURE__ */ e.jsx(
|
|
2497
|
-
|
|
2672
|
+
ae,
|
|
2498
2673
|
{
|
|
2499
2674
|
variant: "primary",
|
|
2500
2675
|
size: "xs",
|
|
2501
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2502
|
-
onClick:
|
|
2676
|
+
icon: /* @__PURE__ */ e.jsx(dt, { size: P[2], strokeWidth: 1.5 }),
|
|
2677
|
+
onClick: a,
|
|
2503
2678
|
"aria-label": "Stop"
|
|
2504
2679
|
}
|
|
2505
2680
|
) : /* @__PURE__ */ e.jsx(
|
|
2506
|
-
|
|
2681
|
+
ae,
|
|
2507
2682
|
{
|
|
2508
2683
|
variant: "primary",
|
|
2509
2684
|
size: "xs",
|
|
2510
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2685
|
+
icon: /* @__PURE__ */ e.jsx(ut, { size: P[2], strokeWidth: 1.5 }),
|
|
2511
2686
|
onClick: n,
|
|
2512
|
-
disabled: !
|
|
2687
|
+
disabled: !Je,
|
|
2513
2688
|
"aria-label": "Send"
|
|
2514
2689
|
}
|
|
2515
2690
|
)
|
|
@@ -2519,70 +2694,70 @@ function Ot({
|
|
|
2519
2694
|
)
|
|
2520
2695
|
] });
|
|
2521
2696
|
}
|
|
2522
|
-
const
|
|
2523
|
-
function
|
|
2524
|
-
models:
|
|
2525
|
-
value:
|
|
2697
|
+
const Ue = { fast: 0, standard: 1, premium: 2 }, Ve = { fast: "data-5", standard: "data-3", premium: "data-6" };
|
|
2698
|
+
function dn({
|
|
2699
|
+
models: t = [],
|
|
2700
|
+
value: s,
|
|
2526
2701
|
onChange: n,
|
|
2527
|
-
size:
|
|
2528
|
-
minTier:
|
|
2702
|
+
size: a = "xs",
|
|
2703
|
+
minTier: o,
|
|
2529
2704
|
showAutoOption: r = !1,
|
|
2530
2705
|
groupByTier: i = !0,
|
|
2531
2706
|
className: l = "",
|
|
2532
|
-
...
|
|
2707
|
+
...u
|
|
2533
2708
|
}) {
|
|
2534
|
-
const [d,
|
|
2535
|
-
|
|
2709
|
+
const [d, m] = A(!1), p = T(null), h = T(null), c = T(null), [x, v] = A({}), g = t.filter((b) => !o || b.name === "auto" ? !0 : (Ue[b.tier] ?? 1) >= (Ue[o] ?? 1)), w = g.find((b) => b.name === "auto"), k = g.filter((b) => b.name !== "auto"), j = t.find((b) => b.name === s), M = new Set(k.map((b) => b.tier).filter(Boolean)).size > 1;
|
|
2710
|
+
D(() => {
|
|
2536
2711
|
if (!d) return;
|
|
2537
|
-
const
|
|
2538
|
-
var
|
|
2539
|
-
const
|
|
2540
|
-
if (!
|
|
2541
|
-
const
|
|
2542
|
-
|
|
2712
|
+
const b = 320, I = () => {
|
|
2713
|
+
var C;
|
|
2714
|
+
const _ = (C = h.current) == null ? void 0 : C.getBoundingClientRect();
|
|
2715
|
+
if (!_) return;
|
|
2716
|
+
const y = window.innerHeight - _.bottom, S = y < b + 8 && _.top > y;
|
|
2717
|
+
v({
|
|
2543
2718
|
position: "fixed",
|
|
2544
2719
|
zIndex: "var(--z-dropdown, 500)",
|
|
2545
|
-
left:
|
|
2546
|
-
...S ? { bottom: window.innerHeight -
|
|
2720
|
+
left: _.left,
|
|
2721
|
+
...S ? { bottom: window.innerHeight - _.top + 4, top: "auto" } : { top: _.bottom + 4, bottom: "auto" }
|
|
2547
2722
|
});
|
|
2548
2723
|
};
|
|
2549
|
-
|
|
2550
|
-
const
|
|
2551
|
-
var
|
|
2552
|
-
!((
|
|
2553
|
-
},
|
|
2554
|
-
|
|
2724
|
+
I(), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I);
|
|
2725
|
+
const O = (_) => {
|
|
2726
|
+
var y, S;
|
|
2727
|
+
!((y = p.current) != null && y.contains(_.target)) && !((S = c.current) != null && S.contains(_.target)) && m(!1);
|
|
2728
|
+
}, U = (_) => {
|
|
2729
|
+
_.key === "Escape" && m(!1);
|
|
2555
2730
|
};
|
|
2556
|
-
return document.addEventListener("mousedown",
|
|
2557
|
-
window.removeEventListener("scroll",
|
|
2731
|
+
return document.addEventListener("mousedown", O), document.addEventListener("keydown", U), () => {
|
|
2732
|
+
window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I), document.removeEventListener("mousedown", O), document.removeEventListener("keydown", U);
|
|
2558
2733
|
};
|
|
2559
2734
|
}, [d]);
|
|
2560
|
-
const
|
|
2561
|
-
n == null || n(
|
|
2562
|
-
},
|
|
2735
|
+
const L = (b) => {
|
|
2736
|
+
n == null || n(b), m(!1);
|
|
2737
|
+
}, W = (b) => /* @__PURE__ */ e.jsxs(
|
|
2563
2738
|
"button",
|
|
2564
2739
|
{
|
|
2565
2740
|
type: "button",
|
|
2566
2741
|
className: [
|
|
2567
2742
|
"ds-model-picker__item",
|
|
2568
|
-
|
|
2743
|
+
b.name === s && "ds-model-picker__item--active"
|
|
2569
2744
|
].filter(Boolean).join(" "),
|
|
2570
|
-
onClick: () =>
|
|
2745
|
+
onClick: () => L(b.name),
|
|
2571
2746
|
children: [
|
|
2572
|
-
|
|
2573
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children:
|
|
2574
|
-
|
|
2747
|
+
b.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: b.icon }) : /* @__PURE__ */ e.jsx(Me, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
2748
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: b.displayName || b.name }),
|
|
2749
|
+
M && b.tier && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[b.tier] || "default", children: b.tier })
|
|
2575
2750
|
]
|
|
2576
2751
|
},
|
|
2577
|
-
|
|
2578
|
-
), H = () => !i || !
|
|
2579
|
-
const
|
|
2580
|
-
return
|
|
2581
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier":
|
|
2582
|
-
...
|
|
2752
|
+
b.name
|
|
2753
|
+
), H = () => !i || !M ? k.map(W) : ["fast", "standard", "premium"].flatMap((b) => {
|
|
2754
|
+
const I = k.filter((O) => O.tier === b);
|
|
2755
|
+
return I.length ? [
|
|
2756
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": b, children: b.charAt(0).toUpperCase() + b.slice(1) }, `lbl-${b}`),
|
|
2757
|
+
...I.map(W)
|
|
2583
2758
|
] : [];
|
|
2584
|
-
}),
|
|
2585
|
-
r &&
|
|
2759
|
+
}), z = d && /* @__PURE__ */ e.jsxs("div", { ref: c, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: x, children: [
|
|
2760
|
+
r && w && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2586
2761
|
/* @__PURE__ */ e.jsxs(
|
|
2587
2762
|
"button",
|
|
2588
2763
|
{
|
|
@@ -2590,16 +2765,16 @@ function Ft({
|
|
|
2590
2765
|
className: [
|
|
2591
2766
|
"ds-model-picker__item",
|
|
2592
2767
|
"ds-model-picker__item--auto",
|
|
2593
|
-
|
|
2768
|
+
s === "auto" && "ds-model-picker__item--active"
|
|
2594
2769
|
].filter(Boolean).join(" "),
|
|
2595
|
-
onClick: () =>
|
|
2770
|
+
onClick: () => L("auto"),
|
|
2596
2771
|
children: [
|
|
2597
|
-
/* @__PURE__ */ e.jsx(
|
|
2772
|
+
/* @__PURE__ */ e.jsx(ft, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
2598
2773
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
|
|
2599
2774
|
]
|
|
2600
2775
|
}
|
|
2601
2776
|
),
|
|
2602
|
-
|
|
2777
|
+
k.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
|
|
2603
2778
|
] }),
|
|
2604
2779
|
H()
|
|
2605
2780
|
] });
|
|
@@ -2608,7 +2783,7 @@ function Ft({
|
|
|
2608
2783
|
{
|
|
2609
2784
|
ref: p,
|
|
2610
2785
|
className: ["ds-model-picker", l].filter(Boolean).join(" "),
|
|
2611
|
-
...
|
|
2786
|
+
...u,
|
|
2612
2787
|
children: [
|
|
2613
2788
|
/* @__PURE__ */ e.jsxs(
|
|
2614
2789
|
"button",
|
|
@@ -2616,140 +2791,140 @@ function Ft({
|
|
|
2616
2791
|
ref: h,
|
|
2617
2792
|
type: "button",
|
|
2618
2793
|
className: "ds-model-picker__trigger",
|
|
2619
|
-
onClick: () =>
|
|
2794
|
+
onClick: () => m((b) => !b),
|
|
2620
2795
|
"aria-haspopup": "listbox",
|
|
2621
2796
|
"aria-expanded": d,
|
|
2622
2797
|
children: [
|
|
2623
|
-
|
|
2624
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (
|
|
2625
|
-
|
|
2798
|
+
j != null && j.icon ? /* @__PURE__ */ e.jsx("span", { children: j.icon }) : /* @__PURE__ */ e.jsx(Me, { size: 12, strokeWidth: 1.5 }),
|
|
2799
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (j == null ? void 0 : j.displayName) || (j == null ? void 0 : j.name) || s }),
|
|
2800
|
+
M && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(ue, { size: "xs", variant: Ve[j.tier] || "default", children: j.tier })
|
|
2626
2801
|
]
|
|
2627
2802
|
}
|
|
2628
2803
|
),
|
|
2629
|
-
typeof document < "u" &&
|
|
2804
|
+
typeof document < "u" && he.createPortal(z, document.body)
|
|
2630
2805
|
]
|
|
2631
2806
|
}
|
|
2632
2807
|
);
|
|
2633
2808
|
}
|
|
2634
|
-
const
|
|
2635
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
2636
|
-
|
|
2809
|
+
const qt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
|
|
2810
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
|
|
2811
|
+
s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(s) })
|
|
2637
2812
|
] });
|
|
2638
|
-
function
|
|
2639
|
-
return
|
|
2640
|
-
}
|
|
2641
|
-
function
|
|
2642
|
-
const
|
|
2643
|
-
for (const n of
|
|
2644
|
-
|
|
2645
|
-
return [...
|
|
2646
|
-
}
|
|
2647
|
-
function
|
|
2648
|
-
sources:
|
|
2649
|
-
layout:
|
|
2813
|
+
function Ee(t) {
|
|
2814
|
+
return t != null && t.length ? "p. " + t.join(", ") : null;
|
|
2815
|
+
}
|
|
2816
|
+
function Ht(t) {
|
|
2817
|
+
const s = /* @__PURE__ */ new Map();
|
|
2818
|
+
for (const n of t)
|
|
2819
|
+
s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
|
|
2820
|
+
return [...s.values()];
|
|
2821
|
+
}
|
|
2822
|
+
function un({
|
|
2823
|
+
sources: t = [],
|
|
2824
|
+
layout: s = "list",
|
|
2650
2825
|
title: n = "Sources",
|
|
2651
|
-
maxVisible:
|
|
2652
|
-
onSourceClick:
|
|
2826
|
+
maxVisible: a = 5,
|
|
2827
|
+
onSourceClick: o
|
|
2653
2828
|
}) {
|
|
2654
|
-
const [r, i] =
|
|
2655
|
-
return
|
|
2829
|
+
const [r, i] = A(!1), l = Ht(t), u = l.length > a, d = r ? l : l.slice(0, a), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
|
|
2830
|
+
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
|
|
2656
2831
|
d.map((h) => {
|
|
2657
|
-
const
|
|
2832
|
+
const c = h.items.map((v) => v.page).filter(Boolean), x = !!o;
|
|
2658
2833
|
return /* @__PURE__ */ e.jsxs(
|
|
2659
2834
|
"div",
|
|
2660
2835
|
{
|
|
2661
|
-
className: `ds-sources-panel__compact-row${
|
|
2662
|
-
onClick:
|
|
2836
|
+
className: `ds-sources-panel__compact-row${x ? " ds-sources-panel__compact-row--clickable" : ""}`,
|
|
2837
|
+
onClick: x ? () => o(h.items[0]) : void 0,
|
|
2663
2838
|
children: [
|
|
2664
|
-
/* @__PURE__ */ e.jsx(
|
|
2839
|
+
/* @__PURE__ */ e.jsx(mt, { size: P[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
|
|
2665
2840
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
|
|
2666
|
-
|
|
2841
|
+
c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(c) })
|
|
2667
2842
|
]
|
|
2668
2843
|
},
|
|
2669
2844
|
h.filename
|
|
2670
2845
|
);
|
|
2671
2846
|
}),
|
|
2672
|
-
|
|
2847
|
+
u && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
|
|
2673
2848
|
"+",
|
|
2674
|
-
l.length -
|
|
2849
|
+
l.length - a,
|
|
2675
2850
|
" more sources"
|
|
2676
2851
|
] })
|
|
2677
2852
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
|
|
2678
2853
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
|
|
2679
2854
|
d.map((h) => {
|
|
2680
|
-
const
|
|
2681
|
-
return
|
|
2682
|
-
|
|
2855
|
+
const c = h.items.map((v) => v.page).filter(Boolean), x = !!o;
|
|
2856
|
+
return m ? /* @__PURE__ */ e.jsx(
|
|
2857
|
+
De,
|
|
2683
2858
|
{
|
|
2684
|
-
title: /* @__PURE__ */ e.jsx(
|
|
2859
|
+
title: /* @__PURE__ */ e.jsx(qt, { filename: h.filename, pages: c }),
|
|
2685
2860
|
padding: "s",
|
|
2686
|
-
children: h.items.map((
|
|
2861
|
+
children: h.items.map((v, g) => /* @__PURE__ */ e.jsx(
|
|
2687
2862
|
"div",
|
|
2688
2863
|
{
|
|
2689
|
-
className: `ds-sources-panel__snippet${
|
|
2690
|
-
onClick:
|
|
2691
|
-
children:
|
|
2864
|
+
className: `ds-sources-panel__snippet${x ? " ds-sources-panel__snippet--clickable" : ""}`,
|
|
2865
|
+
onClick: x ? () => o(v) : void 0,
|
|
2866
|
+
children: v.snippet ?? `p. ${v.page}`
|
|
2692
2867
|
},
|
|
2693
|
-
|
|
2868
|
+
g
|
|
2694
2869
|
))
|
|
2695
2870
|
},
|
|
2696
2871
|
h.filename
|
|
2697
2872
|
) : /* @__PURE__ */ e.jsxs(
|
|
2698
2873
|
"div",
|
|
2699
2874
|
{
|
|
2700
|
-
className: `ds-sources-panel__row${
|
|
2701
|
-
onClick:
|
|
2875
|
+
className: `ds-sources-panel__row${x ? " ds-sources-panel__row--clickable" : ""}`,
|
|
2876
|
+
onClick: x ? () => o(h.items[0]) : void 0,
|
|
2702
2877
|
children: [
|
|
2703
2878
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
|
|
2704
|
-
|
|
2879
|
+
c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(c) })
|
|
2705
2880
|
]
|
|
2706
2881
|
},
|
|
2707
2882
|
h.filename
|
|
2708
2883
|
);
|
|
2709
2884
|
}),
|
|
2710
|
-
|
|
2885
|
+
u && !r && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
|
|
2711
2886
|
"+",
|
|
2712
|
-
l.length -
|
|
2887
|
+
l.length - a,
|
|
2713
2888
|
" more sources"
|
|
2714
2889
|
] })
|
|
2715
2890
|
] });
|
|
2716
2891
|
}
|
|
2717
|
-
function
|
|
2718
|
-
return
|
|
2892
|
+
function Ye(t) {
|
|
2893
|
+
return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
|
|
2719
2894
|
}
|
|
2720
|
-
function
|
|
2721
|
-
used:
|
|
2722
|
-
limit:
|
|
2895
|
+
function fn({
|
|
2896
|
+
used: t,
|
|
2897
|
+
limit: s,
|
|
2723
2898
|
size: n = "s",
|
|
2724
|
-
showCount:
|
|
2725
|
-
showPercent:
|
|
2899
|
+
showCount: a = !0,
|
|
2900
|
+
showPercent: o = !1,
|
|
2726
2901
|
warningThreshold: r = 0.8,
|
|
2727
2902
|
errorThreshold: i = 1
|
|
2728
2903
|
}) {
|
|
2729
|
-
const l =
|
|
2904
|
+
const l = s > 0 ? t / s : 0, u = Math.min(l * 100, 100), d = l >= i ? "error" : l >= r ? "warning" : "normal";
|
|
2730
2905
|
return /* @__PURE__ */ e.jsxs(
|
|
2731
2906
|
"div",
|
|
2732
2907
|
{
|
|
2733
2908
|
className: `ds-token-counter ds-token-counter--${n}`,
|
|
2734
2909
|
role: "meter",
|
|
2735
|
-
"aria-valuenow":
|
|
2736
|
-
"aria-valuemax":
|
|
2910
|
+
"aria-valuenow": t,
|
|
2911
|
+
"aria-valuemax": s,
|
|
2737
2912
|
children: [
|
|
2738
2913
|
/* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
|
|
2739
2914
|
"div",
|
|
2740
2915
|
{
|
|
2741
2916
|
className: `ds-token-counter__fill ds-token-counter__fill--${d}`,
|
|
2742
|
-
style: { width: `${
|
|
2917
|
+
style: { width: `${u}%` }
|
|
2743
2918
|
}
|
|
2744
2919
|
) }),
|
|
2745
|
-
(
|
|
2746
|
-
|
|
2747
|
-
|
|
2920
|
+
(a || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${d}`, children: [
|
|
2921
|
+
a && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
2922
|
+
Ye(t),
|
|
2748
2923
|
" / ",
|
|
2749
|
-
|
|
2924
|
+
Ye(s),
|
|
2750
2925
|
" tokens"
|
|
2751
2926
|
] }),
|
|
2752
|
-
|
|
2927
|
+
o && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
2753
2928
|
Math.round(l * 100),
|
|
2754
2929
|
"%"
|
|
2755
2930
|
] })
|
|
@@ -2758,125 +2933,125 @@ function Ct({
|
|
|
2758
2933
|
}
|
|
2759
2934
|
);
|
|
2760
2935
|
}
|
|
2761
|
-
const
|
|
2762
|
-
function
|
|
2763
|
-
return
|
|
2936
|
+
const qe = 5;
|
|
2937
|
+
function Kt(t) {
|
|
2938
|
+
return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
|
|
2764
2939
|
}
|
|
2765
|
-
function
|
|
2766
|
-
value:
|
|
2767
|
-
size:
|
|
2940
|
+
function mn({
|
|
2941
|
+
value: t = 0,
|
|
2942
|
+
size: s = "xs",
|
|
2768
2943
|
showLabel: n = "none",
|
|
2769
|
-
layout:
|
|
2944
|
+
layout: a = "inline"
|
|
2770
2945
|
}) {
|
|
2771
|
-
const
|
|
2946
|
+
const o = Math.max(0, Math.min(1, t)), r = Math.round(o * qe), i = Kt(o);
|
|
2772
2947
|
return /* @__PURE__ */ e.jsxs("div", { className: [
|
|
2773
2948
|
"ds-confidence-bar",
|
|
2774
|
-
`ds-confidence-bar--${
|
|
2949
|
+
`ds-confidence-bar--${s}`,
|
|
2775
2950
|
`ds-confidence-bar--${i}`,
|
|
2776
|
-
|
|
2951
|
+
a === "block" && "ds-confidence-bar--block"
|
|
2777
2952
|
].filter(Boolean).join(" "), children: [
|
|
2778
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length:
|
|
2953
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: qe }, (l, u) => /* @__PURE__ */ e.jsx(
|
|
2779
2954
|
"div",
|
|
2780
2955
|
{
|
|
2781
|
-
className: `ds-confidence-bar__seg${
|
|
2956
|
+
className: `ds-confidence-bar__seg${u < r ? " ds-confidence-bar__seg--filled" : ""}`
|
|
2782
2957
|
},
|
|
2783
|
-
|
|
2958
|
+
u
|
|
2784
2959
|
)) }),
|
|
2785
2960
|
n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
|
|
2786
2961
|
] });
|
|
2787
2962
|
}
|
|
2788
|
-
const
|
|
2789
|
-
function
|
|
2790
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${
|
|
2791
|
-
|
|
2792
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children:
|
|
2793
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children:
|
|
2963
|
+
const Gt = { add: "+", remove: "-", context: " " };
|
|
2964
|
+
function ge({ line: t, lineNumbers: s }) {
|
|
2965
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
|
|
2966
|
+
s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
|
|
2967
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Gt[t.type] }),
|
|
2968
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
|
|
2794
2969
|
] });
|
|
2795
2970
|
}
|
|
2796
|
-
function
|
|
2797
|
-
lines:
|
|
2798
|
-
layout:
|
|
2971
|
+
function pn({
|
|
2972
|
+
lines: t = [],
|
|
2973
|
+
layout: s = "inline",
|
|
2799
2974
|
wordWrap: n = !1,
|
|
2800
|
-
lineNumbers:
|
|
2801
|
-
maxHeight:
|
|
2975
|
+
lineNumbers: a = !0,
|
|
2976
|
+
maxHeight: o,
|
|
2802
2977
|
title: r
|
|
2803
2978
|
}) {
|
|
2804
2979
|
const i = [
|
|
2805
2980
|
"ds-diff-view",
|
|
2806
|
-
`ds-diff-view--${
|
|
2981
|
+
`ds-diff-view--${s}`,
|
|
2807
2982
|
n && "ds-diff-view--wrap"
|
|
2808
|
-
].filter(Boolean).join(" "), l =
|
|
2809
|
-
if (
|
|
2810
|
-
const
|
|
2983
|
+
].filter(Boolean).join(" "), l = o ? { maxHeight: o, overflowY: "auto" } : void 0;
|
|
2984
|
+
if (s === "split") {
|
|
2985
|
+
const u = t.filter((m) => m.type === "remove" || m.type === "context"), d = t.filter((m) => m.type === "add" || m.type === "context");
|
|
2811
2986
|
return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
|
|
2812
2987
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
|
|
2813
2988
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
|
|
2814
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children:
|
|
2815
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((
|
|
2989
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: a }, p)) }),
|
|
2990
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: a }, p)) })
|
|
2816
2991
|
] })
|
|
2817
2992
|
] });
|
|
2818
2993
|
}
|
|
2819
2994
|
return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
|
|
2820
2995
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
|
|
2821
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children:
|
|
2996
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((u, d) => /* @__PURE__ */ e.jsx(ge, { line: u, lineNumbers: a }, d)) })
|
|
2822
2997
|
] });
|
|
2823
2998
|
}
|
|
2824
|
-
function
|
|
2825
|
-
value:
|
|
2826
|
-
onLike:
|
|
2999
|
+
function Xt({
|
|
3000
|
+
value: t = "idle",
|
|
3001
|
+
onLike: s,
|
|
2827
3002
|
onDislike: n,
|
|
2828
|
-
className:
|
|
2829
|
-
...
|
|
3003
|
+
className: a = "",
|
|
3004
|
+
...o
|
|
2830
3005
|
}) {
|
|
2831
|
-
const r =
|
|
3006
|
+
const r = t !== "idle";
|
|
2832
3007
|
return /* @__PURE__ */ e.jsxs(
|
|
2833
3008
|
"div",
|
|
2834
3009
|
{
|
|
2835
3010
|
className: [
|
|
2836
3011
|
"ds-message-feedback",
|
|
2837
3012
|
r && "ds-message-feedback--voted",
|
|
2838
|
-
|
|
3013
|
+
a
|
|
2839
3014
|
].filter(Boolean).join(" "),
|
|
2840
|
-
...
|
|
3015
|
+
...o,
|
|
2841
3016
|
children: [
|
|
2842
|
-
(!r ||
|
|
3017
|
+
(!r || t === "liked") && /* @__PURE__ */ e.jsx(
|
|
2843
3018
|
"button",
|
|
2844
3019
|
{
|
|
2845
3020
|
className: [
|
|
2846
3021
|
"ds-message-feedback__btn",
|
|
2847
|
-
|
|
3022
|
+
t === "liked" && "ds-message-feedback__btn--liked"
|
|
2848
3023
|
].filter(Boolean).join(" "),
|
|
2849
|
-
onClick:
|
|
3024
|
+
onClick: s,
|
|
2850
3025
|
disabled: r,
|
|
2851
3026
|
"aria-label": "Like",
|
|
2852
|
-
"aria-pressed":
|
|
3027
|
+
"aria-pressed": t === "liked",
|
|
2853
3028
|
children: /* @__PURE__ */ e.jsx(
|
|
2854
|
-
|
|
3029
|
+
pt,
|
|
2855
3030
|
{
|
|
2856
|
-
size:
|
|
3031
|
+
size: P[1],
|
|
2857
3032
|
strokeWidth: 1.5,
|
|
2858
|
-
fill:
|
|
3033
|
+
fill: t === "liked" ? "currentColor" : "none"
|
|
2859
3034
|
}
|
|
2860
3035
|
)
|
|
2861
3036
|
}
|
|
2862
3037
|
),
|
|
2863
|
-
(!r ||
|
|
3038
|
+
(!r || t === "disliked") && /* @__PURE__ */ e.jsx(
|
|
2864
3039
|
"button",
|
|
2865
3040
|
{
|
|
2866
3041
|
className: [
|
|
2867
3042
|
"ds-message-feedback__btn",
|
|
2868
|
-
|
|
3043
|
+
t === "disliked" && "ds-message-feedback__btn--disliked"
|
|
2869
3044
|
].filter(Boolean).join(" "),
|
|
2870
3045
|
onClick: n,
|
|
2871
3046
|
disabled: r,
|
|
2872
3047
|
"aria-label": "Dislike",
|
|
2873
|
-
"aria-pressed":
|
|
3048
|
+
"aria-pressed": t === "disliked",
|
|
2874
3049
|
children: /* @__PURE__ */ e.jsx(
|
|
2875
|
-
|
|
3050
|
+
ht,
|
|
2876
3051
|
{
|
|
2877
|
-
size:
|
|
3052
|
+
size: P[1],
|
|
2878
3053
|
strokeWidth: 1.5,
|
|
2879
|
-
fill:
|
|
3054
|
+
fill: t === "disliked" ? "currentColor" : "none"
|
|
2880
3055
|
}
|
|
2881
3056
|
)
|
|
2882
3057
|
}
|
|
@@ -2885,48 +3060,48 @@ function Os({
|
|
|
2885
3060
|
}
|
|
2886
3061
|
);
|
|
2887
3062
|
}
|
|
2888
|
-
function
|
|
2889
|
-
const
|
|
2890
|
-
if (isNaN(
|
|
2891
|
-
const n = /* @__PURE__ */ new Date(),
|
|
2892
|
-
if (
|
|
2893
|
-
if (
|
|
2894
|
-
const i =
|
|
2895
|
-
return `${i} ${l} ${
|
|
2896
|
-
}
|
|
2897
|
-
function
|
|
2898
|
-
role:
|
|
2899
|
-
text:
|
|
3063
|
+
function Jt(t) {
|
|
3064
|
+
const s = t instanceof Date ? t : new Date(t);
|
|
3065
|
+
if (isNaN(s)) return null;
|
|
3066
|
+
const n = /* @__PURE__ */ new Date(), a = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(o - 864e5);
|
|
3067
|
+
if (s >= o) return a;
|
|
3068
|
+
if (s >= r) return `Yesterday ${a}`;
|
|
3069
|
+
const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
|
|
3070
|
+
return `${i} ${l} ${a}`;
|
|
3071
|
+
}
|
|
3072
|
+
function hn({
|
|
3073
|
+
role: t = "assistant",
|
|
3074
|
+
text: s,
|
|
2900
3075
|
timestamp: n,
|
|
2901
|
-
feedbackValue:
|
|
2902
|
-
onLike:
|
|
3076
|
+
feedbackValue: a = "idle",
|
|
3077
|
+
onLike: o,
|
|
2903
3078
|
onDislike: r,
|
|
2904
3079
|
className: i = "",
|
|
2905
3080
|
...l
|
|
2906
3081
|
}) {
|
|
2907
|
-
const
|
|
2908
|
-
return !
|
|
3082
|
+
const u = t === "assistant" && (o || r), d = !!s, m = n ? Jt(n) : null;
|
|
3083
|
+
return !u && !d && !m ? null : /* @__PURE__ */ e.jsxs(
|
|
2909
3084
|
"div",
|
|
2910
3085
|
{
|
|
2911
|
-
className: ["ds-message-footer", `ds-message-footer--${
|
|
3086
|
+
className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
|
|
2912
3087
|
...l,
|
|
2913
3088
|
children: [
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
d && /* @__PURE__ */ e.jsx(
|
|
2917
|
-
|
|
3089
|
+
t === "user" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m }),
|
|
3090
|
+
u && /* @__PURE__ */ e.jsx(Xt, { className: "ds-message-action", value: a, onLike: o, onDislike: r }),
|
|
3091
|
+
d && /* @__PURE__ */ e.jsx(Ut, { className: "ds-message-action", text: s }),
|
|
3092
|
+
t === "assistant" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m })
|
|
2918
3093
|
]
|
|
2919
3094
|
}
|
|
2920
3095
|
);
|
|
2921
3096
|
}
|
|
2922
|
-
function
|
|
2923
|
-
return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot",
|
|
3097
|
+
function xn({ label: t, className: s = "", ...n }) {
|
|
3098
|
+
return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
|
|
2924
3099
|
/* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
|
|
2925
|
-
|
|
3100
|
+
t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
|
|
2926
3101
|
] });
|
|
2927
3102
|
}
|
|
2928
|
-
function
|
|
2929
|
-
const r =
|
|
3103
|
+
function vn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
|
|
3104
|
+
const r = t === "dark", i = s ?? r, l = r ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", u = r ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
|
|
2930
3105
|
return /* @__PURE__ */ e.jsx(
|
|
2931
3106
|
"div",
|
|
2932
3107
|
{
|
|
@@ -2939,9 +3114,9 @@ function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
|
|
|
2939
3114
|
...i && {
|
|
2940
3115
|
background: "radial-gradient(ellipse 1000px 500px at 50% 30%, rgba(234,100,100,0.18), transparent 70%)"
|
|
2941
3116
|
},
|
|
2942
|
-
...
|
|
3117
|
+
...a
|
|
2943
3118
|
},
|
|
2944
|
-
...
|
|
3119
|
+
...o,
|
|
2945
3120
|
children: /* @__PURE__ */ e.jsx(
|
|
2946
3121
|
"div",
|
|
2947
3122
|
{
|
|
@@ -2951,8 +3126,8 @@ function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
|
|
|
2951
3126
|
backgroundImage: [
|
|
2952
3127
|
`linear-gradient(${l} 1px, transparent 1px)`,
|
|
2953
3128
|
`linear-gradient(90deg, ${l} 1px, transparent 1px)`,
|
|
2954
|
-
`linear-gradient(${
|
|
2955
|
-
`linear-gradient(90deg, ${
|
|
3129
|
+
`linear-gradient(${u} 1px, transparent 1px)`,
|
|
3130
|
+
`linear-gradient(90deg, ${u} 1px, transparent 1px)`
|
|
2956
3131
|
].join(", "),
|
|
2957
3132
|
backgroundSize: "80px 80px, 80px 80px, 16px 16px, 16px 16px",
|
|
2958
3133
|
backgroundPosition: "-1px -1px, -1px -1px, -1px -1px, -1px -1px",
|
|
@@ -2966,93 +3141,285 @@ function Ht({ variant: s = "light", glow: t, mask: n = !0, style: o, ...a }) {
|
|
|
2966
3141
|
}
|
|
2967
3142
|
);
|
|
2968
3143
|
}
|
|
2969
|
-
function
|
|
2970
|
-
const r =
|
|
3144
|
+
function _n({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
|
|
3145
|
+
const r = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
|
|
2971
3146
|
return /* @__PURE__ */ e.jsx(
|
|
2972
3147
|
"div",
|
|
2973
3148
|
{
|
|
2974
|
-
className: `ds-scrollable ${
|
|
3149
|
+
className: `ds-scrollable ${a}`,
|
|
2975
3150
|
style: { ...r, ...n },
|
|
2976
|
-
...
|
|
2977
|
-
children:
|
|
3151
|
+
...o,
|
|
3152
|
+
children: t
|
|
2978
3153
|
}
|
|
2979
3154
|
);
|
|
2980
3155
|
}
|
|
3156
|
+
const we = 280, le = 22, ce = 8, be = 6, Zt = 200;
|
|
3157
|
+
function Qt(t) {
|
|
3158
|
+
return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
|
|
3159
|
+
}
|
|
3160
|
+
function es(t, s, n) {
|
|
3161
|
+
const a = window.innerWidth, o = window.innerHeight;
|
|
3162
|
+
if (o - t.bottom >= s + le + ce) return "bottom";
|
|
3163
|
+
if (t.top >= s + le + ce) return "top";
|
|
3164
|
+
if (a - t.right >= n + le + ce) return "right";
|
|
3165
|
+
if (t.left >= n + le + ce) return "left";
|
|
3166
|
+
const r = Math.max(t.top, o - t.bottom, a - t.right, t.left);
|
|
3167
|
+
return r === o - t.bottom ? "bottom" : r === t.top ? "top" : r === a - t.right ? "right" : "left";
|
|
3168
|
+
}
|
|
3169
|
+
function ts(t, s, n, a) {
|
|
3170
|
+
const o = window.innerWidth, r = window.innerHeight;
|
|
3171
|
+
let i, l;
|
|
3172
|
+
switch (t) {
|
|
3173
|
+
case "top":
|
|
3174
|
+
i = s.top - n - le, l = s.left + s.width / 2 - a / 2;
|
|
3175
|
+
break;
|
|
3176
|
+
case "bottom":
|
|
3177
|
+
i = s.bottom + le, l = s.left + s.width / 2 - a / 2;
|
|
3178
|
+
break;
|
|
3179
|
+
case "left":
|
|
3180
|
+
i = s.top + s.height / 2 - n / 2, l = s.left - a - le;
|
|
3181
|
+
break;
|
|
3182
|
+
default:
|
|
3183
|
+
i = s.top + s.height / 2 - n / 2, l = s.right + le;
|
|
3184
|
+
}
|
|
3185
|
+
const u = Math.max(ce, Math.min(o - a - ce, l));
|
|
3186
|
+
return { top: Math.max(ce, Math.min(r - n - ce, i)), left: u, arrowOffset: l - u };
|
|
3187
|
+
}
|
|
3188
|
+
function bn({
|
|
3189
|
+
steps: t,
|
|
3190
|
+
currentStep: s,
|
|
3191
|
+
onNext: n,
|
|
3192
|
+
onBack: a,
|
|
3193
|
+
onSkip: o,
|
|
3194
|
+
onFinish: r,
|
|
3195
|
+
overlay: i = !0,
|
|
3196
|
+
labelNext: l = "Next",
|
|
3197
|
+
labelBack: u = "Back",
|
|
3198
|
+
labelSkip: d = "Skip tour",
|
|
3199
|
+
labelFinish: m = "Done"
|
|
3200
|
+
}) {
|
|
3201
|
+
const p = T(null), h = T(t), c = T(s);
|
|
3202
|
+
h.current = t, c.current = s;
|
|
3203
|
+
const [x, v] = A(!1), [g, w] = A({ position: "fixed", visibility: "hidden", width: we }), [k, j] = A("bottom"), [E, M] = A(null), L = T(!1), W = t[s], H = s === t.length - 1, z = He(() => {
|
|
3204
|
+
const b = h.current[c.current];
|
|
3205
|
+
if (!b || !p.current) return;
|
|
3206
|
+
const I = Qt(b.target);
|
|
3207
|
+
if (!I) return;
|
|
3208
|
+
const O = I.getBoundingClientRect(), _ = p.current.getBoundingClientRect().height || 160, y = we, S = b.position || es(O, _, y), { top: C, left: K, arrowOffset: X } = ts(S, O, _, y);
|
|
3209
|
+
j(S), w({
|
|
3210
|
+
position: "fixed",
|
|
3211
|
+
top: C,
|
|
3212
|
+
left: K,
|
|
3213
|
+
width: we,
|
|
3214
|
+
visibility: "visible",
|
|
3215
|
+
"--arrow-offset": `${X}px`
|
|
3216
|
+
}), M({
|
|
3217
|
+
top: O.top - be,
|
|
3218
|
+
left: O.left - be,
|
|
3219
|
+
width: O.width + be * 2,
|
|
3220
|
+
height: O.height + be * 2
|
|
3221
|
+
});
|
|
3222
|
+
}, []);
|
|
3223
|
+
return D(() => {
|
|
3224
|
+
window.addEventListener("scroll", z, !0), window.addEventListener("resize", z);
|
|
3225
|
+
const b = requestAnimationFrame(() => {
|
|
3226
|
+
z(), v(!0), L.current = !0;
|
|
3227
|
+
});
|
|
3228
|
+
return () => {
|
|
3229
|
+
cancelAnimationFrame(b), window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z);
|
|
3230
|
+
};
|
|
3231
|
+
}, []), D(() => {
|
|
3232
|
+
if (!L.current) return;
|
|
3233
|
+
v(!1);
|
|
3234
|
+
const b = setTimeout(() => {
|
|
3235
|
+
w((I) => ({ ...I, visibility: "hidden" })), requestAnimationFrame(() => {
|
|
3236
|
+
z(), v(!0);
|
|
3237
|
+
});
|
|
3238
|
+
}, Zt + 20);
|
|
3239
|
+
return () => clearTimeout(b);
|
|
3240
|
+
}, [s]), D(() => {
|
|
3241
|
+
x && p.current && p.current.focus({ preventScroll: !0 });
|
|
3242
|
+
}, [x]), D(() => {
|
|
3243
|
+
const b = (I) => {
|
|
3244
|
+
I.key === "Escape" && o();
|
|
3245
|
+
};
|
|
3246
|
+
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
3247
|
+
}, [o]), D(() => {
|
|
3248
|
+
if (!x) return;
|
|
3249
|
+
const b = (I) => {
|
|
3250
|
+
if (I.key !== "Tab" || !p.current) return;
|
|
3251
|
+
const O = Array.from(
|
|
3252
|
+
p.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
|
|
3253
|
+
);
|
|
3254
|
+
if (!O.length) return;
|
|
3255
|
+
const U = O[0], _ = O[O.length - 1];
|
|
3256
|
+
I.shiftKey && document.activeElement === U ? (I.preventDefault(), _.focus()) : !I.shiftKey && document.activeElement === _ && (I.preventDefault(), U.focus());
|
|
3257
|
+
};
|
|
3258
|
+
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
3259
|
+
}, [x]), !W || typeof document > "u" ? null : he.createPortal(
|
|
3260
|
+
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3261
|
+
E && /* @__PURE__ */ e.jsx(
|
|
3262
|
+
"div",
|
|
3263
|
+
{
|
|
3264
|
+
className: [
|
|
3265
|
+
"ds-coachmark__spotlight",
|
|
3266
|
+
i && "ds-coachmark__spotlight--overlay",
|
|
3267
|
+
x && "ds-coachmark__spotlight--visible"
|
|
3268
|
+
].filter(Boolean).join(" "),
|
|
3269
|
+
style: E,
|
|
3270
|
+
"aria-hidden": "true"
|
|
3271
|
+
}
|
|
3272
|
+
),
|
|
3273
|
+
/* @__PURE__ */ e.jsxs(
|
|
3274
|
+
"div",
|
|
3275
|
+
{
|
|
3276
|
+
ref: p,
|
|
3277
|
+
"data-ds-portal": "",
|
|
3278
|
+
role: "dialog",
|
|
3279
|
+
"aria-modal": "false",
|
|
3280
|
+
"aria-live": "polite",
|
|
3281
|
+
"aria-label": W.title ?? `Step ${s + 1} of ${t.length}`,
|
|
3282
|
+
className: [
|
|
3283
|
+
"ds-coachmark__bubble",
|
|
3284
|
+
`ds-coachmark__bubble--${k}`,
|
|
3285
|
+
x && "ds-coachmark__bubble--visible"
|
|
3286
|
+
].filter(Boolean).join(" "),
|
|
3287
|
+
style: g,
|
|
3288
|
+
tabIndex: -1,
|
|
3289
|
+
children: [
|
|
3290
|
+
/* @__PURE__ */ e.jsx(
|
|
3291
|
+
"button",
|
|
3292
|
+
{
|
|
3293
|
+
type: "button",
|
|
3294
|
+
className: "ds-coachmark__close",
|
|
3295
|
+
onClick: o,
|
|
3296
|
+
"aria-label": d,
|
|
3297
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
3298
|
+
}
|
|
3299
|
+
),
|
|
3300
|
+
W.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: W.title }),
|
|
3301
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: W.content }),
|
|
3302
|
+
/* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
|
|
3303
|
+
/* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
|
|
3304
|
+
s + 1,
|
|
3305
|
+
" / ",
|
|
3306
|
+
t.length
|
|
3307
|
+
] }),
|
|
3308
|
+
/* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
|
|
3309
|
+
s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", onClick: a, children: u }),
|
|
3310
|
+
/* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", onClick: H ? r : n, children: H ? m : l })
|
|
3311
|
+
] })
|
|
3312
|
+
] })
|
|
3313
|
+
]
|
|
3314
|
+
}
|
|
3315
|
+
)
|
|
3316
|
+
] }),
|
|
3317
|
+
document.body
|
|
3318
|
+
);
|
|
3319
|
+
}
|
|
3320
|
+
function jn(t, s = {}) {
|
|
3321
|
+
const { storageKey: n } = s, [a, o] = A(0), [r, i] = A(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", u = He(() => {
|
|
3322
|
+
i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
|
|
3323
|
+
}, [n]);
|
|
3324
|
+
return {
|
|
3325
|
+
currentStep: a,
|
|
3326
|
+
isActive: r,
|
|
3327
|
+
start: () => {
|
|
3328
|
+
l() || (o(0), i(!0));
|
|
3329
|
+
},
|
|
3330
|
+
next: () => o((d) => Math.min(d + 1, t.length - 1)),
|
|
3331
|
+
back: () => o((d) => Math.max(d - 1, 0)),
|
|
3332
|
+
skip: u,
|
|
3333
|
+
finish: u
|
|
3334
|
+
};
|
|
3335
|
+
}
|
|
2981
3336
|
export {
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3337
|
+
De as Accordion,
|
|
3338
|
+
hs as Alert,
|
|
3339
|
+
Zs as AnimatedNumber,
|
|
3340
|
+
Es as Avatar,
|
|
3341
|
+
ue as Badge,
|
|
3342
|
+
Gs as Banner,
|
|
3343
|
+
vs as BottomSheet,
|
|
3344
|
+
Ms as Breadcrumb,
|
|
3345
|
+
ae as Button,
|
|
3346
|
+
cs as Card,
|
|
3347
|
+
on as ChatMessage,
|
|
3348
|
+
ys as Checkbox,
|
|
3349
|
+
bn as Coachmark,
|
|
3350
|
+
_s as Code,
|
|
3351
|
+
yt as CodeAccordion,
|
|
3352
|
+
mn as ConfidenceBar,
|
|
3353
|
+
Ut as CopyButton,
|
|
3354
|
+
pn as DiffView,
|
|
3355
|
+
Cs as Drawer,
|
|
3356
|
+
Oe as DrawerFooter,
|
|
3357
|
+
Xs as Dropdown,
|
|
3358
|
+
Is as EmptyState,
|
|
3359
|
+
vn as EngineerGrid,
|
|
3360
|
+
Ls as FormField,
|
|
3361
|
+
ds as H1,
|
|
3362
|
+
us as H2,
|
|
3363
|
+
fs as H3,
|
|
3364
|
+
ms as H4,
|
|
3365
|
+
Qs as InView,
|
|
3366
|
+
as as Input,
|
|
3367
|
+
bs as Link,
|
|
3368
|
+
Xt as MessageFeedback,
|
|
3369
|
+
hn as MessageFooter,
|
|
3370
|
+
xs as Modal,
|
|
3371
|
+
me as ModalFooter,
|
|
3372
|
+
dn as ModelPicker,
|
|
3373
|
+
Fs as NavRail,
|
|
3374
|
+
Ks as NavRailAgent,
|
|
3375
|
+
Us as NavRailBody,
|
|
3376
|
+
qs as NavRailDivider,
|
|
3377
|
+
Ys as NavRailFooter,
|
|
3378
|
+
Vs as NavRailHeader,
|
|
3379
|
+
Ws as NavRailItem,
|
|
3380
|
+
Hs as NavRailRecents,
|
|
3381
|
+
ps as P1,
|
|
3382
|
+
jt as P2,
|
|
3383
|
+
Ke as P3,
|
|
3384
|
+
zs as Pagination,
|
|
3385
|
+
Js as ProgressBar,
|
|
3386
|
+
cn as PromptInput,
|
|
3387
|
+
ks as Radio,
|
|
3388
|
+
nn as ReasoningBlock,
|
|
3389
|
+
_n as Scrollable,
|
|
3390
|
+
gs as SegmentedControl,
|
|
3391
|
+
is as Select,
|
|
3392
|
+
Os as SidePage,
|
|
3393
|
+
Fe as SidePageFooter,
|
|
3394
|
+
$t as Skeleton,
|
|
3395
|
+
un as SourcesPanel,
|
|
3396
|
+
_t as Spinner,
|
|
3397
|
+
Ps as Stat,
|
|
3398
|
+
rn as StepIndicator,
|
|
3399
|
+
ls as Stepper,
|
|
3400
|
+
an as StreamingText,
|
|
3401
|
+
Ns as Tab,
|
|
3402
|
+
$s as Table,
|
|
3403
|
+
Rs as TableBody,
|
|
3404
|
+
Ts as TableHead,
|
|
3405
|
+
Ss as TableRow,
|
|
3406
|
+
As as TableSubheaderRow,
|
|
3407
|
+
js as Tabs,
|
|
3408
|
+
Ds as Td,
|
|
3409
|
+
os as Textarea,
|
|
3410
|
+
Bs as Th,
|
|
3411
|
+
xn as ThinkingDot,
|
|
3412
|
+
tn as ToastContainer,
|
|
3413
|
+
ws as Toggle,
|
|
3414
|
+
fn as TokenCounter,
|
|
3415
|
+
sn as ToolCallBubble,
|
|
3416
|
+
sn as ToolCallCard,
|
|
3417
|
+
Ge as Tooltip,
|
|
3418
|
+
P as iconSizes,
|
|
3419
|
+
Mt as useAnimatedNumber,
|
|
3420
|
+
Vt as useAnimatedPlaceholder,
|
|
3421
|
+
jn as useCoachmark,
|
|
3422
|
+
zt as useInView,
|
|
3423
|
+
ln as useStreamScroll,
|
|
3424
|
+
en as useToast
|
|
3058
3425
|
};
|