@nevuto/novi 0.3.63 → 0.3.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AiAssistant/AiAssistantInput.d.ts +6 -0
- package/dist/AiAssistant/AiAssistantInput.d.ts.map +1 -1
- package/dist/AiAssistant/AiAssistantLauncher.d.ts +3 -0
- package/dist/AiAssistant/AiAssistantLauncher.d.ts.map +1 -1
- package/dist/AiAssistant/AiAssistantVoiceButton.d.ts +15 -0
- package/dist/AiAssistant/AiAssistantVoiceButton.d.ts.map +1 -0
- package/dist/AiAssistant/index.d.ts +2 -0
- package/dist/AiAssistant/index.d.ts.map +1 -1
- package/dist/NoviInput/NoviInput.d.ts +3 -0
- package/dist/NoviInput/NoviInput.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1399 -1347
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as at, useEffect as
|
|
4
|
-
import { Scrollable as
|
|
5
|
-
import { ChevronDownIcon as
|
|
6
|
-
const
|
|
2
|
+
import { jsx as r, jsxs as y, Fragment as Ct } from "react/jsx-runtime";
|
|
3
|
+
import { useState as at, useEffect as et, useRef as F, useId as Lt, useMemo as bn, forwardRef as re, useLayoutEffect as Me, useCallback as vn, Children as kn } from "react";
|
|
4
|
+
import { Scrollable as Qt, IconButton as it, Button as At, Kbd as Nn, Spinner as $n } from "@nevuto/components";
|
|
5
|
+
import { ChevronDownIcon as An, XIcon as we, AudioWaveformIcon as Mn, RotateCcwClockIcon as wn, PlusIcon as Ie, ArrowUpIcon as on, Minimize2Icon as In, Maximize2Icon as zn, ArrowDownIcon as Bn, ArrowBigUpIcon as Tn, CornerDownLeftIcon as Rn, SquareIcon as En, PanelRightIcon as Cn, MinusIcon as Pn, ZapIcon as On, MessagesSquareIcon as Sn, CircleAlertIcon as ze, CheckIcon as rn, CopyIcon as jn, ThumbsUpIcon as qn, ThumbsDownIcon as Ln, ChevronRightIcon as Hn, SparklesIcon as Fn, CaretDownIcon as an, CaretRightIcon as cn, CircleDashedIcon as Dn } from "@nevuto/icons";
|
|
6
|
+
const K = Math.PI * 2, I = (t, n = 0, e = 1) => t < n ? n : t > e ? e : t, B = (t, n, e) => t + (n - t) * e, tt = {
|
|
7
7
|
easeOutCubic: (t) => 1 - (1 - t) ** 3,
|
|
8
8
|
easeInOutCubic: (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2,
|
|
9
9
|
easeOutQuint: (t) => 1 - (1 - t) ** 5
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const s = t / n *
|
|
11
|
+
function zt(t, n, e = 0) {
|
|
12
|
+
const s = t / n * K;
|
|
13
13
|
return 0.55 * Math.sin(s + e) + 0.3 * Math.sin(2 * s + e * 1.7 + 1.1) + 0.15 * Math.sin(3 * s + e * 2.3 + 2.4);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ie(t) {
|
|
16
16
|
let n = t >>> 0;
|
|
17
17
|
return () => {
|
|
18
18
|
n = n + 1831565813 >>> 0;
|
|
@@ -20,19 +20,19 @@ function ne(t) {
|
|
|
20
20
|
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
25
|
-
const s = (t % 360 + 360) % 360, o = (1 - Math.abs(2 * e - 1)) * n, a = o * (1 - Math.abs(s / 60 % 2 - 1)),
|
|
23
|
+
const A = (t) => Math.round(t * 100) / 100;
|
|
24
|
+
function he(t, n = 0.55, e = 0.62) {
|
|
25
|
+
const s = (t % 360 + 360) % 360, o = (1 - Math.abs(2 * e - 1)) * n, a = o * (1 - Math.abs(s / 60 % 2 - 1)), i = e - o / 2, [c, l, d] = s < 60 ? [o, a, 0] : s < 120 ? [a, o, 0] : s < 180 ? [0, o, a] : s < 240 ? [0, a, o] : s < 300 ? [a, 0, o] : [o, 0, a], u = (h) => Math.round((h + i) * 255).toString(16).padStart(2, "0");
|
|
26
26
|
return `#${u(c)}${u(l)}${u(d)}`;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const a = t.phase + n * t.speed *
|
|
28
|
+
function Yn(t, n, e, s, o = 1) {
|
|
29
|
+
const a = t.phase + n * t.speed * K, i = Math.cos(t.tilt), c = Math.sin(t.tilt), l = Math.sqrt(Math.max(0, 1 - t.k * t.k)), d = 64, u = t.sweep * K;
|
|
30
30
|
let h = "", p = "", f = null;
|
|
31
31
|
for (let N = 0; N <= d; N++) {
|
|
32
|
-
const m = a + N / d * u, w = Math.cos(m),
|
|
33
|
-
|
|
32
|
+
const m = a + N / d * u, w = Math.cos(m), v = Math.sin(m), g = t.a * (w * i + v * -c * t.k) + t.cx, M = t.a * (w * c + v * i * t.k) + t.cy, k = t.a * v * l < 0, L = A(g * e), q = A(M * e), U = k !== f ? "M" : "L";
|
|
33
|
+
k ? p += `${U}${L} ${q}` : h += `${U}${L} ${q}`, f = k;
|
|
34
34
|
}
|
|
35
|
-
const _ = Math.cos(t.tilt) * t.a * e,
|
|
35
|
+
const _ = Math.cos(t.tilt) * t.a * e, b = Math.sin(t.tilt) * t.a * e;
|
|
36
36
|
return {
|
|
37
37
|
id: s,
|
|
38
38
|
front: h,
|
|
@@ -40,31 +40,31 @@ function Ln(t, n, e, s, o = 1) {
|
|
|
40
40
|
width: t.width * e,
|
|
41
41
|
opacity: o,
|
|
42
42
|
grad: {
|
|
43
|
-
x1:
|
|
44
|
-
y1:
|
|
45
|
-
x2:
|
|
46
|
-
y2:
|
|
43
|
+
x1: A(t.cx * e - _),
|
|
44
|
+
y1: A(t.cy * e - b),
|
|
45
|
+
x2: A(t.cx * e + _),
|
|
46
|
+
y2: A(t.cy * e + b),
|
|
47
47
|
stops: [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
he(t.hue),
|
|
49
|
+
he(t.hue + t.hueSpan * 0.5),
|
|
50
|
+
he(t.hue + t.hueSpan)
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
a: 1.3 +
|
|
57
|
-
k: 0.05 +
|
|
58
|
-
tilt: n / 6 * Math.PI +
|
|
59
|
-
speed: 3 +
|
|
60
|
-
phase:
|
|
61
|
-
sweep: 0.6 +
|
|
62
|
-
hue: n * 360 / 6 +
|
|
63
|
-
hueSpan: 60 +
|
|
64
|
-
width: 0.05 +
|
|
55
|
+
const bt = ie(659918), Ce = Array.from({ length: 6 }, (t, n) => ({
|
|
56
|
+
a: 1.3 + bt() * 0.1,
|
|
57
|
+
k: 0.05 + bt() * 0.4,
|
|
58
|
+
tilt: n / 6 * Math.PI + bt() * 0.5,
|
|
59
|
+
speed: 3 + bt() * 0.7,
|
|
60
|
+
phase: bt() * K,
|
|
61
|
+
sweep: 0.6 + bt() * 0.25,
|
|
62
|
+
hue: n * 360 / 6 + bt() * 30,
|
|
63
|
+
hueSpan: 60 + bt() * 60,
|
|
64
|
+
width: 0.05 + bt() * 0.012,
|
|
65
65
|
cx: 0,
|
|
66
66
|
cy: 0.1
|
|
67
|
-
})),
|
|
67
|
+
})), Un = Array.from({ length: 4 }, (t, n) => ({
|
|
68
68
|
a: 0.78 + n * 0.2,
|
|
69
69
|
k: 0.05 + n * 0.02,
|
|
70
70
|
tilt: -0.62 + n * 0.05,
|
|
@@ -76,28 +76,28 @@ const xt = ne(659918), we = Array.from({ length: 6 }, (t, n) => ({
|
|
|
76
76
|
width: 0.05,
|
|
77
77
|
cx: 0,
|
|
78
78
|
cy: -0.12
|
|
79
|
-
})),
|
|
79
|
+
})), Pe = [-0.557, -0.013, 0.532], Oe = 0.165, Se = 1.25, je = ie(48879), Xn = Array.from({ length: 5 }, (t, n) => ({
|
|
80
80
|
birth: n * 0.2,
|
|
81
|
-
angle:
|
|
82
|
-
rho: 0.58 +
|
|
81
|
+
angle: je() * K,
|
|
82
|
+
rho: 0.58 + je() * 0.18
|
|
83
83
|
}));
|
|
84
|
-
function
|
|
84
|
+
function Gn(t, n) {
|
|
85
85
|
const e = [];
|
|
86
|
-
for (const s of
|
|
86
|
+
for (const s of Xn) {
|
|
87
87
|
const o = t - s.birth;
|
|
88
88
|
if (o < 0 || o > 0.62) continue;
|
|
89
|
-
const a = s.rho * Math.pow(0.75, o * 10),
|
|
89
|
+
const a = s.rho * Math.pow(0.75, o * 10), i = s.angle + o * 100 * Math.PI / 180;
|
|
90
90
|
e.push({
|
|
91
|
-
x: Math.cos(
|
|
92
|
-
y: Math.sin(
|
|
93
|
-
r: (0.04 + 0.028 *
|
|
94
|
-
depth:
|
|
95
|
-
opacity:
|
|
91
|
+
x: Math.cos(i) * a * n,
|
|
92
|
+
y: Math.sin(i) * a * n,
|
|
93
|
+
r: (0.04 + 0.028 * I(o / 0.55)) * n,
|
|
94
|
+
depth: I(1 - a / 0.8),
|
|
95
|
+
opacity: I(o / 0.06) * I((0.62 - o) / 0.08)
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
return e;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const qe = ie(49383), Wn = Array.from({ length: 4 }, (t, n) => {
|
|
101
101
|
const e = n - 1.5;
|
|
102
102
|
return {
|
|
103
103
|
a: 0.85 * (1 + e * 0.03),
|
|
@@ -106,27 +106,27 @@ const Re = ne(49383), Yn = Array.from({ length: 4 }, (t, n) => {
|
|
|
106
106
|
tilt: 34 * Math.PI / 180 + e * 0.035,
|
|
107
107
|
speed: 210 / 360,
|
|
108
108
|
// measured phase shift: 10 to 20 degrees between ribbons, no more
|
|
109
|
-
phase: -n * 0.045 +
|
|
109
|
+
phase: -n * 0.045 + qe() * 0.012,
|
|
110
110
|
sweep: 0.34,
|
|
111
|
-
hue: n * 85 +
|
|
111
|
+
hue: n * 85 + qe() * 20,
|
|
112
112
|
hueSpan: 80,
|
|
113
113
|
width: 0.095,
|
|
114
114
|
cx: 0,
|
|
115
115
|
cy: 0
|
|
116
116
|
};
|
|
117
|
-
}),
|
|
118
|
-
function
|
|
117
|
+
}), Qn = 0.129, Vn = "var(--backgrounds-bg-interactive)", Kn = -42, Le = 1.003, Zn = 0.15, Jn = 1.14, ts = 0.054, Be = 15.46, be = 0.186, ve = 0.412, ln = { yaw: 28.49, pitch: 28.62, roll: -13 }, ee = (t) => t * Math.PI / 180;
|
|
118
|
+
function ne(t, n, e) {
|
|
119
119
|
const s = Math.cos(e), o = Math.sin(e);
|
|
120
120
|
return [
|
|
121
121
|
[t[0] * s + n[0] * o, t[1] * s + n[1] * o, t[2] * s + n[2] * o],
|
|
122
122
|
[n[0] * s - t[0] * o, n[1] * s - t[1] * o, n[2] * s - t[2] * o]
|
|
123
123
|
];
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function dn(t, n, e = Be) {
|
|
126
126
|
let s = [0, 0, 1], o = [1, 0, 0], a = [0, 1, 0];
|
|
127
|
-
[s, o] =
|
|
128
|
-
const
|
|
129
|
-
const [l, d] =
|
|
127
|
+
[s, o] = ne(s, o, ee(t.yaw)), [a, s] = ne(a, s, ee(t.pitch)), [o, a] = ne(o, a, ee(t.roll));
|
|
128
|
+
const i = (c) => {
|
|
129
|
+
const [l, d] = ne(s, o, ee(e * c));
|
|
130
130
|
return {
|
|
131
131
|
x: l[0] * n,
|
|
132
132
|
y: l[1] * n,
|
|
@@ -137,109 +137,109 @@ function on(t, n, e = $e) {
|
|
|
137
137
|
depth: l[2]
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
|
-
return [
|
|
140
|
+
return [i(-1), i(1)];
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const He = ie(24301), Fe = (() => {
|
|
143
143
|
const t = [];
|
|
144
144
|
let n = 1.4;
|
|
145
145
|
for (; n < 900; )
|
|
146
|
-
t.push(n), n += 1.9 +
|
|
146
|
+
t.push(n), n += 1.9 + He() * 2.7, He() < 0.18 && (t.push(n), n += 0.24);
|
|
147
147
|
return t;
|
|
148
|
-
})(),
|
|
149
|
-
function
|
|
150
|
-
for (let n = 0; n <
|
|
151
|
-
const e =
|
|
148
|
+
})(), es = 0.18;
|
|
149
|
+
function ns(t) {
|
|
150
|
+
for (let n = 0; n < Fe.length; n++) {
|
|
151
|
+
const e = Fe[n];
|
|
152
152
|
if (t < e) break;
|
|
153
|
-
const s = (t - e) /
|
|
153
|
+
const s = (t - e) / es;
|
|
154
154
|
if (s >= 0 && s <= 1)
|
|
155
155
|
return s < 0.45 ? 1 - s / 0.45 : (s - 0.45) / 0.55;
|
|
156
156
|
}
|
|
157
157
|
return 1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ss(t, n = {}) {
|
|
160
160
|
const { wander: e = 1, blink: s = !0, float: o = !0 } = n;
|
|
161
161
|
return {
|
|
162
|
-
dYaw: (
|
|
163
|
-
dPitch: (
|
|
164
|
-
dRoll:
|
|
165
|
-
lid: s ?
|
|
162
|
+
dYaw: (zt(t, 11.3, 0.4) * 5.5 + zt(t, 3.7, 2.1) * 1.6) * e,
|
|
163
|
+
dPitch: (zt(t, 9.1, 1.3) * 4.2 + zt(t, 4.3, 0.7) * 1.3) * e,
|
|
164
|
+
dRoll: zt(t, 13.7, 3.2) * 2.2 * e,
|
|
165
|
+
lid: s ? ns(t) : 1,
|
|
166
166
|
// At rest the reference is almost still (centre stable to +-0.003, constant
|
|
167
167
|
// radius): all the life goes through the gaze and the blinks. Just enough is
|
|
168
168
|
// kept here not to freeze the image completely.
|
|
169
|
-
driftX: o ?
|
|
170
|
-
driftY: o ?
|
|
169
|
+
driftX: o ? zt(t, 7.9, 1.9) * 6e-3 : 0,
|
|
170
|
+
driftY: o ? zt(t, 5.3, 0.3) * 7e-3 : 0,
|
|
171
171
|
// Width is constant, only the height breathes very slightly.
|
|
172
172
|
breath: o ? 1 + Math.sin(t / 3.4 * Math.PI * 2) * 5e-3 : 1
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return 0.06 + 0.94 *
|
|
175
|
+
function os(t) {
|
|
176
|
+
return 0.06 + 0.94 * I(t);
|
|
177
177
|
}
|
|
178
|
-
const yt = (t, n, e = 0, s = 1) => ({ w: t, h: n, tilt: e, open: s }),
|
|
178
|
+
const yt = (t, n, e = 0, s = 1) => ({ w: t, h: n, tilt: e, open: s }), ht = (t, n, e = 0, s = 1) => [
|
|
179
179
|
yt(t, n, e, s),
|
|
180
180
|
yt(t, n, -e, s)
|
|
181
|
-
],
|
|
181
|
+
], J = { yaw: 0, pitch: 0, roll: 0 }, un = [
|
|
182
182
|
{
|
|
183
183
|
id: "neutral",
|
|
184
|
-
gaze: { ...
|
|
185
|
-
split:
|
|
186
|
-
eyes: [yt(
|
|
184
|
+
gaze: { ...J },
|
|
185
|
+
split: Be,
|
|
186
|
+
eyes: [yt(be, ve), yt(be, ve)]
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
id: "attentive",
|
|
190
|
-
gaze: { ...
|
|
190
|
+
gaze: { ...J },
|
|
191
191
|
split: 16,
|
|
192
|
-
eyes:
|
|
192
|
+
eyes: ht(0.21, 0.44)
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
id: "surprised",
|
|
196
|
-
gaze: { ...
|
|
196
|
+
gaze: { ...J },
|
|
197
197
|
split: 19,
|
|
198
|
-
eyes:
|
|
198
|
+
eyes: ht(0.45, 0.47)
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
id: "excited",
|
|
202
|
-
gaze: { ...
|
|
202
|
+
gaze: { ...J },
|
|
203
203
|
split: 19.5,
|
|
204
|
-
eyes:
|
|
204
|
+
eyes: ht(0.4, 0.56, -10)
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
// eyes narrowed into arcs: the tops converge slightly
|
|
208
208
|
id: "happy",
|
|
209
|
-
gaze: { ...
|
|
209
|
+
gaze: { ...J },
|
|
210
210
|
split: 17,
|
|
211
|
-
eyes:
|
|
211
|
+
eyes: ht(0.27, 0.17, 14)
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
id: "laughing",
|
|
215
|
-
gaze: { ...
|
|
215
|
+
gaze: { ...J },
|
|
216
216
|
split: 18,
|
|
217
|
-
eyes:
|
|
217
|
+
eyes: ht(0.34, 0.13, 20)
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
// eye tops converging hard towards the centre + narrowed eyes
|
|
221
221
|
id: "angry",
|
|
222
|
-
gaze: { ...
|
|
222
|
+
gaze: { ...J },
|
|
223
223
|
split: 17,
|
|
224
|
-
eyes:
|
|
224
|
+
eyes: ht(0.34, 0.15, 30)
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
// the reverse: the eye tops diverge
|
|
228
228
|
id: "sad",
|
|
229
|
-
gaze: { ...
|
|
229
|
+
gaze: { ...J },
|
|
230
230
|
split: 16,
|
|
231
|
-
eyes:
|
|
231
|
+
eyes: ht(0.22, 0.4, -28)
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
id: "scared",
|
|
235
|
-
gaze: { ...
|
|
235
|
+
gaze: { ...J },
|
|
236
236
|
split: 20.5,
|
|
237
|
-
eyes:
|
|
237
|
+
eyes: ht(0.4, 0.6)
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
// one eye distinctly more closed than the other
|
|
241
241
|
id: "suspicious",
|
|
242
|
-
gaze: { ...
|
|
242
|
+
gaze: { ...J },
|
|
243
243
|
split: 16,
|
|
244
244
|
eyes: [yt(0.21, 0.4), yt(0.22, 0.15)]
|
|
245
245
|
},
|
|
@@ -248,62 +248,62 @@ const yt = (t, n, e = 0, s = 1) => ({ w: t, h: n, tilt: e, open: s }), ft = (t,
|
|
|
248
248
|
// The narrowed eye is deliberately flat (ratio 1.6): at a ratio near 1 it
|
|
249
249
|
// would read as round and its tilt would not show.
|
|
250
250
|
id: "confused",
|
|
251
|
-
gaze: { ...
|
|
251
|
+
gaze: { ...J },
|
|
252
252
|
split: 16.5,
|
|
253
253
|
eyes: [yt(0.2, 0.44, -18), yt(0.28, 0.17, 14)]
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
id: "curious",
|
|
257
|
-
gaze: { ...
|
|
257
|
+
gaze: { ...J },
|
|
258
258
|
split: 16.5,
|
|
259
259
|
eyes: [yt(0.24, 0.46, -8), yt(0.2, 0.38, -8)]
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
id: "proud",
|
|
263
|
-
gaze: { ...
|
|
263
|
+
gaze: { ...J },
|
|
264
264
|
split: 17,
|
|
265
|
-
eyes:
|
|
265
|
+
eyes: ht(0.3, 0.15, 18)
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
id: "shy",
|
|
269
|
-
gaze: { ...
|
|
269
|
+
gaze: { ...J },
|
|
270
270
|
split: 14,
|
|
271
|
-
eyes:
|
|
271
|
+
eyes: ht(0.17, 0.3)
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
// horizontal slits
|
|
275
275
|
id: "unimpressed",
|
|
276
|
-
gaze: { ...
|
|
276
|
+
gaze: { ...J },
|
|
277
277
|
split: 16,
|
|
278
|
-
eyes:
|
|
278
|
+
eyes: ht(0.3, 0.12)
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
// half-dropped lids: goes through `open`, i.e. the vertical squash on screen,
|
|
282
282
|
// the same mechanism as a blink
|
|
283
283
|
id: "sleepy",
|
|
284
|
-
gaze: { ...
|
|
284
|
+
gaze: { ...J },
|
|
285
285
|
split: 16,
|
|
286
|
-
eyes:
|
|
286
|
+
eyes: ht(0.2, 0.42, 0, 0.42)
|
|
287
287
|
}
|
|
288
|
-
],
|
|
289
|
-
w:
|
|
290
|
-
h:
|
|
291
|
-
tilt:
|
|
292
|
-
open:
|
|
288
|
+
], rs = new Map(un.map((t) => [t.id, t])), is = "neutral", De = (t, n, e) => ({
|
|
289
|
+
w: B(t.w, n.w, e),
|
|
290
|
+
h: B(t.h, n.h, e),
|
|
291
|
+
tilt: B(t.tilt ?? 0, n.tilt ?? 0, e),
|
|
292
|
+
open: B(t.open, n.open, e)
|
|
293
293
|
});
|
|
294
|
-
function
|
|
294
|
+
function as(t, n, e) {
|
|
295
295
|
return {
|
|
296
296
|
id: n.id,
|
|
297
297
|
gaze: {
|
|
298
|
-
yaw:
|
|
299
|
-
pitch:
|
|
300
|
-
roll:
|
|
298
|
+
yaw: B(t.gaze.yaw, n.gaze.yaw, e),
|
|
299
|
+
pitch: B(t.gaze.pitch, n.gaze.pitch, e),
|
|
300
|
+
roll: B(t.gaze.roll, n.gaze.roll, e)
|
|
301
301
|
},
|
|
302
|
-
split:
|
|
303
|
-
eyes: [
|
|
302
|
+
split: B(t.split, n.split, e),
|
|
303
|
+
eyes: [De(t.eyes[0], n.eyes[0], e), De(t.eyes[1], n.eyes[1], e)]
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
-
const ct = 64,
|
|
306
|
+
const ct = 64, cs = {
|
|
307
307
|
// egg: same height as the ball, narrowed
|
|
308
308
|
// frame 164, measured footprint 1.647 x 2.000
|
|
309
309
|
egg: [0.8369, 0.8424, 0.8497, 0.8585, 0.8674, 0.8775, 0.8878, 0.8983, 0.9089, 0.9185, 0.9288, 0.9374, 0.9445, 0.9504, 0.9543, 0.9559, 0.9555, 0.9519, 0.9466, 0.9389, 0.9302, 0.9193, 0.9085, 0.8969, 0.8852, 0.8734, 0.8625, 0.8513, 0.8411, 0.8325, 0.8243, 0.8179, 0.8137, 0.8112, 0.8102, 0.8128, 0.8178, 0.8262, 0.8374, 0.8518, 0.8702, 0.8922, 0.9169, 0.9446, 0.9741, 1.0023, 1.0267, 1.0433, 1.0481, 1.0393, 1.0216, 0.997, 0.9697, 0.9418, 0.9169, 0.8949, 0.876, 0.8604, 0.849, 0.8394, 0.8337, 0.8314, 0.8305, 0.8326],
|
|
@@ -313,10 +313,10 @@ const ct = 64, os = {
|
|
|
313
313
|
// triangle, point up, very rounded corners
|
|
314
314
|
// frame 190, measured footprint 1.995 x 1.884
|
|
315
315
|
triangle: [0.7819, 0.8211, 0.8747, 0.944, 1.0223, 1.096, 1.1401, 1.134, 1.0808, 1.0047, 0.9265, 0.8603, 0.8104, 0.773, 0.745, 0.7273, 0.7151, 0.7118, 0.7148, 0.7245, 0.7427, 0.768, 0.8037, 0.8518, 0.9148, 0.9876, 1.0583, 1.1073, 1.1109, 1.0667, 0.994, 0.9164, 0.8482, 0.7948, 0.7555, 0.7261, 0.7056, 0.6925, 0.6859, 0.6869, 0.6938, 0.7084, 0.7305, 0.7615, 0.804, 0.8595, 0.9311, 1.0092, 1.0791, 1.1171, 1.1054, 1.0501, 0.9779, 0.905, 0.845, 0.799, 0.7656, 0.7413, 0.7258, 0.716, 0.7146, 0.7204, 0.733, 0.7528]
|
|
316
|
-
},
|
|
317
|
-
function
|
|
316
|
+
}, Te = Array.from({ length: ct }, (t, n) => n / ct * K), ae = Te.map(Math.cos), ce = Te.map(Math.sin);
|
|
317
|
+
function ke(t, n = {}) {
|
|
318
318
|
return {
|
|
319
|
-
radii: [...
|
|
319
|
+
radii: [...cs[t]],
|
|
320
320
|
rot: 0,
|
|
321
321
|
cx: 0,
|
|
322
322
|
cy: 0,
|
|
@@ -325,7 +325,7 @@ function ye(t, n = {}) {
|
|
|
325
325
|
...n
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function St(t, n = {}) {
|
|
329
329
|
return {
|
|
330
330
|
radii: new Array(ct).fill(t),
|
|
331
331
|
rot: 0,
|
|
@@ -336,7 +336,7 @@ function Ct(t, n = {}) {
|
|
|
336
336
|
...n
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function ls(t, n, e, s) {
|
|
340
340
|
const o = s ?? {
|
|
341
341
|
radii: new Array(ct),
|
|
342
342
|
rot: 0,
|
|
@@ -345,76 +345,76 @@ function rs(t, n, e, s) {
|
|
|
345
345
|
sx: 1,
|
|
346
346
|
sy: 1
|
|
347
347
|
};
|
|
348
|
-
for (let
|
|
349
|
-
o.radii[
|
|
348
|
+
for (let i = 0; i < ct; i++)
|
|
349
|
+
o.radii[i] = B(t.radii[i] ?? 1, n.radii[i] ?? 1, e);
|
|
350
350
|
let a = n.rot - t.rot;
|
|
351
|
-
for (; a > Math.PI; ) a -=
|
|
352
|
-
for (; a < -Math.PI; ) a +=
|
|
353
|
-
return o.rot = t.rot + a * e, o.cx =
|
|
351
|
+
for (; a > Math.PI; ) a -= K;
|
|
352
|
+
for (; a < -Math.PI; ) a += K;
|
|
353
|
+
return o.rot = t.rot + a * e, o.cx = B(t.cx, n.cx, e), o.cy = B(t.cy, n.cy, e), o.sx = B(t.sx, n.sx, e), o.sy = B(t.sy, n.sy, e), o;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Ne(t, n, e = []) {
|
|
356
356
|
const s = Math.cos(t.rot), o = Math.sin(t.rot);
|
|
357
357
|
for (let a = 0; a < ct; a++) {
|
|
358
|
-
const
|
|
358
|
+
const i = t.radii[a] ?? 1, c = i * (ae[a] ?? 0), l = i * (ce[a] ?? 0), d = c * s - l * o, u = c * o + l * s, h = e[a] ?? { x: 0, y: 0 };
|
|
359
359
|
h.x = (d * t.sx + t.cx) * n, h.y = (u * t.sy + t.cy) * n, e[a] = h;
|
|
360
360
|
}
|
|
361
361
|
return e.length = ct, e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function ds(t, n = 1 / 6) {
|
|
364
364
|
const e = t.length;
|
|
365
365
|
if (e < 3) return "";
|
|
366
366
|
const s = t[0];
|
|
367
|
-
let o = `M${
|
|
367
|
+
let o = `M${A(s.x)} ${A(s.y)}`;
|
|
368
368
|
for (let a = 0; a < e; a++) {
|
|
369
|
-
const
|
|
370
|
-
o += `C${
|
|
369
|
+
const i = t[(a - 1 + e) % e], c = t[a], l = t[(a + 1) % e], d = t[(a + 2) % e], u = c.x + (l.x - i.x) * n, h = c.y + (l.y - i.y) * n, p = l.x - (d.x - c.x) * n, f = l.y - (d.y - c.y) * n;
|
|
370
|
+
o += `C${A(u)} ${A(h)} ${A(p)} ${A(f)} ${A(l.x)} ${A(l.y)}`;
|
|
371
371
|
}
|
|
372
372
|
return `${o}Z`;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Vt(t, n, e) {
|
|
375
375
|
const s = new Array(ct).fill(0), o = t.length;
|
|
376
376
|
for (let a = 0; a < ct; a++) {
|
|
377
|
-
const
|
|
377
|
+
const i = ae[a] ?? 0, c = ce[a] ?? 0;
|
|
378
378
|
let l = 0;
|
|
379
379
|
for (let d = 0; d < o; d++) {
|
|
380
|
-
const u = t[d], h = t[(d + 1) % o], p = h.x - u.x, f = h.y - u.y, _ =
|
|
380
|
+
const u = t[d], h = t[(d + 1) % o], p = h.x - u.x, f = h.y - u.y, _ = i * f - c * p;
|
|
381
381
|
if (Math.abs(_) < 1e-9) continue;
|
|
382
|
-
const
|
|
382
|
+
const b = u.x - n, N = u.y - e, m = (b * f - N * p) / _, w = (b * c - N * i) / _;
|
|
383
383
|
m > l && w >= 0 && w <= 1 && (l = m);
|
|
384
384
|
}
|
|
385
385
|
s[a] = l;
|
|
386
386
|
}
|
|
387
387
|
return s;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Kt(t, n, e, s, o, a, i = 96) {
|
|
390
390
|
const c = s - t, l = o - n, d = Math.hypot(c, l) || 1e-6, u = Math.atan2(l, c), h = Math.acos(Math.max(-1, Math.min(1, (e - a) / d))), p = [];
|
|
391
|
-
for (let f = 0; f <=
|
|
392
|
-
const _ = u + h + (
|
|
391
|
+
for (let f = 0; f <= i / 2; f++) {
|
|
392
|
+
const _ = u + h + (K - 2 * h) * f / (i / 2);
|
|
393
393
|
p.push({ x: t + Math.cos(_) * e, y: n + Math.sin(_) * e });
|
|
394
394
|
}
|
|
395
|
-
for (let f = 0; f <=
|
|
396
|
-
const _ = u - h + 2 * h * f / (
|
|
395
|
+
for (let f = 0; f <= i / 2; f++) {
|
|
396
|
+
const _ = u - h + 2 * h * f / (i / 2);
|
|
397
397
|
p.push({ x: s + Math.cos(_) * a, y: o + Math.sin(_) * a });
|
|
398
398
|
}
|
|
399
399
|
return p;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const e = t.length, s = (n /
|
|
403
|
-
return
|
|
401
|
+
function hn(t, n) {
|
|
402
|
+
const e = t.length, s = (n / K % 1 + 1) % 1 * e, o = Math.floor(s);
|
|
403
|
+
return B(t[o % e] ?? 1, t[(o + 1) % e] ?? 1, s - o);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
return
|
|
407
|
-
const a = Math.abs((
|
|
408
|
-
return (a +
|
|
405
|
+
function us(t, n = 1, e = 1) {
|
|
406
|
+
return Te.map((s, o) => {
|
|
407
|
+
const a = Math.abs((ae[o] ?? 0) / n) ** t, i = Math.abs((ce[o] ?? 0) / e) ** t;
|
|
408
|
+
return (a + i) ** (-1 / t);
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function hs(t) {
|
|
412
412
|
const n = new Array(ct).fill(0);
|
|
413
413
|
for (let e = 0; e < ct; e++) {
|
|
414
|
-
const s =
|
|
414
|
+
const s = ae[e] ?? 0, o = ce[e] ?? 0;
|
|
415
415
|
let a = 0;
|
|
416
|
-
for (const
|
|
417
|
-
const c = s *
|
|
416
|
+
for (const i of t) {
|
|
417
|
+
const c = s * i.x + o * i.y, l = c * c - (i.x * i.x + i.y * i.y - i.r * i.r);
|
|
418
418
|
if (l < 0) continue;
|
|
419
419
|
const d = c + Math.sqrt(l);
|
|
420
420
|
d > a && (a = d);
|
|
@@ -423,16 +423,16 @@ function cs(t) {
|
|
|
423
423
|
}
|
|
424
424
|
return n;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
const s = t.length, o = [], a = (
|
|
428
|
-
const l = c.x -
|
|
426
|
+
function fs(t, n, e = 10) {
|
|
427
|
+
const s = t.length, o = [], a = (i, c) => {
|
|
428
|
+
const l = c.x - i.x, d = c.y - i.y, u = Math.hypot(l, d) || 1;
|
|
429
429
|
return Math.atan2(-l / u, d / u);
|
|
430
430
|
};
|
|
431
|
-
for (let
|
|
432
|
-
const c = t[(
|
|
431
|
+
for (let i = 0; i < s; i++) {
|
|
432
|
+
const c = t[(i - 1 + s) % s], l = t[i], d = t[(i + 1) % s], u = a(c, l);
|
|
433
433
|
let p = a(l, d) - u;
|
|
434
|
-
for (; p > Math.PI; ) p -=
|
|
435
|
-
for (; p < -Math.PI; ) p +=
|
|
434
|
+
for (; p > Math.PI; ) p -= K;
|
|
435
|
+
for (; p < -Math.PI; ) p += K;
|
|
436
436
|
for (let f = 0; f <= e; f++) {
|
|
437
437
|
const _ = u + p * f / e;
|
|
438
438
|
o.push({ x: l.x + Math.cos(_) * n, y: l.y + Math.sin(_) * n });
|
|
@@ -440,40 +440,40 @@ function ls(t, n, e = 10) {
|
|
|
440
440
|
}
|
|
441
441
|
return o;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
const o = s * Math.PI / 180, a = Array.from({ length: t }, (
|
|
445
|
-
const l = o + c / t *
|
|
443
|
+
function Ye(t, n, e, s = 0) {
|
|
444
|
+
const o = s * Math.PI / 180, a = Array.from({ length: t }, (i, c) => {
|
|
445
|
+
const l = o + c / t * K;
|
|
446
446
|
return { x: Math.cos(l) * (n - e), y: Math.sin(l) * (n - e) };
|
|
447
447
|
});
|
|
448
|
-
return
|
|
448
|
+
return Vt(fs(a, e), 0, 0);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function ps(t, n = 1) {
|
|
451
451
|
if (t.length < 3) return "";
|
|
452
452
|
let e = "";
|
|
453
453
|
for (let s = 0; s < t.length; s++) {
|
|
454
454
|
const o = t[s];
|
|
455
|
-
e += `${s === 0 ? "M" : "L"}${
|
|
455
|
+
e += `${s === 0 ? "M" : "L"}${A(o.x * n)} ${A(o.y * n)}`;
|
|
456
456
|
}
|
|
457
457
|
return `${e}Z`;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function _s(t, n) {
|
|
460
460
|
const e = Math.max(t, 0.01) / 2, s = Math.max(n, 0.01) / 2, o = Math.min(e, s);
|
|
461
|
-
return `M${
|
|
461
|
+
return `M${A(-e)} ${A(-s + o)}A${A(o)} ${A(o)} 0 0 1 ${A(-e + o)} ${A(-s)}L${A(e - o)} ${A(-s)}A${A(o)} ${A(o)} 0 0 1 ${A(e)} ${A(-s + o)}L${A(e)} ${A(s - o)}A${A(o)} ${A(o)} 0 0 1 ${A(e - o)} ${A(s)}L${A(-e + o)} ${A(s)}A${A(o)} ${A(o)} 0 0 1 ${A(-e)} ${A(s - o)}Z`;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function le(t, n = 1) {
|
|
464
464
|
const e = Math.max(...t);
|
|
465
465
|
if (e <= 0) return t;
|
|
466
466
|
const s = n / e;
|
|
467
467
|
return t.map((o) => o * s);
|
|
468
468
|
}
|
|
469
|
-
const
|
|
469
|
+
const ms = Array.from(
|
|
470
470
|
{ length: ct },
|
|
471
471
|
(t, n) => n / ct * Math.PI * 2
|
|
472
|
-
),
|
|
473
|
-
|
|
472
|
+
), ys = le(
|
|
473
|
+
ms.map((t) => 1 + 0.075 * Math.cos(2 * t + 0.5) + 0.035 * Math.cos(3 * t + 2.1)),
|
|
474
474
|
1.02
|
|
475
|
-
),
|
|
476
|
-
|
|
475
|
+
), gs = le(
|
|
476
|
+
hs([
|
|
477
477
|
{ x: -0.44, y: 0.2, r: 0.54 },
|
|
478
478
|
{ x: 0.46, y: 0.2, r: 0.5 },
|
|
479
479
|
{ x: 0.02, y: 0.3, r: 0.6 },
|
|
@@ -481,23 +481,23 @@ const hs = Array.from(
|
|
|
481
481
|
{ x: 0.3, y: -0.24, r: 0.44 }
|
|
482
482
|
]),
|
|
483
483
|
1.02
|
|
484
|
-
),
|
|
485
|
-
|
|
484
|
+
), xs = le(
|
|
485
|
+
Vt(Kt(0, 0.28, 0.66, 0, -0.96, 0.05), 0, 0),
|
|
486
486
|
1.04
|
|
487
|
-
),
|
|
487
|
+
), bs = Vt(Kt(-0.42, 0, 0.62, 0.42, 0, 0.62), 0, 0), fn = [
|
|
488
488
|
{ id: "circle", radii: new Array(ct).fill(1) },
|
|
489
|
-
{ id: "pebble", radii:
|
|
489
|
+
{ id: "pebble", radii: ys },
|
|
490
490
|
// 1.15 and not 1.02: on a superellipse the peak radius is the diagonal, so
|
|
491
491
|
// normalising on it yields a shape that looks smaller than the circle.
|
|
492
|
-
{ id: "squircle", radii:
|
|
493
|
-
{ id: "capsule", radii:
|
|
492
|
+
{ id: "squircle", radii: le(us(4.2), 1.15) },
|
|
493
|
+
{ id: "capsule", radii: bs },
|
|
494
494
|
// -90deg: one vertex towards the top of the screen (y points down)
|
|
495
|
-
{ id: "triangle", radii:
|
|
495
|
+
{ id: "triangle", radii: Ye(3, 1.12, 0.34, -90) },
|
|
496
496
|
// 0deg: vertices left and right, so the top and bottom edges come out flat
|
|
497
|
-
{ id: "hexagon", radii:
|
|
498
|
-
{ id: "cloud", radii:
|
|
499
|
-
{ id: "droplet", radii:
|
|
500
|
-
],
|
|
497
|
+
{ id: "hexagon", radii: Ye(6, 1.04, 0.26, 0) },
|
|
498
|
+
{ id: "cloud", radii: gs },
|
|
499
|
+
{ id: "droplet", radii: xs }
|
|
500
|
+
], vs = new Map(fn.map((t) => [t.id, t])), ks = "circle", Ns = [
|
|
501
501
|
{ id: "ink", hex: "var(--novi-color-ink)" },
|
|
502
502
|
{ id: "brown", hex: "var(--novi-color-brown)" },
|
|
503
503
|
{ id: "red", hex: "var(--novi-color-red)" },
|
|
@@ -510,26 +510,26 @@ const hs = Array.from(
|
|
|
510
510
|
{ id: "pink", hex: "var(--novi-color-pink)" },
|
|
511
511
|
{ id: "gray", hex: "var(--novi-color-gray)" },
|
|
512
512
|
{ id: "cream", hex: "var(--novi-color-cream)" }
|
|
513
|
-
],
|
|
514
|
-
function
|
|
513
|
+
], $s = new Map(Ns.map((t) => [t.id, t])), As = "ink";
|
|
514
|
+
function Ms(t, n, e) {
|
|
515
515
|
const s = (c) => {
|
|
516
516
|
const l = parseInt(c.slice(1), 16);
|
|
517
517
|
return [l >> 16 & 255, l >> 8 & 255, l & 255];
|
|
518
518
|
}, o = s(t), a = s(n);
|
|
519
519
|
return `#${o.map((c, l) => Math.round(c + (a[l] - c) * e)).map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const Et = (t, n) => [
|
|
522
522
|
{ w: t, h: n, open: 1 },
|
|
523
523
|
{ w: t, h: n, open: 1 }
|
|
524
524
|
];
|
|
525
525
|
function st(t = {}) {
|
|
526
526
|
return {
|
|
527
|
-
sil:
|
|
527
|
+
sil: St(1),
|
|
528
528
|
offX: 0,
|
|
529
529
|
offY: 0,
|
|
530
|
-
gaze: { ...
|
|
531
|
-
split:
|
|
532
|
-
eyes:
|
|
530
|
+
gaze: { ...ln },
|
|
531
|
+
split: Be,
|
|
532
|
+
eyes: Et(be, ve),
|
|
533
533
|
eyeAlpha: 1,
|
|
534
534
|
bodyAlpha: 1,
|
|
535
535
|
dots: [],
|
|
@@ -539,39 +539,39 @@ function st(t = {}) {
|
|
|
539
539
|
...t
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
const
|
|
543
|
-
|
|
542
|
+
const pn = -0.1875, ws = Vt(
|
|
543
|
+
Kt(0, -0.505, 0.132, 0, 0.13, 0.075),
|
|
544
544
|
0,
|
|
545
|
-
|
|
546
|
-
),
|
|
547
|
-
radii: [...
|
|
545
|
+
pn
|
|
546
|
+
), Is = Vt(Kt(0, -0.2535, 0.1345, 0, 0.2535, 0.1345), 0, 0), zs = (t = {}) => ({
|
|
547
|
+
radii: [...ws],
|
|
548
548
|
rot: 0,
|
|
549
549
|
cx: 0,
|
|
550
|
-
cy:
|
|
550
|
+
cy: pn,
|
|
551
551
|
sx: 1,
|
|
552
552
|
sy: 1,
|
|
553
553
|
...t
|
|
554
|
-
}),
|
|
555
|
-
radii: [
|
|
554
|
+
}), Bs = (t = {}) => ({
|
|
555
|
+
radii: [...Is],
|
|
556
556
|
rot: 0,
|
|
557
557
|
cx: 0,
|
|
558
558
|
cy: 0,
|
|
559
559
|
sx: 1,
|
|
560
560
|
sy: 1,
|
|
561
561
|
...t
|
|
562
|
-
}),
|
|
563
|
-
function
|
|
564
|
-
return
|
|
562
|
+
}), Ts = ps(Kt(0, 0, 0.118, 0, 0.172, 0.012)), Ue = 0.213;
|
|
563
|
+
function Xe(t) {
|
|
564
|
+
return ke("triangle", {
|
|
565
565
|
rot: t,
|
|
566
|
-
cx: -
|
|
567
|
-
cy:
|
|
566
|
+
cx: -Ue * Math.sin(t),
|
|
567
|
+
cy: Ue * Math.cos(t)
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
const e = ((t - n * 0.5) / 1.5 % 1 + 1) % 1, s = e < 0.5 ? 0.5 - 0.5 * Math.cos(e *
|
|
572
|
-
return
|
|
570
|
+
function Ge(t, n) {
|
|
571
|
+
const e = ((t - n * 0.5) / 1.5 % 1 + 1) % 1, s = e < 0.5 ? 0.5 - 0.5 * Math.cos(e * K) : 0;
|
|
572
|
+
return I(s * 2);
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const _n = [
|
|
575
575
|
{
|
|
576
576
|
id: "idle",
|
|
577
577
|
duration: 2.4,
|
|
@@ -589,17 +589,17 @@ const dn = [
|
|
|
589
589
|
baseBody: !1,
|
|
590
590
|
blinkIn: !0,
|
|
591
591
|
pose: (t) => {
|
|
592
|
-
const n =
|
|
592
|
+
const n = Ge(t, 1), e = 0.3 + 0.7 * tt.easeOutCubic(I(t / 0.3));
|
|
593
593
|
return st({
|
|
594
594
|
// the ball BECOMES the middle dot: the morph stays continuous
|
|
595
|
-
sil:
|
|
595
|
+
sil: St(Oe * (1 + (Se - 1) * n), { cx: Pe[1] }),
|
|
596
596
|
eyeAlpha: 0,
|
|
597
597
|
dots: [0, 2].map((s) => {
|
|
598
|
-
const o =
|
|
598
|
+
const o = Ge(t, s);
|
|
599
599
|
return {
|
|
600
|
-
x:
|
|
600
|
+
x: Pe[s] * e,
|
|
601
601
|
y: 0,
|
|
602
|
-
r:
|
|
602
|
+
r: Oe * (1 + (Se - 1) * o),
|
|
603
603
|
opacity: 0.55 + 0.45 * o
|
|
604
604
|
};
|
|
605
605
|
})
|
|
@@ -634,7 +634,7 @@ const dn = [
|
|
|
634
634
|
pose: () => st({
|
|
635
635
|
gaze: { yaw: 6.92, pitch: -21.96, roll: 11.6 },
|
|
636
636
|
split: 18.43,
|
|
637
|
-
eyes:
|
|
637
|
+
eyes: Et(0.356, 0.875)
|
|
638
638
|
})
|
|
639
639
|
},
|
|
640
640
|
{
|
|
@@ -647,18 +647,18 @@ const dn = [
|
|
|
647
647
|
baseBody: !1,
|
|
648
648
|
blinkIn: !1,
|
|
649
649
|
pose: (t) => {
|
|
650
|
-
const n =
|
|
650
|
+
const n = I(t / 1.5), e = tt.easeInOutCubic(n) * 0.82 - 0.087, s = t > 1.6 ? I((t - 1.6) / 0.4) : 0, o = e * (1 - s) + 0.1 * s, a = Math.sin(t * 2.5 * K) * 5e-3, i = 17.7 * Math.PI / 180;
|
|
651
651
|
return st({
|
|
652
|
-
sil:
|
|
652
|
+
sil: Bs({ rot: i, cx: o, cy: -0.325 - a }),
|
|
653
653
|
eyeAlpha: 0,
|
|
654
654
|
dots: [
|
|
655
655
|
{
|
|
656
656
|
// the dot follows the glyph's axis, 0.580 from the bar's centre
|
|
657
|
-
x: o - Math.sin(
|
|
658
|
-
y: -0.325 + Math.cos(
|
|
657
|
+
x: o - Math.sin(i) * 0.58,
|
|
658
|
+
y: -0.325 + Math.cos(i) * 0.58 + a * 2.8,
|
|
659
659
|
r: 0.118,
|
|
660
|
-
d:
|
|
661
|
-
rot:
|
|
660
|
+
d: Ts,
|
|
661
|
+
rot: i * 180 / Math.PI,
|
|
662
662
|
opacity: 1
|
|
663
663
|
}
|
|
664
664
|
]
|
|
@@ -673,17 +673,17 @@ const dn = [
|
|
|
673
673
|
baseFace: !1,
|
|
674
674
|
baseBody: !0,
|
|
675
675
|
pose: (t) => {
|
|
676
|
-
const n =
|
|
676
|
+
const n = I(t / 0.45), e = 1 + (Jn - 1) * Math.sin(n * Math.PI) * (1 - n * 0.35), s = Zn * (n < 1 ? e : 1), o = Kn * Math.PI / 180;
|
|
677
677
|
return st({
|
|
678
678
|
// the gaze goes to the opposite side from the pip
|
|
679
679
|
gaze: { yaw: -21.94, pitch: -5.82, roll: -12.2 },
|
|
680
680
|
split: 18.89,
|
|
681
|
-
eyes:
|
|
681
|
+
eyes: Et(0.505, 0.498),
|
|
682
682
|
notif: {
|
|
683
|
-
x: Math.cos(o) *
|
|
684
|
-
y: Math.sin(o) *
|
|
683
|
+
x: Math.cos(o) * Le,
|
|
684
|
+
y: Math.sin(o) * Le,
|
|
685
685
|
r: s,
|
|
686
|
-
notch: s +
|
|
686
|
+
notch: s + ts
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
689
|
}
|
|
@@ -696,7 +696,7 @@ const dn = [
|
|
|
696
696
|
baseBody: !1,
|
|
697
697
|
blinkIn: !1,
|
|
698
698
|
pose: () => st({
|
|
699
|
-
sil:
|
|
699
|
+
sil: zs(),
|
|
700
700
|
eyeAlpha: 0,
|
|
701
701
|
dots: [{ x: -0.012, y: 0.526, r: 0.113, opacity: 1 }]
|
|
702
702
|
})
|
|
@@ -710,7 +710,7 @@ const dn = [
|
|
|
710
710
|
blinkIn: !1,
|
|
711
711
|
pose: (t) => st({
|
|
712
712
|
// Measured vertical bounce: +-0.19 about +0.11, period 0.6 s.
|
|
713
|
-
sil:
|
|
713
|
+
sil: St(0.1585, { cy: 0.11 + Math.sin(t * (K / 0.6)) * 0.19 }),
|
|
714
714
|
eyeAlpha: 0
|
|
715
715
|
})
|
|
716
716
|
},
|
|
@@ -722,11 +722,11 @@ const dn = [
|
|
|
722
722
|
baseBody: !1,
|
|
723
723
|
blinkIn: !0,
|
|
724
724
|
pose: () => st({
|
|
725
|
-
sil:
|
|
725
|
+
sil: ke("egg"),
|
|
726
726
|
gaze: { yaw: 19.97, pitch: 26.01, roll: -17.1 },
|
|
727
727
|
// the eyes narrow along with the body
|
|
728
728
|
split: 11.07,
|
|
729
|
-
eyes:
|
|
729
|
+
eyes: Et(0.164, 0.385)
|
|
730
730
|
})
|
|
731
731
|
},
|
|
732
732
|
{
|
|
@@ -737,10 +737,10 @@ const dn = [
|
|
|
737
737
|
baseBody: !1,
|
|
738
738
|
blinkIn: !0,
|
|
739
739
|
pose: () => st({
|
|
740
|
-
sil:
|
|
740
|
+
sil: ke("hexagon"),
|
|
741
741
|
gaze: { yaw: 23.11, pitch: 24.42, roll: -13.3 },
|
|
742
742
|
split: 13.37,
|
|
743
|
-
eyes:
|
|
743
|
+
eyes: Et(0.177, 0.411)
|
|
744
744
|
})
|
|
745
745
|
},
|
|
746
746
|
{
|
|
@@ -751,14 +751,14 @@ const dn = [
|
|
|
751
751
|
baseBody: !1,
|
|
752
752
|
blinkIn: !0,
|
|
753
753
|
pose: (t) => {
|
|
754
|
-
const n =
|
|
754
|
+
const n = I(t / 0.35) * I((2.2 - t) / 0.5);
|
|
755
755
|
return st({
|
|
756
|
-
sil:
|
|
756
|
+
sil: Xe(0),
|
|
757
757
|
gaze: { yaw: 12, pitch: -8, roll: -6 },
|
|
758
758
|
split: 15,
|
|
759
|
-
eyes:
|
|
759
|
+
eyes: Et(0.18, 0.34),
|
|
760
760
|
// the bundle sweeps right to left over the triangle
|
|
761
|
-
arcs:
|
|
761
|
+
arcs: Un.map((e, s) => ({
|
|
762
762
|
id: `sw${s}`,
|
|
763
763
|
seed: { ...e, cx: 0.45 - t * 0.42 },
|
|
764
764
|
t,
|
|
@@ -777,29 +777,29 @@ const dn = [
|
|
|
777
777
|
baseBody: !1,
|
|
778
778
|
blinkIn: !1,
|
|
779
779
|
pose: (t) => {
|
|
780
|
-
const n =
|
|
780
|
+
const n = tt.easeInOutCubic(I(t / 0.35)), e = -K * 1.25 * t * n, s = tt.easeInOutCubic(I((t - 1.6) / 0.9)), o = Xe(e), a = St(1, { rot: e }), i = {
|
|
781
781
|
radii: o.radii.map((l, d) => l + (a.radii[d] - l) * s),
|
|
782
782
|
rot: e,
|
|
783
783
|
cx: o.cx * (1 - s),
|
|
784
784
|
cy: o.cy * (1 - s),
|
|
785
785
|
sx: 1,
|
|
786
786
|
sy: 1
|
|
787
|
-
}, c =
|
|
787
|
+
}, c = I(t / 0.8) * I((3.6 - t) / 0.9);
|
|
788
788
|
return st({
|
|
789
|
-
sil:
|
|
789
|
+
sil: i,
|
|
790
790
|
// the eyes race around the sphere ~3x faster than the silhouette
|
|
791
791
|
gaze: {
|
|
792
|
-
yaw:
|
|
792
|
+
yaw: ln.yaw + Math.sin(t * 6.5) * 65 * (1 - s),
|
|
793
793
|
pitch: -4 + s * 32,
|
|
794
794
|
roll: -13
|
|
795
795
|
},
|
|
796
|
-
eyes:
|
|
796
|
+
eyes: Et(0.18, 0.34 + s * 0.07),
|
|
797
797
|
// the rings come in one by one over 0.8 s
|
|
798
|
-
arcs:
|
|
798
|
+
arcs: Ce.map((l, d) => ({
|
|
799
799
|
id: `rg${d}`,
|
|
800
800
|
seed: l,
|
|
801
801
|
t,
|
|
802
|
-
opacity: c *
|
|
802
|
+
opacity: c * I((t - d * 0.13) / 0.3)
|
|
803
803
|
}))
|
|
804
804
|
});
|
|
805
805
|
}
|
|
@@ -836,13 +836,13 @@ const dn = [
|
|
|
836
836
|
pose: (t) => st({
|
|
837
837
|
// three of `orbit`'s six rings: half the bundle is enough to recognise it,
|
|
838
838
|
// and that is as many arcs fewer to rasterise per frame
|
|
839
|
-
arcs:
|
|
839
|
+
arcs: Ce.slice(0, 3).map((n, e) => ({
|
|
840
840
|
id: `sw${e}`,
|
|
841
841
|
seed: n,
|
|
842
842
|
t,
|
|
843
843
|
// they come in one after another then fade before the block ends, so the
|
|
844
844
|
// return to rest happens on an already clean frame
|
|
845
|
-
opacity:
|
|
845
|
+
opacity: I((t - e * 0.06) / 0.14) * I((1.22 - t) / 0.34)
|
|
846
846
|
}))
|
|
847
847
|
})
|
|
848
848
|
},
|
|
@@ -856,11 +856,11 @@ const dn = [
|
|
|
856
856
|
baseBody: !1,
|
|
857
857
|
blinkIn: !1,
|
|
858
858
|
pose: (t) => {
|
|
859
|
-
const n = 1 - 0.834 *
|
|
859
|
+
const n = 1 - 0.834 * tt.easeOutQuint(I(t / 0.7)), e = tt.easeOutQuint(I((t - 1.7) / 0.7));
|
|
860
860
|
return st({
|
|
861
|
-
sil:
|
|
862
|
-
eyeAlpha:
|
|
863
|
-
dots:
|
|
861
|
+
sil: St(n + (1 - n) * e),
|
|
862
|
+
eyeAlpha: I((t - 1.85) / 0.4),
|
|
863
|
+
dots: Gn(t, 1),
|
|
864
864
|
dotsBehind: !0
|
|
865
865
|
});
|
|
866
866
|
}
|
|
@@ -877,18 +877,18 @@ const dn = [
|
|
|
877
877
|
baseBody: !1,
|
|
878
878
|
blinkIn: !1,
|
|
879
879
|
pose: (t) => {
|
|
880
|
-
const n = 1 - (1 -
|
|
880
|
+
const n = 1 - (1 - Qn) * tt.easeOutQuint(I(t / 0.55)), e = tt.easeOutQuint(I((t - 1.85) / 0.6)), s = I((t - 0.15) / 0.25) * I((1.95 - t) / 0.3);
|
|
881
881
|
return st({
|
|
882
882
|
// The dot drifts 0.035 downwards then comes back (measured wobble).
|
|
883
|
-
sil:
|
|
884
|
-
cy: Math.sin(
|
|
883
|
+
sil: St(n + (1 - n) * e, {
|
|
884
|
+
cy: Math.sin(I(t / 1.7) * Math.PI) * 0.035
|
|
885
885
|
}),
|
|
886
|
-
eyeAlpha:
|
|
887
|
-
arcs:
|
|
886
|
+
eyeAlpha: I((t - 2) / 0.35),
|
|
887
|
+
arcs: Wn.map((o, a) => ({ id: `cm${a}`, seed: o, t, opacity: s }))
|
|
888
888
|
});
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
],
|
|
891
|
+
], jt = new Map(_n.map((t) => [t.id, t])), Rs = {
|
|
892
892
|
idle: 1,
|
|
893
893
|
thinking: 1.1,
|
|
894
894
|
wink: 0.8,
|
|
@@ -904,7 +904,7 @@ const dn = [
|
|
|
904
904
|
swirl: 0.5,
|
|
905
905
|
burst: 0.45,
|
|
906
906
|
comet: 1.15
|
|
907
|
-
},
|
|
907
|
+
}, ba = [
|
|
908
908
|
"idle",
|
|
909
909
|
"thinking",
|
|
910
910
|
"wink",
|
|
@@ -919,163 +919,163 @@ const dn = [
|
|
|
919
919
|
"orbit",
|
|
920
920
|
"burst",
|
|
921
921
|
"comet"
|
|
922
|
-
],
|
|
923
|
-
function
|
|
924
|
-
const s = [], o =
|
|
922
|
+
], kt = 100, We = 5.5 + 1.6, Qe = 4.2 + 1.3, Es = 6e-3, Cs = 7e-3;
|
|
923
|
+
function Ve(t, n, e) {
|
|
924
|
+
const s = [], o = dn(t.gaze, kt, t.split);
|
|
925
925
|
for (let a = 0; a < 2; a++) {
|
|
926
|
-
const
|
|
927
|
-
if (
|
|
928
|
-
const c = t.eyes[a], l = (c.tilt ?? 0) * Math.PI / 180, d = Math.cos(l), u = Math.sin(l), h =
|
|
926
|
+
const i = o[a];
|
|
927
|
+
if (i.depth <= 0.02) continue;
|
|
928
|
+
const c = t.eyes[a], l = (c.tilt ?? 0) * Math.PI / 180, d = Math.cos(l), u = Math.sin(l), h = i.a * d + i.c * u, p = i.b * d + i.d * u, f = -i.a * u + i.c * d, _ = -i.b * u + i.d * d, b = Math.max(c.w * kt, 0.01) / 2, N = Math.max(c.h * kt, 0.01) / 2, m = Math.min(b, N), w = N > b, v = w ? N - m : b - m, g = hn(e, Math.atan2(i.y, i.x) - n.rot);
|
|
929
929
|
s.push({
|
|
930
|
-
x:
|
|
931
|
-
y:
|
|
932
|
-
ax: (w ? f : h) *
|
|
933
|
-
ay: (w ? _ : p) *
|
|
930
|
+
x: i.x * g,
|
|
931
|
+
y: i.y * g,
|
|
932
|
+
ax: (w ? f : h) * v,
|
|
933
|
+
ay: (w ? _ : p) * v,
|
|
934
934
|
r: m,
|
|
935
935
|
m: [h, p, f, _]
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
return s;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
const a = s - n,
|
|
940
|
+
function Ps(t, n, e, s, o) {
|
|
941
|
+
const a = s - n, i = o - e, c = a * a + i * i;
|
|
942
942
|
let l = 1 / 0, d = 0, u = 0;
|
|
943
943
|
for (let p = 0; p < t.length; p++) {
|
|
944
944
|
const f = t[p];
|
|
945
|
-
let _ = c > 0 ? ((f.x - n) * a + (f.y - e) *
|
|
945
|
+
let _ = c > 0 ? ((f.x - n) * a + (f.y - e) * i) / c : 0;
|
|
946
946
|
_ = _ < 0 ? 0 : _ > 1 ? 1 : _;
|
|
947
|
-
const
|
|
948
|
-
m < l && (l = m, d =
|
|
947
|
+
const b = n + _ * a - f.x, N = e + _ * i - f.y, m = b * b + N * N;
|
|
948
|
+
m < l && (l = m, d = b, u = N);
|
|
949
949
|
}
|
|
950
950
|
const h = Math.sqrt(l);
|
|
951
951
|
return { d: h, ux: h > 1e-9 ? d / h : 0, uy: h > 1e-9 ? u / h : 0 };
|
|
952
952
|
}
|
|
953
|
-
const
|
|
954
|
-
function
|
|
955
|
-
let o = 1 / 0, a = 0,
|
|
953
|
+
const Os = Math.hypot(Es, Cs) * kt;
|
|
954
|
+
function Ke(t, n, e, s) {
|
|
955
|
+
let o = 1 / 0, a = 0, i = 0;
|
|
956
956
|
for (const c of n) {
|
|
957
|
-
const l = c.x + e, d = c.y + s, u =
|
|
958
|
-
u.d -
|
|
957
|
+
const l = c.x + e, d = c.y + s, u = Ps(t, l - c.ax, d - c.ay, l + c.ax, d + c.ay), [h, p, f, _] = c.m, b = c.r * Math.hypot(h * u.ux + p * u.uy, f * u.ux + _ * u.uy) + Os;
|
|
958
|
+
u.d - b < o && (o = u.d - b, a = u.ux, i = u.uy);
|
|
959
959
|
}
|
|
960
|
-
return { margin: o, ux: a, uy:
|
|
960
|
+
return { margin: o, ux: a, uy: i };
|
|
961
961
|
}
|
|
962
|
-
const
|
|
963
|
-
function
|
|
962
|
+
const Ze = 12, Ss = 8;
|
|
963
|
+
function js(t) {
|
|
964
964
|
if (!t.length) return { x: 0, y: 0 };
|
|
965
965
|
const n = (m, w) => {
|
|
966
|
-
let
|
|
967
|
-
for (const
|
|
968
|
-
return
|
|
966
|
+
let v = 1 / 0;
|
|
967
|
+
for (const g of t) v = Math.min(v, Ke(g.outline, g.footprints, m, w).margin);
|
|
968
|
+
return v;
|
|
969
969
|
};
|
|
970
970
|
let e = 1 / 0;
|
|
971
971
|
for (const m of t)
|
|
972
|
-
e = Math.min(e,
|
|
972
|
+
e = Math.min(e, Ke(m.refOutline, m.reference, 0, 0).margin);
|
|
973
973
|
let s = 0, o = 0;
|
|
974
974
|
const a = t[0].footprints;
|
|
975
975
|
for (const m of a)
|
|
976
976
|
s -= m.x / a.length, o -= m.y / a.length;
|
|
977
|
-
const
|
|
977
|
+
const i = Math.max(0.35 * kt, Math.hypot(s, o) * 1.25);
|
|
978
978
|
e = Math.min(e, n(s, o));
|
|
979
979
|
const c = n(0, 0);
|
|
980
980
|
if (c >= e && c >= 0) return { x: 0, y: 0 };
|
|
981
981
|
const l = Math.max(e, 0);
|
|
982
982
|
let d = 0, u = 0, h = 1 / 0, p = 0, f = 0, _ = c;
|
|
983
|
-
for (let m = 0; m <
|
|
984
|
-
const w = m /
|
|
985
|
-
if (n(
|
|
986
|
-
for (const
|
|
987
|
-
const
|
|
988
|
-
|
|
983
|
+
for (let m = 0; m < Ze; m++) {
|
|
984
|
+
const w = m / Ze * Math.PI * 2, v = Math.cos(w), g = Math.sin(w);
|
|
985
|
+
if (n(v * i, g * i) < l) {
|
|
986
|
+
for (const k of [0.3, 0.6, 1]) {
|
|
987
|
+
const L = n(v * i * k, g * i * k);
|
|
988
|
+
L > _ && (_ = L, p = v * i * k, f = g * i * k);
|
|
989
989
|
}
|
|
990
990
|
continue;
|
|
991
991
|
}
|
|
992
|
-
let
|
|
993
|
-
for (let
|
|
994
|
-
const
|
|
995
|
-
n(
|
|
992
|
+
let M = 0, R = i;
|
|
993
|
+
for (let k = 0; k < Ss; k++) {
|
|
994
|
+
const L = (M + R) / 2;
|
|
995
|
+
n(v * L, g * L) >= l ? R = L : M = L;
|
|
996
996
|
}
|
|
997
|
-
|
|
997
|
+
R < h && (h = R, d = v * R, u = g * R);
|
|
998
998
|
}
|
|
999
|
-
const
|
|
1000
|
-
return { x: +(
|
|
999
|
+
const b = h === 1 / 0 ? p : d, N = h === 1 / 0 ? f : u;
|
|
1000
|
+
return { x: +(b / kt).toFixed(6), y: +(N / kt).toFixed(6) };
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function qs(t, n, e) {
|
|
1003
1003
|
return t.baseFace && e ? { gaze: e.gaze, split: e.split, eyes: e.eyes } : { gaze: n.gaze, split: n.split, eyes: n.eyes };
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Ls(t) {
|
|
1006
1006
|
const n = (s) => JSON.stringify([s.gaze, s.split, s.eyes, s.sil.rot, s.sil.cx, s.sil.cy, s.sil.sx, s.sil.sy]);
|
|
1007
1007
|
if (n(t.pose(0)) === n(t.pose(t.duration))) return [0];
|
|
1008
1008
|
const e = 3;
|
|
1009
1009
|
return Array.from({ length: e }, (s, o) => o / (e - 1) * t.duration);
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function Hs(t, n, e) {
|
|
1012
1012
|
const s = [];
|
|
1013
|
-
for (const o of
|
|
1014
|
-
const a = t.pose(o),
|
|
1015
|
-
for (const u of [-
|
|
1016
|
-
for (const h of [-
|
|
1013
|
+
for (const o of Ls(t)) {
|
|
1014
|
+
const a = t.pose(o), i = Ne({ ...a.sil, radii: n }, kt), c = Ne(a.sil, kt), l = qs(t, a, e), d = [];
|
|
1015
|
+
for (const u of [-We, We])
|
|
1016
|
+
for (const h of [-Qe, Qe])
|
|
1017
1017
|
d.push({
|
|
1018
1018
|
...l,
|
|
1019
1019
|
gaze: { yaw: l.gaze.yaw + u, pitch: l.gaze.pitch + h, roll: l.gaze.roll }
|
|
1020
1020
|
});
|
|
1021
1021
|
for (const u of d)
|
|
1022
1022
|
s.push({
|
|
1023
|
-
footprints:
|
|
1024
|
-
reference:
|
|
1025
|
-
outline:
|
|
1023
|
+
footprints: Ve(u, a.sil, n),
|
|
1024
|
+
reference: Ve(u, a.sil, a.sil.radii),
|
|
1025
|
+
outline: i,
|
|
1026
1026
|
refOutline: c
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
|
-
return
|
|
1029
|
+
return js(s);
|
|
1030
1030
|
}
|
|
1031
|
-
const
|
|
1032
|
-
function
|
|
1031
|
+
const fe = { x: 0, y: 0 }, $e = (t, n) => `${t}|${n ?? ""}`;
|
|
1032
|
+
function Fs() {
|
|
1033
1033
|
return new Map(
|
|
1034
|
-
|
|
1034
|
+
fn.map((t) => {
|
|
1035
1035
|
const n = /* @__PURE__ */ new Map();
|
|
1036
|
-
for (const e of
|
|
1036
|
+
for (const e of _n) {
|
|
1037
1037
|
if (!e.baseBody) continue;
|
|
1038
|
-
const s = e.baseFace ? [null, ...
|
|
1038
|
+
const s = e.baseFace ? [null, ...un] : [null];
|
|
1039
1039
|
for (const o of s)
|
|
1040
|
-
n.set(
|
|
1040
|
+
n.set($e(e.id, (o == null ? void 0 : o.id) ?? null), Hs(e, t.radii, o));
|
|
1041
1041
|
}
|
|
1042
1042
|
return [t.radii, n];
|
|
1043
1043
|
})
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1047
|
-
function
|
|
1048
|
-
if (!t) return
|
|
1049
|
-
const s =
|
|
1050
|
-
return s ? s.get(
|
|
1051
|
-
}
|
|
1052
|
-
const
|
|
1053
|
-
yaw:
|
|
1054
|
-
pitch:
|
|
1055
|
-
mix:
|
|
1056
|
-
spin:
|
|
1057
|
-
wander:
|
|
1058
|
-
}),
|
|
1059
|
-
w:
|
|
1060
|
-
h:
|
|
1061
|
-
open:
|
|
1062
|
-
tilt:
|
|
1046
|
+
const Ds = Fs();
|
|
1047
|
+
function Je(t, n, e) {
|
|
1048
|
+
if (!t) return fe;
|
|
1049
|
+
const s = Ds.get(t);
|
|
1050
|
+
return s ? s.get($e(n, e)) ?? s.get($e(n, null)) ?? fe : fe;
|
|
1051
|
+
}
|
|
1052
|
+
const pe = { yaw: 0, pitch: 0, mix: 0, spin: 0, wander: 1 }, Ys = (t, n, e) => ({
|
|
1053
|
+
yaw: B(t.yaw, n.yaw, e),
|
|
1054
|
+
pitch: B(t.pitch, n.pitch, e),
|
|
1055
|
+
mix: B(t.mix, n.mix, e),
|
|
1056
|
+
spin: B(t.spin, n.spin, e),
|
|
1057
|
+
wander: B(t.wander, n.wander, e)
|
|
1058
|
+
}), tn = (t, n, e) => ({
|
|
1059
|
+
w: B(t.w, n.w, e),
|
|
1060
|
+
h: B(t.h, n.h, e),
|
|
1061
|
+
open: B(t.open, n.open, e),
|
|
1062
|
+
tilt: B(t.tilt ?? 0, n.tilt ?? 0, e)
|
|
1063
1063
|
});
|
|
1064
|
-
function
|
|
1064
|
+
function en(t, n, e) {
|
|
1065
1065
|
const s = 1 - e;
|
|
1066
1066
|
return {
|
|
1067
|
-
sil:
|
|
1068
|
-
offX:
|
|
1069
|
-
offY:
|
|
1067
|
+
sil: ls(t.sil, n.sil, e),
|
|
1068
|
+
offX: B(t.offX, n.offX, e),
|
|
1069
|
+
offY: B(t.offY, n.offY, e),
|
|
1070
1070
|
gaze: {
|
|
1071
|
-
yaw:
|
|
1072
|
-
pitch:
|
|
1073
|
-
roll:
|
|
1071
|
+
yaw: B(t.gaze.yaw, n.gaze.yaw, e),
|
|
1072
|
+
pitch: B(t.gaze.pitch, n.gaze.pitch, e),
|
|
1073
|
+
roll: B(t.gaze.roll, n.gaze.roll, e)
|
|
1074
1074
|
},
|
|
1075
|
-
split:
|
|
1076
|
-
eyes: [
|
|
1077
|
-
eyeAlpha:
|
|
1078
|
-
bodyAlpha:
|
|
1075
|
+
split: B(t.split, n.split, e),
|
|
1076
|
+
eyes: [tn(t.eyes[0], n.eyes[0], e), tn(t.eyes[1], n.eyes[1], e)],
|
|
1077
|
+
eyeAlpha: B(t.eyeAlpha, n.eyeAlpha, e),
|
|
1078
|
+
bodyAlpha: B(t.bodyAlpha, n.bodyAlpha, e),
|
|
1079
1079
|
dots: [
|
|
1080
1080
|
...t.dots.map((o) => ({ ...o, opacity: o.opacity * s })),
|
|
1081
1081
|
...n.dots.map((o) => ({ ...o, opacity: o.opacity * e }))
|
|
@@ -1089,9 +1089,9 @@ function We(t, n, e) {
|
|
|
1089
1089
|
dotsBehind: e < 0.5 ? t.dotsBehind : n.dotsBehind
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
|
-
const
|
|
1092
|
+
const vt = class vt {
|
|
1093
1093
|
constructor(n = 100, e = "idle", s = null, o = null) {
|
|
1094
|
-
this.prev = null, this.frozenStart = null, this.tCur = 0, this.tPrev = 0, this.blinkAt = -10, this.pts = [], this.shape = null, this.shapePrev = null, this.shapeAt = -10, this.expr = null, this.exprPrev = null, this.exprAt = -10, this.look =
|
|
1094
|
+
this.prev = null, this.frozenStart = null, this.tCur = 0, this.tPrev = 0, this.blinkAt = -10, this.pts = [], this.shape = null, this.shapePrev = null, this.shapeAt = -10, this.expr = null, this.exprPrev = null, this.exprAt = -10, this.look = pe, this.lookPrev = pe, this.lookAt = -10, this.lookMorph = 0.24, this.scale = n, this.cur = e, this.shape = s, this.expr = o;
|
|
1095
1095
|
}
|
|
1096
1096
|
/**
|
|
1097
1097
|
* The resting expression chosen in the customiser. Like the shape, it glides
|
|
@@ -1104,8 +1104,8 @@ const bt = class bt {
|
|
|
1104
1104
|
exprAtTime(n) {
|
|
1105
1105
|
const e = this.expr, s = this.exprPrev;
|
|
1106
1106
|
if (!e || !s) return e;
|
|
1107
|
-
const o = (n - this.exprAt) /
|
|
1108
|
-
return o >= 1 ? e :
|
|
1107
|
+
const o = (n - this.exprAt) / vt.SHAPE_MORPH;
|
|
1108
|
+
return o >= 1 ? e : as(s, e, tt.easeOutQuint(I(o)));
|
|
1109
1109
|
}
|
|
1110
1110
|
/**
|
|
1111
1111
|
* The shape chosen in the customiser. It only replaces the body on the resting
|
|
@@ -1128,10 +1128,10 @@ const bt = class bt {
|
|
|
1128
1128
|
shapeAtTime(n) {
|
|
1129
1129
|
const e = this.shape, s = this.shapePrev;
|
|
1130
1130
|
if (!e || !s) return e;
|
|
1131
|
-
const o = (n - this.shapeAt) /
|
|
1131
|
+
const o = (n - this.shapeAt) / vt.SHAPE_MORPH;
|
|
1132
1132
|
if (o >= 1) return e;
|
|
1133
|
-
const a =
|
|
1134
|
-
return e.map((
|
|
1133
|
+
const a = tt.easeOutQuint(I(o));
|
|
1134
|
+
return e.map((i, c) => B(s[c] ?? i, i, a));
|
|
1135
1135
|
}
|
|
1136
1136
|
/**
|
|
1137
1137
|
* A new gaze target, `null` to fall back to the state's own.
|
|
@@ -1145,13 +1145,13 @@ const bt = class bt {
|
|
|
1145
1145
|
* setter, never through a variable read during `sample`, or the engine stops being
|
|
1146
1146
|
* a pure function of time.
|
|
1147
1147
|
*/
|
|
1148
|
-
setLook(n, e, s =
|
|
1149
|
-
n && !Number.isFinite(n.yaw + n.pitch + n.mix + n.spin + n.wander) || (this.lookPrev = this.lookAtTime(e), this.look = n ??
|
|
1148
|
+
setLook(n, e, s = vt.LOOK_MORPH) {
|
|
1149
|
+
n && !Number.isFinite(n.yaw + n.pitch + n.mix + n.spin + n.wander) || (this.lookPrev = this.lookAtTime(e), this.look = n ?? pe, this.lookAt = e, this.lookMorph = s);
|
|
1150
1150
|
}
|
|
1151
1151
|
/** The effective gaze at `now`, catch-up in progress included. */
|
|
1152
1152
|
lookAtTime(n) {
|
|
1153
1153
|
const e = (n - this.lookAt) / this.lookMorph;
|
|
1154
|
-
return e >= 1 ? this.look :
|
|
1154
|
+
return e >= 1 ? this.look : Ys(this.lookPrev, this.look, tt.easeOutQuint(I(e)));
|
|
1155
1155
|
}
|
|
1156
1156
|
posed(n, e, s, o) {
|
|
1157
1157
|
let a = n.pose(e);
|
|
@@ -1170,24 +1170,24 @@ const bt = class bt {
|
|
|
1170
1170
|
* frame, so it has no identity and exists in no table.
|
|
1171
1171
|
*/
|
|
1172
1172
|
eyeOffsetAtTime(n, e) {
|
|
1173
|
-
const s = (a,
|
|
1173
|
+
const s = (a, i, c, l) => {
|
|
1174
1174
|
if (c === l) return l;
|
|
1175
|
-
const d = (n - a) /
|
|
1175
|
+
const d = (n - a) / i;
|
|
1176
1176
|
if (d >= 1) return l;
|
|
1177
|
-
const u =
|
|
1178
|
-
return { x:
|
|
1177
|
+
const u = tt.easeOutQuint(I(d));
|
|
1178
|
+
return { x: B(c.x, l.x, u), y: B(c.y, l.y, u) };
|
|
1179
1179
|
}, o = (a) => {
|
|
1180
|
-
var
|
|
1180
|
+
var i, c;
|
|
1181
1181
|
return s(
|
|
1182
1182
|
this.exprAt,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1183
|
+
vt.SHAPE_MORPH,
|
|
1184
|
+
Je(a, e, ((i = this.exprPrev) == null ? void 0 : i.id) ?? null),
|
|
1185
|
+
Je(a, e, ((c = this.expr) == null ? void 0 : c.id) ?? null)
|
|
1186
1186
|
);
|
|
1187
1187
|
};
|
|
1188
1188
|
return s(
|
|
1189
1189
|
this.shapeAt,
|
|
1190
|
-
|
|
1190
|
+
vt.SHAPE_MORPH,
|
|
1191
1191
|
o(this.shapePrev),
|
|
1192
1192
|
o(this.shape)
|
|
1193
1193
|
);
|
|
@@ -1219,7 +1219,7 @@ const bt = class bt {
|
|
|
1219
1219
|
fadeOrigin(n, e, s) {
|
|
1220
1220
|
if (this.frozenStart) return this.frozenStart;
|
|
1221
1221
|
if (!this.prev) return null;
|
|
1222
|
-
const o =
|
|
1222
|
+
const o = jt.get(this.prev);
|
|
1223
1223
|
return this.posed(o, Math.max(0, n - this.tPrev), e, s);
|
|
1224
1224
|
}
|
|
1225
1225
|
/**
|
|
@@ -1228,10 +1228,10 @@ const bt = class bt {
|
|
|
1228
1228
|
* freeze it.
|
|
1229
1229
|
*/
|
|
1230
1230
|
composedPose(n) {
|
|
1231
|
-
const e =
|
|
1232
|
-
if (
|
|
1231
|
+
const e = jt.get(this.cur), s = this.shapeAtTime(n), o = this.exprAtTime(n), a = this.posed(e, Math.max(0, n - this.tCur), s, o), i = n - this.tCur;
|
|
1232
|
+
if (i >= e.morph) return a;
|
|
1233
1233
|
const c = this.fadeOrigin(n, s, o);
|
|
1234
|
-
return c ?
|
|
1234
|
+
return c ? en(c, a, tt.easeOutQuint(I(i / e.morph))) : a;
|
|
1235
1235
|
}
|
|
1236
1236
|
/**
|
|
1237
1237
|
* A dated state change.
|
|
@@ -1254,109 +1254,109 @@ const bt = class bt {
|
|
|
1254
1254
|
setState(n, e) {
|
|
1255
1255
|
var a;
|
|
1256
1256
|
if (n === this.cur) return;
|
|
1257
|
-
const s =
|
|
1258
|
-
this.frozenStart = o ? this.composedPose(e) : null, this.prev = this.cur, this.tPrev = this.tCur, this.cur = n, this.tCur = e, (a =
|
|
1257
|
+
const s = jt.get(this.cur).morph, o = this.prev !== null && e - this.tCur < s;
|
|
1258
|
+
this.frozenStart = o ? this.composedPose(e) : null, this.prev = this.cur, this.tPrev = this.tCur, this.cur = n, this.tCur = e, (a = jt.get(n)) != null && a.blinkIn && (this.blinkAt = e);
|
|
1259
1259
|
}
|
|
1260
1260
|
sample(n) {
|
|
1261
|
-
const e = this.scale, s =
|
|
1262
|
-
let
|
|
1261
|
+
const e = this.scale, s = jt.get(this.cur), o = this.shapeAtTime(n), a = this.exprAtTime(n);
|
|
1262
|
+
let i = this.posed(s, Math.max(0, n - this.tCur), o, a), c = this.eyeOffsetAtTime(n, this.cur);
|
|
1263
1263
|
const l = n - this.tCur, d = l < s.morph ? this.fadeOrigin(n, o, a) : null;
|
|
1264
1264
|
if (d) {
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1269
|
-
const
|
|
1265
|
+
const z = tt.easeOutQuint(I(l / s.morph));
|
|
1266
|
+
i = en(d, i, z);
|
|
1267
|
+
const O = this.prev;
|
|
1268
|
+
if (O) {
|
|
1269
|
+
const S = this.eyeOffsetAtTime(n, O);
|
|
1270
1270
|
c = {
|
|
1271
|
-
x:
|
|
1272
|
-
y:
|
|
1271
|
+
x: B(S.x, c.x, z),
|
|
1272
|
+
y: B(S.y, c.y, z)
|
|
1273
1273
|
};
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
|
-
const u =
|
|
1276
|
+
const u = i.eyeAlpha > 0.01, h = this.lookAtTime(n), p = ss(n, { wander: u ? h.wander : 0, blink: u }), f = {
|
|
1277
1277
|
// Both aims REPLACE the pose's instead of adding to them (see `Look`), and the
|
|
1278
1278
|
// turn is subtracted on the way. The drift is added AFTER the mix, otherwise
|
|
1279
1279
|
// the target would cancel it along with the pose — and it has to survive a
|
|
1280
1280
|
// turned head with no pointer.
|
|
1281
|
-
yaw:
|
|
1282
|
-
pitch:
|
|
1281
|
+
yaw: B(i.gaze.yaw, h.yaw, h.mix) + p.dYaw - h.spin,
|
|
1282
|
+
pitch: B(i.gaze.pitch, h.pitch, h.mix) + p.dPitch,
|
|
1283
1283
|
// the roll follows nothing: Novi's head is tilted -13deg in the reference, and
|
|
1284
1284
|
// rolling it with the cursor breaks that signature
|
|
1285
|
-
roll:
|
|
1286
|
-
}, _ =
|
|
1287
|
-
...
|
|
1288
|
-
cx:
|
|
1289
|
-
cy:
|
|
1290
|
-
sy:
|
|
1291
|
-
},
|
|
1292
|
-
if (
|
|
1293
|
-
const
|
|
1294
|
-
for (let
|
|
1295
|
-
const
|
|
1296
|
-
if (
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
d:
|
|
1300
|
-
matrix: `matrix(${
|
|
1301
|
-
alpha:
|
|
1285
|
+
roll: i.gaze.roll + p.dRoll
|
|
1286
|
+
}, _ = I((n - this.blinkAt) / 0.2), b = _ < 1 ? Math.abs(_ * 2 - 1) : 1, N = Math.min(p.lid, b), m = i.offX + p.driftX, w = i.offY + p.driftY, v = {
|
|
1287
|
+
...i.sil,
|
|
1288
|
+
cx: i.sil.cx + m,
|
|
1289
|
+
cy: i.sil.cy + w,
|
|
1290
|
+
sy: i.sil.sy * p.breath
|
|
1291
|
+
}, g = ds(Ne(v, e, this.pts)), M = (z, O) => hn(i.sil.radii, Math.atan2(O, z) - i.sil.rot), R = [];
|
|
1292
|
+
if (i.eyeAlpha > 0.01) {
|
|
1293
|
+
const z = dn(f, e, i.split);
|
|
1294
|
+
for (let O = 0; O < 2; O++) {
|
|
1295
|
+
const S = z[O];
|
|
1296
|
+
if (S.depth <= 0.02) continue;
|
|
1297
|
+
const W = i.eyes[O], H = M(S.x, S.y), ft = (W.tilt ?? 0) * Math.PI / 180, Q = Math.cos(ft), D = Math.sin(ft), Z = S.a * Q + S.c * D, x = S.b * Q + S.d * D, j = -S.a * D + S.c * Q, E = -S.b * D + S.d * Q, Y = os(Math.min(N, W.open));
|
|
1298
|
+
R.push({
|
|
1299
|
+
d: _s(W.w * e, W.h * e),
|
|
1300
|
+
matrix: `matrix(${A(Z)},${A(x * Y)},${A(j)},${A(E * Y)},${A(S.x * H + (m + c.x) * e)},${A(S.y * H + (w + c.y) * e)})`,
|
|
1301
|
+
alpha: i.eyeAlpha * I(S.depth / 0.12)
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1305
|
+
const k = i.dots.filter((z) => z.opacity > 0.01 && z.r > 5e-4).map((z) => ({ ...z, x: (z.x + m) * e, y: (z.y + w) * e, r: z.r * e })), L = i.notif ? M(i.notif.x, i.notif.y) : 1, q = i.notif ? (i.notif.x * L + m) * e : 0, U = i.notif ? (i.notif.y * L + w) * e : 0, P = i.notif ? { x: q, y: U, r: i.notif.r * e } : null, G = i.notif ? { x: q, y: U, r: i.notif.notch * e } : null;
|
|
1306
1306
|
return {
|
|
1307
|
-
bodyPath:
|
|
1308
|
-
bodyAlpha:
|
|
1309
|
-
eyes:
|
|
1310
|
-
dots:
|
|
1311
|
-
dotsBehind:
|
|
1307
|
+
bodyPath: g,
|
|
1308
|
+
bodyAlpha: i.bodyAlpha,
|
|
1309
|
+
eyes: R,
|
|
1310
|
+
dots: k,
|
|
1311
|
+
dotsBehind: i.dotsBehind,
|
|
1312
1312
|
// States declare arcs in ball-radius units; the engine alone knows the viewBox
|
|
1313
1313
|
// scale, so the engine is what rasterises them.
|
|
1314
|
-
arcs:
|
|
1315
|
-
notif:
|
|
1316
|
-
notch:
|
|
1314
|
+
arcs: i.arcs.filter((z) => z.opacity > 0.01).map((z) => Yn(z.seed, z.t, e, z.id, z.opacity)),
|
|
1315
|
+
notif: P,
|
|
1316
|
+
notch: G
|
|
1317
1317
|
};
|
|
1318
1318
|
}
|
|
1319
1319
|
};
|
|
1320
|
-
|
|
1321
|
-
let
|
|
1322
|
-
const
|
|
1320
|
+
vt.SHAPE_MORPH = 0.45, vt.LOOK_MORPH = 0.24;
|
|
1321
|
+
let Ae = vt;
|
|
1322
|
+
const mn = 100, Us = 158, Xs = 16, Gs = 13, Ws = 10, yn = 360, _e = 1.1, Qs = 1.5, va = (t) => ({
|
|
1323
1323
|
yaw: 0,
|
|
1324
1324
|
pitch: 0,
|
|
1325
1325
|
mix: 0,
|
|
1326
|
-
spin:
|
|
1326
|
+
spin: yn * (1 - tt.easeInOutCubic(I(t / Qs))),
|
|
1327
1327
|
wander: 1
|
|
1328
1328
|
});
|
|
1329
|
-
function
|
|
1329
|
+
function Vs({ nx: t, ny: n, progress: e, pointer: s, turn: o = 0 }) {
|
|
1330
1330
|
return {
|
|
1331
|
-
yaw: o + t *
|
|
1331
|
+
yaw: o + t * Xs,
|
|
1332
1332
|
// positive pitch = looking up, whereas the screen's y goes down
|
|
1333
|
-
pitch:
|
|
1333
|
+
pitch: Ws - n * Gs,
|
|
1334
1334
|
mix: e,
|
|
1335
|
-
spin:
|
|
1335
|
+
spin: yn * (1 - e),
|
|
1336
1336
|
// With no pointer the head stays turned, but its drift is given back: otherwise
|
|
1337
1337
|
// Novi stares at a dead point, and arriving by keyboard or touch gave a
|
|
1338
1338
|
// completely motionless avatar.
|
|
1339
1339
|
wander: s ? 0 : 1
|
|
1340
1340
|
};
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Ks(t, n) {
|
|
1343
1343
|
if (/^#[0-9a-f]{6}$/i.test(t)) return t;
|
|
1344
1344
|
const e = t.match(/-?\d*\.?\d+/g);
|
|
1345
1345
|
return !e || e.length < 3 ? n : `#${e.slice(0, 3).map(
|
|
1346
1346
|
(s) => Math.max(0, Math.min(255, Math.round(Number(s)))).toString(16).padStart(2, "0")
|
|
1347
1347
|
).join("")}`;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function nn(t, n) {
|
|
1350
1350
|
if (typeof document > "u") return n;
|
|
1351
1351
|
const e = document.createElement("span");
|
|
1352
1352
|
e.style.color = t, e.style.position = "absolute", e.style.visibility = "hidden", e.style.pointerEvents = "none", document.documentElement.appendChild(e);
|
|
1353
1353
|
const s = getComputedStyle(e).color;
|
|
1354
|
-
return e.remove(),
|
|
1354
|
+
return e.remove(), Ks(s, n);
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
const [e, s] = at(() =>
|
|
1358
|
-
return
|
|
1359
|
-
const o = () => s(
|
|
1356
|
+
function me(t, n) {
|
|
1357
|
+
const [e, s] = at(() => nn(t, n));
|
|
1358
|
+
return et(() => {
|
|
1359
|
+
const o = () => s(nn(t, n));
|
|
1360
1360
|
o();
|
|
1361
1361
|
const a = new MutationObserver(o);
|
|
1362
1362
|
return a.observe(document.documentElement, {
|
|
@@ -1365,157 +1365,157 @@ function ue(t, n) {
|
|
|
1365
1365
|
}), () => a.disconnect();
|
|
1366
1366
|
}, [n, t]), e;
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
function
|
|
1370
|
-
const o = { fill: t.color ?? (t.depth === void 0 ? n :
|
|
1368
|
+
const ye = 1 / 60;
|
|
1369
|
+
function Zs(t, n, e) {
|
|
1370
|
+
const o = { fill: t.color ?? (t.depth === void 0 ? n : Ms(e, n, t.depth)), opacity: t.opacity };
|
|
1371
1371
|
return t.d ? {
|
|
1372
1372
|
...o,
|
|
1373
1373
|
d: t.d,
|
|
1374
|
-
transform: `translate(${t.x} ${t.y}) rotate(${t.rot ?? 0}) scale(${
|
|
1374
|
+
transform: `translate(${t.x} ${t.y}) rotate(${t.rot ?? 0}) scale(${mn})`
|
|
1375
1375
|
} : { ...o, cx: t.x, cy: t.y, r: t.r };
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function Zt({
|
|
1378
1378
|
size: t = 320,
|
|
1379
|
-
shape: n =
|
|
1380
|
-
color: e =
|
|
1381
|
-
expression: s =
|
|
1379
|
+
shape: n = ks,
|
|
1380
|
+
color: e = As,
|
|
1381
|
+
expression: s = is,
|
|
1382
1382
|
paper: o = "var(--backgrounds-bg-base)",
|
|
1383
1383
|
state: a = "idle",
|
|
1384
|
-
frozenAt:
|
|
1384
|
+
frozenAt: i,
|
|
1385
1385
|
follow: c = !1,
|
|
1386
1386
|
turn: l = 0,
|
|
1387
1387
|
gaze: d = null,
|
|
1388
1388
|
label: u,
|
|
1389
1389
|
className: h
|
|
1390
1390
|
}) {
|
|
1391
|
-
var
|
|
1392
|
-
const p = ((
|
|
1393
|
-
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1396
|
-
const
|
|
1397
|
-
function
|
|
1398
|
-
var
|
|
1399
|
-
const x =
|
|
1400
|
-
if (!((
|
|
1401
|
-
|
|
1391
|
+
var D, Z;
|
|
1392
|
+
const p = ((D = vs.get(n)) == null ? void 0 : D.radii) ?? null, f = ((Z = $s.get(e)) == null ? void 0 : Z.hex) ?? "var(--novi-color-ink)", _ = me(f, "#18181b"), b = me(o, "#ffffff"), N = me(Vn, "#3b82f6"), m = rs.get(s) ?? null, w = F(null), v = F();
|
|
1393
|
+
v.current || (v.current = new Ae(mn, a, p, m));
|
|
1394
|
+
const g = v.current, [M, R] = at(() => g.sample(i ?? 0)), k = Lt().replace(/[^a-zA-Z0-9_-]/g, ""), L = `novi-mask-${k}`, q = F(0), U = F(null), P = F(!1), G = F(0), z = F(0), O = F({ follow: c, turn: l, gaze: d, state: a });
|
|
1395
|
+
O.current = { follow: c, turn: l, gaze: d, state: a };
|
|
1396
|
+
const S = i !== void 0;
|
|
1397
|
+
function W() {
|
|
1398
|
+
var C, ut;
|
|
1399
|
+
const x = v.current, j = q.current;
|
|
1400
|
+
if (!((C = jt.get(O.current.state)) != null && C.baseFace)) {
|
|
1401
|
+
P.current && (x.setLook(null, j, _e), P.current = !1);
|
|
1402
1402
|
return;
|
|
1403
1403
|
}
|
|
1404
|
-
const
|
|
1405
|
-
if (!
|
|
1406
|
-
|
|
1407
|
-
const Y =
|
|
1404
|
+
const E = (ut = w.current) == null ? void 0 : ut.getBoundingClientRect();
|
|
1405
|
+
if (!E || E.width === 0 || E.height === 0) return;
|
|
1406
|
+
P.current || (G.current = j);
|
|
1407
|
+
const Y = U.current, nt = Math.max(1, window.innerWidth / 2), V = Math.max(1, window.innerHeight / 2);
|
|
1408
1408
|
x.setLook(
|
|
1409
|
-
|
|
1410
|
-
nx: Y ?
|
|
1411
|
-
ny: Y ?
|
|
1412
|
-
progress:
|
|
1409
|
+
Vs({
|
|
1410
|
+
nx: Y ? I((Y.x - (E.left + E.width / 2)) / nt, -1, 1) : 0,
|
|
1411
|
+
ny: Y ? I((Y.y - (E.top + E.height / 2)) / V, -1, 1) : 0,
|
|
1412
|
+
progress: tt.easeOutQuint(I((j - G.current) / _e)),
|
|
1413
1413
|
pointer: Y !== null,
|
|
1414
|
-
turn:
|
|
1414
|
+
turn: O.current.turn
|
|
1415
1415
|
}),
|
|
1416
1416
|
j
|
|
1417
|
-
),
|
|
1417
|
+
), P.current = !0;
|
|
1418
1418
|
}
|
|
1419
|
-
|
|
1420
|
-
if (
|
|
1421
|
-
const x =
|
|
1422
|
-
let j = 0,
|
|
1423
|
-
const Y = (
|
|
1419
|
+
et(() => {
|
|
1420
|
+
if (S) return;
|
|
1421
|
+
const x = v.current;
|
|
1422
|
+
let j = 0, E = 0;
|
|
1423
|
+
const Y = (nt) => {
|
|
1424
1424
|
j = requestAnimationFrame(Y);
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
|
|
1425
|
+
const V = E ? Math.min((nt - E) / 1e3, 0.064) : 0;
|
|
1426
|
+
E = nt, q.current += V, O.current.follow ? W() : O.current.gaze && x.setLook(
|
|
1427
|
+
O.current.gaze(q.current - z.current),
|
|
1428
1428
|
q.current,
|
|
1429
|
-
|
|
1430
|
-
),
|
|
1429
|
+
ye
|
|
1430
|
+
), R(x.sample(q.current));
|
|
1431
1431
|
};
|
|
1432
1432
|
return j = requestAnimationFrame(Y), () => cancelAnimationFrame(j);
|
|
1433
|
-
}, [
|
|
1434
|
-
if (!c ||
|
|
1435
|
-
const x = (
|
|
1436
|
-
|
|
1433
|
+
}, [S]), et(() => {
|
|
1434
|
+
if (!c || S) return;
|
|
1435
|
+
const x = (E) => {
|
|
1436
|
+
E.pointerType !== "touch" && (U.current = { x: E.clientX, y: E.clientY });
|
|
1437
1437
|
}, j = () => {
|
|
1438
|
-
|
|
1438
|
+
U.current = null;
|
|
1439
1439
|
};
|
|
1440
1440
|
return window.addEventListener("pointermove", x), document.addEventListener("pointerleave", j), () => {
|
|
1441
|
-
window.removeEventListener("pointermove", x), document.removeEventListener("pointerleave", j),
|
|
1441
|
+
window.removeEventListener("pointermove", x), document.removeEventListener("pointerleave", j), U.current = null, P.current && (v.current.setLook(null, q.current, _e), P.current = !1);
|
|
1442
1442
|
};
|
|
1443
|
-
}, [c,
|
|
1444
|
-
const x =
|
|
1443
|
+
}, [c, S]), et(() => {
|
|
1444
|
+
const x = v.current;
|
|
1445
1445
|
if (d)
|
|
1446
|
-
return
|
|
1446
|
+
return z.current = q.current, x.setLook(d(0), q.current - ye, ye), () => {
|
|
1447
1447
|
x.setLook(null, q.current);
|
|
1448
1448
|
};
|
|
1449
|
-
}, [d]),
|
|
1450
|
-
|
|
1451
|
-
}, [a]),
|
|
1452
|
-
|
|
1453
|
-
}, [p]),
|
|
1454
|
-
|
|
1455
|
-
}, [m]),
|
|
1456
|
-
|
|
1457
|
-
}, [
|
|
1458
|
-
const
|
|
1459
|
-
() =>
|
|
1449
|
+
}, [d]), et(() => {
|
|
1450
|
+
v.current.setState(a, q.current);
|
|
1451
|
+
}, [a]), et(() => {
|
|
1452
|
+
v.current.setShape(p, q.current);
|
|
1453
|
+
}, [p]), et(() => {
|
|
1454
|
+
v.current.setExpression(m, q.current);
|
|
1455
|
+
}, [m]), et(() => {
|
|
1456
|
+
S && R(v.current.sample(i));
|
|
1457
|
+
}, [S, i, p, m, a]);
|
|
1458
|
+
const H = Us, ft = bn(
|
|
1459
|
+
() => M.arcs.map((x) => /* @__PURE__ */ r(
|
|
1460
1460
|
"linearGradient",
|
|
1461
1461
|
{
|
|
1462
|
-
id: `${
|
|
1462
|
+
id: `${k}-${x.id}`,
|
|
1463
1463
|
gradientUnits: "userSpaceOnUse",
|
|
1464
1464
|
x1: x.grad.x1,
|
|
1465
1465
|
y1: x.grad.y1,
|
|
1466
1466
|
x2: x.grad.x2,
|
|
1467
1467
|
y2: x.grad.y2,
|
|
1468
|
-
children: x.grad.stops.map((j,
|
|
1468
|
+
children: x.grad.stops.map((j, E) => /* @__PURE__ */ r("stop", { offset: E / (x.grad.stops.length - 1), stopColor: j }, E))
|
|
1469
1469
|
},
|
|
1470
1470
|
x.id
|
|
1471
1471
|
)),
|
|
1472
|
-
[
|
|
1473
|
-
),
|
|
1474
|
-
const
|
|
1475
|
-
return x.d ? /* @__PURE__ */
|
|
1472
|
+
[M.arcs, k]
|
|
1473
|
+
), Q = M.dots.map((x, j) => {
|
|
1474
|
+
const E = Zs(x, _, b);
|
|
1475
|
+
return x.d ? /* @__PURE__ */ r("path", { ...E }, j) : /* @__PURE__ */ r("circle", { ...E }, j);
|
|
1476
1476
|
});
|
|
1477
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ y(
|
|
1478
1478
|
"svg",
|
|
1479
1479
|
{
|
|
1480
1480
|
ref: w,
|
|
1481
1481
|
className: h,
|
|
1482
1482
|
width: t,
|
|
1483
1483
|
height: t,
|
|
1484
|
-
viewBox: `${-
|
|
1484
|
+
viewBox: `${-H} ${-H} ${H * 2} ${H * 2}`,
|
|
1485
1485
|
role: u ? "img" : void 0,
|
|
1486
1486
|
"aria-label": u,
|
|
1487
1487
|
"aria-hidden": u ? void 0 : !0,
|
|
1488
1488
|
children: [
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
/* @__PURE__ */
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
|
|
1493
|
-
|
|
1489
|
+
/* @__PURE__ */ y("defs", { children: [
|
|
1490
|
+
/* @__PURE__ */ y("mask", { id: L, maskUnits: "userSpaceOnUse", x: -H, y: -H, width: H * 2, height: H * 2, children: [
|
|
1491
|
+
/* @__PURE__ */ r("path", { d: M.bodyPath, fill: "#fff" }),
|
|
1492
|
+
M.eyes.map((x, j) => /* @__PURE__ */ r("path", { d: x.d, transform: x.matrix, opacity: x.alpha, fill: "#000" }, j)),
|
|
1493
|
+
M.notch && /* @__PURE__ */ r("circle", { cx: M.notch.x, cy: M.notch.y, r: M.notch.r, fill: "#000" })
|
|
1494
1494
|
] }),
|
|
1495
|
-
|
|
1495
|
+
ft
|
|
1496
1496
|
] }),
|
|
1497
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ r("g", { fill: "none", strokeLinecap: "round", children: M.arcs.map((x) => /* @__PURE__ */ r(
|
|
1498
1498
|
"path",
|
|
1499
1499
|
{
|
|
1500
1500
|
d: x.back,
|
|
1501
|
-
stroke: `url(#${
|
|
1501
|
+
stroke: `url(#${k}-${x.id})`,
|
|
1502
1502
|
strokeWidth: x.width,
|
|
1503
1503
|
opacity: x.opacity
|
|
1504
1504
|
},
|
|
1505
1505
|
`b${x.id}`
|
|
1506
1506
|
)) }),
|
|
1507
|
-
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1507
|
+
M.dotsBehind && /* @__PURE__ */ r("g", { children: Q }),
|
|
1508
|
+
/* @__PURE__ */ y("g", { opacity: M.bodyAlpha, children: [
|
|
1509
|
+
/* @__PURE__ */ r("path", { d: M.bodyPath, fill: b }),
|
|
1510
|
+
/* @__PURE__ */ r("g", { mask: `url(#${L})`, children: /* @__PURE__ */ r("rect", { x: -H, y: -H, width: H * 2, height: H * 2, fill: _ }) })
|
|
1511
1511
|
] }),
|
|
1512
|
-
!
|
|
1513
|
-
|
|
1514
|
-
/* @__PURE__ */
|
|
1512
|
+
!M.dotsBehind && /* @__PURE__ */ r("g", { children: Q }),
|
|
1513
|
+
M.notif && /* @__PURE__ */ r("circle", { cx: M.notif.x, cy: M.notif.y, r: M.notif.r, fill: N }),
|
|
1514
|
+
/* @__PURE__ */ r("g", { fill: "none", strokeLinecap: "round", children: M.arcs.map((x) => /* @__PURE__ */ r(
|
|
1515
1515
|
"path",
|
|
1516
1516
|
{
|
|
1517
1517
|
d: x.front,
|
|
1518
|
-
stroke: `url(#${
|
|
1518
|
+
stroke: `url(#${k}-${x.id})`,
|
|
1519
1519
|
strokeWidth: x.width,
|
|
1520
1520
|
opacity: x.opacity
|
|
1521
1521
|
},
|
|
@@ -1525,101 +1525,138 @@ function Qt({
|
|
|
1525
1525
|
}
|
|
1526
1526
|
);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return /* @__PURE__ */
|
|
1530
|
-
}
|
|
1531
|
-
const
|
|
1532
|
-
menu:
|
|
1533
|
-
menuVisible:
|
|
1534
|
-
menuClip:
|
|
1535
|
-
menuSize:
|
|
1536
|
-
menuContent:
|
|
1537
|
-
menuFade:
|
|
1538
|
-
scrollHint:
|
|
1539
|
-
},
|
|
1540
|
-
function({ menu: n, id: e, label: s = "Add to prompt", maxHeight: o = 240, disabled: a = !1, restoreFocusRef:
|
|
1541
|
-
const l =
|
|
1542
|
-
|
|
1543
|
-
var
|
|
1544
|
-
m && N(n), l.current && (!m && l.current.contains(document.activeElement) && ((
|
|
1545
|
-
}, [n, m, a,
|
|
1546
|
-
const
|
|
1547
|
-
if (!
|
|
1548
|
-
function
|
|
1549
|
-
|
|
1528
|
+
function ka({ size: t = 60, state: n = "idle", frozenAt: e, ...s }) {
|
|
1529
|
+
return /* @__PURE__ */ r(Zt, { ...s, state: n, size: t, frozenAt: e ?? Rs[n] ?? 1 });
|
|
1530
|
+
}
|
|
1531
|
+
const Js = "_menu_dpnsn_2", to = "_menuVisible_dpnsn_21", eo = "_menuClip_dpnsn_29", no = "_menuSize_dpnsn_35", so = "_menuContent_dpnsn_42", oo = "_menuFade_dpnsn_69", ro = "_scrollHint_dpnsn_74", Bt = {
|
|
1532
|
+
menu: Js,
|
|
1533
|
+
menuVisible: to,
|
|
1534
|
+
menuClip: eo,
|
|
1535
|
+
menuSize: no,
|
|
1536
|
+
menuContent: so,
|
|
1537
|
+
menuFade: oo,
|
|
1538
|
+
scrollHint: ro
|
|
1539
|
+
}, Re = re(
|
|
1540
|
+
function({ menu: n, id: e, label: s = "Add to prompt", maxHeight: o = 240, disabled: a = !1, restoreFocusRef: i }, c) {
|
|
1541
|
+
const l = F(null), d = F(null), u = F(null), [h, p] = at(!1), [f, _] = at(), [b, N] = at(n), m = n != null && n !== !1;
|
|
1542
|
+
et(() => {
|
|
1543
|
+
var g;
|
|
1544
|
+
m && N(n), l.current && (!m && l.current.contains(document.activeElement) && ((g = i.current) == null || g.focus()), l.current.inert = !m || a);
|
|
1545
|
+
}, [n, m, a, i]), Me(() => {
|
|
1546
|
+
const g = d.current;
|
|
1547
|
+
if (!g) return;
|
|
1548
|
+
function M() {
|
|
1549
|
+
g && (_(g.getBoundingClientRect().height), w(g));
|
|
1550
1550
|
}
|
|
1551
|
-
|
|
1552
|
-
const
|
|
1553
|
-
return
|
|
1554
|
-
}, [
|
|
1555
|
-
function w(
|
|
1556
|
-
p(
|
|
1551
|
+
M();
|
|
1552
|
+
const R = new ResizeObserver(M);
|
|
1553
|
+
return R.observe(g), u.current && R.observe(u.current), () => R.disconnect();
|
|
1554
|
+
}, [b, o]);
|
|
1555
|
+
function w(g) {
|
|
1556
|
+
p(g.scrollHeight - g.clientHeight - g.scrollTop > 1);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
l.current =
|
|
1558
|
+
function v(g) {
|
|
1559
|
+
l.current = g, typeof c == "function" ? c(g) : c && (c.current = g);
|
|
1560
1560
|
}
|
|
1561
|
-
return /* @__PURE__ */
|
|
1561
|
+
return /* @__PURE__ */ r(
|
|
1562
1562
|
"div",
|
|
1563
1563
|
{
|
|
1564
|
-
ref:
|
|
1564
|
+
ref: v,
|
|
1565
1565
|
id: e,
|
|
1566
1566
|
role: "region",
|
|
1567
1567
|
"aria-label": s,
|
|
1568
1568
|
"aria-hidden": !m,
|
|
1569
|
-
className: [
|
|
1570
|
-
onTransitionEnd: (
|
|
1571
|
-
|
|
1569
|
+
className: [Bt.menu, m && Bt.menuVisible].filter(Boolean).join(" "),
|
|
1570
|
+
onTransitionEnd: (g) => {
|
|
1571
|
+
g.target === g.currentTarget && g.propertyName === "grid-template-rows" && !m && N(null);
|
|
1572
1572
|
},
|
|
1573
|
-
children: /* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
|
|
1573
|
+
children: /* @__PURE__ */ r("div", { className: Bt.menuClip, children: /* @__PURE__ */ y("div", { className: Bt.menuSize, style: { height: f }, children: [
|
|
1574
|
+
/* @__PURE__ */ r(
|
|
1575
|
+
Qt,
|
|
1576
1576
|
{
|
|
1577
1577
|
ref: d,
|
|
1578
1578
|
direction: "y",
|
|
1579
1579
|
size: "thin",
|
|
1580
|
-
className: [
|
|
1581
|
-
onScroll: (
|
|
1580
|
+
className: [Bt.menuContent, h && Bt.menuFade].filter(Boolean).join(" "),
|
|
1581
|
+
onScroll: (g) => w(g.currentTarget),
|
|
1582
1582
|
style: {
|
|
1583
1583
|
maxHeight: `min(${typeof o == "number" ? `${o}px` : o}, 50dvh)`
|
|
1584
1584
|
},
|
|
1585
|
-
children: /* @__PURE__ */
|
|
1585
|
+
children: /* @__PURE__ */ r("div", { ref: u, children: b })
|
|
1586
1586
|
}
|
|
1587
1587
|
),
|
|
1588
|
-
m && h && /* @__PURE__ */
|
|
1588
|
+
m && h && /* @__PURE__ */ r("span", { className: Bt.scrollHint, "aria-hidden": !0, children: /* @__PURE__ */ r(An, { size: 14 }) })
|
|
1589
1589
|
] }) })
|
|
1590
1590
|
}
|
|
1591
1591
|
);
|
|
1592
1592
|
}
|
|
1593
|
-
)
|
|
1594
|
-
|
|
1595
|
-
|
|
1593
|
+
), io = "_voiceButton_1y4sa_1", ao = "_active_1y4sa_5", co = "_listening_1y4sa_16", lo = "_waveform_1y4sa_17", se = {
|
|
1594
|
+
voiceButton: io,
|
|
1595
|
+
active: ao,
|
|
1596
|
+
listening: co,
|
|
1597
|
+
waveform: lo
|
|
1598
|
+
};
|
|
1599
|
+
function Ee({
|
|
1600
|
+
onClick: t,
|
|
1601
|
+
label: n,
|
|
1602
|
+
activeLabel: e = "Stop listening",
|
|
1603
|
+
active: s = !1,
|
|
1604
|
+
disabled: o = !1
|
|
1605
|
+
}) {
|
|
1606
|
+
return /* @__PURE__ */ r(
|
|
1607
|
+
it,
|
|
1608
|
+
{
|
|
1609
|
+
type: "button",
|
|
1610
|
+
variant: "transparent",
|
|
1611
|
+
radius: "full",
|
|
1612
|
+
size: "sm",
|
|
1613
|
+
className: [se.voiceButton, s && se.active].filter(Boolean).join(" "),
|
|
1614
|
+
icon: s ? /* @__PURE__ */ y("span", { className: se.listening, children: [
|
|
1615
|
+
/* @__PURE__ */ y("span", { className: se.waveform, children: [
|
|
1616
|
+
/* @__PURE__ */ r("span", {}),
|
|
1617
|
+
/* @__PURE__ */ r("span", {}),
|
|
1618
|
+
/* @__PURE__ */ r("span", {}),
|
|
1619
|
+
/* @__PURE__ */ r("span", {}),
|
|
1620
|
+
/* @__PURE__ */ r("span", {})
|
|
1621
|
+
] }),
|
|
1622
|
+
/* @__PURE__ */ r(we, { size: 15 })
|
|
1623
|
+
] }) : /* @__PURE__ */ r(Mn, { size: 18 }),
|
|
1624
|
+
"aria-label": s ? e : n,
|
|
1625
|
+
"aria-pressed": s,
|
|
1626
|
+
disabled: o,
|
|
1627
|
+
onClick: t
|
|
1628
|
+
}
|
|
1629
|
+
);
|
|
1630
|
+
}
|
|
1631
|
+
function Pt(t, n, e) {
|
|
1632
|
+
const s = F(t !== void 0).current, [o, a] = at(n), i = s ? t : o, c = vn(
|
|
1596
1633
|
(l) => {
|
|
1597
1634
|
s || a(l), e == null || e(l);
|
|
1598
1635
|
},
|
|
1599
1636
|
[s, e]
|
|
1600
1637
|
);
|
|
1601
|
-
return [
|
|
1602
|
-
}
|
|
1603
|
-
const
|
|
1604
|
-
root:
|
|
1605
|
-
references:
|
|
1606
|
-
field:
|
|
1607
|
-
textarea:
|
|
1608
|
-
footer:
|
|
1609
|
-
avatar:
|
|
1610
|
-
actions:
|
|
1611
|
-
recents:
|
|
1612
|
-
divider:
|
|
1613
|
-
disabled:
|
|
1614
|
-
dragging:
|
|
1615
|
-
srOnly:
|
|
1616
|
-
},
|
|
1638
|
+
return [i, c];
|
|
1639
|
+
}
|
|
1640
|
+
const uo = "_root_1jedq_2 _root_6xqta_30", ho = "_references_1jedq_19 _referencesRow_6xqta_84", fo = "_field_1jedq_24", po = "_textarea_1jedq_29 _input_6xqta_136", _o = "_footer_1jedq_39", mo = "_avatar_1jedq_47 _avatar_6xqta_129", yo = "_actions_1jedq_51 _actions_6xqta_154", go = "_recents_1jedq_58", xo = "_divider_1jedq_62", bo = "_disabled_1jedq_70 _disabled_6xqta_124", vo = "_dragging_1jedq_74", ko = "_srOnly_1jedq_83", lt = {
|
|
1641
|
+
root: uo,
|
|
1642
|
+
references: ho,
|
|
1643
|
+
field: fo,
|
|
1644
|
+
textarea: po,
|
|
1645
|
+
footer: _o,
|
|
1646
|
+
avatar: mo,
|
|
1647
|
+
actions: yo,
|
|
1648
|
+
recents: go,
|
|
1649
|
+
divider: xo,
|
|
1650
|
+
disabled: bo,
|
|
1651
|
+
dragging: vo,
|
|
1652
|
+
srOnly: ko
|
|
1653
|
+
}, Na = re(function({
|
|
1617
1654
|
value: n,
|
|
1618
1655
|
defaultValue: e = "",
|
|
1619
1656
|
onValueChange: s,
|
|
1620
1657
|
onSubmit: o,
|
|
1621
1658
|
submitOnEnter: a = !0,
|
|
1622
|
-
submitLabel:
|
|
1659
|
+
submitLabel: i = "Send",
|
|
1623
1660
|
maxHeight: c = "240px",
|
|
1624
1661
|
placeholder: l = "Work with Novi",
|
|
1625
1662
|
"aria-label": d = "Work with Novi",
|
|
@@ -1628,160 +1665,160 @@ const no = "_root_1jedq_2 _root_6xqta_30", so = "_references_1jedq_19 _reference
|
|
|
1628
1665
|
references: p,
|
|
1629
1666
|
attachments: f,
|
|
1630
1667
|
onFilesDrop: _,
|
|
1631
|
-
dropLabel:
|
|
1668
|
+
dropLabel: b = "Drop files to attach them",
|
|
1632
1669
|
menu: N,
|
|
1633
1670
|
menuLabel: m = "Add to prompt",
|
|
1634
1671
|
menuMaxHeight: w = 240,
|
|
1635
|
-
onMenuClose:
|
|
1636
|
-
actions:
|
|
1637
|
-
onRecents:
|
|
1638
|
-
onAdd:
|
|
1639
|
-
onVoice:
|
|
1640
|
-
recentsLabel:
|
|
1672
|
+
onMenuClose: v,
|
|
1673
|
+
actions: g,
|
|
1674
|
+
onRecents: M,
|
|
1675
|
+
onAdd: R,
|
|
1676
|
+
onVoice: k,
|
|
1677
|
+
recentsLabel: L = "Recents",
|
|
1641
1678
|
addLabel: q = "Add",
|
|
1642
|
-
voiceLabel:
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1679
|
+
voiceLabel: U = "Use voice",
|
|
1680
|
+
voiceActive: P = !1,
|
|
1681
|
+
voiceActiveLabel: G = "Stop listening",
|
|
1682
|
+
disabled: z = !1,
|
|
1683
|
+
readOnly: O = !1,
|
|
1684
|
+
className: S,
|
|
1685
|
+
onKeyDown: W,
|
|
1686
|
+
onPaste: H,
|
|
1687
|
+
rows: ft = 2,
|
|
1688
|
+
...Q
|
|
1689
|
+
}, D) {
|
|
1690
|
+
const [Z, x] = Pt(n, e, s), j = F(null), E = F(0), [Y, nt] = at(!1), V = Lt(), C = N != null && N !== !1, ut = Z.trim().length > 0, Nt = kn.toArray(f), Mt = ut || Nt.length > 0, gt = !!o && Mt, wt = !!(g || M || R || k || gt), Jt = Mt && !z && !O && !!o, xt = !!_ && !z && !O;
|
|
1691
|
+
et(() => {
|
|
1692
|
+
xt || (E.current = 0, nt(!1));
|
|
1693
|
+
}, [xt]), Me(() => {
|
|
1694
|
+
const $ = j.current;
|
|
1695
|
+
$ && ($.style.height = "auto", $.style.height = `${$.scrollHeight}px`);
|
|
1696
|
+
}, [Z, ft]);
|
|
1697
|
+
function te() {
|
|
1698
|
+
var $;
|
|
1699
|
+
Jt && (o == null || o(Z.trim()), x(""), ($ = j.current) == null || $.focus());
|
|
1661
1700
|
}
|
|
1662
|
-
function
|
|
1663
|
-
return Array.from(
|
|
1701
|
+
function Ht($) {
|
|
1702
|
+
return Array.from($.dataTransfer.types).includes("Files");
|
|
1664
1703
|
}
|
|
1665
|
-
function
|
|
1666
|
-
!
|
|
1704
|
+
function de($) {
|
|
1705
|
+
!xt || $.defaultPrevented || !Ht($) || ($.preventDefault(), E.current += 1, nt(!0));
|
|
1667
1706
|
}
|
|
1668
|
-
function
|
|
1669
|
-
!
|
|
1707
|
+
function ue($) {
|
|
1708
|
+
!xt || $.defaultPrevented || !Ht($) || ($.preventDefault(), $.dataTransfer.dropEffect = "copy");
|
|
1670
1709
|
}
|
|
1671
|
-
function
|
|
1672
|
-
|
|
1710
|
+
function T($) {
|
|
1711
|
+
xt && (E.current = Math.max(0, E.current - 1), E.current === 0 && nt(!1));
|
|
1673
1712
|
}
|
|
1674
|
-
function
|
|
1675
|
-
if (
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1678
|
-
|
|
1713
|
+
function It($) {
|
|
1714
|
+
if (E.current = 0, nt(!1), !xt || $.defaultPrevented || !Ht($)) return;
|
|
1715
|
+
$.preventDefault();
|
|
1716
|
+
const Ft = Array.from($.dataTransfer.files);
|
|
1717
|
+
Ft.length > 0 && (_ == null || _(Ft));
|
|
1679
1718
|
}
|
|
1680
|
-
function
|
|
1681
|
-
if (
|
|
1682
|
-
const
|
|
1683
|
-
|
|
1719
|
+
function xn($) {
|
|
1720
|
+
if (H == null || H($), !xt || $.defaultPrevented) return;
|
|
1721
|
+
const Ft = Array.from($.clipboardData.files);
|
|
1722
|
+
Ft.length > 0 && ($.preventDefault(), _ == null || _(Ft));
|
|
1684
1723
|
}
|
|
1685
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ y(
|
|
1686
1725
|
"div",
|
|
1687
1726
|
{
|
|
1688
|
-
className: [
|
|
1689
|
-
onDragEnter:
|
|
1690
|
-
onDragOver:
|
|
1691
|
-
onDragLeave:
|
|
1692
|
-
onDrop:
|
|
1693
|
-
onKeyDown: (
|
|
1694
|
-
|
|
1727
|
+
className: [lt.root, Y && lt.dragging, z && lt.disabled, S].filter(Boolean).join(" "),
|
|
1728
|
+
onDragEnter: de,
|
|
1729
|
+
onDragOver: ue,
|
|
1730
|
+
onDragLeave: T,
|
|
1731
|
+
onDrop: It,
|
|
1732
|
+
onKeyDown: ($) => {
|
|
1733
|
+
$.key === "Escape" && !$.defaultPrevented && C && v && ($.preventDefault(), v());
|
|
1695
1734
|
},
|
|
1696
1735
|
children: [
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
|
|
1736
|
+
/* @__PURE__ */ r("span", { className: lt.srOnly, "aria-live": "polite", children: Y ? b : "" }),
|
|
1737
|
+
/* @__PURE__ */ r(
|
|
1738
|
+
Re,
|
|
1700
1739
|
{
|
|
1701
|
-
id:
|
|
1740
|
+
id: V,
|
|
1702
1741
|
menu: N,
|
|
1703
1742
|
label: m,
|
|
1704
1743
|
maxHeight: w,
|
|
1705
|
-
disabled:
|
|
1706
|
-
restoreFocusRef:
|
|
1744
|
+
disabled: z,
|
|
1745
|
+
restoreFocusRef: j
|
|
1707
1746
|
}
|
|
1708
1747
|
),
|
|
1709
|
-
p && /* @__PURE__ */
|
|
1710
|
-
|
|
1711
|
-
/* @__PURE__ */
|
|
1748
|
+
p && /* @__PURE__ */ r("div", { className: lt.references, children: p }),
|
|
1749
|
+
Nt.length > 0 && /* @__PURE__ */ r("div", { className: lt.references, children: Nt }),
|
|
1750
|
+
/* @__PURE__ */ r(Qt, { direction: "y", size: "thin", maxHeight: c, className: lt.field, children: /* @__PURE__ */ r(
|
|
1712
1751
|
"textarea",
|
|
1713
1752
|
{
|
|
1714
|
-
...
|
|
1715
|
-
ref: (
|
|
1716
|
-
|
|
1753
|
+
...Q,
|
|
1754
|
+
ref: ($) => {
|
|
1755
|
+
j.current = $, typeof D == "function" ? D($) : D && (D.current = $);
|
|
1717
1756
|
},
|
|
1718
|
-
className:
|
|
1719
|
-
rows:
|
|
1757
|
+
className: lt.textarea,
|
|
1758
|
+
rows: ft,
|
|
1720
1759
|
"aria-label": d,
|
|
1721
|
-
value:
|
|
1760
|
+
value: Z,
|
|
1722
1761
|
placeholder: l,
|
|
1723
|
-
disabled:
|
|
1724
|
-
readOnly:
|
|
1725
|
-
onChange: (
|
|
1726
|
-
onPaste:
|
|
1727
|
-
onKeyDown: (
|
|
1728
|
-
|
|
1762
|
+
disabled: z,
|
|
1763
|
+
readOnly: O,
|
|
1764
|
+
onChange: ($) => x($.target.value),
|
|
1765
|
+
onPaste: xn,
|
|
1766
|
+
onKeyDown: ($) => {
|
|
1767
|
+
W == null || W($), !($.defaultPrevented || $.nativeEvent.isComposing) && a && o && $.key === "Enter" && !$.shiftKey && ($.preventDefault(), te());
|
|
1729
1768
|
}
|
|
1730
1769
|
}
|
|
1731
1770
|
) }),
|
|
1732
|
-
/* @__PURE__ */
|
|
1733
|
-
/* @__PURE__ */
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1771
|
+
/* @__PURE__ */ y("div", { className: lt.footer, children: [
|
|
1772
|
+
/* @__PURE__ */ r("span", { className: lt.avatar, "aria-hidden": !0, children: u ?? /* @__PURE__ */ r(Zt, { size: 28, expression: "happy", frozenAt: 1, paper: "var(--backgrounds-bg-base)", ...h }) }),
|
|
1773
|
+
wt && /* @__PURE__ */ y("div", { className: lt.actions, children: [
|
|
1774
|
+
g,
|
|
1775
|
+
M && /* @__PURE__ */ r(
|
|
1776
|
+
At,
|
|
1738
1777
|
{
|
|
1739
1778
|
variant: "transparent",
|
|
1740
1779
|
size: "sm",
|
|
1741
|
-
className:
|
|
1742
|
-
leftIcon: /* @__PURE__ */
|
|
1743
|
-
disabled:
|
|
1744
|
-
onClick:
|
|
1745
|
-
children:
|
|
1780
|
+
className: lt.recents,
|
|
1781
|
+
leftIcon: /* @__PURE__ */ r(wn, { size: 18 }),
|
|
1782
|
+
disabled: z,
|
|
1783
|
+
onClick: M,
|
|
1784
|
+
children: L
|
|
1746
1785
|
}
|
|
1747
1786
|
),
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1787
|
+
M && (R || k || gt) && /* @__PURE__ */ r("span", { className: lt.divider, "aria-hidden": !0 }),
|
|
1788
|
+
R && /* @__PURE__ */ r(
|
|
1789
|
+
it,
|
|
1751
1790
|
{
|
|
1752
1791
|
variant: "transparent",
|
|
1753
1792
|
radius: "full",
|
|
1754
1793
|
size: "sm",
|
|
1755
|
-
icon: /* @__PURE__ */
|
|
1794
|
+
icon: /* @__PURE__ */ r(Ie, { size: 18 }),
|
|
1756
1795
|
"aria-label": q,
|
|
1757
|
-
"aria-expanded":
|
|
1758
|
-
"aria-controls":
|
|
1759
|
-
disabled:
|
|
1760
|
-
onClick:
|
|
1796
|
+
"aria-expanded": C,
|
|
1797
|
+
"aria-controls": V,
|
|
1798
|
+
disabled: z,
|
|
1799
|
+
onClick: R
|
|
1761
1800
|
}
|
|
1762
1801
|
),
|
|
1763
|
-
|
|
1764
|
-
|
|
1802
|
+
k && /* @__PURE__ */ r(
|
|
1803
|
+
Ee,
|
|
1765
1804
|
{
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
disabled: I,
|
|
1772
|
-
onClick: $
|
|
1805
|
+
label: U,
|
|
1806
|
+
activeLabel: G,
|
|
1807
|
+
active: P,
|
|
1808
|
+
disabled: z || O,
|
|
1809
|
+
onClick: k
|
|
1773
1810
|
}
|
|
1774
1811
|
),
|
|
1775
|
-
|
|
1776
|
-
|
|
1812
|
+
gt && /* @__PURE__ */ r(
|
|
1813
|
+
it,
|
|
1777
1814
|
{
|
|
1778
1815
|
variant: "inverted",
|
|
1779
1816
|
radius: "full",
|
|
1780
1817
|
size: "sm",
|
|
1781
|
-
icon: /* @__PURE__ */
|
|
1782
|
-
"aria-label":
|
|
1783
|
-
disabled: !
|
|
1784
|
-
onClick:
|
|
1818
|
+
icon: /* @__PURE__ */ r(on, { size: 15 }),
|
|
1819
|
+
"aria-label": i,
|
|
1820
|
+
disabled: !Jt,
|
|
1821
|
+
onClick: te
|
|
1785
1822
|
}
|
|
1786
1823
|
)
|
|
1787
1824
|
] })
|
|
@@ -1789,51 +1826,51 @@ const no = "_root_1jedq_2 _root_6xqta_30", so = "_references_1jedq_19 _reference
|
|
|
1789
1826
|
]
|
|
1790
1827
|
}
|
|
1791
1828
|
);
|
|
1792
|
-
}),
|
|
1793
|
-
root:
|
|
1794
|
-
title:
|
|
1795
|
-
titleText:
|
|
1796
|
-
avatar:
|
|
1797
|
-
actions:
|
|
1829
|
+
}), No = "_root_1ynah_1", $o = "_title_1ynah_10", Ao = "_titleText_1ynah_24", Mo = "_avatar_1ynah_31", wo = "_actions_1ynah_37", Dt = {
|
|
1830
|
+
root: No,
|
|
1831
|
+
title: $o,
|
|
1832
|
+
titleText: Ao,
|
|
1833
|
+
avatar: Mo,
|
|
1834
|
+
actions: wo
|
|
1798
1835
|
};
|
|
1799
|
-
function
|
|
1836
|
+
function Io({
|
|
1800
1837
|
title: t,
|
|
1801
1838
|
titleAs: n = "h2",
|
|
1802
1839
|
avatar: e,
|
|
1803
1840
|
onExpandToggle: s,
|
|
1804
1841
|
expanded: o = !1,
|
|
1805
1842
|
onClose: a,
|
|
1806
|
-
actions:
|
|
1843
|
+
actions: i,
|
|
1807
1844
|
expandLabel: c = "Expand",
|
|
1808
1845
|
collapseLabel: l = "Collapse",
|
|
1809
1846
|
closeLabel: d = "Close",
|
|
1810
1847
|
className: u,
|
|
1811
1848
|
...h
|
|
1812
1849
|
}) {
|
|
1813
|
-
return /* @__PURE__ */
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
e && /* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ y("header", { className: [Dt.root, u].filter(Boolean).join(" "), ...h, children: [
|
|
1851
|
+
/* @__PURE__ */ y(n, { className: Dt.title, children: [
|
|
1852
|
+
e && /* @__PURE__ */ r("span", { className: Dt.avatar, children: e }),
|
|
1853
|
+
/* @__PURE__ */ r("span", { className: Dt.titleText, children: t })
|
|
1817
1854
|
] }),
|
|
1818
|
-
/* @__PURE__ */
|
|
1819
|
-
|
|
1820
|
-
s && /* @__PURE__ */
|
|
1821
|
-
|
|
1855
|
+
/* @__PURE__ */ y("div", { className: Dt.actions, children: [
|
|
1856
|
+
i,
|
|
1857
|
+
s && /* @__PURE__ */ r(
|
|
1858
|
+
it,
|
|
1822
1859
|
{
|
|
1823
1860
|
variant: "transparent",
|
|
1824
1861
|
size: "xsmall",
|
|
1825
|
-
icon: o ? /* @__PURE__ */
|
|
1862
|
+
icon: o ? /* @__PURE__ */ r(In, { size: 15 }) : /* @__PURE__ */ r(zn, { size: 15 }),
|
|
1826
1863
|
"aria-label": o ? l : c,
|
|
1827
1864
|
"aria-expanded": o,
|
|
1828
1865
|
onClick: s
|
|
1829
1866
|
}
|
|
1830
1867
|
),
|
|
1831
|
-
a && /* @__PURE__ */
|
|
1832
|
-
|
|
1868
|
+
a && /* @__PURE__ */ r(
|
|
1869
|
+
it,
|
|
1833
1870
|
{
|
|
1834
1871
|
variant: "transparent",
|
|
1835
1872
|
size: "xsmall",
|
|
1836
|
-
icon: /* @__PURE__ */
|
|
1873
|
+
icon: /* @__PURE__ */ r(we, { size: 15 }),
|
|
1837
1874
|
"aria-label": d,
|
|
1838
1875
|
onClick: a
|
|
1839
1876
|
}
|
|
@@ -1841,21 +1878,21 @@ function bo({
|
|
|
1841
1878
|
] })
|
|
1842
1879
|
] });
|
|
1843
1880
|
}
|
|
1844
|
-
const
|
|
1845
|
-
root:
|
|
1846
|
-
threadWrap:
|
|
1847
|
-
thread:
|
|
1848
|
-
jump:
|
|
1849
|
-
threadInner:
|
|
1850
|
-
},
|
|
1851
|
-
function
|
|
1881
|
+
const zo = "_root_1wgte_1", Bo = "_threadWrap_1wgte_13", To = "_thread_1wgte_13", Ro = "_jump_1wgte_32", Eo = "_threadInner_1wgte_59", Yt = {
|
|
1882
|
+
root: zo,
|
|
1883
|
+
threadWrap: Bo,
|
|
1884
|
+
thread: To,
|
|
1885
|
+
jump: Ro,
|
|
1886
|
+
threadInner: Eo
|
|
1887
|
+
}, Co = 64;
|
|
1888
|
+
function $a({
|
|
1852
1889
|
children: t,
|
|
1853
1890
|
title: n = "Ask anything",
|
|
1854
1891
|
titleAs: e,
|
|
1855
1892
|
header: s,
|
|
1856
1893
|
avatar: o,
|
|
1857
1894
|
expanded: a = !1,
|
|
1858
|
-
onExpandToggle:
|
|
1895
|
+
onExpandToggle: i,
|
|
1859
1896
|
onClose: c,
|
|
1860
1897
|
headerActions: l,
|
|
1861
1898
|
input: d,
|
|
@@ -1864,64 +1901,64 @@ function ma({
|
|
|
1864
1901
|
autoScroll: p = !0,
|
|
1865
1902
|
scrollToBottomLabel: f = "Jump to the newest message",
|
|
1866
1903
|
className: _,
|
|
1867
|
-
style:
|
|
1904
|
+
style: b,
|
|
1868
1905
|
...N
|
|
1869
1906
|
}) {
|
|
1870
|
-
const m =
|
|
1871
|
-
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1907
|
+
const m = F(null), w = F(!0), [v, g] = at(!0);
|
|
1908
|
+
et(() => {
|
|
1909
|
+
const k = m.current;
|
|
1910
|
+
!k || !p || !w.current || (k.scrollTop = k.scrollHeight);
|
|
1874
1911
|
}, [t, p]);
|
|
1875
|
-
function
|
|
1876
|
-
const
|
|
1877
|
-
if (
|
|
1878
|
-
const
|
|
1879
|
-
w.current =
|
|
1912
|
+
function M() {
|
|
1913
|
+
const k = m.current;
|
|
1914
|
+
if (!k) return;
|
|
1915
|
+
const L = k.scrollHeight - k.scrollTop - k.clientHeight;
|
|
1916
|
+
w.current = L <= Co, g(w.current);
|
|
1880
1917
|
}
|
|
1881
|
-
function
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1918
|
+
function R() {
|
|
1919
|
+
const k = m.current;
|
|
1920
|
+
k && (k.scrollTo({ top: k.scrollHeight, behavior: "smooth" }), w.current = !0, g(!0));
|
|
1884
1921
|
}
|
|
1885
|
-
return /* @__PURE__ */
|
|
1922
|
+
return /* @__PURE__ */ y(
|
|
1886
1923
|
"div",
|
|
1887
1924
|
{
|
|
1888
|
-
className: [
|
|
1889
|
-
style: { height: h, ...
|
|
1925
|
+
className: [Yt.root, _].filter(Boolean).join(" "),
|
|
1926
|
+
style: { height: h, ...b },
|
|
1890
1927
|
...N,
|
|
1891
1928
|
children: [
|
|
1892
|
-
s ?? /* @__PURE__ */
|
|
1893
|
-
|
|
1929
|
+
s ?? /* @__PURE__ */ r(
|
|
1930
|
+
Io,
|
|
1894
1931
|
{
|
|
1895
1932
|
title: n,
|
|
1896
1933
|
titleAs: e,
|
|
1897
1934
|
avatar: o,
|
|
1898
1935
|
expanded: a,
|
|
1899
|
-
onExpandToggle:
|
|
1936
|
+
onExpandToggle: i,
|
|
1900
1937
|
onClose: c,
|
|
1901
1938
|
actions: l
|
|
1902
1939
|
}
|
|
1903
1940
|
),
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
|
|
1941
|
+
/* @__PURE__ */ y("div", { className: Yt.threadWrap, children: [
|
|
1942
|
+
/* @__PURE__ */ r(
|
|
1943
|
+
Qt,
|
|
1907
1944
|
{
|
|
1908
1945
|
ref: m,
|
|
1909
1946
|
direction: "y",
|
|
1910
1947
|
size: "thin",
|
|
1911
|
-
className:
|
|
1912
|
-
onScroll:
|
|
1913
|
-
children: /* @__PURE__ */
|
|
1948
|
+
className: Yt.thread,
|
|
1949
|
+
onScroll: M,
|
|
1950
|
+
children: /* @__PURE__ */ r("div", { className: Yt.threadInner, children: t })
|
|
1914
1951
|
}
|
|
1915
1952
|
),
|
|
1916
|
-
!
|
|
1917
|
-
|
|
1953
|
+
!v && /* @__PURE__ */ r("div", { className: Yt.jump, children: /* @__PURE__ */ r(
|
|
1954
|
+
it,
|
|
1918
1955
|
{
|
|
1919
1956
|
variant: "neutral",
|
|
1920
1957
|
radius: "full",
|
|
1921
1958
|
size: "sm",
|
|
1922
|
-
icon: /* @__PURE__ */
|
|
1959
|
+
icon: /* @__PURE__ */ r(Bn, { size: 15 }),
|
|
1923
1960
|
"aria-label": f,
|
|
1924
|
-
onClick:
|
|
1961
|
+
onClick: R
|
|
1925
1962
|
}
|
|
1926
1963
|
) })
|
|
1927
1964
|
] }),
|
|
@@ -1931,57 +1968,57 @@ function ma({
|
|
|
1931
1968
|
}
|
|
1932
1969
|
);
|
|
1933
1970
|
}
|
|
1934
|
-
const
|
|
1935
|
-
root:
|
|
1936
|
-
label:
|
|
1937
|
-
action:
|
|
1971
|
+
const Po = "_root_15sqm_1", Oo = "_label_15sqm_9", So = "_action_15sqm_20", ge = {
|
|
1972
|
+
root: Po,
|
|
1973
|
+
label: Oo,
|
|
1974
|
+
action: So
|
|
1938
1975
|
};
|
|
1939
|
-
function
|
|
1940
|
-
return /* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
n && /* @__PURE__ */
|
|
1976
|
+
function Aa({ children: t, action: n, className: e, ...s }) {
|
|
1977
|
+
return /* @__PURE__ */ y("div", { className: [ge.root, e].filter(Boolean).join(" "), ...s, children: [
|
|
1978
|
+
/* @__PURE__ */ r("span", { className: ge.label, children: t }),
|
|
1979
|
+
n && /* @__PURE__ */ r("span", { className: ge.action, children: n })
|
|
1943
1980
|
] });
|
|
1944
1981
|
}
|
|
1945
|
-
const
|
|
1946
|
-
root:
|
|
1947
|
-
leading:
|
|
1948
|
-
meta:
|
|
1949
|
-
hint:
|
|
1950
|
-
divider:
|
|
1951
|
-
shortcut:
|
|
1952
|
-
keys:
|
|
1953
|
-
},
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */
|
|
1982
|
+
const jo = "_root_s1zb4_1", qo = "_leading_s1zb4_11", Lo = "_meta_s1zb4_18", Ho = "_hint_s1zb4_28", Fo = "_divider_s1zb4_32", Do = "_shortcut_s1zb4_39", Yo = "_keys_s1zb4_46", $t = {
|
|
1983
|
+
root: jo,
|
|
1984
|
+
leading: qo,
|
|
1985
|
+
meta: Lo,
|
|
1986
|
+
hint: Ho,
|
|
1987
|
+
divider: Fo,
|
|
1988
|
+
shortcut: Do,
|
|
1989
|
+
keys: Yo
|
|
1990
|
+
}, Uo = [
|
|
1991
|
+
/* @__PURE__ */ r(Tn, { size: 12 }, "shift"),
|
|
1992
|
+
/* @__PURE__ */ r(Rn, { size: 12 }, "enter")
|
|
1956
1993
|
];
|
|
1957
|
-
function
|
|
1994
|
+
function Ma({
|
|
1958
1995
|
hint: t,
|
|
1959
1996
|
shortcutLabel: n,
|
|
1960
|
-
shortcutKeys: e =
|
|
1997
|
+
shortcutKeys: e = Uo,
|
|
1961
1998
|
leading: s,
|
|
1962
1999
|
className: o,
|
|
1963
2000
|
...a
|
|
1964
2001
|
}) {
|
|
1965
|
-
const
|
|
1966
|
-
return /* @__PURE__ */
|
|
1967
|
-
s && /* @__PURE__ */
|
|
1968
|
-
/* @__PURE__ */
|
|
1969
|
-
t && /* @__PURE__ */
|
|
1970
|
-
t &&
|
|
1971
|
-
|
|
1972
|
-
n && /* @__PURE__ */
|
|
1973
|
-
/* @__PURE__ */
|
|
2002
|
+
const i = !!n || e.length > 0;
|
|
2003
|
+
return /* @__PURE__ */ y("div", { className: [$t.root, o].filter(Boolean).join(" "), ...a, children: [
|
|
2004
|
+
s && /* @__PURE__ */ r("div", { className: $t.leading, children: s }),
|
|
2005
|
+
/* @__PURE__ */ y("div", { className: $t.meta, children: [
|
|
2006
|
+
t && /* @__PURE__ */ r("span", { className: $t.hint, children: t }),
|
|
2007
|
+
t && i && /* @__PURE__ */ r("span", { className: $t.divider, "aria-hidden": "true" }),
|
|
2008
|
+
i && /* @__PURE__ */ y("span", { className: $t.shortcut, children: [
|
|
2009
|
+
n && /* @__PURE__ */ r("span", { className: $t.shortcutLabel, children: n }),
|
|
2010
|
+
/* @__PURE__ */ r("span", { className: $t.keys, children: e.map((c, l) => /* @__PURE__ */ r(Nn, { bg: "bg-field-component", children: c }, l)) })
|
|
1974
2011
|
] })
|
|
1975
2012
|
] })
|
|
1976
2013
|
] });
|
|
1977
2014
|
}
|
|
1978
|
-
const
|
|
1979
|
-
root:
|
|
1980
|
-
selected:
|
|
1981
|
-
label:
|
|
1982
|
-
icon:
|
|
2015
|
+
const Xo = "_root_19z6n_1", Go = "_selected_19z6n_38", Wo = "_label_19z6n_48", Qo = "_icon_19z6n_56", Ut = {
|
|
2016
|
+
root: Xo,
|
|
2017
|
+
selected: Go,
|
|
2018
|
+
label: Wo,
|
|
2019
|
+
icon: Qo
|
|
1983
2020
|
};
|
|
1984
|
-
function
|
|
2021
|
+
function wa({
|
|
1985
2022
|
children: t,
|
|
1986
2023
|
leftIcon: n,
|
|
1987
2024
|
rightIcon: e,
|
|
@@ -1989,37 +2026,37 @@ function xa({
|
|
|
1989
2026
|
className: o,
|
|
1990
2027
|
...a
|
|
1991
2028
|
}) {
|
|
1992
|
-
const
|
|
1993
|
-
n && /* @__PURE__ */
|
|
1994
|
-
/* @__PURE__ */
|
|
1995
|
-
e && /* @__PURE__ */
|
|
2029
|
+
const i = [Ut.root, s && Ut.selected, o].filter(Boolean).join(" "), c = /* @__PURE__ */ y(Ct, { children: [
|
|
2030
|
+
n && /* @__PURE__ */ r("span", { className: Ut.icon, children: n }),
|
|
2031
|
+
/* @__PURE__ */ r("span", { className: Ut.label, children: t }),
|
|
2032
|
+
e && /* @__PURE__ */ r("span", { className: Ut.icon, children: e })
|
|
1996
2033
|
] });
|
|
1997
2034
|
if (a.href !== void 0) {
|
|
1998
2035
|
const { href: u, ...h } = a;
|
|
1999
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ r("a", { className: i, href: u, "aria-current": s ? "true" : void 0, ...h, children: c });
|
|
2000
2037
|
}
|
|
2001
2038
|
const { type: l = "button", ...d } = a;
|
|
2002
|
-
return /* @__PURE__ */
|
|
2003
|
-
}
|
|
2004
|
-
const
|
|
2005
|
-
root:
|
|
2006
|
-
dragging:
|
|
2007
|
-
srOnly:
|
|
2008
|
-
references:
|
|
2009
|
-
field:
|
|
2010
|
-
textarea:
|
|
2011
|
-
stop:
|
|
2012
|
-
footer:
|
|
2013
|
-
actions:
|
|
2014
|
-
disabled:
|
|
2015
|
-
},
|
|
2039
|
+
return /* @__PURE__ */ r("button", { className: i, type: l, "aria-current": s ? "true" : void 0, ...d, children: c });
|
|
2040
|
+
}
|
|
2041
|
+
const Vo = "_root_193n0_1", Ko = "_dragging_193n0_21", Zo = "_srOnly_193n0_26", Jo = "_references_193n0_37", tr = "_field_193n0_44", er = "_textarea_193n0_49", nr = "_stop_193n0_77", sr = "_footer_193n0_81", or = "_actions_193n0_88", rr = "_disabled_193n0_95", pt = {
|
|
2042
|
+
root: Vo,
|
|
2043
|
+
dragging: Ko,
|
|
2044
|
+
srOnly: Zo,
|
|
2045
|
+
references: Jo,
|
|
2046
|
+
field: tr,
|
|
2047
|
+
textarea: er,
|
|
2048
|
+
stop: nr,
|
|
2049
|
+
footer: sr,
|
|
2050
|
+
actions: or,
|
|
2051
|
+
disabled: rr
|
|
2052
|
+
}, Ia = re(
|
|
2016
2053
|
function({
|
|
2017
2054
|
value: n,
|
|
2018
2055
|
defaultValue: e = "",
|
|
2019
2056
|
onValueChange: s,
|
|
2020
2057
|
onSubmit: o,
|
|
2021
2058
|
placeholder: a = "Ask anything…",
|
|
2022
|
-
references:
|
|
2059
|
+
references: i,
|
|
2023
2060
|
leading: c,
|
|
2024
2061
|
menu: l,
|
|
2025
2062
|
menuLabel: d = "Add to prompt",
|
|
@@ -2027,147 +2064,161 @@ const Fo = "_root_193n0_1", Do = "_dragging_193n0_21", Yo = "_srOnly_193n0_26",
|
|
|
2027
2064
|
onMenuClose: h,
|
|
2028
2065
|
onAdd: p,
|
|
2029
2066
|
addLabel: f = "Add",
|
|
2030
|
-
|
|
2067
|
+
onVoice: _,
|
|
2068
|
+
voiceLabel: b = "Use voice",
|
|
2069
|
+
voiceActive: N = !1,
|
|
2070
|
+
voiceActiveLabel: m = "Stop listening",
|
|
2071
|
+
trailing: w,
|
|
2031
2072
|
submit: v,
|
|
2032
|
-
submitIcon:
|
|
2033
|
-
submitLabel:
|
|
2034
|
-
onStop:
|
|
2073
|
+
submitIcon: g,
|
|
2074
|
+
submitLabel: M = "Send",
|
|
2075
|
+
onStop: R,
|
|
2035
2076
|
stopIcon: k,
|
|
2036
|
-
stopLabel:
|
|
2037
|
-
loading:
|
|
2038
|
-
submitOnEnter:
|
|
2039
|
-
maxHeight:
|
|
2040
|
-
onFilesDrop:
|
|
2041
|
-
dropLabel:
|
|
2042
|
-
disabled:
|
|
2043
|
-
className:
|
|
2044
|
-
onKeyDown:
|
|
2045
|
-
onPaste:
|
|
2046
|
-
...
|
|
2047
|
-
},
|
|
2048
|
-
const [
|
|
2049
|
-
|
|
2050
|
-
const
|
|
2051
|
-
|
|
2052
|
-
}, [
|
|
2053
|
-
function
|
|
2054
|
-
|
|
2077
|
+
stopLabel: L = "Stop",
|
|
2078
|
+
loading: q = !1,
|
|
2079
|
+
submitOnEnter: U = !0,
|
|
2080
|
+
maxHeight: P = "160px",
|
|
2081
|
+
onFilesDrop: G,
|
|
2082
|
+
dropLabel: z = "Drop files to attach them",
|
|
2083
|
+
disabled: O = !1,
|
|
2084
|
+
className: S,
|
|
2085
|
+
onKeyDown: W,
|
|
2086
|
+
onPaste: H,
|
|
2087
|
+
...ft
|
|
2088
|
+
}, Q) {
|
|
2089
|
+
const [D, Z] = Pt(n, e, s), x = Lt(), j = l != null && l !== !1, [E, Y] = at(!1), nt = F(null), V = F(0), C = D.trim().length > 0 && !O && !q, ut = q && !!R;
|
|
2090
|
+
Me(() => {
|
|
2091
|
+
const T = nt.current;
|
|
2092
|
+
T && (T.style.height = "auto", T.style.height = `${T.scrollHeight}px`);
|
|
2093
|
+
}, [D]);
|
|
2094
|
+
function Nt(T) {
|
|
2095
|
+
nt.current = T, typeof Q == "function" ? Q(T) : Q && (Q.current = T);
|
|
2055
2096
|
}
|
|
2056
|
-
function
|
|
2057
|
-
|
|
2097
|
+
function Mt(T) {
|
|
2098
|
+
Z(T.target.value);
|
|
2058
2099
|
}
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2100
|
+
function gt() {
|
|
2101
|
+
C && (o == null || o(D.trim()), Z(""));
|
|
2061
2102
|
}
|
|
2062
|
-
const
|
|
2063
|
-
function
|
|
2064
|
-
|
|
2103
|
+
const wt = !!G && !O;
|
|
2104
|
+
function Jt(T) {
|
|
2105
|
+
wt && (T.preventDefault(), V.current += 1, Y(!0));
|
|
2065
2106
|
}
|
|
2066
|
-
function
|
|
2067
|
-
|
|
2107
|
+
function xt(T) {
|
|
2108
|
+
wt && (T.preventDefault(), T.dataTransfer.dropEffect = "copy");
|
|
2068
2109
|
}
|
|
2069
|
-
function
|
|
2070
|
-
|
|
2110
|
+
function te(T) {
|
|
2111
|
+
wt && (T.preventDefault(), V.current = Math.max(0, V.current - 1), V.current === 0 && Y(!1));
|
|
2071
2112
|
}
|
|
2072
|
-
function
|
|
2073
|
-
if (!
|
|
2074
|
-
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2113
|
+
function Ht(T) {
|
|
2114
|
+
if (!wt) return;
|
|
2115
|
+
T.preventDefault(), V.current = 0, Y(!1);
|
|
2116
|
+
const It = Array.from(T.dataTransfer.files);
|
|
2117
|
+
It.length > 0 && (G == null || G(It));
|
|
2077
2118
|
}
|
|
2078
|
-
function
|
|
2079
|
-
if (
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2119
|
+
function de(T) {
|
|
2120
|
+
if (H == null || H(T), !wt || T.defaultPrevented) return;
|
|
2121
|
+
const It = Array.from(T.clipboardData.files);
|
|
2122
|
+
It.length > 0 && (T.preventDefault(), G == null || G(It));
|
|
2082
2123
|
}
|
|
2083
|
-
function
|
|
2084
|
-
|
|
2124
|
+
function ue(T) {
|
|
2125
|
+
W == null || W(T), !T.defaultPrevented && U && T.key === "Enter" && !T.shiftKey && (T.preventDefault(), gt());
|
|
2085
2126
|
}
|
|
2086
|
-
return /* @__PURE__ */
|
|
2127
|
+
return /* @__PURE__ */ y(
|
|
2087
2128
|
"div",
|
|
2088
2129
|
{
|
|
2089
2130
|
className: [
|
|
2090
2131
|
pt.root,
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2132
|
+
E && pt.dragging,
|
|
2133
|
+
O && pt.disabled,
|
|
2134
|
+
S
|
|
2094
2135
|
].filter(Boolean).join(" "),
|
|
2095
|
-
onKeyDown: (
|
|
2096
|
-
|
|
2136
|
+
onKeyDown: (T) => {
|
|
2137
|
+
T.key === "Escape" && !T.defaultPrevented && j && h && (T.preventDefault(), h());
|
|
2097
2138
|
},
|
|
2098
|
-
onDragEnter:
|
|
2099
|
-
onDragOver:
|
|
2100
|
-
onDragLeave:
|
|
2101
|
-
onDrop:
|
|
2139
|
+
onDragEnter: Jt,
|
|
2140
|
+
onDragOver: xt,
|
|
2141
|
+
onDragLeave: te,
|
|
2142
|
+
onDrop: Ht,
|
|
2102
2143
|
children: [
|
|
2103
|
-
/* @__PURE__ */
|
|
2104
|
-
/* @__PURE__ */
|
|
2105
|
-
|
|
2144
|
+
/* @__PURE__ */ r("span", { className: pt.srOnly, "aria-live": "polite", children: E ? z : "" }),
|
|
2145
|
+
/* @__PURE__ */ r(
|
|
2146
|
+
Re,
|
|
2106
2147
|
{
|
|
2107
|
-
id:
|
|
2148
|
+
id: x,
|
|
2108
2149
|
menu: l,
|
|
2109
2150
|
label: d,
|
|
2110
2151
|
maxHeight: u,
|
|
2111
|
-
disabled:
|
|
2112
|
-
restoreFocusRef:
|
|
2152
|
+
disabled: O,
|
|
2153
|
+
restoreFocusRef: nt
|
|
2113
2154
|
}
|
|
2114
2155
|
),
|
|
2115
|
-
|
|
2116
|
-
/* @__PURE__ */
|
|
2156
|
+
i && /* @__PURE__ */ r("div", { className: pt.references, children: i }),
|
|
2157
|
+
/* @__PURE__ */ r(Qt, { direction: "y", size: "thin", maxHeight: P, className: pt.field, children: /* @__PURE__ */ r(
|
|
2117
2158
|
"textarea",
|
|
2118
2159
|
{
|
|
2119
|
-
ref:
|
|
2160
|
+
ref: Nt,
|
|
2120
2161
|
className: pt.textarea,
|
|
2121
2162
|
rows: 1,
|
|
2122
|
-
value:
|
|
2163
|
+
value: D,
|
|
2123
2164
|
placeholder: a,
|
|
2124
|
-
disabled:
|
|
2125
|
-
onChange:
|
|
2126
|
-
onKeyDown:
|
|
2127
|
-
onPaste:
|
|
2128
|
-
...
|
|
2165
|
+
disabled: O,
|
|
2166
|
+
onChange: Mt,
|
|
2167
|
+
onKeyDown: ue,
|
|
2168
|
+
onPaste: de,
|
|
2169
|
+
...ft
|
|
2129
2170
|
}
|
|
2130
2171
|
) }),
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
/* @__PURE__ */
|
|
2133
|
-
/* @__PURE__ */
|
|
2134
|
-
|
|
2135
|
-
p && /* @__PURE__ */
|
|
2136
|
-
|
|
2172
|
+
/* @__PURE__ */ y("div", { className: pt.footer, children: [
|
|
2173
|
+
/* @__PURE__ */ r("div", { className: pt.actions, children: c }),
|
|
2174
|
+
/* @__PURE__ */ y("div", { className: pt.actions, children: [
|
|
2175
|
+
w,
|
|
2176
|
+
p && /* @__PURE__ */ r(
|
|
2177
|
+
it,
|
|
2137
2178
|
{
|
|
2138
2179
|
variant: "transparent",
|
|
2139
2180
|
radius: "full",
|
|
2140
2181
|
size: "sm",
|
|
2141
|
-
icon: /* @__PURE__ */
|
|
2182
|
+
icon: /* @__PURE__ */ r(Ie, { size: 18 }),
|
|
2142
2183
|
"aria-label": f,
|
|
2143
|
-
"aria-expanded":
|
|
2144
|
-
"aria-controls":
|
|
2145
|
-
disabled:
|
|
2184
|
+
"aria-expanded": j,
|
|
2185
|
+
"aria-controls": x,
|
|
2186
|
+
disabled: O,
|
|
2146
2187
|
onClick: p
|
|
2147
2188
|
}
|
|
2148
2189
|
),
|
|
2149
|
-
|
|
2150
|
-
|
|
2190
|
+
_ && /* @__PURE__ */ r(
|
|
2191
|
+
Ee,
|
|
2192
|
+
{
|
|
2193
|
+
label: b,
|
|
2194
|
+
activeLabel: m,
|
|
2195
|
+
active: N,
|
|
2196
|
+
disabled: O,
|
|
2197
|
+
onClick: _
|
|
2198
|
+
}
|
|
2199
|
+
),
|
|
2200
|
+
v ?? (ut ? /* @__PURE__ */ r(
|
|
2201
|
+
it,
|
|
2151
2202
|
{
|
|
2152
2203
|
variant: "neutral",
|
|
2153
2204
|
radius: "full",
|
|
2154
2205
|
size: "sm",
|
|
2155
2206
|
className: pt.stop,
|
|
2156
|
-
icon: k ?? /* @__PURE__ */
|
|
2157
|
-
"aria-label":
|
|
2158
|
-
onClick:
|
|
2207
|
+
icon: k ?? /* @__PURE__ */ r(En, { size: 12, fill: "currentColor" }),
|
|
2208
|
+
"aria-label": L,
|
|
2209
|
+
onClick: R
|
|
2159
2210
|
}
|
|
2160
|
-
) : /* @__PURE__ */
|
|
2161
|
-
|
|
2211
|
+
) : /* @__PURE__ */ r(
|
|
2212
|
+
it,
|
|
2162
2213
|
{
|
|
2163
2214
|
variant: "inverted",
|
|
2164
2215
|
radius: "full",
|
|
2165
2216
|
size: "sm",
|
|
2166
|
-
icon:
|
|
2167
|
-
"aria-label":
|
|
2168
|
-
disabled: !
|
|
2169
|
-
loading:
|
|
2170
|
-
onClick:
|
|
2217
|
+
icon: g ?? /* @__PURE__ */ r(on, { size: 15 }),
|
|
2218
|
+
"aria-label": M,
|
|
2219
|
+
disabled: !C,
|
|
2220
|
+
loading: q,
|
|
2221
|
+
onClick: gt
|
|
2171
2222
|
}
|
|
2172
2223
|
))
|
|
2173
2224
|
] })
|
|
@@ -2176,28 +2227,28 @@ const Fo = "_root_193n0_1", Do = "_dragging_193n0_21", Yo = "_srOnly_193n0_26",
|
|
|
2176
2227
|
}
|
|
2177
2228
|
);
|
|
2178
2229
|
}
|
|
2179
|
-
),
|
|
2180
|
-
root:
|
|
2181
|
-
expanded:
|
|
2182
|
-
promptRow:
|
|
2183
|
-
references:
|
|
2184
|
-
referencesVisible:
|
|
2185
|
-
referencesClip:
|
|
2186
|
-
referencesRow:
|
|
2187
|
-
closing:
|
|
2188
|
-
disabled:
|
|
2189
|
-
avatar:
|
|
2190
|
-
input:
|
|
2191
|
-
actions:
|
|
2192
|
-
divider:
|
|
2193
|
-
},
|
|
2230
|
+
), ir = "_root_6xqta_30", ar = "_expanded_6xqta_50", cr = "_promptRow_6xqta_54", lr = "_references_6xqta_62", dr = "_referencesVisible_6xqta_73", ur = "_referencesClip_6xqta_79", hr = "_referencesRow_6xqta_84", fr = "_closing_6xqta_90", pr = "_disabled_6xqta_124", _r = "_avatar_6xqta_129", mr = "_input_6xqta_136", yr = "_actions_6xqta_154", gr = "_divider_6xqta_161", dt = {
|
|
2231
|
+
root: ir,
|
|
2232
|
+
expanded: ar,
|
|
2233
|
+
promptRow: cr,
|
|
2234
|
+
references: lr,
|
|
2235
|
+
referencesVisible: dr,
|
|
2236
|
+
referencesClip: ur,
|
|
2237
|
+
referencesRow: hr,
|
|
2238
|
+
closing: fr,
|
|
2239
|
+
disabled: pr,
|
|
2240
|
+
avatar: _r,
|
|
2241
|
+
input: mr,
|
|
2242
|
+
actions: yr,
|
|
2243
|
+
divider: gr
|
|
2244
|
+
}, za = re(
|
|
2194
2245
|
function({
|
|
2195
2246
|
value: n,
|
|
2196
2247
|
open: e = !0,
|
|
2197
2248
|
defaultValue: s = "",
|
|
2198
2249
|
onValueChange: o,
|
|
2199
2250
|
onSubmit: a,
|
|
2200
|
-
placeholder:
|
|
2251
|
+
placeholder: i = "Work with Novi",
|
|
2201
2252
|
avatar: c,
|
|
2202
2253
|
noviProps: l,
|
|
2203
2254
|
references: d,
|
|
@@ -2206,81 +2257,83 @@ const Fo = "_root_193n0_1", Do = "_dragging_193n0_21", Yo = "_srOnly_193n0_26",
|
|
|
2206
2257
|
menuLabel: p = "Add to prompt",
|
|
2207
2258
|
menuMaxHeight: f = 240,
|
|
2208
2259
|
onMenuClose: _,
|
|
2209
|
-
onAdd:
|
|
2260
|
+
onAdd: b,
|
|
2210
2261
|
onVoice: N,
|
|
2211
2262
|
onOpen: m,
|
|
2212
2263
|
addLabel: w = "Add",
|
|
2213
|
-
voiceLabel:
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2264
|
+
voiceLabel: v = "Use voice",
|
|
2265
|
+
voiceActive: g = !1,
|
|
2266
|
+
voiceActiveLabel: M = "Stop listening",
|
|
2267
|
+
openLabel: R = "Open assistant",
|
|
2268
|
+
disabled: k = !1,
|
|
2269
|
+
className: L,
|
|
2270
|
+
onKeyDown: q,
|
|
2271
|
+
...U
|
|
2272
|
+
}, P) {
|
|
2273
|
+
const [G, z] = Pt(n, s, o), [O, S] = at(e), [W, H] = at(!1), [ft, Q] = at(d), D = Lt(), Z = F(null), x = h != null && h !== !1, j = F(null);
|
|
2274
|
+
et(() => {
|
|
2275
|
+
e ? (S(!0), H(!1)) : O && H(!0);
|
|
2276
|
+
}, [e, O]), et(() => {
|
|
2277
|
+
d != null && d !== !1 && Q(d);
|
|
2225
2278
|
}, [d]);
|
|
2226
|
-
function
|
|
2227
|
-
|
|
2279
|
+
function E(C) {
|
|
2280
|
+
j.current = C, typeof P == "function" ? P(C) : P && (P.current = C);
|
|
2228
2281
|
}
|
|
2229
|
-
function
|
|
2230
|
-
|
|
2282
|
+
function Y(C) {
|
|
2283
|
+
z(C.target.value);
|
|
2231
2284
|
}
|
|
2232
|
-
const
|
|
2233
|
-
return
|
|
2285
|
+
const nt = !!(u || b || N || m), V = d != null && d !== !1;
|
|
2286
|
+
return O ? /* @__PURE__ */ y(
|
|
2234
2287
|
"form",
|
|
2235
2288
|
{
|
|
2236
2289
|
className: [
|
|
2237
|
-
|
|
2238
|
-
(
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2290
|
+
dt.root,
|
|
2291
|
+
(V || x) && dt.expanded,
|
|
2292
|
+
W && dt.closing,
|
|
2293
|
+
k && dt.disabled,
|
|
2294
|
+
L
|
|
2242
2295
|
].filter(Boolean).join(" "),
|
|
2243
|
-
onKeyDown: (
|
|
2244
|
-
|
|
2296
|
+
onKeyDown: (C) => {
|
|
2297
|
+
C.key === "Escape" && !C.defaultPrevented && x && _ && (C.preventDefault(), _());
|
|
2245
2298
|
},
|
|
2246
|
-
onAnimationEnd: (
|
|
2247
|
-
|
|
2299
|
+
onAnimationEnd: (C) => {
|
|
2300
|
+
C.target === C.currentTarget && W && S(!1);
|
|
2248
2301
|
},
|
|
2249
|
-
onSubmit: (
|
|
2250
|
-
var
|
|
2251
|
-
|
|
2252
|
-
const
|
|
2253
|
-
if (
|
|
2254
|
-
const
|
|
2255
|
-
(
|
|
2302
|
+
onSubmit: (C) => {
|
|
2303
|
+
var Mt, gt;
|
|
2304
|
+
C.preventDefault();
|
|
2305
|
+
const ut = G.trim();
|
|
2306
|
+
if (C.target !== C.currentTarget || !ut || k) return;
|
|
2307
|
+
const Nt = C.nativeEvent.submitter;
|
|
2308
|
+
(Mt = Z.current) != null && Mt.contains(document.activeElement) || Nt && ((gt = Z.current) != null && gt.contains(Nt)) || (a == null || a(ut), z(""));
|
|
2256
2309
|
},
|
|
2257
2310
|
children: [
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
-
|
|
2311
|
+
/* @__PURE__ */ r(
|
|
2312
|
+
Re,
|
|
2260
2313
|
{
|
|
2261
|
-
ref:
|
|
2262
|
-
id:
|
|
2314
|
+
ref: Z,
|
|
2315
|
+
id: D,
|
|
2263
2316
|
menu: h,
|
|
2264
2317
|
label: p,
|
|
2265
2318
|
maxHeight: f,
|
|
2266
|
-
disabled:
|
|
2267
|
-
restoreFocusRef:
|
|
2319
|
+
disabled: k,
|
|
2320
|
+
restoreFocusRef: j
|
|
2268
2321
|
}
|
|
2269
2322
|
),
|
|
2270
|
-
/* @__PURE__ */
|
|
2323
|
+
/* @__PURE__ */ r(
|
|
2271
2324
|
"div",
|
|
2272
2325
|
{
|
|
2273
|
-
className: [
|
|
2274
|
-
"aria-hidden": !
|
|
2275
|
-
onTransitionEnd: (
|
|
2276
|
-
|
|
2326
|
+
className: [dt.references, V && dt.referencesVisible].filter(Boolean).join(" "),
|
|
2327
|
+
"aria-hidden": !V,
|
|
2328
|
+
onTransitionEnd: (C) => {
|
|
2329
|
+
C.propertyName === "grid-template-rows" && !V && Q(null);
|
|
2277
2330
|
},
|
|
2278
|
-
children: /* @__PURE__ */
|
|
2331
|
+
children: /* @__PURE__ */ r("div", { className: dt.referencesClip, children: /* @__PURE__ */ r("div", { className: dt.referencesRow, children: ft }) })
|
|
2279
2332
|
}
|
|
2280
2333
|
),
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
|
|
2334
|
+
/* @__PURE__ */ y("div", { className: dt.promptRow, children: [
|
|
2335
|
+
/* @__PURE__ */ r("span", { className: dt.avatar, "aria-hidden": !0, children: c ?? /* @__PURE__ */ r(
|
|
2336
|
+
Zt,
|
|
2284
2337
|
{
|
|
2285
2338
|
size: 28,
|
|
2286
2339
|
expression: "happy",
|
|
@@ -2289,62 +2342,60 @@ const Fo = "_root_193n0_1", Do = "_dragging_193n0_21", Yo = "_srOnly_193n0_26",
|
|
|
2289
2342
|
...l
|
|
2290
2343
|
}
|
|
2291
2344
|
) }),
|
|
2292
|
-
/* @__PURE__ */
|
|
2345
|
+
/* @__PURE__ */ r(
|
|
2293
2346
|
"input",
|
|
2294
2347
|
{
|
|
2295
|
-
...
|
|
2296
|
-
ref:
|
|
2348
|
+
...U,
|
|
2349
|
+
ref: E,
|
|
2297
2350
|
type: "text",
|
|
2298
|
-
className:
|
|
2299
|
-
value:
|
|
2300
|
-
placeholder:
|
|
2301
|
-
disabled:
|
|
2302
|
-
onChange:
|
|
2303
|
-
onKeyDown: (
|
|
2304
|
-
var
|
|
2305
|
-
|
|
2351
|
+
className: dt.input,
|
|
2352
|
+
value: G,
|
|
2353
|
+
placeholder: i,
|
|
2354
|
+
disabled: k,
|
|
2355
|
+
onChange: Y,
|
|
2356
|
+
onKeyDown: (C) => {
|
|
2357
|
+
var ut;
|
|
2358
|
+
q == null || q(C), !C.defaultPrevented && C.key === "Enter" && !C.nativeEvent.isComposing && (C.preventDefault(), (ut = C.currentTarget.form) == null || ut.requestSubmit());
|
|
2306
2359
|
}
|
|
2307
2360
|
}
|
|
2308
2361
|
),
|
|
2309
|
-
|
|
2362
|
+
nt && /* @__PURE__ */ y("div", { className: dt.actions, children: [
|
|
2310
2363
|
u,
|
|
2311
|
-
|
|
2312
|
-
|
|
2364
|
+
b && /* @__PURE__ */ r(
|
|
2365
|
+
it,
|
|
2313
2366
|
{
|
|
2314
2367
|
variant: "transparent",
|
|
2315
2368
|
radius: "full",
|
|
2316
2369
|
size: "sm",
|
|
2317
|
-
"aria-expanded":
|
|
2318
|
-
"aria-controls":
|
|
2319
|
-
icon: /* @__PURE__ */
|
|
2370
|
+
"aria-expanded": x,
|
|
2371
|
+
"aria-controls": D,
|
|
2372
|
+
icon: /* @__PURE__ */ r(Ie, { size: 18 }),
|
|
2320
2373
|
"aria-label": w,
|
|
2321
|
-
disabled:
|
|
2322
|
-
onClick:
|
|
2374
|
+
disabled: k,
|
|
2375
|
+
onClick: b
|
|
2323
2376
|
}
|
|
2324
2377
|
),
|
|
2325
|
-
N && /* @__PURE__ */
|
|
2326
|
-
|
|
2378
|
+
N && /* @__PURE__ */ r(
|
|
2379
|
+
Ee,
|
|
2327
2380
|
{
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
"aria-label": k,
|
|
2333
|
-
disabled: b,
|
|
2381
|
+
label: v,
|
|
2382
|
+
activeLabel: M,
|
|
2383
|
+
active: g,
|
|
2384
|
+
disabled: k,
|
|
2334
2385
|
onClick: N
|
|
2335
2386
|
}
|
|
2336
2387
|
),
|
|
2337
|
-
m && /* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
|
|
2388
|
+
m && /* @__PURE__ */ y(Ct, { children: [
|
|
2389
|
+
/* @__PURE__ */ r("span", { className: dt.divider, "aria-hidden": !0 }),
|
|
2390
|
+
/* @__PURE__ */ r(
|
|
2391
|
+
it,
|
|
2341
2392
|
{
|
|
2342
2393
|
variant: "transparent",
|
|
2343
2394
|
radius: "full",
|
|
2344
2395
|
size: "sm",
|
|
2345
|
-
icon: /* @__PURE__ */
|
|
2346
|
-
"aria-label":
|
|
2347
|
-
disabled:
|
|
2396
|
+
icon: /* @__PURE__ */ r(Cn, { size: 18 }),
|
|
2397
|
+
"aria-label": R,
|
|
2398
|
+
disabled: k,
|
|
2348
2399
|
onClick: m
|
|
2349
2400
|
}
|
|
2350
2401
|
)
|
|
@@ -2355,60 +2406,60 @@ const Fo = "_root_193n0_1", Do = "_dragging_193n0_21", Yo = "_srOnly_193n0_26",
|
|
|
2355
2406
|
}
|
|
2356
2407
|
) : null;
|
|
2357
2408
|
}
|
|
2358
|
-
),
|
|
2359
|
-
root:
|
|
2360
|
-
image:
|
|
2361
|
-
base:
|
|
2362
|
-
small:
|
|
2363
|
-
button:
|
|
2409
|
+
), xr = "_root_1deeq_1", br = "_image_1deeq_11", vr = "_base_1deeq_18", kr = "_small_1deeq_23", Nr = "_button_1deeq_29", Xt = {
|
|
2410
|
+
root: xr,
|
|
2411
|
+
image: br,
|
|
2412
|
+
base: vr,
|
|
2413
|
+
small: kr,
|
|
2414
|
+
button: Nr
|
|
2364
2415
|
};
|
|
2365
|
-
function
|
|
2416
|
+
function $r({
|
|
2366
2417
|
images: t,
|
|
2367
2418
|
onImageClick: n,
|
|
2368
2419
|
size: e = "base",
|
|
2369
2420
|
className: s,
|
|
2370
2421
|
...o
|
|
2371
2422
|
}) {
|
|
2372
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
2373
|
-
(a,
|
|
2423
|
+
return t.length === 0 ? null : /* @__PURE__ */ r("div", { className: [Xt.root, Xt[e], s].filter(Boolean).join(" "), ...o, children: t.map(
|
|
2424
|
+
(a, i) => n ? /* @__PURE__ */ r(
|
|
2374
2425
|
"button",
|
|
2375
2426
|
{
|
|
2376
2427
|
type: "button",
|
|
2377
|
-
className:
|
|
2378
|
-
"aria-label": a.alt || `Open image ${
|
|
2379
|
-
onClick: () => n(
|
|
2380
|
-
children: /* @__PURE__ */
|
|
2428
|
+
className: Xt.button,
|
|
2429
|
+
"aria-label": a.alt || `Open image ${i + 1} of ${t.length}`,
|
|
2430
|
+
onClick: () => n(i),
|
|
2431
|
+
children: /* @__PURE__ */ r("img", { className: Xt.image, src: a.src, alt: a.alt ?? "" })
|
|
2381
2432
|
},
|
|
2382
|
-
`${a.src}-${
|
|
2383
|
-
) : /* @__PURE__ */
|
|
2433
|
+
`${a.src}-${i}`
|
|
2434
|
+
) : /* @__PURE__ */ r(
|
|
2384
2435
|
"img",
|
|
2385
2436
|
{
|
|
2386
|
-
className:
|
|
2437
|
+
className: Xt.image,
|
|
2387
2438
|
src: a.src,
|
|
2388
2439
|
alt: a.alt ?? ""
|
|
2389
2440
|
},
|
|
2390
|
-
`${a.src}-${
|
|
2441
|
+
`${a.src}-${i}`
|
|
2391
2442
|
)
|
|
2392
2443
|
) });
|
|
2393
2444
|
}
|
|
2394
|
-
const
|
|
2395
|
-
pill:
|
|
2396
|
-
root:
|
|
2397
|
-
header:
|
|
2398
|
-
title:
|
|
2399
|
-
prefix:
|
|
2400
|
-
mark:
|
|
2401
|
-
error:
|
|
2402
|
-
body:
|
|
2445
|
+
const Ar = "_pill_1o1q3_2", Mr = "_root_1o1q3_29", wr = "_header_1o1q3_39", Ir = "_title_1o1q3_50", zr = "_prefix_1o1q3_54", Br = "_mark_1o1q3_60", Tr = "_error_1o1q3_67", Rr = "_body_1o1q3_78", _t = {
|
|
2446
|
+
pill: Ar,
|
|
2447
|
+
root: Mr,
|
|
2448
|
+
header: wr,
|
|
2449
|
+
title: Ir,
|
|
2450
|
+
prefix: zr,
|
|
2451
|
+
mark: Br,
|
|
2452
|
+
error: Tr,
|
|
2453
|
+
body: Rr
|
|
2403
2454
|
};
|
|
2404
|
-
function
|
|
2455
|
+
function Ba({
|
|
2405
2456
|
title: t,
|
|
2406
2457
|
children: n,
|
|
2407
2458
|
icon: e,
|
|
2408
2459
|
prefix: s,
|
|
2409
2460
|
tone: o = "default",
|
|
2410
2461
|
open: a,
|
|
2411
|
-
defaultOpen:
|
|
2462
|
+
defaultOpen: i = !1,
|
|
2412
2463
|
onOpenChange: c,
|
|
2413
2464
|
maxBodyHeight: l,
|
|
2414
2465
|
expandLabel: d = "Open",
|
|
@@ -2416,25 +2467,25 @@ function ka({
|
|
|
2416
2467
|
className: h,
|
|
2417
2468
|
...p
|
|
2418
2469
|
}) {
|
|
2419
|
-
const [f, _] =
|
|
2420
|
-
return f ? /* @__PURE__ */
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
|
|
2423
|
-
/* @__PURE__ */
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
|
|
2470
|
+
const [f, _] = Pt(a, i, c), b = e && /* @__PURE__ */ r("span", { className: [_t.mark, o === "error" && _t.error].filter(Boolean).join(" "), children: e });
|
|
2471
|
+
return f ? /* @__PURE__ */ y("div", { className: [_t.root, h].filter(Boolean).join(" "), ...p, children: [
|
|
2472
|
+
/* @__PURE__ */ y("div", { className: _t.header, children: [
|
|
2473
|
+
b,
|
|
2474
|
+
/* @__PURE__ */ r("span", { className: _t.title, children: t }),
|
|
2475
|
+
/* @__PURE__ */ r(
|
|
2476
|
+
it,
|
|
2426
2477
|
{
|
|
2427
2478
|
variant: "transparent",
|
|
2428
2479
|
size: "2xsmall",
|
|
2429
|
-
icon: /* @__PURE__ */
|
|
2480
|
+
icon: /* @__PURE__ */ r(Pn, { size: 15 }),
|
|
2430
2481
|
"aria-label": u,
|
|
2431
2482
|
"aria-expanded": !0,
|
|
2432
2483
|
onClick: () => _(!f)
|
|
2433
2484
|
}
|
|
2434
2485
|
)
|
|
2435
2486
|
] }),
|
|
2436
|
-
l ? /* @__PURE__ */
|
|
2437
|
-
] }) : /* @__PURE__ */
|
|
2487
|
+
l ? /* @__PURE__ */ r(Qt, { direction: "y", size: "thin", maxHeight: l, className: _t.body, children: n }) : /* @__PURE__ */ r("div", { className: _t.body, children: n })
|
|
2488
|
+
] }) : /* @__PURE__ */ y(
|
|
2438
2489
|
"button",
|
|
2439
2490
|
{
|
|
2440
2491
|
type: "button",
|
|
@@ -2443,33 +2494,33 @@ function ka({
|
|
|
2443
2494
|
"aria-label": typeof t == "string" ? `${d}: ${t}` : d,
|
|
2444
2495
|
onClick: () => _(!f),
|
|
2445
2496
|
children: [
|
|
2446
|
-
s && /* @__PURE__ */
|
|
2447
|
-
|
|
2448
|
-
/* @__PURE__ */
|
|
2497
|
+
s && /* @__PURE__ */ r("span", { className: _t.prefix, children: s }),
|
|
2498
|
+
b,
|
|
2499
|
+
/* @__PURE__ */ r("span", { className: _t.title, children: t })
|
|
2449
2500
|
]
|
|
2450
2501
|
}
|
|
2451
2502
|
);
|
|
2452
2503
|
}
|
|
2453
|
-
const
|
|
2454
|
-
root:
|
|
2455
|
-
header:
|
|
2456
|
-
mark:
|
|
2457
|
-
title:
|
|
2458
|
-
meta:
|
|
2459
|
-
body:
|
|
2460
|
-
description:
|
|
2461
|
-
footer:
|
|
2462
|
-
footerStart:
|
|
2463
|
-
footerEnd:
|
|
2504
|
+
const Er = "_root_exebp_6", Cr = "_header_exebp_18", Pr = "_mark_exebp_30", Or = "_title_exebp_37", Sr = "_meta_exebp_42", jr = "_body_exebp_50", qr = "_description_exebp_60", Lr = "_footer_exebp_67", Hr = "_footerStart_exebp_77", Fr = "_footerEnd_exebp_84", X = {
|
|
2505
|
+
root: Er,
|
|
2506
|
+
header: Cr,
|
|
2507
|
+
mark: Pr,
|
|
2508
|
+
title: Or,
|
|
2509
|
+
meta: Sr,
|
|
2510
|
+
body: jr,
|
|
2511
|
+
description: qr,
|
|
2512
|
+
footer: Lr,
|
|
2513
|
+
footerStart: Hr,
|
|
2514
|
+
footerEnd: Fr
|
|
2464
2515
|
};
|
|
2465
|
-
function
|
|
2516
|
+
function Ta({
|
|
2466
2517
|
title: t,
|
|
2467
2518
|
description: n,
|
|
2468
2519
|
children: e,
|
|
2469
2520
|
icon: s,
|
|
2470
2521
|
status: o,
|
|
2471
2522
|
onConfirm: a,
|
|
2472
|
-
onCancel:
|
|
2523
|
+
onCancel: i,
|
|
2473
2524
|
footer: c,
|
|
2474
2525
|
confirmLabel: l = "Run",
|
|
2475
2526
|
cancelLabel: d = "Cancel",
|
|
@@ -2478,10 +2529,10 @@ function Na({
|
|
|
2478
2529
|
className: p,
|
|
2479
2530
|
...f
|
|
2480
2531
|
}) {
|
|
2481
|
-
const _ = s === null ? null : s ?? /* @__PURE__ */
|
|
2482
|
-
|
|
2483
|
-
a && /* @__PURE__ */
|
|
2484
|
-
|
|
2532
|
+
const _ = s === null ? null : s ?? /* @__PURE__ */ r(On, { size: 16 }), b = c ?? /* @__PURE__ */ y(Ct, { children: [
|
|
2533
|
+
i && /* @__PURE__ */ r(At, { variant: "neutral", size: "sm", onClick: i, children: d }),
|
|
2534
|
+
a && /* @__PURE__ */ r(
|
|
2535
|
+
At,
|
|
2485
2536
|
{
|
|
2486
2537
|
variant: "inverted",
|
|
2487
2538
|
size: "sm",
|
|
@@ -2491,28 +2542,28 @@ function Na({
|
|
|
2491
2542
|
children: l
|
|
2492
2543
|
}
|
|
2493
2544
|
)
|
|
2494
|
-
] }), N = !!n || !!e, m = !!c || !!a || !!
|
|
2495
|
-
return /* @__PURE__ */
|
|
2496
|
-
/* @__PURE__ */
|
|
2497
|
-
_ && /* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2499
|
-
o && /* @__PURE__ */
|
|
2545
|
+
] }), N = !!n || !!e, m = !!c || !!a || !!i;
|
|
2546
|
+
return /* @__PURE__ */ y("div", { className: [X.root, p].filter(Boolean).join(" "), ...f, children: [
|
|
2547
|
+
/* @__PURE__ */ y("div", { className: X.header, children: [
|
|
2548
|
+
_ && /* @__PURE__ */ r("span", { className: X.mark, children: _ }),
|
|
2549
|
+
/* @__PURE__ */ r("span", { className: X.title, children: t }),
|
|
2550
|
+
o && /* @__PURE__ */ r("span", { className: X.meta, children: o })
|
|
2500
2551
|
] }),
|
|
2501
|
-
N && /* @__PURE__ */
|
|
2502
|
-
n && /* @__PURE__ */
|
|
2552
|
+
N && /* @__PURE__ */ y("div", { className: X.body, children: [
|
|
2553
|
+
n && /* @__PURE__ */ r("p", { className: X.description, children: n }),
|
|
2503
2554
|
e
|
|
2504
2555
|
] }),
|
|
2505
|
-
m && /* @__PURE__ */
|
|
2556
|
+
m && /* @__PURE__ */ r("div", { className: X.footer, children: /* @__PURE__ */ r("span", { className: X.footerEnd, children: b }) })
|
|
2506
2557
|
] });
|
|
2507
2558
|
}
|
|
2508
|
-
function
|
|
2559
|
+
function Ra({
|
|
2509
2560
|
title: t,
|
|
2510
2561
|
children: n,
|
|
2511
2562
|
icon: e,
|
|
2512
2563
|
progress: s,
|
|
2513
2564
|
onPrevious: o,
|
|
2514
2565
|
onNext: a,
|
|
2515
|
-
onSubmit:
|
|
2566
|
+
onSubmit: i,
|
|
2516
2567
|
onSkip: c,
|
|
2517
2568
|
footer: l,
|
|
2518
2569
|
skipLabel: d = "Skip for now",
|
|
@@ -2521,47 +2572,47 @@ function $a({
|
|
|
2521
2572
|
submitLabel: p = "Submit",
|
|
2522
2573
|
disabled: f = !1,
|
|
2523
2574
|
submitting: _ = !1,
|
|
2524
|
-
className:
|
|
2575
|
+
className: b,
|
|
2525
2576
|
...N
|
|
2526
2577
|
}) {
|
|
2527
|
-
const m = e === null ? null : e ?? /* @__PURE__ */
|
|
2528
|
-
!w &&
|
|
2529
|
-
o && /* @__PURE__ */
|
|
2530
|
-
a && /* @__PURE__ */
|
|
2531
|
-
|
|
2532
|
-
|
|
2578
|
+
const m = e === null ? null : e ?? /* @__PURE__ */ r(Sn, { size: 16 }), w = !!o || !!a, v = c && /* @__PURE__ */ r(At, { variant: "neutral", size: "sm", onClick: c, children: d }), g = l ?? /* @__PURE__ */ y(Ct, { children: [
|
|
2579
|
+
!w && v,
|
|
2580
|
+
o && /* @__PURE__ */ r(At, { variant: "neutral", size: "sm", onClick: o, children: u }),
|
|
2581
|
+
a && /* @__PURE__ */ r(At, { variant: "neutral", size: "sm", disabled: f, onClick: a, children: h }),
|
|
2582
|
+
i && /* @__PURE__ */ r(
|
|
2583
|
+
At,
|
|
2533
2584
|
{
|
|
2534
2585
|
variant: "neutral",
|
|
2535
2586
|
size: "sm",
|
|
2536
2587
|
disabled: f,
|
|
2537
2588
|
loading: _,
|
|
2538
|
-
onClick:
|
|
2589
|
+
onClick: i,
|
|
2539
2590
|
children: p
|
|
2540
2591
|
}
|
|
2541
2592
|
)
|
|
2542
|
-
] }),
|
|
2543
|
-
return /* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
m && /* @__PURE__ */
|
|
2546
|
-
/* @__PURE__ */
|
|
2547
|
-
s && /* @__PURE__ */
|
|
2593
|
+
] }), M = !!l || !!o || !!a || !!i || !!c;
|
|
2594
|
+
return /* @__PURE__ */ y("div", { className: [X.root, b].filter(Boolean).join(" "), ...N, children: [
|
|
2595
|
+
/* @__PURE__ */ y("div", { className: X.header, children: [
|
|
2596
|
+
m && /* @__PURE__ */ r("span", { className: X.mark, children: m }),
|
|
2597
|
+
/* @__PURE__ */ r("span", { className: X.title, children: t }),
|
|
2598
|
+
s && /* @__PURE__ */ r("span", { className: X.meta, children: s })
|
|
2548
2599
|
] }),
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
|
|
2551
|
-
w && !l && /* @__PURE__ */
|
|
2552
|
-
/* @__PURE__ */
|
|
2600
|
+
/* @__PURE__ */ r("div", { className: X.body, children: n }),
|
|
2601
|
+
M && /* @__PURE__ */ y("div", { className: X.footer, children: [
|
|
2602
|
+
w && !l && /* @__PURE__ */ r("span", { className: X.footerStart, children: v }),
|
|
2603
|
+
/* @__PURE__ */ r("span", { className: X.footerEnd, children: g })
|
|
2553
2604
|
] })
|
|
2554
2605
|
] });
|
|
2555
2606
|
}
|
|
2556
|
-
const
|
|
2557
|
-
root:
|
|
2558
|
-
label:
|
|
2559
|
-
name:
|
|
2560
|
-
key:
|
|
2561
|
-
description:
|
|
2562
|
-
control:
|
|
2607
|
+
const Dr = "_root_1tlwe_1", Yr = "_label_1tlwe_8", Ur = "_name_1tlwe_17", Xr = "_key_1tlwe_22", Gr = "_description_1tlwe_28", Wr = "_control_1tlwe_34", Ot = {
|
|
2608
|
+
root: Dr,
|
|
2609
|
+
label: Yr,
|
|
2610
|
+
name: Ur,
|
|
2611
|
+
key: Xr,
|
|
2612
|
+
description: Gr,
|
|
2613
|
+
control: Wr
|
|
2563
2614
|
};
|
|
2564
|
-
function
|
|
2615
|
+
function Ea({
|
|
2565
2616
|
label: t,
|
|
2566
2617
|
name: n,
|
|
2567
2618
|
children: e,
|
|
@@ -2569,44 +2620,44 @@ function Aa({
|
|
|
2569
2620
|
className: o,
|
|
2570
2621
|
...a
|
|
2571
2622
|
}) {
|
|
2572
|
-
return /* @__PURE__ */
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2575
|
-
n && /* @__PURE__ */
|
|
2623
|
+
return /* @__PURE__ */ y("label", { className: [Ot.root, o].filter(Boolean).join(" "), ...a, children: [
|
|
2624
|
+
/* @__PURE__ */ y("span", { className: Ot.label, children: [
|
|
2625
|
+
/* @__PURE__ */ r("span", { className: Ot.name, children: t }),
|
|
2626
|
+
n && /* @__PURE__ */ y("code", { className: Ot.key, children: [
|
|
2576
2627
|
"(",
|
|
2577
2628
|
n,
|
|
2578
2629
|
")"
|
|
2579
2630
|
] })
|
|
2580
2631
|
] }),
|
|
2581
|
-
s && /* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2632
|
+
s && /* @__PURE__ */ r("span", { className: Ot.description, children: s }),
|
|
2633
|
+
/* @__PURE__ */ r("span", { className: Ot.control, children: e })
|
|
2583
2634
|
] });
|
|
2584
2635
|
}
|
|
2585
|
-
const
|
|
2586
|
-
root:
|
|
2587
|
-
chip:
|
|
2588
|
-
plain:
|
|
2636
|
+
const Qr = "_root_8yfcy_1", Vr = "_chip_8yfcy_20", Kr = "_plain_8yfcy_28", Zr = "_interactive_8yfcy_37", Jr = "_prefix_8yfcy_62", ti = "_marks_8yfcy_72", ei = "_marksThumb_8yfcy_82", ni = "_thumbnail_8yfcy_89", si = "_icon_8yfcy_102", oi = "_remove_8yfcy_103", ri = "_toneError_8yfcy_114", ii = "_removable_8yfcy_124", ai = "_label_8yfcy_139", ci = "_mono_8yfcy_146", ot = {
|
|
2637
|
+
root: Qr,
|
|
2638
|
+
chip: Vr,
|
|
2639
|
+
plain: Kr,
|
|
2589
2640
|
static: "_static_8yfcy_33",
|
|
2590
|
-
interactive:
|
|
2591
|
-
prefix:
|
|
2592
|
-
marks:
|
|
2593
|
-
marksThumb:
|
|
2594
|
-
thumbnail:
|
|
2595
|
-
icon:
|
|
2596
|
-
remove:
|
|
2597
|
-
toneError:
|
|
2598
|
-
removable:
|
|
2599
|
-
label:
|
|
2600
|
-
mono:
|
|
2641
|
+
interactive: Zr,
|
|
2642
|
+
prefix: Jr,
|
|
2643
|
+
marks: ti,
|
|
2644
|
+
marksThumb: ei,
|
|
2645
|
+
thumbnail: ni,
|
|
2646
|
+
icon: si,
|
|
2647
|
+
remove: oi,
|
|
2648
|
+
toneError: ri,
|
|
2649
|
+
removable: ii,
|
|
2650
|
+
label: ai,
|
|
2651
|
+
mono: ci
|
|
2601
2652
|
};
|
|
2602
|
-
function
|
|
2653
|
+
function Ca({
|
|
2603
2654
|
children: t,
|
|
2604
2655
|
icon: n,
|
|
2605
2656
|
thumbnail: e,
|
|
2606
2657
|
thumbnailAlt: s = "",
|
|
2607
2658
|
onRemove: o,
|
|
2608
2659
|
removeLabel: a = "Remove",
|
|
2609
|
-
variant:
|
|
2660
|
+
variant: i = "chip",
|
|
2610
2661
|
prefix: c,
|
|
2611
2662
|
tone: l = "default",
|
|
2612
2663
|
mono: d = !1,
|
|
@@ -2614,7 +2665,7 @@ function Ma({
|
|
|
2614
2665
|
onClick: h,
|
|
2615
2666
|
...p
|
|
2616
2667
|
}) {
|
|
2617
|
-
const f =
|
|
2668
|
+
const f = i === "chip" ? o : void 0, _ = !!f || !!h, b = /* @__PURE__ */ y(
|
|
2618
2669
|
"span",
|
|
2619
2670
|
{
|
|
2620
2671
|
className: [
|
|
@@ -2624,7 +2675,7 @@ function Ma({
|
|
|
2624
2675
|
].filter(Boolean).join(" "),
|
|
2625
2676
|
"aria-hidden": "true",
|
|
2626
2677
|
children: [
|
|
2627
|
-
e ? /* @__PURE__ */
|
|
2678
|
+
e ? /* @__PURE__ */ r(
|
|
2628
2679
|
"img",
|
|
2629
2680
|
{
|
|
2630
2681
|
className: ot.thumbnail,
|
|
@@ -2633,22 +2684,22 @@ function Ma({
|
|
|
2633
2684
|
width: 14,
|
|
2634
2685
|
height: 14
|
|
2635
2686
|
}
|
|
2636
|
-
) : n && /* @__PURE__ */
|
|
2637
|
-
f && /* @__PURE__ */
|
|
2687
|
+
) : n && /* @__PURE__ */ r("span", { className: ot.icon, children: n }),
|
|
2688
|
+
f && /* @__PURE__ */ r("span", { className: ot.remove, children: /* @__PURE__ */ r(we, { size: 14 }) })
|
|
2638
2689
|
]
|
|
2639
2690
|
}
|
|
2640
|
-
), N = /* @__PURE__ */
|
|
2641
|
-
c && /* @__PURE__ */
|
|
2642
|
-
(n || e || f) &&
|
|
2643
|
-
/* @__PURE__ */
|
|
2691
|
+
), N = /* @__PURE__ */ y(Ct, { children: [
|
|
2692
|
+
c && /* @__PURE__ */ r("span", { className: ot.prefix, children: c }),
|
|
2693
|
+
(n || e || f) && b,
|
|
2694
|
+
/* @__PURE__ */ r("span", { className: [ot.label, d && ot.mono].filter(Boolean).join(" "), children: t })
|
|
2644
2695
|
] }), m = [
|
|
2645
2696
|
ot.root,
|
|
2646
|
-
|
|
2697
|
+
i === "plain" ? ot.plain : ot.chip,
|
|
2647
2698
|
_ ? ot.interactive : ot.static,
|
|
2648
2699
|
f && ot.removable,
|
|
2649
2700
|
u
|
|
2650
2701
|
].filter(Boolean).join(" ");
|
|
2651
|
-
return _ ? /* @__PURE__ */
|
|
2702
|
+
return _ ? /* @__PURE__ */ r(
|
|
2652
2703
|
"button",
|
|
2653
2704
|
{
|
|
2654
2705
|
type: "button",
|
|
@@ -2658,58 +2709,58 @@ function Ma({
|
|
|
2658
2709
|
...p,
|
|
2659
2710
|
children: N
|
|
2660
2711
|
}
|
|
2661
|
-
) : /* @__PURE__ */
|
|
2712
|
+
) : /* @__PURE__ */ r("span", { className: m, children: N });
|
|
2662
2713
|
}
|
|
2663
|
-
const
|
|
2664
|
-
root:
|
|
2665
|
-
bubble:
|
|
2666
|
-
references:
|
|
2667
|
-
animated:
|
|
2714
|
+
const li = "_root_7cjvl_1", di = "_bubble_7cjvl_9", ui = "_references_7cjvl_21", hi = "_animated_7cjvl_29", oe = {
|
|
2715
|
+
root: li,
|
|
2716
|
+
bubble: di,
|
|
2717
|
+
references: ui,
|
|
2718
|
+
animated: hi
|
|
2668
2719
|
};
|
|
2669
|
-
function
|
|
2720
|
+
function Pa({
|
|
2670
2721
|
children: t,
|
|
2671
2722
|
images: n = [],
|
|
2672
2723
|
onImageClick: e,
|
|
2673
2724
|
references: s,
|
|
2674
2725
|
animate: o = !0,
|
|
2675
2726
|
className: a,
|
|
2676
|
-
...
|
|
2727
|
+
...i
|
|
2677
2728
|
}) {
|
|
2678
|
-
return /* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ y(
|
|
2679
2730
|
"div",
|
|
2680
2731
|
{
|
|
2681
|
-
className: [
|
|
2682
|
-
...
|
|
2732
|
+
className: [oe.root, o && oe.animated, a].filter(Boolean).join(" "),
|
|
2733
|
+
...i,
|
|
2683
2734
|
children: [
|
|
2684
|
-
s && /* @__PURE__ */
|
|
2685
|
-
n.length > 0 && /* @__PURE__ */
|
|
2686
|
-
t && /* @__PURE__ */
|
|
2735
|
+
s && /* @__PURE__ */ r("div", { className: oe.references, children: s }),
|
|
2736
|
+
n.length > 0 && /* @__PURE__ */ r($r, { images: n, onImageClick: e }),
|
|
2737
|
+
t && /* @__PURE__ */ r("div", { className: oe.bubble, children: t })
|
|
2687
2738
|
]
|
|
2688
2739
|
}
|
|
2689
2740
|
);
|
|
2690
2741
|
}
|
|
2691
|
-
const
|
|
2692
|
-
root:
|
|
2693
|
-
body:
|
|
2694
|
-
error:
|
|
2695
|
-
errorMark:
|
|
2696
|
-
errorText:
|
|
2697
|
-
footer:
|
|
2698
|
-
sources:
|
|
2699
|
-
sourceItem:
|
|
2700
|
-
source:
|
|
2701
|
-
actions:
|
|
2702
|
-
actionsVisible:
|
|
2703
|
-
voted:
|
|
2704
|
-
},
|
|
2705
|
-
function
|
|
2742
|
+
const fi = "_root_1axqb_1", pi = "_body_1axqb_8", _i = "_error_1axqb_26", mi = "_errorMark_1axqb_35", yi = "_errorText_1axqb_41", gi = "_footer_1axqb_46", xi = "_sources_1axqb_53", bi = "_sourceItem_1axqb_64", vi = "_source_1axqb_53", ki = "_actions_1axqb_108", Ni = "_actionsVisible_1axqb_120", $i = "_voted_1axqb_126", rt = {
|
|
2743
|
+
root: fi,
|
|
2744
|
+
body: pi,
|
|
2745
|
+
error: _i,
|
|
2746
|
+
errorMark: mi,
|
|
2747
|
+
errorText: yi,
|
|
2748
|
+
footer: gi,
|
|
2749
|
+
sources: xi,
|
|
2750
|
+
sourceItem: bi,
|
|
2751
|
+
source: vi,
|
|
2752
|
+
actions: ki,
|
|
2753
|
+
actionsVisible: Ni,
|
|
2754
|
+
voted: $i
|
|
2755
|
+
}, Ai = 1600;
|
|
2756
|
+
function Oa({
|
|
2706
2757
|
children: t,
|
|
2707
2758
|
textValue: n,
|
|
2708
2759
|
sources: e = [],
|
|
2709
2760
|
error: s,
|
|
2710
2761
|
onRetry: o,
|
|
2711
2762
|
retryLabel: a = "Try again",
|
|
2712
|
-
onCopy:
|
|
2763
|
+
onCopy: i,
|
|
2713
2764
|
onFeedbackChange: c,
|
|
2714
2765
|
feedback: l,
|
|
2715
2766
|
defaultFeedback: d = null,
|
|
@@ -2718,77 +2769,77 @@ function za({
|
|
|
2718
2769
|
copyLabel: p = "Copy",
|
|
2719
2770
|
copiedLabel: f = "Copied",
|
|
2720
2771
|
likeLabel: _ = "Good answer",
|
|
2721
|
-
dislikeLabel:
|
|
2772
|
+
dislikeLabel: b = "Bad answer",
|
|
2722
2773
|
className: N,
|
|
2723
2774
|
...m
|
|
2724
2775
|
}) {
|
|
2725
|
-
const [w,
|
|
2726
|
-
|
|
2776
|
+
const [w, v] = at(!1), [g, M] = Pt(l, d, c), R = F(null), k = n ?? (typeof t == "string" ? t : ""), L = !!i || !!c || !!u;
|
|
2777
|
+
et(
|
|
2727
2778
|
() => () => {
|
|
2728
|
-
|
|
2779
|
+
R.current && clearTimeout(R.current);
|
|
2729
2780
|
},
|
|
2730
2781
|
[]
|
|
2731
2782
|
);
|
|
2732
2783
|
async function q() {
|
|
2733
|
-
var
|
|
2784
|
+
var P;
|
|
2734
2785
|
try {
|
|
2735
|
-
await ((
|
|
2786
|
+
await ((P = navigator.clipboard) == null ? void 0 : P.writeText(k)), v(!0), R.current && clearTimeout(R.current), R.current = setTimeout(() => v(!1), Ai);
|
|
2736
2787
|
} finally {
|
|
2737
|
-
|
|
2788
|
+
i == null || i(k);
|
|
2738
2789
|
}
|
|
2739
2790
|
}
|
|
2740
|
-
function
|
|
2741
|
-
|
|
2791
|
+
function U(P) {
|
|
2792
|
+
M(g === P ? null : P);
|
|
2742
2793
|
}
|
|
2743
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ y(
|
|
2744
2795
|
"div",
|
|
2745
2796
|
{
|
|
2746
2797
|
className: [rt.root, h && rt.actionsVisible, N].filter(Boolean).join(" "),
|
|
2747
2798
|
...m,
|
|
2748
2799
|
children: [
|
|
2749
|
-
t && /* @__PURE__ */
|
|
2750
|
-
s && /* @__PURE__ */
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
o && /* @__PURE__ */
|
|
2800
|
+
t && /* @__PURE__ */ r("div", { className: rt.body, children: t }),
|
|
2801
|
+
s && /* @__PURE__ */ y("div", { className: rt.error, role: "alert", children: [
|
|
2802
|
+
/* @__PURE__ */ r("span", { className: rt.errorMark, children: /* @__PURE__ */ r(ze, { size: 15 }) }),
|
|
2803
|
+
/* @__PURE__ */ r("span", { className: rt.errorText, children: s }),
|
|
2804
|
+
o && /* @__PURE__ */ r(At, { variant: "neutral", size: "sm", onClick: o, children: a })
|
|
2754
2805
|
] }),
|
|
2755
|
-
(e.length > 0 ||
|
|
2756
|
-
e.length > 0 && /* @__PURE__ */
|
|
2757
|
-
|
|
2806
|
+
(e.length > 0 || L) && /* @__PURE__ */ y("div", { className: rt.footer, children: [
|
|
2807
|
+
e.length > 0 && /* @__PURE__ */ r("ul", { className: rt.sources, children: e.map((P) => /* @__PURE__ */ r("li", { className: rt.sourceItem, children: P.href ? /* @__PURE__ */ r("a", { className: rt.source, href: P.href, onClick: P.onClick, children: P.label }) : P.onClick ? /* @__PURE__ */ r("button", { type: "button", className: rt.source, onClick: P.onClick, children: P.label }) : /* @__PURE__ */ r("span", { className: rt.source, children: P.label }) }, P.id)) }),
|
|
2808
|
+
L && /* @__PURE__ */ y("div", { className: rt.actions, children: [
|
|
2758
2809
|
u,
|
|
2759
|
-
|
|
2760
|
-
|
|
2810
|
+
i && /* @__PURE__ */ r(
|
|
2811
|
+
it,
|
|
2761
2812
|
{
|
|
2762
2813
|
variant: "transparent",
|
|
2763
2814
|
size: "xsmall",
|
|
2764
|
-
icon: w ? /* @__PURE__ */
|
|
2815
|
+
icon: w ? /* @__PURE__ */ r(rn, { size: 15 }) : /* @__PURE__ */ r(jn, { size: 15 }),
|
|
2765
2816
|
"aria-label": w ? f : p,
|
|
2766
2817
|
onClick: q
|
|
2767
2818
|
}
|
|
2768
2819
|
),
|
|
2769
|
-
c && /* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
|
|
2820
|
+
c && /* @__PURE__ */ y(Ct, { children: [
|
|
2821
|
+
/* @__PURE__ */ r(
|
|
2822
|
+
it,
|
|
2772
2823
|
{
|
|
2773
2824
|
variant: "transparent",
|
|
2774
2825
|
size: "xsmall",
|
|
2775
|
-
className:
|
|
2776
|
-
icon: /* @__PURE__ */
|
|
2826
|
+
className: g === "like" ? rt.voted : void 0,
|
|
2827
|
+
icon: /* @__PURE__ */ r(qn, { size: 15 }),
|
|
2777
2828
|
"aria-label": _,
|
|
2778
|
-
"aria-pressed":
|
|
2779
|
-
onClick: () =>
|
|
2829
|
+
"aria-pressed": g === "like",
|
|
2830
|
+
onClick: () => U("like")
|
|
2780
2831
|
}
|
|
2781
2832
|
),
|
|
2782
|
-
/* @__PURE__ */
|
|
2783
|
-
|
|
2833
|
+
/* @__PURE__ */ r(
|
|
2834
|
+
it,
|
|
2784
2835
|
{
|
|
2785
2836
|
variant: "transparent",
|
|
2786
2837
|
size: "xsmall",
|
|
2787
|
-
className:
|
|
2788
|
-
icon: /* @__PURE__ */
|
|
2789
|
-
"aria-label":
|
|
2790
|
-
"aria-pressed":
|
|
2791
|
-
onClick: () =>
|
|
2838
|
+
className: g === "dislike" ? rt.voted : void 0,
|
|
2839
|
+
icon: /* @__PURE__ */ r(Ln, { size: 15 }),
|
|
2840
|
+
"aria-label": b,
|
|
2841
|
+
"aria-pressed": g === "dislike",
|
|
2842
|
+
onClick: () => U("dislike")
|
|
2792
2843
|
}
|
|
2793
2844
|
)
|
|
2794
2845
|
] })
|
|
@@ -2798,47 +2849,47 @@ function za({
|
|
|
2798
2849
|
}
|
|
2799
2850
|
);
|
|
2800
2851
|
}
|
|
2801
|
-
const
|
|
2802
|
-
root:
|
|
2803
|
-
label:
|
|
2804
|
-
row:
|
|
2805
|
-
pill:
|
|
2806
|
-
icon:
|
|
2807
|
-
text:
|
|
2852
|
+
const Mi = "_root_15ubm_1", wi = "_label_15ubm_8", Ii = "_row_15ubm_14", zi = "_pill_15ubm_20", Bi = "_icon_15ubm_55", Ti = "_text_15ubm_62", qt = {
|
|
2853
|
+
root: Mi,
|
|
2854
|
+
label: wi,
|
|
2855
|
+
row: Ii,
|
|
2856
|
+
pill: zi,
|
|
2857
|
+
icon: Bi,
|
|
2858
|
+
text: Ti
|
|
2808
2859
|
};
|
|
2809
|
-
function
|
|
2860
|
+
function Sa({
|
|
2810
2861
|
children: t,
|
|
2811
2862
|
label: n,
|
|
2812
2863
|
className: e,
|
|
2813
2864
|
...s
|
|
2814
2865
|
}) {
|
|
2815
|
-
return /* @__PURE__ */
|
|
2816
|
-
n && /* @__PURE__ */
|
|
2817
|
-
/* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ y("div", { className: [qt.root, e].filter(Boolean).join(" "), ...s, children: [
|
|
2867
|
+
n && /* @__PURE__ */ r("span", { className: qt.label, children: n }),
|
|
2868
|
+
/* @__PURE__ */ r("div", { className: qt.row, children: t })
|
|
2818
2869
|
] });
|
|
2819
2870
|
}
|
|
2820
|
-
function
|
|
2871
|
+
function ja({
|
|
2821
2872
|
children: t,
|
|
2822
2873
|
icon: n,
|
|
2823
2874
|
className: e,
|
|
2824
2875
|
type: s = "button",
|
|
2825
2876
|
...o
|
|
2826
2877
|
}) {
|
|
2827
|
-
return /* @__PURE__ */
|
|
2828
|
-
n && /* @__PURE__ */
|
|
2829
|
-
/* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ y("button", { type: s, className: [qt.pill, e].filter(Boolean).join(" "), ...o, children: [
|
|
2879
|
+
n && /* @__PURE__ */ r("span", { className: qt.icon, children: n }),
|
|
2880
|
+
/* @__PURE__ */ r("span", { className: qt.text, children: t })
|
|
2830
2881
|
] });
|
|
2831
2882
|
}
|
|
2832
|
-
const
|
|
2833
|
-
root:
|
|
2834
|
-
content:
|
|
2835
|
-
titleRow:
|
|
2836
|
-
icon:
|
|
2837
|
-
title:
|
|
2838
|
-
description:
|
|
2839
|
-
trailing:
|
|
2883
|
+
const Ri = "_root_1ojxj_1", Ei = "_content_1ojxj_38", Ci = "_titleRow_1ojxj_46", Pi = "_icon_1ojxj_52", Oi = "_title_1ojxj_46", Si = "_description_1ojxj_61", ji = "_trailing_1ojxj_95", Tt = {
|
|
2884
|
+
root: Ri,
|
|
2885
|
+
content: Ei,
|
|
2886
|
+
titleRow: Ci,
|
|
2887
|
+
icon: Pi,
|
|
2888
|
+
title: Oi,
|
|
2889
|
+
description: Si,
|
|
2890
|
+
trailing: ji
|
|
2840
2891
|
};
|
|
2841
|
-
function
|
|
2892
|
+
function qa({
|
|
2842
2893
|
title: t,
|
|
2843
2894
|
description: n,
|
|
2844
2895
|
icon: e,
|
|
@@ -2846,114 +2897,114 @@ function Ba({
|
|
|
2846
2897
|
className: o,
|
|
2847
2898
|
...a
|
|
2848
2899
|
}) {
|
|
2849
|
-
const
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
/* @__PURE__ */
|
|
2852
|
-
c && /* @__PURE__ */
|
|
2853
|
-
/* @__PURE__ */
|
|
2900
|
+
const i = [Tt.root, o].filter(Boolean).join(" "), c = e === null ? null : e ?? /* @__PURE__ */ r(Fn, { size: 16 }), l = s === null ? null : s ?? /* @__PURE__ */ r(Hn, { size: 16 }), d = /* @__PURE__ */ y(Ct, { children: [
|
|
2901
|
+
/* @__PURE__ */ y("span", { className: Tt.content, children: [
|
|
2902
|
+
/* @__PURE__ */ y("span", { className: Tt.titleRow, children: [
|
|
2903
|
+
c && /* @__PURE__ */ r("span", { className: Tt.icon, children: c }),
|
|
2904
|
+
/* @__PURE__ */ r("span", { className: Tt.title, children: t })
|
|
2854
2905
|
] }),
|
|
2855
|
-
n && /* @__PURE__ */
|
|
2906
|
+
n && /* @__PURE__ */ r("span", { className: Tt.description, children: n })
|
|
2856
2907
|
] }),
|
|
2857
|
-
l && /* @__PURE__ */
|
|
2908
|
+
l && /* @__PURE__ */ r("span", { className: Tt.trailing, children: l })
|
|
2858
2909
|
] });
|
|
2859
2910
|
if (a.href !== void 0) {
|
|
2860
2911
|
const { href: p, ...f } = a;
|
|
2861
|
-
return /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ r("a", { className: i, href: p, ...f, children: d });
|
|
2862
2913
|
}
|
|
2863
2914
|
const { type: u = "button", ...h } = a;
|
|
2864
|
-
return /* @__PURE__ */
|
|
2865
|
-
}
|
|
2866
|
-
const
|
|
2867
|
-
root:
|
|
2868
|
-
row:
|
|
2869
|
-
error:
|
|
2870
|
-
mark:
|
|
2871
|
-
label:
|
|
2872
|
-
code:
|
|
2873
|
-
details:
|
|
2915
|
+
return /* @__PURE__ */ r("button", { className: i, type: u, ...h, children: d });
|
|
2916
|
+
}
|
|
2917
|
+
const qi = "_root_15073_1", Li = "_row_15073_8", Hi = "_error_15073_19", Fi = "_mark_15073_23", Di = "_label_15073_30", Yi = "_code_15073_41 _code_1hqe1_6", Ui = "_details_15073_46", Rt = {
|
|
2918
|
+
root: qi,
|
|
2919
|
+
row: Li,
|
|
2920
|
+
error: Hi,
|
|
2921
|
+
mark: Fi,
|
|
2922
|
+
label: Di,
|
|
2923
|
+
code: Yi,
|
|
2924
|
+
details: Ui
|
|
2874
2925
|
};
|
|
2875
|
-
function
|
|
2926
|
+
function La({
|
|
2876
2927
|
children: t,
|
|
2877
2928
|
icon: n,
|
|
2878
2929
|
code: e,
|
|
2879
2930
|
state: s = "done",
|
|
2880
2931
|
details: o,
|
|
2881
2932
|
errorIcon: a,
|
|
2882
|
-
className:
|
|
2933
|
+
className: i,
|
|
2883
2934
|
...c
|
|
2884
2935
|
}) {
|
|
2885
|
-
const l = s === "error", d = l ? a ?? /* @__PURE__ */
|
|
2886
|
-
return /* @__PURE__ */
|
|
2887
|
-
/* @__PURE__ */
|
|
2888
|
-
d && /* @__PURE__ */
|
|
2889
|
-
/* @__PURE__ */
|
|
2890
|
-
e != null && /* @__PURE__ */
|
|
2936
|
+
const l = s === "error", d = l ? a ?? /* @__PURE__ */ r(ze, { size: 16 }) : n;
|
|
2937
|
+
return /* @__PURE__ */ y("div", { className: [Rt.root, i].filter(Boolean).join(" "), ...c, children: [
|
|
2938
|
+
/* @__PURE__ */ y("div", { className: [Rt.row, l && Rt.error].filter(Boolean).join(" "), children: [
|
|
2939
|
+
d && /* @__PURE__ */ r("span", { className: Rt.mark, children: d }),
|
|
2940
|
+
/* @__PURE__ */ r("span", { className: Rt.label, children: t }),
|
|
2941
|
+
e != null && /* @__PURE__ */ r("code", { className: Rt.code, children: e })
|
|
2891
2942
|
] }),
|
|
2892
|
-
o && /* @__PURE__ */
|
|
2943
|
+
o && /* @__PURE__ */ r("div", { className: Rt.details, children: o })
|
|
2893
2944
|
] });
|
|
2894
2945
|
}
|
|
2895
|
-
const
|
|
2896
|
-
root:
|
|
2897
|
-
trigger:
|
|
2898
|
-
caret:
|
|
2899
|
-
title:
|
|
2900
|
-
items:
|
|
2946
|
+
const Xi = "_root_1sq2g_1", Gi = "_trigger_1sq2g_8", Wi = "_caret_1sq2g_31", Qi = "_title_1sq2g_39", Vi = "_items_1sq2g_47", Gt = {
|
|
2947
|
+
root: Xi,
|
|
2948
|
+
trigger: Gi,
|
|
2949
|
+
caret: Wi,
|
|
2950
|
+
title: Qi,
|
|
2951
|
+
items: Vi
|
|
2901
2952
|
};
|
|
2902
|
-
function
|
|
2953
|
+
function Ha({
|
|
2903
2954
|
title: t,
|
|
2904
2955
|
children: n,
|
|
2905
2956
|
open: e,
|
|
2906
2957
|
defaultOpen: s = !1,
|
|
2907
2958
|
onOpenChange: o,
|
|
2908
2959
|
className: a,
|
|
2909
|
-
...
|
|
2960
|
+
...i
|
|
2910
2961
|
}) {
|
|
2911
|
-
const [c, l] =
|
|
2912
|
-
return /* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2962
|
+
const [c, l] = Pt(e, s, o), d = Lt();
|
|
2963
|
+
return /* @__PURE__ */ y("div", { className: [Gt.root, a].filter(Boolean).join(" "), ...i, children: [
|
|
2964
|
+
/* @__PURE__ */ y(
|
|
2914
2965
|
"button",
|
|
2915
2966
|
{
|
|
2916
2967
|
type: "button",
|
|
2917
|
-
className:
|
|
2968
|
+
className: Gt.trigger,
|
|
2918
2969
|
"aria-expanded": c,
|
|
2919
2970
|
"aria-controls": d,
|
|
2920
2971
|
onClick: () => l(!c),
|
|
2921
2972
|
children: [
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ r("span", { className: Gt.caret, children: c ? /* @__PURE__ */ r(an, { size: 14 }) : /* @__PURE__ */ r(cn, { size: 14 }) }),
|
|
2974
|
+
/* @__PURE__ */ r("span", { className: Gt.title, children: t })
|
|
2924
2975
|
]
|
|
2925
2976
|
}
|
|
2926
2977
|
),
|
|
2927
|
-
c && /* @__PURE__ */
|
|
2978
|
+
c && /* @__PURE__ */ r("div", { id: d, className: Gt.items, children: n })
|
|
2928
2979
|
] });
|
|
2929
2980
|
}
|
|
2930
|
-
const
|
|
2931
|
-
root:
|
|
2932
|
-
pending:
|
|
2933
|
-
error:
|
|
2934
|
-
mark:
|
|
2935
|
-
label:
|
|
2936
|
-
done:
|
|
2937
|
-
code:
|
|
2981
|
+
const Ki = "_root_1dvwc_1", Zi = "_pending_1dvwc_11", Ji = "_error_1dvwc_15", ta = "_mark_1dvwc_19", ea = "_label_1dvwc_29", na = "_done_1dvwc_37", sa = "_code_1dvwc_41 _code_1hqe1_6", Wt = {
|
|
2982
|
+
root: Ki,
|
|
2983
|
+
pending: Zi,
|
|
2984
|
+
error: Ji,
|
|
2985
|
+
mark: ta,
|
|
2986
|
+
label: ea,
|
|
2987
|
+
done: na,
|
|
2988
|
+
code: sa
|
|
2938
2989
|
};
|
|
2939
|
-
function
|
|
2990
|
+
function Fa({
|
|
2940
2991
|
children: t,
|
|
2941
2992
|
code: n,
|
|
2942
2993
|
state: e = "pending",
|
|
2943
2994
|
marker: s,
|
|
2944
2995
|
runningLabel: o = "In progress",
|
|
2945
2996
|
className: a,
|
|
2946
|
-
...
|
|
2997
|
+
...i
|
|
2947
2998
|
}) {
|
|
2948
|
-
const c = s ?? (e === "done" ? /* @__PURE__ */
|
|
2949
|
-
return /* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
2951
|
-
/* @__PURE__ */
|
|
2952
|
-
n != null && /* @__PURE__ */
|
|
2999
|
+
const c = s ?? (e === "done" ? /* @__PURE__ */ r(rn, { size: 14 }) : e === "error" ? /* @__PURE__ */ r(ze, { size: 14 }) : e === "running" ? /* @__PURE__ */ r($n, { size: "xs", label: o }) : /* @__PURE__ */ r(Dn, { size: 14 }));
|
|
3000
|
+
return /* @__PURE__ */ y("div", { className: [Wt.root, Wt[e], a].filter(Boolean).join(" "), ...i, children: [
|
|
3001
|
+
/* @__PURE__ */ r("span", { className: Wt.mark, children: c }),
|
|
3002
|
+
/* @__PURE__ */ r("span", { className: Wt.label, children: t }),
|
|
3003
|
+
n != null && /* @__PURE__ */ r("code", { className: Wt.code, children: n })
|
|
2953
3004
|
] });
|
|
2954
3005
|
}
|
|
2955
|
-
const
|
|
2956
|
-
function
|
|
3006
|
+
const oa = "--backgrounds-bg-base";
|
|
3007
|
+
function ra(t, n) {
|
|
2957
3008
|
const e = t.trim();
|
|
2958
3009
|
if (/^#[0-9a-f]{6}$/i.test(e)) return e;
|
|
2959
3010
|
if (/^#[0-9a-f]{3}$/i.test(e))
|
|
@@ -2963,19 +3014,19 @@ function Ki(t, n) {
|
|
|
2963
3014
|
(o) => Math.max(0, Math.min(255, Math.round(Number(o)))).toString(16).padStart(2, "0")
|
|
2964
3015
|
).join("")}`;
|
|
2965
3016
|
}
|
|
2966
|
-
function
|
|
3017
|
+
function sn(t) {
|
|
2967
3018
|
if (typeof window > "u") return t;
|
|
2968
|
-
const n = getComputedStyle(document.documentElement).getPropertyValue(
|
|
2969
|
-
return n ?
|
|
3019
|
+
const n = getComputedStyle(document.documentElement).getPropertyValue(oa);
|
|
3020
|
+
return n ? ra(n, t) : t;
|
|
2970
3021
|
}
|
|
2971
|
-
function
|
|
2972
|
-
const [e, s] = at(() => t ??
|
|
2973
|
-
return
|
|
3022
|
+
function gn(t, n = "rgb(255 255 255)") {
|
|
3023
|
+
const [e, s] = at(() => t ?? sn(n));
|
|
3024
|
+
return et(() => {
|
|
2974
3025
|
if (t) {
|
|
2975
3026
|
s(t);
|
|
2976
3027
|
return;
|
|
2977
3028
|
}
|
|
2978
|
-
const o = () => s(
|
|
3029
|
+
const o = () => s(sn(n));
|
|
2979
3030
|
o();
|
|
2980
3031
|
const a = new MutationObserver(o);
|
|
2981
3032
|
return a.observe(document.documentElement, {
|
|
@@ -2984,23 +3035,23 @@ function fn(t, n = "rgb(255 255 255)") {
|
|
|
2984
3035
|
}), () => a.disconnect();
|
|
2985
3036
|
}, [t, n]), e;
|
|
2986
3037
|
}
|
|
2987
|
-
const
|
|
2988
|
-
root:
|
|
2989
|
-
header:
|
|
2990
|
-
trigger:
|
|
2991
|
-
mark:
|
|
2992
|
-
caret:
|
|
2993
|
-
body:
|
|
2994
|
-
peek:
|
|
3038
|
+
const ia = "_root_1gc8h_1", aa = "_header_1gc8h_8", ca = "_trigger_1gc8h_23", la = "_mark_1gc8h_34", da = "_caret_1gc8h_35", ua = "_body_1gc8h_50", ha = "_peek_1gc8h_65", mt = {
|
|
3039
|
+
root: ia,
|
|
3040
|
+
header: aa,
|
|
3041
|
+
trigger: ca,
|
|
3042
|
+
mark: la,
|
|
3043
|
+
caret: da,
|
|
3044
|
+
body: ua,
|
|
3045
|
+
peek: ha
|
|
2995
3046
|
};
|
|
2996
|
-
function
|
|
3047
|
+
function Da({
|
|
2997
3048
|
children: t,
|
|
2998
3049
|
label: n = "Reasoning",
|
|
2999
3050
|
workingLabel: e = "Reasoning…",
|
|
3000
3051
|
working: s = !1,
|
|
3001
3052
|
open: o,
|
|
3002
3053
|
defaultOpen: a = !1,
|
|
3003
|
-
onOpenChange:
|
|
3054
|
+
onOpenChange: i,
|
|
3004
3055
|
peekHeight: c = "96px",
|
|
3005
3056
|
avatar: l,
|
|
3006
3057
|
paper: d,
|
|
@@ -3008,18 +3059,18 @@ function Oa({
|
|
|
3008
3059
|
className: h,
|
|
3009
3060
|
...p
|
|
3010
3061
|
}) {
|
|
3011
|
-
const [f, _] =
|
|
3012
|
-
|
|
3062
|
+
const [f, _] = Pt(o, a, i), b = F(null), N = Lt(), m = gn(d), w = s || f;
|
|
3063
|
+
et(() => {
|
|
3013
3064
|
if (!s) return;
|
|
3014
|
-
const
|
|
3015
|
-
|
|
3065
|
+
const g = b.current;
|
|
3066
|
+
g && (g.scrollTop = g.scrollHeight);
|
|
3016
3067
|
}, [t, s]);
|
|
3017
|
-
const
|
|
3018
|
-
return /* @__PURE__ */
|
|
3019
|
-
s ? /* @__PURE__ */
|
|
3020
|
-
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
] }) : /* @__PURE__ */
|
|
3068
|
+
const v = l === null ? null : l ?? /* @__PURE__ */ r(Zt, { size: u, state: "thinking", paper: m });
|
|
3069
|
+
return /* @__PURE__ */ y("div", { className: [mt.root, h].filter(Boolean).join(" "), ...p, children: [
|
|
3070
|
+
s ? /* @__PURE__ */ y("div", { className: mt.header, role: "status", "aria-live": "polite", children: [
|
|
3071
|
+
v && /* @__PURE__ */ r("span", { className: mt.mark, children: v }),
|
|
3072
|
+
/* @__PURE__ */ r("span", { className: mt.label, children: e })
|
|
3073
|
+
] }) : /* @__PURE__ */ y(
|
|
3023
3074
|
"button",
|
|
3024
3075
|
{
|
|
3025
3076
|
type: "button",
|
|
@@ -3028,16 +3079,16 @@ function Oa({
|
|
|
3028
3079
|
"aria-controls": N,
|
|
3029
3080
|
onClick: () => _(!f),
|
|
3030
3081
|
children: [
|
|
3031
|
-
/* @__PURE__ */
|
|
3032
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ r("span", { className: mt.caret, children: f ? /* @__PURE__ */ r(an, { size: 14 }) : /* @__PURE__ */ r(cn, { size: 14 }) }),
|
|
3083
|
+
/* @__PURE__ */ r("span", { className: mt.label, children: n })
|
|
3033
3084
|
]
|
|
3034
3085
|
}
|
|
3035
3086
|
),
|
|
3036
|
-
w && /* @__PURE__ */
|
|
3087
|
+
w && /* @__PURE__ */ r(
|
|
3037
3088
|
"div",
|
|
3038
3089
|
{
|
|
3039
3090
|
id: N,
|
|
3040
|
-
ref:
|
|
3091
|
+
ref: b,
|
|
3041
3092
|
className: [mt.body, s && mt.peek].filter(Boolean).join(" "),
|
|
3042
3093
|
style: s ? { maxHeight: c } : void 0,
|
|
3043
3094
|
children: t
|
|
@@ -3045,86 +3096,87 @@ function Oa({
|
|
|
3045
3096
|
)
|
|
3046
3097
|
] });
|
|
3047
3098
|
}
|
|
3048
|
-
const
|
|
3049
|
-
root:
|
|
3050
|
-
avatar:
|
|
3051
|
-
label:
|
|
3099
|
+
const fa = "_root_1d7vi_1", pa = "_avatar_1d7vi_8", _a = "_label_1d7vi_14", xe = {
|
|
3100
|
+
root: fa,
|
|
3101
|
+
avatar: pa,
|
|
3102
|
+
label: _a
|
|
3052
3103
|
};
|
|
3053
|
-
function
|
|
3104
|
+
function Ya({
|
|
3054
3105
|
label: t = "Thinking…",
|
|
3055
3106
|
size: n = 24,
|
|
3056
3107
|
shape: e,
|
|
3057
3108
|
color: s,
|
|
3058
3109
|
paper: o,
|
|
3059
3110
|
className: a,
|
|
3060
|
-
...
|
|
3111
|
+
...i
|
|
3061
3112
|
}) {
|
|
3062
|
-
const c =
|
|
3063
|
-
return /* @__PURE__ */
|
|
3113
|
+
const c = gn(o);
|
|
3114
|
+
return /* @__PURE__ */ y(
|
|
3064
3115
|
"div",
|
|
3065
3116
|
{
|
|
3066
|
-
className: [
|
|
3117
|
+
className: [xe.root, a].filter(Boolean).join(" "),
|
|
3067
3118
|
role: "status",
|
|
3068
3119
|
"aria-live": "polite",
|
|
3069
|
-
...
|
|
3120
|
+
...i,
|
|
3070
3121
|
children: [
|
|
3071
|
-
/* @__PURE__ */
|
|
3072
|
-
/* @__PURE__ */
|
|
3122
|
+
/* @__PURE__ */ r("span", { className: xe.avatar, children: /* @__PURE__ */ r(Zt, { size: n, state: "thinking", shape: e, color: s, paper: c }) }),
|
|
3123
|
+
/* @__PURE__ */ r("span", { className: xe.label, children: t })
|
|
3073
3124
|
]
|
|
3074
3125
|
}
|
|
3075
3126
|
);
|
|
3076
3127
|
}
|
|
3077
3128
|
export {
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
Xs as
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3129
|
+
Ta as AiAssistantActionCard,
|
|
3130
|
+
Oa as AiAssistantAnswer,
|
|
3131
|
+
Ma as AiAssistantBottom,
|
|
3132
|
+
Io as AiAssistantHeader,
|
|
3133
|
+
$r as AiAssistantImageGroup,
|
|
3134
|
+
Ia as AiAssistantInput,
|
|
3135
|
+
za as AiAssistantLauncher,
|
|
3136
|
+
wa as AiAssistantLink,
|
|
3137
|
+
$a as AiAssistantModal,
|
|
3138
|
+
Pa as AiAssistantQuestion,
|
|
3139
|
+
Ra as AiAssistantQuestionCard,
|
|
3140
|
+
Da as AiAssistantReasoning,
|
|
3141
|
+
qa as AiAssistantRecommendation,
|
|
3142
|
+
Ca as AiAssistantReference,
|
|
3143
|
+
Ba as AiAssistantReferencePanel,
|
|
3144
|
+
Ea as AiAssistantSecretField,
|
|
3145
|
+
ja as AiAssistantSuggestion,
|
|
3146
|
+
Sa as AiAssistantSuggestions,
|
|
3147
|
+
Fa as AiAssistantTask,
|
|
3148
|
+
Ya as AiAssistantThinking,
|
|
3149
|
+
Aa as AiAssistantTitle,
|
|
3150
|
+
La as AiAssistantToolCall,
|
|
3151
|
+
Ha as AiAssistantToolCallGroup,
|
|
3152
|
+
Ee as AiAssistantVoiceButton,
|
|
3153
|
+
Ns as COLORS,
|
|
3154
|
+
$s as COLOR_BY_ID,
|
|
3155
|
+
As as DEFAULT_COLOR,
|
|
3156
|
+
is as DEFAULT_EXPRESSION,
|
|
3157
|
+
ks as DEFAULT_SHAPE,
|
|
3158
|
+
un as EXPRESSIONS,
|
|
3159
|
+
rs as EXPRESSION_BY_ID,
|
|
3160
|
+
Us as HALF_VIEWBOX,
|
|
3161
|
+
Zt as Novi,
|
|
3162
|
+
Ae as NoviEngine,
|
|
3163
|
+
Na as NoviInput,
|
|
3164
|
+
ka as NoviTile,
|
|
3165
|
+
Ws as PITCH,
|
|
3166
|
+
Gs as PITCH_MAX,
|
|
3167
|
+
Rs as POSES,
|
|
3168
|
+
mn as RADIUS,
|
|
3169
|
+
ba as SEQUENCE,
|
|
3170
|
+
fn as SHAPES,
|
|
3171
|
+
vs as SHAPE_BY_ID,
|
|
3172
|
+
yn as SPIN,
|
|
3173
|
+
Qs as SPIN_TIME,
|
|
3174
|
+
_n as STATES,
|
|
3175
|
+
jt as STATE_BY_ID,
|
|
3176
|
+
_e as TURN_TIME,
|
|
3177
|
+
Xs as YAW_MAX,
|
|
3178
|
+
Vs as lookTarget,
|
|
3179
|
+
Ms as mixHex,
|
|
3180
|
+
va as spinLook,
|
|
3181
|
+
gn as usePaper
|
|
3130
3182
|
};
|