@vessel-agent/model-registry 0.0.0-stage → 2.3.0-beta.2

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.
@@ -0,0 +1,4887 @@
1
+ /* biome-ignore-all lint format assist: generated by `bun run build:ui` */
2
+ import { jsx as o, jsxs as x, Fragment as or } from "react/jsx-runtime";
3
+ import { forwardRef as Ae, useState as C, useRef as oe, useId as nr, useImperativeHandle as lr, useCallback as De, useEffect as me, useLayoutEffect as sr, isValidElement as ar, Fragment as ir, useMemo as Ue } from "react";
4
+ import { createPortal as dr } from "react-dom";
5
+ function yt(e) {
6
+ var n, t, r = "";
7
+ if (typeof e == "string" || typeof e == "number") r += e;
8
+ else if (typeof e == "object") if (Array.isArray(e)) {
9
+ var s = e.length;
10
+ for (n = 0; n < s; n++) e[n] && (t = yt(e[n])) && (r && (r += " "), r += t);
11
+ } else for (t in e) e[t] && (r && (r += " "), r += t);
12
+ return r;
13
+ }
14
+ function kt() {
15
+ for (var e, n, t = 0, r = "", s = arguments.length; t < s; t++) (e = arguments[t]) && (n = yt(e)) && (r && (r += " "), r += n);
16
+ return r;
17
+ }
18
+ const ct = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, mt = kt, wt = (e, n) => (t) => {
19
+ var r;
20
+ if (n?.variants == null) return mt(e, t?.class, t?.className);
21
+ const { variants: s, defaultVariants: a } = n, l = Object.keys(s).map((i) => {
22
+ const v = t?.[i], y = a?.[i];
23
+ if (v === null) return null;
24
+ const z = ct(v) || ct(y);
25
+ return s[i][z];
26
+ }), u = t && Object.entries(t).reduce((i, v) => {
27
+ let [y, z] = v;
28
+ return z === void 0 || (i[y] = z), i;
29
+ }, {}), d = n == null || (r = n.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((i, v) => {
30
+ let { class: y, className: z, ...T } = v;
31
+ return Object.entries(T).every((W) => {
32
+ let [P, R] = W;
33
+ return Array.isArray(R) ? R.includes({
34
+ ...a,
35
+ ...u
36
+ }[P]) : {
37
+ ...a,
38
+ ...u
39
+ }[P] === R;
40
+ }) ? [
41
+ ...i,
42
+ y,
43
+ z
44
+ ] : i;
45
+ }, []);
46
+ return mt(e, l, d, t?.class, t?.className);
47
+ }, cr = (e, n) => {
48
+ const t = new Array(e.length + n.length);
49
+ for (let r = 0; r < e.length; r++)
50
+ t[r] = e[r];
51
+ for (let r = 0; r < n.length; r++)
52
+ t[e.length + r] = n[r];
53
+ return t;
54
+ }, mr = (e, n) => ({
55
+ classGroupId: e,
56
+ validator: n
57
+ }), Ct = (e = /* @__PURE__ */ new Map(), n = null, t) => ({
58
+ nextPart: e,
59
+ validators: n,
60
+ classGroupId: t
61
+ }), Ve = "-", ut = [], ur = "arbitrary..", fr = (e) => {
62
+ const n = hr(e), {
63
+ conflictingClassGroups: t,
64
+ conflictingClassGroupModifiers: r
65
+ } = e;
66
+ return {
67
+ getClassGroupId: (l) => {
68
+ if (l.startsWith("[") && l.endsWith("]"))
69
+ return pr(l);
70
+ const u = l.split(Ve), d = u[0] === "" && u.length > 1 ? 1 : 0;
71
+ return Nt(u, d, n);
72
+ },
73
+ getConflictingClassGroupIds: (l, u) => {
74
+ if (u) {
75
+ const d = r[l], i = t[l];
76
+ return d ? i ? cr(i, d) : d : i || ut;
77
+ }
78
+ return t[l] || ut;
79
+ }
80
+ };
81
+ }, Nt = (e, n, t) => {
82
+ if (e.length - n === 0)
83
+ return t.classGroupId;
84
+ const s = e[n], a = t.nextPart.get(s);
85
+ if (a) {
86
+ const i = Nt(e, n + 1, a);
87
+ if (i) return i;
88
+ }
89
+ const l = t.validators;
90
+ if (l === null)
91
+ return;
92
+ const u = n === 0 ? e.join(Ve) : e.slice(n).join(Ve), d = l.length;
93
+ for (let i = 0; i < d; i++) {
94
+ const v = l[i];
95
+ if (v.validator(u))
96
+ return v.classGroupId;
97
+ }
98
+ }, pr = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
99
+ const n = e.slice(1, -1), t = n.indexOf(":"), r = n.slice(0, t);
100
+ return r ? ur + r : void 0;
101
+ })(), hr = (e) => {
102
+ const {
103
+ theme: n,
104
+ classGroups: t
105
+ } = e;
106
+ return gr(t, n);
107
+ }, gr = (e, n) => {
108
+ const t = Ct();
109
+ for (const r in e) {
110
+ const s = e[r];
111
+ Ze(s, t, r, n);
112
+ }
113
+ return t;
114
+ }, Ze = (e, n, t, r) => {
115
+ const s = e.length;
116
+ for (let a = 0; a < s; a++) {
117
+ const l = e[a];
118
+ br(l, n, t, r);
119
+ }
120
+ }, br = (e, n, t, r) => {
121
+ if (typeof e == "string") {
122
+ xr(e, n, t);
123
+ return;
124
+ }
125
+ if (typeof e == "function") {
126
+ vr(e, n, t, r);
127
+ return;
128
+ }
129
+ yr(e, n, t, r);
130
+ }, xr = (e, n, t) => {
131
+ const r = e === "" ? n : At(n, e);
132
+ r.classGroupId = t;
133
+ }, vr = (e, n, t, r) => {
134
+ if (kr(e)) {
135
+ Ze(e(r), n, t, r);
136
+ return;
137
+ }
138
+ n.validators === null && (n.validators = []), n.validators.push(mr(t, e));
139
+ }, yr = (e, n, t, r) => {
140
+ const s = Object.entries(e), a = s.length;
141
+ for (let l = 0; l < a; l++) {
142
+ const [u, d] = s[l];
143
+ Ze(d, At(n, u), t, r);
144
+ }
145
+ }, At = (e, n) => {
146
+ let t = e;
147
+ const r = n.split(Ve), s = r.length;
148
+ for (let a = 0; a < s; a++) {
149
+ const l = r[a];
150
+ let u = t.nextPart.get(l);
151
+ u || (u = Ct(), t.nextPart.set(l, u)), t = u;
152
+ }
153
+ return t;
154
+ }, kr = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, wr = (e) => {
155
+ if (e < 1)
156
+ return {
157
+ get: () => {
158
+ },
159
+ set: () => {
160
+ }
161
+ };
162
+ let n = 0, t = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
163
+ const s = (a, l) => {
164
+ t[a] = l, n++, n > e && (n = 0, r = t, t = /* @__PURE__ */ Object.create(null));
165
+ };
166
+ return {
167
+ get(a) {
168
+ let l = t[a];
169
+ if (l !== void 0)
170
+ return l;
171
+ if ((l = r[a]) !== void 0)
172
+ return s(a, l), l;
173
+ },
174
+ set(a, l) {
175
+ a in t ? t[a] = l : s(a, l);
176
+ }
177
+ };
178
+ }, Ke = "!", ft = ":", Cr = [], pt = (e, n, t, r, s) => ({
179
+ modifiers: e,
180
+ hasImportantModifier: n,
181
+ baseClassName: t,
182
+ maybePostfixModifierPosition: r,
183
+ isExternal: s
184
+ }), Nr = (e) => {
185
+ const {
186
+ prefix: n,
187
+ experimentalParseClassName: t
188
+ } = e;
189
+ let r = (s) => {
190
+ const a = [];
191
+ let l = 0, u = 0, d = 0, i;
192
+ const v = s.length;
193
+ for (let P = 0; P < v; P++) {
194
+ const R = s[P];
195
+ if (l === 0 && u === 0) {
196
+ if (R === ft) {
197
+ a.push(s.slice(d, P)), d = P + 1;
198
+ continue;
199
+ }
200
+ if (R === "/") {
201
+ i = P;
202
+ continue;
203
+ }
204
+ }
205
+ R === "[" ? l++ : R === "]" ? l-- : R === "(" ? u++ : R === ")" && u--;
206
+ }
207
+ const y = a.length === 0 ? s : s.slice(d);
208
+ let z = y, T = !1;
209
+ y.endsWith(Ke) ? (z = y.slice(0, -1), T = !0) : (
210
+ /**
211
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
212
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
213
+ */
214
+ y.startsWith(Ke) && (z = y.slice(1), T = !0)
215
+ );
216
+ const W = i && i > d ? i - d : void 0;
217
+ return pt(a, T, z, W);
218
+ };
219
+ if (n) {
220
+ const s = n + ft, a = r;
221
+ r = (l) => l.startsWith(s) ? a(l.slice(s.length)) : pt(Cr, !1, l, void 0, !0);
222
+ }
223
+ if (t) {
224
+ const s = r;
225
+ r = (a) => t({
226
+ className: a,
227
+ parseClassName: s
228
+ });
229
+ }
230
+ return r;
231
+ }, Ar = (e) => {
232
+ const n = /* @__PURE__ */ new Map();
233
+ return e.orderSensitiveModifiers.forEach((t, r) => {
234
+ n.set(t, 1e6 + r);
235
+ }), (t) => {
236
+ const r = [];
237
+ let s = [];
238
+ for (let a = 0; a < t.length; a++) {
239
+ const l = t[a], u = l[0] === "[", d = n.has(l);
240
+ u || d ? (s.length > 0 && (s.sort(), r.push(...s), s = []), r.push(l)) : s.push(l);
241
+ }
242
+ return s.length > 0 && (s.sort(), r.push(...s)), r;
243
+ };
244
+ }, Sr = (e) => ({
245
+ cache: wr(e.cacheSize),
246
+ parseClassName: Nr(e),
247
+ sortModifiers: Ar(e),
248
+ postfixLookupClassGroupIds: Pr(e),
249
+ ...fr(e)
250
+ }), Pr = (e) => {
251
+ const n = /* @__PURE__ */ Object.create(null), t = e.postfixLookupClassGroups;
252
+ if (t)
253
+ for (let r = 0; r < t.length; r++)
254
+ n[t[r]] = !0;
255
+ return n;
256
+ }, zr = /\s+/, Rr = (e, n) => {
257
+ const {
258
+ parseClassName: t,
259
+ getClassGroupId: r,
260
+ getConflictingClassGroupIds: s,
261
+ sortModifiers: a,
262
+ postfixLookupClassGroupIds: l
263
+ } = n, u = [], d = e.trim().split(zr);
264
+ let i = "";
265
+ for (let v = d.length - 1; v >= 0; v -= 1) {
266
+ const y = d[v], {
267
+ isExternal: z,
268
+ modifiers: T,
269
+ hasImportantModifier: W,
270
+ baseClassName: P,
271
+ maybePostfixModifierPosition: R
272
+ } = t(y);
273
+ if (z) {
274
+ i = y + (i.length > 0 ? " " + i : i);
275
+ continue;
276
+ }
277
+ let H = !!R, N;
278
+ if (H) {
279
+ const E = P.substring(0, R);
280
+ N = r(E);
281
+ const f = N && l[N] ? r(P) : void 0;
282
+ f && f !== N && (N = f, H = !1);
283
+ } else
284
+ N = r(P);
285
+ if (!N) {
286
+ if (!H) {
287
+ i = y + (i.length > 0 ? " " + i : i);
288
+ continue;
289
+ }
290
+ if (N = r(P), !N) {
291
+ i = y + (i.length > 0 ? " " + i : i);
292
+ continue;
293
+ }
294
+ H = !1;
295
+ }
296
+ const M = T.length === 0 ? "" : T.length === 1 ? T[0] : a(T).join(":"), g = W ? M + Ke : M, k = g + N;
297
+ if (u.indexOf(k) > -1)
298
+ continue;
299
+ u.push(k);
300
+ const F = s(N, H);
301
+ for (let E = 0; E < F.length; ++E) {
302
+ const f = F[E];
303
+ u.push(g + f);
304
+ }
305
+ i = y + (i.length > 0 ? " " + i : i);
306
+ }
307
+ return i;
308
+ }, Tr = (...e) => {
309
+ let n = 0, t, r, s = "";
310
+ for (; n < e.length; )
311
+ (t = e[n++]) && (r = St(t)) && (s && (s += " "), s += r);
312
+ return s;
313
+ }, St = (e) => {
314
+ if (typeof e == "string")
315
+ return e;
316
+ let n, t = "";
317
+ for (let r = 0; r < e.length; r++)
318
+ e[r] && (n = St(e[r])) && (t && (t += " "), t += n);
319
+ return t;
320
+ }, Er = (e, ...n) => {
321
+ let t, r, s, a;
322
+ const l = (d) => {
323
+ const i = n.reduce((v, y) => y(v), e());
324
+ return t = Sr(i), r = t.cache.get, s = t.cache.set, a = u, u(d);
325
+ }, u = (d) => {
326
+ const i = r(d);
327
+ if (i)
328
+ return i;
329
+ const v = Rr(d, t);
330
+ return s(d, v), v;
331
+ };
332
+ return a = l, (...d) => a(Tr(...d));
333
+ }, Ir = [], _ = (e) => {
334
+ const n = (t) => t[e] || Ir;
335
+ return n.isThemeGetter = !0, n.themeKey = e, n;
336
+ }, Pt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, zt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Mr = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Or = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Lr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Dr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, Ur = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Vr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, be = (e) => Mr.test(e), S = (e) => !!e && !Number.isNaN(Number(e)), le = (e) => !!e && Number.isInteger(Number(e)), qe = (e) => e.endsWith("%") && S(e.slice(0, -1)), de = (e) => Or.test(e), Rt = () => !0, Hr = (e) => (
337
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
338
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
339
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
340
+ Lr.test(e) && !Dr.test(e)
341
+ ), Ye = () => !1, jr = (e) => Ur.test(e), Wr = (e) => Vr.test(e), Fr = (e) => !p(e) && !h(e), _r = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Gr = (e) => xe(e, It, Ye), p = (e) => Pt.test(e), ke = (e) => xe(e, Mt, Hr), ht = (e) => xe(e, Qr, S), Br = (e) => xe(e, Lt, Rt), qr = (e) => xe(e, Ot, Ye), gt = (e) => xe(e, Tt, Ye), Jr = (e) => xe(e, Et, Wr), Ie = (e) => xe(e, Dt, jr), h = (e) => zt.test(e), Re = (e) => Ce(e, Mt), Kr = (e) => Ce(e, Ot), bt = (e) => Ce(e, Tt), $r = (e) => Ce(e, It), Zr = (e) => Ce(e, Et), Me = (e) => Ce(e, Dt, !0), Yr = (e) => Ce(e, Lt, !0), xe = (e, n, t) => {
342
+ const r = Pt.exec(e);
343
+ return r ? r[1] ? n(r[1]) : t(r[2]) : !1;
344
+ }, Ce = (e, n, t = !1) => {
345
+ const r = zt.exec(e);
346
+ return r ? r[1] ? n(r[1]) : t : !1;
347
+ }, Tt = (e) => e === "position" || e === "percentage", Et = (e) => e === "image" || e === "url", It = (e) => e === "length" || e === "size" || e === "bg-size", Mt = (e) => e === "length", Qr = (e) => e === "number", Ot = (e) => e === "family-name", Lt = (e) => e === "number" || e === "weight", Dt = (e) => e === "shadow", Xr = () => {
348
+ const e = _("color"), n = _("font"), t = _("text"), r = _("font-weight"), s = _("tracking"), a = _("leading"), l = _("breakpoint"), u = _("container"), d = _("spacing"), i = _("radius"), v = _("shadow"), y = _("inset-shadow"), z = _("text-shadow"), T = _("drop-shadow"), W = _("blur"), P = _("perspective"), R = _("aspect"), H = _("ease"), N = _("animate"), M = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], g = () => [
349
+ "center",
350
+ "top",
351
+ "bottom",
352
+ "left",
353
+ "right",
354
+ "top-left",
355
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
356
+ "left-top",
357
+ "top-right",
358
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
359
+ "right-top",
360
+ "bottom-right",
361
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
362
+ "right-bottom",
363
+ "bottom-left",
364
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
365
+ "left-bottom"
366
+ ], k = () => [...g(), h, p], F = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], f = () => [h, p, d], O = () => [be, "full", "auto", ...f()], K = () => [le, "none", "subgrid", h, p], J = () => ["auto", {
367
+ span: ["full", le, h, p]
368
+ }, le, h, p], j = () => [le, "auto", h, p], Y = () => ["auto", "min", "max", "fr", h, p], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], c = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], L = () => ["auto", ...f()], $ = () => [be, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...f()], ee = () => [u, be, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...f()], se = () => [be, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...f()], b = () => [e, h, p], ae = () => [...g(), bt, gt, {
369
+ position: [h, p]
370
+ }], Ne = () => ["no-repeat", {
371
+ repeat: ["", "x", "y", "space", "round"]
372
+ }], A = () => ["auto", "cover", "contain", $r, Gr, {
373
+ size: [h, p]
374
+ }], I = () => [qe, Re, ke], w = () => [
375
+ // Deprecated since Tailwind CSS v4.0.0
376
+ "",
377
+ "none",
378
+ "full",
379
+ i,
380
+ h,
381
+ p
382
+ ], D = () => ["", S, Re, ke], ne = () => ["solid", "dashed", "dotted", "double"], ie = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], U = () => [S, qe, bt, gt], fe = () => [
383
+ // Deprecated since Tailwind CSS v4.0.0
384
+ "",
385
+ "none",
386
+ W,
387
+ h,
388
+ p
389
+ ], pe = () => ["none", S, h, p], te = () => ["none", S, h, p], he = () => [S, h, p], Q = () => [be, "full", ...f()];
390
+ return {
391
+ cacheSize: 500,
392
+ theme: {
393
+ animate: ["spin", "ping", "pulse", "bounce"],
394
+ aspect: ["video"],
395
+ blur: [de],
396
+ breakpoint: [de],
397
+ color: [Rt],
398
+ container: [de],
399
+ "drop-shadow": [de],
400
+ ease: ["in", "out", "in-out"],
401
+ font: [Fr],
402
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
403
+ "inset-shadow": [de],
404
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
405
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
406
+ radius: [de],
407
+ shadow: [de],
408
+ spacing: ["px", S],
409
+ text: [de],
410
+ "text-shadow": [de],
411
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
412
+ },
413
+ classGroups: {
414
+ // --------------
415
+ // --- Layout ---
416
+ // --------------
417
+ /**
418
+ * Aspect Ratio
419
+ * @see https://tailwindcss.com/docs/aspect-ratio
420
+ */
421
+ aspect: [{
422
+ aspect: ["auto", "square", be, p, h, R]
423
+ }],
424
+ /**
425
+ * Container
426
+ * @see https://tailwindcss.com/docs/container
427
+ * @deprecated since Tailwind CSS v4.0.0
428
+ */
429
+ container: ["container"],
430
+ /**
431
+ * Container Type
432
+ * @see https://tailwindcss.com/docs/responsive-design#container-queries
433
+ */
434
+ "container-type": [{
435
+ "@container": ["", "normal", "size", h, p]
436
+ }],
437
+ /**
438
+ * Container Name
439
+ * @see https://tailwindcss.com/docs/responsive-design#named-containers
440
+ */
441
+ "container-named": [_r],
442
+ /**
443
+ * Columns
444
+ * @see https://tailwindcss.com/docs/columns
445
+ */
446
+ columns: [{
447
+ columns: [S, "auto", p, h, u]
448
+ }],
449
+ /**
450
+ * Break After
451
+ * @see https://tailwindcss.com/docs/break-after
452
+ */
453
+ "break-after": [{
454
+ "break-after": M()
455
+ }],
456
+ /**
457
+ * Break Before
458
+ * @see https://tailwindcss.com/docs/break-before
459
+ */
460
+ "break-before": [{
461
+ "break-before": M()
462
+ }],
463
+ /**
464
+ * Break Inside
465
+ * @see https://tailwindcss.com/docs/break-inside
466
+ */
467
+ "break-inside": [{
468
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
469
+ }],
470
+ /**
471
+ * Box Decoration Break
472
+ * @see https://tailwindcss.com/docs/box-decoration-break
473
+ */
474
+ "box-decoration": [{
475
+ "box-decoration": ["slice", "clone"]
476
+ }],
477
+ /**
478
+ * Box Sizing
479
+ * @see https://tailwindcss.com/docs/box-sizing
480
+ */
481
+ box: [{
482
+ box: ["border", "content"]
483
+ }],
484
+ /**
485
+ * Display
486
+ * @see https://tailwindcss.com/docs/display
487
+ */
488
+ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
489
+ /**
490
+ * Screen Reader Only
491
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
492
+ */
493
+ sr: ["sr-only", "not-sr-only"],
494
+ /**
495
+ * Floats
496
+ * @see https://tailwindcss.com/docs/float
497
+ */
498
+ float: [{
499
+ float: ["right", "left", "none", "start", "end"]
500
+ }],
501
+ /**
502
+ * Clear
503
+ * @see https://tailwindcss.com/docs/clear
504
+ */
505
+ clear: [{
506
+ clear: ["left", "right", "both", "none", "start", "end"]
507
+ }],
508
+ /**
509
+ * Isolation
510
+ * @see https://tailwindcss.com/docs/isolation
511
+ */
512
+ isolation: ["isolate", "isolation-auto"],
513
+ /**
514
+ * Object Fit
515
+ * @see https://tailwindcss.com/docs/object-fit
516
+ */
517
+ "object-fit": [{
518
+ object: ["contain", "cover", "fill", "none", "scale-down"]
519
+ }],
520
+ /**
521
+ * Object Position
522
+ * @see https://tailwindcss.com/docs/object-position
523
+ */
524
+ "object-position": [{
525
+ object: k()
526
+ }],
527
+ /**
528
+ * Overflow
529
+ * @see https://tailwindcss.com/docs/overflow
530
+ */
531
+ overflow: [{
532
+ overflow: F()
533
+ }],
534
+ /**
535
+ * Overflow X
536
+ * @see https://tailwindcss.com/docs/overflow
537
+ */
538
+ "overflow-x": [{
539
+ "overflow-x": F()
540
+ }],
541
+ /**
542
+ * Overflow Y
543
+ * @see https://tailwindcss.com/docs/overflow
544
+ */
545
+ "overflow-y": [{
546
+ "overflow-y": F()
547
+ }],
548
+ /**
549
+ * Overscroll Behavior
550
+ * @see https://tailwindcss.com/docs/overscroll-behavior
551
+ */
552
+ overscroll: [{
553
+ overscroll: E()
554
+ }],
555
+ /**
556
+ * Overscroll Behavior X
557
+ * @see https://tailwindcss.com/docs/overscroll-behavior
558
+ */
559
+ "overscroll-x": [{
560
+ "overscroll-x": E()
561
+ }],
562
+ /**
563
+ * Overscroll Behavior Y
564
+ * @see https://tailwindcss.com/docs/overscroll-behavior
565
+ */
566
+ "overscroll-y": [{
567
+ "overscroll-y": E()
568
+ }],
569
+ /**
570
+ * Position
571
+ * @see https://tailwindcss.com/docs/position
572
+ */
573
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
574
+ /**
575
+ * Inset
576
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
577
+ */
578
+ inset: [{
579
+ inset: O()
580
+ }],
581
+ /**
582
+ * Inset Inline
583
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
584
+ */
585
+ "inset-x": [{
586
+ "inset-x": O()
587
+ }],
588
+ /**
589
+ * Inset Block
590
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
591
+ */
592
+ "inset-y": [{
593
+ "inset-y": O()
594
+ }],
595
+ /**
596
+ * Inset Inline Start
597
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
598
+ * @todo class group will be renamed to `inset-s` in next major release
599
+ */
600
+ start: [{
601
+ "inset-s": O(),
602
+ /**
603
+ * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
604
+ * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
605
+ */
606
+ start: O()
607
+ }],
608
+ /**
609
+ * Inset Inline End
610
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
611
+ * @todo class group will be renamed to `inset-e` in next major release
612
+ */
613
+ end: [{
614
+ "inset-e": O(),
615
+ /**
616
+ * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
617
+ * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
618
+ */
619
+ end: O()
620
+ }],
621
+ /**
622
+ * Inset Block Start
623
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
624
+ */
625
+ "inset-bs": [{
626
+ "inset-bs": O()
627
+ }],
628
+ /**
629
+ * Inset Block End
630
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
631
+ */
632
+ "inset-be": [{
633
+ "inset-be": O()
634
+ }],
635
+ /**
636
+ * Top
637
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
638
+ */
639
+ top: [{
640
+ top: O()
641
+ }],
642
+ /**
643
+ * Right
644
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
645
+ */
646
+ right: [{
647
+ right: O()
648
+ }],
649
+ /**
650
+ * Bottom
651
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
652
+ */
653
+ bottom: [{
654
+ bottom: O()
655
+ }],
656
+ /**
657
+ * Left
658
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
659
+ */
660
+ left: [{
661
+ left: O()
662
+ }],
663
+ /**
664
+ * Visibility
665
+ * @see https://tailwindcss.com/docs/visibility
666
+ */
667
+ visibility: ["visible", "invisible", "collapse"],
668
+ /**
669
+ * Z-Index
670
+ * @see https://tailwindcss.com/docs/z-index
671
+ */
672
+ z: [{
673
+ z: [le, "auto", h, p]
674
+ }],
675
+ // ------------------------
676
+ // --- Flexbox and Grid ---
677
+ // ------------------------
678
+ /**
679
+ * Flex Basis
680
+ * @see https://tailwindcss.com/docs/flex-basis
681
+ */
682
+ basis: [{
683
+ basis: [be, "full", "auto", u, ...f()]
684
+ }],
685
+ /**
686
+ * Flex Direction
687
+ * @see https://tailwindcss.com/docs/flex-direction
688
+ */
689
+ "flex-direction": [{
690
+ flex: ["row", "row-reverse", "col", "col-reverse"]
691
+ }],
692
+ /**
693
+ * Flex Wrap
694
+ * @see https://tailwindcss.com/docs/flex-wrap
695
+ */
696
+ "flex-wrap": [{
697
+ flex: ["nowrap", "wrap", "wrap-reverse"]
698
+ }],
699
+ /**
700
+ * Flex
701
+ * @see https://tailwindcss.com/docs/flex
702
+ */
703
+ flex: [{
704
+ flex: [S, be, "auto", "initial", "none", p]
705
+ }],
706
+ /**
707
+ * Flex Grow
708
+ * @see https://tailwindcss.com/docs/flex-grow
709
+ */
710
+ grow: [{
711
+ grow: ["", S, h, p]
712
+ }],
713
+ /**
714
+ * Flex Shrink
715
+ * @see https://tailwindcss.com/docs/flex-shrink
716
+ */
717
+ shrink: [{
718
+ shrink: ["", S, h, p]
719
+ }],
720
+ /**
721
+ * Order
722
+ * @see https://tailwindcss.com/docs/order
723
+ */
724
+ order: [{
725
+ order: [le, "first", "last", "none", h, p]
726
+ }],
727
+ /**
728
+ * Grid Template Columns
729
+ * @see https://tailwindcss.com/docs/grid-template-columns
730
+ */
731
+ "grid-cols": [{
732
+ "grid-cols": K()
733
+ }],
734
+ /**
735
+ * Grid Column Start / End
736
+ * @see https://tailwindcss.com/docs/grid-column
737
+ */
738
+ "col-start-end": [{
739
+ col: J()
740
+ }],
741
+ /**
742
+ * Grid Column Start
743
+ * @see https://tailwindcss.com/docs/grid-column
744
+ */
745
+ "col-start": [{
746
+ "col-start": j()
747
+ }],
748
+ /**
749
+ * Grid Column End
750
+ * @see https://tailwindcss.com/docs/grid-column
751
+ */
752
+ "col-end": [{
753
+ "col-end": j()
754
+ }],
755
+ /**
756
+ * Grid Template Rows
757
+ * @see https://tailwindcss.com/docs/grid-template-rows
758
+ */
759
+ "grid-rows": [{
760
+ "grid-rows": K()
761
+ }],
762
+ /**
763
+ * Grid Row Start / End
764
+ * @see https://tailwindcss.com/docs/grid-row
765
+ */
766
+ "row-start-end": [{
767
+ row: J()
768
+ }],
769
+ /**
770
+ * Grid Row Start
771
+ * @see https://tailwindcss.com/docs/grid-row
772
+ */
773
+ "row-start": [{
774
+ "row-start": j()
775
+ }],
776
+ /**
777
+ * Grid Row End
778
+ * @see https://tailwindcss.com/docs/grid-row
779
+ */
780
+ "row-end": [{
781
+ "row-end": j()
782
+ }],
783
+ /**
784
+ * Grid Auto Flow
785
+ * @see https://tailwindcss.com/docs/grid-auto-flow
786
+ */
787
+ "grid-flow": [{
788
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
789
+ }],
790
+ /**
791
+ * Grid Auto Columns
792
+ * @see https://tailwindcss.com/docs/grid-auto-columns
793
+ */
794
+ "auto-cols": [{
795
+ "auto-cols": Y()
796
+ }],
797
+ /**
798
+ * Grid Auto Rows
799
+ * @see https://tailwindcss.com/docs/grid-auto-rows
800
+ */
801
+ "auto-rows": [{
802
+ "auto-rows": Y()
803
+ }],
804
+ /**
805
+ * Gap
806
+ * @see https://tailwindcss.com/docs/gap
807
+ */
808
+ gap: [{
809
+ gap: f()
810
+ }],
811
+ /**
812
+ * Gap X
813
+ * @see https://tailwindcss.com/docs/gap
814
+ */
815
+ "gap-x": [{
816
+ "gap-x": f()
817
+ }],
818
+ /**
819
+ * Gap Y
820
+ * @see https://tailwindcss.com/docs/gap
821
+ */
822
+ "gap-y": [{
823
+ "gap-y": f()
824
+ }],
825
+ /**
826
+ * Justify Content
827
+ * @see https://tailwindcss.com/docs/justify-content
828
+ */
829
+ "justify-content": [{
830
+ justify: [...G(), "normal"]
831
+ }],
832
+ /**
833
+ * Justify Items
834
+ * @see https://tailwindcss.com/docs/justify-items
835
+ */
836
+ "justify-items": [{
837
+ "justify-items": [...c(), "normal"]
838
+ }],
839
+ /**
840
+ * Justify Self
841
+ * @see https://tailwindcss.com/docs/justify-self
842
+ */
843
+ "justify-self": [{
844
+ "justify-self": ["auto", ...c()]
845
+ }],
846
+ /**
847
+ * Align Content
848
+ * @see https://tailwindcss.com/docs/align-content
849
+ */
850
+ "align-content": [{
851
+ content: ["normal", ...G()]
852
+ }],
853
+ /**
854
+ * Align Items
855
+ * @see https://tailwindcss.com/docs/align-items
856
+ */
857
+ "align-items": [{
858
+ items: [...c(), {
859
+ baseline: ["", "last"]
860
+ }]
861
+ }],
862
+ /**
863
+ * Align Self
864
+ * @see https://tailwindcss.com/docs/align-self
865
+ */
866
+ "align-self": [{
867
+ self: ["auto", ...c(), {
868
+ baseline: ["", "last"]
869
+ }]
870
+ }],
871
+ /**
872
+ * Place Content
873
+ * @see https://tailwindcss.com/docs/place-content
874
+ */
875
+ "place-content": [{
876
+ "place-content": G()
877
+ }],
878
+ /**
879
+ * Place Items
880
+ * @see https://tailwindcss.com/docs/place-items
881
+ */
882
+ "place-items": [{
883
+ "place-items": [...c(), "baseline"]
884
+ }],
885
+ /**
886
+ * Place Self
887
+ * @see https://tailwindcss.com/docs/place-self
888
+ */
889
+ "place-self": [{
890
+ "place-self": ["auto", ...c()]
891
+ }],
892
+ // Spacing
893
+ /**
894
+ * Padding
895
+ * @see https://tailwindcss.com/docs/padding
896
+ */
897
+ p: [{
898
+ p: f()
899
+ }],
900
+ /**
901
+ * Padding Inline
902
+ * @see https://tailwindcss.com/docs/padding
903
+ */
904
+ px: [{
905
+ px: f()
906
+ }],
907
+ /**
908
+ * Padding Block
909
+ * @see https://tailwindcss.com/docs/padding
910
+ */
911
+ py: [{
912
+ py: f()
913
+ }],
914
+ /**
915
+ * Padding Inline Start
916
+ * @see https://tailwindcss.com/docs/padding
917
+ */
918
+ ps: [{
919
+ ps: f()
920
+ }],
921
+ /**
922
+ * Padding Inline End
923
+ * @see https://tailwindcss.com/docs/padding
924
+ */
925
+ pe: [{
926
+ pe: f()
927
+ }],
928
+ /**
929
+ * Padding Block Start
930
+ * @see https://tailwindcss.com/docs/padding
931
+ */
932
+ pbs: [{
933
+ pbs: f()
934
+ }],
935
+ /**
936
+ * Padding Block End
937
+ * @see https://tailwindcss.com/docs/padding
938
+ */
939
+ pbe: [{
940
+ pbe: f()
941
+ }],
942
+ /**
943
+ * Padding Top
944
+ * @see https://tailwindcss.com/docs/padding
945
+ */
946
+ pt: [{
947
+ pt: f()
948
+ }],
949
+ /**
950
+ * Padding Right
951
+ * @see https://tailwindcss.com/docs/padding
952
+ */
953
+ pr: [{
954
+ pr: f()
955
+ }],
956
+ /**
957
+ * Padding Bottom
958
+ * @see https://tailwindcss.com/docs/padding
959
+ */
960
+ pb: [{
961
+ pb: f()
962
+ }],
963
+ /**
964
+ * Padding Left
965
+ * @see https://tailwindcss.com/docs/padding
966
+ */
967
+ pl: [{
968
+ pl: f()
969
+ }],
970
+ /**
971
+ * Margin
972
+ * @see https://tailwindcss.com/docs/margin
973
+ */
974
+ m: [{
975
+ m: L()
976
+ }],
977
+ /**
978
+ * Margin Inline
979
+ * @see https://tailwindcss.com/docs/margin
980
+ */
981
+ mx: [{
982
+ mx: L()
983
+ }],
984
+ /**
985
+ * Margin Block
986
+ * @see https://tailwindcss.com/docs/margin
987
+ */
988
+ my: [{
989
+ my: L()
990
+ }],
991
+ /**
992
+ * Margin Inline Start
993
+ * @see https://tailwindcss.com/docs/margin
994
+ */
995
+ ms: [{
996
+ ms: L()
997
+ }],
998
+ /**
999
+ * Margin Inline End
1000
+ * @see https://tailwindcss.com/docs/margin
1001
+ */
1002
+ me: [{
1003
+ me: L()
1004
+ }],
1005
+ /**
1006
+ * Margin Block Start
1007
+ * @see https://tailwindcss.com/docs/margin
1008
+ */
1009
+ mbs: [{
1010
+ mbs: L()
1011
+ }],
1012
+ /**
1013
+ * Margin Block End
1014
+ * @see https://tailwindcss.com/docs/margin
1015
+ */
1016
+ mbe: [{
1017
+ mbe: L()
1018
+ }],
1019
+ /**
1020
+ * Margin Top
1021
+ * @see https://tailwindcss.com/docs/margin
1022
+ */
1023
+ mt: [{
1024
+ mt: L()
1025
+ }],
1026
+ /**
1027
+ * Margin Right
1028
+ * @see https://tailwindcss.com/docs/margin
1029
+ */
1030
+ mr: [{
1031
+ mr: L()
1032
+ }],
1033
+ /**
1034
+ * Margin Bottom
1035
+ * @see https://tailwindcss.com/docs/margin
1036
+ */
1037
+ mb: [{
1038
+ mb: L()
1039
+ }],
1040
+ /**
1041
+ * Margin Left
1042
+ * @see https://tailwindcss.com/docs/margin
1043
+ */
1044
+ ml: [{
1045
+ ml: L()
1046
+ }],
1047
+ /**
1048
+ * Space Between X
1049
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1050
+ */
1051
+ "space-x": [{
1052
+ "space-x": f()
1053
+ }],
1054
+ /**
1055
+ * Space Between X Reverse
1056
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1057
+ */
1058
+ "space-x-reverse": ["space-x-reverse"],
1059
+ /**
1060
+ * Space Between Y
1061
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1062
+ */
1063
+ "space-y": [{
1064
+ "space-y": f()
1065
+ }],
1066
+ /**
1067
+ * Space Between Y Reverse
1068
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1069
+ */
1070
+ "space-y-reverse": ["space-y-reverse"],
1071
+ // --------------
1072
+ // --- Sizing ---
1073
+ // --------------
1074
+ /**
1075
+ * Size
1076
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1077
+ */
1078
+ size: [{
1079
+ size: $()
1080
+ }],
1081
+ /**
1082
+ * Inline Size
1083
+ * @see https://tailwindcss.com/docs/inline-size
1084
+ */
1085
+ "inline-size": [{
1086
+ inline: ["auto", ...ee()]
1087
+ }],
1088
+ /**
1089
+ * Min-Inline Size
1090
+ * @see https://tailwindcss.com/docs/min-inline-size
1091
+ */
1092
+ "min-inline-size": [{
1093
+ "min-inline": ["auto", ...ee()]
1094
+ }],
1095
+ /**
1096
+ * Max-Inline Size
1097
+ * @see https://tailwindcss.com/docs/max-inline-size
1098
+ */
1099
+ "max-inline-size": [{
1100
+ "max-inline": ["none", ...ee()]
1101
+ }],
1102
+ /**
1103
+ * Block Size
1104
+ * @see https://tailwindcss.com/docs/block-size
1105
+ */
1106
+ "block-size": [{
1107
+ block: ["auto", ...se()]
1108
+ }],
1109
+ /**
1110
+ * Min-Block Size
1111
+ * @see https://tailwindcss.com/docs/min-block-size
1112
+ */
1113
+ "min-block-size": [{
1114
+ "min-block": ["auto", ...se()]
1115
+ }],
1116
+ /**
1117
+ * Max-Block Size
1118
+ * @see https://tailwindcss.com/docs/max-block-size
1119
+ */
1120
+ "max-block-size": [{
1121
+ "max-block": ["none", ...se()]
1122
+ }],
1123
+ /**
1124
+ * Width
1125
+ * @see https://tailwindcss.com/docs/width
1126
+ */
1127
+ w: [{
1128
+ w: [u, "screen", ...$()]
1129
+ }],
1130
+ /**
1131
+ * Min-Width
1132
+ * @see https://tailwindcss.com/docs/min-width
1133
+ */
1134
+ "min-w": [{
1135
+ "min-w": [
1136
+ u,
1137
+ "screen",
1138
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1139
+ "none",
1140
+ ...$()
1141
+ ]
1142
+ }],
1143
+ /**
1144
+ * Max-Width
1145
+ * @see https://tailwindcss.com/docs/max-width
1146
+ */
1147
+ "max-w": [{
1148
+ "max-w": [
1149
+ u,
1150
+ "screen",
1151
+ "none",
1152
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1153
+ "prose",
1154
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1155
+ {
1156
+ screen: [l]
1157
+ },
1158
+ ...$()
1159
+ ]
1160
+ }],
1161
+ /**
1162
+ * Height
1163
+ * @see https://tailwindcss.com/docs/height
1164
+ */
1165
+ h: [{
1166
+ h: ["screen", "lh", ...$()]
1167
+ }],
1168
+ /**
1169
+ * Min-Height
1170
+ * @see https://tailwindcss.com/docs/min-height
1171
+ */
1172
+ "min-h": [{
1173
+ "min-h": ["screen", "lh", "none", ...$()]
1174
+ }],
1175
+ /**
1176
+ * Max-Height
1177
+ * @see https://tailwindcss.com/docs/max-height
1178
+ */
1179
+ "max-h": [{
1180
+ "max-h": ["screen", "lh", "none", ...$()]
1181
+ }],
1182
+ // ------------------
1183
+ // --- Typography ---
1184
+ // ------------------
1185
+ /**
1186
+ * Font Size
1187
+ * @see https://tailwindcss.com/docs/font-size
1188
+ */
1189
+ "font-size": [{
1190
+ text: ["base", t, Re, ke]
1191
+ }],
1192
+ /**
1193
+ * Font Smoothing
1194
+ * @see https://tailwindcss.com/docs/font-smoothing
1195
+ */
1196
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1197
+ /**
1198
+ * Font Style
1199
+ * @see https://tailwindcss.com/docs/font-style
1200
+ */
1201
+ "font-style": ["italic", "not-italic"],
1202
+ /**
1203
+ * Font Weight
1204
+ * @see https://tailwindcss.com/docs/font-weight
1205
+ */
1206
+ "font-weight": [{
1207
+ font: [r, Yr, Br]
1208
+ }],
1209
+ /**
1210
+ * Font Stretch
1211
+ * @see https://tailwindcss.com/docs/font-stretch
1212
+ */
1213
+ "font-stretch": [{
1214
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", qe, p]
1215
+ }],
1216
+ /**
1217
+ * Font Family
1218
+ * @see https://tailwindcss.com/docs/font-family
1219
+ */
1220
+ "font-family": [{
1221
+ font: [Kr, qr, n]
1222
+ }],
1223
+ /**
1224
+ * Font Feature Settings
1225
+ * @see https://tailwindcss.com/docs/font-feature-settings
1226
+ */
1227
+ "font-features": [{
1228
+ "font-features": [p]
1229
+ }],
1230
+ /**
1231
+ * Font Variant Numeric
1232
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1233
+ */
1234
+ "fvn-normal": ["normal-nums"],
1235
+ /**
1236
+ * Font Variant Numeric
1237
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1238
+ */
1239
+ "fvn-ordinal": ["ordinal"],
1240
+ /**
1241
+ * Font Variant Numeric
1242
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1243
+ */
1244
+ "fvn-slashed-zero": ["slashed-zero"],
1245
+ /**
1246
+ * Font Variant Numeric
1247
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1248
+ */
1249
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1250
+ /**
1251
+ * Font Variant Numeric
1252
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1253
+ */
1254
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1255
+ /**
1256
+ * Font Variant Numeric
1257
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1258
+ */
1259
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1260
+ /**
1261
+ * Letter Spacing
1262
+ * @see https://tailwindcss.com/docs/letter-spacing
1263
+ */
1264
+ tracking: [{
1265
+ tracking: [s, h, p]
1266
+ }],
1267
+ /**
1268
+ * Line Clamp
1269
+ * @see https://tailwindcss.com/docs/line-clamp
1270
+ */
1271
+ "line-clamp": [{
1272
+ "line-clamp": [S, "none", h, ht]
1273
+ }],
1274
+ /**
1275
+ * Line Height
1276
+ * @see https://tailwindcss.com/docs/line-height
1277
+ */
1278
+ leading: [{
1279
+ leading: [
1280
+ "none",
1281
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1282
+ a,
1283
+ ...f()
1284
+ ]
1285
+ }],
1286
+ /**
1287
+ * List Style Image
1288
+ * @see https://tailwindcss.com/docs/list-style-image
1289
+ */
1290
+ "list-image": [{
1291
+ "list-image": ["none", h, p]
1292
+ }],
1293
+ /**
1294
+ * List Style Position
1295
+ * @see https://tailwindcss.com/docs/list-style-position
1296
+ */
1297
+ "list-style-position": [{
1298
+ list: ["inside", "outside"]
1299
+ }],
1300
+ /**
1301
+ * List Style Type
1302
+ * @see https://tailwindcss.com/docs/list-style-type
1303
+ */
1304
+ "list-style-type": [{
1305
+ list: ["disc", "decimal", "none", h, p]
1306
+ }],
1307
+ /**
1308
+ * Text Alignment
1309
+ * @see https://tailwindcss.com/docs/text-align
1310
+ */
1311
+ "text-alignment": [{
1312
+ text: ["left", "center", "right", "justify", "start", "end"]
1313
+ }],
1314
+ /**
1315
+ * Placeholder Color
1316
+ * @deprecated since Tailwind CSS v3.0.0
1317
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1318
+ */
1319
+ "placeholder-color": [{
1320
+ placeholder: b()
1321
+ }],
1322
+ /**
1323
+ * Text Color
1324
+ * @see https://tailwindcss.com/docs/text-color
1325
+ */
1326
+ "text-color": [{
1327
+ text: b()
1328
+ }],
1329
+ /**
1330
+ * Text Decoration
1331
+ * @see https://tailwindcss.com/docs/text-decoration
1332
+ */
1333
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1334
+ /**
1335
+ * Text Decoration Style
1336
+ * @see https://tailwindcss.com/docs/text-decoration-style
1337
+ */
1338
+ "text-decoration-style": [{
1339
+ decoration: [...ne(), "wavy"]
1340
+ }],
1341
+ /**
1342
+ * Text Decoration Thickness
1343
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1344
+ */
1345
+ "text-decoration-thickness": [{
1346
+ decoration: [S, "from-font", "auto", h, ke]
1347
+ }],
1348
+ /**
1349
+ * Text Decoration Color
1350
+ * @see https://tailwindcss.com/docs/text-decoration-color
1351
+ */
1352
+ "text-decoration-color": [{
1353
+ decoration: b()
1354
+ }],
1355
+ /**
1356
+ * Text Underline Offset
1357
+ * @see https://tailwindcss.com/docs/text-underline-offset
1358
+ */
1359
+ "underline-offset": [{
1360
+ "underline-offset": [S, "auto", h, p]
1361
+ }],
1362
+ /**
1363
+ * Text Transform
1364
+ * @see https://tailwindcss.com/docs/text-transform
1365
+ */
1366
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1367
+ /**
1368
+ * Text Overflow
1369
+ * @see https://tailwindcss.com/docs/text-overflow
1370
+ */
1371
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1372
+ /**
1373
+ * Text Wrap
1374
+ * @see https://tailwindcss.com/docs/text-wrap
1375
+ */
1376
+ "text-wrap": [{
1377
+ text: ["wrap", "nowrap", "balance", "pretty"]
1378
+ }],
1379
+ /**
1380
+ * Text Indent
1381
+ * @see https://tailwindcss.com/docs/text-indent
1382
+ */
1383
+ indent: [{
1384
+ indent: f()
1385
+ }],
1386
+ /**
1387
+ * Tab Size
1388
+ * @see https://tailwindcss.com/docs/tab-size
1389
+ */
1390
+ "tab-size": [{
1391
+ tab: [le, h, p]
1392
+ }],
1393
+ /**
1394
+ * Vertical Alignment
1395
+ * @see https://tailwindcss.com/docs/vertical-align
1396
+ */
1397
+ "vertical-align": [{
1398
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", h, p]
1399
+ }],
1400
+ /**
1401
+ * Whitespace
1402
+ * @see https://tailwindcss.com/docs/whitespace
1403
+ */
1404
+ whitespace: [{
1405
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1406
+ }],
1407
+ /**
1408
+ * Word Break
1409
+ * @see https://tailwindcss.com/docs/word-break
1410
+ */
1411
+ break: [{
1412
+ break: ["normal", "words", "all", "keep"]
1413
+ }],
1414
+ /**
1415
+ * Overflow Wrap
1416
+ * @see https://tailwindcss.com/docs/overflow-wrap
1417
+ */
1418
+ wrap: [{
1419
+ wrap: ["break-word", "anywhere", "normal"]
1420
+ }],
1421
+ /**
1422
+ * Hyphens
1423
+ * @see https://tailwindcss.com/docs/hyphens
1424
+ */
1425
+ hyphens: [{
1426
+ hyphens: ["none", "manual", "auto"]
1427
+ }],
1428
+ /**
1429
+ * Content
1430
+ * @see https://tailwindcss.com/docs/content
1431
+ */
1432
+ content: [{
1433
+ content: ["none", h, p]
1434
+ }],
1435
+ // -------------------
1436
+ // --- Backgrounds ---
1437
+ // -------------------
1438
+ /**
1439
+ * Background Attachment
1440
+ * @see https://tailwindcss.com/docs/background-attachment
1441
+ */
1442
+ "bg-attachment": [{
1443
+ bg: ["fixed", "local", "scroll"]
1444
+ }],
1445
+ /**
1446
+ * Background Clip
1447
+ * @see https://tailwindcss.com/docs/background-clip
1448
+ */
1449
+ "bg-clip": [{
1450
+ "bg-clip": ["border", "padding", "content", "text"]
1451
+ }],
1452
+ /**
1453
+ * Background Origin
1454
+ * @see https://tailwindcss.com/docs/background-origin
1455
+ */
1456
+ "bg-origin": [{
1457
+ "bg-origin": ["border", "padding", "content"]
1458
+ }],
1459
+ /**
1460
+ * Background Position
1461
+ * @see https://tailwindcss.com/docs/background-position
1462
+ */
1463
+ "bg-position": [{
1464
+ bg: ae()
1465
+ }],
1466
+ /**
1467
+ * Background Repeat
1468
+ * @see https://tailwindcss.com/docs/background-repeat
1469
+ */
1470
+ "bg-repeat": [{
1471
+ bg: Ne()
1472
+ }],
1473
+ /**
1474
+ * Background Size
1475
+ * @see https://tailwindcss.com/docs/background-size
1476
+ */
1477
+ "bg-size": [{
1478
+ bg: A()
1479
+ }],
1480
+ /**
1481
+ * Background Image
1482
+ * @see https://tailwindcss.com/docs/background-image
1483
+ */
1484
+ "bg-image": [{
1485
+ bg: ["none", {
1486
+ linear: [{
1487
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1488
+ }, le, h, p],
1489
+ radial: ["", h, p],
1490
+ conic: ["", le, h, p]
1491
+ }, Zr, Jr]
1492
+ }],
1493
+ /**
1494
+ * Background Color
1495
+ * @see https://tailwindcss.com/docs/background-color
1496
+ */
1497
+ "bg-color": [{
1498
+ bg: b()
1499
+ }],
1500
+ /**
1501
+ * Gradient Color Stops From Position
1502
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1503
+ */
1504
+ "gradient-from-pos": [{
1505
+ from: I()
1506
+ }],
1507
+ /**
1508
+ * Gradient Color Stops Via Position
1509
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1510
+ */
1511
+ "gradient-via-pos": [{
1512
+ via: I()
1513
+ }],
1514
+ /**
1515
+ * Gradient Color Stops To Position
1516
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1517
+ */
1518
+ "gradient-to-pos": [{
1519
+ to: I()
1520
+ }],
1521
+ /**
1522
+ * Gradient Color Stops From
1523
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1524
+ */
1525
+ "gradient-from": [{
1526
+ from: b()
1527
+ }],
1528
+ /**
1529
+ * Gradient Color Stops Via
1530
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1531
+ */
1532
+ "gradient-via": [{
1533
+ via: b()
1534
+ }],
1535
+ /**
1536
+ * Gradient Color Stops To
1537
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1538
+ */
1539
+ "gradient-to": [{
1540
+ to: b()
1541
+ }],
1542
+ // ---------------
1543
+ // --- Borders ---
1544
+ // ---------------
1545
+ /**
1546
+ * Border Radius
1547
+ * @see https://tailwindcss.com/docs/border-radius
1548
+ */
1549
+ rounded: [{
1550
+ rounded: w()
1551
+ }],
1552
+ /**
1553
+ * Border Radius Start
1554
+ * @see https://tailwindcss.com/docs/border-radius
1555
+ */
1556
+ "rounded-s": [{
1557
+ "rounded-s": w()
1558
+ }],
1559
+ /**
1560
+ * Border Radius End
1561
+ * @see https://tailwindcss.com/docs/border-radius
1562
+ */
1563
+ "rounded-e": [{
1564
+ "rounded-e": w()
1565
+ }],
1566
+ /**
1567
+ * Border Radius Top
1568
+ * @see https://tailwindcss.com/docs/border-radius
1569
+ */
1570
+ "rounded-t": [{
1571
+ "rounded-t": w()
1572
+ }],
1573
+ /**
1574
+ * Border Radius Right
1575
+ * @see https://tailwindcss.com/docs/border-radius
1576
+ */
1577
+ "rounded-r": [{
1578
+ "rounded-r": w()
1579
+ }],
1580
+ /**
1581
+ * Border Radius Bottom
1582
+ * @see https://tailwindcss.com/docs/border-radius
1583
+ */
1584
+ "rounded-b": [{
1585
+ "rounded-b": w()
1586
+ }],
1587
+ /**
1588
+ * Border Radius Left
1589
+ * @see https://tailwindcss.com/docs/border-radius
1590
+ */
1591
+ "rounded-l": [{
1592
+ "rounded-l": w()
1593
+ }],
1594
+ /**
1595
+ * Border Radius Start Start
1596
+ * @see https://tailwindcss.com/docs/border-radius
1597
+ */
1598
+ "rounded-ss": [{
1599
+ "rounded-ss": w()
1600
+ }],
1601
+ /**
1602
+ * Border Radius Start End
1603
+ * @see https://tailwindcss.com/docs/border-radius
1604
+ */
1605
+ "rounded-se": [{
1606
+ "rounded-se": w()
1607
+ }],
1608
+ /**
1609
+ * Border Radius End End
1610
+ * @see https://tailwindcss.com/docs/border-radius
1611
+ */
1612
+ "rounded-ee": [{
1613
+ "rounded-ee": w()
1614
+ }],
1615
+ /**
1616
+ * Border Radius End Start
1617
+ * @see https://tailwindcss.com/docs/border-radius
1618
+ */
1619
+ "rounded-es": [{
1620
+ "rounded-es": w()
1621
+ }],
1622
+ /**
1623
+ * Border Radius Top Left
1624
+ * @see https://tailwindcss.com/docs/border-radius
1625
+ */
1626
+ "rounded-tl": [{
1627
+ "rounded-tl": w()
1628
+ }],
1629
+ /**
1630
+ * Border Radius Top Right
1631
+ * @see https://tailwindcss.com/docs/border-radius
1632
+ */
1633
+ "rounded-tr": [{
1634
+ "rounded-tr": w()
1635
+ }],
1636
+ /**
1637
+ * Border Radius Bottom Right
1638
+ * @see https://tailwindcss.com/docs/border-radius
1639
+ */
1640
+ "rounded-br": [{
1641
+ "rounded-br": w()
1642
+ }],
1643
+ /**
1644
+ * Border Radius Bottom Left
1645
+ * @see https://tailwindcss.com/docs/border-radius
1646
+ */
1647
+ "rounded-bl": [{
1648
+ "rounded-bl": w()
1649
+ }],
1650
+ /**
1651
+ * Border Width
1652
+ * @see https://tailwindcss.com/docs/border-width
1653
+ */
1654
+ "border-w": [{
1655
+ border: D()
1656
+ }],
1657
+ /**
1658
+ * Border Width Inline
1659
+ * @see https://tailwindcss.com/docs/border-width
1660
+ */
1661
+ "border-w-x": [{
1662
+ "border-x": D()
1663
+ }],
1664
+ /**
1665
+ * Border Width Block
1666
+ * @see https://tailwindcss.com/docs/border-width
1667
+ */
1668
+ "border-w-y": [{
1669
+ "border-y": D()
1670
+ }],
1671
+ /**
1672
+ * Border Width Inline Start
1673
+ * @see https://tailwindcss.com/docs/border-width
1674
+ */
1675
+ "border-w-s": [{
1676
+ "border-s": D()
1677
+ }],
1678
+ /**
1679
+ * Border Width Inline End
1680
+ * @see https://tailwindcss.com/docs/border-width
1681
+ */
1682
+ "border-w-e": [{
1683
+ "border-e": D()
1684
+ }],
1685
+ /**
1686
+ * Border Width Block Start
1687
+ * @see https://tailwindcss.com/docs/border-width
1688
+ */
1689
+ "border-w-bs": [{
1690
+ "border-bs": D()
1691
+ }],
1692
+ /**
1693
+ * Border Width Block End
1694
+ * @see https://tailwindcss.com/docs/border-width
1695
+ */
1696
+ "border-w-be": [{
1697
+ "border-be": D()
1698
+ }],
1699
+ /**
1700
+ * Border Width Top
1701
+ * @see https://tailwindcss.com/docs/border-width
1702
+ */
1703
+ "border-w-t": [{
1704
+ "border-t": D()
1705
+ }],
1706
+ /**
1707
+ * Border Width Right
1708
+ * @see https://tailwindcss.com/docs/border-width
1709
+ */
1710
+ "border-w-r": [{
1711
+ "border-r": D()
1712
+ }],
1713
+ /**
1714
+ * Border Width Bottom
1715
+ * @see https://tailwindcss.com/docs/border-width
1716
+ */
1717
+ "border-w-b": [{
1718
+ "border-b": D()
1719
+ }],
1720
+ /**
1721
+ * Border Width Left
1722
+ * @see https://tailwindcss.com/docs/border-width
1723
+ */
1724
+ "border-w-l": [{
1725
+ "border-l": D()
1726
+ }],
1727
+ /**
1728
+ * Divide Width X
1729
+ * @see https://tailwindcss.com/docs/border-width#between-children
1730
+ */
1731
+ "divide-x": [{
1732
+ "divide-x": D()
1733
+ }],
1734
+ /**
1735
+ * Divide Width X Reverse
1736
+ * @see https://tailwindcss.com/docs/border-width#between-children
1737
+ */
1738
+ "divide-x-reverse": ["divide-x-reverse"],
1739
+ /**
1740
+ * Divide Width Y
1741
+ * @see https://tailwindcss.com/docs/border-width#between-children
1742
+ */
1743
+ "divide-y": [{
1744
+ "divide-y": D()
1745
+ }],
1746
+ /**
1747
+ * Divide Width Y Reverse
1748
+ * @see https://tailwindcss.com/docs/border-width#between-children
1749
+ */
1750
+ "divide-y-reverse": ["divide-y-reverse"],
1751
+ /**
1752
+ * Border Style
1753
+ * @see https://tailwindcss.com/docs/border-style
1754
+ */
1755
+ "border-style": [{
1756
+ border: [...ne(), "hidden", "none"]
1757
+ }],
1758
+ /**
1759
+ * Divide Style
1760
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
1761
+ */
1762
+ "divide-style": [{
1763
+ divide: [...ne(), "hidden", "none"]
1764
+ }],
1765
+ /**
1766
+ * Border Color
1767
+ * @see https://tailwindcss.com/docs/border-color
1768
+ */
1769
+ "border-color": [{
1770
+ border: b()
1771
+ }],
1772
+ /**
1773
+ * Border Color Inline
1774
+ * @see https://tailwindcss.com/docs/border-color
1775
+ */
1776
+ "border-color-x": [{
1777
+ "border-x": b()
1778
+ }],
1779
+ /**
1780
+ * Border Color Block
1781
+ * @see https://tailwindcss.com/docs/border-color
1782
+ */
1783
+ "border-color-y": [{
1784
+ "border-y": b()
1785
+ }],
1786
+ /**
1787
+ * Border Color Inline Start
1788
+ * @see https://tailwindcss.com/docs/border-color
1789
+ */
1790
+ "border-color-s": [{
1791
+ "border-s": b()
1792
+ }],
1793
+ /**
1794
+ * Border Color Inline End
1795
+ * @see https://tailwindcss.com/docs/border-color
1796
+ */
1797
+ "border-color-e": [{
1798
+ "border-e": b()
1799
+ }],
1800
+ /**
1801
+ * Border Color Block Start
1802
+ * @see https://tailwindcss.com/docs/border-color
1803
+ */
1804
+ "border-color-bs": [{
1805
+ "border-bs": b()
1806
+ }],
1807
+ /**
1808
+ * Border Color Block End
1809
+ * @see https://tailwindcss.com/docs/border-color
1810
+ */
1811
+ "border-color-be": [{
1812
+ "border-be": b()
1813
+ }],
1814
+ /**
1815
+ * Border Color Top
1816
+ * @see https://tailwindcss.com/docs/border-color
1817
+ */
1818
+ "border-color-t": [{
1819
+ "border-t": b()
1820
+ }],
1821
+ /**
1822
+ * Border Color Right
1823
+ * @see https://tailwindcss.com/docs/border-color
1824
+ */
1825
+ "border-color-r": [{
1826
+ "border-r": b()
1827
+ }],
1828
+ /**
1829
+ * Border Color Bottom
1830
+ * @see https://tailwindcss.com/docs/border-color
1831
+ */
1832
+ "border-color-b": [{
1833
+ "border-b": b()
1834
+ }],
1835
+ /**
1836
+ * Border Color Left
1837
+ * @see https://tailwindcss.com/docs/border-color
1838
+ */
1839
+ "border-color-l": [{
1840
+ "border-l": b()
1841
+ }],
1842
+ /**
1843
+ * Divide Color
1844
+ * @see https://tailwindcss.com/docs/divide-color
1845
+ */
1846
+ "divide-color": [{
1847
+ divide: b()
1848
+ }],
1849
+ /**
1850
+ * Outline Style
1851
+ * @see https://tailwindcss.com/docs/outline-style
1852
+ */
1853
+ "outline-style": [{
1854
+ outline: [...ne(), "none", "hidden"]
1855
+ }],
1856
+ /**
1857
+ * Outline Offset
1858
+ * @see https://tailwindcss.com/docs/outline-offset
1859
+ */
1860
+ "outline-offset": [{
1861
+ "outline-offset": [S, h, p]
1862
+ }],
1863
+ /**
1864
+ * Outline Width
1865
+ * @see https://tailwindcss.com/docs/outline-width
1866
+ */
1867
+ "outline-w": [{
1868
+ outline: ["", S, Re, ke]
1869
+ }],
1870
+ /**
1871
+ * Outline Color
1872
+ * @see https://tailwindcss.com/docs/outline-color
1873
+ */
1874
+ "outline-color": [{
1875
+ outline: b()
1876
+ }],
1877
+ // ---------------
1878
+ // --- Effects ---
1879
+ // ---------------
1880
+ /**
1881
+ * Box Shadow
1882
+ * @see https://tailwindcss.com/docs/box-shadow
1883
+ */
1884
+ shadow: [{
1885
+ shadow: [
1886
+ // Deprecated since Tailwind CSS v4.0.0
1887
+ "",
1888
+ // Deprecated since Tailwind CSS v4.0.0
1889
+ "inner",
1890
+ "none",
1891
+ v,
1892
+ Me,
1893
+ Ie
1894
+ ]
1895
+ }],
1896
+ /**
1897
+ * Box Shadow Color
1898
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
1899
+ */
1900
+ "shadow-color": [{
1901
+ shadow: b()
1902
+ }],
1903
+ /**
1904
+ * Inset Box Shadow
1905
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
1906
+ */
1907
+ "inset-shadow": [{
1908
+ "inset-shadow": ["none", y, Me, Ie]
1909
+ }],
1910
+ /**
1911
+ * Inset Box Shadow Color
1912
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
1913
+ */
1914
+ "inset-shadow-color": [{
1915
+ "inset-shadow": b()
1916
+ }],
1917
+ /**
1918
+ * Ring Width
1919
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
1920
+ */
1921
+ "ring-w": [{
1922
+ ring: D()
1923
+ }],
1924
+ /**
1925
+ * Ring Width Inset
1926
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
1927
+ * @deprecated since Tailwind CSS v4.0.0
1928
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1929
+ */
1930
+ "ring-w-inset": ["ring-inset"],
1931
+ /**
1932
+ * Ring Color
1933
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
1934
+ */
1935
+ "ring-color": [{
1936
+ ring: b()
1937
+ }],
1938
+ /**
1939
+ * Ring Offset Width
1940
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
1941
+ * @deprecated since Tailwind CSS v4.0.0
1942
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1943
+ */
1944
+ "ring-offset-w": [{
1945
+ "ring-offset": [S, ke]
1946
+ }],
1947
+ /**
1948
+ * Ring Offset Color
1949
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
1950
+ * @deprecated since Tailwind CSS v4.0.0
1951
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1952
+ */
1953
+ "ring-offset-color": [{
1954
+ "ring-offset": b()
1955
+ }],
1956
+ /**
1957
+ * Inset Ring Width
1958
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
1959
+ */
1960
+ "inset-ring-w": [{
1961
+ "inset-ring": D()
1962
+ }],
1963
+ /**
1964
+ * Inset Ring Color
1965
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
1966
+ */
1967
+ "inset-ring-color": [{
1968
+ "inset-ring": b()
1969
+ }],
1970
+ /**
1971
+ * Text Shadow
1972
+ * @see https://tailwindcss.com/docs/text-shadow
1973
+ */
1974
+ "text-shadow": [{
1975
+ "text-shadow": ["none", z, Me, Ie]
1976
+ }],
1977
+ /**
1978
+ * Text Shadow Color
1979
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
1980
+ */
1981
+ "text-shadow-color": [{
1982
+ "text-shadow": b()
1983
+ }],
1984
+ /**
1985
+ * Opacity
1986
+ * @see https://tailwindcss.com/docs/opacity
1987
+ */
1988
+ opacity: [{
1989
+ opacity: [S, h, p]
1990
+ }],
1991
+ /**
1992
+ * Mix Blend Mode
1993
+ * @see https://tailwindcss.com/docs/mix-blend-mode
1994
+ */
1995
+ "mix-blend": [{
1996
+ "mix-blend": [...ie(), "plus-darker", "plus-lighter"]
1997
+ }],
1998
+ /**
1999
+ * Background Blend Mode
2000
+ * @see https://tailwindcss.com/docs/background-blend-mode
2001
+ */
2002
+ "bg-blend": [{
2003
+ "bg-blend": ie()
2004
+ }],
2005
+ /**
2006
+ * Mask Clip
2007
+ * @see https://tailwindcss.com/docs/mask-clip
2008
+ */
2009
+ "mask-clip": [{
2010
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2011
+ }, "mask-no-clip"],
2012
+ /**
2013
+ * Mask Composite
2014
+ * @see https://tailwindcss.com/docs/mask-composite
2015
+ */
2016
+ "mask-composite": [{
2017
+ mask: ["add", "subtract", "intersect", "exclude"]
2018
+ }],
2019
+ /**
2020
+ * Mask Image
2021
+ * @see https://tailwindcss.com/docs/mask-image
2022
+ */
2023
+ "mask-image-linear-pos": [{
2024
+ "mask-linear": [S]
2025
+ }],
2026
+ "mask-image-linear-from-pos": [{
2027
+ "mask-linear-from": U()
2028
+ }],
2029
+ "mask-image-linear-to-pos": [{
2030
+ "mask-linear-to": U()
2031
+ }],
2032
+ "mask-image-linear-from-color": [{
2033
+ "mask-linear-from": b()
2034
+ }],
2035
+ "mask-image-linear-to-color": [{
2036
+ "mask-linear-to": b()
2037
+ }],
2038
+ "mask-image-t-from-pos": [{
2039
+ "mask-t-from": U()
2040
+ }],
2041
+ "mask-image-t-to-pos": [{
2042
+ "mask-t-to": U()
2043
+ }],
2044
+ "mask-image-t-from-color": [{
2045
+ "mask-t-from": b()
2046
+ }],
2047
+ "mask-image-t-to-color": [{
2048
+ "mask-t-to": b()
2049
+ }],
2050
+ "mask-image-r-from-pos": [{
2051
+ "mask-r-from": U()
2052
+ }],
2053
+ "mask-image-r-to-pos": [{
2054
+ "mask-r-to": U()
2055
+ }],
2056
+ "mask-image-r-from-color": [{
2057
+ "mask-r-from": b()
2058
+ }],
2059
+ "mask-image-r-to-color": [{
2060
+ "mask-r-to": b()
2061
+ }],
2062
+ "mask-image-b-from-pos": [{
2063
+ "mask-b-from": U()
2064
+ }],
2065
+ "mask-image-b-to-pos": [{
2066
+ "mask-b-to": U()
2067
+ }],
2068
+ "mask-image-b-from-color": [{
2069
+ "mask-b-from": b()
2070
+ }],
2071
+ "mask-image-b-to-color": [{
2072
+ "mask-b-to": b()
2073
+ }],
2074
+ "mask-image-l-from-pos": [{
2075
+ "mask-l-from": U()
2076
+ }],
2077
+ "mask-image-l-to-pos": [{
2078
+ "mask-l-to": U()
2079
+ }],
2080
+ "mask-image-l-from-color": [{
2081
+ "mask-l-from": b()
2082
+ }],
2083
+ "mask-image-l-to-color": [{
2084
+ "mask-l-to": b()
2085
+ }],
2086
+ "mask-image-x-from-pos": [{
2087
+ "mask-x-from": U()
2088
+ }],
2089
+ "mask-image-x-to-pos": [{
2090
+ "mask-x-to": U()
2091
+ }],
2092
+ "mask-image-x-from-color": [{
2093
+ "mask-x-from": b()
2094
+ }],
2095
+ "mask-image-x-to-color": [{
2096
+ "mask-x-to": b()
2097
+ }],
2098
+ "mask-image-y-from-pos": [{
2099
+ "mask-y-from": U()
2100
+ }],
2101
+ "mask-image-y-to-pos": [{
2102
+ "mask-y-to": U()
2103
+ }],
2104
+ "mask-image-y-from-color": [{
2105
+ "mask-y-from": b()
2106
+ }],
2107
+ "mask-image-y-to-color": [{
2108
+ "mask-y-to": b()
2109
+ }],
2110
+ "mask-image-radial": [{
2111
+ "mask-radial": [h, p]
2112
+ }],
2113
+ "mask-image-radial-from-pos": [{
2114
+ "mask-radial-from": U()
2115
+ }],
2116
+ "mask-image-radial-to-pos": [{
2117
+ "mask-radial-to": U()
2118
+ }],
2119
+ "mask-image-radial-from-color": [{
2120
+ "mask-radial-from": b()
2121
+ }],
2122
+ "mask-image-radial-to-color": [{
2123
+ "mask-radial-to": b()
2124
+ }],
2125
+ "mask-image-radial-shape": [{
2126
+ "mask-radial": ["circle", "ellipse"]
2127
+ }],
2128
+ "mask-image-radial-size": [{
2129
+ "mask-radial": [{
2130
+ closest: ["side", "corner"],
2131
+ farthest: ["side", "corner"]
2132
+ }]
2133
+ }],
2134
+ "mask-image-radial-pos": [{
2135
+ "mask-radial-at": g()
2136
+ }],
2137
+ "mask-image-conic-pos": [{
2138
+ "mask-conic": [S]
2139
+ }],
2140
+ "mask-image-conic-from-pos": [{
2141
+ "mask-conic-from": U()
2142
+ }],
2143
+ "mask-image-conic-to-pos": [{
2144
+ "mask-conic-to": U()
2145
+ }],
2146
+ "mask-image-conic-from-color": [{
2147
+ "mask-conic-from": b()
2148
+ }],
2149
+ "mask-image-conic-to-color": [{
2150
+ "mask-conic-to": b()
2151
+ }],
2152
+ /**
2153
+ * Mask Mode
2154
+ * @see https://tailwindcss.com/docs/mask-mode
2155
+ */
2156
+ "mask-mode": [{
2157
+ mask: ["alpha", "luminance", "match"]
2158
+ }],
2159
+ /**
2160
+ * Mask Origin
2161
+ * @see https://tailwindcss.com/docs/mask-origin
2162
+ */
2163
+ "mask-origin": [{
2164
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2165
+ }],
2166
+ /**
2167
+ * Mask Position
2168
+ * @see https://tailwindcss.com/docs/mask-position
2169
+ */
2170
+ "mask-position": [{
2171
+ mask: ae()
2172
+ }],
2173
+ /**
2174
+ * Mask Repeat
2175
+ * @see https://tailwindcss.com/docs/mask-repeat
2176
+ */
2177
+ "mask-repeat": [{
2178
+ mask: Ne()
2179
+ }],
2180
+ /**
2181
+ * Mask Size
2182
+ * @see https://tailwindcss.com/docs/mask-size
2183
+ */
2184
+ "mask-size": [{
2185
+ mask: A()
2186
+ }],
2187
+ /**
2188
+ * Mask Type
2189
+ * @see https://tailwindcss.com/docs/mask-type
2190
+ */
2191
+ "mask-type": [{
2192
+ "mask-type": ["alpha", "luminance"]
2193
+ }],
2194
+ /**
2195
+ * Mask Image
2196
+ * @see https://tailwindcss.com/docs/mask-image
2197
+ */
2198
+ "mask-image": [{
2199
+ mask: ["none", h, p]
2200
+ }],
2201
+ // ---------------
2202
+ // --- Filters ---
2203
+ // ---------------
2204
+ /**
2205
+ * Filter
2206
+ * @see https://tailwindcss.com/docs/filter
2207
+ */
2208
+ filter: [{
2209
+ filter: [
2210
+ // Deprecated since Tailwind CSS v3.0.0
2211
+ "",
2212
+ "none",
2213
+ h,
2214
+ p
2215
+ ]
2216
+ }],
2217
+ /**
2218
+ * Blur
2219
+ * @see https://tailwindcss.com/docs/blur
2220
+ */
2221
+ blur: [{
2222
+ blur: fe()
2223
+ }],
2224
+ /**
2225
+ * Brightness
2226
+ * @see https://tailwindcss.com/docs/brightness
2227
+ */
2228
+ brightness: [{
2229
+ brightness: [S, h, p]
2230
+ }],
2231
+ /**
2232
+ * Contrast
2233
+ * @see https://tailwindcss.com/docs/contrast
2234
+ */
2235
+ contrast: [{
2236
+ contrast: [S, h, p]
2237
+ }],
2238
+ /**
2239
+ * Drop Shadow
2240
+ * @see https://tailwindcss.com/docs/drop-shadow
2241
+ */
2242
+ "drop-shadow": [{
2243
+ "drop-shadow": [
2244
+ // Deprecated since Tailwind CSS v4.0.0
2245
+ "",
2246
+ "none",
2247
+ T,
2248
+ Me,
2249
+ Ie
2250
+ ]
2251
+ }],
2252
+ /**
2253
+ * Drop Shadow Color
2254
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2255
+ */
2256
+ "drop-shadow-color": [{
2257
+ "drop-shadow": b()
2258
+ }],
2259
+ /**
2260
+ * Grayscale
2261
+ * @see https://tailwindcss.com/docs/grayscale
2262
+ */
2263
+ grayscale: [{
2264
+ grayscale: ["", S, h, p]
2265
+ }],
2266
+ /**
2267
+ * Hue Rotate
2268
+ * @see https://tailwindcss.com/docs/hue-rotate
2269
+ */
2270
+ "hue-rotate": [{
2271
+ "hue-rotate": [S, h, p]
2272
+ }],
2273
+ /**
2274
+ * Invert
2275
+ * @see https://tailwindcss.com/docs/invert
2276
+ */
2277
+ invert: [{
2278
+ invert: ["", S, h, p]
2279
+ }],
2280
+ /**
2281
+ * Saturate
2282
+ * @see https://tailwindcss.com/docs/saturate
2283
+ */
2284
+ saturate: [{
2285
+ saturate: [S, h, p]
2286
+ }],
2287
+ /**
2288
+ * Sepia
2289
+ * @see https://tailwindcss.com/docs/sepia
2290
+ */
2291
+ sepia: [{
2292
+ sepia: ["", S, h, p]
2293
+ }],
2294
+ /**
2295
+ * Backdrop Filter
2296
+ * @see https://tailwindcss.com/docs/backdrop-filter
2297
+ */
2298
+ "backdrop-filter": [{
2299
+ "backdrop-filter": [
2300
+ // Deprecated since Tailwind CSS v3.0.0
2301
+ "",
2302
+ "none",
2303
+ h,
2304
+ p
2305
+ ]
2306
+ }],
2307
+ /**
2308
+ * Backdrop Blur
2309
+ * @see https://tailwindcss.com/docs/backdrop-blur
2310
+ */
2311
+ "backdrop-blur": [{
2312
+ "backdrop-blur": fe()
2313
+ }],
2314
+ /**
2315
+ * Backdrop Brightness
2316
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2317
+ */
2318
+ "backdrop-brightness": [{
2319
+ "backdrop-brightness": [S, h, p]
2320
+ }],
2321
+ /**
2322
+ * Backdrop Contrast
2323
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2324
+ */
2325
+ "backdrop-contrast": [{
2326
+ "backdrop-contrast": [S, h, p]
2327
+ }],
2328
+ /**
2329
+ * Backdrop Grayscale
2330
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2331
+ */
2332
+ "backdrop-grayscale": [{
2333
+ "backdrop-grayscale": ["", S, h, p]
2334
+ }],
2335
+ /**
2336
+ * Backdrop Hue Rotate
2337
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2338
+ */
2339
+ "backdrop-hue-rotate": [{
2340
+ "backdrop-hue-rotate": [S, h, p]
2341
+ }],
2342
+ /**
2343
+ * Backdrop Invert
2344
+ * @see https://tailwindcss.com/docs/backdrop-invert
2345
+ */
2346
+ "backdrop-invert": [{
2347
+ "backdrop-invert": ["", S, h, p]
2348
+ }],
2349
+ /**
2350
+ * Backdrop Opacity
2351
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2352
+ */
2353
+ "backdrop-opacity": [{
2354
+ "backdrop-opacity": [S, h, p]
2355
+ }],
2356
+ /**
2357
+ * Backdrop Saturate
2358
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2359
+ */
2360
+ "backdrop-saturate": [{
2361
+ "backdrop-saturate": [S, h, p]
2362
+ }],
2363
+ /**
2364
+ * Backdrop Sepia
2365
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2366
+ */
2367
+ "backdrop-sepia": [{
2368
+ "backdrop-sepia": ["", S, h, p]
2369
+ }],
2370
+ // --------------
2371
+ // --- Tables ---
2372
+ // --------------
2373
+ /**
2374
+ * Border Collapse
2375
+ * @see https://tailwindcss.com/docs/border-collapse
2376
+ */
2377
+ "border-collapse": [{
2378
+ border: ["collapse", "separate"]
2379
+ }],
2380
+ /**
2381
+ * Border Spacing
2382
+ * @see https://tailwindcss.com/docs/border-spacing
2383
+ */
2384
+ "border-spacing": [{
2385
+ "border-spacing": f()
2386
+ }],
2387
+ /**
2388
+ * Border Spacing X
2389
+ * @see https://tailwindcss.com/docs/border-spacing
2390
+ */
2391
+ "border-spacing-x": [{
2392
+ "border-spacing-x": f()
2393
+ }],
2394
+ /**
2395
+ * Border Spacing Y
2396
+ * @see https://tailwindcss.com/docs/border-spacing
2397
+ */
2398
+ "border-spacing-y": [{
2399
+ "border-spacing-y": f()
2400
+ }],
2401
+ /**
2402
+ * Table Layout
2403
+ * @see https://tailwindcss.com/docs/table-layout
2404
+ */
2405
+ "table-layout": [{
2406
+ table: ["auto", "fixed"]
2407
+ }],
2408
+ /**
2409
+ * Caption Side
2410
+ * @see https://tailwindcss.com/docs/caption-side
2411
+ */
2412
+ caption: [{
2413
+ caption: ["top", "bottom"]
2414
+ }],
2415
+ // ---------------------------------
2416
+ // --- Transitions and Animation ---
2417
+ // ---------------------------------
2418
+ /**
2419
+ * Transition Property
2420
+ * @see https://tailwindcss.com/docs/transition-property
2421
+ */
2422
+ transition: [{
2423
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", h, p]
2424
+ }],
2425
+ /**
2426
+ * Transition Behavior
2427
+ * @see https://tailwindcss.com/docs/transition-behavior
2428
+ */
2429
+ "transition-behavior": [{
2430
+ transition: ["normal", "discrete"]
2431
+ }],
2432
+ /**
2433
+ * Transition Duration
2434
+ * @see https://tailwindcss.com/docs/transition-duration
2435
+ */
2436
+ duration: [{
2437
+ duration: [S, "initial", h, p]
2438
+ }],
2439
+ /**
2440
+ * Transition Timing Function
2441
+ * @see https://tailwindcss.com/docs/transition-timing-function
2442
+ */
2443
+ ease: [{
2444
+ ease: ["linear", "initial", H, h, p]
2445
+ }],
2446
+ /**
2447
+ * Transition Delay
2448
+ * @see https://tailwindcss.com/docs/transition-delay
2449
+ */
2450
+ delay: [{
2451
+ delay: [S, h, p]
2452
+ }],
2453
+ /**
2454
+ * Animation
2455
+ * @see https://tailwindcss.com/docs/animation
2456
+ */
2457
+ animate: [{
2458
+ animate: ["none", N, h, p]
2459
+ }],
2460
+ // ------------------
2461
+ // --- Transforms ---
2462
+ // ------------------
2463
+ /**
2464
+ * Backface Visibility
2465
+ * @see https://tailwindcss.com/docs/backface-visibility
2466
+ */
2467
+ backface: [{
2468
+ backface: ["hidden", "visible"]
2469
+ }],
2470
+ /**
2471
+ * Perspective
2472
+ * @see https://tailwindcss.com/docs/perspective
2473
+ */
2474
+ perspective: [{
2475
+ perspective: [P, h, p]
2476
+ }],
2477
+ /**
2478
+ * Perspective Origin
2479
+ * @see https://tailwindcss.com/docs/perspective-origin
2480
+ */
2481
+ "perspective-origin": [{
2482
+ "perspective-origin": k()
2483
+ }],
2484
+ /**
2485
+ * Rotate
2486
+ * @see https://tailwindcss.com/docs/rotate
2487
+ */
2488
+ rotate: [{
2489
+ rotate: pe()
2490
+ }],
2491
+ /**
2492
+ * Rotate X
2493
+ * @see https://tailwindcss.com/docs/rotate
2494
+ */
2495
+ "rotate-x": [{
2496
+ "rotate-x": pe()
2497
+ }],
2498
+ /**
2499
+ * Rotate Y
2500
+ * @see https://tailwindcss.com/docs/rotate
2501
+ */
2502
+ "rotate-y": [{
2503
+ "rotate-y": pe()
2504
+ }],
2505
+ /**
2506
+ * Rotate Z
2507
+ * @see https://tailwindcss.com/docs/rotate
2508
+ */
2509
+ "rotate-z": [{
2510
+ "rotate-z": pe()
2511
+ }],
2512
+ /**
2513
+ * Scale
2514
+ * @see https://tailwindcss.com/docs/scale
2515
+ */
2516
+ scale: [{
2517
+ scale: te()
2518
+ }],
2519
+ /**
2520
+ * Scale X
2521
+ * @see https://tailwindcss.com/docs/scale
2522
+ */
2523
+ "scale-x": [{
2524
+ "scale-x": te()
2525
+ }],
2526
+ /**
2527
+ * Scale Y
2528
+ * @see https://tailwindcss.com/docs/scale
2529
+ */
2530
+ "scale-y": [{
2531
+ "scale-y": te()
2532
+ }],
2533
+ /**
2534
+ * Scale Z
2535
+ * @see https://tailwindcss.com/docs/scale
2536
+ */
2537
+ "scale-z": [{
2538
+ "scale-z": te()
2539
+ }],
2540
+ /**
2541
+ * Scale 3D
2542
+ * @see https://tailwindcss.com/docs/scale
2543
+ */
2544
+ "scale-3d": ["scale-3d"],
2545
+ /**
2546
+ * Skew
2547
+ * @see https://tailwindcss.com/docs/skew
2548
+ */
2549
+ skew: [{
2550
+ skew: he()
2551
+ }],
2552
+ /**
2553
+ * Skew X
2554
+ * @see https://tailwindcss.com/docs/skew
2555
+ */
2556
+ "skew-x": [{
2557
+ "skew-x": he()
2558
+ }],
2559
+ /**
2560
+ * Skew Y
2561
+ * @see https://tailwindcss.com/docs/skew
2562
+ */
2563
+ "skew-y": [{
2564
+ "skew-y": he()
2565
+ }],
2566
+ /**
2567
+ * Transform
2568
+ * @see https://tailwindcss.com/docs/transform
2569
+ */
2570
+ transform: [{
2571
+ transform: [h, p, "", "none", "gpu", "cpu"]
2572
+ }],
2573
+ /**
2574
+ * Transform Origin
2575
+ * @see https://tailwindcss.com/docs/transform-origin
2576
+ */
2577
+ "transform-origin": [{
2578
+ origin: k()
2579
+ }],
2580
+ /**
2581
+ * Transform Style
2582
+ * @see https://tailwindcss.com/docs/transform-style
2583
+ */
2584
+ "transform-style": [{
2585
+ transform: ["3d", "flat"]
2586
+ }],
2587
+ /**
2588
+ * Translate
2589
+ * @see https://tailwindcss.com/docs/translate
2590
+ */
2591
+ translate: [{
2592
+ translate: Q()
2593
+ }],
2594
+ /**
2595
+ * Translate X
2596
+ * @see https://tailwindcss.com/docs/translate
2597
+ */
2598
+ "translate-x": [{
2599
+ "translate-x": Q()
2600
+ }],
2601
+ /**
2602
+ * Translate Y
2603
+ * @see https://tailwindcss.com/docs/translate
2604
+ */
2605
+ "translate-y": [{
2606
+ "translate-y": Q()
2607
+ }],
2608
+ /**
2609
+ * Translate Z
2610
+ * @see https://tailwindcss.com/docs/translate
2611
+ */
2612
+ "translate-z": [{
2613
+ "translate-z": Q()
2614
+ }],
2615
+ /**
2616
+ * Translate None
2617
+ * @see https://tailwindcss.com/docs/translate
2618
+ */
2619
+ "translate-none": ["translate-none"],
2620
+ /**
2621
+ * Zoom
2622
+ * @see https://tailwindcss.com/docs/zoom
2623
+ */
2624
+ zoom: [{
2625
+ zoom: [le, h, p]
2626
+ }],
2627
+ // ---------------------
2628
+ // --- Interactivity ---
2629
+ // ---------------------
2630
+ /**
2631
+ * Accent Color
2632
+ * @see https://tailwindcss.com/docs/accent-color
2633
+ */
2634
+ accent: [{
2635
+ accent: b()
2636
+ }],
2637
+ /**
2638
+ * Appearance
2639
+ * @see https://tailwindcss.com/docs/appearance
2640
+ */
2641
+ appearance: [{
2642
+ appearance: ["none", "auto"]
2643
+ }],
2644
+ /**
2645
+ * Caret Color
2646
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2647
+ */
2648
+ "caret-color": [{
2649
+ caret: b()
2650
+ }],
2651
+ /**
2652
+ * Color Scheme
2653
+ * @see https://tailwindcss.com/docs/color-scheme
2654
+ */
2655
+ "color-scheme": [{
2656
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
2657
+ }],
2658
+ /**
2659
+ * Cursor
2660
+ * @see https://tailwindcss.com/docs/cursor
2661
+ */
2662
+ cursor: [{
2663
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", h, p]
2664
+ }],
2665
+ /**
2666
+ * Field Sizing
2667
+ * @see https://tailwindcss.com/docs/field-sizing
2668
+ */
2669
+ "field-sizing": [{
2670
+ "field-sizing": ["fixed", "content"]
2671
+ }],
2672
+ /**
2673
+ * Pointer Events
2674
+ * @see https://tailwindcss.com/docs/pointer-events
2675
+ */
2676
+ "pointer-events": [{
2677
+ "pointer-events": ["auto", "none"]
2678
+ }],
2679
+ /**
2680
+ * Resize
2681
+ * @see https://tailwindcss.com/docs/resize
2682
+ */
2683
+ resize: [{
2684
+ resize: ["none", "", "y", "x"]
2685
+ }],
2686
+ /**
2687
+ * Scroll Behavior
2688
+ * @see https://tailwindcss.com/docs/scroll-behavior
2689
+ */
2690
+ "scroll-behavior": [{
2691
+ scroll: ["auto", "smooth"]
2692
+ }],
2693
+ /**
2694
+ * Scrollbar Thumb Color
2695
+ * @see https://tailwindcss.com/docs/scrollbar-color
2696
+ */
2697
+ "scrollbar-thumb-color": [{
2698
+ "scrollbar-thumb": b()
2699
+ }],
2700
+ /**
2701
+ * Scrollbar Track Color
2702
+ * @see https://tailwindcss.com/docs/scrollbar-color
2703
+ */
2704
+ "scrollbar-track-color": [{
2705
+ "scrollbar-track": b()
2706
+ }],
2707
+ /**
2708
+ * Scrollbar Gutter
2709
+ * @see https://tailwindcss.com/docs/scrollbar-gutter
2710
+ */
2711
+ "scrollbar-gutter": [{
2712
+ "scrollbar-gutter": ["auto", "stable", "both"]
2713
+ }],
2714
+ /**
2715
+ * Scrollbar Width
2716
+ * @see https://tailwindcss.com/docs/scrollbar-width
2717
+ */
2718
+ "scrollbar-w": [{
2719
+ scrollbar: ["auto", "thin", "none"]
2720
+ }],
2721
+ /**
2722
+ * Scroll Margin
2723
+ * @see https://tailwindcss.com/docs/scroll-margin
2724
+ */
2725
+ "scroll-m": [{
2726
+ "scroll-m": f()
2727
+ }],
2728
+ /**
2729
+ * Scroll Margin Inline
2730
+ * @see https://tailwindcss.com/docs/scroll-margin
2731
+ */
2732
+ "scroll-mx": [{
2733
+ "scroll-mx": f()
2734
+ }],
2735
+ /**
2736
+ * Scroll Margin Block
2737
+ * @see https://tailwindcss.com/docs/scroll-margin
2738
+ */
2739
+ "scroll-my": [{
2740
+ "scroll-my": f()
2741
+ }],
2742
+ /**
2743
+ * Scroll Margin Inline Start
2744
+ * @see https://tailwindcss.com/docs/scroll-margin
2745
+ */
2746
+ "scroll-ms": [{
2747
+ "scroll-ms": f()
2748
+ }],
2749
+ /**
2750
+ * Scroll Margin Inline End
2751
+ * @see https://tailwindcss.com/docs/scroll-margin
2752
+ */
2753
+ "scroll-me": [{
2754
+ "scroll-me": f()
2755
+ }],
2756
+ /**
2757
+ * Scroll Margin Block Start
2758
+ * @see https://tailwindcss.com/docs/scroll-margin
2759
+ */
2760
+ "scroll-mbs": [{
2761
+ "scroll-mbs": f()
2762
+ }],
2763
+ /**
2764
+ * Scroll Margin Block End
2765
+ * @see https://tailwindcss.com/docs/scroll-margin
2766
+ */
2767
+ "scroll-mbe": [{
2768
+ "scroll-mbe": f()
2769
+ }],
2770
+ /**
2771
+ * Scroll Margin Top
2772
+ * @see https://tailwindcss.com/docs/scroll-margin
2773
+ */
2774
+ "scroll-mt": [{
2775
+ "scroll-mt": f()
2776
+ }],
2777
+ /**
2778
+ * Scroll Margin Right
2779
+ * @see https://tailwindcss.com/docs/scroll-margin
2780
+ */
2781
+ "scroll-mr": [{
2782
+ "scroll-mr": f()
2783
+ }],
2784
+ /**
2785
+ * Scroll Margin Bottom
2786
+ * @see https://tailwindcss.com/docs/scroll-margin
2787
+ */
2788
+ "scroll-mb": [{
2789
+ "scroll-mb": f()
2790
+ }],
2791
+ /**
2792
+ * Scroll Margin Left
2793
+ * @see https://tailwindcss.com/docs/scroll-margin
2794
+ */
2795
+ "scroll-ml": [{
2796
+ "scroll-ml": f()
2797
+ }],
2798
+ /**
2799
+ * Scroll Padding
2800
+ * @see https://tailwindcss.com/docs/scroll-padding
2801
+ */
2802
+ "scroll-p": [{
2803
+ "scroll-p": f()
2804
+ }],
2805
+ /**
2806
+ * Scroll Padding Inline
2807
+ * @see https://tailwindcss.com/docs/scroll-padding
2808
+ */
2809
+ "scroll-px": [{
2810
+ "scroll-px": f()
2811
+ }],
2812
+ /**
2813
+ * Scroll Padding Block
2814
+ * @see https://tailwindcss.com/docs/scroll-padding
2815
+ */
2816
+ "scroll-py": [{
2817
+ "scroll-py": f()
2818
+ }],
2819
+ /**
2820
+ * Scroll Padding Inline Start
2821
+ * @see https://tailwindcss.com/docs/scroll-padding
2822
+ */
2823
+ "scroll-ps": [{
2824
+ "scroll-ps": f()
2825
+ }],
2826
+ /**
2827
+ * Scroll Padding Inline End
2828
+ * @see https://tailwindcss.com/docs/scroll-padding
2829
+ */
2830
+ "scroll-pe": [{
2831
+ "scroll-pe": f()
2832
+ }],
2833
+ /**
2834
+ * Scroll Padding Block Start
2835
+ * @see https://tailwindcss.com/docs/scroll-padding
2836
+ */
2837
+ "scroll-pbs": [{
2838
+ "scroll-pbs": f()
2839
+ }],
2840
+ /**
2841
+ * Scroll Padding Block End
2842
+ * @see https://tailwindcss.com/docs/scroll-padding
2843
+ */
2844
+ "scroll-pbe": [{
2845
+ "scroll-pbe": f()
2846
+ }],
2847
+ /**
2848
+ * Scroll Padding Top
2849
+ * @see https://tailwindcss.com/docs/scroll-padding
2850
+ */
2851
+ "scroll-pt": [{
2852
+ "scroll-pt": f()
2853
+ }],
2854
+ /**
2855
+ * Scroll Padding Right
2856
+ * @see https://tailwindcss.com/docs/scroll-padding
2857
+ */
2858
+ "scroll-pr": [{
2859
+ "scroll-pr": f()
2860
+ }],
2861
+ /**
2862
+ * Scroll Padding Bottom
2863
+ * @see https://tailwindcss.com/docs/scroll-padding
2864
+ */
2865
+ "scroll-pb": [{
2866
+ "scroll-pb": f()
2867
+ }],
2868
+ /**
2869
+ * Scroll Padding Left
2870
+ * @see https://tailwindcss.com/docs/scroll-padding
2871
+ */
2872
+ "scroll-pl": [{
2873
+ "scroll-pl": f()
2874
+ }],
2875
+ /**
2876
+ * Scroll Snap Align
2877
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2878
+ */
2879
+ "snap-align": [{
2880
+ snap: ["start", "end", "center", "align-none"]
2881
+ }],
2882
+ /**
2883
+ * Scroll Snap Stop
2884
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2885
+ */
2886
+ "snap-stop": [{
2887
+ snap: ["normal", "always"]
2888
+ }],
2889
+ /**
2890
+ * Scroll Snap Type
2891
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2892
+ */
2893
+ "snap-type": [{
2894
+ snap: ["none", "x", "y", "both"]
2895
+ }],
2896
+ /**
2897
+ * Scroll Snap Type Strictness
2898
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2899
+ */
2900
+ "snap-strictness": [{
2901
+ snap: ["mandatory", "proximity"]
2902
+ }],
2903
+ /**
2904
+ * Touch Action
2905
+ * @see https://tailwindcss.com/docs/touch-action
2906
+ */
2907
+ touch: [{
2908
+ touch: ["auto", "none", "manipulation"]
2909
+ }],
2910
+ /**
2911
+ * Touch Action X
2912
+ * @see https://tailwindcss.com/docs/touch-action
2913
+ */
2914
+ "touch-x": [{
2915
+ "touch-pan": ["x", "left", "right"]
2916
+ }],
2917
+ /**
2918
+ * Touch Action Y
2919
+ * @see https://tailwindcss.com/docs/touch-action
2920
+ */
2921
+ "touch-y": [{
2922
+ "touch-pan": ["y", "up", "down"]
2923
+ }],
2924
+ /**
2925
+ * Touch Action Pinch Zoom
2926
+ * @see https://tailwindcss.com/docs/touch-action
2927
+ */
2928
+ "touch-pz": ["touch-pinch-zoom"],
2929
+ /**
2930
+ * User Select
2931
+ * @see https://tailwindcss.com/docs/user-select
2932
+ */
2933
+ select: [{
2934
+ select: ["none", "text", "all", "auto"]
2935
+ }],
2936
+ /**
2937
+ * Will Change
2938
+ * @see https://tailwindcss.com/docs/will-change
2939
+ */
2940
+ "will-change": [{
2941
+ "will-change": ["auto", "scroll", "contents", "transform", h, p]
2942
+ }],
2943
+ // -----------
2944
+ // --- SVG ---
2945
+ // -----------
2946
+ /**
2947
+ * Fill
2948
+ * @see https://tailwindcss.com/docs/fill
2949
+ */
2950
+ fill: [{
2951
+ fill: ["none", ...b()]
2952
+ }],
2953
+ /**
2954
+ * Stroke Width
2955
+ * @see https://tailwindcss.com/docs/stroke-width
2956
+ */
2957
+ "stroke-w": [{
2958
+ stroke: [S, Re, ke, ht]
2959
+ }],
2960
+ /**
2961
+ * Stroke
2962
+ * @see https://tailwindcss.com/docs/stroke
2963
+ */
2964
+ stroke: [{
2965
+ stroke: ["none", ...b()]
2966
+ }],
2967
+ // ---------------------
2968
+ // --- Accessibility ---
2969
+ // ---------------------
2970
+ /**
2971
+ * Forced Color Adjust
2972
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2973
+ */
2974
+ "forced-color-adjust": [{
2975
+ "forced-color-adjust": ["auto", "none"]
2976
+ }]
2977
+ },
2978
+ conflictingClassGroups: {
2979
+ "container-named": ["container-type"],
2980
+ overflow: ["overflow-x", "overflow-y"],
2981
+ overscroll: ["overscroll-x", "overscroll-y"],
2982
+ inset: ["inset-x", "inset-y", "inset-bs", "inset-be", "start", "end", "top", "right", "bottom", "left"],
2983
+ "inset-x": ["start", "end", "right", "left"],
2984
+ "inset-y": ["inset-bs", "inset-be", "top", "bottom"],
2985
+ flex: ["basis", "grow", "shrink"],
2986
+ gap: ["gap-x", "gap-y"],
2987
+ p: ["px", "py", "ps", "pe", "pbs", "pbe", "pt", "pr", "pb", "pl"],
2988
+ px: ["ps", "pe", "pr", "pl"],
2989
+ py: ["pbs", "pbe", "pt", "pb"],
2990
+ m: ["mx", "my", "ms", "me", "mbs", "mbe", "mt", "mr", "mb", "ml"],
2991
+ mx: ["ms", "me", "mr", "ml"],
2992
+ my: ["mbs", "mbe", "mt", "mb"],
2993
+ size: ["w", "h"],
2994
+ "font-size": ["leading"],
2995
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2996
+ "fvn-ordinal": ["fvn-normal"],
2997
+ "fvn-slashed-zero": ["fvn-normal"],
2998
+ "fvn-figure": ["fvn-normal"],
2999
+ "fvn-spacing": ["fvn-normal"],
3000
+ "fvn-fraction": ["fvn-normal"],
3001
+ "line-clamp": ["display", "overflow"],
3002
+ rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
3003
+ "rounded-s": ["rounded-ss", "rounded-es"],
3004
+ "rounded-e": ["rounded-se", "rounded-ee"],
3005
+ "rounded-t": ["rounded-tl", "rounded-tr"],
3006
+ "rounded-r": ["rounded-tr", "rounded-br"],
3007
+ "rounded-b": ["rounded-br", "rounded-bl"],
3008
+ "rounded-l": ["rounded-tl", "rounded-bl"],
3009
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
3010
+ "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-bs", "border-w-be", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
3011
+ "border-w-x": ["border-w-s", "border-w-e", "border-w-r", "border-w-l"],
3012
+ "border-w-y": ["border-w-bs", "border-w-be", "border-w-t", "border-w-b"],
3013
+ "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-bs", "border-color-be", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
3014
+ "border-color-x": ["border-color-s", "border-color-e", "border-color-r", "border-color-l"],
3015
+ "border-color-y": ["border-color-bs", "border-color-be", "border-color-t", "border-color-b"],
3016
+ translate: ["translate-x", "translate-y", "translate-none"],
3017
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
3018
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mbs", "scroll-mbe", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
3019
+ "scroll-mx": ["scroll-ms", "scroll-me", "scroll-mr", "scroll-ml"],
3020
+ "scroll-my": ["scroll-mbs", "scroll-mbe", "scroll-mt", "scroll-mb"],
3021
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pbs", "scroll-pbe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
3022
+ "scroll-px": ["scroll-ps", "scroll-pe", "scroll-pr", "scroll-pl"],
3023
+ "scroll-py": ["scroll-pbs", "scroll-pbe", "scroll-pt", "scroll-pb"],
3024
+ touch: ["touch-x", "touch-y", "touch-pz"],
3025
+ "touch-x": ["touch"],
3026
+ "touch-y": ["touch"],
3027
+ "touch-pz": ["touch"]
3028
+ },
3029
+ conflictingClassGroupModifiers: {
3030
+ "font-size": ["leading"]
3031
+ },
3032
+ postfixLookupClassGroups: ["container-type"],
3033
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3034
+ };
3035
+ }, eo = /* @__PURE__ */ Er(Xr);
3036
+ function Z(...e) {
3037
+ return eo(kt(e));
3038
+ }
3039
+ const to = {
3040
+ neutral: "",
3041
+ accent: "bg-accent-soft text-accent-ink",
3042
+ info: "bg-info-soft text-info",
3043
+ warn: "bg-warn-soft text-warn",
3044
+ danger: "bg-danger-soft text-danger",
3045
+ success: "bg-success-soft text-success"
3046
+ }, ro = wt(
3047
+ "inline-flex max-w-full items-center whitespace-nowrap rounded-full bg-sunken px-2 py-0.5 font-mono text-xs text-faint",
3048
+ {
3049
+ variants: { tone: to },
3050
+ defaultVariants: { tone: "neutral" }
3051
+ }
3052
+ );
3053
+ function we({ tone: e, className: n, ...t }) {
3054
+ return /* @__PURE__ */ o("span", { ...t, className: Z(ro({ tone: e }), n) });
3055
+ }
3056
+ const oo = {
3057
+ plain: "bg-sunken text-ink tint-hover tint-press",
3058
+ primary: "bg-accent text-surface hover:bg-accent-ink active:bg-accent-ink",
3059
+ danger: "bg-danger text-surface tint-hover tint-press",
3060
+ dangerGhost: "bg-transparent text-danger hover:bg-danger-soft",
3061
+ link: "bg-transparent p-0 text-accent underline underline-offset-2 hover:text-accent-ink",
3062
+ chip: "rounded-full bg-transparent text-muted hover:bg-hover hover:text-ink aria-pressed:bg-accent-soft aria-pressed:text-accent-ink"
3063
+ }, no = {
3064
+ // 默认内边距在 base:`link` / `chip` variant 可以整体覆盖。
3065
+ normal: "",
3066
+ small: "px-2.5 py-1 text-xs"
3067
+ }, lo = wt(
3068
+ // L2 基础:形状、排版、focus、触控目标与 disabled 只在这里定义一次。
3069
+ "inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-sm px-3 py-2 text-sm tracking-wide transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface pointer-coarse:min-h-touch forced-colors:border disabled:opacity-45 disabled:cursor-not-allowed",
3070
+ {
3071
+ variants: {
3072
+ variant: oo,
3073
+ size: no
3074
+ },
3075
+ defaultVariants: { variant: "plain", size: "normal" }
3076
+ }
3077
+ ), q = Ae(function({ variant: n, size: t, type: r = "button", className: s, children: a, ...l }, u) {
3078
+ return /* @__PURE__ */ o("button", { ...l, ref: u, type: r, className: Z(lo({ variant: n, size: t }), s), children: a });
3079
+ }), Qe = "w-full min-w-0 rounded-sm border-0 bg-sunken px-2.75 py-2 text-md text-ink shadow-elev-inset transition-colors placeholder:text-faint focus:outline-none focus:shadow-focus pointer-coarse:min-h-touch disabled:cursor-not-allowed disabled:opacity-45 forced-colors:border", Xe = "bg-danger-soft text-danger";
3080
+ function V({
3081
+ label: e,
3082
+ htmlFor: n,
3083
+ hint: t,
3084
+ error: r,
3085
+ required: s,
3086
+ className: a,
3087
+ children: l,
3088
+ ...u
3089
+ }) {
3090
+ return /* @__PURE__ */ x("div", { ...u, className: Z("flex min-w-0 flex-col gap-1.25", a), children: [
3091
+ e != null ? /* @__PURE__ */ x(
3092
+ "label",
3093
+ {
3094
+ htmlFor: n,
3095
+ className: "font-mono text-2xs uppercase tracking-widest text-faint",
3096
+ children: [
3097
+ e,
3098
+ s ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: "text-danger", children: " *" }) : null
3099
+ ]
3100
+ }
3101
+ ) : null,
3102
+ l,
3103
+ t != null ? /* @__PURE__ */ o("span", { className: "text-xs text-faint wrap-anywhere", children: t }) : null,
3104
+ r != null ? /* @__PURE__ */ o("span", { role: "alert", className: "text-xs text-danger leading-snug", children: r }) : null
3105
+ ] });
3106
+ }
3107
+ const B = Ae(function({ invalid: n, className: t, "aria-invalid": r, ...s }, a) {
3108
+ return /* @__PURE__ */ o(
3109
+ "input",
3110
+ {
3111
+ ...s,
3112
+ ref: a,
3113
+ "aria-invalid": n ? !0 : r,
3114
+ className: Z(Qe, n && Xe, t)
3115
+ }
3116
+ );
3117
+ });
3118
+ function Ut(e) {
3119
+ return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Ut).join("") : "";
3120
+ }
3121
+ function so(e) {
3122
+ const n = [], t = (r) => {
3123
+ if (r == null || typeof r == "boolean") return;
3124
+ if (Array.isArray(r)) {
3125
+ for (const u of r) t(u);
3126
+ return;
3127
+ }
3128
+ if (!ar(r)) return;
3129
+ if (r.type === ir) {
3130
+ t(r.props.children);
3131
+ return;
3132
+ }
3133
+ if (r.type !== "option") return;
3134
+ const s = r.props, a = Ut(s.children).trim(), l = s.value != null ? String(s.value) : a;
3135
+ n.push({
3136
+ key: `${n.length}:${typeof r.key == "string" ? r.key : l}`,
3137
+ value: l,
3138
+ label: s.children,
3139
+ text: a,
3140
+ disabled: !!s.disabled
3141
+ });
3142
+ };
3143
+ return t(e), n;
3144
+ }
3145
+ function Le(e, n, t) {
3146
+ if (e.length === 0) return -1;
3147
+ let r = n;
3148
+ for (let s = 0; s < e.length; s += 1)
3149
+ if (r = (r + t + e.length) % e.length, !e[r]?.disabled) return r;
3150
+ return -1;
3151
+ }
3152
+ function ao(e, n) {
3153
+ const t = e.findIndex((r) => r.value === n);
3154
+ return t >= 0 && !e[t]?.disabled ? t : Le(e, -1, 1);
3155
+ }
3156
+ const xt = typeof window > "u" ? me : sr, Te = Ae(function({
3157
+ invalid: n,
3158
+ className: t,
3159
+ "aria-invalid": r,
3160
+ "aria-label": s,
3161
+ children: a,
3162
+ value: l,
3163
+ defaultValue: u,
3164
+ onChange: d,
3165
+ disabled: i,
3166
+ required: v,
3167
+ id: y,
3168
+ name: z,
3169
+ footer: T,
3170
+ popupMinWidth: W,
3171
+ prefix: P,
3172
+ ...R
3173
+ }, H) {
3174
+ const N = so(a), [M, g] = C(
3175
+ () => u != null ? String(u) : ""
3176
+ ), k = l !== void 0 ? String(l) : M, F = N.find((A) => A.value === k), [E, f] = C(!1), [O, K] = C(-1), [J, j] = C(null), Y = oe(null), G = oe(null), c = oe([]), L = nr(), $ = (A) => `${L}-option-${A}`;
3177
+ lr(H, () => Y.current, []);
3178
+ const ee = De((A) => {
3179
+ f(!1), K(-1), A && Y.current?.focus();
3180
+ }, []), se = (A) => {
3181
+ A.disabled || (l === void 0 && g(A.value), f(!1), K(-1), Y.current?.focus(), A.value !== k && d?.({
3182
+ target: { value: A.value, name: z },
3183
+ currentTarget: { value: A.value, name: z }
3184
+ }));
3185
+ }, b = De(() => {
3186
+ const A = Y.current;
3187
+ if (!A) return;
3188
+ const I = A.getBoundingClientRect(), w = window.innerWidth, D = window.innerHeight, ne = Math.min(Math.max(I.width, W ?? 0), w - 16), ie = Math.max(8, Math.min(I.left, w - ne - 8)), U = G.current, fe = U ? U.scrollHeight + (U.offsetHeight - U.clientHeight) : N.length * 34 + 8, pe = Math.min(240, fe), te = D - I.bottom - 8, he = I.top - 8, Q = te < pe && he > te, Se = Math.max(96, Math.min(240, Q ? he : te)), Pe = Math.min(fe, Se), Ee = Q ? Math.max(8, I.top - 4 - Pe) : I.bottom + 4;
3189
+ j(
3190
+ (re) => re !== null && re.top === Ee && re.left === ie && re.width === ne && re.maxHeight === Se && re.placeAbove === Q ? re : { top: Ee, left: ie, width: ne, maxHeight: Se, placeAbove: Q }
3191
+ );
3192
+ }, [N.length, W]);
3193
+ xt(() => {
3194
+ if (!E) {
3195
+ j(null);
3196
+ return;
3197
+ }
3198
+ return b(), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
3199
+ window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
3200
+ };
3201
+ }, [E, b]), xt(() => {
3202
+ E && J !== null && G.current && b();
3203
+ }, [E, J, b]), me(() => {
3204
+ !E || O < 0 || c.current[O]?.scrollIntoView({ block: "nearest" });
3205
+ }, [E, O]), me(() => {
3206
+ if (!E) return;
3207
+ const A = (I) => {
3208
+ const w = I.target;
3209
+ w instanceof Node && (Y.current?.contains(w) || G.current?.contains(w) || ee(!1));
3210
+ };
3211
+ return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
3212
+ }, [E, ee]);
3213
+ const ae = () => {
3214
+ i || N.length === 0 || (K(ao(N, k)), f(!0));
3215
+ }, Ne = (A) => {
3216
+ if (i) return;
3217
+ const I = A.key;
3218
+ if (!E) {
3219
+ (I === "ArrowDown" || I === "ArrowUp") && (A.preventDefault(), ae());
3220
+ return;
3221
+ }
3222
+ if (I === "Escape") {
3223
+ A.preventDefault(), A.stopPropagation(), ee(!0);
3224
+ return;
3225
+ }
3226
+ if (I === "Tab") {
3227
+ ee(!1);
3228
+ return;
3229
+ }
3230
+ if (I === "Enter" || I === " ") {
3231
+ A.preventDefault();
3232
+ const w = N[O];
3233
+ w ? se(w) : ee(!0);
3234
+ return;
3235
+ }
3236
+ if (I === "ArrowDown" || I === "ArrowUp") {
3237
+ A.preventDefault(), K(
3238
+ (w) => Le(N, w < 0 ? -1 : w, I === "ArrowDown" ? 1 : -1)
3239
+ );
3240
+ return;
3241
+ }
3242
+ if (I === "Home") {
3243
+ A.preventDefault(), K(Le(N, -1, 1));
3244
+ return;
3245
+ }
3246
+ I === "End" && (A.preventDefault(), K(Le(N, 0, -1)));
3247
+ };
3248
+ return /* @__PURE__ */ x(or, { children: [
3249
+ /* @__PURE__ */ x(
3250
+ "button",
3251
+ {
3252
+ ...R,
3253
+ ref: Y,
3254
+ id: y,
3255
+ type: "button",
3256
+ role: "combobox",
3257
+ "aria-haspopup": "listbox",
3258
+ "aria-expanded": E,
3259
+ "aria-controls": E ? L : void 0,
3260
+ "aria-activedescendant": E && O >= 0 ? $(O) : void 0,
3261
+ "aria-invalid": n ? !0 : r,
3262
+ "aria-required": v || void 0,
3263
+ "aria-label": s,
3264
+ disabled: i,
3265
+ className: Z(
3266
+ Qe,
3267
+ "flex items-center justify-between gap-2 text-left",
3268
+ n && Xe,
3269
+ t
3270
+ ),
3271
+ onClick: () => {
3272
+ E ? ee(!0) : ae();
3273
+ },
3274
+ onKeyDown: Ne,
3275
+ children: [
3276
+ P != null ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: "flex-none text-faint", children: P }) : null,
3277
+ /* @__PURE__ */ o("span", { className: "truncate", children: F ? F.label : null }),
3278
+ /* @__PURE__ */ o(
3279
+ "svg",
3280
+ {
3281
+ "aria-hidden": "true",
3282
+ viewBox: "0 0 12 12",
3283
+ className: Z("size-3 flex-none text-faint transition-transform", E && "rotate-180"),
3284
+ fill: "none",
3285
+ stroke: "currentColor",
3286
+ strokeWidth: "1.5",
3287
+ strokeLinecap: "round",
3288
+ strokeLinejoin: "round",
3289
+ children: /* @__PURE__ */ o("path", { d: "M2.5 4.5 6 8l3.5-3.5" })
3290
+ }
3291
+ )
3292
+ ]
3293
+ }
3294
+ ),
3295
+ E && J !== null ? dr(
3296
+ /* @__PURE__ */ x(
3297
+ "div",
3298
+ {
3299
+ ref: G,
3300
+ className: "fixed z-tooltip flex flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-raised p-1 shadow-elev-3",
3301
+ style: {
3302
+ top: J.top,
3303
+ left: J.left,
3304
+ width: J.width,
3305
+ maxHeight: J.maxHeight
3306
+ },
3307
+ children: [
3308
+ /* @__PURE__ */ o(
3309
+ "div",
3310
+ {
3311
+ id: L,
3312
+ role: "listbox",
3313
+ "aria-labelledby": y,
3314
+ "aria-label": y == null ? s : void 0,
3315
+ tabIndex: -1,
3316
+ className: "flex flex-col",
3317
+ children: N.map((A, I) => {
3318
+ const w = A.value === k;
3319
+ return (
3320
+ // biome-ignore lint/a11y/useFocusableInteractive: aria-activedescendant 模式下选项不接收焦点
3321
+ // biome-ignore lint/a11y/useKeyWithClickEvents: 键盘交互在触发器上(combobox 模式)
3322
+ /* @__PURE__ */ o(
3323
+ "div",
3324
+ {
3325
+ ref: (D) => {
3326
+ c.current[I] = D;
3327
+ },
3328
+ id: $(I),
3329
+ role: "option",
3330
+ "aria-selected": w,
3331
+ "aria-disabled": A.disabled || void 0,
3332
+ className: Z(
3333
+ "flex min-h-8 cursor-pointer items-center rounded-sm px-2.5 py-1.75 text-left text-md text-ink transition-colors pointer-coarse:min-h-touch",
3334
+ I === O && "bg-hover",
3335
+ w && "bg-accent-soft text-accent-ink",
3336
+ A.disabled && "cursor-not-allowed opacity-45"
3337
+ ),
3338
+ onMouseDown: (D) => D.preventDefault(),
3339
+ onPointerEnter: () => {
3340
+ A.disabled || K(I);
3341
+ },
3342
+ onClick: () => se(A),
3343
+ children: /* @__PURE__ */ o("span", { className: "truncate", children: A.label })
3344
+ },
3345
+ A.key
3346
+ )
3347
+ );
3348
+ })
3349
+ }
3350
+ ),
3351
+ T != null ? /* @__PURE__ */ o("div", { className: "mt-1 border-t border-line px-2.5 pt-1.5 pb-0.5 text-xs text-faint wrap-anywhere", children: T }) : null
3352
+ ]
3353
+ }
3354
+ ),
3355
+ document.body
3356
+ ) : null
3357
+ ] });
3358
+ });
3359
+ Ae(function({ invalid: n, className: t, "aria-invalid": r, ...s }, a) {
3360
+ return /* @__PURE__ */ o(
3361
+ "textarea",
3362
+ {
3363
+ ...s,
3364
+ ref: a,
3365
+ "aria-invalid": n ? !0 : r,
3366
+ className: Z(Qe, n && Xe, t)
3367
+ }
3368
+ );
3369
+ });
3370
+ const vt = {
3371
+ wide: "max-wide:hidden",
3372
+ compact: "max-compact:hidden"
3373
+ };
3374
+ function Vt({
3375
+ columns: e,
3376
+ rows: n,
3377
+ rowKey: t,
3378
+ activeKey: r,
3379
+ className: s,
3380
+ stickyHeader: a = !1,
3381
+ sort: l,
3382
+ onSortChange: u
3383
+ }) {
3384
+ return /* @__PURE__ */ x(
3385
+ "table",
3386
+ {
3387
+ className: Z(
3388
+ "w-full rounded-md border-separate border-spacing-y-px bg-bg text-md dark:bg-deep",
3389
+ s
3390
+ ),
3391
+ children: [
3392
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o("tr", { children: e.map((d) => {
3393
+ const i = d.sortable && l?.key === d.key && l.direction === "asc", v = d.sortable && l?.key === d.key && l.direction === "desc";
3394
+ return /* @__PURE__ */ o(
3395
+ "th",
3396
+ {
3397
+ scope: "col",
3398
+ "aria-sort": d.sortable ? i ? "ascending" : v ? "descending" : "none" : void 0,
3399
+ className: Z(
3400
+ "h-10 bg-sunken px-2.5 py-2 text-left align-middle font-mono text-xs font-medium tracking-wide text-faint uppercase wrap-anywhere dark:bg-raised max-compact:px-1.5 first:rounded-tl-md last:rounded-tr-md",
3401
+ a && "sticky top-0 z-1",
3402
+ d.hide && vt[d.hide]
3403
+ ),
3404
+ children: d.headerFilter ? d.headerFilter(d.header) : d.sortable ? /* @__PURE__ */ x(
3405
+ "button",
3406
+ {
3407
+ type: "button",
3408
+ onClick: () => u?.(d.key),
3409
+ className: "inline-flex cursor-pointer items-center gap-1 bg-transparent p-0 text-left font-mono text-xs font-medium tracking-wide uppercase text-inherit hover:text-ink",
3410
+ children: [
3411
+ d.header,
3412
+ /* @__PURE__ */ x("span", { "aria-hidden": "true", className: "inline-flex flex-none items-center gap-0.5", children: [
3413
+ /* @__PURE__ */ o("span", { className: i ? "text-accent" : "text-faint", children: "↑" }),
3414
+ /* @__PURE__ */ o("span", { className: v ? "text-accent" : "text-faint", children: "↓" })
3415
+ ] })
3416
+ ]
3417
+ }
3418
+ ) : d.header
3419
+ },
3420
+ d.key
3421
+ );
3422
+ }) }) }),
3423
+ /* @__PURE__ */ o("tbody", { children: n.map((d, i) => {
3424
+ const v = t(d), y = i === n.length - 1;
3425
+ return /* @__PURE__ */ o(
3426
+ "tr",
3427
+ {
3428
+ "data-active": v === r || void 0,
3429
+ className: "group data-[active=true]:text-accent-ink",
3430
+ children: e.map((z, T) => /* @__PURE__ */ o(
3431
+ "td",
3432
+ {
3433
+ className: Z(
3434
+ "h-10 bg-raised px-2.5 py-2 align-middle wrap-anywhere group-hover:bg-hover group-data-[active=true]:bg-accent-soft dark:bg-sunken max-compact:px-1.5",
3435
+ T === 0 && y && "rounded-bl-md",
3436
+ T === e.length - 1 && y && "rounded-br-md",
3437
+ T === e.length - 1 && "whitespace-nowrap max-wide:whitespace-normal",
3438
+ z.hide && vt[z.hide],
3439
+ z.cellClassName
3440
+ ),
3441
+ children: z.cell(d)
3442
+ },
3443
+ z.key
3444
+ ))
3445
+ },
3446
+ v
3447
+ );
3448
+ }) })
3449
+ ]
3450
+ }
3451
+ );
3452
+ }
3453
+ function He({ title: e, subtitle: n, children: t, className: r }) {
3454
+ return /* @__PURE__ */ x(
3455
+ "div",
3456
+ {
3457
+ className: Z(
3458
+ "mx-auto flex w-full max-w-[var(--content-max)] flex-col p-6 pb-10 max-compact:px-3 max-compact:pt-4 max-compact:pb-7",
3459
+ r
3460
+ ),
3461
+ children: [
3462
+ /* @__PURE__ */ x("header", { className: "flex flex-col gap-2.5", children: [
3463
+ /* @__PURE__ */ o("h1", { className: "font-serif text-title font-semibold leading-tight tracking-wide text-ink", children: e }),
3464
+ n != null && n !== "" ? /* @__PURE__ */ o("p", { className: "max-w-prose text-md leading-normal text-muted", children: n }) : null
3465
+ ] }),
3466
+ /* @__PURE__ */ o("div", { className: "mt-5 flex flex-col gap-5", children: t })
3467
+ ]
3468
+ }
3469
+ );
3470
+ }
3471
+ Ae(function({ value: n, onChange: t, placeholder: r, ariaLabel: s, className: a }, l) {
3472
+ return /* @__PURE__ */ o(
3473
+ "input",
3474
+ {
3475
+ ref: l,
3476
+ className: Z(
3477
+ "h-control w-full min-w-0 rounded-sm border-0 bg-sunken px-3 text-sm text-ink shadow-elev-inset transition-colors placeholder:text-faint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface",
3478
+ a
3479
+ ),
3480
+ type: "search",
3481
+ value: n,
3482
+ onChange: (u) => t(u.target.value),
3483
+ placeholder: r,
3484
+ "aria-label": s,
3485
+ spellCheck: !1
3486
+ }
3487
+ );
3488
+ });
3489
+ const ue = Ae(function({ title: n, description: t, actions: r, titleAs: s = "h2", className: a, children: l, ...u }, d) {
3490
+ const i = s, v = n != null || t != null || r != null;
3491
+ return /* @__PURE__ */ x(
3492
+ "section",
3493
+ {
3494
+ ref: d,
3495
+ ...u,
3496
+ className: Z(
3497
+ "rounded-md bg-raised px-4.5 py-4 shadow-elev-1 max-compact:px-4 forced-colors:border",
3498
+ a
3499
+ ),
3500
+ children: [
3501
+ v ? /* @__PURE__ */ x("div", { className: "flex flex-wrap items-center gap-2.5", children: [
3502
+ n != null || t != null ? /* @__PURE__ */ x("div", { className: "min-w-0", children: [
3503
+ n != null ? /* @__PURE__ */ o(i, { className: "text-md font-semibold text-ink", children: n }) : null,
3504
+ t != null ? /* @__PURE__ */ o("p", { className: "mt-1.5 max-w-prose text-md text-muted", children: t }) : null
3505
+ ] }) : null,
3506
+ r
3507
+ ] }) : null,
3508
+ l != null ? /* @__PURE__ */ o("div", { className: v ? "mt-2.5" : void 0, children: l }) : null
3509
+ ]
3510
+ }
3511
+ );
3512
+ });
3513
+ function Oe(e) {
3514
+ return e.status === "ready" || e.status === "revalidating" || e.status === "stale";
3515
+ }
3516
+ function io(e) {
3517
+ return e instanceof Error ? e : new Error(String(e));
3518
+ }
3519
+ function co() {
3520
+ return typeof window > "u" ? void 0 : window;
3521
+ }
3522
+ function mo() {
3523
+ return typeof document > "u" ? void 0 : document;
3524
+ }
3525
+ function Ht({
3526
+ load: e,
3527
+ queryKey: n,
3528
+ intervalMs: t,
3529
+ refreshKey: r = 0,
3530
+ pauseWhenHidden: s = !0,
3531
+ enabled: a = !0
3532
+ }) {
3533
+ const [l, u] = C({ status: "loading" }), d = oe(0), i = oe(!1), v = oe(!0), y = oe(void 0), z = oe(e);
3534
+ z.current = e;
3535
+ const T = oe(a);
3536
+ T.current = a;
3537
+ const W = JSON.stringify(n ?? []);
3538
+ me(() => (v.current = !0, () => {
3539
+ v.current = !1;
3540
+ }), []);
3541
+ const P = De(() => {
3542
+ if (!T.current || i.current) return;
3543
+ const N = ++d.current;
3544
+ i.current = !0, u(
3545
+ (M) => Oe(M) ? { status: "revalidating", data: M.data, updatedAt: M.updatedAt } : { status: "loading" }
3546
+ ), z.current().then(
3547
+ (M) => {
3548
+ !v.current || N !== d.current || (i.current = !1, u({ status: "ready", data: M, updatedAt: Date.now() }));
3549
+ },
3550
+ (M) => {
3551
+ if (!v.current || N !== d.current) return;
3552
+ i.current = !1;
3553
+ const g = io(M);
3554
+ u(
3555
+ (k) => Oe(k) ? { status: "stale", data: k.data, updatedAt: k.updatedAt, error: g } : { status: "error", error: g }
3556
+ );
3557
+ }
3558
+ );
3559
+ }, []), R = De(() => {
3560
+ P();
3561
+ }, [P]);
3562
+ me(() => {
3563
+ d.current += 1, i.current = !1, u({ status: "loading" }), a && P();
3564
+ }, [a, W, P]);
3565
+ const H = oe(r);
3566
+ return me(() => {
3567
+ H.current !== r && (H.current = r, P());
3568
+ }, [r, P]), me(() => {
3569
+ const N = co(), M = mo();
3570
+ if (!a || t === void 0 || t <= 0 || !N?.setInterval) return;
3571
+ const g = () => {
3572
+ N.clearInterval?.(y.current), y.current = N.setInterval?.(P, t);
3573
+ }, k = () => {
3574
+ N.clearInterval?.(y.current), y.current = void 0;
3575
+ };
3576
+ if (!s || !M?.addEventListener)
3577
+ return g(), k;
3578
+ M.visibilityState !== "hidden" && g();
3579
+ const F = () => {
3580
+ k(), M.visibilityState !== "hidden" && (P(), g());
3581
+ };
3582
+ return M.addEventListener("visibilitychange", F), () => {
3583
+ M.removeEventListener?.("visibilitychange", F), k();
3584
+ };
3585
+ }, [a, t, s, P]), {
3586
+ data: Oe(l) ? l.data : void 0,
3587
+ error: l.status === "error" || l.status === "stale" ? l.error : void 0,
3588
+ isLoading: l.status === "loading",
3589
+ isRefreshing: l.status === "revalidating",
3590
+ updatedAt: Oe(l) ? l.updatedAt : void 0,
3591
+ reload: R
3592
+ };
3593
+ }
3594
+ function $e(e) {
3595
+ return e instanceof Error ? e : new Error(String(e));
3596
+ }
3597
+ function jt({ label: e }) {
3598
+ return /* @__PURE__ */ o("p", { className: "py-6 text-md text-muted", "aria-live": "polite", children: e });
3599
+ }
3600
+ function Wt({ title: e, description: n }) {
3601
+ return /* @__PURE__ */ o(ue, { title: e, description: n });
3602
+ }
3603
+ function Ft({
3604
+ error: e,
3605
+ onRetry: n,
3606
+ title: t,
3607
+ retryLabel: r
3608
+ }) {
3609
+ return /* @__PURE__ */ o(
3610
+ ue,
3611
+ {
3612
+ title: t,
3613
+ description: e.message,
3614
+ actions: /* @__PURE__ */ o(q, { variant: "primary", onClick: n, children: r })
3615
+ }
3616
+ );
3617
+ }
3618
+ function _t({ label: e }) {
3619
+ return /* @__PURE__ */ o(
3620
+ "span",
3621
+ {
3622
+ className: "ml-auto font-mono text-2xs uppercase tracking-widest text-faint",
3623
+ "aria-live": "polite",
3624
+ children: e
3625
+ }
3626
+ );
3627
+ }
3628
+ function Gt({
3629
+ message: e,
3630
+ onRetry: n,
3631
+ retryLabel: t
3632
+ }) {
3633
+ return /* @__PURE__ */ x("div", { className: "flex flex-wrap items-center gap-2 text-sm text-warn", role: "status", children: [
3634
+ /* @__PURE__ */ o("span", { children: e }),
3635
+ /* @__PURE__ */ o(q, { size: "small", onClick: n, children: t })
3636
+ ] });
3637
+ }
3638
+ function Bt(e) {
3639
+ if (typeof e != "number" || !Number.isFinite(e)) return "—";
3640
+ const n = new Date(e);
3641
+ return Number.isFinite(n.getTime()) ? n.toISOString() : "—";
3642
+ }
3643
+ function qt({ notice: e, t: n }) {
3644
+ return e === null ? null : e.kind === "saved" ? /* @__PURE__ */ o("p", { role: "status", className: "text-sm text-success", children: n("common.saved") }) : /* @__PURE__ */ o("p", { role: "alert", className: "text-sm text-danger wrap-anywhere", children: e.text });
3645
+ }
3646
+ function Jt({
3647
+ question: e,
3648
+ busy: n,
3649
+ onConfirm: t,
3650
+ onCancel: r,
3651
+ t: s
3652
+ }) {
3653
+ return /* @__PURE__ */ x("span", { className: "inline-flex flex-wrap items-center gap-1.5", children: [
3654
+ /* @__PURE__ */ o("span", { className: "text-xs text-danger", children: e }),
3655
+ /* @__PURE__ */ o(q, { size: "small", variant: "danger", disabled: n, onClick: t, children: s("common.confirmDelete") }),
3656
+ /* @__PURE__ */ o(q, { size: "small", disabled: n, onClick: r, children: s("common.cancel") })
3657
+ ] });
3658
+ }
3659
+ const uo = 15e3;
3660
+ function fo({ client: e, refreshKey: n, t }) {
3661
+ const r = Ht({
3662
+ load: () => e.call("credentials_list"),
3663
+ intervalMs: uo,
3664
+ refreshKey: n
3665
+ }), [s, a] = C(null), [l, u] = C(!1), [d, i] = C(null), [v, y] = C(""), [z, T] = C(null);
3666
+ async function W(g) {
3667
+ u(!0), a(null);
3668
+ try {
3669
+ return await g(), r.reload(), a({ kind: "saved" }), !0;
3670
+ } catch (k) {
3671
+ return a({ kind: "error", text: $e(k).message }), !1;
3672
+ } finally {
3673
+ u(!1);
3674
+ }
3675
+ }
3676
+ async function P() {
3677
+ if (d === null) return;
3678
+ const g = d.id.trim();
3679
+ if (g === "") {
3680
+ a({ kind: "error", text: t("credentials.form.needId") });
3681
+ return;
3682
+ }
3683
+ const k = d.baseUrl.trim();
3684
+ if (k === "") {
3685
+ a({ kind: "error", text: t("credentials.form.needBaseUrl") });
3686
+ return;
3687
+ }
3688
+ if (!d.editing && v === "") {
3689
+ a({ kind: "error", text: t("credentials.form.needValue") });
3690
+ return;
3691
+ }
3692
+ const F = v;
3693
+ y("");
3694
+ const E = d.apiKeyEnv.trim();
3695
+ await W(
3696
+ () => e.call("credential_set", {
3697
+ id: g,
3698
+ baseUrl: k,
3699
+ ...F !== "" ? { apiKey: F } : {},
3700
+ ...E !== "" ? { apiKeyEnv: E } : {}
3701
+ })
3702
+ ) && i(null);
3703
+ }
3704
+ async function R(g) {
3705
+ await W(() => e.call("credential_remove", { id: g })) && T(null);
3706
+ }
3707
+ function H(g) {
3708
+ i(
3709
+ g === null ? { id: "", editing: !1, baseUrl: "", apiKeyEnv: "" } : {
3710
+ id: g.id,
3711
+ editing: !0,
3712
+ baseUrl: g.baseUrl ?? "",
3713
+ apiKeyEnv: g.apiKeyEnv ?? ""
3714
+ }
3715
+ ), y(""), a(null);
3716
+ }
3717
+ const N = r.data;
3718
+ if (N === void 0)
3719
+ return /* @__PURE__ */ x(He, { title: t("credentials.title"), subtitle: t("credentials.subtitle"), children: [
3720
+ r.isLoading ? /* @__PURE__ */ o(jt, { label: t("common.loading") }) : null,
3721
+ r.error !== void 0 ? /* @__PURE__ */ o(
3722
+ Ft,
3723
+ {
3724
+ error: r.error,
3725
+ onRetry: r.reload,
3726
+ title: t("common.loadError"),
3727
+ retryLabel: t("common.retry")
3728
+ }
3729
+ ) : null
3730
+ ] });
3731
+ const M = [
3732
+ {
3733
+ key: "id",
3734
+ header: t("credentials.th.id"),
3735
+ cell: (g) => /* @__PURE__ */ o("span", { className: "font-mono text-xs", children: g.id })
3736
+ },
3737
+ {
3738
+ key: "baseUrl",
3739
+ header: t("credentials.th.baseUrl"),
3740
+ cell: (g) => /* @__PURE__ */ o("span", { className: "font-mono text-xs wrap-anywhere", children: g.baseUrl ?? "—" })
3741
+ },
3742
+ {
3743
+ key: "hasValue",
3744
+ header: t("credentials.th.hasValue"),
3745
+ cell: (g) => g.hasValue ? /* @__PURE__ */ o(we, { tone: "success", children: t("credentials.valueSet") }) : /* @__PURE__ */ o(we, { tone: "warn", children: t("credentials.valueMissing") })
3746
+ },
3747
+ {
3748
+ key: "updatedAt",
3749
+ header: t("credentials.th.updatedAt"),
3750
+ hide: "compact",
3751
+ cell: (g) => /* @__PURE__ */ o("span", { className: "font-mono text-xs", children: g.updatedAt ?? "—" })
3752
+ },
3753
+ {
3754
+ key: "usedBy",
3755
+ header: t("credentials.th.usedBy"),
3756
+ cell: (g) => g.usedBy.length === 0 ? /* @__PURE__ */ o("span", { className: "text-xs text-faint", children: t("credentials.unused") }) : /* @__PURE__ */ o("span", { className: "inline-flex flex-wrap gap-1", children: g.usedBy.map((k) => /* @__PURE__ */ o(we, { tone: "accent", children: k }, k)) })
3757
+ },
3758
+ {
3759
+ key: "actions",
3760
+ header: t("common.actions"),
3761
+ cell: (g) => z === g.id ? /* @__PURE__ */ o(
3762
+ Jt,
3763
+ {
3764
+ question: t("credentials.deleteConfirm", { id: g.id }),
3765
+ busy: l,
3766
+ t,
3767
+ onConfirm: () => {
3768
+ R(g.id);
3769
+ },
3770
+ onCancel: () => T(null)
3771
+ }
3772
+ ) : /* @__PURE__ */ x("span", { className: "inline-flex flex-wrap items-center gap-1.5", children: [
3773
+ /* @__PURE__ */ o(q, { size: "small", disabled: l, onClick: () => H(g), children: t("credentials.rotate") }),
3774
+ /* @__PURE__ */ o(
3775
+ q,
3776
+ {
3777
+ size: "small",
3778
+ variant: "dangerGhost",
3779
+ disabled: l,
3780
+ onClick: () => T(g.id),
3781
+ children: t("common.delete")
3782
+ }
3783
+ )
3784
+ ] })
3785
+ }
3786
+ ];
3787
+ return /* @__PURE__ */ x(He, { title: t("credentials.title"), subtitle: t("credentials.subtitle"), children: [
3788
+ /* @__PURE__ */ o(qt, { notice: s, t }),
3789
+ r.error !== void 0 ? /* @__PURE__ */ o(
3790
+ Gt,
3791
+ {
3792
+ message: t("common.stale", { time: Bt(r.updatedAt) }),
3793
+ onRetry: r.reload,
3794
+ retryLabel: t("common.retry")
3795
+ }
3796
+ ) : null,
3797
+ d !== null ? /* @__PURE__ */ o(
3798
+ ue,
3799
+ {
3800
+ title: d.editing ? t("credentials.form.editTitle", { id: d.id }) : t("credentials.form.addTitle"),
3801
+ children: /* @__PURE__ */ x(
3802
+ "form",
3803
+ {
3804
+ className: "flex flex-col gap-4",
3805
+ onSubmit: (g) => {
3806
+ g.preventDefault(), P();
3807
+ },
3808
+ children: [
3809
+ /* @__PURE__ */ x("div", { className: "grid gap-4 compact:grid-cols-2", children: [
3810
+ /* @__PURE__ */ o(V, { label: t("credentials.form.id"), hint: t("credentials.form.idHint"), required: !0, children: /* @__PURE__ */ o(
3811
+ B,
3812
+ {
3813
+ value: d.id,
3814
+ onChange: (g) => i(
3815
+ (k) => k === null ? null : { ...k, id: g.target.value }
3816
+ ),
3817
+ disabled: l || d.editing,
3818
+ placeholder: "soulkiller-gw",
3819
+ autoComplete: "off",
3820
+ spellCheck: !1
3821
+ }
3822
+ ) }),
3823
+ /* @__PURE__ */ o(
3824
+ V,
3825
+ {
3826
+ label: t("credentials.form.baseUrl"),
3827
+ hint: t("credentials.form.baseUrlHint"),
3828
+ required: !0,
3829
+ children: /* @__PURE__ */ o(
3830
+ B,
3831
+ {
3832
+ value: d.baseUrl,
3833
+ onChange: (g) => i(
3834
+ (k) => k === null ? null : { ...k, baseUrl: g.target.value }
3835
+ ),
3836
+ disabled: l,
3837
+ placeholder: "https://gw.example.com/v1",
3838
+ autoComplete: "off",
3839
+ spellCheck: !1
3840
+ }
3841
+ )
3842
+ }
3843
+ ),
3844
+ /* @__PURE__ */ o(
3845
+ V,
3846
+ {
3847
+ label: t("credentials.form.value"),
3848
+ hint: t("credentials.form.valueHint"),
3849
+ required: !d.editing,
3850
+ children: /* @__PURE__ */ o(
3851
+ B,
3852
+ {
3853
+ type: "password",
3854
+ autoComplete: "off",
3855
+ value: v,
3856
+ onChange: (g) => y(g.target.value),
3857
+ disabled: l,
3858
+ placeholder: d.editing ? t("credentials.form.valuePlaceholderEdit") : void 0
3859
+ }
3860
+ )
3861
+ }
3862
+ ),
3863
+ /* @__PURE__ */ o(
3864
+ V,
3865
+ {
3866
+ label: `${t("credentials.form.apiKeyEnv")} (${t("common.optional")})`,
3867
+ hint: t("credentials.form.apiKeyEnvHint"),
3868
+ children: /* @__PURE__ */ o(
3869
+ B,
3870
+ {
3871
+ value: d.apiKeyEnv,
3872
+ onChange: (g) => i(
3873
+ (k) => k === null ? null : { ...k, apiKeyEnv: g.target.value }
3874
+ ),
3875
+ disabled: l,
3876
+ placeholder: "DASHSCOPE_API_KEY",
3877
+ autoComplete: "off",
3878
+ spellCheck: !1
3879
+ }
3880
+ )
3881
+ }
3882
+ )
3883
+ ] }),
3884
+ /* @__PURE__ */ x("div", { className: "flex items-center gap-2", children: [
3885
+ /* @__PURE__ */ o(q, { type: "submit", variant: "primary", disabled: l, children: t("common.save") }),
3886
+ /* @__PURE__ */ o(
3887
+ q,
3888
+ {
3889
+ disabled: l,
3890
+ onClick: () => {
3891
+ i(null), y("");
3892
+ },
3893
+ children: t("common.cancel")
3894
+ }
3895
+ )
3896
+ ] })
3897
+ ]
3898
+ }
3899
+ )
3900
+ }
3901
+ ) : null,
3902
+ /* @__PURE__ */ o(
3903
+ ue,
3904
+ {
3905
+ title: t("credentials.title"),
3906
+ actions: /* @__PURE__ */ x("span", { className: "inline-flex items-center gap-1.5", children: [
3907
+ r.isRefreshing ? /* @__PURE__ */ o(_t, { label: t("common.updating") }) : null,
3908
+ /* @__PURE__ */ o(q, { size: "small", disabled: l, onClick: r.reload, children: t("common.refresh") }),
3909
+ /* @__PURE__ */ o(q, { size: "small", variant: "primary", disabled: l, onClick: () => H(null), children: t("credentials.add") })
3910
+ ] }),
3911
+ children: N.length === 0 ? /* @__PURE__ */ o(
3912
+ Wt,
3913
+ {
3914
+ title: t("credentials.empty.title"),
3915
+ description: t("credentials.empty.description")
3916
+ }
3917
+ ) : /* @__PURE__ */ o("div", { className: "overflow-hidden rounded-md", children: /* @__PURE__ */ o(Vt, { columns: M, rows: N, rowKey: (g) => g.id }) })
3918
+ }
3919
+ )
3920
+ ] });
3921
+ }
3922
+ const Kt = {
3923
+ "common.loading": "Loading…",
3924
+ "common.retry": "Retry",
3925
+ "common.refresh": "Refresh",
3926
+ "common.loadError": "Could not load this view",
3927
+ "common.updating": "Updating…",
3928
+ "common.stale": "Update failed; showing data from {time}.",
3929
+ "common.save": "Save",
3930
+ "common.cancel": "Cancel",
3931
+ "common.delete": "Delete",
3932
+ "common.confirmDelete": "Confirm delete",
3933
+ "common.edit": "Edit",
3934
+ "common.saved": "Saved. Applies to the next body/run.",
3935
+ "common.actions": "Actions",
3936
+ "common.optional": "optional",
3937
+ "common.advanced": "Advanced",
3938
+ "models.title": "Models",
3939
+ "models.subtitle": "Register model entries referencing a credential. Saves apply to the next body/run.",
3940
+ "models.section": "Model entries",
3941
+ "models.add": "Add model",
3942
+ "models.empty.title": "No registered models",
3943
+ "models.empty.description": "Create a credential first (Credentials page), then add a model entry referencing it. The legacy provider.* entry is synthesized automatically and shown read-only.",
3944
+ "models.th.id": "Entry key",
3945
+ "models.th.name": "Wire name",
3946
+ "models.th.alias": "Alias",
3947
+ "models.th.provider": "Provider",
3948
+ "models.th.mode": "Mode",
3949
+ "models.th.credential": "Credential",
3950
+ "models.th.pricing": "Pricing (in/out per 1M)",
3951
+ "models.legacyHint": "Legacy provider.* entry (read-only; edit it in the config file)",
3952
+ "models.inUse": "default",
3953
+ "models.test": "Test (real request · ~1 token)",
3954
+ "models.testRunning": "Testing…",
3955
+ "models.testHint": "Testing sends a real request to the credential endpoint with the stored credential: openai-compatible protocols list models; anthropic (or an explicit model) sends a minimal max_tokens=1 chat (~1 token cost). Never triggered automatically.",
3956
+ "models.testResult": "Connectivity test result",
3957
+ "models.testOk": "OK",
3958
+ "models.testFailed": "Failed",
3959
+ "models.latency": "Latency: {ms} ms",
3960
+ "models.testModels": "{n} model(s) returned",
3961
+ "models.deleteConfirm": 'Delete model "{id}"?',
3962
+ "models.migration.title": "One-shot migration report",
3963
+ "models.migration.split": "Credential splits: {n}",
3964
+ "models.migration.reRecord": "Credentials needing re-recording: {ids}",
3965
+ "models.migration.droppedAliases": "Dropped aliases (single-value rule): {ids}",
3966
+ "models.migration.unmatchedPricing": "Unmatched pricing keys (kept top-level): {ids}",
3967
+ "models.migration.pins": "Agent pins rewritten: {n}",
3968
+ "models.migration.pinsFailed": "Pin rewrite failed: {ids}",
3969
+ "models.form.addTitle": "Add model",
3970
+ "models.form.editTitle": 'Edit model "{id}"',
3971
+ "models.form.id": "Entry key",
3972
+ "models.form.idHint": "Unique ref key; a wire name may be used directly (a-z A-Z 0-9 . _ / -, up to 128 chars); cannot be renamed after save",
3973
+ "models.form.provider": "Provider (protocol)",
3974
+ "models.form.providerHint": "Protocol adapter, not a brand: openai / openai-compatible / anthropic / gemini, or a custom provider plugin factory name. Defaults to openai.",
3975
+ "models.form.name": "Model name (wire id)",
3976
+ "models.form.nameHint": "The model field sent to the endpoint; defaults to the entry key",
3977
+ "models.form.alias": "Alias",
3978
+ "models.form.aliasHint": "Flat unique ref (no /); must not collide with any entry key",
3979
+ "models.form.mode": "Request mode",
3980
+ "models.form.modeHint": "Wire request shape within the protocol; defaults by provider",
3981
+ "models.form.credential": "Credential",
3982
+ "models.form.credentialHint": "The endpoint travels with the credential (baseUrl + API key)",
3983
+ "models.form.credentialNone": "No credentials yet — create one first",
3984
+ "models.form.goCredentials": "Go to Credentials",
3985
+ "models.form.pricing": "Pricing (per 1M tokens)",
3986
+ "models.form.inputPrice": "Input price",
3987
+ "models.form.outputPrice": "Output price",
3988
+ "models.form.cacheReadPrice": "Cache read price",
3989
+ "models.form.cacheWritePrice": "Cache write price",
3990
+ "models.form.param": "Default request params",
3991
+ "models.form.temperature": "Temperature (0–2)",
3992
+ "models.form.maxTokens": "Max tokens",
3993
+ "models.form.topP": "Top P (0–1]",
3994
+ "models.form.promptCache": "Prompt cache",
3995
+ "models.form.cacheAuto": "auto (default)",
3996
+ "models.form.cacheOn": "Force on",
3997
+ "models.form.cacheOff": "Force off",
3998
+ "models.form.extra": "Extra body params (JSON object)",
3999
+ "models.form.info": "Metadata (display only)",
4000
+ "models.form.displayName": "Display name",
4001
+ "models.form.description": "Description",
4002
+ "models.form.contextWindow": "Context window",
4003
+ "models.form.maxOutputTokens": "Max output tokens",
4004
+ "models.form.capabilities": "Capabilities",
4005
+ "models.form.capVision": "vision",
4006
+ "models.form.capThinking": "thinking",
4007
+ "models.form.capTools": "tools",
4008
+ "models.form.infoJson": "Additional metadata (JSON object)",
4009
+ "models.form.needId": "Entry key is required",
4010
+ "models.form.needCredential": "Credential is required",
4011
+ "models.form.badJson": "{field} must be a JSON object",
4012
+ "models.form.badNumber": "{field} must be a number",
4013
+ "default.title": "Default model",
4014
+ "default.description": "models.default ref (alias or entry key); the VESSEL_MODEL environment variable takes precedence when set.",
4015
+ "default.current": "Effective",
4016
+ "default.none": "Unresolved (no default or invalid config)",
4017
+ "default.ref": "Default ref",
4018
+ "default.choose": "Choose a ref…",
4019
+ "default.save": "Set default",
4020
+ "default.legacy": "Legacy entry",
4021
+ "credentials.title": "Credentials",
4022
+ "credentials.subtitle": "Authentication endpoints (name + baseUrl + API key). Values are write-only and never echoed; the list shows metadata only. Create credentials first, then reference them from model entries.",
4023
+ "credentials.add": "Add credential",
4024
+ "credentials.rotate": "Edit",
4025
+ "credentials.th.id": "Name",
4026
+ "credentials.th.baseUrl": "Base URL",
4027
+ "credentials.th.hasValue": "Value",
4028
+ "credentials.th.updatedAt": "Updated",
4029
+ "credentials.th.usedBy": "Used by",
4030
+ "credentials.valueSet": "recorded",
4031
+ "credentials.valueMissing": "needs recording",
4032
+ "credentials.empty.title": "No credentials yet",
4033
+ "credentials.empty.description": "Create a credential (name + request URL + API key), then add models on the Models page.",
4034
+ "credentials.unused": "Not referenced",
4035
+ "credentials.form.addTitle": "Add credential",
4036
+ "credentials.form.editTitle": 'Edit credential "{id}"',
4037
+ "credentials.form.id": "Credential name",
4038
+ "credentials.form.idHint": "Letters, digits and hyphens (a-zA-Z0-9-, up to 64 chars); cannot be renamed after save",
4039
+ "credentials.form.baseUrl": "Request URL (baseUrl)",
4040
+ "credentials.form.baseUrlHint": "Required http(s) endpoint; models referencing this credential use it",
4041
+ "credentials.form.value": "API key",
4042
+ "credentials.form.valueHint": "Write-only input: never echoed or logged after submit; leave empty on edit to keep the current value.",
4043
+ "credentials.form.valuePlaceholderEdit": "Leave empty to keep the current value",
4044
+ "credentials.form.apiKeyEnv": "API key environment variable",
4045
+ "credentials.form.apiKeyEnvHint": "Optional alternative source; the stored value wins when both exist",
4046
+ "credentials.form.needId": "Credential name is required",
4047
+ "credentials.form.needBaseUrl": "Request URL is required",
4048
+ "credentials.form.needValue": "API key is required for a new credential",
4049
+ "credentials.deleteConfirm": 'Delete credential "{id}"?'
4050
+ }, po = {
4051
+ "common.loading": "加载中…",
4052
+ "common.retry": "重试",
4053
+ "common.refresh": "刷新",
4054
+ "common.loadError": "无法加载此视图",
4055
+ "common.updating": "更新中…",
4056
+ "common.stale": "更新失败,显示 {time} 的数据。",
4057
+ "common.save": "保存",
4058
+ "common.cancel": "取消",
4059
+ "common.delete": "删除",
4060
+ "common.confirmDelete": "确认删除",
4061
+ "common.edit": "编辑",
4062
+ "common.saved": "已保存,下一具 body/run 生效",
4063
+ "common.actions": "操作",
4064
+ "common.optional": "可选",
4065
+ "common.advanced": "高级",
4066
+ "models.title": "模型",
4067
+ "models.subtitle": "注册引用凭证的模型条目;保存后下一具 body/run 生效。",
4068
+ "models.section": "模型条目",
4069
+ "models.add": "添加模型",
4070
+ "models.empty.title": "暂无注册模型",
4071
+ "models.empty.description": "先在「凭证」页创建凭证,再添加引用它的模型条目。legacy provider.* 条目会自动合成,只读显示。",
4072
+ "models.th.id": "条目键",
4073
+ "models.th.name": "wire 名",
4074
+ "models.th.alias": "别称",
4075
+ "models.th.provider": "协议",
4076
+ "models.th.mode": "模式",
4077
+ "models.th.credential": "凭证",
4078
+ "models.th.pricing": "价格(输入/输出 每百万)",
4079
+ "models.legacyHint": "legacy provider.* 兼容条目(只读;请在配置文件中修改)",
4080
+ "models.inUse": "默认",
4081
+ "models.test": "测试(真实请求 · ~1 token)",
4082
+ "models.testRunning": "测试中…",
4083
+ "models.testHint": "测试会用已存凭证向凭证端点发真实请求:openai 系协议查询模型列表;anthropic(或指定模型)发 max_tokens=1 的最小请求(1 token 级成本)。绝不自动触发。",
4084
+ "models.testResult": "连通性测试结果",
4085
+ "models.testOk": "连通",
4086
+ "models.testFailed": "失败",
4087
+ "models.latency": "耗时:{ms} ms",
4088
+ "models.testModels": "返回 {n} 个模型",
4089
+ "models.deleteConfirm": "确认删除模型「{id}」?",
4090
+ "models.migration.title": "一次性迁移报告",
4091
+ "models.migration.split": "凭证拆分:{n}",
4092
+ "models.migration.reRecord": "需重录的凭证:{ids}",
4093
+ "models.migration.droppedAliases": "被丢弃的别称(单值规则):{ids}",
4094
+ "models.migration.unmatchedPricing": "未匹配的价格键(留顶层兜底):{ids}",
4095
+ "models.migration.pins": "已改写的 agent pin:{n}",
4096
+ "models.migration.pinsFailed": "pin 改写失败:{ids}",
4097
+ "models.form.addTitle": "添加模型",
4098
+ "models.form.editTitle": "编辑模型「{id}」",
4099
+ "models.form.id": "条目键",
4100
+ "models.form.idHint": "唯一 ref 键;可直接用 wire 名(a-z A-Z 0-9 . _ / -,≤128 字符);保存后不可改名",
4101
+ "models.form.provider": "协议类型(provider)",
4102
+ "models.form.providerHint": "协议适配器,非品牌:openai / openai-compatible / anthropic / gemini,或自定义 provider 插件工厂名。缺省 openai。",
4103
+ "models.form.name": "模型名称(wire id)",
4104
+ "models.form.nameHint": "发给端点的 model 字段;缺省 = 条目键",
4105
+ "models.form.alias": "模型别称",
4106
+ "models.form.aliasHint": "扁平唯一 ref(不含 /);不得与任何条目键重合",
4107
+ "models.form.mode": "请求模式",
4108
+ "models.form.modeHint": "协议内的 wire 请求形状;缺省按协议推导",
4109
+ "models.form.credential": "访问凭证",
4110
+ "models.form.credentialHint": "端点随凭证走(baseUrl + API key)",
4111
+ "models.form.credentialNone": "暂无凭证——请先创建",
4112
+ "models.form.goCredentials": "去创建凭证",
4113
+ "models.form.pricing": "价格(每百万 token)",
4114
+ "models.form.inputPrice": "输入价格",
4115
+ "models.form.outputPrice": "输出价格",
4116
+ "models.form.cacheReadPrice": "缓存读取价格",
4117
+ "models.form.cacheWritePrice": "缓存写入价格",
4118
+ "models.form.param": "缺省请求参数",
4119
+ "models.form.temperature": "Temperature(0–2)",
4120
+ "models.form.maxTokens": "Max tokens",
4121
+ "models.form.topP": "Top P(0–1]",
4122
+ "models.form.promptCache": "Prompt 缓存",
4123
+ "models.form.cacheAuto": "auto(默认)",
4124
+ "models.form.cacheOn": "强开",
4125
+ "models.form.cacheOff": "强关",
4126
+ "models.form.extra": "额外请求体参数(JSON 对象)",
4127
+ "models.form.info": "元数据(仅展示)",
4128
+ "models.form.displayName": "展示名",
4129
+ "models.form.description": "描述",
4130
+ "models.form.contextWindow": "上下文窗口",
4131
+ "models.form.maxOutputTokens": "最大输出 token",
4132
+ "models.form.capabilities": "能力",
4133
+ "models.form.capVision": "视觉",
4134
+ "models.form.capThinking": "思考",
4135
+ "models.form.capTools": "工具",
4136
+ "models.form.infoJson": "附加元数据(JSON 对象)",
4137
+ "models.form.needId": "条目键不能为空",
4138
+ "models.form.needCredential": "访问凭证不能为空",
4139
+ "models.form.badJson": "{field} 必须是 JSON 对象",
4140
+ "models.form.badNumber": "{field} 必须是数字",
4141
+ "default.title": "默认模型",
4142
+ "default.description": "models.default ref(别称或条目键);VESSEL_MODEL 环境变量非空时优先。",
4143
+ "default.current": "当前生效",
4144
+ "default.none": "未解析(无默认或配置无效)",
4145
+ "default.ref": "默认 ref",
4146
+ "default.choose": "选择 ref…",
4147
+ "default.save": "设为默认",
4148
+ "default.legacy": "legacy 条目",
4149
+ "credentials.title": "凭证",
4150
+ "credentials.subtitle": "认证端点(名称 + baseUrl + API key)。值只写不回显;列表只有元数据。先创建凭证,再在模型条目里引用。",
4151
+ "credentials.add": "添加凭证",
4152
+ "credentials.rotate": "编辑",
4153
+ "credentials.th.id": "名称",
4154
+ "credentials.th.baseUrl": "请求地址",
4155
+ "credentials.th.hasValue": "值",
4156
+ "credentials.th.updatedAt": "更新时间",
4157
+ "credentials.th.usedBy": "被引用",
4158
+ "credentials.valueSet": "已录",
4159
+ "credentials.valueMissing": "需录值",
4160
+ "credentials.empty.title": "暂无凭证",
4161
+ "credentials.empty.description": "创建凭证(名称 + 请求地址 + API key),再到「模型」页添加模型。",
4162
+ "credentials.unused": "未被引用",
4163
+ "credentials.form.addTitle": "添加凭证",
4164
+ "credentials.form.editTitle": "编辑凭证「{id}」",
4165
+ "credentials.form.id": "凭证名称",
4166
+ "credentials.form.idHint": "字母、数字、连字符(a-zA-Z0-9-,≤64 字符);保存后不可改名",
4167
+ "credentials.form.baseUrl": "请求地址(baseUrl)",
4168
+ "credentials.form.baseUrlHint": "必填 http(s) 端点;引用此凭证的模型都用它",
4169
+ "credentials.form.value": "API key",
4170
+ "credentials.form.valueHint": "只写输入:提交后不回显、不记录;编辑时留空 = 不改值。",
4171
+ "credentials.form.valuePlaceholderEdit": "留空 = 不改当前值",
4172
+ "credentials.form.apiKeyEnv": "API key 环境变量",
4173
+ "credentials.form.apiKeyEnvHint": "可选替代来源;两者并存时库值优先",
4174
+ "credentials.form.needId": "凭证名称不能为空",
4175
+ "credentials.form.needBaseUrl": "请求地址不能为空",
4176
+ "credentials.form.needValue": "新建凭证必须填 API key",
4177
+ "credentials.deleteConfirm": "确认删除凭证「{id}」?"
4178
+ };
4179
+ function ho(e) {
4180
+ return e?.trim().toLowerCase().startsWith("zh") === !0 ? "zh-CN" : "en";
4181
+ }
4182
+ function go(e, n) {
4183
+ if (n === void 0) return e;
4184
+ let t = e;
4185
+ for (const [r, s] of Object.entries(n))
4186
+ t = t.split(`{${r}}`).join(String(s));
4187
+ return t;
4188
+ }
4189
+ function $t(e) {
4190
+ const n = bo[ho(e)];
4191
+ return (t, r) => go(n[t] ?? Kt[t] ?? t, r);
4192
+ }
4193
+ const bo = {
4194
+ en: Kt,
4195
+ "zh-CN": po
4196
+ }, xo = ["openai", "openai-compatible", "anthropic", "gemini"];
4197
+ function Je(e) {
4198
+ return e === "anthropic" ? "messages" : "chat";
4199
+ }
4200
+ function vo(e) {
4201
+ return e === "anthropic" ? ["messages"] : ["chat"];
4202
+ }
4203
+ function ce(e) {
4204
+ const n = e.trim();
4205
+ if (n === "") return;
4206
+ const t = Number(n);
4207
+ return Number.isFinite(t) ? t : void 0;
4208
+ }
4209
+ function yo({ initial: e, credentials: n, busy: t, t: r, onSave: s, onCancel: a }) {
4210
+ const l = e !== void 0, [u, d] = C(e?.id ?? ""), [i, v] = C(e?.provider ?? "openai"), [y, z] = C(
4211
+ e !== void 0 && e.name !== e.id ? e.name : ""
4212
+ ), [T, W] = C(e?.alias ?? ""), [P, R] = C(e?.mode ?? Je(e?.provider ?? "openai")), [H, N] = C(e?.credential ?? ""), [M, g] = C(null), k = e?.pricing, [F, E] = C(k?.inputPerMillion?.toString() ?? ""), [f, O] = C(k?.outputPerMillion?.toString() ?? ""), [K, J] = C(k?.cacheReadPerMillion?.toString() ?? ""), [j, Y] = C(k?.cacheWritePerMillion?.toString() ?? ""), G = e?.param, [c, L] = C(G?.temperature?.toString() ?? ""), [$, ee] = C(G?.maxTokens?.toString() ?? ""), [se, b] = C(G?.topP?.toString() ?? ""), [ae, Ne] = C(
4213
+ G?.promptCache === void 0 ? "auto" : G.promptCache ? "on" : "off"
4214
+ ), [A, I] = C(
4215
+ G?.extra !== void 0 ? JSON.stringify(G.extra, null, 2) : ""
4216
+ ), w = e?.info, [D, ne] = C(
4217
+ typeof w?.displayName == "string" ? w.displayName : ""
4218
+ ), [ie, U] = C(
4219
+ typeof w?.description == "string" ? w.description : ""
4220
+ ), [fe, pe] = C(w?.contextWindow?.toString() ?? ""), [te, he] = C(w?.maxOutputTokens?.toString() ?? ""), [Q, Se] = C(w?.capabilities?.vision === !0), [Pe, Ee] = C(w?.capabilities?.thinking === !0), [re, Qt] = C(w?.capabilities?.tools === !0), Xt = /* @__PURE__ */ new Set([
4221
+ "displayName",
4222
+ "description",
4223
+ "contextWindow",
4224
+ "maxOutputTokens",
4225
+ "capabilities"
4226
+ ]), je = {};
4227
+ for (const [m, ge] of Object.entries(w ?? {}))
4228
+ Xt.has(m) || (je[m] = ge);
4229
+ const [et, er] = C(
4230
+ Object.keys(je).length > 0 ? JSON.stringify(je, null, 2) : ""
4231
+ ), We = [...xo];
4232
+ We.includes(i) || We.push(i);
4233
+ function tr(m) {
4234
+ v(m), R(Je(m));
4235
+ }
4236
+ function tt(m, ge) {
4237
+ const ze = m.trim();
4238
+ if (ze !== "")
4239
+ try {
4240
+ const X = JSON.parse(ze);
4241
+ return typeof X != "object" || X === null || Array.isArray(X) ? (g(r("models.form.badJson", { field: ge })), null) : X;
4242
+ } catch {
4243
+ return g(r("models.form.badJson", { field: ge })), null;
4244
+ }
4245
+ }
4246
+ function rr() {
4247
+ g(null);
4248
+ const m = u.trim();
4249
+ if (m === "") {
4250
+ g(r("models.form.needId"));
4251
+ return;
4252
+ }
4253
+ if (H === "") {
4254
+ g(r("models.form.needCredential"));
4255
+ return;
4256
+ }
4257
+ const ge = tt(A, r("models.form.extra"));
4258
+ if (ge === null) return;
4259
+ const ze = tt(et, r("models.form.infoJson"));
4260
+ if (ze === null) return;
4261
+ const X = { credential: H }, Fe = y.trim();
4262
+ Fe !== "" && Fe !== m && (X.name = Fe);
4263
+ const rt = T.trim();
4264
+ rt !== "" && (X.alias = rt), i !== "openai" && (X.provider = i), P !== Je(i) && (X.mode = P);
4265
+ const _e = ce(F), Ge = ce(f);
4266
+ if (_e !== void 0 || Ge !== void 0) {
4267
+ if (_e === void 0 || Ge === void 0) {
4268
+ g(r("models.form.badNumber", { field: r("models.form.pricing") }));
4269
+ return;
4270
+ }
4271
+ const Be = { inputPerMillion: _e, outputPerMillion: Ge }, it = ce(K), dt = ce(j);
4272
+ it !== void 0 && (Be.cacheReadPerMillion = it), dt !== void 0 && (Be.cacheWritePerMillion = dt), X.pricing = Be;
4273
+ }
4274
+ const ve = {}, ot = ce(c), nt = ce($), lt = ce(se);
4275
+ ot !== void 0 && (ve.temperature = ot), nt !== void 0 && (ve.maxTokens = nt), lt !== void 0 && (ve.topP = lt), ae !== "auto" && (ve.promptCache = ae === "on"), ge !== void 0 && (ve.extra = ge), Object.keys(ve).length > 0 && (X.param = ve);
4276
+ const ye = { ...ze };
4277
+ D.trim() !== "" && (ye.displayName = D.trim()), ie.trim() !== "" && (ye.description = ie.trim());
4278
+ const st = ce(fe), at = ce(te);
4279
+ st !== void 0 && (ye.contextWindow = st), at !== void 0 && (ye.maxOutputTokens = at), (Q || Pe || re) && (ye.capabilities = {
4280
+ ...Q ? { vision: !0 } : {},
4281
+ ...Pe ? { thinking: !0 } : {},
4282
+ ...re ? { tools: !0 } : {}
4283
+ }), Object.keys(ye).length > 0 && (X.info = ye), s(m, X);
4284
+ }
4285
+ return /* @__PURE__ */ o(
4286
+ ue,
4287
+ {
4288
+ title: l ? r("models.form.editTitle", { id: e.id }) : r("models.form.addTitle"),
4289
+ children: /* @__PURE__ */ x(
4290
+ "form",
4291
+ {
4292
+ className: "flex flex-col gap-4",
4293
+ onSubmit: (m) => {
4294
+ m.preventDefault(), rr();
4295
+ },
4296
+ children: [
4297
+ M !== null ? /* @__PURE__ */ o("p", { role: "alert", className: "text-sm text-danger wrap-anywhere", children: M }) : null,
4298
+ /* @__PURE__ */ x("div", { className: "grid gap-4 compact:grid-cols-2", children: [
4299
+ /* @__PURE__ */ o(V, { label: r("models.form.id"), hint: r("models.form.idHint"), required: !0, children: /* @__PURE__ */ o(
4300
+ B,
4301
+ {
4302
+ value: u,
4303
+ onChange: (m) => d(m.target.value),
4304
+ disabled: t || l,
4305
+ placeholder: "qwen4-max",
4306
+ autoComplete: "off",
4307
+ spellCheck: !1
4308
+ }
4309
+ ) }),
4310
+ /* @__PURE__ */ o(V, { label: r("models.form.provider"), hint: r("models.form.providerHint"), children: /* @__PURE__ */ o(
4311
+ Te,
4312
+ {
4313
+ value: i,
4314
+ onChange: (m) => tr(m.target.value),
4315
+ disabled: t,
4316
+ children: We.map((m) => /* @__PURE__ */ o("option", { value: m, children: m }, m))
4317
+ }
4318
+ ) }),
4319
+ /* @__PURE__ */ o(V, { label: r("models.form.name"), hint: r("models.form.nameHint"), children: /* @__PURE__ */ o(
4320
+ B,
4321
+ {
4322
+ value: y,
4323
+ onChange: (m) => z(m.target.value),
4324
+ disabled: t,
4325
+ placeholder: u.trim() !== "" ? u.trim() : "dashscope/qwen4-max",
4326
+ autoComplete: "off",
4327
+ spellCheck: !1
4328
+ }
4329
+ ) }),
4330
+ /* @__PURE__ */ o(V, { label: r("models.form.alias"), hint: r("models.form.aliasHint"), children: /* @__PURE__ */ o(
4331
+ B,
4332
+ {
4333
+ value: T,
4334
+ onChange: (m) => W(m.target.value),
4335
+ disabled: t,
4336
+ placeholder: "qwen",
4337
+ autoComplete: "off",
4338
+ spellCheck: !1
4339
+ }
4340
+ ) }),
4341
+ /* @__PURE__ */ o(V, { label: r("models.form.mode"), hint: r("models.form.modeHint"), children: /* @__PURE__ */ o(Te, { value: P, onChange: (m) => R(m.target.value), disabled: t, children: vo(i).map((m) => /* @__PURE__ */ o("option", { value: m, children: m }, m)) }) }),
4342
+ /* @__PURE__ */ o(
4343
+ V,
4344
+ {
4345
+ label: r("models.form.credential"),
4346
+ hint: r("models.form.credentialHint"),
4347
+ required: !0,
4348
+ children: n.length === 0 ? /* @__PURE__ */ x("p", { className: "text-sm text-muted", children: [
4349
+ r("models.form.credentialNone"),
4350
+ " ",
4351
+ /* @__PURE__ */ o("a", { className: "underline", href: "credentials.html", children: r("models.form.goCredentials") })
4352
+ ] }) : /* @__PURE__ */ x(
4353
+ Te,
4354
+ {
4355
+ value: H,
4356
+ onChange: (m) => N(m.target.value),
4357
+ disabled: t,
4358
+ children: [
4359
+ /* @__PURE__ */ o("option", { value: "", children: "—" }),
4360
+ n.map((m) => /* @__PURE__ */ x("option", { value: m.id, children: [
4361
+ m.id,
4362
+ m.hasValue ? "" : ` (${r("credentials.valueMissing")})`
4363
+ ] }, m.id))
4364
+ ]
4365
+ }
4366
+ )
4367
+ }
4368
+ )
4369
+ ] }),
4370
+ /* @__PURE__ */ x("details", { className: "rounded-md border border-line p-3", children: [
4371
+ /* @__PURE__ */ x("summary", { className: "cursor-pointer text-sm font-medium", children: [
4372
+ r("models.form.pricing"),
4373
+ " (",
4374
+ r("common.optional"),
4375
+ ")"
4376
+ ] }),
4377
+ /* @__PURE__ */ x("div", { className: "mt-3 grid gap-4 compact:grid-cols-2", children: [
4378
+ /* @__PURE__ */ o(V, { label: r("models.form.inputPrice"), children: /* @__PURE__ */ o(
4379
+ B,
4380
+ {
4381
+ value: F,
4382
+ onChange: (m) => E(m.target.value),
4383
+ disabled: t,
4384
+ placeholder: "2.0",
4385
+ autoComplete: "off"
4386
+ }
4387
+ ) }),
4388
+ /* @__PURE__ */ o(V, { label: r("models.form.outputPrice"), children: /* @__PURE__ */ o(
4389
+ B,
4390
+ {
4391
+ value: f,
4392
+ onChange: (m) => O(m.target.value),
4393
+ disabled: t,
4394
+ placeholder: "8.0",
4395
+ autoComplete: "off"
4396
+ }
4397
+ ) }),
4398
+ /* @__PURE__ */ o(V, { label: r("models.form.cacheReadPrice"), children: /* @__PURE__ */ o(
4399
+ B,
4400
+ {
4401
+ value: K,
4402
+ onChange: (m) => J(m.target.value),
4403
+ disabled: t,
4404
+ placeholder: "0.4",
4405
+ autoComplete: "off"
4406
+ }
4407
+ ) }),
4408
+ /* @__PURE__ */ o(V, { label: r("models.form.cacheWritePrice"), children: /* @__PURE__ */ o(
4409
+ B,
4410
+ {
4411
+ value: j,
4412
+ onChange: (m) => Y(m.target.value),
4413
+ disabled: t,
4414
+ placeholder: "2.5",
4415
+ autoComplete: "off"
4416
+ }
4417
+ ) })
4418
+ ] })
4419
+ ] }),
4420
+ /* @__PURE__ */ x("details", { className: "rounded-md border border-line p-3", children: [
4421
+ /* @__PURE__ */ x("summary", { className: "cursor-pointer text-sm font-medium", children: [
4422
+ r("models.form.param"),
4423
+ " (",
4424
+ r("common.optional"),
4425
+ ")"
4426
+ ] }),
4427
+ /* @__PURE__ */ x("div", { className: "mt-3 grid gap-4 compact:grid-cols-2", children: [
4428
+ /* @__PURE__ */ o(V, { label: r("models.form.temperature"), children: /* @__PURE__ */ o(
4429
+ B,
4430
+ {
4431
+ value: c,
4432
+ onChange: (m) => L(m.target.value),
4433
+ disabled: t,
4434
+ placeholder: "0.7",
4435
+ autoComplete: "off"
4436
+ }
4437
+ ) }),
4438
+ /* @__PURE__ */ o(V, { label: r("models.form.maxTokens"), children: /* @__PURE__ */ o(
4439
+ B,
4440
+ {
4441
+ value: $,
4442
+ onChange: (m) => ee(m.target.value),
4443
+ disabled: t,
4444
+ placeholder: "8192",
4445
+ autoComplete: "off"
4446
+ }
4447
+ ) }),
4448
+ /* @__PURE__ */ o(V, { label: r("models.form.topP"), children: /* @__PURE__ */ o(
4449
+ B,
4450
+ {
4451
+ value: se,
4452
+ onChange: (m) => b(m.target.value),
4453
+ disabled: t,
4454
+ placeholder: "0.9",
4455
+ autoComplete: "off"
4456
+ }
4457
+ ) }),
4458
+ /* @__PURE__ */ o(V, { label: r("models.form.promptCache"), children: /* @__PURE__ */ x(
4459
+ Te,
4460
+ {
4461
+ value: ae,
4462
+ onChange: (m) => Ne(m.target.value),
4463
+ disabled: t,
4464
+ children: [
4465
+ /* @__PURE__ */ o("option", { value: "auto", children: r("models.form.cacheAuto") }),
4466
+ /* @__PURE__ */ o("option", { value: "on", children: r("models.form.cacheOn") }),
4467
+ /* @__PURE__ */ o("option", { value: "off", children: r("models.form.cacheOff") })
4468
+ ]
4469
+ }
4470
+ ) })
4471
+ ] }),
4472
+ /* @__PURE__ */ o("div", { className: "mt-4", children: /* @__PURE__ */ o(V, { label: r("models.form.extra"), children: /* @__PURE__ */ o(
4473
+ "textarea",
4474
+ {
4475
+ className: "w-full rounded-md border border-line bg-surface px-2 py-1.5 font-mono text-xs",
4476
+ rows: 3,
4477
+ value: A,
4478
+ onChange: (m) => I(m.target.value),
4479
+ disabled: t,
4480
+ placeholder: '{"enable_thinking": true}',
4481
+ spellCheck: !1
4482
+ }
4483
+ ) }) })
4484
+ ] }),
4485
+ /* @__PURE__ */ x("details", { className: "rounded-md border border-line p-3", children: [
4486
+ /* @__PURE__ */ x("summary", { className: "cursor-pointer text-sm font-medium", children: [
4487
+ r("models.form.info"),
4488
+ " (",
4489
+ r("common.optional"),
4490
+ ")"
4491
+ ] }),
4492
+ /* @__PURE__ */ x("div", { className: "mt-3 grid gap-4 compact:grid-cols-2", children: [
4493
+ /* @__PURE__ */ o(V, { label: r("models.form.displayName"), children: /* @__PURE__ */ o(
4494
+ B,
4495
+ {
4496
+ value: D,
4497
+ onChange: (m) => ne(m.target.value),
4498
+ disabled: t,
4499
+ placeholder: "Qwen4 Max",
4500
+ autoComplete: "off"
4501
+ }
4502
+ ) }),
4503
+ /* @__PURE__ */ o(V, { label: r("models.form.contextWindow"), children: /* @__PURE__ */ o(
4504
+ B,
4505
+ {
4506
+ value: fe,
4507
+ onChange: (m) => pe(m.target.value),
4508
+ disabled: t,
4509
+ placeholder: "262144",
4510
+ autoComplete: "off"
4511
+ }
4512
+ ) }),
4513
+ /* @__PURE__ */ o(V, { label: r("models.form.maxOutputTokens"), children: /* @__PURE__ */ o(
4514
+ B,
4515
+ {
4516
+ value: te,
4517
+ onChange: (m) => he(m.target.value),
4518
+ disabled: t,
4519
+ placeholder: "32768",
4520
+ autoComplete: "off"
4521
+ }
4522
+ ) }),
4523
+ /* @__PURE__ */ o(V, { label: r("models.form.description"), children: /* @__PURE__ */ o(
4524
+ B,
4525
+ {
4526
+ value: ie,
4527
+ onChange: (m) => U(m.target.value),
4528
+ disabled: t,
4529
+ autoComplete: "off"
4530
+ }
4531
+ ) })
4532
+ ] }),
4533
+ /* @__PURE__ */ x("div", { className: "mt-3 flex flex-wrap items-center gap-4", children: [
4534
+ /* @__PURE__ */ x("span", { className: "text-sm text-muted", children: [
4535
+ r("models.form.capabilities"),
4536
+ ":"
4537
+ ] }),
4538
+ /* @__PURE__ */ x("label", { className: "inline-flex items-center gap-1.5 text-sm", children: [
4539
+ /* @__PURE__ */ o(
4540
+ "input",
4541
+ {
4542
+ type: "checkbox",
4543
+ checked: Q,
4544
+ onChange: (m) => Se(m.target.checked),
4545
+ disabled: t
4546
+ }
4547
+ ),
4548
+ r("models.form.capVision")
4549
+ ] }),
4550
+ /* @__PURE__ */ x("label", { className: "inline-flex items-center gap-1.5 text-sm", children: [
4551
+ /* @__PURE__ */ o(
4552
+ "input",
4553
+ {
4554
+ type: "checkbox",
4555
+ checked: Pe,
4556
+ onChange: (m) => Ee(m.target.checked),
4557
+ disabled: t
4558
+ }
4559
+ ),
4560
+ r("models.form.capThinking")
4561
+ ] }),
4562
+ /* @__PURE__ */ x("label", { className: "inline-flex items-center gap-1.5 text-sm", children: [
4563
+ /* @__PURE__ */ o(
4564
+ "input",
4565
+ {
4566
+ type: "checkbox",
4567
+ checked: re,
4568
+ onChange: (m) => Qt(m.target.checked),
4569
+ disabled: t
4570
+ }
4571
+ ),
4572
+ r("models.form.capTools")
4573
+ ] })
4574
+ ] }),
4575
+ /* @__PURE__ */ o("div", { className: "mt-4", children: /* @__PURE__ */ o(V, { label: r("models.form.infoJson"), children: /* @__PURE__ */ o(
4576
+ "textarea",
4577
+ {
4578
+ className: "w-full rounded-md border border-line bg-surface px-2 py-1.5 font-mono text-xs",
4579
+ rows: 3,
4580
+ value: et,
4581
+ onChange: (m) => er(m.target.value),
4582
+ disabled: t,
4583
+ placeholder: '{"family": "qwen"}',
4584
+ spellCheck: !1
4585
+ }
4586
+ ) }) })
4587
+ ] }),
4588
+ /* @__PURE__ */ x("div", { className: "flex items-center gap-2", children: [
4589
+ /* @__PURE__ */ o(q, { type: "submit", variant: "primary", disabled: t, children: r("common.save") }),
4590
+ /* @__PURE__ */ o(q, { disabled: t, onClick: a, children: r("common.cancel") })
4591
+ ] })
4592
+ ]
4593
+ }
4594
+ )
4595
+ }
4596
+ );
4597
+ }
4598
+ const ko = 15e3;
4599
+ function wo({ client: e, refreshKey: n, t }) {
4600
+ const r = Ht({
4601
+ load: () => e.call("list"),
4602
+ intervalMs: ko,
4603
+ refreshKey: n
4604
+ }), [s, a] = C(null), [l, u] = C(!1), [d, i] = C(
4605
+ null
4606
+ ), [v, y] = C(null), [z, T] = C(""), [W, P] = C(null), [R, H] = C(null), N = oe(void 0);
4607
+ me(() => {
4608
+ if (r.data === void 0) return;
4609
+ const c = r.data.default ?? "";
4610
+ N.current !== c && (N.current = c, T(c));
4611
+ }, [r.data]);
4612
+ async function M(c) {
4613
+ u(!0), a(null);
4614
+ try {
4615
+ return await c(), r.reload(), a({ kind: "saved" }), !0;
4616
+ } catch (L) {
4617
+ return a({ kind: "error", text: $e(L).message }), !1;
4618
+ } finally {
4619
+ u(!1);
4620
+ }
4621
+ }
4622
+ async function g(c, L) {
4623
+ await M(() => e.call("model_set", { id: c, entry: L })) && i(null);
4624
+ }
4625
+ async function k(c) {
4626
+ await M(() => e.call("model_remove", { id: c })) && y(null);
4627
+ }
4628
+ async function F() {
4629
+ z !== "" && await M(() => e.call("default_set", { ref: z }));
4630
+ }
4631
+ async function E(c) {
4632
+ P(c), H(null), a(null);
4633
+ try {
4634
+ const L = await e.call("test", { entry: c });
4635
+ H({ id: c, result: L });
4636
+ } catch (L) {
4637
+ a({ kind: "error", text: $e(L).message });
4638
+ } finally {
4639
+ P(null);
4640
+ }
4641
+ }
4642
+ const f = r.data;
4643
+ if (f === void 0)
4644
+ return /* @__PURE__ */ x(He, { title: t("models.title"), subtitle: t("models.subtitle"), children: [
4645
+ r.isLoading ? /* @__PURE__ */ o(jt, { label: t("common.loading") }) : null,
4646
+ r.error !== void 0 ? /* @__PURE__ */ o(
4647
+ Ft,
4648
+ {
4649
+ error: r.error,
4650
+ onRetry: r.reload,
4651
+ title: t("common.loadError"),
4652
+ retryLabel: t("common.retry")
4653
+ }
4654
+ ) : null
4655
+ ] });
4656
+ const { entries: O, credentials: K, effective: J, migration: j } = f, Y = [
4657
+ ...O.filter((c) => !c.legacy).map((c) => c.id),
4658
+ ...O.flatMap((c) => c.alias !== void 0 ? [c.alias] : [])
4659
+ ], G = [
4660
+ {
4661
+ key: "id",
4662
+ header: t("models.th.id"),
4663
+ cell: (c) => /* @__PURE__ */ x("span", { className: "inline-flex flex-wrap items-center gap-1", children: [
4664
+ /* @__PURE__ */ o("span", { className: "font-mono text-xs", children: c.id }),
4665
+ c.inUse ? /* @__PURE__ */ o(we, { tone: "accent", children: t("models.inUse") }) : null,
4666
+ c.legacy ? /* @__PURE__ */ o(we, { tone: "neutral", children: "legacy" }) : null
4667
+ ] })
4668
+ },
4669
+ {
4670
+ key: "name",
4671
+ header: t("models.th.name"),
4672
+ cell: (c) => /* @__PURE__ */ o("span", { className: "font-mono text-xs wrap-anywhere", children: c.name })
4673
+ },
4674
+ {
4675
+ key: "alias",
4676
+ header: t("models.th.alias"),
4677
+ hide: "compact",
4678
+ cell: (c) => c.alias !== void 0 ? /* @__PURE__ */ o("span", { className: "font-mono text-xs", children: c.alias }) : /* @__PURE__ */ o("span", { className: "text-xs text-faint", children: "—" })
4679
+ },
4680
+ {
4681
+ key: "provider",
4682
+ header: t("models.th.provider"),
4683
+ cell: (c) => /* @__PURE__ */ x("span", { className: "text-xs", children: [
4684
+ c.provider,
4685
+ /* @__PURE__ */ x("span", { className: "text-faint", children: [
4686
+ " · ",
4687
+ c.mode
4688
+ ] })
4689
+ ] })
4690
+ },
4691
+ {
4692
+ key: "credential",
4693
+ header: t("models.th.credential"),
4694
+ cell: (c) => /* @__PURE__ */ o("span", { className: "font-mono text-xs", children: c.credential ?? "—" })
4695
+ },
4696
+ {
4697
+ key: "pricing",
4698
+ header: t("models.th.pricing"),
4699
+ hide: "compact",
4700
+ cell: (c) => c.pricing !== void 0 ? /* @__PURE__ */ x("span", { className: "font-mono text-xs", children: [
4701
+ c.pricing.inputPerMillion,
4702
+ " / ",
4703
+ c.pricing.outputPerMillion
4704
+ ] }) : /* @__PURE__ */ o("span", { className: "text-xs text-faint", children: "—" })
4705
+ },
4706
+ {
4707
+ key: "actions",
4708
+ header: t("common.actions"),
4709
+ cell: (c) => v === c.id ? /* @__PURE__ */ o(
4710
+ Jt,
4711
+ {
4712
+ question: t("models.deleteConfirm", { id: c.id }),
4713
+ busy: l,
4714
+ t,
4715
+ onConfirm: () => {
4716
+ k(c.id);
4717
+ },
4718
+ onCancel: () => y(null)
4719
+ }
4720
+ ) : /* @__PURE__ */ x("span", { className: "inline-flex flex-wrap items-center gap-1.5", children: [
4721
+ /* @__PURE__ */ o(
4722
+ q,
4723
+ {
4724
+ size: "small",
4725
+ disabled: l || c.legacy,
4726
+ title: c.legacy ? t("models.legacyHint") : void 0,
4727
+ onClick: () => i({ mode: "edit", entry: c }),
4728
+ children: t("common.edit")
4729
+ }
4730
+ ),
4731
+ /* @__PURE__ */ o(
4732
+ q,
4733
+ {
4734
+ size: "small",
4735
+ disabled: l || W !== null,
4736
+ onClick: () => {
4737
+ E(c.id);
4738
+ },
4739
+ children: W === c.id ? t("models.testRunning") : t("models.test")
4740
+ }
4741
+ ),
4742
+ /* @__PURE__ */ o(
4743
+ q,
4744
+ {
4745
+ size: "small",
4746
+ variant: "dangerGhost",
4747
+ disabled: l || c.legacy,
4748
+ onClick: () => y(c.id),
4749
+ children: t("common.delete")
4750
+ }
4751
+ )
4752
+ ] })
4753
+ }
4754
+ ];
4755
+ return /* @__PURE__ */ x(He, { title: t("models.title"), subtitle: t("models.subtitle"), children: [
4756
+ /* @__PURE__ */ o(qt, { notice: s, t }),
4757
+ r.error !== void 0 ? /* @__PURE__ */ o(
4758
+ Gt,
4759
+ {
4760
+ message: t("common.stale", { time: Bt(r.updatedAt) }),
4761
+ onRetry: r.reload,
4762
+ retryLabel: t("common.retry")
4763
+ }
4764
+ ) : null,
4765
+ d !== null ? /* @__PURE__ */ o(
4766
+ yo,
4767
+ {
4768
+ initial: d.mode === "edit" ? d.entry : void 0,
4769
+ credentials: K,
4770
+ busy: l,
4771
+ t,
4772
+ onSave: (c, L) => {
4773
+ g(c, L);
4774
+ },
4775
+ onCancel: () => i(null)
4776
+ }
4777
+ ) : null,
4778
+ R !== null ? /* @__PURE__ */ x(ue, { title: t("models.testResult"), children: [
4779
+ /* @__PURE__ */ x("p", { className: "text-sm", children: [
4780
+ /* @__PURE__ */ o("span", { className: "font-mono text-xs", children: R.id }),
4781
+ " ",
4782
+ R.result.ok ? /* @__PURE__ */ o(we, { tone: "success", children: t("models.testOk") }) : /* @__PURE__ */ o(we, { tone: "danger", children: t("models.testFailed") }),
4783
+ " ",
4784
+ /* @__PURE__ */ o("span", { className: "text-xs text-muted", children: t("models.latency", { ms: R.result.latencyMs }) })
4785
+ ] }),
4786
+ R.result.error !== void 0 ? /* @__PURE__ */ x("p", { className: "text-sm text-danger wrap-anywhere", children: [
4787
+ R.result.error.code,
4788
+ ": ",
4789
+ R.result.error.message
4790
+ ] }) : null,
4791
+ R.result.models !== void 0 ? /* @__PURE__ */ o("p", { className: "text-xs text-muted", children: t("models.testModels", { n: R.result.models.length }) }) : null
4792
+ ] }) : null,
4793
+ /* @__PURE__ */ o(ue, { title: t("default.title"), description: t("default.description"), children: /* @__PURE__ */ x("div", { className: "flex flex-wrap items-end gap-3", children: [
4794
+ /* @__PURE__ */ o(V, { label: t("default.ref"), children: /* @__PURE__ */ x(
4795
+ Te,
4796
+ {
4797
+ value: z,
4798
+ onChange: (c) => T(c.target.value),
4799
+ disabled: l,
4800
+ children: [
4801
+ /* @__PURE__ */ o("option", { value: "", children: t("default.choose") }),
4802
+ Y.map((c) => /* @__PURE__ */ o("option", { value: c, children: c }, c))
4803
+ ]
4804
+ }
4805
+ ) }),
4806
+ /* @__PURE__ */ o(
4807
+ q,
4808
+ {
4809
+ variant: "primary",
4810
+ disabled: l || z === "",
4811
+ onClick: () => {
4812
+ F();
4813
+ },
4814
+ children: t("default.save")
4815
+ }
4816
+ ),
4817
+ /* @__PURE__ */ x("span", { className: "text-sm text-muted", children: [
4818
+ t("default.current"),
4819
+ ":",
4820
+ " ",
4821
+ J !== void 0 ? /* @__PURE__ */ x("span", { className: "font-mono text-xs", children: [
4822
+ J.entryId,
4823
+ " (",
4824
+ J.wireModel,
4825
+ ")"
4826
+ ] }) : t("default.none")
4827
+ ] })
4828
+ ] }) }),
4829
+ j !== void 0 ? /* @__PURE__ */ o(ue, { title: t("models.migration.title"), children: /* @__PURE__ */ x("ul", { className: "flex flex-col gap-1 text-sm text-muted", children: [
4830
+ /* @__PURE__ */ o("li", { children: t("models.migration.split", { n: j.credentialsSplit.length }) }),
4831
+ j.needsReRecord.length > 0 ? /* @__PURE__ */ o("li", { className: "text-danger", children: t("models.migration.reRecord", { ids: j.needsReRecord.join(", ") }) }) : null,
4832
+ j.droppedAliases.length > 0 ? /* @__PURE__ */ o("li", { children: t("models.migration.droppedAliases", {
4833
+ ids: j.droppedAliases.map((c) => c.alias).join(", ")
4834
+ }) }) : null,
4835
+ j.unmatchedPricing.length > 0 ? /* @__PURE__ */ o("li", { children: t("models.migration.unmatchedPricing", {
4836
+ ids: j.unmatchedPricing.join(", ")
4837
+ }) }) : null,
4838
+ /* @__PURE__ */ o("li", { children: t("models.migration.pins", { n: j.pinsRewritten.length }) }),
4839
+ j.pinsFailed.length > 0 ? /* @__PURE__ */ o("li", { className: "text-danger", children: t("models.migration.pinsFailed", { ids: j.pinsFailed.join(", ") }) }) : null
4840
+ ] }) }) : null,
4841
+ /* @__PURE__ */ x(
4842
+ ue,
4843
+ {
4844
+ title: t("models.section"),
4845
+ actions: /* @__PURE__ */ x("span", { className: "inline-flex items-center gap-1.5", children: [
4846
+ r.isRefreshing ? /* @__PURE__ */ o(_t, { label: t("common.updating") }) : null,
4847
+ /* @__PURE__ */ o(q, { size: "small", disabled: l, onClick: r.reload, children: t("common.refresh") }),
4848
+ /* @__PURE__ */ o(
4849
+ q,
4850
+ {
4851
+ size: "small",
4852
+ variant: "primary",
4853
+ disabled: l,
4854
+ onClick: () => i({ mode: "add" }),
4855
+ children: t("models.add")
4856
+ }
4857
+ )
4858
+ ] }),
4859
+ children: [
4860
+ /* @__PURE__ */ o("p", { className: "mb-2 text-xs text-faint", children: t("models.testHint") }),
4861
+ O.length === 0 ? /* @__PURE__ */ o(Wt, { title: t("models.empty.title"), description: t("models.empty.description") }) : /* @__PURE__ */ o("div", { className: "overflow-hidden rounded-md", children: /* @__PURE__ */ o(Vt, { columns: G, rows: O, rowKey: (c) => c.id }) })
4862
+ ]
4863
+ }
4864
+ )
4865
+ ] });
4866
+ }
4867
+ function Zt(e) {
4868
+ return {
4869
+ call: (n, t) => e.rpc(n, t)
4870
+ };
4871
+ }
4872
+ function Yt(e) {
4873
+ const [n, t] = C(() => e.theme.get());
4874
+ return me(() => e.theme.subscribe(t), [e]), n.lang;
4875
+ }
4876
+ function So({ host: e }) {
4877
+ const n = Yt(e), t = Ue(() => $t(n), [n]), r = Ue(() => Zt(e), [e]);
4878
+ return /* @__PURE__ */ o(wo, { client: r, refreshKey: 0, t });
4879
+ }
4880
+ function Po({ host: e }) {
4881
+ const n = Yt(e), t = Ue(() => $t(n), [n]), r = Ue(() => Zt(e), [e]);
4882
+ return /* @__PURE__ */ o(fo, { client: r, refreshKey: 0, t });
4883
+ }
4884
+ export {
4885
+ Po as CredentialsView,
4886
+ So as ModelsView
4887
+ };