@ddict/bubble 1.3.2 → 1.3.4
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/bubble.css +1 -1
- package/dist/bubble.es.js +978 -851
- package/dist/bubble.umd.js +3 -3
- package/package.json +1 -1
package/dist/bubble.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { computed as _, ref as
|
|
2
|
-
const
|
|
1
|
+
import { computed as _, ref as I, shallowRef as dt, watch as se, getCurrentScope as ut, onScopeDispose as ft, shallowReadonly as oe, unref as be, createElementBlock as C, openBlock as g, createStaticVNode as Be, createElementVNode as w, createVNode as N, toDisplayString as ue, Fragment as he, renderList as Le, createCommentVNode as M, normalizeClass as k, createTextVNode as fe, onUnmounted as Ie, createBlock as V, normalizeStyle as $e, onMounted as qe, nextTick as Ve } from "vue";
|
|
2
|
+
const X = Math.min, O = Math.max, we = Math.round, ve = Math.floor, Y = (e) => ({
|
|
3
3
|
x: e,
|
|
4
4
|
y: e
|
|
5
5
|
}), mt = {
|
|
@@ -11,62 +11,62 @@ const j = Math.min, O = Math.max, be = Math.round, pe = Math.floor, X = (e) => (
|
|
|
11
11
|
start: "end",
|
|
12
12
|
end: "start"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return O(e,
|
|
14
|
+
function Pe(e, t, n) {
|
|
15
|
+
return O(e, X(t, n));
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ge(e, t) {
|
|
18
18
|
return typeof e == "function" ? e(t) : e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function G(e) {
|
|
21
21
|
return e.split("-")[0];
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function pe(e) {
|
|
24
24
|
return e.split("-")[1];
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Je(e) {
|
|
27
27
|
return e === "x" ? "y" : "x";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Qe(e) {
|
|
30
30
|
return e === "y" ? "height" : "width";
|
|
31
31
|
}
|
|
32
32
|
function J(e) {
|
|
33
|
-
return ["top", "bottom"].includes(
|
|
33
|
+
return ["top", "bottom"].includes(G(e)) ? "y" : "x";
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function et(e) {
|
|
36
|
+
return Je(J(e));
|
|
37
37
|
}
|
|
38
38
|
function gt(e, t, n) {
|
|
39
39
|
n === void 0 && (n = !1);
|
|
40
|
-
const o =
|
|
41
|
-
let
|
|
42
|
-
return t.reference[
|
|
40
|
+
const o = pe(e), i = et(e), l = Qe(i);
|
|
41
|
+
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
42
|
+
return t.reference[l] > t.floating[l] && (s = ye(s)), [s, ye(s)];
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const t =
|
|
44
|
+
function pt(e) {
|
|
45
|
+
const t = ye(e);
|
|
46
46
|
return [ke(e), t, ke(t)];
|
|
47
47
|
}
|
|
48
48
|
function ke(e) {
|
|
49
49
|
return e.replace(/start|end/g, (t) => ht[t]);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const o = ["left", "right"], i = ["right", "left"],
|
|
51
|
+
function Ct(e, t, n) {
|
|
52
|
+
const o = ["left", "right"], i = ["right", "left"], l = ["top", "bottom"], s = ["bottom", "top"];
|
|
53
53
|
switch (e) {
|
|
54
54
|
case "top":
|
|
55
55
|
case "bottom":
|
|
56
56
|
return n ? t ? i : o : t ? o : i;
|
|
57
57
|
case "left":
|
|
58
58
|
case "right":
|
|
59
|
-
return t ?
|
|
59
|
+
return t ? l : s;
|
|
60
60
|
default:
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
function vt(e, t, n, o) {
|
|
65
|
-
const i =
|
|
66
|
-
let
|
|
67
|
-
return i && (
|
|
65
|
+
const i = pe(e);
|
|
66
|
+
let l = Ct(G(e), n === "start", o);
|
|
67
|
+
return i && (l = l.map((s) => s + "-" + i), t && (l = l.concat(l.map(ke)))), l;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function ye(e) {
|
|
70
70
|
return e.replace(/left|right|bottom|top/g, (t) => mt[t]);
|
|
71
71
|
}
|
|
72
72
|
function bt(e) {
|
|
@@ -109,156 +109,156 @@ function Ne(e, t, n) {
|
|
|
109
109
|
reference: o,
|
|
110
110
|
floating: i
|
|
111
111
|
} = e;
|
|
112
|
-
const
|
|
113
|
-
let
|
|
114
|
-
switch (
|
|
112
|
+
const l = J(t), s = et(t), a = Qe(s), r = G(t), c = l === "y", d = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
|
|
113
|
+
let m;
|
|
114
|
+
switch (r) {
|
|
115
115
|
case "top":
|
|
116
|
-
|
|
117
|
-
x:
|
|
116
|
+
m = {
|
|
117
|
+
x: d,
|
|
118
118
|
y: o.y - i.height
|
|
119
119
|
};
|
|
120
120
|
break;
|
|
121
121
|
case "bottom":
|
|
122
|
-
|
|
123
|
-
x:
|
|
122
|
+
m = {
|
|
123
|
+
x: d,
|
|
124
124
|
y: o.y + o.height
|
|
125
125
|
};
|
|
126
126
|
break;
|
|
127
127
|
case "right":
|
|
128
|
-
|
|
128
|
+
m = {
|
|
129
129
|
x: o.x + o.width,
|
|
130
|
-
y:
|
|
130
|
+
y: u
|
|
131
131
|
};
|
|
132
132
|
break;
|
|
133
133
|
case "left":
|
|
134
|
-
|
|
134
|
+
m = {
|
|
135
135
|
x: o.x - i.width,
|
|
136
|
-
y:
|
|
136
|
+
y: u
|
|
137
137
|
};
|
|
138
138
|
break;
|
|
139
139
|
default:
|
|
140
|
-
|
|
140
|
+
m = {
|
|
141
141
|
x: o.x,
|
|
142
142
|
y: o.y
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
switch (
|
|
145
|
+
switch (pe(t)) {
|
|
146
146
|
case "start":
|
|
147
|
-
|
|
147
|
+
m[s] -= h * (n && c ? -1 : 1);
|
|
148
148
|
break;
|
|
149
149
|
case "end":
|
|
150
|
-
|
|
150
|
+
m[s] += h * (n && c ? -1 : 1);
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
153
|
+
return m;
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const yt = async (e, t, n) => {
|
|
156
156
|
const {
|
|
157
157
|
placement: o = "bottom",
|
|
158
158
|
strategy: i = "absolute",
|
|
159
|
-
middleware:
|
|
160
|
-
platform:
|
|
161
|
-
} = n,
|
|
162
|
-
let c = await
|
|
159
|
+
middleware: l = [],
|
|
160
|
+
platform: s
|
|
161
|
+
} = n, a = l.filter(Boolean), r = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
162
|
+
let c = await s.getElementRects({
|
|
163
163
|
reference: e,
|
|
164
164
|
floating: t,
|
|
165
165
|
strategy: i
|
|
166
166
|
}), {
|
|
167
|
-
x:
|
|
168
|
-
y:
|
|
169
|
-
} = Ne(c, o,
|
|
170
|
-
for (let v = 0; v <
|
|
167
|
+
x: d,
|
|
168
|
+
y: u
|
|
169
|
+
} = Ne(c, o, r), h = o, m = {}, f = 0;
|
|
170
|
+
for (let v = 0; v < a.length; v++) {
|
|
171
171
|
const {
|
|
172
172
|
name: x,
|
|
173
|
-
fn:
|
|
174
|
-
} =
|
|
173
|
+
fn: y
|
|
174
|
+
} = a[v], {
|
|
175
175
|
x: L,
|
|
176
|
-
y:
|
|
177
|
-
data:
|
|
178
|
-
reset:
|
|
179
|
-
} = await
|
|
180
|
-
x:
|
|
181
|
-
y:
|
|
176
|
+
y: S,
|
|
177
|
+
data: E,
|
|
178
|
+
reset: A
|
|
179
|
+
} = await y({
|
|
180
|
+
x: d,
|
|
181
|
+
y: u,
|
|
182
182
|
initialPlacement: o,
|
|
183
183
|
placement: h,
|
|
184
184
|
strategy: i,
|
|
185
|
-
middlewareData:
|
|
185
|
+
middlewareData: m,
|
|
186
186
|
rects: c,
|
|
187
|
-
platform:
|
|
187
|
+
platform: s,
|
|
188
188
|
elements: {
|
|
189
189
|
reference: e,
|
|
190
190
|
floating: t
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
|
|
194
|
-
...
|
|
193
|
+
d = L ?? d, u = S ?? u, m = {
|
|
194
|
+
...m,
|
|
195
195
|
[x]: {
|
|
196
|
-
...
|
|
197
|
-
|
|
196
|
+
...m[x],
|
|
197
|
+
...E
|
|
198
198
|
}
|
|
199
|
-
},
|
|
199
|
+
}, A && f <= 50 && (f++, typeof A == "object" && (A.placement && (h = A.placement), A.rects && (c = A.rects === !0 ? await s.getElementRects({
|
|
200
200
|
reference: e,
|
|
201
201
|
floating: t,
|
|
202
202
|
strategy: i
|
|
203
|
-
}) :
|
|
204
|
-
x:
|
|
205
|
-
y:
|
|
206
|
-
} = Ne(c, h,
|
|
203
|
+
}) : A.rects), {
|
|
204
|
+
x: d,
|
|
205
|
+
y: u
|
|
206
|
+
} = Ne(c, h, r)), v = -1);
|
|
207
207
|
}
|
|
208
208
|
return {
|
|
209
|
-
x:
|
|
210
|
-
y:
|
|
209
|
+
x: d,
|
|
210
|
+
y: u,
|
|
211
211
|
placement: h,
|
|
212
212
|
strategy: i,
|
|
213
|
-
middlewareData:
|
|
213
|
+
middlewareData: m
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
-
async function
|
|
216
|
+
async function Re(e, t) {
|
|
217
217
|
var n;
|
|
218
218
|
t === void 0 && (t = {});
|
|
219
219
|
const {
|
|
220
220
|
x: o,
|
|
221
221
|
y: i,
|
|
222
|
-
platform:
|
|
223
|
-
rects:
|
|
224
|
-
elements:
|
|
225
|
-
strategy:
|
|
222
|
+
platform: l,
|
|
223
|
+
rects: s,
|
|
224
|
+
elements: a,
|
|
225
|
+
strategy: r
|
|
226
226
|
} = e, {
|
|
227
227
|
boundary: c = "clippingAncestors",
|
|
228
|
-
rootBoundary:
|
|
229
|
-
elementContext:
|
|
228
|
+
rootBoundary: d = "viewport",
|
|
229
|
+
elementContext: u = "floating",
|
|
230
230
|
altBoundary: h = !1,
|
|
231
|
-
padding:
|
|
232
|
-
} =
|
|
233
|
-
element: (n = await (
|
|
231
|
+
padding: m = 0
|
|
232
|
+
} = ge(t, e), f = wt(m), x = a[h ? u === "floating" ? "reference" : "floating" : u], y = xe(await l.getClippingRect({
|
|
233
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(x))) == null || n ? x : x.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(a.floating)),
|
|
234
234
|
boundary: c,
|
|
235
|
-
rootBoundary:
|
|
236
|
-
strategy:
|
|
237
|
-
})), L =
|
|
235
|
+
rootBoundary: d,
|
|
236
|
+
strategy: r
|
|
237
|
+
})), L = u === "floating" ? {
|
|
238
238
|
x: o,
|
|
239
239
|
y: i,
|
|
240
|
-
width:
|
|
241
|
-
height:
|
|
242
|
-
} :
|
|
240
|
+
width: s.floating.width,
|
|
241
|
+
height: s.floating.height
|
|
242
|
+
} : s.reference, S = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a.floating)), E = await (l.isElement == null ? void 0 : l.isElement(S)) ? await (l.getScale == null ? void 0 : l.getScale(S)) || {
|
|
243
243
|
x: 1,
|
|
244
244
|
y: 1
|
|
245
245
|
} : {
|
|
246
246
|
x: 1,
|
|
247
247
|
y: 1
|
|
248
|
-
},
|
|
249
|
-
elements:
|
|
248
|
+
}, A = xe(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
249
|
+
elements: a,
|
|
250
250
|
rect: L,
|
|
251
|
-
offsetParent:
|
|
252
|
-
strategy:
|
|
251
|
+
offsetParent: S,
|
|
252
|
+
strategy: r
|
|
253
253
|
}) : L);
|
|
254
254
|
return {
|
|
255
|
-
top: (
|
|
256
|
-
bottom: (
|
|
257
|
-
left: (
|
|
258
|
-
right: (
|
|
255
|
+
top: (y.top - A.top + f.top) / E.y,
|
|
256
|
+
bottom: (A.bottom - y.bottom + f.bottom) / E.y,
|
|
257
|
+
left: (y.left - A.left + f.left) / E.x,
|
|
258
|
+
right: (A.right - y.right + f.right) / E.x
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const xt = function(e) {
|
|
262
262
|
return e === void 0 && (e = {}), {
|
|
263
263
|
name: "flip",
|
|
264
264
|
options: e,
|
|
@@ -266,71 +266,71 @@ const yt = function(e) {
|
|
|
266
266
|
var n, o;
|
|
267
267
|
const {
|
|
268
268
|
placement: i,
|
|
269
|
-
middlewareData:
|
|
270
|
-
rects:
|
|
271
|
-
initialPlacement:
|
|
272
|
-
platform:
|
|
269
|
+
middlewareData: l,
|
|
270
|
+
rects: s,
|
|
271
|
+
initialPlacement: a,
|
|
272
|
+
platform: r,
|
|
273
273
|
elements: c
|
|
274
274
|
} = t, {
|
|
275
|
-
mainAxis:
|
|
276
|
-
crossAxis:
|
|
275
|
+
mainAxis: d = !0,
|
|
276
|
+
crossAxis: u = !0,
|
|
277
277
|
fallbackPlacements: h,
|
|
278
|
-
fallbackStrategy:
|
|
279
|
-
fallbackAxisSideDirection:
|
|
278
|
+
fallbackStrategy: m = "bestFit",
|
|
279
|
+
fallbackAxisSideDirection: f = "none",
|
|
280
280
|
flipAlignment: v = !0,
|
|
281
281
|
...x
|
|
282
|
-
} =
|
|
283
|
-
if ((n =
|
|
282
|
+
} = ge(e, t);
|
|
283
|
+
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
284
284
|
return {};
|
|
285
|
-
const
|
|
286
|
-
!h &&
|
|
287
|
-
const
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
|
|
285
|
+
const y = G(i), L = J(a), S = G(a) === a, E = await (r.isRTL == null ? void 0 : r.isRTL(c.floating)), A = h || (S || !v ? [ye(a)] : pt(a)), B = f !== "none";
|
|
286
|
+
!h && B && A.push(...vt(a, v, f, E));
|
|
287
|
+
const T = [a, ...A], F = await Re(t, x), R = [];
|
|
288
|
+
let W = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
289
|
+
if (d && R.push(F[y]), u) {
|
|
290
|
+
const P = gt(i, s, E);
|
|
291
|
+
R.push(F[P[0]], F[P[1]]);
|
|
292
292
|
}
|
|
293
|
-
if (
|
|
293
|
+
if (W = [...W, {
|
|
294
294
|
placement: i,
|
|
295
|
-
overflows:
|
|
296
|
-
}], !
|
|
297
|
-
var
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
295
|
+
overflows: R
|
|
296
|
+
}], !R.every((P) => P <= 0)) {
|
|
297
|
+
var b, p;
|
|
298
|
+
const P = (((b = l.flip) == null ? void 0 : b.index) || 0) + 1, _e = T[P];
|
|
299
|
+
if (_e)
|
|
300
300
|
return {
|
|
301
301
|
data: {
|
|
302
|
-
index:
|
|
303
|
-
overflows:
|
|
302
|
+
index: P,
|
|
303
|
+
overflows: W
|
|
304
304
|
},
|
|
305
305
|
reset: {
|
|
306
|
-
placement:
|
|
306
|
+
placement: _e
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
|
-
let
|
|
310
|
-
if (!
|
|
311
|
-
switch (
|
|
309
|
+
let ae = (p = W.filter((ne) => ne.overflows[0] <= 0).sort((ne, j) => ne.overflows[1] - j.overflows[1])[0]) == null ? void 0 : p.placement;
|
|
310
|
+
if (!ae)
|
|
311
|
+
switch (m) {
|
|
312
312
|
case "bestFit": {
|
|
313
|
-
var
|
|
314
|
-
const ne = (
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
317
|
-
return
|
|
313
|
+
var $;
|
|
314
|
+
const ne = ($ = W.filter((j) => {
|
|
315
|
+
if (B) {
|
|
316
|
+
const K = J(j.placement);
|
|
317
|
+
return K === L || // Create a bias to the `y` side axis due to horizontal
|
|
318
318
|
// reading directions favoring greater width.
|
|
319
|
-
|
|
319
|
+
K === "y";
|
|
320
320
|
}
|
|
321
321
|
return !0;
|
|
322
|
-
}).map((
|
|
323
|
-
ne && (
|
|
322
|
+
}).map((j) => [j.placement, j.overflows.filter((K) => K > 0).reduce((K, ct) => K + ct, 0)]).sort((j, K) => j[1] - K[1])[0]) == null ? void 0 : $[0];
|
|
323
|
+
ne && (ae = ne);
|
|
324
324
|
break;
|
|
325
325
|
}
|
|
326
326
|
case "initialPlacement":
|
|
327
|
-
|
|
327
|
+
ae = a;
|
|
328
328
|
break;
|
|
329
329
|
}
|
|
330
|
-
if (i !==
|
|
330
|
+
if (i !== ae)
|
|
331
331
|
return {
|
|
332
332
|
reset: {
|
|
333
|
-
placement:
|
|
333
|
+
placement: ae
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
336
|
}
|
|
@@ -343,30 +343,30 @@ async function Lt(e, t) {
|
|
|
343
343
|
placement: n,
|
|
344
344
|
platform: o,
|
|
345
345
|
elements: i
|
|
346
|
-
} = e,
|
|
346
|
+
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = G(n), a = pe(n), r = J(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, d = l && r ? -1 : 1, u = ge(t, e);
|
|
347
347
|
let {
|
|
348
348
|
mainAxis: h,
|
|
349
|
-
crossAxis:
|
|
350
|
-
alignmentAxis:
|
|
351
|
-
} = typeof
|
|
352
|
-
mainAxis:
|
|
349
|
+
crossAxis: m,
|
|
350
|
+
alignmentAxis: f
|
|
351
|
+
} = typeof u == "number" ? {
|
|
352
|
+
mainAxis: u,
|
|
353
353
|
crossAxis: 0,
|
|
354
354
|
alignmentAxis: null
|
|
355
355
|
} : {
|
|
356
356
|
mainAxis: 0,
|
|
357
357
|
crossAxis: 0,
|
|
358
358
|
alignmentAxis: null,
|
|
359
|
-
...
|
|
359
|
+
...u
|
|
360
360
|
};
|
|
361
|
-
return
|
|
362
|
-
x:
|
|
361
|
+
return a && typeof f == "number" && (m = a === "end" ? f * -1 : f), r ? {
|
|
362
|
+
x: m * d,
|
|
363
363
|
y: h * c
|
|
364
364
|
} : {
|
|
365
365
|
x: h * c,
|
|
366
|
-
y:
|
|
366
|
+
y: m * d
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const St = function(e) {
|
|
370
370
|
return e === void 0 && (e = 0), {
|
|
371
371
|
name: "offset",
|
|
372
372
|
options: e,
|
|
@@ -374,21 +374,21 @@ const Tt = function(e) {
|
|
|
374
374
|
var n, o;
|
|
375
375
|
const {
|
|
376
376
|
x: i,
|
|
377
|
-
y:
|
|
378
|
-
placement:
|
|
379
|
-
middlewareData:
|
|
380
|
-
} = t,
|
|
381
|
-
return
|
|
382
|
-
x: i +
|
|
383
|
-
y:
|
|
377
|
+
y: l,
|
|
378
|
+
placement: s,
|
|
379
|
+
middlewareData: a
|
|
380
|
+
} = t, r = await Lt(t, e);
|
|
381
|
+
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
382
|
+
x: i + r.x,
|
|
383
|
+
y: l + r.y,
|
|
384
384
|
data: {
|
|
385
|
-
...
|
|
386
|
-
placement:
|
|
385
|
+
...r,
|
|
386
|
+
placement: s
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
},
|
|
391
|
+
}, Tt = function(e) {
|
|
392
392
|
return e === void 0 && (e = {}), {
|
|
393
393
|
name: "shift",
|
|
394
394
|
options: e,
|
|
@@ -398,38 +398,38 @@ const Tt = function(e) {
|
|
|
398
398
|
y: o,
|
|
399
399
|
placement: i
|
|
400
400
|
} = t, {
|
|
401
|
-
mainAxis:
|
|
402
|
-
crossAxis:
|
|
403
|
-
limiter:
|
|
401
|
+
mainAxis: l = !0,
|
|
402
|
+
crossAxis: s = !1,
|
|
403
|
+
limiter: a = {
|
|
404
404
|
fn: (x) => {
|
|
405
405
|
let {
|
|
406
|
-
x:
|
|
406
|
+
x: y,
|
|
407
407
|
y: L
|
|
408
408
|
} = x;
|
|
409
409
|
return {
|
|
410
|
-
x:
|
|
410
|
+
x: y,
|
|
411
411
|
y: L
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
},
|
|
415
|
-
...
|
|
416
|
-
} =
|
|
415
|
+
...r
|
|
416
|
+
} = ge(e, t), c = {
|
|
417
417
|
x: n,
|
|
418
418
|
y: o
|
|
419
|
-
},
|
|
420
|
-
let
|
|
421
|
-
if (s) {
|
|
422
|
-
const x = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", L = f + u[x], T = f - u[w];
|
|
423
|
-
f = Ve(L, f, T);
|
|
424
|
-
}
|
|
419
|
+
}, d = await Re(t, r), u = J(G(i)), h = Je(u);
|
|
420
|
+
let m = c[h], f = c[u];
|
|
425
421
|
if (l) {
|
|
426
|
-
const x =
|
|
427
|
-
m =
|
|
422
|
+
const x = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", L = m + d[x], S = m - d[y];
|
|
423
|
+
m = Pe(L, m, S);
|
|
424
|
+
}
|
|
425
|
+
if (s) {
|
|
426
|
+
const x = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", L = f + d[x], S = f - d[y];
|
|
427
|
+
f = Pe(L, f, S);
|
|
428
428
|
}
|
|
429
|
-
const v =
|
|
429
|
+
const v = a.fn({
|
|
430
430
|
...t,
|
|
431
|
-
[h]:
|
|
432
|
-
[
|
|
431
|
+
[h]: m,
|
|
432
|
+
[u]: f
|
|
433
433
|
});
|
|
434
434
|
return {
|
|
435
435
|
...v,
|
|
@@ -440,7 +440,7 @@ const Tt = function(e) {
|
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
},
|
|
443
|
+
}, At = function(e) {
|
|
444
444
|
return e === void 0 && (e = {}), {
|
|
445
445
|
name: "size",
|
|
446
446
|
options: e,
|
|
@@ -449,30 +449,30 @@ const Tt = function(e) {
|
|
|
449
449
|
placement: n,
|
|
450
450
|
rects: o,
|
|
451
451
|
platform: i,
|
|
452
|
-
elements:
|
|
452
|
+
elements: l
|
|
453
453
|
} = t, {
|
|
454
|
-
apply:
|
|
454
|
+
apply: s = () => {
|
|
455
455
|
},
|
|
456
|
-
...
|
|
457
|
-
} =
|
|
456
|
+
...a
|
|
457
|
+
} = ge(e, t), r = await Re(t, a), c = G(n), d = pe(n), u = J(n) === "y", {
|
|
458
458
|
width: h,
|
|
459
|
-
height:
|
|
459
|
+
height: m
|
|
460
460
|
} = o.floating;
|
|
461
|
-
let
|
|
462
|
-
c === "top" || c === "bottom" ? (
|
|
463
|
-
const x =
|
|
464
|
-
let
|
|
465
|
-
if (
|
|
466
|
-
const
|
|
467
|
-
|
|
461
|
+
let f, v;
|
|
462
|
+
c === "top" || c === "bottom" ? (f = c, v = d === (await (i.isRTL == null ? void 0 : i.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (v = c, f = d === "end" ? "top" : "bottom");
|
|
463
|
+
const x = m - r.top - r.bottom, y = h - r.left - r.right, L = X(m - r[f], x), S = X(h - r[v], y), E = !t.middlewareData.shift;
|
|
464
|
+
let A = L, B = S;
|
|
465
|
+
if (u ? B = d || E ? X(S, y) : y : A = d || E ? X(L, x) : x, E && !d) {
|
|
466
|
+
const F = O(r.left, 0), R = O(r.right, 0), W = O(r.top, 0), b = O(r.bottom, 0);
|
|
467
|
+
u ? B = h - 2 * (F !== 0 || R !== 0 ? F + R : O(r.left, r.right)) : A = m - 2 * (W !== 0 || b !== 0 ? W + b : O(r.top, r.bottom));
|
|
468
468
|
}
|
|
469
|
-
await
|
|
469
|
+
await s({
|
|
470
470
|
...t,
|
|
471
|
-
availableWidth:
|
|
472
|
-
availableHeight:
|
|
471
|
+
availableWidth: B,
|
|
472
|
+
availableHeight: A
|
|
473
473
|
});
|
|
474
|
-
const
|
|
475
|
-
return h !==
|
|
474
|
+
const T = await i.getDimensions(l.floating);
|
|
475
|
+
return h !== T.width || m !== T.height ? {
|
|
476
476
|
reset: {
|
|
477
477
|
rects: !0
|
|
478
478
|
}
|
|
@@ -481,27 +481,27 @@ const Tt = function(e) {
|
|
|
481
481
|
};
|
|
482
482
|
};
|
|
483
483
|
function ee(e) {
|
|
484
|
-
return
|
|
484
|
+
return Me(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function D(e) {
|
|
487
487
|
var t;
|
|
488
488
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Z(e) {
|
|
491
491
|
var t;
|
|
492
|
-
return (t = (
|
|
492
|
+
return (t = (Me(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
return e instanceof Node || e instanceof
|
|
494
|
+
function Me(e) {
|
|
495
|
+
return e instanceof Node || e instanceof D(e).Node;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
return e instanceof Element || e instanceof
|
|
497
|
+
function z(e) {
|
|
498
|
+
return e instanceof Element || e instanceof D(e).Element;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
return e instanceof HTMLElement || e instanceof
|
|
500
|
+
function U(e) {
|
|
501
|
+
return e instanceof HTMLElement || e instanceof D(e).HTMLElement;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
503
|
+
function He(e) {
|
|
504
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof D(e).ShadowRoot;
|
|
505
505
|
}
|
|
506
506
|
function Ce(e) {
|
|
507
507
|
const {
|
|
@@ -509,13 +509,13 @@ function Ce(e) {
|
|
|
509
509
|
overflowX: n,
|
|
510
510
|
overflowY: o,
|
|
511
511
|
display: i
|
|
512
|
-
} =
|
|
512
|
+
} = H(e);
|
|
513
513
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Et(e) {
|
|
516
516
|
return ["table", "td", "th"].includes(ee(e));
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Se(e) {
|
|
519
519
|
return [":popover-open", ":modal"].some((t) => {
|
|
520
520
|
try {
|
|
521
521
|
return e.matches(t);
|
|
@@ -524,32 +524,32 @@ function Le(e) {
|
|
|
524
524
|
}
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
const t =
|
|
527
|
+
function Fe(e) {
|
|
528
|
+
const t = Oe(), n = H(e);
|
|
529
529
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
530
530
|
}
|
|
531
531
|
function $t(e) {
|
|
532
|
-
let t =
|
|
533
|
-
for (;
|
|
534
|
-
if (
|
|
532
|
+
let t = q(e);
|
|
533
|
+
for (; U(t) && !re(t); ) {
|
|
534
|
+
if (Se(t))
|
|
535
535
|
return null;
|
|
536
|
-
if (
|
|
536
|
+
if (Fe(t))
|
|
537
537
|
return t;
|
|
538
|
-
t =
|
|
538
|
+
t = q(t);
|
|
539
539
|
}
|
|
540
540
|
return null;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Oe() {
|
|
543
543
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function re(e) {
|
|
546
546
|
return ["html", "body", "#document"].includes(ee(e));
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
548
|
+
function H(e) {
|
|
549
|
+
return D(e).getComputedStyle(e);
|
|
550
550
|
}
|
|
551
551
|
function Te(e) {
|
|
552
|
-
return
|
|
552
|
+
return z(e) ? {
|
|
553
553
|
scrollLeft: e.scrollLeft,
|
|
554
554
|
scrollTop: e.scrollTop
|
|
555
555
|
} : {
|
|
@@ -557,166 +557,166 @@ function Te(e) {
|
|
|
557
557
|
scrollTop: e.scrollY
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function q(e) {
|
|
561
561
|
if (ee(e) === "html")
|
|
562
562
|
return e;
|
|
563
563
|
const t = (
|
|
564
564
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
565
565
|
e.assignedSlot || // DOM Element detected.
|
|
566
566
|
e.parentNode || // ShadowRoot detected.
|
|
567
|
-
|
|
568
|
-
|
|
567
|
+
He(e) && e.host || // Fallback.
|
|
568
|
+
Z(e)
|
|
569
569
|
);
|
|
570
|
-
return
|
|
570
|
+
return He(t) ? t.host : t;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const t =
|
|
574
|
-
return
|
|
572
|
+
function tt(e) {
|
|
573
|
+
const t = q(e);
|
|
574
|
+
return re(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && Ce(t) ? t : tt(t);
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function me(e, t, n) {
|
|
577
577
|
var o;
|
|
578
578
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
579
|
-
const i =
|
|
580
|
-
return
|
|
579
|
+
const i = tt(e), l = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = D(i);
|
|
580
|
+
return l ? t.concat(s, s.visualViewport || [], Ce(i) ? i : [], s.frameElement && n ? me(s.frameElement) : []) : t.concat(i, me(i, [], n));
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
const t =
|
|
582
|
+
function nt(e) {
|
|
583
|
+
const t = H(e);
|
|
584
584
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
585
|
-
const i =
|
|
586
|
-
return
|
|
585
|
+
const i = U(e), l = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = we(n) !== l || we(o) !== s;
|
|
586
|
+
return a && (n = l, o = s), {
|
|
587
587
|
width: n,
|
|
588
588
|
height: o,
|
|
589
|
-
$:
|
|
589
|
+
$: a
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
592
|
function De(e) {
|
|
593
|
-
return
|
|
593
|
+
return z(e) ? e : e.contextElement;
|
|
594
594
|
}
|
|
595
595
|
function le(e) {
|
|
596
596
|
const t = De(e);
|
|
597
|
-
if (!
|
|
598
|
-
return
|
|
597
|
+
if (!U(t))
|
|
598
|
+
return Y(1);
|
|
599
599
|
const n = t.getBoundingClientRect(), {
|
|
600
600
|
width: o,
|
|
601
601
|
height: i,
|
|
602
|
-
$:
|
|
603
|
-
} =
|
|
604
|
-
let
|
|
605
|
-
return (!
|
|
606
|
-
x:
|
|
607
|
-
y:
|
|
602
|
+
$: l
|
|
603
|
+
} = nt(t);
|
|
604
|
+
let s = (l ? we(n.width) : n.width) / o, a = (l ? we(n.height) : n.height) / i;
|
|
605
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
606
|
+
x: s,
|
|
607
|
+
y: a
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
|
-
const kt = /* @__PURE__ */
|
|
611
|
-
function
|
|
612
|
-
const t =
|
|
613
|
-
return !
|
|
610
|
+
const kt = /* @__PURE__ */ Y(0);
|
|
611
|
+
function ot(e) {
|
|
612
|
+
const t = D(e);
|
|
613
|
+
return !Oe() || !t.visualViewport ? kt : {
|
|
614
614
|
x: t.visualViewport.offsetLeft,
|
|
615
615
|
y: t.visualViewport.offsetTop
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
618
|
+
function Bt(e, t, n) {
|
|
619
|
+
return t === void 0 && (t = !1), !n || t && n !== D(e) ? !1 : t;
|
|
620
620
|
}
|
|
621
621
|
function Q(e, t, n, o) {
|
|
622
622
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
623
|
-
const i = e.getBoundingClientRect(),
|
|
624
|
-
let
|
|
625
|
-
t && (o ?
|
|
626
|
-
const
|
|
627
|
-
let
|
|
628
|
-
if (
|
|
629
|
-
const h =
|
|
630
|
-
let
|
|
631
|
-
for (; v && o &&
|
|
632
|
-
const x = le(v),
|
|
633
|
-
|
|
623
|
+
const i = e.getBoundingClientRect(), l = De(e);
|
|
624
|
+
let s = Y(1);
|
|
625
|
+
t && (o ? z(o) && (s = le(o)) : s = le(e));
|
|
626
|
+
const a = Bt(l, n, o) ? ot(l) : Y(0);
|
|
627
|
+
let r = (i.left + a.x) / s.x, c = (i.top + a.y) / s.y, d = i.width / s.x, u = i.height / s.y;
|
|
628
|
+
if (l) {
|
|
629
|
+
const h = D(l), m = o && z(o) ? D(o) : o;
|
|
630
|
+
let f = h, v = f.frameElement;
|
|
631
|
+
for (; v && o && m !== f; ) {
|
|
632
|
+
const x = le(v), y = v.getBoundingClientRect(), L = H(v), S = y.left + (v.clientLeft + parseFloat(L.paddingLeft)) * x.x, E = y.top + (v.clientTop + parseFloat(L.paddingTop)) * x.y;
|
|
633
|
+
r *= x.x, c *= x.y, d *= x.x, u *= x.y, r += S, c += E, f = D(v), v = f.frameElement;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
return xe({
|
|
637
|
-
width:
|
|
638
|
-
height:
|
|
639
|
-
x:
|
|
637
|
+
width: d,
|
|
638
|
+
height: u,
|
|
639
|
+
x: r,
|
|
640
640
|
y: c
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function It(e) {
|
|
644
644
|
let {
|
|
645
645
|
elements: t,
|
|
646
646
|
rect: n,
|
|
647
647
|
offsetParent: o,
|
|
648
648
|
strategy: i
|
|
649
649
|
} = e;
|
|
650
|
-
const
|
|
651
|
-
if (o ===
|
|
650
|
+
const l = i === "fixed", s = Z(o), a = t ? Se(t.floating) : !1;
|
|
651
|
+
if (o === s || a && l)
|
|
652
652
|
return n;
|
|
653
|
-
let
|
|
653
|
+
let r = {
|
|
654
654
|
scrollLeft: 0,
|
|
655
655
|
scrollTop: 0
|
|
656
|
-
}, c =
|
|
657
|
-
const
|
|
658
|
-
if ((
|
|
656
|
+
}, c = Y(1);
|
|
657
|
+
const d = Y(0), u = U(o);
|
|
658
|
+
if ((u || !u && !l) && ((ee(o) !== "body" || Ce(s)) && (r = Te(o)), U(o))) {
|
|
659
659
|
const h = Q(o);
|
|
660
|
-
c = le(o),
|
|
660
|
+
c = le(o), d.x = h.x + o.clientLeft, d.y = h.y + o.clientTop;
|
|
661
661
|
}
|
|
662
662
|
return {
|
|
663
663
|
width: n.width * c.x,
|
|
664
664
|
height: n.height * c.y,
|
|
665
|
-
x: n.x * c.x -
|
|
666
|
-
y: n.y * c.y -
|
|
665
|
+
x: n.x * c.x - r.scrollLeft * c.x + d.x,
|
|
666
|
+
y: n.y * c.y - r.scrollTop * c.y + d.y
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function Rt(e) {
|
|
670
670
|
return Array.from(e.getClientRects());
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return Q(
|
|
672
|
+
function it(e) {
|
|
673
|
+
return Q(Z(e)).left + Te(e).scrollLeft;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
const t =
|
|
677
|
-
let
|
|
678
|
-
const
|
|
679
|
-
return
|
|
675
|
+
function Mt(e) {
|
|
676
|
+
const t = Z(e), n = Te(e), o = e.ownerDocument.body, i = O(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), l = O(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
677
|
+
let s = -n.scrollLeft + it(e);
|
|
678
|
+
const a = -n.scrollTop;
|
|
679
|
+
return H(o).direction === "rtl" && (s += O(t.clientWidth, o.clientWidth) - i), {
|
|
680
680
|
width: i,
|
|
681
|
-
height: s,
|
|
682
|
-
x: l,
|
|
683
|
-
y: r
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
function Ot(e, t) {
|
|
687
|
-
const n = F(e), o = z(e), i = n.visualViewport;
|
|
688
|
-
let s = o.clientWidth, l = o.clientHeight, r = 0, a = 0;
|
|
689
|
-
if (i) {
|
|
690
|
-
s = i.width, l = i.height;
|
|
691
|
-
const c = Fe();
|
|
692
|
-
(!c || c && t === "fixed") && (r = i.offsetLeft, a = i.offsetTop);
|
|
693
|
-
}
|
|
694
|
-
return {
|
|
695
|
-
width: s,
|
|
696
681
|
height: l,
|
|
697
|
-
x:
|
|
682
|
+
x: s,
|
|
698
683
|
y: a
|
|
699
684
|
};
|
|
700
685
|
}
|
|
701
686
|
function Ft(e, t) {
|
|
702
|
-
const n =
|
|
687
|
+
const n = D(e), o = Z(e), i = n.visualViewport;
|
|
688
|
+
let l = o.clientWidth, s = o.clientHeight, a = 0, r = 0;
|
|
689
|
+
if (i) {
|
|
690
|
+
l = i.width, s = i.height;
|
|
691
|
+
const c = Oe();
|
|
692
|
+
(!c || c && t === "fixed") && (a = i.offsetLeft, r = i.offsetTop);
|
|
693
|
+
}
|
|
703
694
|
return {
|
|
704
695
|
width: l,
|
|
705
|
-
height:
|
|
696
|
+
height: s,
|
|
706
697
|
x: a,
|
|
698
|
+
y: r
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
function Ot(e, t) {
|
|
702
|
+
const n = Q(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, l = U(e) ? le(e) : Y(1), s = e.clientWidth * l.x, a = e.clientHeight * l.y, r = i * l.x, c = o * l.y;
|
|
703
|
+
return {
|
|
704
|
+
width: s,
|
|
705
|
+
height: a,
|
|
706
|
+
x: r,
|
|
707
707
|
y: c
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function We(e, t, n) {
|
|
711
711
|
let o;
|
|
712
712
|
if (t === "viewport")
|
|
713
|
-
o =
|
|
713
|
+
o = Ft(e, n);
|
|
714
714
|
else if (t === "document")
|
|
715
|
-
o =
|
|
716
|
-
else if (
|
|
717
|
-
o =
|
|
715
|
+
o = Mt(Z(e));
|
|
716
|
+
else if (z(t))
|
|
717
|
+
o = Ot(t, n);
|
|
718
718
|
else {
|
|
719
|
-
const i =
|
|
719
|
+
const i = ot(e);
|
|
720
720
|
o = {
|
|
721
721
|
...t,
|
|
722
722
|
x: t.x - i.x,
|
|
@@ -725,20 +725,20 @@ function He(e, t, n) {
|
|
|
725
725
|
}
|
|
726
726
|
return xe(o);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
const n =
|
|
730
|
-
return n === t || !
|
|
728
|
+
function st(e, t) {
|
|
729
|
+
const n = q(e);
|
|
730
|
+
return n === t || !z(n) || re(n) ? !1 : H(n).position === "fixed" || st(n, t);
|
|
731
731
|
}
|
|
732
732
|
function Dt(e, t) {
|
|
733
733
|
const n = t.get(e);
|
|
734
734
|
if (n)
|
|
735
735
|
return n;
|
|
736
|
-
let o =
|
|
737
|
-
const
|
|
738
|
-
let
|
|
739
|
-
for (;
|
|
740
|
-
const
|
|
741
|
-
!
|
|
736
|
+
let o = me(e, [], !1).filter((a) => z(a) && ee(a) !== "body"), i = null;
|
|
737
|
+
const l = H(e).position === "fixed";
|
|
738
|
+
let s = l ? q(e) : e;
|
|
739
|
+
for (; z(s) && !re(s); ) {
|
|
740
|
+
const a = H(s), r = Fe(s);
|
|
741
|
+
!r && a.position === "fixed" && (i = null), (l ? !r && !i : !r && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ce(s) && !r && st(e, s)) ? o = o.filter((d) => d !== s) : i = a, s = q(s);
|
|
742
742
|
}
|
|
743
743
|
return t.set(e, o), o;
|
|
744
744
|
}
|
|
@@ -749,75 +749,75 @@ function _t(e) {
|
|
|
749
749
|
rootBoundary: o,
|
|
750
750
|
strategy: i
|
|
751
751
|
} = e;
|
|
752
|
-
const
|
|
753
|
-
const
|
|
754
|
-
return c.top = O(
|
|
755
|
-
},
|
|
752
|
+
const s = [...n === "clippingAncestors" ? Se(t) ? [] : Dt(t, this._c) : [].concat(n), o], a = s[0], r = s.reduce((c, d) => {
|
|
753
|
+
const u = We(t, d, i);
|
|
754
|
+
return c.top = O(u.top, c.top), c.right = X(u.right, c.right), c.bottom = X(u.bottom, c.bottom), c.left = O(u.left, c.left), c;
|
|
755
|
+
}, We(t, a, i));
|
|
756
756
|
return {
|
|
757
|
-
width:
|
|
758
|
-
height:
|
|
759
|
-
x:
|
|
760
|
-
y:
|
|
757
|
+
width: r.right - r.left,
|
|
758
|
+
height: r.bottom - r.top,
|
|
759
|
+
x: r.left,
|
|
760
|
+
y: r.top
|
|
761
761
|
};
|
|
762
762
|
}
|
|
763
763
|
function Vt(e) {
|
|
764
764
|
const {
|
|
765
765
|
width: t,
|
|
766
766
|
height: n
|
|
767
|
-
} =
|
|
767
|
+
} = nt(e);
|
|
768
768
|
return {
|
|
769
769
|
width: t,
|
|
770
770
|
height: n
|
|
771
771
|
};
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
const o =
|
|
775
|
-
let
|
|
773
|
+
function Pt(e, t, n) {
|
|
774
|
+
const o = U(t), i = Z(t), l = n === "fixed", s = Q(e, !0, l, t);
|
|
775
|
+
let a = {
|
|
776
776
|
scrollLeft: 0,
|
|
777
777
|
scrollTop: 0
|
|
778
778
|
};
|
|
779
|
-
const
|
|
780
|
-
if (o || !o && !
|
|
781
|
-
if ((ee(t) !== "body" || Ce(i)) && (
|
|
782
|
-
const
|
|
783
|
-
|
|
784
|
-
} else i && (
|
|
785
|
-
const c =
|
|
779
|
+
const r = Y(0);
|
|
780
|
+
if (o || !o && !l)
|
|
781
|
+
if ((ee(t) !== "body" || Ce(i)) && (a = Te(t)), o) {
|
|
782
|
+
const u = Q(t, !0, l, t);
|
|
783
|
+
r.x = u.x + t.clientLeft, r.y = u.y + t.clientTop;
|
|
784
|
+
} else i && (r.x = it(i));
|
|
785
|
+
const c = s.left + a.scrollLeft - r.x, d = s.top + a.scrollTop - r.y;
|
|
786
786
|
return {
|
|
787
787
|
x: c,
|
|
788
|
-
y:
|
|
789
|
-
width:
|
|
790
|
-
height:
|
|
788
|
+
y: d,
|
|
789
|
+
width: s.width,
|
|
790
|
+
height: s.height
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
793
|
+
function Ae(e) {
|
|
794
|
+
return H(e).position === "static";
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
return !
|
|
796
|
+
function ze(e, t) {
|
|
797
|
+
return !U(e) || H(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
const n =
|
|
801
|
-
if (
|
|
799
|
+
function lt(e, t) {
|
|
800
|
+
const n = D(e);
|
|
801
|
+
if (Se(e))
|
|
802
802
|
return n;
|
|
803
|
-
if (!
|
|
804
|
-
let i =
|
|
805
|
-
for (; i && !
|
|
806
|
-
if (
|
|
803
|
+
if (!U(e)) {
|
|
804
|
+
let i = q(e);
|
|
805
|
+
for (; i && !re(i); ) {
|
|
806
|
+
if (z(i) && !Ae(i))
|
|
807
807
|
return i;
|
|
808
|
-
i =
|
|
808
|
+
i = q(i);
|
|
809
809
|
}
|
|
810
810
|
return n;
|
|
811
811
|
}
|
|
812
|
-
let o =
|
|
813
|
-
for (; o &&
|
|
814
|
-
o =
|
|
815
|
-
return o &&
|
|
812
|
+
let o = ze(e, t);
|
|
813
|
+
for (; o && Et(o) && Ae(o); )
|
|
814
|
+
o = ze(o, t);
|
|
815
|
+
return o && re(o) && Ae(o) && !Fe(o) ? n : o || $t(e) || n;
|
|
816
816
|
}
|
|
817
|
-
const
|
|
818
|
-
const t = this.getOffsetParent ||
|
|
817
|
+
const Nt = async function(e) {
|
|
818
|
+
const t = this.getOffsetParent || lt, n = this.getDimensions, o = await n(e.floating);
|
|
819
819
|
return {
|
|
820
|
-
reference:
|
|
820
|
+
reference: Pt(e.reference, await t(e.floating), e.strategy),
|
|
821
821
|
floating: {
|
|
822
822
|
x: 0,
|
|
823
823
|
y: 0,
|
|
@@ -827,211 +827,211 @@ const Pt = async function(e) {
|
|
|
827
827
|
};
|
|
828
828
|
};
|
|
829
829
|
function Ht(e) {
|
|
830
|
-
return
|
|
830
|
+
return H(e).direction === "rtl";
|
|
831
831
|
}
|
|
832
832
|
const Wt = {
|
|
833
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
834
|
-
getDocumentElement:
|
|
833
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: It,
|
|
834
|
+
getDocumentElement: Z,
|
|
835
835
|
getClippingRect: _t,
|
|
836
|
-
getOffsetParent:
|
|
837
|
-
getElementRects:
|
|
838
|
-
getClientRects:
|
|
836
|
+
getOffsetParent: lt,
|
|
837
|
+
getElementRects: Nt,
|
|
838
|
+
getClientRects: Rt,
|
|
839
839
|
getDimensions: Vt,
|
|
840
840
|
getScale: le,
|
|
841
|
-
isElement:
|
|
841
|
+
isElement: z,
|
|
842
842
|
isRTL: Ht
|
|
843
843
|
};
|
|
844
844
|
function zt(e, t) {
|
|
845
845
|
let n = null, o;
|
|
846
|
-
const i =
|
|
847
|
-
function
|
|
848
|
-
var
|
|
849
|
-
clearTimeout(o), (
|
|
846
|
+
const i = Z(e);
|
|
847
|
+
function l() {
|
|
848
|
+
var a;
|
|
849
|
+
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
|
|
851
|
+
function s(a, r) {
|
|
852
|
+
a === void 0 && (a = !1), r === void 0 && (r = 1), l();
|
|
853
853
|
const {
|
|
854
854
|
left: c,
|
|
855
|
-
top:
|
|
856
|
-
width:
|
|
855
|
+
top: d,
|
|
856
|
+
width: u,
|
|
857
857
|
height: h
|
|
858
858
|
} = e.getBoundingClientRect();
|
|
859
|
-
if (
|
|
859
|
+
if (a || t(), !u || !h)
|
|
860
860
|
return;
|
|
861
|
-
const
|
|
862
|
-
rootMargin: -
|
|
863
|
-
threshold: O(0,
|
|
861
|
+
const m = ve(d), f = ve(i.clientWidth - (c + u)), v = ve(i.clientHeight - (d + h)), x = ve(c), L = {
|
|
862
|
+
rootMargin: -m + "px " + -f + "px " + -v + "px " + -x + "px",
|
|
863
|
+
threshold: O(0, X(1, r)) || 1
|
|
864
864
|
};
|
|
865
|
-
let
|
|
866
|
-
function
|
|
867
|
-
const
|
|
868
|
-
if (
|
|
869
|
-
if (!
|
|
870
|
-
return
|
|
871
|
-
|
|
872
|
-
|
|
865
|
+
let S = !0;
|
|
866
|
+
function E(A) {
|
|
867
|
+
const B = A[0].intersectionRatio;
|
|
868
|
+
if (B !== r) {
|
|
869
|
+
if (!S)
|
|
870
|
+
return s();
|
|
871
|
+
B ? s(!1, B) : o = setTimeout(() => {
|
|
872
|
+
s(!1, 1e-7);
|
|
873
873
|
}, 1e3);
|
|
874
874
|
}
|
|
875
|
-
|
|
875
|
+
S = !1;
|
|
876
876
|
}
|
|
877
877
|
try {
|
|
878
|
-
n = new IntersectionObserver(
|
|
878
|
+
n = new IntersectionObserver(E, {
|
|
879
879
|
...L,
|
|
880
880
|
// Handle <iframe>s
|
|
881
881
|
root: i.ownerDocument
|
|
882
882
|
});
|
|
883
883
|
} catch {
|
|
884
|
-
n = new IntersectionObserver(
|
|
884
|
+
n = new IntersectionObserver(E, L);
|
|
885
885
|
}
|
|
886
886
|
n.observe(e);
|
|
887
887
|
}
|
|
888
|
-
return
|
|
888
|
+
return s(!0), l;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Ut(e, t, n, o) {
|
|
891
891
|
o === void 0 && (o = {});
|
|
892
892
|
const {
|
|
893
893
|
ancestorScroll: i = !0,
|
|
894
|
-
ancestorResize:
|
|
895
|
-
elementResize:
|
|
896
|
-
layoutShift:
|
|
897
|
-
animationFrame:
|
|
898
|
-
} = o, c = De(e),
|
|
899
|
-
|
|
900
|
-
i &&
|
|
894
|
+
ancestorResize: l = !0,
|
|
895
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
896
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
897
|
+
animationFrame: r = !1
|
|
898
|
+
} = o, c = De(e), d = i || l ? [...c ? me(c) : [], ...me(t)] : [];
|
|
899
|
+
d.forEach((y) => {
|
|
900
|
+
i && y.addEventListener("scroll", n, {
|
|
901
901
|
passive: !0
|
|
902
|
-
}),
|
|
902
|
+
}), l && y.addEventListener("resize", n);
|
|
903
903
|
});
|
|
904
|
-
const
|
|
905
|
-
let h = -1,
|
|
906
|
-
|
|
907
|
-
let [L] =
|
|
908
|
-
L && L.target === c &&
|
|
909
|
-
var
|
|
910
|
-
(
|
|
904
|
+
const u = c && a ? zt(c, n) : null;
|
|
905
|
+
let h = -1, m = null;
|
|
906
|
+
s && (m = new ResizeObserver((y) => {
|
|
907
|
+
let [L] = y;
|
|
908
|
+
L && L.target === c && m && (m.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
909
|
+
var S;
|
|
910
|
+
(S = m) == null || S.observe(t);
|
|
911
911
|
})), n();
|
|
912
|
-
}), c && !
|
|
913
|
-
let
|
|
914
|
-
|
|
912
|
+
}), c && !r && m.observe(c), m.observe(t));
|
|
913
|
+
let f, v = r ? Q(e) : null;
|
|
914
|
+
r && x();
|
|
915
915
|
function x() {
|
|
916
|
-
const
|
|
917
|
-
v && (
|
|
916
|
+
const y = Q(e);
|
|
917
|
+
v && (y.x !== v.x || y.y !== v.y || y.width !== v.width || y.height !== v.height) && n(), v = y, f = requestAnimationFrame(x);
|
|
918
918
|
}
|
|
919
919
|
return n(), () => {
|
|
920
|
-
var
|
|
921
|
-
|
|
922
|
-
i && L.removeEventListener("scroll", n),
|
|
923
|
-
}),
|
|
920
|
+
var y;
|
|
921
|
+
d.forEach((L) => {
|
|
922
|
+
i && L.removeEventListener("scroll", n), l && L.removeEventListener("resize", n);
|
|
923
|
+
}), u == null || u(), (y = m) == null || y.disconnect(), m = null, r && cancelAnimationFrame(f);
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
|
-
const
|
|
926
|
+
const Zt = St, jt = Tt, Kt = xt, Xt = At, Yt = (e, t, n) => {
|
|
927
927
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
928
928
|
platform: Wt,
|
|
929
929
|
...n
|
|
930
|
-
},
|
|
930
|
+
}, l = {
|
|
931
931
|
...i.platform,
|
|
932
932
|
_c: o
|
|
933
933
|
};
|
|
934
|
-
return
|
|
934
|
+
return yt(e, t, {
|
|
935
935
|
...i,
|
|
936
|
-
platform:
|
|
936
|
+
platform: l
|
|
937
937
|
});
|
|
938
938
|
};
|
|
939
939
|
function Gt(e) {
|
|
940
940
|
return e != null && typeof e == "object" && "$el" in e;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Ue(e) {
|
|
943
943
|
if (Gt(e)) {
|
|
944
944
|
const t = e.$el;
|
|
945
|
-
return
|
|
945
|
+
return Me(t) && ee(t) === "#comment" ? null : t;
|
|
946
946
|
}
|
|
947
947
|
return e;
|
|
948
948
|
}
|
|
949
949
|
function ce(e) {
|
|
950
|
-
return typeof e == "function" ? e() :
|
|
950
|
+
return typeof e == "function" ? e() : be(e);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function rt(e) {
|
|
953
953
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
954
954
|
}
|
|
955
955
|
function Ze(e, t) {
|
|
956
|
-
const n =
|
|
956
|
+
const n = rt(e);
|
|
957
957
|
return Math.round(t * n) / n;
|
|
958
958
|
}
|
|
959
959
|
function qt(e, t, n) {
|
|
960
960
|
n === void 0 && (n = {});
|
|
961
961
|
const o = n.whileElementsMounted, i = _(() => {
|
|
962
|
-
var
|
|
963
|
-
return (
|
|
964
|
-
}),
|
|
965
|
-
var
|
|
966
|
-
return (
|
|
967
|
-
}), r = _(() => {
|
|
968
|
-
var S;
|
|
969
|
-
return (S = ce(n.strategy)) != null ? S : "absolute";
|
|
962
|
+
var T;
|
|
963
|
+
return (T = ce(n.open)) != null ? T : !0;
|
|
964
|
+
}), l = _(() => ce(n.middleware)), s = _(() => {
|
|
965
|
+
var T;
|
|
966
|
+
return (T = ce(n.placement)) != null ? T : "bottom";
|
|
970
967
|
}), a = _(() => {
|
|
971
|
-
var
|
|
972
|
-
return (
|
|
973
|
-
}),
|
|
974
|
-
|
|
975
|
-
|
|
968
|
+
var T;
|
|
969
|
+
return (T = ce(n.strategy)) != null ? T : "absolute";
|
|
970
|
+
}), r = _(() => {
|
|
971
|
+
var T;
|
|
972
|
+
return (T = ce(n.transform)) != null ? T : !0;
|
|
973
|
+
}), c = _(() => Ue(e.value)), d = _(() => Ue(t.value)), u = I(0), h = I(0), m = I(a.value), f = I(s.value), v = dt({}), x = I(!1), y = _(() => {
|
|
974
|
+
const T = {
|
|
975
|
+
position: m.value,
|
|
976
976
|
left: "0",
|
|
977
977
|
top: "0"
|
|
978
978
|
};
|
|
979
|
-
if (!
|
|
980
|
-
return
|
|
981
|
-
const
|
|
982
|
-
return
|
|
983
|
-
...
|
|
984
|
-
transform: "translate(" +
|
|
985
|
-
...
|
|
979
|
+
if (!d.value)
|
|
980
|
+
return T;
|
|
981
|
+
const F = Ze(d.value, u.value), R = Ze(d.value, h.value);
|
|
982
|
+
return r.value ? {
|
|
983
|
+
...T,
|
|
984
|
+
transform: "translate(" + F + "px, " + R + "px)",
|
|
985
|
+
...rt(d.value) >= 1.5 && {
|
|
986
986
|
willChange: "transform"
|
|
987
987
|
}
|
|
988
988
|
} : {
|
|
989
|
-
position:
|
|
990
|
-
left:
|
|
991
|
-
top:
|
|
989
|
+
position: m.value,
|
|
990
|
+
left: F + "px",
|
|
991
|
+
top: R + "px"
|
|
992
992
|
};
|
|
993
993
|
});
|
|
994
994
|
let L;
|
|
995
|
-
function
|
|
996
|
-
c.value == null ||
|
|
997
|
-
middleware:
|
|
998
|
-
placement:
|
|
999
|
-
strategy:
|
|
1000
|
-
}).then((
|
|
1001
|
-
|
|
995
|
+
function S() {
|
|
996
|
+
c.value == null || d.value == null || Yt(c.value, d.value, {
|
|
997
|
+
middleware: l.value,
|
|
998
|
+
placement: s.value,
|
|
999
|
+
strategy: a.value
|
|
1000
|
+
}).then((T) => {
|
|
1001
|
+
u.value = T.x, h.value = T.y, m.value = T.strategy, f.value = T.placement, v.value = T.middlewareData, x.value = !0;
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function E() {
|
|
1005
1005
|
typeof L == "function" && (L(), L = void 0);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1008
|
-
if (
|
|
1009
|
-
|
|
1007
|
+
function A() {
|
|
1008
|
+
if (E(), o === void 0) {
|
|
1009
|
+
S();
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
|
-
if (c.value != null &&
|
|
1013
|
-
L = o(c.value,
|
|
1012
|
+
if (c.value != null && d.value != null) {
|
|
1013
|
+
L = o(c.value, d.value, S);
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function B() {
|
|
1018
1018
|
i.value || (x.value = !1);
|
|
1019
1019
|
}
|
|
1020
|
-
return se([
|
|
1020
|
+
return se([l, s, a], S, {
|
|
1021
1021
|
flush: "sync"
|
|
1022
|
-
}), se([c,
|
|
1022
|
+
}), se([c, d], A, {
|
|
1023
1023
|
flush: "sync"
|
|
1024
|
-
}), se(i,
|
|
1024
|
+
}), se(i, B, {
|
|
1025
1025
|
flush: "sync"
|
|
1026
|
-
}), ut() &&
|
|
1027
|
-
x: oe(
|
|
1026
|
+
}), ut() && ft(E), {
|
|
1027
|
+
x: oe(u),
|
|
1028
1028
|
y: oe(h),
|
|
1029
|
-
strategy: oe(
|
|
1030
|
-
placement: oe(
|
|
1029
|
+
strategy: oe(m),
|
|
1030
|
+
placement: oe(f),
|
|
1031
1031
|
middlewareData: oe(v),
|
|
1032
1032
|
isPositioned: oe(x),
|
|
1033
|
-
floatingStyles:
|
|
1034
|
-
update:
|
|
1033
|
+
floatingStyles: y,
|
|
1034
|
+
update: S
|
|
1035
1035
|
};
|
|
1036
1036
|
}
|
|
1037
1037
|
const Jt = "data:image/svg+xml,%3csvg%20width='1324'%20height='1326'%20viewBox='0%200%201324%201326'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='141'%20y='78'%20width='1042'%20height='1170'%20fill='white'/%3e%3cpath%20d='M184.533%201.99984C135.867%207.19984%2089.8666%2029.8665%2056.4%2065.1998C29.6%2093.4665%2012.5333%20126.266%203.73329%20166.4L0.666626%20180V663.333V1146.67L3.73329%201160.27C12.5333%201200.4%2029.6%201233.2%2056.4%201261.47C90.4%201297.33%20135.333%201319.33%20185.6%201324.67C203.333%201326.53%201122.53%201326.4%201139.73%201324.53C1188.53%201319.33%201229.07%201299.73%201264.13%201264.8C1294.27%201234.67%201311.47%201202.67%201320.8%201159.33C1323.2%201148.4%201323.33%201130%201323.33%20663.333C1323.33%20196.667%201323.2%20178.266%201320.8%20167.333C1311.47%20124%201294.27%2091.9998%201264.13%2061.8664C1229.07%2026.9331%201188.53%207.33314%201139.73%202.13314C1124.67%200.399809%20200%200.399842%20184.533%201.99984ZM732.933%20151.466C746.8%20152.933%20763.333%20157.6%20774%20163.067C800.267%20176.267%20822.4%20200.4%20833.2%20227.333C841.867%20249.333%20841.467%20233.467%20841.067%20502C840.533%20777.6%20841.733%20750.267%20829.2%20776.133C822.133%20790.933%20810.667%20806.533%20800.267%20815.2C795.2%20819.6%20793.2%20822.267%20792%20827.067C786.133%20848.267%20768.667%20885.867%20755.2%20906.133C724.533%20952%20681.2%20986.133%20624%201009.33C615.6%201012.8%20608.4%201015.87%20608.133%201016.13C607.867%201016.27%20614.533%201023.33%20622.933%201031.6C633.467%201042.13%20639.333%201049.07%20642.133%201054.4C646.933%201063.87%20645.467%201064%20672.667%201050.8C724.933%201025.47%20762.933%20994.8%20794.933%20952C811.467%20929.867%20829.867%20895.333%20839.333%20868.267C841.333%20862.667%20843.467%20858%20844.133%20858C844.667%20858%20845.6%20859.333%20846.133%20860.933C848.267%20868.133%20863.333%20900.8%20870.133%20913.2C898%20963.867%20931.6%201001.2%20975.333%201030.27C989.867%201040%201017.2%201054.4%201031.6%201059.73L1037.2%201061.87L1041.33%201054.67C1048.4%201042.4%201056.67%201032.27%201067.87%201022.4L1078.67%201012.8L1071.6%201010.27C1067.87%201008.8%201060.53%201006%201055.6%201004.13C1040.93%20998.533%201013.73%20984%201000%20974.267C985.733%20964.133%20960.8%20940.667%20948.933%20926.267C935.067%20909.333%20921.467%20887.467%20910%20864C900.133%20844%20887.2%20812.133%20884.667%20801.6L883.733%20798H971.867H1060V769.333V740.667H963.333H866.533L867.333%20736.267C868.4%20729.867%20870.4%20693.067%20871.467%20662.933C872.267%20639.067%20872.533%20636.4%20874.8%20635.2C878.667%20633.2%20881.333%20626.667%20882.267%20617.333L883.067%20608.667H872.133C864.133%20608.667%20861.067%20608.133%20860.533%20606.8C860%20605.467%20881.2%20466%20886.133%20438.267L886.933%20433.867L977.867%20434.4C1066.67%20434.8%201068.93%20434.8%201079.87%20437.733C1124.8%20449.6%201158.67%20482.533%201172.93%20528L1176.67%20540V808V1076L1172.93%201087.73C1158.53%201133.6%201126.13%201164.93%201078.93%201178.4L1068.67%201181.33L812.667%201181.73C638.8%201182%20552.667%201181.73%20544.4%201180.67C488.667%201174.4%20443.2%201132.13%20432.533%201076.93C431.067%201068.93%20430.667%201046.4%20430.667%20956.667V846.133L340.4%20845.6C252.8%20845.2%20249.6%20845.067%20239.067%20842.267C196.533%20831.067%20164.533%20800.133%20151.067%20757.333L147.333%20745.333V499.333V253.333L150.4%20242C159.067%20209.067%20180.4%20181.866%20210.667%20164.933C221.2%20159.066%20240.4%20152.933%20252.667%20151.6C268.533%20149.733%20716.933%20149.6%20732.933%20151.466Z'%20fill='%233B5695'/%3e%3cpath%20d='M256.533%20213.333C232.933%20218.533%20214.133%20237.067%20209.333%20259.733C208.4%20264.533%20208%20337.2%20208.267%20502L208.667%20737.333L211.733%20744.933C218.533%20761.733%20231.733%20774.533%20248.667%20780.933L256.667%20784L490%20784.4C749.2%20784.8%20734.4%20785.333%20750.133%20776C764.267%20767.6%20775.467%20752.4%20778.667%20737.067C779.6%20732.8%20780%20652.133%20779.733%20494L779.333%20257.333L775.067%20248.267C767.2%20231.6%20756.933%20222%20740.133%20215.467L731.333%20212L498%20211.733C306.8%20211.6%20263.2%20211.867%20256.533%20213.333ZM492%20281.2C546.267%20290.267%20590.267%20311.2%20622.533%20343.333C653.867%20374.667%20671.867%20409.867%20680.267%20456.667C684.133%20478.533%20684.133%20516.267%20680.133%20538.533C665.467%20621.067%20606.933%20684.4%20524%20707.467C490%20716.933%20488.4%20716.933%20392.4%20717.6L305.333%20718.133V498V277.867L391.733%20278.4C465.733%20278.8%20480%20279.2%20492%20281.2Z'%20fill='%233B5695'/%3e%3cpath%20d='M384%20462.933V576.133L345.067%20611.467C306.533%20646.267%20306.133%20646.667%20310.667%20647.067C313.2%20647.333%20348.933%20647.333%20390%20646.933C472.667%20646.267%20477.6%20645.867%20503.6%20637.333C527.6%20629.333%20543.333%20620%20560.267%20603.6C590.133%20574.667%20604.4%20536.267%20602.267%20489.733C600.533%20450.267%20588.267%20420%20564%20395.333C546.8%20377.867%20531.6%20368.4%20506.267%20360C482.933%20352.133%20474.533%20351.2%20427.067%20350.4L384%20349.733V462.933Z'%20fill='%233B5695'/%3e%3c/svg%3e", te = (e, t) => {
|
|
@@ -1046,25 +1046,25 @@ const Jt = "data:image/svg+xml,%3csvg%20width='1324'%20height='1326'%20viewBox='
|
|
|
1046
1046
|
alt: "DDict Logo",
|
|
1047
1047
|
class: "w-6 h-6 cursor-pointer"
|
|
1048
1048
|
};
|
|
1049
|
-
function tn(e, t, n, o, i,
|
|
1050
|
-
return g(),
|
|
1049
|
+
function tn(e, t, n, o, i, l) {
|
|
1050
|
+
return g(), C("img", en);
|
|
1051
1051
|
}
|
|
1052
1052
|
const nn = /* @__PURE__ */ te(Qt, [["render", tn]]), on = {}, sn = {
|
|
1053
1053
|
class: "w-12 h-12 text-primary",
|
|
1054
1054
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1055
1055
|
viewBox: "0 0 24 24"
|
|
1056
|
-
}, ln = /* @__PURE__ */
|
|
1056
|
+
}, ln = /* @__PURE__ */ Be('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>', 3), rn = [
|
|
1057
1057
|
ln
|
|
1058
1058
|
];
|
|
1059
|
-
function
|
|
1060
|
-
return g(),
|
|
1059
|
+
function an(e, t) {
|
|
1060
|
+
return g(), C("svg", sn, rn);
|
|
1061
1061
|
}
|
|
1062
|
-
const cn = /* @__PURE__ */ te(on, [["render",
|
|
1062
|
+
const cn = /* @__PURE__ */ te(on, [["render", an]]), dn = { class: "rounded-lg bg-base-100 px-4 py-2 border border-base-300 shadow-lg" }, un = { class: "flex justify-center" }, fn = {
|
|
1063
1063
|
__name: "Loading",
|
|
1064
1064
|
setup(e) {
|
|
1065
|
-
return (t, n) => (g(),
|
|
1066
|
-
|
|
1067
|
-
|
|
1065
|
+
return (t, n) => (g(), C("div", dn, [
|
|
1066
|
+
w("div", un, [
|
|
1067
|
+
N(cn)
|
|
1068
1068
|
])
|
|
1069
1069
|
]));
|
|
1070
1070
|
}
|
|
@@ -1072,12 +1072,12 @@ const cn = /* @__PURE__ */ te(on, [["render", rn]]), un = { class: "rounded-lg b
|
|
|
1072
1072
|
name: "Phonetic",
|
|
1073
1073
|
props: ["phonetic"]
|
|
1074
1074
|
}, hn = { class: "p-0 m-0" }, gn = { class: "text-xs font-md text-base-content/60" };
|
|
1075
|
-
function
|
|
1076
|
-
return g(),
|
|
1077
|
-
|
|
1075
|
+
function pn(e, t, n, o, i, l) {
|
|
1076
|
+
return g(), C("p", hn, [
|
|
1077
|
+
w("span", gn, "/" + ue(n.phonetic) + "/", 1)
|
|
1078
1078
|
]);
|
|
1079
1079
|
}
|
|
1080
|
-
const
|
|
1080
|
+
const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-col gap-2" }, bn = {
|
|
1081
1081
|
__name: "Sentences",
|
|
1082
1082
|
props: {
|
|
1083
1083
|
sentences: {
|
|
@@ -1088,33 +1088,112 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
|
|
|
1088
1088
|
setup(e) {
|
|
1089
1089
|
const t = e, n = _(() => t.sentences.split(`
|
|
1090
1090
|
`));
|
|
1091
|
-
return (o, i) => (g(),
|
|
1092
|
-
(g(!0),
|
|
1093
|
-
key:
|
|
1091
|
+
return (o, i) => (g(), C("div", vn, [
|
|
1092
|
+
(g(!0), C(he, null, Le(n.value, (l, s) => (g(), C("p", {
|
|
1093
|
+
key: s,
|
|
1094
1094
|
class: "text-base text-base-content leading-tight p-0 mr-2"
|
|
1095
|
-
},
|
|
1095
|
+
}, ue(l), 1))), 128))
|
|
1096
1096
|
]));
|
|
1097
1097
|
}
|
|
1098
|
-
}, wn =
|
|
1098
|
+
}, wn = /* @__PURE__ */ w("p", { class: "text-sm font-medium text-primary text-center" }, [
|
|
1099
|
+
/* @__PURE__ */ fe(" 🤔 Don't understand? "),
|
|
1100
|
+
/* @__PURE__ */ w("span", { class: "text-secondary font-semibold" }, "Try AI"),
|
|
1101
|
+
/* @__PURE__ */ fe(" ✨ ")
|
|
1102
|
+
], -1), yn = [
|
|
1103
|
+
wn
|
|
1104
|
+
], xn = {
|
|
1105
|
+
__name: "AIPromptButton",
|
|
1106
|
+
props: {
|
|
1107
|
+
show: {
|
|
1108
|
+
type: Boolean,
|
|
1109
|
+
default: !1
|
|
1110
|
+
},
|
|
1111
|
+
isLoading: {
|
|
1112
|
+
type: Boolean,
|
|
1113
|
+
default: !1
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
emits: ["click"],
|
|
1117
|
+
setup(e) {
|
|
1118
|
+
return (t, n) => e.show ? (g(), C("div", {
|
|
1119
|
+
key: 0,
|
|
1120
|
+
class: k([
|
|
1121
|
+
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1122
|
+
e.isLoading ? "from-primary/5 to-secondary/5 border-primary/10 cursor-not-allowed opacity-75" : "from-primary/10 to-secondary/10 border-primary/20 cursor-pointer hover:from-primary/20 hover:to-secondary/20 hover:border-primary/30"
|
|
1123
|
+
]),
|
|
1124
|
+
onClick: n[0] || (n[0] = (o) => !e.isLoading && t.$emit("click"))
|
|
1125
|
+
}, yn, 2)) : M("", !0);
|
|
1126
|
+
}
|
|
1127
|
+
}, Ln = /* @__PURE__ */ w("p", { class: "text-sm font-medium text-accent text-center" }, "💡 Need Summary? ✨", -1), Sn = [
|
|
1128
|
+
Ln
|
|
1129
|
+
], Tn = {
|
|
1130
|
+
__name: "AIExplainPromptButton",
|
|
1131
|
+
props: {
|
|
1132
|
+
show: {
|
|
1133
|
+
type: Boolean,
|
|
1134
|
+
default: !1
|
|
1135
|
+
},
|
|
1136
|
+
isLoading: {
|
|
1137
|
+
type: Boolean,
|
|
1138
|
+
default: !1
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
emits: ["click"],
|
|
1142
|
+
setup(e) {
|
|
1143
|
+
return (t, n) => e.show ? (g(), C("div", {
|
|
1144
|
+
key: 0,
|
|
1145
|
+
class: k([
|
|
1146
|
+
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1147
|
+
e.isLoading ? "from-accent/5 to-info/5 border-accent/10 cursor-not-allowed opacity-75" : "from-accent/10 to-info/10 border-accent/20 cursor-pointer hover:from-accent/20 hover:to-info/20 hover:border-accent/30"
|
|
1148
|
+
]),
|
|
1149
|
+
onClick: n[0] || (n[0] = (o) => !e.isLoading && t.$emit("click"))
|
|
1150
|
+
}, Sn, 2)) : M("", !0);
|
|
1151
|
+
}
|
|
1152
|
+
}, An = /* @__PURE__ */ w("p", { class: "text-sm font-medium text-success text-center" }, [
|
|
1153
|
+
/* @__PURE__ */ fe(" 📚 Learn this? "),
|
|
1154
|
+
/* @__PURE__ */ w("span", { class: "text-warning font-semibold" }, "Study now"),
|
|
1155
|
+
/* @__PURE__ */ fe(" 🎯 ")
|
|
1156
|
+
], -1), En = [
|
|
1157
|
+
An
|
|
1158
|
+
], $n = {
|
|
1159
|
+
__name: "LearnPromptButton",
|
|
1160
|
+
props: {
|
|
1161
|
+
show: {
|
|
1162
|
+
type: Boolean,
|
|
1163
|
+
default: !1
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
emits: ["click"],
|
|
1167
|
+
setup(e) {
|
|
1168
|
+
return (t, n) => e.show ? (g(), C("div", {
|
|
1169
|
+
key: 0,
|
|
1170
|
+
class: k([
|
|
1171
|
+
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1172
|
+
"from-success/10 to-warning/10 border-success/20 cursor-pointer hover:from-success/20 hover:to-warning/20 hover:border-success/30"
|
|
1173
|
+
]),
|
|
1174
|
+
onClick: n[0] || (n[0] = (o) => t.$emit("click"))
|
|
1175
|
+
}, En)) : M("", !0);
|
|
1176
|
+
}
|
|
1177
|
+
}, kn = { class: "capitalize text-base italic font-normal text-base-content/60" }, Bn = { class: "text-base leading-6 text-base-content" }, In = {
|
|
1099
1178
|
__name: "Dict",
|
|
1100
1179
|
props: {
|
|
1101
1180
|
dictionary: Array
|
|
1102
1181
|
},
|
|
1103
1182
|
setup(e) {
|
|
1104
|
-
return (t, n) => (g(),
|
|
1105
|
-
(g(!0),
|
|
1183
|
+
return (t, n) => (g(), C("div", null, [
|
|
1184
|
+
(g(!0), C(he, null, Le(e.dictionary, (o, i) => (g(), C("div", {
|
|
1106
1185
|
key: i,
|
|
1107
1186
|
class: "mt-2"
|
|
1108
1187
|
}, [
|
|
1109
|
-
|
|
1110
|
-
|
|
1188
|
+
w("p", kn, ue(o.pos), 1),
|
|
1189
|
+
w("span", Bn, ue(o.terms.join(", ")), 1)
|
|
1111
1190
|
]))), 128))
|
|
1112
1191
|
]));
|
|
1113
1192
|
}
|
|
1114
|
-
},
|
|
1193
|
+
}, Rn = { class: "" }, Mn = /* @__PURE__ */ w("p", { class: "capitalize text-base italic font-normal text-base-content/60 mt-2" }, "Summary", -1), Fn = {
|
|
1115
1194
|
key: 0,
|
|
1116
1195
|
class: "list-none list-outside mt-2"
|
|
1117
|
-
},
|
|
1196
|
+
}, On = ["innerHTML"], Dn = {
|
|
1118
1197
|
__name: "Explanation",
|
|
1119
1198
|
props: {
|
|
1120
1199
|
explanation: Object
|
|
@@ -1122,32 +1201,32 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
|
|
|
1122
1201
|
setup(e) {
|
|
1123
1202
|
return (t, n) => {
|
|
1124
1203
|
var o, i;
|
|
1125
|
-
return g(),
|
|
1126
|
-
|
|
1127
|
-
(o = e.explanation) != null && o.result ? (g(),
|
|
1128
|
-
(g(!0),
|
|
1129
|
-
`)) || [], (
|
|
1130
|
-
key: `${
|
|
1131
|
-
innerHTML:
|
|
1204
|
+
return g(), C("div", Rn, [
|
|
1205
|
+
Mn,
|
|
1206
|
+
(o = e.explanation) != null && o.result ? (g(), C("ul", Fn, [
|
|
1207
|
+
(g(!0), C(he, null, Le(((i = e.explanation) == null ? void 0 : i.result.split(`
|
|
1208
|
+
`)) || [], (l, s) => (g(), C("li", {
|
|
1209
|
+
key: `${l}-${s}`,
|
|
1210
|
+
innerHTML: l,
|
|
1132
1211
|
class: "text-base text-base-content"
|
|
1133
|
-
}, null, 8,
|
|
1134
|
-
])) :
|
|
1212
|
+
}, null, 8, On))), 128))
|
|
1213
|
+
])) : M("", !0)
|
|
1135
1214
|
]);
|
|
1136
1215
|
};
|
|
1137
1216
|
}
|
|
1138
|
-
},
|
|
1217
|
+
}, _n = ["disabled"], Vn = /* @__PURE__ */ w("path", {
|
|
1139
1218
|
d: "M2.33325 4.66667H3.51125C3.82693 4.6667 4.13239 4.55473 4.37325 4.35067L6.83392 2.26667C6.99592 2.12953 7.19374 2.04156 7.40407 2.01312C7.61441 1.98468 7.82849 2.01696 8.02109 2.10615C8.21369 2.19534 8.37678 2.33772 8.49114 2.51652C8.60551 2.69532 8.66638 2.90309 8.66659 3.11534V12.8847C8.66649 13.097 8.60565 13.305 8.49125 13.4839C8.37685 13.6628 8.21367 13.8053 8.02094 13.8945C7.82822 13.9837 7.614 14.0159 7.40356 13.9874C7.19312 13.9588 6.99523 13.8707 6.83325 13.7333L4.37325 11.6487C4.13229 11.4449 3.82685 11.3331 3.51125 11.3333H2.33325C2.06804 11.3333 1.81368 11.228 1.62615 11.0404C1.43861 10.8529 1.33325 10.5986 1.33325 10.3333V5.66667C1.33325 5.40145 1.43861 5.1471 1.62615 4.95956C1.81368 4.77203 2.06804 4.66667 2.33325 4.66667ZM11.1779 11.18C11.5969 10.763 11.9294 10.2674 12.1562 9.72156C12.3831 9.17572 12.4999 8.59044 12.4999 7.99934C12.4999 7.40823 12.3831 6.82295 12.1562 6.27711C11.9294 5.73127 11.5969 5.23564 11.1779 4.81867C11.1317 4.77098 11.0765 4.73297 11.0155 4.70686C10.9544 4.68075 10.8888 4.66705 10.8224 4.66657C10.756 4.66609 10.6902 4.67883 10.6288 4.70406C10.5674 4.72929 10.5116 4.76649 10.4647 4.8135C10.4179 4.86051 10.3808 4.91639 10.3558 4.97787C10.3307 5.03935 10.3181 5.10521 10.3188 5.17159C10.3195 5.23798 10.3334 5.30357 10.3597 5.36453C10.3859 5.42549 10.4241 5.48061 10.4719 5.52667C10.7977 5.85079 11.0562 6.23609 11.2326 6.66043C11.409 7.08477 11.4998 7.53979 11.4998 7.99934C11.4998 8.45888 11.409 8.9139 11.2326 9.33824C11.0562 9.76258 10.7977 10.1479 10.4719 10.472C10.4241 10.5181 10.3859 10.5732 10.3597 10.6341C10.3334 10.6951 10.3195 10.7607 10.3188 10.8271C10.3181 10.8935 10.3307 10.9593 10.3558 11.0208C10.3808 11.0823 10.4179 11.1382 10.4647 11.1852C10.5116 11.2322 10.5674 11.2694 10.6288 11.2946C10.6902 11.3198 10.756 11.3326 10.8224 11.3321C10.8888 11.3316 10.9544 11.3179 11.0155 11.2918C11.0765 11.2657 11.1317 11.2277 11.1779 11.18ZM12.7113 13.2127C12.6123 13.2126 12.5157 13.1832 12.4335 13.1281C12.3513 13.0731 12.2873 12.9949 12.2495 12.9035C12.2118 12.8121 12.202 12.7115 12.2214 12.6146C12.2408 12.5176 12.2886 12.4285 12.3586 12.3587C12.9317 11.7866 13.3865 11.1071 13.6967 10.359C14.0069 9.61101 14.1666 8.80915 14.1666 7.99934C14.1666 7.18952 14.0069 6.38766 13.6967 5.63963C13.3865 4.8916 12.9317 4.2121 12.3586 3.64C12.3122 3.59351 12.2754 3.53834 12.2503 3.47764C12.2252 3.41693 12.2124 3.35188 12.2124 3.2862C12.2125 3.22052 12.2255 3.15549 12.2507 3.09483C12.2759 3.03417 12.3128 2.97907 12.3593 2.93267C12.4057 2.88627 12.4609 2.84948 12.5216 2.8244C12.5823 2.79932 12.6474 2.78645 12.7131 2.78651C12.7787 2.78657 12.8438 2.79957 12.9044 2.82476C12.9651 2.84995 13.0202 2.88685 13.0666 2.93334C13.7327 3.59825 14.2612 4.38801 14.6218 5.25741C14.9824 6.12681 15.168 7.05879 15.168 8C15.168 8.94122 14.9824 9.87319 14.6218 10.7426C14.2612 11.612 13.7327 12.4018 13.0666 13.0667C13.02 13.1134 12.9646 13.1504 12.9036 13.1756C12.8426 13.2007 12.7772 13.2129 12.7113 13.2127Z",
|
|
1140
1219
|
fill: "currentColor"
|
|
1141
|
-
}, null, -1),
|
|
1142
|
-
|
|
1143
|
-
],
|
|
1220
|
+
}, null, -1), Pn = [
|
|
1221
|
+
Vn
|
|
1222
|
+
], Nn = ["disabled"], Hn = /* @__PURE__ */ w("path", {
|
|
1144
1223
|
"fill-rule": "evenodd",
|
|
1145
1224
|
d: "M4.5 7.5a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-9Z",
|
|
1146
1225
|
"clip-rule": "evenodd",
|
|
1147
1226
|
fill: "currentColor"
|
|
1148
|
-
}, null, -1),
|
|
1149
|
-
|
|
1150
|
-
],
|
|
1227
|
+
}, null, -1), Wn = [
|
|
1228
|
+
Hn
|
|
1229
|
+
], zn = {
|
|
1151
1230
|
__name: "Player",
|
|
1152
1231
|
props: {
|
|
1153
1232
|
tts: {
|
|
@@ -1161,54 +1240,54 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
|
|
|
1161
1240
|
},
|
|
1162
1241
|
emits: ["loadTTS"],
|
|
1163
1242
|
setup(e, { emit: t }) {
|
|
1164
|
-
const n = e, o = t, i = _(() => n.tts),
|
|
1165
|
-
let
|
|
1243
|
+
const n = e, o = t, i = _(() => n.tts), l = I(!1), s = new Audio(), a = new (window.AudioContext || window.webkitAudioContext)();
|
|
1244
|
+
let r = null;
|
|
1166
1245
|
se(
|
|
1167
1246
|
i,
|
|
1168
1247
|
() => {
|
|
1169
1248
|
if (!i.value) {
|
|
1170
|
-
|
|
1249
|
+
l.value = !1;
|
|
1171
1250
|
return;
|
|
1172
1251
|
}
|
|
1173
|
-
|
|
1252
|
+
d();
|
|
1174
1253
|
},
|
|
1175
1254
|
{ immediate: !0 }
|
|
1176
|
-
),
|
|
1177
|
-
h(),
|
|
1255
|
+
), Ie(() => {
|
|
1256
|
+
h(), s.src = "", a.close();
|
|
1178
1257
|
});
|
|
1179
1258
|
function c() {
|
|
1180
1259
|
if (i.value) {
|
|
1181
|
-
|
|
1260
|
+
d();
|
|
1182
1261
|
return;
|
|
1183
1262
|
}
|
|
1184
|
-
|
|
1263
|
+
l.value = !0, o("loadTTS");
|
|
1185
1264
|
}
|
|
1186
|
-
async function
|
|
1265
|
+
async function d() {
|
|
1187
1266
|
if (i.value) {
|
|
1188
|
-
|
|
1267
|
+
l.value = !0;
|
|
1189
1268
|
try {
|
|
1190
|
-
|
|
1191
|
-
|
|
1269
|
+
s.src = i.value, s.playbackRate = 0.7, await s.play(), s.onended = () => {
|
|
1270
|
+
l.value = !1;
|
|
1192
1271
|
};
|
|
1193
1272
|
} catch {
|
|
1194
|
-
await
|
|
1273
|
+
await u();
|
|
1195
1274
|
}
|
|
1196
1275
|
}
|
|
1197
1276
|
}
|
|
1198
|
-
async function
|
|
1277
|
+
async function u() {
|
|
1199
1278
|
try {
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
|
|
1279
|
+
const f = await (await fetch(i.value)).arrayBuffer(), v = await a.decodeAudioData(f);
|
|
1280
|
+
r = a.createBufferSource(), r.buffer = v, r.playbackRate.value = 0.7, r.connect(a.destination), r.start(), r.onended = () => {
|
|
1281
|
+
l.value = !1, r = null;
|
|
1203
1282
|
};
|
|
1204
1283
|
} catch {
|
|
1205
|
-
|
|
1284
|
+
l.value = !1;
|
|
1206
1285
|
}
|
|
1207
1286
|
}
|
|
1208
1287
|
function h() {
|
|
1209
|
-
|
|
1288
|
+
r && (r.stop(), r.disconnect(), r = null), s.pause(), s.currentTime = 0, l.value = !1;
|
|
1210
1289
|
}
|
|
1211
|
-
return (
|
|
1290
|
+
return (m, f) => l.value ? (g(), C("button", {
|
|
1212
1291
|
key: 1,
|
|
1213
1292
|
class: k(["btn btn-xs btn-circle", [
|
|
1214
1293
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1217,13 +1296,13 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
|
|
|
1217
1296
|
disabled: e.disabled,
|
|
1218
1297
|
onClick: h
|
|
1219
1298
|
}, [
|
|
1220
|
-
(g(),
|
|
1299
|
+
(g(), C("svg", {
|
|
1221
1300
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1222
1301
|
viewBox: "0 0 24 24",
|
|
1223
1302
|
fill: "none",
|
|
1224
1303
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1225
|
-
},
|
|
1226
|
-
], 10,
|
|
1304
|
+
}, Wn, 2))
|
|
1305
|
+
], 10, Nn)) : (g(), C("button", {
|
|
1227
1306
|
key: 0,
|
|
1228
1307
|
class: k(["btn btn-xs btn-circle", [
|
|
1229
1308
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1232,87 +1311,87 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
|
|
|
1232
1311
|
disabled: e.disabled,
|
|
1233
1312
|
onClick: c
|
|
1234
1313
|
}, [
|
|
1235
|
-
(g(),
|
|
1314
|
+
(g(), C("svg", {
|
|
1236
1315
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1237
1316
|
viewBox: "0 0 16 16",
|
|
1238
1317
|
fill: "none",
|
|
1239
1318
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1240
|
-
},
|
|
1241
|
-
], 10,
|
|
1319
|
+
}, Pn, 2))
|
|
1320
|
+
], 10, _n));
|
|
1242
1321
|
}
|
|
1243
|
-
},
|
|
1322
|
+
}, Un = {
|
|
1244
1323
|
class: "bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent",
|
|
1245
1324
|
"data-tip": "Favorite"
|
|
1246
|
-
},
|
|
1325
|
+
}, Zn = ["disabled"], jn = /* @__PURE__ */ w("path", {
|
|
1247
1326
|
d: "M14.9491 5.89315C14.8278 5.53128 14.5111 5.27252 14.1226 5.21783L10.5264 4.7114L8.91813 1.55315C8.74435 1.21195 8.39257 1 7.99998 1C7.60739 1 7.25557 1.21195 7.08183 1.55315L5.47358 4.7114L1.8774 5.21783C1.48888 5.27252 1.17219 5.53128 1.05086 5.89315C0.929554 6.25501 1.02881 6.64477 1.30993 6.91038L3.91217 9.36871L3.29786 12.8399C3.2315 13.215 3.38755 13.5868 3.7052 13.8105C3.88128 13.9344 4.08938 14 4.30704 14C4.47232 14 4.63705 13.9606 4.78341 13.886L7.99995 12.2471L11.2165 13.886C11.3628 13.9606 11.5276 14 11.6929 14C11.9106 14 12.1187 13.9345 12.2948 13.8105C12.6124 13.5868 12.7685 13.215 12.7021 12.84L12.0878 9.36871L14.6901 6.91035C14.9712 6.64477 15.0704 6.25498 14.9491 5.89315ZM14.0266 6.25082L11.2455 8.87813C11.1335 8.98392 11.0824 9.13637 11.1089 9.28575L11.7654 12.9956C11.7701 13.0226 11.759 13.0493 11.7362 13.0653C11.7202 13.0766 11.7038 13.079 11.6929 13.079C11.6809 13.079 11.6694 13.0762 11.6587 13.0708L8.22108 11.3192C8.15189 11.284 8.07593 11.2663 7.99998 11.2663C7.92402 11.2663 7.84807 11.284 7.77882 11.3193L4.34118 13.0708C4.33052 13.0763 4.31904 13.079 4.30701 13.079C4.29611 13.079 4.27969 13.0767 4.26373 13.0654C4.24092 13.0494 4.22975 13.0226 4.2345 12.9957L4.89104 9.28584C4.91747 9.13646 4.86637 8.98401 4.75439 8.87822L1.97327 6.25091C1.95308 6.23184 1.94595 6.20383 1.95466 6.17786C1.9634 6.15185 1.98612 6.13326 2.01405 6.12933L5.85743 5.58807C6.0122 5.56626 6.14599 5.47208 6.21521 5.33616L7.93404 1.9608C7.94653 1.9363 7.97178 1.92107 7.99998 1.92107C8.02818 1.92107 8.05343 1.9363 8.06591 1.9608L9.78468 5.33607C9.85391 5.47199 9.9877 5.5662 10.1425 5.58799L13.9859 6.12924C14.0138 6.1332 14.0365 6.15176 14.0452 6.17777C14.0539 6.20374 14.0468 6.23175 14.0266 6.25082Z",
|
|
1248
1327
|
fill: "currentColor"
|
|
1249
|
-
}, null, -1),
|
|
1250
|
-
|
|
1251
|
-
],
|
|
1328
|
+
}, null, -1), Kn = [
|
|
1329
|
+
jn
|
|
1330
|
+
], Xn = /* @__PURE__ */ w("path", {
|
|
1252
1331
|
d: "M7.47207 1.31905C7.57125 1.12371 7.77589 1 8.00001 1C8.22413 1 8.42877 1.12367 8.52795 1.31905L10.3721 4.95175L14.4959 5.53427C14.7177 5.5656 14.9019 5.7166 14.9712 5.9238C15.0404 6.13101 14.9827 6.35843 14.8222 6.51049L11.8382 9.33816L12.5427 13.3309C12.5806 13.5456 12.4897 13.7626 12.3084 13.8906C12.1272 14.0187 11.8868 14.0356 11.6884 13.9342L8.00004 12.0491L4.31158 13.9343C4.11323 14.0356 3.87286 14.0187 3.69157 13.8907C3.51028 13.7627 3.4195 13.5457 3.45736 13.3309L4.1618 9.33819L1.17781 6.51052C1.01735 6.35846 0.959571 6.13101 1.02884 5.92383C1.09807 5.71663 1.28232 5.56563 1.50409 5.53431L5.62787 4.95178L7.47207 1.31905Z",
|
|
1253
1332
|
fill: "currentColor"
|
|
1254
|
-
}, null, -1),
|
|
1255
|
-
|
|
1256
|
-
],
|
|
1333
|
+
}, null, -1), Yn = [
|
|
1334
|
+
Xn
|
|
1335
|
+
], Gn = {
|
|
1257
1336
|
__name: "Favorite",
|
|
1258
1337
|
props: {
|
|
1259
1338
|
isFilled: Boolean,
|
|
1260
1339
|
disabled: Boolean
|
|
1261
1340
|
},
|
|
1262
1341
|
setup(e) {
|
|
1263
|
-
return (t, n) => (g(),
|
|
1264
|
-
|
|
1342
|
+
return (t, n) => (g(), C("div", Un, [
|
|
1343
|
+
w("button", {
|
|
1265
1344
|
class: k(["btn btn-xs btn-circle", [
|
|
1266
1345
|
{ "btn-ghost": !e.disabled },
|
|
1267
1346
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
1268
1347
|
]]),
|
|
1269
1348
|
disabled: e.disabled
|
|
1270
1349
|
}, [
|
|
1271
|
-
e.isFilled ? (g(),
|
|
1350
|
+
e.isFilled ? (g(), C("svg", {
|
|
1272
1351
|
key: 1,
|
|
1273
1352
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1274
1353
|
viewBox: "0 0 16 16",
|
|
1275
1354
|
fill: "none",
|
|
1276
1355
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1277
|
-
},
|
|
1356
|
+
}, Yn, 2)) : (g(), C("svg", {
|
|
1278
1357
|
key: 0,
|
|
1279
1358
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1280
1359
|
viewBox: "0 0 16 16",
|
|
1281
1360
|
fill: "none",
|
|
1282
1361
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1283
|
-
},
|
|
1284
|
-
], 10,
|
|
1362
|
+
}, Kn, 2))
|
|
1363
|
+
], 10, Zn)
|
|
1285
1364
|
]));
|
|
1286
1365
|
}
|
|
1287
|
-
},
|
|
1366
|
+
}, qn = {}, Jn = {
|
|
1288
1367
|
class: "w-6 h-6 text-primary",
|
|
1289
1368
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1290
1369
|
viewBox: "0 0 24 24"
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1370
|
+
}, Qn = /* @__PURE__ */ Be('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>', 3), eo = [
|
|
1371
|
+
Qn
|
|
1293
1372
|
];
|
|
1294
|
-
function
|
|
1295
|
-
return g(),
|
|
1373
|
+
function to(e, t) {
|
|
1374
|
+
return g(), C("svg", Jn, eo);
|
|
1296
1375
|
}
|
|
1297
|
-
const at = /* @__PURE__ */ te(
|
|
1376
|
+
const at = /* @__PURE__ */ te(qn, [["render", to]]), no = {
|
|
1298
1377
|
class: "bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent",
|
|
1299
1378
|
"data-tip": "AI Translate"
|
|
1300
|
-
},
|
|
1379
|
+
}, oo = ["disabled"], io = /* @__PURE__ */ w("path", {
|
|
1301
1380
|
d: "M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z",
|
|
1302
1381
|
fill: "currentColor"
|
|
1303
|
-
}, null, -1),
|
|
1382
|
+
}, null, -1), so = /* @__PURE__ */ w("path", {
|
|
1304
1383
|
d: "M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z",
|
|
1305
1384
|
fill: "currentColor"
|
|
1306
|
-
}, null, -1),
|
|
1385
|
+
}, null, -1), lo = /* @__PURE__ */ w("path", {
|
|
1307
1386
|
d: "M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z",
|
|
1308
1387
|
fill: "currentColor"
|
|
1309
|
-
}, null, -1),
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
],
|
|
1314
|
-
|
|
1315
|
-
],
|
|
1388
|
+
}, null, -1), ro = [
|
|
1389
|
+
io,
|
|
1390
|
+
so,
|
|
1391
|
+
lo
|
|
1392
|
+
], ao = /* @__PURE__ */ Be('<path d="M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z" fill="currentColor"></path><path d="M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z" fill="currentColor"></path><path d="M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z" fill="currentColor"></path><circle cx="3.5" cy="3.5" r="1.5" fill="currentColor"></circle><ellipse cx="4.5" cy="10" rx="0.5" ry="1" fill="currentColor"></ellipse><circle cx="9" cy="6" r="1" fill="currentColor"></circle>', 6), co = [
|
|
1393
|
+
ao
|
|
1394
|
+
], uo = {
|
|
1316
1395
|
__name: "AITranslateBtn",
|
|
1317
1396
|
props: {
|
|
1318
1397
|
isLoading: Boolean,
|
|
@@ -1320,11 +1399,11 @@ const at = /* @__PURE__ */ te(Wn, [["render", jn]]), Kn = {
|
|
|
1320
1399
|
isFilled: Boolean
|
|
1321
1400
|
},
|
|
1322
1401
|
setup(e) {
|
|
1323
|
-
return (t, n) => (g(),
|
|
1402
|
+
return (t, n) => (g(), C("div", no, [
|
|
1324
1403
|
e.isLoading ? (g(), V(at, {
|
|
1325
1404
|
key: 0,
|
|
1326
1405
|
class: "inset-0 flex items-center justify-center"
|
|
1327
|
-
})) : (g(),
|
|
1406
|
+
})) : (g(), C("button", {
|
|
1328
1407
|
key: 1,
|
|
1329
1408
|
class: k(["btn btn-xs btn-circle", [
|
|
1330
1409
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1332,46 +1411,46 @@ const at = /* @__PURE__ */ te(Wn, [["render", jn]]), Kn = {
|
|
|
1332
1411
|
]]),
|
|
1333
1412
|
disabled: e.disabled
|
|
1334
1413
|
}, [
|
|
1335
|
-
e.isFilled ? (g(),
|
|
1414
|
+
e.isFilled ? (g(), C("svg", {
|
|
1336
1415
|
key: 1,
|
|
1337
1416
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1338
1417
|
viewBox: "0 0 12 12",
|
|
1339
1418
|
fill: "none",
|
|
1340
1419
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1341
|
-
},
|
|
1420
|
+
}, co, 2)) : (g(), C("svg", {
|
|
1342
1421
|
key: 0,
|
|
1343
1422
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1344
1423
|
viewBox: "0 0 12 12",
|
|
1345
1424
|
fill: "none",
|
|
1346
1425
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1347
|
-
},
|
|
1348
|
-
], 10,
|
|
1426
|
+
}, ro, 2))
|
|
1427
|
+
], 10, oo))
|
|
1349
1428
|
]));
|
|
1350
1429
|
}
|
|
1351
|
-
},
|
|
1430
|
+
}, fo = {
|
|
1352
1431
|
class: "bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent",
|
|
1353
1432
|
"data-tip": "AI Summarize"
|
|
1354
|
-
},
|
|
1433
|
+
}, mo = ["disabled"], ho = /* @__PURE__ */ w("path", {
|
|
1355
1434
|
stroke: "currentColor",
|
|
1356
1435
|
"stroke-linecap": "round",
|
|
1357
1436
|
"stroke-linejoin": "round",
|
|
1358
1437
|
"stroke-width": "2",
|
|
1359
1438
|
d: "M21 12h1m-3.5-6.5 1-1M12 3V2M5.5 5.5l-1-1M3 12H2m8 10h4m3-10a5 5 0 1 0-7 4.584V19h4v-2.416A5.001 5.001 0 0 0 17 12z"
|
|
1360
|
-
}, null, -1),
|
|
1361
|
-
|
|
1362
|
-
],
|
|
1439
|
+
}, null, -1), go = [
|
|
1440
|
+
ho
|
|
1441
|
+
], po = /* @__PURE__ */ w("path", {
|
|
1363
1442
|
fill: "currentColor",
|
|
1364
1443
|
d: "M12 7a5 5 0 0 0-2 9.584V19h4v-2.416A5.001 5.001 0 0 0 12 7z"
|
|
1365
|
-
}, null, -1),
|
|
1444
|
+
}, null, -1), Co = /* @__PURE__ */ w("path", {
|
|
1366
1445
|
stroke: "currentColor",
|
|
1367
1446
|
"stroke-linecap": "round",
|
|
1368
1447
|
"stroke-linejoin": "round",
|
|
1369
1448
|
"stroke-width": "2",
|
|
1370
1449
|
d: "M21 12h1m-3.5-6.5 1-1M12 3V2M5.5 5.5l-1-1M3 12H2m8 10h4m3-10a5 5 0 1 0-7 4.584V19h4v-2.416A5.001 5.001 0 0 0 17 12z"
|
|
1371
|
-
}, null, -1),
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
],
|
|
1450
|
+
}, null, -1), vo = [
|
|
1451
|
+
po,
|
|
1452
|
+
Co
|
|
1453
|
+
], bo = {
|
|
1375
1454
|
__name: "AIExplainBtn",
|
|
1376
1455
|
props: {
|
|
1377
1456
|
isLoading: Boolean,
|
|
@@ -1379,8 +1458,8 @@ const at = /* @__PURE__ */ te(Wn, [["render", jn]]), Kn = {
|
|
|
1379
1458
|
isFilled: Boolean
|
|
1380
1459
|
},
|
|
1381
1460
|
setup(e) {
|
|
1382
|
-
return (t, n) => (g(),
|
|
1383
|
-
e.isLoading ? (g(), V(at, { key: 0 })) : (g(),
|
|
1461
|
+
return (t, n) => (g(), C("div", fo, [
|
|
1462
|
+
e.isLoading ? (g(), V(at, { key: 0 })) : (g(), C("button", {
|
|
1384
1463
|
key: 1,
|
|
1385
1464
|
class: k(["btn btn-xs btn-circle", [
|
|
1386
1465
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1388,67 +1467,67 @@ const at = /* @__PURE__ */ te(Wn, [["render", jn]]), Kn = {
|
|
|
1388
1467
|
]]),
|
|
1389
1468
|
disabled: e.disabled
|
|
1390
1469
|
}, [
|
|
1391
|
-
e.isFilled ? (g(),
|
|
1470
|
+
e.isFilled ? (g(), C("svg", {
|
|
1392
1471
|
key: 1,
|
|
1393
1472
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1394
1473
|
viewBox: "0 0 24 24",
|
|
1395
1474
|
fill: "none",
|
|
1396
1475
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1397
|
-
},
|
|
1476
|
+
}, vo, 2)) : (g(), C("svg", {
|
|
1398
1477
|
key: 0,
|
|
1399
1478
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1400
1479
|
viewBox: "0 0 24 24",
|
|
1401
1480
|
fill: "none",
|
|
1402
1481
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1403
|
-
},
|
|
1404
|
-
], 10,
|
|
1482
|
+
}, go, 2))
|
|
1483
|
+
], 10, mo))
|
|
1405
1484
|
]));
|
|
1406
1485
|
}
|
|
1407
|
-
},
|
|
1486
|
+
}, wo = {}, yo = { class: "btn btn-xs btn-ghost btn-circle" }, xo = /* @__PURE__ */ w("svg", {
|
|
1408
1487
|
class: "w-4 h-4 text-primary",
|
|
1409
1488
|
viewBox: "0 0 24 24",
|
|
1410
1489
|
fill: "none",
|
|
1411
1490
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1412
1491
|
}, [
|
|
1413
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ w("path", {
|
|
1414
1493
|
d: "M9.12596 1.63869C9.46935 1.54364 9.83221 1.70329 9.99413 2.02068C10.3672 2.75191 11.1261 3.25 12 3.25C12.8739 3.25 13.6328 2.75191 14.0059 2.02068C14.1678 1.70329 14.5307 1.54364 14.874 1.63869C16.5585 2.10497 18.0759 2.9704 19.3184 4.12574C19.5611 4.35137 19.6269 4.70948 19.4804 5.00666C19.3331 5.30535 19.25 5.6419 19.25 6C19.25 7.24263 20.2574 8.25 21.5 8.25L21.5314 8.24977C21.8629 8.24504 22.1583 8.45859 22.2576 8.77495C22.5777 9.79397 22.75 10.8776 22.75 12C22.75 12.7408 22.6749 13.4649 22.5318 14.1648C22.4548 14.5411 22.1059 14.7985 21.7237 14.7609C21.6504 14.7537 21.5758 14.75 21.5 14.75C20.2574 14.75 19.25 15.7574 19.25 17C19.25 17.5531 19.4486 18.0579 19.7793 18.4498C20.027 18.7434 20.0128 19.1767 19.7465 19.4535C18.4777 20.7719 16.8745 21.7678 15.0721 22.3044C14.6807 22.4209 14.2681 22.2029 14.1437 21.814C13.8535 20.906 13.0024 20.25 12 20.25C10.9976 20.25 10.1465 20.906 9.85629 21.814C9.73195 22.2029 9.31927 22.4209 8.92789 22.3044C7.12545 21.7678 5.52229 20.7719 4.25353 19.4535C3.98716 19.1767 3.97299 18.7434 4.22072 18.4498C4.55139 18.0579 4.75 17.5531 4.75 17C4.75 15.7574 3.74264 14.75 2.5 14.75C2.42423 14.75 2.34963 14.7537 2.27634 14.7609C1.89406 14.7985 1.54519 14.5411 1.46821 14.1648C1.32505 13.4649 1.25 12.7408 1.25 12C1.25 10.8776 1.42227 9.79398 1.74236 8.77494C1.84173 8.45859 2.13705 8.24504 2.4686 8.24977L2.5 8.25C3.74264 8.25 4.75 7.24263 4.75 6C4.75 5.6419 4.66689 5.30535 4.51962 5.00666C4.3731 4.70948 4.43894 4.35137 4.68159 4.12574C5.92411 2.9704 7.44153 2.10497 9.12596 1.63869ZM6.08277 4.88991C6.19152 5.24123 6.25 5.61424 6.25 6C6.25 7.88945 4.85261 9.45253 3.03493 9.71213C2.84898 10.4432 2.75 11.2096 2.75 12C2.75 12.4294 2.77921 12.8516 2.83567 13.2648C4.74948 13.4346 6.25 15.0421 6.25 17C6.25 17.6669 6.0754 18.2941 5.76971 18.8372C6.62645 19.6184 7.63002 20.2404 8.73362 20.657C9.37706 19.5189 10.598 18.75 12 18.75C13.402 18.75 14.6229 19.5189 15.2664 20.657C16.37 20.2404 17.3735 19.6184 18.2303 18.8372C17.9246 18.2941 17.75 17.6669 17.75 17C17.75 15.0421 19.2505 13.4346 21.1643 13.2648C21.2208 12.8516 21.25 12.4294 21.25 12C21.25 11.2096 21.151 10.4432 20.9651 9.71213C19.1474 9.45252 17.75 7.88945 17.75 6C17.75 5.61424 17.8085 5.24123 17.9172 4.88991C17.0618 4.1771 16.0762 3.61614 15.0018 3.24775C14.3184 4.15897 13.2287 4.75 12 4.75C10.7713 4.75 9.68158 4.15897 8.99819 3.24775C7.92382 3.61614 6.93823 4.1771 6.08277 4.88991Z",
|
|
1415
1494
|
fill: "currentColor"
|
|
1416
1495
|
}),
|
|
1417
|
-
/* @__PURE__ */
|
|
1496
|
+
/* @__PURE__ */ w("path", {
|
|
1418
1497
|
d: "M7.75 12C7.75 9.65278 9.65279 7.75 12 7.75C14.3472 7.75 16.25 9.65278 16.25 12C16.25 14.3472 14.3472 16.25 12 16.25C9.65279 16.25 7.75 14.3472 7.75 12ZM12 9.25C10.4812 9.25 9.25 10.4812 9.25 12C9.25 13.5188 10.4812 14.75 12 14.75C13.5188 14.75 14.75 13.5188 14.75 12C14.75 10.4812 13.5188 9.25 12 9.25Z",
|
|
1419
1498
|
fill: "currentColor"
|
|
1420
1499
|
})
|
|
1421
|
-
], -1),
|
|
1422
|
-
|
|
1500
|
+
], -1), Lo = [
|
|
1501
|
+
xo
|
|
1423
1502
|
];
|
|
1424
|
-
function
|
|
1425
|
-
return g(),
|
|
1503
|
+
function So(e, t) {
|
|
1504
|
+
return g(), C("button", yo, Lo);
|
|
1426
1505
|
}
|
|
1427
|
-
const
|
|
1506
|
+
const To = /* @__PURE__ */ te(wo, [["render", So]]), Ao = {}, Eo = { class: "btn btn-xs btn-circle btn-ghost" }, $o = /* @__PURE__ */ w("svg", {
|
|
1428
1507
|
class: "w-4 h-4 text-primary",
|
|
1429
1508
|
viewBox: "0 0 16 16",
|
|
1430
1509
|
fill: "none",
|
|
1431
1510
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1432
1511
|
}, [
|
|
1433
|
-
/* @__PURE__ */
|
|
1512
|
+
/* @__PURE__ */ w("path", {
|
|
1434
1513
|
"fill-rule": "evenodd",
|
|
1435
1514
|
"clip-rule": "evenodd",
|
|
1436
1515
|
d: "M3.19102 3.19102C3.44571 2.93633 3.85864 2.93633 4.11333 3.19102L12.809 11.8867C13.0637 12.1414 13.0637 12.5543 12.809 12.809C12.5543 13.0637 12.1414 13.0637 11.8867 12.809L3.19102 4.11333C2.93633 3.85864 2.93633 3.44571 3.19102 3.19102Z",
|
|
1437
1516
|
fill: "currentColor"
|
|
1438
1517
|
}),
|
|
1439
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ w("path", {
|
|
1440
1519
|
"fill-rule": "evenodd",
|
|
1441
1520
|
"clip-rule": "evenodd",
|
|
1442
1521
|
d: "M12.809 3.19102C13.0637 3.44571 13.0637 3.85864 12.809 4.11333L4.11333 12.809C3.85864 13.0637 3.44571 13.0637 3.19102 12.809C2.93633 12.5543 2.93633 12.1414 3.19102 11.8867L11.8867 3.19102C12.1414 2.93633 12.5543 2.93633 12.809 3.19102Z",
|
|
1443
1522
|
fill: "currentColor"
|
|
1444
1523
|
})
|
|
1445
|
-
], -1),
|
|
1446
|
-
|
|
1524
|
+
], -1), ko = [
|
|
1525
|
+
$o
|
|
1447
1526
|
];
|
|
1448
|
-
function
|
|
1449
|
-
return g(),
|
|
1527
|
+
function Bo(e, t) {
|
|
1528
|
+
return g(), C("button", Eo, ko);
|
|
1450
1529
|
}
|
|
1451
|
-
const
|
|
1530
|
+
const Io = /* @__PURE__ */ te(Ao, [["render", Bo]]), Ro = {
|
|
1452
1531
|
name: "ThemeSelector",
|
|
1453
1532
|
props: {
|
|
1454
1533
|
currentTheme: {
|
|
@@ -1485,55 +1564,55 @@ const yo = /* @__PURE__ */ te(po, [["render", xo]]), Lo = {
|
|
|
1485
1564
|
});
|
|
1486
1565
|
}
|
|
1487
1566
|
}
|
|
1488
|
-
},
|
|
1567
|
+
}, Mo = { class: "dropdown dropdown-end z-50" }, Fo = /* @__PURE__ */ w("div", {
|
|
1489
1568
|
tabindex: "0",
|
|
1490
1569
|
role: "button",
|
|
1491
1570
|
class: "btn btn-ghost btn-circle btn-xs"
|
|
1492
1571
|
}, [
|
|
1493
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ w("svg", {
|
|
1494
1573
|
class: "w-4 h-4 text-primary",
|
|
1495
1574
|
fill: "currentColor",
|
|
1496
1575
|
viewBox: "0 0 20 20"
|
|
1497
1576
|
}, [
|
|
1498
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ w("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" })
|
|
1499
1578
|
])
|
|
1500
|
-
], -1),
|
|
1579
|
+
], -1), Oo = {
|
|
1501
1580
|
tabindex: "0",
|
|
1502
1581
|
class: "dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52 max-h-96 overflow-y-auto z-50 border border-base-300"
|
|
1503
|
-
},
|
|
1504
|
-
function
|
|
1505
|
-
return g(),
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
(g(!0),
|
|
1509
|
-
key:
|
|
1582
|
+
}, Do = ["id", "value", "checked", "onChange"], _o = ["for"], Vo = { class: "flex items-center gap-2" };
|
|
1583
|
+
function Po(e, t, n, o, i, l) {
|
|
1584
|
+
return g(), C("div", Mo, [
|
|
1585
|
+
Fo,
|
|
1586
|
+
w("ul", Oo, [
|
|
1587
|
+
(g(!0), C(he, null, Le(i.availableThemes, (s) => (g(), C("li", {
|
|
1588
|
+
key: s.value
|
|
1510
1589
|
}, [
|
|
1511
|
-
|
|
1590
|
+
w("input", {
|
|
1512
1591
|
type: "radio",
|
|
1513
|
-
id: `theme-${
|
|
1514
|
-
value:
|
|
1515
|
-
checked: n.currentTheme ===
|
|
1516
|
-
onChange: (
|
|
1592
|
+
id: `theme-${s.value}`,
|
|
1593
|
+
value: s.value,
|
|
1594
|
+
checked: n.currentTheme === s.value,
|
|
1595
|
+
onChange: (a) => l.handleThemeChange(s.value),
|
|
1517
1596
|
class: "theme-controller sr-only"
|
|
1518
|
-
}, null, 40,
|
|
1519
|
-
|
|
1520
|
-
for: `theme-${
|
|
1521
|
-
class: k(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200", { "bg-primary text-primary-content": n.currentTheme ===
|
|
1522
|
-
onClick: t[0] || (t[0] = (...
|
|
1597
|
+
}, null, 40, Do),
|
|
1598
|
+
w("label", {
|
|
1599
|
+
for: `theme-${s.value}`,
|
|
1600
|
+
class: k(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200", { "bg-primary text-primary-content": n.currentTheme === s.value }]),
|
|
1601
|
+
onClick: t[0] || (t[0] = (...a) => l.handleLabelClick && l.handleLabelClick(...a))
|
|
1523
1602
|
}, [
|
|
1524
|
-
|
|
1525
|
-
|
|
1603
|
+
w("span", Vo, [
|
|
1604
|
+
w("span", {
|
|
1526
1605
|
class: "w-3 h-3 rounded-full",
|
|
1527
|
-
style: $e({ backgroundColor:
|
|
1606
|
+
style: $e({ backgroundColor: s.color })
|
|
1528
1607
|
}, null, 4),
|
|
1529
|
-
|
|
1608
|
+
fe(" " + ue(s.name), 1)
|
|
1530
1609
|
])
|
|
1531
|
-
], 10,
|
|
1610
|
+
], 10, _o)
|
|
1532
1611
|
]))), 128))
|
|
1533
1612
|
])
|
|
1534
1613
|
]);
|
|
1535
1614
|
}
|
|
1536
|
-
const
|
|
1615
|
+
const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-col" }, Wo = { class: "flex justify-start items-center" }, zo = { class: "flex items-center gap-1" }, Uo = /* @__PURE__ */ w("div", { class: "w-5" }, null, -1), Zo = { class: "flex justify-end items-center" }, je = {
|
|
1537
1616
|
__name: "Header",
|
|
1538
1617
|
props: {
|
|
1539
1618
|
tts: String,
|
|
@@ -1562,72 +1641,81 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
|
|
|
1562
1641
|
"loadTTS",
|
|
1563
1642
|
"aiTranslate",
|
|
1564
1643
|
"aiExplain",
|
|
1565
|
-
"themeChange"
|
|
1644
|
+
"themeChange",
|
|
1645
|
+
"dragStart"
|
|
1566
1646
|
],
|
|
1567
1647
|
setup(e, { emit: t }) {
|
|
1568
|
-
const n = e, o = t
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1648
|
+
const n = e, o = t, i = (s) => {
|
|
1649
|
+
s.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "mouse", event: s }), s.preventDefault());
|
|
1650
|
+
}, l = (s) => {
|
|
1651
|
+
s.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "touch", event: s }), s.preventDefault());
|
|
1652
|
+
};
|
|
1653
|
+
return (s, a) => (g(), C("div", Ho, [
|
|
1654
|
+
w("div", {
|
|
1655
|
+
class: "flex p-2 pt-2 pb-1 flex-row justify-between cursor-grab active:cursor-grabbing",
|
|
1656
|
+
onMousedown: i,
|
|
1657
|
+
onTouchstart: l
|
|
1658
|
+
}, [
|
|
1659
|
+
w("div", Wo, [
|
|
1660
|
+
e.isServiceUnavailable ? M("", !0) : (g(), V(zn, {
|
|
1573
1661
|
key: 0,
|
|
1574
1662
|
disabled: e.isAITranslationLoading || e.isAIExplainLoading,
|
|
1575
1663
|
tts: n.tts,
|
|
1576
|
-
onLoadTTS:
|
|
1664
|
+
onLoadTTS: a[0] || (a[0] = (r) => s.$emit("loadTTS"))
|
|
1577
1665
|
}, null, 8, ["disabled", "tts"]))
|
|
1578
1666
|
]),
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
!e.isServiceUnavailable && e.isAITranslateVisible ? (g(), V(
|
|
1667
|
+
w("div", zo, [
|
|
1668
|
+
Uo,
|
|
1669
|
+
!e.isServiceUnavailable && e.isAITranslateVisible ? (g(), V(uo, {
|
|
1582
1670
|
key: 0,
|
|
1583
1671
|
isLoading: e.isAITranslationLoading,
|
|
1584
1672
|
isFilled: e.isAITranslate,
|
|
1585
|
-
onClick:
|
|
1586
|
-
}, null, 8, ["isLoading", "isFilled"])) :
|
|
1587
|
-
!e.isServiceUnavailable && e.isAIExplainVisible ? (g(), V(
|
|
1673
|
+
onClick: a[1] || (a[1] = (r) => o("aiTranslate"))
|
|
1674
|
+
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1675
|
+
!e.isServiceUnavailable && e.isAIExplainVisible ? (g(), V(bo, {
|
|
1588
1676
|
key: 1,
|
|
1589
1677
|
isLoading: e.isAIExplainLoading,
|
|
1590
1678
|
isFilled: e.isAIExplain,
|
|
1591
|
-
onClick:
|
|
1592
|
-
}, null, 8, ["isLoading", "isFilled"])) :
|
|
1593
|
-
!e.isServiceUnavailable && n.isFavoriteFeatureEnabled ? (g(), V(
|
|
1679
|
+
onClick: a[2] || (a[2] = (r) => o("aiExplain"))
|
|
1680
|
+
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1681
|
+
!e.isServiceUnavailable && n.isFavoriteFeatureEnabled ? (g(), V(Gn, {
|
|
1594
1682
|
key: 2,
|
|
1595
1683
|
isFilled: n.isFavorite,
|
|
1596
|
-
onClick:
|
|
1684
|
+
onClick: a[3] || (a[3] = (r) => o("favorite")),
|
|
1597
1685
|
disabled: e.isAITranslationLoading || e.isAIExplainLoading
|
|
1598
|
-
}, null, 8, ["isFilled", "disabled"])) :
|
|
1686
|
+
}, null, 8, ["isFilled", "disabled"])) : M("", !0)
|
|
1599
1687
|
]),
|
|
1600
|
-
|
|
1601
|
-
e.showThemeSelector ? (g(), V(
|
|
1688
|
+
w("div", Zo, [
|
|
1689
|
+
e.showThemeSelector ? (g(), V(No, {
|
|
1602
1690
|
key: 0,
|
|
1603
1691
|
"current-theme": e.theme,
|
|
1604
|
-
onThemeChange:
|
|
1605
|
-
}, null, 8, ["current-theme"])) :
|
|
1606
|
-
|
|
1607
|
-
onClick:
|
|
1692
|
+
onThemeChange: a[4] || (a[4] = (r) => o("themeChange", r))
|
|
1693
|
+
}, null, 8, ["current-theme"])) : M("", !0),
|
|
1694
|
+
N(To, {
|
|
1695
|
+
onClick: a[5] || (a[5] = (r) => o("setting"))
|
|
1608
1696
|
}),
|
|
1609
|
-
|
|
1610
|
-
onClick:
|
|
1697
|
+
N(Io, {
|
|
1698
|
+
onClick: a[6] || (a[6] = (r) => o("close"))
|
|
1611
1699
|
})
|
|
1612
1700
|
])
|
|
1613
|
-
])
|
|
1701
|
+
], 32)
|
|
1614
1702
|
]));
|
|
1615
1703
|
}
|
|
1616
|
-
},
|
|
1704
|
+
}, de = {
|
|
1617
1705
|
LOGO: "LOGO",
|
|
1618
1706
|
LOADING: "LOADING",
|
|
1619
1707
|
DATA: "DATA",
|
|
1620
1708
|
ERROR: "ERROR",
|
|
1621
1709
|
HIDDEN: "HIDDEN"
|
|
1622
|
-
},
|
|
1710
|
+
}, Ke = 500, jo = ["ar", "fa", "iw", "yi", "ur", "pa"], Ko = {
|
|
1623
1711
|
key: 0,
|
|
1624
1712
|
class: "flex justify-center"
|
|
1625
|
-
},
|
|
1713
|
+
}, Xo = {
|
|
1626
1714
|
key: 1,
|
|
1627
1715
|
class: "flex justify-center"
|
|
1628
|
-
},
|
|
1716
|
+
}, Yo = {
|
|
1629
1717
|
class: /* @__PURE__ */ k(["bg-base-100 rounded-md relative z-10"])
|
|
1630
|
-
},
|
|
1718
|
+
}, Go = { class: "p-3 border-t border-base-300" }, qo = {
|
|
1631
1719
|
name: "Bubble",
|
|
1632
1720
|
props: [
|
|
1633
1721
|
"translation",
|
|
@@ -1650,7 +1738,9 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
|
|
|
1650
1738
|
"loadTTS",
|
|
1651
1739
|
"aiTranslate",
|
|
1652
1740
|
"aiExplain",
|
|
1653
|
-
"
|
|
1741
|
+
"learn",
|
|
1742
|
+
"themeChange",
|
|
1743
|
+
"dragStart"
|
|
1654
1744
|
],
|
|
1655
1745
|
data() {
|
|
1656
1746
|
return {
|
|
@@ -1661,12 +1751,34 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
|
|
|
1661
1751
|
isAIExplainLoading: !1
|
|
1662
1752
|
};
|
|
1663
1753
|
},
|
|
1754
|
+
computed: {
|
|
1755
|
+
showAIPrompt() {
|
|
1756
|
+
var e, t, n;
|
|
1757
|
+
return !this.isAITranslate && !this.isServiceUnavailable && ((t = (e = this.data) == null ? void 0 : e.dictionary) == null ? void 0 : t.length) === 0 && !!((n = this.data) != null && n.result);
|
|
1758
|
+
},
|
|
1759
|
+
showAIExplainPrompt() {
|
|
1760
|
+
var e, t, n, o, i;
|
|
1761
|
+
return !this.isAIExplain && !this.isServiceUnavailable && ((t = (e = this.data) == null ? void 0 : e.dictionary) == null ? void 0 : t.length) === 0 && !!((n = this.data) != null && n.result) && ((i = (o = this.data) == null ? void 0 : o.text) == null ? void 0 : i.length) >= this.aiExplainMinLength;
|
|
1762
|
+
},
|
|
1763
|
+
showLearnPrompt() {
|
|
1764
|
+
var e;
|
|
1765
|
+
return this.isFavorite && !this.isServiceUnavailable && !!((e = this.data) != null && e.result);
|
|
1766
|
+
}
|
|
1767
|
+
},
|
|
1664
1768
|
methods: {
|
|
1665
1769
|
handleAITranslate() {
|
|
1666
1770
|
this.isAITranslationLoading = !0, this.$emit("aiTranslate");
|
|
1667
1771
|
},
|
|
1668
1772
|
handleAIExplain() {
|
|
1669
1773
|
this.isAIExplainLoading = !0, this.$emit("aiExplain");
|
|
1774
|
+
},
|
|
1775
|
+
handleLearn() {
|
|
1776
|
+
var e, t, n;
|
|
1777
|
+
this.$emit("learn", {
|
|
1778
|
+
word: (e = this.data) == null ? void 0 : e.text,
|
|
1779
|
+
translation: (t = this.data) == null ? void 0 : t.result,
|
|
1780
|
+
dictionary: (n = this.data) == null ? void 0 : n.dictionary
|
|
1781
|
+
});
|
|
1670
1782
|
}
|
|
1671
1783
|
},
|
|
1672
1784
|
watch: {
|
|
@@ -1690,20 +1802,20 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
|
|
|
1690
1802
|
immediate: !0
|
|
1691
1803
|
},
|
|
1692
1804
|
status() {
|
|
1693
|
-
this.status ===
|
|
1805
|
+
this.status === de.ERROR && (this.isServiceUnavailable = !0);
|
|
1694
1806
|
}
|
|
1695
1807
|
}
|
|
1696
|
-
},
|
|
1808
|
+
}, Jo = /* @__PURE__ */ Object.assign(qo, {
|
|
1697
1809
|
setup(e) {
|
|
1698
1810
|
return (t, n) => {
|
|
1699
|
-
var o, i, s,
|
|
1700
|
-
return e.status ===
|
|
1701
|
-
|
|
1702
|
-
onClick: n[0] || (n[0] = (
|
|
1811
|
+
var o, i, l, s, a, r, c, d, u, h, m;
|
|
1812
|
+
return e.status === be(de).LOGO ? (g(), C("div", Ko, [
|
|
1813
|
+
N(nn, {
|
|
1814
|
+
onClick: n[0] || (n[0] = (f) => t.$emit("logo"))
|
|
1703
1815
|
})
|
|
1704
|
-
])) : e.status ===
|
|
1705
|
-
|
|
1706
|
-
])) : e.status !==
|
|
1816
|
+
])) : e.status === be(de).LOADING ? (g(), C("div", Xo, [
|
|
1817
|
+
N(fn)
|
|
1818
|
+
])) : e.status !== be(de).HIDDEN ? (g(), C("div", {
|
|
1707
1819
|
key: 2,
|
|
1708
1820
|
class: k([
|
|
1709
1821
|
"wrapper rounded-lg text-base-content text-sm shadow-lg relative bg-[length:300%_300%] bg-[position:0%_50%]",
|
|
@@ -1713,70 +1825,85 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
|
|
|
1713
1825
|
}
|
|
1714
1826
|
])
|
|
1715
1827
|
}, [
|
|
1716
|
-
|
|
1717
|
-
t.isServiceUnavailable ? (g(), V(
|
|
1828
|
+
w("div", Yo, [
|
|
1829
|
+
t.isServiceUnavailable ? (g(), V(je, {
|
|
1718
1830
|
key: 0,
|
|
1719
1831
|
isServiceUnavailable: t.isServiceUnavailable,
|
|
1720
1832
|
isLongSentence: !1,
|
|
1721
1833
|
theme: e.theme,
|
|
1722
1834
|
showThemeSelector: e.showThemeSelector,
|
|
1723
|
-
onFavorite: n[1] || (n[1] = (
|
|
1724
|
-
onSetting: n[2] || (n[2] = (
|
|
1725
|
-
onClose: n[3] || (n[3] = (
|
|
1726
|
-
onLoadTTS: n[4] || (n[4] = (
|
|
1727
|
-
onThemeChange: n[5] || (n[5] = (
|
|
1728
|
-
}, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector"])) : (g(), V(
|
|
1835
|
+
onFavorite: n[1] || (n[1] = (f) => t.$emit("favorite")),
|
|
1836
|
+
onSetting: n[2] || (n[2] = (f) => t.$emit("settings")),
|
|
1837
|
+
onClose: n[3] || (n[3] = (f) => t.$emit("close")),
|
|
1838
|
+
onLoadTTS: n[4] || (n[4] = (f) => t.$emit("loadTTS")),
|
|
1839
|
+
onThemeChange: n[5] || (n[5] = (f) => t.$emit("themeChange", f))
|
|
1840
|
+
}, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector"])) : (g(), V(je, {
|
|
1729
1841
|
key: 1,
|
|
1730
1842
|
tts: e.tts,
|
|
1731
1843
|
isFavorite: e.isFavorite,
|
|
1732
1844
|
isAITranslate: e.isAITranslate,
|
|
1733
1845
|
isAITranslateVisible: ((i = (o = t.data) == null ? void 0 : o.dictionary) == null ? void 0 : i.length) === 0,
|
|
1734
1846
|
isAIExplain: e.isAIExplain,
|
|
1735
|
-
isAIExplainVisible: ((
|
|
1847
|
+
isAIExplainVisible: ((s = (l = t.data) == null ? void 0 : l.text) == null ? void 0 : s.length) >= e.aiExplainMinLength,
|
|
1736
1848
|
isAITranslationLoading: t.isAITranslationLoading,
|
|
1737
1849
|
isAIExplainLoading: t.isAIExplainLoading,
|
|
1738
1850
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
1739
1851
|
isLongSentence: t.isLongSentence,
|
|
1740
1852
|
theme: e.theme,
|
|
1741
1853
|
showThemeSelector: e.showThemeSelector,
|
|
1742
|
-
onFavorite: n[6] || (n[6] = (
|
|
1743
|
-
onSetting: n[7] || (n[7] = (
|
|
1744
|
-
onClose: n[8] || (n[8] = (
|
|
1745
|
-
onLoadTTS: n[9] || (n[9] = (
|
|
1854
|
+
onFavorite: n[6] || (n[6] = (f) => t.$emit("favorite")),
|
|
1855
|
+
onSetting: n[7] || (n[7] = (f) => t.$emit("settings")),
|
|
1856
|
+
onClose: n[8] || (n[8] = (f) => t.$emit("close")),
|
|
1857
|
+
onLoadTTS: n[9] || (n[9] = (f) => t.$emit("loadTTS")),
|
|
1746
1858
|
onAiTranslate: t.handleAITranslate,
|
|
1747
1859
|
onAiExplain: t.handleAIExplain,
|
|
1748
|
-
onThemeChange: n[10] || (n[10] = (
|
|
1860
|
+
onThemeChange: n[10] || (n[10] = (f) => t.$emit("themeChange", f)),
|
|
1861
|
+
onDragStart: n[11] || (n[11] = (f) => t.$emit("dragStart", f))
|
|
1749
1862
|
}, null, 8, ["tts", "isFavorite", "isAITranslate", "isAITranslateVisible", "isAIExplain", "isAIExplainVisible", "isAITranslationLoading", "isAIExplainLoading", "isFavoriteFeatureEnabled", "isLongSentence", "theme", "showThemeSelector", "onAiTranslate", "onAiExplain"])),
|
|
1750
|
-
|
|
1751
|
-
(
|
|
1863
|
+
w("div", Go, [
|
|
1864
|
+
(r = (a = t.data) == null ? void 0 : a.phonetic) != null && r.src ? (g(), V(Cn, {
|
|
1752
1865
|
key: 0,
|
|
1753
|
-
phonetic: (
|
|
1754
|
-
}, null, 8, ["phonetic"])) :
|
|
1755
|
-
|
|
1756
|
-
sentences: t.isServiceUnavailable ? "Service Unavailable" : (
|
|
1757
|
-
}, null, 8, ["sentences"])
|
|
1866
|
+
phonetic: (d = (c = t.data) == null ? void 0 : c.phonetic) == null ? void 0 : d.src
|
|
1867
|
+
}, null, 8, ["phonetic"])) : M("", !0),
|
|
1868
|
+
N(bn, {
|
|
1869
|
+
sentences: t.isServiceUnavailable ? "Service Unavailable" : (u = t.data) == null ? void 0 : u.result
|
|
1870
|
+
}, null, 8, ["sentences"]),
|
|
1871
|
+
N(xn, {
|
|
1872
|
+
show: t.showAIPrompt,
|
|
1873
|
+
isLoading: t.isAITranslationLoading,
|
|
1874
|
+
onClick: t.handleAITranslate
|
|
1875
|
+
}, null, 8, ["show", "isLoading", "onClick"]),
|
|
1876
|
+
N(Tn, {
|
|
1877
|
+
show: t.showAIExplainPrompt,
|
|
1878
|
+
isLoading: t.isAIExplainLoading,
|
|
1879
|
+
onClick: t.handleAIExplain
|
|
1880
|
+
}, null, 8, ["show", "isLoading", "onClick"]),
|
|
1881
|
+
N($n, {
|
|
1882
|
+
show: t.showLearnPrompt,
|
|
1883
|
+
onClick: t.handleLearn
|
|
1884
|
+
}, null, 8, ["show", "onClick"])
|
|
1758
1885
|
]),
|
|
1759
|
-
!t.isServiceUnavailable && ((
|
|
1886
|
+
!t.isServiceUnavailable && ((m = (h = t.data) == null ? void 0 : h.dictionary) == null ? void 0 : m.length) > 0 ? (g(), V(In, {
|
|
1760
1887
|
key: 2,
|
|
1761
1888
|
class: "p-3 pt-0 border-t border-base-300",
|
|
1762
1889
|
dictionary: t.data.dictionary
|
|
1763
|
-
}, null, 8, ["dictionary"])) :
|
|
1764
|
-
!t.isServiceUnavailable && e.isAIExplain && e.explanation ? (g(), V(
|
|
1890
|
+
}, null, 8, ["dictionary"])) : M("", !0),
|
|
1891
|
+
!t.isServiceUnavailable && e.isAIExplain && e.explanation ? (g(), V(Dn, {
|
|
1765
1892
|
key: 3,
|
|
1766
1893
|
class: "p-3 pt-0 border-t border-base-300",
|
|
1767
1894
|
explanation: e.explanation
|
|
1768
|
-
}, null, 8, ["explanation"])) :
|
|
1895
|
+
}, null, 8, ["explanation"])) : M("", !0)
|
|
1769
1896
|
])
|
|
1770
|
-
], 2)) :
|
|
1897
|
+
], 2)) : M("", !0);
|
|
1771
1898
|
};
|
|
1772
1899
|
}
|
|
1773
1900
|
});
|
|
1774
|
-
function
|
|
1901
|
+
function Qo(e) {
|
|
1775
1902
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1776
1903
|
}
|
|
1777
|
-
var
|
|
1778
|
-
function
|
|
1779
|
-
return
|
|
1904
|
+
var Ee = { exports: {} }, Xe;
|
|
1905
|
+
function ei() {
|
|
1906
|
+
return Xe || (Xe = 1, function(e) {
|
|
1780
1907
|
(function() {
|
|
1781
1908
|
var t = [
|
|
1782
1909
|
"direction",
|
|
@@ -1816,61 +1943,61 @@ function jo() {
|
|
|
1816
1943
|
"tabSize",
|
|
1817
1944
|
"MozTabSize"
|
|
1818
1945
|
], n = typeof window < "u", o = n && window.mozInnerScreenX != null;
|
|
1819
|
-
function i(
|
|
1946
|
+
function i(l, s, a) {
|
|
1820
1947
|
if (!n)
|
|
1821
1948
|
throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");
|
|
1822
|
-
var
|
|
1823
|
-
if (
|
|
1949
|
+
var r = a && a.debug || !1;
|
|
1950
|
+
if (r) {
|
|
1824
1951
|
var c = document.querySelector("#input-textarea-caret-position-mirror-div");
|
|
1825
1952
|
c && c.parentNode.removeChild(c);
|
|
1826
1953
|
}
|
|
1827
|
-
var
|
|
1828
|
-
|
|
1829
|
-
var
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
}), o ?
|
|
1833
|
-
var
|
|
1834
|
-
|
|
1954
|
+
var d = document.createElement("div");
|
|
1955
|
+
d.id = "input-textarea-caret-position-mirror-div", document.body.appendChild(d);
|
|
1956
|
+
var u = d.style, h = window.getComputedStyle ? window.getComputedStyle(l) : l.currentStyle, m = l.nodeName === "INPUT";
|
|
1957
|
+
u.whiteSpace = "pre-wrap", m || (u.wordWrap = "break-word"), u.position = "absolute", r || (u.visibility = "hidden"), t.forEach(function(x) {
|
|
1958
|
+
m && x === "lineHeight" ? u.lineHeight = h.height : u[x] = h[x];
|
|
1959
|
+
}), o ? l.scrollHeight > parseInt(h.height) && (u.overflowY = "scroll") : u.overflow = "hidden", d.textContent = l.value.substring(0, s), m && (d.textContent = d.textContent.replace(/\s/g, " "));
|
|
1960
|
+
var f = document.createElement("span");
|
|
1961
|
+
f.textContent = l.value.substring(s) || ".", d.appendChild(f);
|
|
1835
1962
|
var v = {
|
|
1836
|
-
top:
|
|
1837
|
-
left:
|
|
1963
|
+
top: f.offsetTop + parseInt(h.borderTopWidth),
|
|
1964
|
+
left: f.offsetLeft + parseInt(h.borderLeftWidth),
|
|
1838
1965
|
height: parseInt(h.lineHeight)
|
|
1839
1966
|
};
|
|
1840
|
-
return
|
|
1967
|
+
return r ? f.style.backgroundColor = "#aaa" : document.body.removeChild(d), v;
|
|
1841
1968
|
}
|
|
1842
1969
|
e.exports = i;
|
|
1843
1970
|
})();
|
|
1844
|
-
}(
|
|
1971
|
+
}(Ee)), Ee.exports;
|
|
1845
1972
|
}
|
|
1846
|
-
var
|
|
1847
|
-
const
|
|
1973
|
+
var ti = ei();
|
|
1974
|
+
const Ye = /* @__PURE__ */ Qo(ti);
|
|
1848
1975
|
function ie(e) {
|
|
1849
1976
|
const t = window.getSelection();
|
|
1850
1977
|
let n = t + "";
|
|
1851
1978
|
if (n = n.trim(), e && e.type === "password" || !n.length && (!(e && e.selectionEnd) || (n = e.value.substring(e.selectionStart, e.selectionEnd), n = n.trim(), !n.length)))
|
|
1852
1979
|
return !1;
|
|
1853
|
-
let i = t.getRangeAt(0).getBoundingClientRect(), { top:
|
|
1854
|
-
if (!
|
|
1980
|
+
let i = t.getRangeAt(0).getBoundingClientRect(), { top: l, bottom: s, left: a, width: r, height: c } = i;
|
|
1981
|
+
if (!s && !a) {
|
|
1855
1982
|
if (!e.selectionEnd)
|
|
1856
1983
|
return !1;
|
|
1857
|
-
let
|
|
1858
|
-
i = e.getBoundingClientRect(),
|
|
1984
|
+
let d = Ye(e, e.selectionStart), u = Ye(e, e.selectionEnd);
|
|
1985
|
+
i = e.getBoundingClientRect(), a = i.left + d.left, r = u.left - d.left, d.top != u.top && (a = i.left, r = i.width), l = i.top + d.top, s = i.top + u.top + 20;
|
|
1859
1986
|
}
|
|
1860
|
-
return c === 0 && (c =
|
|
1987
|
+
return c === 0 && (c = s - l), {
|
|
1861
1988
|
text: n,
|
|
1862
1989
|
// position
|
|
1863
|
-
x:
|
|
1864
|
-
y:
|
|
1865
|
-
top:
|
|
1866
|
-
bottom:
|
|
1867
|
-
left:
|
|
1868
|
-
right:
|
|
1869
|
-
width:
|
|
1990
|
+
x: a,
|
|
1991
|
+
y: l,
|
|
1992
|
+
top: l,
|
|
1993
|
+
bottom: s,
|
|
1994
|
+
left: a,
|
|
1995
|
+
right: a + r,
|
|
1996
|
+
width: r,
|
|
1870
1997
|
height: c
|
|
1871
1998
|
};
|
|
1872
1999
|
}
|
|
1873
|
-
function
|
|
2000
|
+
function ni() {
|
|
1874
2001
|
const e = document.getElementsByTagName("ddict-div");
|
|
1875
2002
|
for (let t of e)
|
|
1876
2003
|
if (!t.parentNode.matches('wrapper[dir="rtl"]')) {
|
|
@@ -1878,17 +2005,17 @@ function Xo() {
|
|
|
1878
2005
|
n.setAttribute("dir", "rtl"), t.parentNode.insertBefore(n, t), n.appendChild(t);
|
|
1879
2006
|
}
|
|
1880
2007
|
}
|
|
1881
|
-
function
|
|
2008
|
+
function oi() {
|
|
1882
2009
|
const e = document.querySelectorAll('wrapper[dir="rtl"]');
|
|
1883
2010
|
for (let t of e) {
|
|
1884
2011
|
const n = t.querySelector("ddict-div");
|
|
1885
2012
|
n && (t.parentNode.insertBefore(n, t), t.remove());
|
|
1886
2013
|
}
|
|
1887
2014
|
}
|
|
1888
|
-
const
|
|
1889
|
-
supportRTL:
|
|
1890
|
-
removeRTL:
|
|
1891
|
-
},
|
|
2015
|
+
const Ge = {
|
|
2016
|
+
supportRTL: ni,
|
|
2017
|
+
removeRTL: oi
|
|
2018
|
+
}, ii = {
|
|
1892
2019
|
__name: "HotKeysListener",
|
|
1893
2020
|
props: {
|
|
1894
2021
|
textSelected: String
|
|
@@ -1897,14 +2024,14 @@ const Ye = {
|
|
|
1897
2024
|
setup(e, { emit: t }) {
|
|
1898
2025
|
const n = e, o = t, i = () => {
|
|
1899
2026
|
setTimeout(() => {
|
|
1900
|
-
n.textSelected &&
|
|
2027
|
+
n.textSelected && a("DoubleClick");
|
|
1901
2028
|
}, 50);
|
|
1902
|
-
},
|
|
1903
|
-
(
|
|
1904
|
-
},
|
|
1905
|
-
|
|
1906
|
-
},
|
|
1907
|
-
switch (
|
|
2029
|
+
}, l = (r) => {
|
|
2030
|
+
(r.altKey && r.key.toLowerCase() === "w" || r.key === "∑") && n.textSelected && (a("Alt+W"), r.preventDefault()), r.key === "Escape" && (a("Escape"), r.preventDefault());
|
|
2031
|
+
}, s = (r) => {
|
|
2032
|
+
r.key === "Shift" && n.textSelected && a("Shift");
|
|
2033
|
+
}, a = (r) => {
|
|
2034
|
+
switch (r) {
|
|
1908
2035
|
case "DoubleClick":
|
|
1909
2036
|
o("toggleKey", "DoubleClick");
|
|
1910
2037
|
break;
|
|
@@ -1919,13 +2046,13 @@ const Ye = {
|
|
|
1919
2046
|
break;
|
|
1920
2047
|
}
|
|
1921
2048
|
};
|
|
1922
|
-
return
|
|
1923
|
-
window.addEventListener("dblclick", i), window.addEventListener("keydown",
|
|
1924
|
-
}),
|
|
1925
|
-
window.removeEventListener("dblclick", i), window.removeEventListener("keydown",
|
|
1926
|
-
}), (
|
|
2049
|
+
return qe(() => {
|
|
2050
|
+
window.addEventListener("dblclick", i), window.addEventListener("keydown", l), window.addEventListener("keyup", s);
|
|
2051
|
+
}), Ie(() => {
|
|
2052
|
+
window.removeEventListener("dblclick", i), window.removeEventListener("keydown", l), window.removeEventListener("keyup", s);
|
|
2053
|
+
}), (r, c) => (g(), C("div"));
|
|
1927
2054
|
}
|
|
1928
|
-
},
|
|
2055
|
+
}, si = ["data-theme"], ri = {
|
|
1929
2056
|
__name: "BubbleWrapper",
|
|
1930
2057
|
props: {
|
|
1931
2058
|
translation: Object,
|
|
@@ -1962,154 +2089,152 @@ const Ye = {
|
|
|
1962
2089
|
"loadTTS",
|
|
1963
2090
|
"aiTranslate",
|
|
1964
2091
|
"aiExplain",
|
|
2092
|
+
"learn",
|
|
1965
2093
|
"themeChange"
|
|
1966
2094
|
],
|
|
1967
2095
|
setup(e, { emit: t }) {
|
|
1968
|
-
const n = e, o = t, i =
|
|
1969
|
-
getBoundingClientRect: () => ie(
|
|
1970
|
-
getClientRects: () => ie(
|
|
1971
|
-
}), { floatingStyles:
|
|
2096
|
+
const n = e, o = t, i = I(null), l = I(null), s = I(!1), a = I(""), r = I(n.theme), c = I(!1), d = I({ x: 0, y: 0 }), u = I(null), h = I(!1), m = _(() => typeof window > "u" || !l.value || !a.value ? null : {
|
|
2097
|
+
getBoundingClientRect: () => ie(l.value),
|
|
2098
|
+
getClientRects: () => ie(l.value)
|
|
2099
|
+
}), { floatingStyles: f, update: v } = qt(m, i, {
|
|
1972
2100
|
placement: "bottom",
|
|
1973
2101
|
middleware: [
|
|
1974
|
-
|
|
2102
|
+
Zt(4),
|
|
1975
2103
|
Kt(),
|
|
1976
2104
|
jt(),
|
|
1977
2105
|
Xt({
|
|
1978
|
-
apply({ rects:
|
|
1979
|
-
let
|
|
1980
|
-
|
|
1981
|
-
maxWidth:
|
|
2106
|
+
apply({ rects: b, elements: p }) {
|
|
2107
|
+
let $ = b.reference.width > 250 ? b.reference.width / n.scale : 250;
|
|
2108
|
+
$ > Ke && ($ = Ke), Object.assign(p.floating.style, {
|
|
2109
|
+
maxWidth: $ + "px",
|
|
1982
2110
|
zIndex: 9999
|
|
1983
2111
|
});
|
|
1984
2112
|
}
|
|
1985
2113
|
})
|
|
1986
2114
|
],
|
|
1987
|
-
whileElementsMounted(
|
|
1988
|
-
return
|
|
1989
|
-
ancestorScroll: !0
|
|
2115
|
+
whileElementsMounted(b, p, $) {
|
|
2116
|
+
return Ut(b, p, $, {
|
|
2117
|
+
ancestorScroll: !0,
|
|
2118
|
+
elementResize: !1
|
|
1990
2119
|
});
|
|
1991
2120
|
}
|
|
1992
2121
|
}), x = _(() => {
|
|
1993
|
-
let
|
|
1994
|
-
if (
|
|
1995
|
-
|
|
1996
|
-
...
|
|
2122
|
+
let b = f.value;
|
|
2123
|
+
if (u.value)
|
|
2124
|
+
b = {
|
|
2125
|
+
...b,
|
|
1997
2126
|
position: "fixed",
|
|
1998
|
-
left: `${
|
|
1999
|
-
top: `${
|
|
2127
|
+
left: `${u.value.x}px`,
|
|
2128
|
+
top: `${u.value.y}px`,
|
|
2000
2129
|
transform: "none"
|
|
2001
2130
|
};
|
|
2002
|
-
else if (h.value &&
|
|
2003
|
-
const p = ie(
|
|
2004
|
-
p && (
|
|
2005
|
-
...
|
|
2131
|
+
else if (h.value && l.value && a.value) {
|
|
2132
|
+
const p = ie(l.value);
|
|
2133
|
+
p && (b = {
|
|
2134
|
+
...b,
|
|
2006
2135
|
position: "fixed",
|
|
2007
2136
|
left: `${p.x}px`,
|
|
2008
2137
|
top: `${p.y + p.height + 4}px`,
|
|
2009
2138
|
transform: "none"
|
|
2010
2139
|
});
|
|
2011
2140
|
}
|
|
2012
|
-
return
|
|
2141
|
+
return b;
|
|
2013
2142
|
});
|
|
2014
|
-
|
|
2015
|
-
document.addEventListener("keyup", (
|
|
2016
|
-
if (!ie(
|
|
2017
|
-
|
|
2143
|
+
qe(() => {
|
|
2144
|
+
document.addEventListener("keyup", (b) => {
|
|
2145
|
+
if (!ie(b.target)) {
|
|
2146
|
+
a.value = "", S();
|
|
2018
2147
|
return;
|
|
2019
2148
|
}
|
|
2020
|
-
}), document.documentElement.onclick = (
|
|
2021
|
-
const p = ie(
|
|
2149
|
+
}), document.documentElement.onclick = (b) => {
|
|
2150
|
+
const p = ie(b.target);
|
|
2022
2151
|
if (!p) {
|
|
2023
|
-
|
|
2152
|
+
a.value = "", S();
|
|
2024
2153
|
return;
|
|
2025
2154
|
}
|
|
2026
|
-
|
|
2027
|
-
}, document.documentElement.ontouchend = (
|
|
2028
|
-
const p = ie(
|
|
2155
|
+
y(p, b);
|
|
2156
|
+
}, document.documentElement.ontouchend = (b) => {
|
|
2157
|
+
const p = ie(b.target);
|
|
2029
2158
|
if (!p) {
|
|
2030
|
-
|
|
2159
|
+
a.value = "", S();
|
|
2031
2160
|
return;
|
|
2032
2161
|
}
|
|
2033
|
-
|
|
2162
|
+
y(p, b);
|
|
2034
2163
|
};
|
|
2035
|
-
}),
|
|
2036
|
-
document.documentElement.onclick = null, document.documentElement.ontouchend = null, document.removeEventListener("mousemove",
|
|
2164
|
+
}), Ie(() => {
|
|
2165
|
+
document.documentElement.onclick = null, document.documentElement.ontouchend = null, document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", F), document.removeEventListener("touchmove", T), document.removeEventListener("touchend", R);
|
|
2037
2166
|
});
|
|
2038
|
-
const
|
|
2039
|
-
n.status !==
|
|
2040
|
-
}, L = (
|
|
2041
|
-
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2044
|
-
},
|
|
2045
|
-
|
|
2046
|
-
},
|
|
2047
|
-
if (C.target.closest('button, input, select, textarea, [role="button"]')) return;
|
|
2048
|
-
c.value = !0;
|
|
2049
|
-
const p = i.value.getBoundingClientRect();
|
|
2050
|
-
u.value = {
|
|
2051
|
-
x: C.clientX - p.left,
|
|
2052
|
-
y: C.clientY - p.top
|
|
2053
|
-
}, document.addEventListener("mousemove", S), document.addEventListener("mouseup", B), C.preventDefault();
|
|
2054
|
-
}, M = (C) => {
|
|
2055
|
-
if (C.target.closest('button, input, select, textarea, [role="button"]')) return;
|
|
2167
|
+
const y = (b, p) => {
|
|
2168
|
+
n.status !== de.LOGO && o("close"), s.value && !h.value && (h.value = !0), l.value = p.target, a.value = b.text, s.value = !0, Ve(v);
|
|
2169
|
+
}, L = (b) => {
|
|
2170
|
+
b.stopPropagation();
|
|
2171
|
+
}, S = async () => {
|
|
2172
|
+
s.value = !1, u.value = null, h.value = !1, o("close");
|
|
2173
|
+
}, E = (b) => {
|
|
2174
|
+
r.value = b, o("themeChange", b);
|
|
2175
|
+
}, A = ({ type: b, event: p }) => {
|
|
2056
2176
|
c.value = !0;
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2177
|
+
const $ = i.value.getBoundingClientRect();
|
|
2178
|
+
if (b === "mouse")
|
|
2179
|
+
d.value = {
|
|
2180
|
+
x: p.clientX - $.left,
|
|
2181
|
+
y: p.clientY - $.top
|
|
2182
|
+
}, document.addEventListener("mousemove", B), document.addEventListener("mouseup", F);
|
|
2183
|
+
else if (b === "touch") {
|
|
2184
|
+
const P = p.touches[0];
|
|
2185
|
+
d.value = {
|
|
2186
|
+
x: P.clientX - $.left,
|
|
2187
|
+
y: P.clientY - $.top
|
|
2188
|
+
}, document.addEventListener("touchmove", T), document.addEventListener("touchend", R);
|
|
2189
|
+
}
|
|
2190
|
+
}, B = (b) => {
|
|
2191
|
+
c.value && (u.value = {
|
|
2192
|
+
x: b.clientX - d.value.x,
|
|
2193
|
+
y: b.clientY - d.value.y
|
|
2066
2194
|
});
|
|
2067
|
-
},
|
|
2195
|
+
}, T = (b) => {
|
|
2068
2196
|
if (!c.value) return;
|
|
2069
|
-
const p =
|
|
2070
|
-
|
|
2071
|
-
x: p.clientX -
|
|
2072
|
-
y: p.clientY -
|
|
2197
|
+
const p = b.touches[0];
|
|
2198
|
+
u.value = {
|
|
2199
|
+
x: p.clientX - d.value.x,
|
|
2200
|
+
y: p.clientY - d.value.y
|
|
2073
2201
|
};
|
|
2074
|
-
},
|
|
2075
|
-
c.value = !1, document.removeEventListener("mousemove",
|
|
2076
|
-
},
|
|
2077
|
-
c.value = !1, document.removeEventListener("touchmove",
|
|
2078
|
-
},
|
|
2202
|
+
}, F = () => {
|
|
2203
|
+
c.value = !1, document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", F);
|
|
2204
|
+
}, R = () => {
|
|
2205
|
+
c.value = !1, document.removeEventListener("touchmove", T), document.removeEventListener("touchend", R);
|
|
2206
|
+
}, W = () => {
|
|
2079
2207
|
var p;
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2208
|
+
const b = (p = n == null ? void 0 : n.translation) == null ? void 0 : p.target;
|
|
2209
|
+
jo.includes(b) ? Ge.supportRTL() : Ge.removeRTL();
|
|
2082
2210
|
};
|
|
2083
2211
|
return se(
|
|
2084
2212
|
() => n.status,
|
|
2085
2213
|
() => {
|
|
2086
|
-
|
|
2214
|
+
s.value && Ve(v), W();
|
|
2087
2215
|
}
|
|
2088
2216
|
), se(
|
|
2089
2217
|
() => n.theme,
|
|
2090
|
-
(
|
|
2091
|
-
|
|
2218
|
+
(b) => {
|
|
2219
|
+
r.value = b;
|
|
2092
2220
|
}
|
|
2093
|
-
), (
|
|
2094
|
-
|
|
2221
|
+
), (b, p) => (g(), C(he, null, [
|
|
2222
|
+
s.value ? (g(), C("div", {
|
|
2095
2223
|
key: 0,
|
|
2096
2224
|
ref_key: "floatingEl",
|
|
2097
2225
|
ref: i,
|
|
2098
2226
|
style: $e(x.value),
|
|
2099
|
-
onClick: L
|
|
2100
|
-
onMousedown: E,
|
|
2101
|
-
onTouchstart: M
|
|
2227
|
+
onClick: L
|
|
2102
2228
|
}, [
|
|
2103
|
-
|
|
2229
|
+
w("div", {
|
|
2104
2230
|
class: "rounded-lg",
|
|
2105
2231
|
style: $e({
|
|
2106
2232
|
transform: n.scale !== 1 ? `scale(${n.scale})` : "none",
|
|
2107
|
-
transformOrigin: "top left"
|
|
2108
|
-
cursor: c.value ? "grabbing" : "grab"
|
|
2233
|
+
transformOrigin: "top left"
|
|
2109
2234
|
}),
|
|
2110
|
-
"data-theme":
|
|
2235
|
+
"data-theme": r.value
|
|
2111
2236
|
}, [
|
|
2112
|
-
|
|
2237
|
+
N(Jo, {
|
|
2113
2238
|
translation: n.translation,
|
|
2114
2239
|
explanation: n.explanation,
|
|
2115
2240
|
tts: n.tts,
|
|
@@ -2119,27 +2244,29 @@ const Ye = {
|
|
|
2119
2244
|
isAITranslate: n.isAITranslate,
|
|
2120
2245
|
isAIExplain: n.isAIExplain,
|
|
2121
2246
|
aiExplainMinLength: n.aiExplainMinLength,
|
|
2122
|
-
theme:
|
|
2247
|
+
theme: r.value,
|
|
2123
2248
|
showThemeSelector: n.showThemeSelector,
|
|
2124
|
-
onLogo: p[0] || (p[0] = (
|
|
2125
|
-
onFavorite: p[1] || (p[1] = (
|
|
2126
|
-
onSettings: p[2] || (p[2] = (
|
|
2127
|
-
onClose:
|
|
2128
|
-
onLoadTTS: p[3] || (p[3] = (
|
|
2129
|
-
onAiTranslate: p[4] || (p[4] = (
|
|
2130
|
-
onAiExplain: p[5] || (p[5] = (
|
|
2131
|
-
|
|
2249
|
+
onLogo: p[0] || (p[0] = ($) => o("logo")),
|
|
2250
|
+
onFavorite: p[1] || (p[1] = ($) => o("favorite")),
|
|
2251
|
+
onSettings: p[2] || (p[2] = ($) => o("settings")),
|
|
2252
|
+
onClose: S,
|
|
2253
|
+
onLoadTTS: p[3] || (p[3] = ($) => o("loadTTS")),
|
|
2254
|
+
onAiTranslate: p[4] || (p[4] = ($) => o("aiTranslate")),
|
|
2255
|
+
onAiExplain: p[5] || (p[5] = ($) => o("aiExplain")),
|
|
2256
|
+
onLearn: p[6] || (p[6] = ($) => o("learn", $)),
|
|
2257
|
+
onThemeChange: E,
|
|
2258
|
+
onDragStart: A
|
|
2132
2259
|
}, null, 8, ["translation", "explanation", "tts", "status", "isFavorite", "isFavoriteFeatureEnabled", "isAITranslate", "isAIExplain", "aiExplainMinLength", "theme", "showThemeSelector"])
|
|
2133
|
-
], 12,
|
|
2134
|
-
],
|
|
2135
|
-
|
|
2136
|
-
textSelected:
|
|
2137
|
-
onToggleKey: p[
|
|
2138
|
-
onClose:
|
|
2260
|
+
], 12, si)
|
|
2261
|
+
], 4)) : M("", !0),
|
|
2262
|
+
N(ii, {
|
|
2263
|
+
textSelected: a.value,
|
|
2264
|
+
onToggleKey: p[7] || (p[7] = ($) => o("toggleKey", $)),
|
|
2265
|
+
onClose: S
|
|
2139
2266
|
}, null, 8, ["textSelected"])
|
|
2140
2267
|
], 64));
|
|
2141
2268
|
}
|
|
2142
2269
|
};
|
|
2143
2270
|
export {
|
|
2144
|
-
|
|
2271
|
+
ri as default
|
|
2145
2272
|
};
|