@ddict/bubble 1.3.4 → 1.3.6
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 +1028 -890
- package/dist/bubble.umd.js +3 -3
- package/package.json +8 -11
package/dist/bubble.es.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
const
|
|
1
|
+
import { computed as B, ref as R, shallowRef as $t, watch as ae, getCurrentScope as At, onScopeDispose as kt, shallowReadonly as se, unref as Te, createElementBlock as b, openBlock as v, createStaticVNode as He, createElementVNode as w, createVNode as P, toDisplayString as pe, Fragment as de, renderList as Ce, createCommentVNode as M, normalizeClass as k, createTextVNode as ve, onUnmounted as Ue, createBlock as V, normalizeStyle as Ve, withModifiers as Rt, onMounted as lt, nextTick as Ke } from "vue";
|
|
2
|
+
const $e = Math.min, J = Math.max, Ae = Math.round, Se = Math.floor, G = (e) => ({
|
|
3
3
|
x: e,
|
|
4
4
|
y: e
|
|
5
|
-
}),
|
|
5
|
+
}), Bt = {
|
|
6
6
|
left: "right",
|
|
7
7
|
right: "left",
|
|
8
8
|
bottom: "top",
|
|
9
9
|
top: "bottom"
|
|
10
|
-
},
|
|
10
|
+
}, It = {
|
|
11
11
|
start: "end",
|
|
12
12
|
end: "start"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function qe(e, t, n) {
|
|
15
|
+
return J(e, $e(t, n));
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Be(e, t) {
|
|
18
18
|
return typeof e == "function" ? e(t) : e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function ee(e) {
|
|
21
21
|
return e.split("-")[0];
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Ie(e) {
|
|
24
24
|
return e.split("-")[1];
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function ct(e) {
|
|
27
27
|
return e === "x" ? "y" : "x";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ut(e) {
|
|
30
30
|
return e === "y" ? "height" : "width";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return ["top", "bottom"].includes(
|
|
32
|
+
function ce(e) {
|
|
33
|
+
return ["top", "bottom"].includes(ee(e)) ? "y" : "x";
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function dt(e) {
|
|
36
|
+
return ct(ce(e));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Mt(e, t, n) {
|
|
39
39
|
n === void 0 && (n = !1);
|
|
40
|
-
const o =
|
|
40
|
+
const o = Ie(e), i = dt(e), r = ut(i);
|
|
41
41
|
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
42
|
-
return t.reference[
|
|
42
|
+
return t.reference[r] > t.floating[r] && (s = ke(s)), [s, ke(s)];
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const t =
|
|
46
|
-
return [
|
|
44
|
+
function Dt(e) {
|
|
45
|
+
const t = ke(e);
|
|
46
|
+
return [Ne(e), t, Ne(t)];
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return e.replace(/start|end/g, (t) =>
|
|
48
|
+
function Ne(e) {
|
|
49
|
+
return e.replace(/start|end/g, (t) => It[t]);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const o = ["left", "right"], i = ["right", "left"],
|
|
51
|
+
function Ot(e, t, n) {
|
|
52
|
+
const o = ["left", "right"], i = ["right", "left"], r = ["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 ? r : s;
|
|
60
60
|
default:
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const i =
|
|
66
|
-
let
|
|
67
|
-
return i && (
|
|
64
|
+
function Ft(e, t, n, o) {
|
|
65
|
+
const i = Ie(e);
|
|
66
|
+
let r = Ot(ee(e), n === "start", o);
|
|
67
|
+
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(Ne)))), r;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
69
|
+
function ke(e) {
|
|
70
|
+
return e.replace(/left|right|bottom|top/g, (t) => Bt[t]);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function zt(e) {
|
|
73
73
|
return {
|
|
74
74
|
top: 0,
|
|
75
75
|
right: 0,
|
|
@@ -78,15 +78,15 @@ function bt(e) {
|
|
|
78
78
|
...e
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return typeof e != "number" ?
|
|
81
|
+
function _t(e) {
|
|
82
|
+
return typeof e != "number" ? zt(e) : {
|
|
83
83
|
top: e,
|
|
84
84
|
right: e,
|
|
85
85
|
bottom: e,
|
|
86
86
|
left: e
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Re(e) {
|
|
90
90
|
const {
|
|
91
91
|
x: t,
|
|
92
92
|
y: n,
|
|
@@ -104,36 +104,36 @@ function xe(e) {
|
|
|
104
104
|
y: n
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Je(e, t, n) {
|
|
108
108
|
let {
|
|
109
109
|
reference: o,
|
|
110
110
|
floating: i
|
|
111
111
|
} = e;
|
|
112
|
-
const
|
|
112
|
+
const r = ce(t), s = dt(t), a = ut(s), l = ee(t), c = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
|
|
113
113
|
let m;
|
|
114
|
-
switch (
|
|
114
|
+
switch (l) {
|
|
115
115
|
case "top":
|
|
116
116
|
m = {
|
|
117
|
-
x:
|
|
117
|
+
x: u,
|
|
118
118
|
y: o.y - i.height
|
|
119
119
|
};
|
|
120
120
|
break;
|
|
121
121
|
case "bottom":
|
|
122
122
|
m = {
|
|
123
|
-
x:
|
|
123
|
+
x: u,
|
|
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: d
|
|
131
131
|
};
|
|
132
132
|
break;
|
|
133
133
|
case "left":
|
|
134
134
|
m = {
|
|
135
135
|
x: o.x - i.width,
|
|
136
|
-
y:
|
|
136
|
+
y: d
|
|
137
137
|
};
|
|
138
138
|
break;
|
|
139
139
|
default:
|
|
@@ -142,7 +142,7 @@ function Ne(e, t, n) {
|
|
|
142
142
|
y: o.y
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
switch (
|
|
145
|
+
switch (Ie(t)) {
|
|
146
146
|
case "start":
|
|
147
147
|
m[s] -= h * (n && c ? -1 : 1);
|
|
148
148
|
break;
|
|
@@ -152,33 +152,33 @@ function Ne(e, t, n) {
|
|
|
152
152
|
}
|
|
153
153
|
return m;
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const Pt = async (e, t, n) => {
|
|
156
156
|
const {
|
|
157
157
|
placement: o = "bottom",
|
|
158
158
|
strategy: i = "absolute",
|
|
159
|
-
middleware:
|
|
159
|
+
middleware: r = [],
|
|
160
160
|
platform: s
|
|
161
|
-
} = n, a =
|
|
161
|
+
} = n, a = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
162
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
|
-
} =
|
|
170
|
-
for (let
|
|
167
|
+
x: u,
|
|
168
|
+
y: d
|
|
169
|
+
} = Je(c, o, l), h = o, m = {}, f = 0;
|
|
170
|
+
for (let g = 0; g < a.length; g++) {
|
|
171
171
|
const {
|
|
172
|
-
name:
|
|
173
|
-
fn:
|
|
174
|
-
} = a[
|
|
172
|
+
name: y,
|
|
173
|
+
fn: x
|
|
174
|
+
} = a[g], {
|
|
175
175
|
x: L,
|
|
176
176
|
y: S,
|
|
177
|
-
data:
|
|
178
|
-
reset:
|
|
179
|
-
} = await
|
|
180
|
-
x:
|
|
181
|
-
y:
|
|
177
|
+
data: $,
|
|
178
|
+
reset: T
|
|
179
|
+
} = await x({
|
|
180
|
+
x: u,
|
|
181
|
+
y: d,
|
|
182
182
|
initialPlacement: o,
|
|
183
183
|
placement: h,
|
|
184
184
|
strategy: i,
|
|
@@ -190,75 +190,75 @@ const yt = async (e, t, n) => {
|
|
|
190
190
|
floating: t
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
|
|
193
|
+
u = L ?? u, d = S ?? d, m = {
|
|
194
194
|
...m,
|
|
195
|
-
[
|
|
196
|
-
...m[
|
|
197
|
-
|
|
195
|
+
[y]: {
|
|
196
|
+
...m[y],
|
|
197
|
+
...$
|
|
198
198
|
}
|
|
199
|
-
},
|
|
199
|
+
}, T && f <= 50 && (f++, typeof T == "object" && (T.placement && (h = T.placement), T.rects && (c = T.rects === !0 ? await s.getElementRects({
|
|
200
200
|
reference: e,
|
|
201
201
|
floating: t,
|
|
202
202
|
strategy: i
|
|
203
|
-
}) :
|
|
204
|
-
x:
|
|
205
|
-
y:
|
|
206
|
-
} =
|
|
203
|
+
}) : T.rects), {
|
|
204
|
+
x: u,
|
|
205
|
+
y: d
|
|
206
|
+
} = Je(c, h, l)), g = -1);
|
|
207
207
|
}
|
|
208
208
|
return {
|
|
209
|
-
x:
|
|
210
|
-
y:
|
|
209
|
+
x: u,
|
|
210
|
+
y: d,
|
|
211
211
|
placement: h,
|
|
212
212
|
strategy: i,
|
|
213
213
|
middlewareData: m
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
-
async function
|
|
216
|
+
async function ft(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:
|
|
222
|
+
platform: r,
|
|
223
223
|
rects: s,
|
|
224
224
|
elements: a,
|
|
225
|
-
strategy:
|
|
225
|
+
strategy: l
|
|
226
226
|
} = e, {
|
|
227
227
|
boundary: c = "clippingAncestors",
|
|
228
|
-
rootBoundary:
|
|
229
|
-
elementContext:
|
|
228
|
+
rootBoundary: u = "viewport",
|
|
229
|
+
elementContext: d = "floating",
|
|
230
230
|
altBoundary: h = !1,
|
|
231
231
|
padding: m = 0
|
|
232
|
-
} =
|
|
233
|
-
element: (n = await (
|
|
232
|
+
} = Be(t, e), f = _t(m), y = a[h ? d === "floating" ? "reference" : "floating" : d], x = Re(await r.getClippingRect({
|
|
233
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(y))) == null || n ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
234
234
|
boundary: c,
|
|
235
|
-
rootBoundary:
|
|
236
|
-
strategy:
|
|
237
|
-
})), L =
|
|
235
|
+
rootBoundary: u,
|
|
236
|
+
strategy: l
|
|
237
|
+
})), L = d === "floating" ? {
|
|
238
238
|
x: o,
|
|
239
239
|
y: i,
|
|
240
240
|
width: s.floating.width,
|
|
241
241
|
height: s.floating.height
|
|
242
|
-
} : s.reference, S = await (
|
|
242
|
+
} : s.reference, S = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), $ = await (r.isElement == null ? void 0 : r.isElement(S)) ? await (r.getScale == null ? void 0 : r.getScale(S)) || {
|
|
243
243
|
x: 1,
|
|
244
244
|
y: 1
|
|
245
245
|
} : {
|
|
246
246
|
x: 1,
|
|
247
247
|
y: 1
|
|
248
|
-
},
|
|
248
|
+
}, T = Re(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
249
249
|
elements: a,
|
|
250
250
|
rect: L,
|
|
251
251
|
offsetParent: S,
|
|
252
|
-
strategy:
|
|
252
|
+
strategy: l
|
|
253
253
|
}) : L);
|
|
254
254
|
return {
|
|
255
|
-
top: (
|
|
256
|
-
bottom: (
|
|
257
|
-
left: (
|
|
258
|
-
right: (
|
|
255
|
+
top: (x.top - T.top + f.top) / $.y,
|
|
256
|
+
bottom: (T.bottom - x.bottom + f.bottom) / $.y,
|
|
257
|
+
left: (x.left - T.left + f.left) / $.x,
|
|
258
|
+
right: (T.right - x.right + f.right) / $.x
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const Vt = function(e) {
|
|
262
262
|
return e === void 0 && (e = {}), {
|
|
263
263
|
name: "flip",
|
|
264
264
|
options: e,
|
|
@@ -266,71 +266,71 @@ const xt = function(e) {
|
|
|
266
266
|
var n, o;
|
|
267
267
|
const {
|
|
268
268
|
placement: i,
|
|
269
|
-
middlewareData:
|
|
269
|
+
middlewareData: r,
|
|
270
270
|
rects: s,
|
|
271
271
|
initialPlacement: a,
|
|
272
|
-
platform:
|
|
272
|
+
platform: l,
|
|
273
273
|
elements: c
|
|
274
274
|
} = t, {
|
|
275
|
-
mainAxis:
|
|
276
|
-
crossAxis:
|
|
275
|
+
mainAxis: u = !0,
|
|
276
|
+
crossAxis: d = !0,
|
|
277
277
|
fallbackPlacements: h,
|
|
278
278
|
fallbackStrategy: m = "bestFit",
|
|
279
279
|
fallbackAxisSideDirection: f = "none",
|
|
280
|
-
flipAlignment:
|
|
281
|
-
...
|
|
282
|
-
} =
|
|
283
|
-
if ((n =
|
|
280
|
+
flipAlignment: g = !0,
|
|
281
|
+
...y
|
|
282
|
+
} = Be(e, t);
|
|
283
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
284
284
|
return {};
|
|
285
|
-
const
|
|
286
|
-
!h &&
|
|
287
|
-
const
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
|
|
285
|
+
const x = ee(i), L = ce(a), S = ee(a) === a, $ = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = h || (S || !g ? [ke(a)] : Dt(a)), I = f !== "none";
|
|
286
|
+
!h && I && T.push(...Ft(a, g, f, $));
|
|
287
|
+
const E = [a, ...T], D = await ft(t, y), H = [];
|
|
288
|
+
let O = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
289
|
+
if (u && H.push(D[x]), d) {
|
|
290
|
+
const Z = Mt(i, s, $);
|
|
291
|
+
H.push(D[Z[0]], D[Z[1]]);
|
|
292
292
|
}
|
|
293
|
-
if (
|
|
293
|
+
if (O = [...O, {
|
|
294
294
|
placement: i,
|
|
295
|
-
overflows:
|
|
296
|
-
}], !
|
|
297
|
-
var
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
295
|
+
overflows: H
|
|
296
|
+
}], !H.every((Z) => Z <= 0)) {
|
|
297
|
+
var we, ye;
|
|
298
|
+
const Z = (((we = r.flip) == null ? void 0 : we.index) || 0) + 1, j = E[Z];
|
|
299
|
+
if (j)
|
|
300
300
|
return {
|
|
301
301
|
data: {
|
|
302
|
-
index:
|
|
303
|
-
overflows:
|
|
302
|
+
index: Z,
|
|
303
|
+
overflows: O
|
|
304
304
|
},
|
|
305
305
|
reset: {
|
|
306
|
-
placement:
|
|
306
|
+
placement: j
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
|
-
let
|
|
310
|
-
if (!
|
|
309
|
+
let q = (ye = O.filter((Y) => Y.overflows[0] <= 0).sort((Y, z) => Y.overflows[1] - z.overflows[1])[0]) == null ? void 0 : ye.placement;
|
|
310
|
+
if (!q)
|
|
311
311
|
switch (m) {
|
|
312
312
|
case "bestFit": {
|
|
313
|
-
var
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
317
|
-
return
|
|
313
|
+
var fe;
|
|
314
|
+
const Y = (fe = O.filter((z) => {
|
|
315
|
+
if (I) {
|
|
316
|
+
const _ = ce(z.placement);
|
|
317
|
+
return _ === L || // Create a bias to the `y` side axis due to horizontal
|
|
318
318
|
// reading directions favoring greater width.
|
|
319
|
-
|
|
319
|
+
_ === "y";
|
|
320
320
|
}
|
|
321
321
|
return !0;
|
|
322
|
-
}).map((
|
|
323
|
-
|
|
322
|
+
}).map((z) => [z.placement, z.overflows.filter((_) => _ > 0).reduce((_, me) => _ + me, 0)]).sort((z, _) => z[1] - _[1])[0]) == null ? void 0 : fe[0];
|
|
323
|
+
Y && (q = Y);
|
|
324
324
|
break;
|
|
325
325
|
}
|
|
326
326
|
case "initialPlacement":
|
|
327
|
-
|
|
327
|
+
q = a;
|
|
328
328
|
break;
|
|
329
329
|
}
|
|
330
|
-
if (i !==
|
|
330
|
+
if (i !== q)
|
|
331
331
|
return {
|
|
332
332
|
reset: {
|
|
333
|
-
placement:
|
|
333
|
+
placement: q
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
336
|
}
|
|
@@ -338,35 +338,35 @@ const xt = function(e) {
|
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
340
|
};
|
|
341
|
-
async function
|
|
341
|
+
async function Nt(e, t) {
|
|
342
342
|
const {
|
|
343
343
|
placement: n,
|
|
344
344
|
platform: o,
|
|
345
345
|
elements: i
|
|
346
|
-
} = e,
|
|
346
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = ee(n), a = Ie(n), l = ce(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, u = r && l ? -1 : 1, d = Be(t, e);
|
|
347
347
|
let {
|
|
348
348
|
mainAxis: h,
|
|
349
349
|
crossAxis: m,
|
|
350
350
|
alignmentAxis: f
|
|
351
|
-
} = typeof
|
|
352
|
-
mainAxis:
|
|
351
|
+
} = typeof d == "number" ? {
|
|
352
|
+
mainAxis: d,
|
|
353
353
|
crossAxis: 0,
|
|
354
354
|
alignmentAxis: null
|
|
355
355
|
} : {
|
|
356
356
|
mainAxis: 0,
|
|
357
357
|
crossAxis: 0,
|
|
358
358
|
alignmentAxis: null,
|
|
359
|
-
...
|
|
359
|
+
...d
|
|
360
360
|
};
|
|
361
|
-
return a && typeof f == "number" && (m = a === "end" ? f * -1 : f),
|
|
362
|
-
x: m *
|
|
361
|
+
return a && typeof f == "number" && (m = a === "end" ? f * -1 : f), l ? {
|
|
362
|
+
x: m * u,
|
|
363
363
|
y: h * c
|
|
364
364
|
} : {
|
|
365
365
|
x: h * c,
|
|
366
|
-
y: m *
|
|
366
|
+
y: m * u
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Ht = function(e) {
|
|
370
370
|
return e === void 0 && (e = 0), {
|
|
371
371
|
name: "offset",
|
|
372
372
|
options: e,
|
|
@@ -374,21 +374,21 @@ const St = function(e) {
|
|
|
374
374
|
var n, o;
|
|
375
375
|
const {
|
|
376
376
|
x: i,
|
|
377
|
-
y:
|
|
377
|
+
y: r,
|
|
378
378
|
placement: s,
|
|
379
379
|
middlewareData: a
|
|
380
|
-
} = t,
|
|
380
|
+
} = t, l = await Nt(t, e);
|
|
381
381
|
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
382
|
-
x: i +
|
|
383
|
-
y:
|
|
382
|
+
x: i + l.x,
|
|
383
|
+
y: r + l.y,
|
|
384
384
|
data: {
|
|
385
|
-
...
|
|
385
|
+
...l,
|
|
386
386
|
placement: s
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
},
|
|
391
|
+
}, Ut = function(e) {
|
|
392
392
|
return e === void 0 && (e = {}), {
|
|
393
393
|
name: "shift",
|
|
394
394
|
options: e,
|
|
@@ -398,124 +398,85 @@ const St = function(e) {
|
|
|
398
398
|
y: o,
|
|
399
399
|
placement: i
|
|
400
400
|
} = t, {
|
|
401
|
-
mainAxis:
|
|
401
|
+
mainAxis: r = !0,
|
|
402
402
|
crossAxis: s = !1,
|
|
403
403
|
limiter: a = {
|
|
404
|
-
fn: (
|
|
404
|
+
fn: (y) => {
|
|
405
405
|
let {
|
|
406
|
-
x
|
|
406
|
+
x,
|
|
407
407
|
y: L
|
|
408
|
-
} =
|
|
408
|
+
} = y;
|
|
409
409
|
return {
|
|
410
|
-
x
|
|
410
|
+
x,
|
|
411
411
|
y: L
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
},
|
|
415
|
-
...
|
|
416
|
-
} =
|
|
415
|
+
...l
|
|
416
|
+
} = Be(e, t), c = {
|
|
417
417
|
x: n,
|
|
418
418
|
y: o
|
|
419
|
-
},
|
|
420
|
-
let m = c[h], f = c[
|
|
421
|
-
if (
|
|
422
|
-
const
|
|
423
|
-
m =
|
|
419
|
+
}, u = await ft(t, l), d = ce(ee(i)), h = ct(d);
|
|
420
|
+
let m = c[h], f = c[d];
|
|
421
|
+
if (r) {
|
|
422
|
+
const y = h === "y" ? "top" : "left", x = h === "y" ? "bottom" : "right", L = m + u[y], S = m - u[x];
|
|
423
|
+
m = qe(L, m, S);
|
|
424
424
|
}
|
|
425
425
|
if (s) {
|
|
426
|
-
const
|
|
427
|
-
f =
|
|
426
|
+
const y = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", L = f + u[y], S = f - u[x];
|
|
427
|
+
f = qe(L, f, S);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
429
|
+
const g = a.fn({
|
|
430
430
|
...t,
|
|
431
431
|
[h]: m,
|
|
432
|
-
[
|
|
432
|
+
[d]: f
|
|
433
433
|
});
|
|
434
434
|
return {
|
|
435
|
-
...
|
|
435
|
+
...g,
|
|
436
436
|
data: {
|
|
437
|
-
x:
|
|
438
|
-
y:
|
|
437
|
+
x: g.x - n,
|
|
438
|
+
y: g.y - o
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
}, At = function(e) {
|
|
444
|
-
return e === void 0 && (e = {}), {
|
|
445
|
-
name: "size",
|
|
446
|
-
options: e,
|
|
447
|
-
async fn(t) {
|
|
448
|
-
const {
|
|
449
|
-
placement: n,
|
|
450
|
-
rects: o,
|
|
451
|
-
platform: i,
|
|
452
|
-
elements: l
|
|
453
|
-
} = t, {
|
|
454
|
-
apply: s = () => {
|
|
455
|
-
},
|
|
456
|
-
...a
|
|
457
|
-
} = ge(e, t), r = await Re(t, a), c = G(n), d = pe(n), u = J(n) === "y", {
|
|
458
|
-
width: h,
|
|
459
|
-
height: m
|
|
460
|
-
} = o.floating;
|
|
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
|
-
}
|
|
469
|
-
await s({
|
|
470
|
-
...t,
|
|
471
|
-
availableWidth: B,
|
|
472
|
-
availableHeight: A
|
|
473
|
-
});
|
|
474
|
-
const T = await i.getDimensions(l.floating);
|
|
475
|
-
return h !== T.width || m !== T.height ? {
|
|
476
|
-
reset: {
|
|
477
|
-
rects: !0
|
|
478
|
-
}
|
|
479
|
-
} : {};
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
443
|
};
|
|
483
|
-
function
|
|
484
|
-
return
|
|
444
|
+
function ne(e) {
|
|
445
|
+
return We(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
485
446
|
}
|
|
486
|
-
function
|
|
447
|
+
function F(e) {
|
|
487
448
|
var t;
|
|
488
449
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
489
450
|
}
|
|
490
|
-
function
|
|
451
|
+
function X(e) {
|
|
491
452
|
var t;
|
|
492
|
-
return (t = (
|
|
493
|
-
}
|
|
494
|
-
function Me(e) {
|
|
495
|
-
return e instanceof Node || e instanceof D(e).Node;
|
|
453
|
+
return (t = (We(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
496
454
|
}
|
|
497
|
-
function
|
|
498
|
-
return e instanceof
|
|
455
|
+
function We(e) {
|
|
456
|
+
return e instanceof Node || e instanceof F(e).Node;
|
|
499
457
|
}
|
|
500
458
|
function U(e) {
|
|
501
|
-
return e instanceof
|
|
459
|
+
return e instanceof Element || e instanceof F(e).Element;
|
|
502
460
|
}
|
|
503
|
-
function
|
|
504
|
-
return
|
|
461
|
+
function W(e) {
|
|
462
|
+
return e instanceof HTMLElement || e instanceof F(e).HTMLElement;
|
|
505
463
|
}
|
|
506
|
-
function
|
|
464
|
+
function Qe(e) {
|
|
465
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
|
|
466
|
+
}
|
|
467
|
+
function be(e) {
|
|
507
468
|
const {
|
|
508
469
|
overflow: t,
|
|
509
470
|
overflowX: n,
|
|
510
471
|
overflowY: o,
|
|
511
472
|
display: i
|
|
512
|
-
} =
|
|
473
|
+
} = N(e);
|
|
513
474
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
|
|
514
475
|
}
|
|
515
|
-
function
|
|
516
|
-
return ["table", "td", "th"].includes(
|
|
476
|
+
function Wt(e) {
|
|
477
|
+
return ["table", "td", "th"].includes(ne(e));
|
|
517
478
|
}
|
|
518
|
-
function
|
|
479
|
+
function Me(e) {
|
|
519
480
|
return [":popover-open", ":modal"].some((t) => {
|
|
520
481
|
try {
|
|
521
482
|
return e.matches(t);
|
|
@@ -524,32 +485,32 @@ function Se(e) {
|
|
|
524
485
|
}
|
|
525
486
|
});
|
|
526
487
|
}
|
|
527
|
-
function
|
|
528
|
-
const t =
|
|
488
|
+
function Ze(e) {
|
|
489
|
+
const t = Xe(), n = N(e);
|
|
529
490
|
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
491
|
}
|
|
531
|
-
function
|
|
532
|
-
let t =
|
|
533
|
-
for (;
|
|
534
|
-
if (
|
|
492
|
+
function Zt(e) {
|
|
493
|
+
let t = K(e);
|
|
494
|
+
for (; W(t) && !ue(t); ) {
|
|
495
|
+
if (Me(t))
|
|
535
496
|
return null;
|
|
536
|
-
if (
|
|
497
|
+
if (Ze(t))
|
|
537
498
|
return t;
|
|
538
|
-
t =
|
|
499
|
+
t = K(t);
|
|
539
500
|
}
|
|
540
501
|
return null;
|
|
541
502
|
}
|
|
542
|
-
function
|
|
503
|
+
function Xe() {
|
|
543
504
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
544
505
|
}
|
|
545
|
-
function
|
|
546
|
-
return ["html", "body", "#document"].includes(
|
|
506
|
+
function ue(e) {
|
|
507
|
+
return ["html", "body", "#document"].includes(ne(e));
|
|
547
508
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
509
|
+
function N(e) {
|
|
510
|
+
return F(e).getComputedStyle(e);
|
|
550
511
|
}
|
|
551
|
-
function
|
|
552
|
-
return
|
|
512
|
+
function De(e) {
|
|
513
|
+
return U(e) ? {
|
|
553
514
|
scrollLeft: e.scrollLeft,
|
|
554
515
|
scrollTop: e.scrollTop
|
|
555
516
|
} : {
|
|
@@ -557,267 +518,267 @@ function Te(e) {
|
|
|
557
518
|
scrollTop: e.scrollY
|
|
558
519
|
};
|
|
559
520
|
}
|
|
560
|
-
function
|
|
561
|
-
if (
|
|
521
|
+
function K(e) {
|
|
522
|
+
if (ne(e) === "html")
|
|
562
523
|
return e;
|
|
563
524
|
const t = (
|
|
564
525
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
565
526
|
e.assignedSlot || // DOM Element detected.
|
|
566
527
|
e.parentNode || // ShadowRoot detected.
|
|
567
|
-
|
|
568
|
-
|
|
528
|
+
Qe(e) && e.host || // Fallback.
|
|
529
|
+
X(e)
|
|
569
530
|
);
|
|
570
|
-
return
|
|
531
|
+
return Qe(t) ? t.host : t;
|
|
571
532
|
}
|
|
572
|
-
function
|
|
573
|
-
const t =
|
|
574
|
-
return
|
|
533
|
+
function mt(e) {
|
|
534
|
+
const t = K(e);
|
|
535
|
+
return ue(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && be(t) ? t : mt(t);
|
|
575
536
|
}
|
|
576
|
-
function
|
|
537
|
+
function ge(e, t, n) {
|
|
577
538
|
var o;
|
|
578
539
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
579
|
-
const i =
|
|
580
|
-
return
|
|
540
|
+
const i = mt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = F(i);
|
|
541
|
+
return r ? t.concat(s, s.visualViewport || [], be(i) ? i : [], s.frameElement && n ? ge(s.frameElement) : []) : t.concat(i, ge(i, [], n));
|
|
581
542
|
}
|
|
582
|
-
function
|
|
583
|
-
const t =
|
|
543
|
+
function ht(e) {
|
|
544
|
+
const t = N(e);
|
|
584
545
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
585
|
-
const i =
|
|
586
|
-
return a && (n =
|
|
546
|
+
const i = W(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = Ae(n) !== r || Ae(o) !== s;
|
|
547
|
+
return a && (n = r, o = s), {
|
|
587
548
|
width: n,
|
|
588
549
|
height: o,
|
|
589
550
|
$: a
|
|
590
551
|
};
|
|
591
552
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
553
|
+
function je(e) {
|
|
554
|
+
return U(e) ? e : e.contextElement;
|
|
594
555
|
}
|
|
595
556
|
function le(e) {
|
|
596
|
-
const t =
|
|
597
|
-
if (!
|
|
598
|
-
return
|
|
557
|
+
const t = je(e);
|
|
558
|
+
if (!W(t))
|
|
559
|
+
return G(1);
|
|
599
560
|
const n = t.getBoundingClientRect(), {
|
|
600
561
|
width: o,
|
|
601
562
|
height: i,
|
|
602
|
-
$:
|
|
603
|
-
} =
|
|
604
|
-
let s = (
|
|
563
|
+
$: r
|
|
564
|
+
} = ht(t);
|
|
565
|
+
let s = (r ? Ae(n.width) : n.width) / o, a = (r ? Ae(n.height) : n.height) / i;
|
|
605
566
|
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
606
567
|
x: s,
|
|
607
568
|
y: a
|
|
608
569
|
};
|
|
609
570
|
}
|
|
610
|
-
const
|
|
611
|
-
function
|
|
612
|
-
const t =
|
|
613
|
-
return !
|
|
571
|
+
const Xt = /* @__PURE__ */ G(0);
|
|
572
|
+
function pt(e) {
|
|
573
|
+
const t = F(e);
|
|
574
|
+
return !Xe() || !t.visualViewport ? Xt : {
|
|
614
575
|
x: t.visualViewport.offsetLeft,
|
|
615
576
|
y: t.visualViewport.offsetTop
|
|
616
577
|
};
|
|
617
578
|
}
|
|
618
|
-
function
|
|
619
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
579
|
+
function jt(e, t, n) {
|
|
580
|
+
return t === void 0 && (t = !1), !n || t && n !== F(e) ? !1 : t;
|
|
620
581
|
}
|
|
621
|
-
function
|
|
582
|
+
function te(e, t, n, o) {
|
|
622
583
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
623
|
-
const i = e.getBoundingClientRect(),
|
|
624
|
-
let s =
|
|
625
|
-
t && (o ?
|
|
626
|
-
const a =
|
|
627
|
-
let
|
|
628
|
-
if (
|
|
629
|
-
const h =
|
|
630
|
-
let f = h,
|
|
631
|
-
for (;
|
|
632
|
-
const
|
|
633
|
-
|
|
584
|
+
const i = e.getBoundingClientRect(), r = je(e);
|
|
585
|
+
let s = G(1);
|
|
586
|
+
t && (o ? U(o) && (s = le(o)) : s = le(e));
|
|
587
|
+
const a = jt(r, n, o) ? pt(r) : G(0);
|
|
588
|
+
let l = (i.left + a.x) / s.x, c = (i.top + a.y) / s.y, u = i.width / s.x, d = i.height / s.y;
|
|
589
|
+
if (r) {
|
|
590
|
+
const h = F(r), m = o && U(o) ? F(o) : o;
|
|
591
|
+
let f = h, g = f.frameElement;
|
|
592
|
+
for (; g && o && m !== f; ) {
|
|
593
|
+
const y = le(g), x = g.getBoundingClientRect(), L = N(g), S = x.left + (g.clientLeft + parseFloat(L.paddingLeft)) * y.x, $ = x.top + (g.clientTop + parseFloat(L.paddingTop)) * y.y;
|
|
594
|
+
l *= y.x, c *= y.y, u *= y.x, d *= y.y, l += S, c += $, f = F(g), g = f.frameElement;
|
|
634
595
|
}
|
|
635
596
|
}
|
|
636
|
-
return
|
|
637
|
-
width:
|
|
638
|
-
height:
|
|
639
|
-
x:
|
|
597
|
+
return Re({
|
|
598
|
+
width: u,
|
|
599
|
+
height: d,
|
|
600
|
+
x: l,
|
|
640
601
|
y: c
|
|
641
602
|
});
|
|
642
603
|
}
|
|
643
|
-
function
|
|
604
|
+
function Yt(e) {
|
|
644
605
|
let {
|
|
645
606
|
elements: t,
|
|
646
607
|
rect: n,
|
|
647
608
|
offsetParent: o,
|
|
648
609
|
strategy: i
|
|
649
610
|
} = e;
|
|
650
|
-
const
|
|
651
|
-
if (o === s || a &&
|
|
611
|
+
const r = i === "fixed", s = X(o), a = t ? Me(t.floating) : !1;
|
|
612
|
+
if (o === s || a && r)
|
|
652
613
|
return n;
|
|
653
|
-
let
|
|
614
|
+
let l = {
|
|
654
615
|
scrollLeft: 0,
|
|
655
616
|
scrollTop: 0
|
|
656
|
-
}, c =
|
|
657
|
-
const
|
|
658
|
-
if ((
|
|
659
|
-
const h =
|
|
660
|
-
c = le(o),
|
|
617
|
+
}, c = G(1);
|
|
618
|
+
const u = G(0), d = W(o);
|
|
619
|
+
if ((d || !d && !r) && ((ne(o) !== "body" || be(s)) && (l = De(o)), W(o))) {
|
|
620
|
+
const h = te(o);
|
|
621
|
+
c = le(o), u.x = h.x + o.clientLeft, u.y = h.y + o.clientTop;
|
|
661
622
|
}
|
|
662
623
|
return {
|
|
663
624
|
width: n.width * c.x,
|
|
664
625
|
height: n.height * c.y,
|
|
665
|
-
x: n.x * c.x -
|
|
666
|
-
y: n.y * c.y -
|
|
626
|
+
x: n.x * c.x - l.scrollLeft * c.x + u.x,
|
|
627
|
+
y: n.y * c.y - l.scrollTop * c.y + u.y
|
|
667
628
|
};
|
|
668
629
|
}
|
|
669
|
-
function
|
|
630
|
+
function Gt(e) {
|
|
670
631
|
return Array.from(e.getClientRects());
|
|
671
632
|
}
|
|
672
|
-
function
|
|
673
|
-
return
|
|
633
|
+
function vt(e) {
|
|
634
|
+
return te(X(e)).left + De(e).scrollLeft;
|
|
674
635
|
}
|
|
675
|
-
function
|
|
676
|
-
const t =
|
|
677
|
-
let s = -n.scrollLeft +
|
|
636
|
+
function Kt(e) {
|
|
637
|
+
const t = X(e), n = De(e), o = e.ownerDocument.body, i = J(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = J(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
638
|
+
let s = -n.scrollLeft + vt(e);
|
|
678
639
|
const a = -n.scrollTop;
|
|
679
|
-
return
|
|
640
|
+
return N(o).direction === "rtl" && (s += J(t.clientWidth, o.clientWidth) - i), {
|
|
680
641
|
width: i,
|
|
681
|
-
height:
|
|
642
|
+
height: r,
|
|
682
643
|
x: s,
|
|
683
644
|
y: a
|
|
684
645
|
};
|
|
685
646
|
}
|
|
686
|
-
function
|
|
687
|
-
const n =
|
|
688
|
-
let
|
|
647
|
+
function qt(e, t) {
|
|
648
|
+
const n = F(e), o = X(e), i = n.visualViewport;
|
|
649
|
+
let r = o.clientWidth, s = o.clientHeight, a = 0, l = 0;
|
|
689
650
|
if (i) {
|
|
690
|
-
|
|
691
|
-
const c =
|
|
692
|
-
(!c || c && t === "fixed") && (a = i.offsetLeft,
|
|
651
|
+
r = i.width, s = i.height;
|
|
652
|
+
const c = Xe();
|
|
653
|
+
(!c || c && t === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
|
|
693
654
|
}
|
|
694
655
|
return {
|
|
695
|
-
width:
|
|
656
|
+
width: r,
|
|
696
657
|
height: s,
|
|
697
658
|
x: a,
|
|
698
|
-
y:
|
|
659
|
+
y: l
|
|
699
660
|
};
|
|
700
661
|
}
|
|
701
|
-
function
|
|
702
|
-
const n =
|
|
662
|
+
function Jt(e, t) {
|
|
663
|
+
const n = te(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = W(e) ? le(e) : G(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, l = i * r.x, c = o * r.y;
|
|
703
664
|
return {
|
|
704
665
|
width: s,
|
|
705
666
|
height: a,
|
|
706
|
-
x:
|
|
667
|
+
x: l,
|
|
707
668
|
y: c
|
|
708
669
|
};
|
|
709
670
|
}
|
|
710
|
-
function
|
|
671
|
+
function et(e, t, n) {
|
|
711
672
|
let o;
|
|
712
673
|
if (t === "viewport")
|
|
713
|
-
o =
|
|
674
|
+
o = qt(e, n);
|
|
714
675
|
else if (t === "document")
|
|
715
|
-
o =
|
|
716
|
-
else if (
|
|
717
|
-
o =
|
|
676
|
+
o = Kt(X(e));
|
|
677
|
+
else if (U(t))
|
|
678
|
+
o = Jt(t, n);
|
|
718
679
|
else {
|
|
719
|
-
const i =
|
|
680
|
+
const i = pt(e);
|
|
720
681
|
o = {
|
|
721
682
|
...t,
|
|
722
683
|
x: t.x - i.x,
|
|
723
684
|
y: t.y - i.y
|
|
724
685
|
};
|
|
725
686
|
}
|
|
726
|
-
return
|
|
687
|
+
return Re(o);
|
|
727
688
|
}
|
|
728
|
-
function
|
|
729
|
-
const n =
|
|
730
|
-
return n === t || !
|
|
689
|
+
function gt(e, t) {
|
|
690
|
+
const n = K(e);
|
|
691
|
+
return n === t || !U(n) || ue(n) ? !1 : N(n).position === "fixed" || gt(n, t);
|
|
731
692
|
}
|
|
732
|
-
function
|
|
693
|
+
function Qt(e, t) {
|
|
733
694
|
const n = t.get(e);
|
|
734
695
|
if (n)
|
|
735
696
|
return n;
|
|
736
|
-
let o =
|
|
737
|
-
const
|
|
738
|
-
let s =
|
|
739
|
-
for (;
|
|
740
|
-
const a =
|
|
741
|
-
!
|
|
697
|
+
let o = ge(e, [], !1).filter((a) => U(a) && ne(a) !== "body"), i = null;
|
|
698
|
+
const r = N(e).position === "fixed";
|
|
699
|
+
let s = r ? K(e) : e;
|
|
700
|
+
for (; U(s) && !ue(s); ) {
|
|
701
|
+
const a = N(s), l = Ze(s);
|
|
702
|
+
!l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || be(s) && !l && gt(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = K(s);
|
|
742
703
|
}
|
|
743
704
|
return t.set(e, o), o;
|
|
744
705
|
}
|
|
745
|
-
function
|
|
706
|
+
function en(e) {
|
|
746
707
|
let {
|
|
747
708
|
element: t,
|
|
748
709
|
boundary: n,
|
|
749
710
|
rootBoundary: o,
|
|
750
711
|
strategy: i
|
|
751
712
|
} = e;
|
|
752
|
-
const s = [...n === "clippingAncestors" ?
|
|
753
|
-
const
|
|
754
|
-
return c.top =
|
|
755
|
-
},
|
|
713
|
+
const s = [...n === "clippingAncestors" ? Me(t) ? [] : Qt(t, this._c) : [].concat(n), o], a = s[0], l = s.reduce((c, u) => {
|
|
714
|
+
const d = et(t, u, i);
|
|
715
|
+
return c.top = J(d.top, c.top), c.right = $e(d.right, c.right), c.bottom = $e(d.bottom, c.bottom), c.left = J(d.left, c.left), c;
|
|
716
|
+
}, et(t, a, i));
|
|
756
717
|
return {
|
|
757
|
-
width:
|
|
758
|
-
height:
|
|
759
|
-
x:
|
|
760
|
-
y:
|
|
718
|
+
width: l.right - l.left,
|
|
719
|
+
height: l.bottom - l.top,
|
|
720
|
+
x: l.left,
|
|
721
|
+
y: l.top
|
|
761
722
|
};
|
|
762
723
|
}
|
|
763
|
-
function
|
|
724
|
+
function tn(e) {
|
|
764
725
|
const {
|
|
765
726
|
width: t,
|
|
766
727
|
height: n
|
|
767
|
-
} =
|
|
728
|
+
} = ht(e);
|
|
768
729
|
return {
|
|
769
730
|
width: t,
|
|
770
731
|
height: n
|
|
771
732
|
};
|
|
772
733
|
}
|
|
773
|
-
function
|
|
774
|
-
const o =
|
|
734
|
+
function nn(e, t, n) {
|
|
735
|
+
const o = W(t), i = X(t), r = n === "fixed", s = te(e, !0, r, t);
|
|
775
736
|
let a = {
|
|
776
737
|
scrollLeft: 0,
|
|
777
738
|
scrollTop: 0
|
|
778
739
|
};
|
|
779
|
-
const
|
|
780
|
-
if (o || !o && !
|
|
781
|
-
if ((
|
|
782
|
-
const
|
|
783
|
-
|
|
784
|
-
} else i && (
|
|
785
|
-
const c = s.left + a.scrollLeft -
|
|
740
|
+
const l = G(0);
|
|
741
|
+
if (o || !o && !r)
|
|
742
|
+
if ((ne(t) !== "body" || be(i)) && (a = De(t)), o) {
|
|
743
|
+
const d = te(t, !0, r, t);
|
|
744
|
+
l.x = d.x + t.clientLeft, l.y = d.y + t.clientTop;
|
|
745
|
+
} else i && (l.x = vt(i));
|
|
746
|
+
const c = s.left + a.scrollLeft - l.x, u = s.top + a.scrollTop - l.y;
|
|
786
747
|
return {
|
|
787
748
|
x: c,
|
|
788
|
-
y:
|
|
749
|
+
y: u,
|
|
789
750
|
width: s.width,
|
|
790
751
|
height: s.height
|
|
791
752
|
};
|
|
792
753
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
754
|
+
function _e(e) {
|
|
755
|
+
return N(e).position === "static";
|
|
795
756
|
}
|
|
796
|
-
function
|
|
797
|
-
return !
|
|
757
|
+
function tt(e, t) {
|
|
758
|
+
return !W(e) || N(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
798
759
|
}
|
|
799
|
-
function
|
|
800
|
-
const n =
|
|
801
|
-
if (
|
|
760
|
+
function Ct(e, t) {
|
|
761
|
+
const n = F(e);
|
|
762
|
+
if (Me(e))
|
|
802
763
|
return n;
|
|
803
|
-
if (!
|
|
804
|
-
let i =
|
|
805
|
-
for (; i && !
|
|
806
|
-
if (
|
|
764
|
+
if (!W(e)) {
|
|
765
|
+
let i = K(e);
|
|
766
|
+
for (; i && !ue(i); ) {
|
|
767
|
+
if (U(i) && !_e(i))
|
|
807
768
|
return i;
|
|
808
|
-
i =
|
|
769
|
+
i = K(i);
|
|
809
770
|
}
|
|
810
771
|
return n;
|
|
811
772
|
}
|
|
812
|
-
let o =
|
|
813
|
-
for (; o &&
|
|
814
|
-
o =
|
|
815
|
-
return o &&
|
|
773
|
+
let o = tt(e, t);
|
|
774
|
+
for (; o && Wt(o) && _e(o); )
|
|
775
|
+
o = tt(o, t);
|
|
776
|
+
return o && ue(o) && _e(o) && !Ze(o) ? n : o || Zt(e) || n;
|
|
816
777
|
}
|
|
817
|
-
const
|
|
818
|
-
const t = this.getOffsetParent ||
|
|
778
|
+
const on = async function(e) {
|
|
779
|
+
const t = this.getOffsetParent || Ct, n = this.getDimensions, o = await n(e.floating);
|
|
819
780
|
return {
|
|
820
|
-
reference:
|
|
781
|
+
reference: nn(e.reference, await t(e.floating), e.strategy),
|
|
821
782
|
floating: {
|
|
822
783
|
x: 0,
|
|
823
784
|
y: 0,
|
|
@@ -826,258 +787,258 @@ const Nt = async function(e) {
|
|
|
826
787
|
}
|
|
827
788
|
};
|
|
828
789
|
};
|
|
829
|
-
function
|
|
830
|
-
return
|
|
831
|
-
}
|
|
832
|
-
const
|
|
833
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
834
|
-
getDocumentElement:
|
|
835
|
-
getClippingRect:
|
|
836
|
-
getOffsetParent:
|
|
837
|
-
getElementRects:
|
|
838
|
-
getClientRects:
|
|
839
|
-
getDimensions:
|
|
790
|
+
function sn(e) {
|
|
791
|
+
return N(e).direction === "rtl";
|
|
792
|
+
}
|
|
793
|
+
const rn = {
|
|
794
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Yt,
|
|
795
|
+
getDocumentElement: X,
|
|
796
|
+
getClippingRect: en,
|
|
797
|
+
getOffsetParent: Ct,
|
|
798
|
+
getElementRects: on,
|
|
799
|
+
getClientRects: Gt,
|
|
800
|
+
getDimensions: tn,
|
|
840
801
|
getScale: le,
|
|
841
|
-
isElement:
|
|
842
|
-
isRTL:
|
|
802
|
+
isElement: U,
|
|
803
|
+
isRTL: sn
|
|
843
804
|
};
|
|
844
|
-
function
|
|
805
|
+
function an(e, t) {
|
|
845
806
|
let n = null, o;
|
|
846
|
-
const i =
|
|
847
|
-
function
|
|
807
|
+
const i = X(e);
|
|
808
|
+
function r() {
|
|
848
809
|
var a;
|
|
849
810
|
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
850
811
|
}
|
|
851
|
-
function s(a,
|
|
852
|
-
a === void 0 && (a = !1),
|
|
812
|
+
function s(a, l) {
|
|
813
|
+
a === void 0 && (a = !1), l === void 0 && (l = 1), r();
|
|
853
814
|
const {
|
|
854
815
|
left: c,
|
|
855
|
-
top:
|
|
856
|
-
width:
|
|
816
|
+
top: u,
|
|
817
|
+
width: d,
|
|
857
818
|
height: h
|
|
858
819
|
} = e.getBoundingClientRect();
|
|
859
|
-
if (a || t(), !
|
|
820
|
+
if (a || t(), !d || !h)
|
|
860
821
|
return;
|
|
861
|
-
const m =
|
|
862
|
-
rootMargin: -m + "px " + -f + "px " + -
|
|
863
|
-
threshold:
|
|
822
|
+
const m = Se(u), f = Se(i.clientWidth - (c + d)), g = Se(i.clientHeight - (u + h)), y = Se(c), L = {
|
|
823
|
+
rootMargin: -m + "px " + -f + "px " + -g + "px " + -y + "px",
|
|
824
|
+
threshold: J(0, $e(1, l)) || 1
|
|
864
825
|
};
|
|
865
826
|
let S = !0;
|
|
866
|
-
function
|
|
867
|
-
const
|
|
868
|
-
if (
|
|
827
|
+
function $(T) {
|
|
828
|
+
const I = T[0].intersectionRatio;
|
|
829
|
+
if (I !== l) {
|
|
869
830
|
if (!S)
|
|
870
831
|
return s();
|
|
871
|
-
|
|
832
|
+
I ? s(!1, I) : o = setTimeout(() => {
|
|
872
833
|
s(!1, 1e-7);
|
|
873
834
|
}, 1e3);
|
|
874
835
|
}
|
|
875
836
|
S = !1;
|
|
876
837
|
}
|
|
877
838
|
try {
|
|
878
|
-
n = new IntersectionObserver(
|
|
839
|
+
n = new IntersectionObserver($, {
|
|
879
840
|
...L,
|
|
880
841
|
// Handle <iframe>s
|
|
881
842
|
root: i.ownerDocument
|
|
882
843
|
});
|
|
883
844
|
} catch {
|
|
884
|
-
n = new IntersectionObserver(
|
|
845
|
+
n = new IntersectionObserver($, L);
|
|
885
846
|
}
|
|
886
847
|
n.observe(e);
|
|
887
848
|
}
|
|
888
|
-
return s(!0),
|
|
849
|
+
return s(!0), r;
|
|
889
850
|
}
|
|
890
|
-
function
|
|
851
|
+
function ln(e, t, n, o) {
|
|
891
852
|
o === void 0 && (o = {});
|
|
892
853
|
const {
|
|
893
854
|
ancestorScroll: i = !0,
|
|
894
|
-
ancestorResize:
|
|
855
|
+
ancestorResize: r = !0,
|
|
895
856
|
elementResize: s = typeof ResizeObserver == "function",
|
|
896
857
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
897
|
-
animationFrame:
|
|
898
|
-
} = o, c =
|
|
899
|
-
|
|
900
|
-
i &&
|
|
858
|
+
animationFrame: l = !1
|
|
859
|
+
} = o, c = je(e), u = i || r ? [...c ? ge(c) : [], ...ge(t)] : [];
|
|
860
|
+
u.forEach((x) => {
|
|
861
|
+
i && x.addEventListener("scroll", n, {
|
|
901
862
|
passive: !0
|
|
902
|
-
}),
|
|
863
|
+
}), r && x.addEventListener("resize", n);
|
|
903
864
|
});
|
|
904
|
-
const
|
|
865
|
+
const d = c && a ? an(c, n) : null;
|
|
905
866
|
let h = -1, m = null;
|
|
906
|
-
s && (m = new ResizeObserver((
|
|
907
|
-
let [L] =
|
|
867
|
+
s && (m = new ResizeObserver((x) => {
|
|
868
|
+
let [L] = x;
|
|
908
869
|
L && L.target === c && m && (m.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
909
870
|
var S;
|
|
910
871
|
(S = m) == null || S.observe(t);
|
|
911
872
|
})), n();
|
|
912
|
-
}), c && !
|
|
913
|
-
let f,
|
|
914
|
-
|
|
915
|
-
function
|
|
916
|
-
const
|
|
917
|
-
|
|
873
|
+
}), c && !l && m.observe(c), m.observe(t));
|
|
874
|
+
let f, g = l ? te(e) : null;
|
|
875
|
+
l && y();
|
|
876
|
+
function y() {
|
|
877
|
+
const x = te(e);
|
|
878
|
+
g && (x.x !== g.x || x.y !== g.y || x.width !== g.width || x.height !== g.height) && n(), g = x, f = requestAnimationFrame(y);
|
|
918
879
|
}
|
|
919
880
|
return n(), () => {
|
|
920
|
-
var
|
|
921
|
-
|
|
922
|
-
i && L.removeEventListener("scroll", n),
|
|
923
|
-
}),
|
|
881
|
+
var x;
|
|
882
|
+
u.forEach((L) => {
|
|
883
|
+
i && L.removeEventListener("scroll", n), r && L.removeEventListener("resize", n);
|
|
884
|
+
}), d == null || d(), (x = m) == null || x.disconnect(), m = null, l && cancelAnimationFrame(f);
|
|
924
885
|
};
|
|
925
886
|
}
|
|
926
|
-
const
|
|
887
|
+
const cn = Ht, un = Ut, dn = Vt, fn = (e, t, n) => {
|
|
927
888
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
928
|
-
platform:
|
|
889
|
+
platform: rn,
|
|
929
890
|
...n
|
|
930
|
-
},
|
|
891
|
+
}, r = {
|
|
931
892
|
...i.platform,
|
|
932
893
|
_c: o
|
|
933
894
|
};
|
|
934
|
-
return
|
|
895
|
+
return Pt(e, t, {
|
|
935
896
|
...i,
|
|
936
|
-
platform:
|
|
897
|
+
platform: r
|
|
937
898
|
});
|
|
938
899
|
};
|
|
939
|
-
function
|
|
900
|
+
function mn(e) {
|
|
940
901
|
return e != null && typeof e == "object" && "$el" in e;
|
|
941
902
|
}
|
|
942
|
-
function
|
|
943
|
-
if (
|
|
903
|
+
function nt(e) {
|
|
904
|
+
if (mn(e)) {
|
|
944
905
|
const t = e.$el;
|
|
945
|
-
return
|
|
906
|
+
return We(t) && ne(t) === "#comment" ? null : t;
|
|
946
907
|
}
|
|
947
908
|
return e;
|
|
948
909
|
}
|
|
949
|
-
function
|
|
950
|
-
return typeof e == "function" ? e() :
|
|
910
|
+
function he(e) {
|
|
911
|
+
return typeof e == "function" ? e() : Te(e);
|
|
951
912
|
}
|
|
952
|
-
function
|
|
913
|
+
function bt(e) {
|
|
953
914
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
954
915
|
}
|
|
955
|
-
function
|
|
956
|
-
const n =
|
|
916
|
+
function ot(e, t) {
|
|
917
|
+
const n = bt(e);
|
|
957
918
|
return Math.round(t * n) / n;
|
|
958
919
|
}
|
|
959
|
-
function
|
|
920
|
+
function hn(e, t, n) {
|
|
960
921
|
n === void 0 && (n = {});
|
|
961
|
-
const o = n.whileElementsMounted, i =
|
|
962
|
-
var
|
|
963
|
-
return (
|
|
964
|
-
}),
|
|
965
|
-
var
|
|
966
|
-
return (
|
|
967
|
-
}), a =
|
|
968
|
-
var
|
|
969
|
-
return (
|
|
970
|
-
}),
|
|
971
|
-
var
|
|
972
|
-
return (
|
|
973
|
-
}), c =
|
|
974
|
-
const
|
|
922
|
+
const o = n.whileElementsMounted, i = B(() => {
|
|
923
|
+
var E;
|
|
924
|
+
return (E = he(n.open)) != null ? E : !0;
|
|
925
|
+
}), r = B(() => he(n.middleware)), s = B(() => {
|
|
926
|
+
var E;
|
|
927
|
+
return (E = he(n.placement)) != null ? E : "bottom";
|
|
928
|
+
}), a = B(() => {
|
|
929
|
+
var E;
|
|
930
|
+
return (E = he(n.strategy)) != null ? E : "absolute";
|
|
931
|
+
}), l = B(() => {
|
|
932
|
+
var E;
|
|
933
|
+
return (E = he(n.transform)) != null ? E : !0;
|
|
934
|
+
}), c = B(() => nt(e.value)), u = B(() => nt(t.value)), d = R(0), h = R(0), m = R(a.value), f = R(s.value), g = $t({}), y = R(!1), x = B(() => {
|
|
935
|
+
const E = {
|
|
975
936
|
position: m.value,
|
|
976
937
|
left: "0",
|
|
977
938
|
top: "0"
|
|
978
939
|
};
|
|
979
|
-
if (!
|
|
980
|
-
return
|
|
981
|
-
const
|
|
982
|
-
return
|
|
983
|
-
...
|
|
984
|
-
transform: "translate(" +
|
|
985
|
-
...
|
|
940
|
+
if (!u.value)
|
|
941
|
+
return E;
|
|
942
|
+
const D = ot(u.value, d.value), H = ot(u.value, h.value);
|
|
943
|
+
return l.value ? {
|
|
944
|
+
...E,
|
|
945
|
+
transform: "translate(" + D + "px, " + H + "px)",
|
|
946
|
+
...bt(u.value) >= 1.5 && {
|
|
986
947
|
willChange: "transform"
|
|
987
948
|
}
|
|
988
949
|
} : {
|
|
989
950
|
position: m.value,
|
|
990
|
-
left:
|
|
991
|
-
top:
|
|
951
|
+
left: D + "px",
|
|
952
|
+
top: H + "px"
|
|
992
953
|
};
|
|
993
954
|
});
|
|
994
955
|
let L;
|
|
995
956
|
function S() {
|
|
996
|
-
c.value == null ||
|
|
997
|
-
middleware:
|
|
957
|
+
c.value == null || u.value == null || fn(c.value, u.value, {
|
|
958
|
+
middleware: r.value,
|
|
998
959
|
placement: s.value,
|
|
999
960
|
strategy: a.value
|
|
1000
|
-
}).then((
|
|
1001
|
-
|
|
961
|
+
}).then((E) => {
|
|
962
|
+
d.value = E.x, h.value = E.y, m.value = E.strategy, f.value = E.placement, g.value = E.middlewareData, y.value = !0;
|
|
1002
963
|
});
|
|
1003
964
|
}
|
|
1004
|
-
function
|
|
965
|
+
function $() {
|
|
1005
966
|
typeof L == "function" && (L(), L = void 0);
|
|
1006
967
|
}
|
|
1007
|
-
function
|
|
1008
|
-
if (
|
|
968
|
+
function T() {
|
|
969
|
+
if ($(), o === void 0) {
|
|
1009
970
|
S();
|
|
1010
971
|
return;
|
|
1011
972
|
}
|
|
1012
|
-
if (c.value != null &&
|
|
1013
|
-
L = o(c.value,
|
|
973
|
+
if (c.value != null && u.value != null) {
|
|
974
|
+
L = o(c.value, u.value, S);
|
|
1014
975
|
return;
|
|
1015
976
|
}
|
|
1016
977
|
}
|
|
1017
|
-
function
|
|
1018
|
-
i.value || (
|
|
978
|
+
function I() {
|
|
979
|
+
i.value || (y.value = !1);
|
|
1019
980
|
}
|
|
1020
|
-
return
|
|
981
|
+
return ae([r, s, a], S, {
|
|
1021
982
|
flush: "sync"
|
|
1022
|
-
}),
|
|
983
|
+
}), ae([c, u], T, {
|
|
1023
984
|
flush: "sync"
|
|
1024
|
-
}),
|
|
985
|
+
}), ae(i, I, {
|
|
1025
986
|
flush: "sync"
|
|
1026
|
-
}),
|
|
1027
|
-
x:
|
|
1028
|
-
y:
|
|
1029
|
-
strategy:
|
|
1030
|
-
placement:
|
|
1031
|
-
middlewareData:
|
|
1032
|
-
isPositioned:
|
|
1033
|
-
floatingStyles:
|
|
987
|
+
}), At() && kt($), {
|
|
988
|
+
x: se(d),
|
|
989
|
+
y: se(h),
|
|
990
|
+
strategy: se(m),
|
|
991
|
+
placement: se(f),
|
|
992
|
+
middlewareData: se(g),
|
|
993
|
+
isPositioned: se(y),
|
|
994
|
+
floatingStyles: x,
|
|
1034
995
|
update: S
|
|
1035
996
|
};
|
|
1036
997
|
}
|
|
1037
|
-
const
|
|
998
|
+
const pn = "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", oe = (e, t) => {
|
|
1038
999
|
const n = e.__vccOpts || e;
|
|
1039
1000
|
for (const [o, i] of t)
|
|
1040
1001
|
n[o] = i;
|
|
1041
1002
|
return n;
|
|
1042
|
-
},
|
|
1003
|
+
}, vn = {
|
|
1043
1004
|
name: "Logo"
|
|
1044
|
-
},
|
|
1045
|
-
src:
|
|
1005
|
+
}, gn = {
|
|
1006
|
+
src: pn,
|
|
1046
1007
|
alt: "DDict Logo",
|
|
1047
1008
|
class: "w-6 h-6 cursor-pointer"
|
|
1048
1009
|
};
|
|
1049
|
-
function
|
|
1050
|
-
return
|
|
1010
|
+
function Cn(e, t, n, o, i, r) {
|
|
1011
|
+
return v(), b("img", gn);
|
|
1051
1012
|
}
|
|
1052
|
-
const
|
|
1013
|
+
const bn = /* @__PURE__ */ oe(vn, [["render", Cn]]), wn = {}, yn = {
|
|
1053
1014
|
class: "w-12 h-12 text-primary",
|
|
1054
1015
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1055
1016
|
viewBox: "0 0 24 24"
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1017
|
+
}, xn = /* @__PURE__ */ He('<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), Ln = [
|
|
1018
|
+
xn
|
|
1058
1019
|
];
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
1020
|
+
function Sn(e, t) {
|
|
1021
|
+
return v(), b("svg", yn, Ln);
|
|
1061
1022
|
}
|
|
1062
|
-
const
|
|
1023
|
+
const En = /* @__PURE__ */ oe(wn, [["render", Sn]]), Tn = { class: "rounded-lg bg-base-100 px-4 py-2 border border-base-300 shadow-lg" }, $n = { class: "flex justify-center" }, An = {
|
|
1063
1024
|
__name: "Loading",
|
|
1064
1025
|
setup(e) {
|
|
1065
|
-
return (t, n) => (
|
|
1066
|
-
w("div",
|
|
1067
|
-
|
|
1026
|
+
return (t, n) => (v(), b("div", Tn, [
|
|
1027
|
+
w("div", $n, [
|
|
1028
|
+
P(En)
|
|
1068
1029
|
])
|
|
1069
1030
|
]));
|
|
1070
1031
|
}
|
|
1071
|
-
},
|
|
1032
|
+
}, kn = {
|
|
1072
1033
|
name: "Phonetic",
|
|
1073
1034
|
props: ["phonetic"]
|
|
1074
|
-
},
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1077
|
-
w("span",
|
|
1035
|
+
}, Rn = { class: "p-0 m-0" }, Bn = { class: "text-xs font-md text-base-content/60" };
|
|
1036
|
+
function In(e, t, n, o, i, r) {
|
|
1037
|
+
return v(), b("p", Rn, [
|
|
1038
|
+
w("span", Bn, "/" + pe(n.phonetic) + "/", 1)
|
|
1078
1039
|
]);
|
|
1079
1040
|
}
|
|
1080
|
-
const
|
|
1041
|
+
const Mn = /* @__PURE__ */ oe(kn, [["render", In]]), Dn = { class: "flex flex-col gap-2" }, On = {
|
|
1081
1042
|
__name: "Sentences",
|
|
1082
1043
|
props: {
|
|
1083
1044
|
sentences: {
|
|
@@ -1086,22 +1047,22 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1086
1047
|
}
|
|
1087
1048
|
},
|
|
1088
1049
|
setup(e) {
|
|
1089
|
-
const t = e, n =
|
|
1050
|
+
const t = e, n = B(() => t.sentences.split(`
|
|
1090
1051
|
`));
|
|
1091
|
-
return (o, i) => (
|
|
1092
|
-
(
|
|
1052
|
+
return (o, i) => (v(), b("div", Dn, [
|
|
1053
|
+
(v(!0), b(de, null, Ce(n.value, (r, s) => (v(), b("p", {
|
|
1093
1054
|
key: s,
|
|
1094
1055
|
class: "text-base text-base-content leading-tight p-0 mr-2"
|
|
1095
|
-
},
|
|
1056
|
+
}, pe(r), 1))), 128))
|
|
1096
1057
|
]));
|
|
1097
1058
|
}
|
|
1098
|
-
},
|
|
1099
|
-
/* @__PURE__ */
|
|
1059
|
+
}, Fn = /* @__PURE__ */ w("p", { class: "text-sm font-medium text-primary text-center" }, [
|
|
1060
|
+
/* @__PURE__ */ ve(" 🤔 Don't understand? "),
|
|
1100
1061
|
/* @__PURE__ */ w("span", { class: "text-secondary font-semibold" }, "Try AI"),
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
], -1),
|
|
1103
|
-
|
|
1104
|
-
],
|
|
1062
|
+
/* @__PURE__ */ ve(" ✨ ")
|
|
1063
|
+
], -1), zn = [
|
|
1064
|
+
Fn
|
|
1065
|
+
], _n = {
|
|
1105
1066
|
__name: "AIPromptButton",
|
|
1106
1067
|
props: {
|
|
1107
1068
|
show: {
|
|
@@ -1115,18 +1076,18 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1115
1076
|
},
|
|
1116
1077
|
emits: ["click"],
|
|
1117
1078
|
setup(e) {
|
|
1118
|
-
return (t, n) => e.show ? (
|
|
1079
|
+
return (t, n) => e.show ? (v(), b("div", {
|
|
1119
1080
|
key: 0,
|
|
1120
1081
|
class: k([
|
|
1121
1082
|
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1122
1083
|
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
1084
|
]),
|
|
1124
1085
|
onClick: n[0] || (n[0] = (o) => !e.isLoading && t.$emit("click"))
|
|
1125
|
-
},
|
|
1086
|
+
}, zn, 2)) : M("", !0);
|
|
1126
1087
|
}
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
],
|
|
1088
|
+
}, Pn = /* @__PURE__ */ w("p", { class: "text-sm font-medium text-accent text-center" }, "💡 Need Summary? ✨", -1), Vn = [
|
|
1089
|
+
Pn
|
|
1090
|
+
], Nn = {
|
|
1130
1091
|
__name: "AIExplainPromptButton",
|
|
1131
1092
|
props: {
|
|
1132
1093
|
show: {
|
|
@@ -1140,22 +1101,22 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1140
1101
|
},
|
|
1141
1102
|
emits: ["click"],
|
|
1142
1103
|
setup(e) {
|
|
1143
|
-
return (t, n) => e.show ? (
|
|
1104
|
+
return (t, n) => e.show ? (v(), b("div", {
|
|
1144
1105
|
key: 0,
|
|
1145
1106
|
class: k([
|
|
1146
1107
|
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1147
1108
|
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
1109
|
]),
|
|
1149
1110
|
onClick: n[0] || (n[0] = (o) => !e.isLoading && t.$emit("click"))
|
|
1150
|
-
},
|
|
1111
|
+
}, Vn, 2)) : M("", !0);
|
|
1151
1112
|
}
|
|
1152
|
-
},
|
|
1153
|
-
/* @__PURE__ */
|
|
1113
|
+
}, Hn = /* @__PURE__ */ w("p", { class: "text-sm font-medium text-success text-center" }, [
|
|
1114
|
+
/* @__PURE__ */ ve(" 📚 Learn this? "),
|
|
1154
1115
|
/* @__PURE__ */ w("span", { class: "text-warning font-semibold" }, "Study now"),
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
], -1),
|
|
1157
|
-
|
|
1158
|
-
],
|
|
1116
|
+
/* @__PURE__ */ ve(" 🎯 ")
|
|
1117
|
+
], -1), Un = [
|
|
1118
|
+
Hn
|
|
1119
|
+
], Wn = {
|
|
1159
1120
|
__name: "LearnPromptButton",
|
|
1160
1121
|
props: {
|
|
1161
1122
|
show: {
|
|
@@ -1165,35 +1126,35 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1165
1126
|
},
|
|
1166
1127
|
emits: ["click"],
|
|
1167
1128
|
setup(e) {
|
|
1168
|
-
return (t, n) => e.show ? (
|
|
1129
|
+
return (t, n) => e.show ? (v(), b("div", {
|
|
1169
1130
|
key: 0,
|
|
1170
1131
|
class: k([
|
|
1171
1132
|
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1172
1133
|
"from-success/10 to-warning/10 border-success/20 cursor-pointer hover:from-success/20 hover:to-warning/20 hover:border-success/30"
|
|
1173
1134
|
]),
|
|
1174
1135
|
onClick: n[0] || (n[0] = (o) => t.$emit("click"))
|
|
1175
|
-
},
|
|
1136
|
+
}, Un)) : M("", !0);
|
|
1176
1137
|
}
|
|
1177
|
-
},
|
|
1138
|
+
}, Zn = { class: "capitalize text-base italic font-normal text-base-content/60" }, Xn = { class: "text-base leading-6 text-base-content" }, jn = {
|
|
1178
1139
|
__name: "Dict",
|
|
1179
1140
|
props: {
|
|
1180
1141
|
dictionary: Array
|
|
1181
1142
|
},
|
|
1182
1143
|
setup(e) {
|
|
1183
|
-
return (t, n) => (
|
|
1184
|
-
(
|
|
1144
|
+
return (t, n) => (v(), b("div", null, [
|
|
1145
|
+
(v(!0), b(de, null, Ce(e.dictionary, (o, i) => (v(), b("div", {
|
|
1185
1146
|
key: i,
|
|
1186
1147
|
class: "mt-2"
|
|
1187
1148
|
}, [
|
|
1188
|
-
w("p",
|
|
1189
|
-
w("span",
|
|
1149
|
+
w("p", Zn, pe(o.pos), 1),
|
|
1150
|
+
w("span", Xn, pe(o.terms.join(", ")), 1)
|
|
1190
1151
|
]))), 128))
|
|
1191
1152
|
]));
|
|
1192
1153
|
}
|
|
1193
|
-
},
|
|
1154
|
+
}, Yn = { class: "" }, Gn = /* @__PURE__ */ w("p", { class: "capitalize text-base italic font-normal text-base-content/60 mt-2" }, "Summary", -1), Kn = {
|
|
1194
1155
|
key: 0,
|
|
1195
1156
|
class: "list-none list-outside mt-2"
|
|
1196
|
-
},
|
|
1157
|
+
}, qn = ["innerHTML"], Jn = {
|
|
1197
1158
|
__name: "Explanation",
|
|
1198
1159
|
props: {
|
|
1199
1160
|
explanation: Object
|
|
@@ -1201,32 +1162,32 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1201
1162
|
setup(e) {
|
|
1202
1163
|
return (t, n) => {
|
|
1203
1164
|
var o, i;
|
|
1204
|
-
return
|
|
1205
|
-
|
|
1206
|
-
(o = e.explanation) != null && o.result ? (
|
|
1207
|
-
(
|
|
1208
|
-
`)) || [], (
|
|
1209
|
-
key: `${
|
|
1210
|
-
innerHTML:
|
|
1165
|
+
return v(), b("div", Yn, [
|
|
1166
|
+
Gn,
|
|
1167
|
+
(o = e.explanation) != null && o.result ? (v(), b("ul", Kn, [
|
|
1168
|
+
(v(!0), b(de, null, Ce(((i = e.explanation) == null ? void 0 : i.result.split(`
|
|
1169
|
+
`)) || [], (r, s) => (v(), b("li", {
|
|
1170
|
+
key: `${r}-${s}`,
|
|
1171
|
+
innerHTML: r,
|
|
1211
1172
|
class: "text-base text-base-content"
|
|
1212
|
-
}, null, 8,
|
|
1173
|
+
}, null, 8, qn))), 128))
|
|
1213
1174
|
])) : M("", !0)
|
|
1214
1175
|
]);
|
|
1215
1176
|
};
|
|
1216
1177
|
}
|
|
1217
|
-
},
|
|
1178
|
+
}, Qn = ["disabled"], eo = /* @__PURE__ */ w("path", {
|
|
1218
1179
|
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",
|
|
1219
1180
|
fill: "currentColor"
|
|
1220
|
-
}, null, -1),
|
|
1221
|
-
|
|
1222
|
-
],
|
|
1181
|
+
}, null, -1), to = [
|
|
1182
|
+
eo
|
|
1183
|
+
], no = ["disabled"], oo = /* @__PURE__ */ w("path", {
|
|
1223
1184
|
"fill-rule": "evenodd",
|
|
1224
1185
|
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",
|
|
1225
1186
|
"clip-rule": "evenodd",
|
|
1226
1187
|
fill: "currentColor"
|
|
1227
|
-
}, null, -1),
|
|
1228
|
-
|
|
1229
|
-
],
|
|
1188
|
+
}, null, -1), io = [
|
|
1189
|
+
oo
|
|
1190
|
+
], so = {
|
|
1230
1191
|
__name: "Player",
|
|
1231
1192
|
props: {
|
|
1232
1193
|
tts: {
|
|
@@ -1240,54 +1201,54 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1240
1201
|
},
|
|
1241
1202
|
emits: ["loadTTS"],
|
|
1242
1203
|
setup(e, { emit: t }) {
|
|
1243
|
-
const n = e, o = t, i =
|
|
1244
|
-
let
|
|
1245
|
-
|
|
1204
|
+
const n = e, o = t, i = B(() => n.tts), r = R(!1), s = new Audio(), a = new (window.AudioContext || window.webkitAudioContext)();
|
|
1205
|
+
let l = null;
|
|
1206
|
+
ae(
|
|
1246
1207
|
i,
|
|
1247
1208
|
() => {
|
|
1248
1209
|
if (!i.value) {
|
|
1249
|
-
|
|
1210
|
+
r.value = !1;
|
|
1250
1211
|
return;
|
|
1251
1212
|
}
|
|
1252
|
-
|
|
1213
|
+
u();
|
|
1253
1214
|
},
|
|
1254
1215
|
{ immediate: !0 }
|
|
1255
|
-
),
|
|
1216
|
+
), Ue(() => {
|
|
1256
1217
|
h(), s.src = "", a.close();
|
|
1257
1218
|
});
|
|
1258
1219
|
function c() {
|
|
1259
1220
|
if (i.value) {
|
|
1260
|
-
|
|
1221
|
+
u();
|
|
1261
1222
|
return;
|
|
1262
1223
|
}
|
|
1263
|
-
|
|
1224
|
+
r.value = !0, o("loadTTS");
|
|
1264
1225
|
}
|
|
1265
|
-
async function
|
|
1226
|
+
async function u() {
|
|
1266
1227
|
if (i.value) {
|
|
1267
|
-
|
|
1228
|
+
r.value = !0;
|
|
1268
1229
|
try {
|
|
1269
1230
|
s.src = i.value, s.playbackRate = 0.7, await s.play(), s.onended = () => {
|
|
1270
|
-
|
|
1231
|
+
r.value = !1;
|
|
1271
1232
|
};
|
|
1272
1233
|
} catch {
|
|
1273
|
-
await
|
|
1234
|
+
await d();
|
|
1274
1235
|
}
|
|
1275
1236
|
}
|
|
1276
1237
|
}
|
|
1277
|
-
async function
|
|
1238
|
+
async function d() {
|
|
1278
1239
|
try {
|
|
1279
|
-
const f = await (await fetch(i.value)).arrayBuffer(),
|
|
1280
|
-
|
|
1281
|
-
|
|
1240
|
+
const f = await (await fetch(i.value)).arrayBuffer(), g = await a.decodeAudioData(f);
|
|
1241
|
+
l = a.createBufferSource(), l.buffer = g, l.playbackRate.value = 0.7, l.connect(a.destination), l.start(), l.onended = () => {
|
|
1242
|
+
r.value = !1, l = null;
|
|
1282
1243
|
};
|
|
1283
1244
|
} catch {
|
|
1284
|
-
|
|
1245
|
+
r.value = !1;
|
|
1285
1246
|
}
|
|
1286
1247
|
}
|
|
1287
1248
|
function h() {
|
|
1288
|
-
|
|
1249
|
+
l && (l.stop(), l.disconnect(), l = null), s.pause(), s.currentTime = 0, r.value = !1;
|
|
1289
1250
|
}
|
|
1290
|
-
return (m, f) =>
|
|
1251
|
+
return (m, f) => r.value ? (v(), b("button", {
|
|
1291
1252
|
key: 1,
|
|
1292
1253
|
class: k(["btn btn-xs btn-circle", [
|
|
1293
1254
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1296,13 +1257,13 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1296
1257
|
disabled: e.disabled,
|
|
1297
1258
|
onClick: h
|
|
1298
1259
|
}, [
|
|
1299
|
-
(
|
|
1260
|
+
(v(), b("svg", {
|
|
1300
1261
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1301
1262
|
viewBox: "0 0 24 24",
|
|
1302
1263
|
fill: "none",
|
|
1303
1264
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1304
|
-
},
|
|
1305
|
-
], 10,
|
|
1265
|
+
}, io, 2))
|
|
1266
|
+
], 10, no)) : (v(), b("button", {
|
|
1306
1267
|
key: 0,
|
|
1307
1268
|
class: k(["btn btn-xs btn-circle", [
|
|
1308
1269
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1311,35 +1272,35 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1311
1272
|
disabled: e.disabled,
|
|
1312
1273
|
onClick: c
|
|
1313
1274
|
}, [
|
|
1314
|
-
(
|
|
1275
|
+
(v(), b("svg", {
|
|
1315
1276
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1316
1277
|
viewBox: "0 0 16 16",
|
|
1317
1278
|
fill: "none",
|
|
1318
1279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1319
|
-
},
|
|
1320
|
-
], 10,
|
|
1280
|
+
}, to, 2))
|
|
1281
|
+
], 10, Qn));
|
|
1321
1282
|
}
|
|
1322
|
-
},
|
|
1283
|
+
}, ro = {
|
|
1323
1284
|
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",
|
|
1324
1285
|
"data-tip": "Favorite"
|
|
1325
|
-
},
|
|
1286
|
+
}, ao = ["disabled"], lo = /* @__PURE__ */ w("path", {
|
|
1326
1287
|
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",
|
|
1327
1288
|
fill: "currentColor"
|
|
1328
|
-
}, null, -1),
|
|
1329
|
-
|
|
1330
|
-
],
|
|
1289
|
+
}, null, -1), co = [
|
|
1290
|
+
lo
|
|
1291
|
+
], uo = /* @__PURE__ */ w("path", {
|
|
1331
1292
|
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",
|
|
1332
1293
|
fill: "currentColor"
|
|
1333
|
-
}, null, -1),
|
|
1334
|
-
|
|
1335
|
-
],
|
|
1294
|
+
}, null, -1), fo = [
|
|
1295
|
+
uo
|
|
1296
|
+
], mo = {
|
|
1336
1297
|
__name: "Favorite",
|
|
1337
1298
|
props: {
|
|
1338
1299
|
isFilled: Boolean,
|
|
1339
1300
|
disabled: Boolean
|
|
1340
1301
|
},
|
|
1341
1302
|
setup(e) {
|
|
1342
|
-
return (t, n) => (
|
|
1303
|
+
return (t, n) => (v(), b("div", ro, [
|
|
1343
1304
|
w("button", {
|
|
1344
1305
|
class: k(["btn btn-xs btn-circle", [
|
|
1345
1306
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1347,51 +1308,51 @@ const Cn = /* @__PURE__ */ te(mn, [["render", pn]]), vn = { class: "flex flex-co
|
|
|
1347
1308
|
]]),
|
|
1348
1309
|
disabled: e.disabled
|
|
1349
1310
|
}, [
|
|
1350
|
-
e.isFilled ? (
|
|
1311
|
+
e.isFilled ? (v(), b("svg", {
|
|
1351
1312
|
key: 1,
|
|
1352
1313
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1353
1314
|
viewBox: "0 0 16 16",
|
|
1354
1315
|
fill: "none",
|
|
1355
1316
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1356
|
-
},
|
|
1317
|
+
}, fo, 2)) : (v(), b("svg", {
|
|
1357
1318
|
key: 0,
|
|
1358
1319
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1359
1320
|
viewBox: "0 0 16 16",
|
|
1360
1321
|
fill: "none",
|
|
1361
1322
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1362
|
-
},
|
|
1363
|
-
], 10,
|
|
1323
|
+
}, co, 2))
|
|
1324
|
+
], 10, ao)
|
|
1364
1325
|
]));
|
|
1365
1326
|
}
|
|
1366
|
-
},
|
|
1327
|
+
}, ho = {}, po = {
|
|
1367
1328
|
class: "w-6 h-6 text-primary",
|
|
1368
1329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1369
1330
|
viewBox: "0 0 24 24"
|
|
1370
|
-
},
|
|
1371
|
-
|
|
1331
|
+
}, vo = /* @__PURE__ */ He('<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), go = [
|
|
1332
|
+
vo
|
|
1372
1333
|
];
|
|
1373
|
-
function
|
|
1374
|
-
return
|
|
1334
|
+
function Co(e, t) {
|
|
1335
|
+
return v(), b("svg", po, go);
|
|
1375
1336
|
}
|
|
1376
|
-
const
|
|
1337
|
+
const wt = /* @__PURE__ */ oe(ho, [["render", Co]]), bo = {
|
|
1377
1338
|
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",
|
|
1378
1339
|
"data-tip": "AI Translate"
|
|
1379
|
-
},
|
|
1340
|
+
}, wo = ["disabled"], yo = /* @__PURE__ */ w("path", {
|
|
1380
1341
|
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",
|
|
1381
1342
|
fill: "currentColor"
|
|
1382
|
-
}, null, -1),
|
|
1343
|
+
}, null, -1), xo = /* @__PURE__ */ w("path", {
|
|
1383
1344
|
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",
|
|
1384
1345
|
fill: "currentColor"
|
|
1385
|
-
}, null, -1),
|
|
1346
|
+
}, null, -1), Lo = /* @__PURE__ */ w("path", {
|
|
1386
1347
|
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",
|
|
1387
1348
|
fill: "currentColor"
|
|
1388
|
-
}, null, -1),
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
],
|
|
1393
|
-
|
|
1394
|
-
],
|
|
1349
|
+
}, null, -1), So = [
|
|
1350
|
+
yo,
|
|
1351
|
+
xo,
|
|
1352
|
+
Lo
|
|
1353
|
+
], Eo = /* @__PURE__ */ He('<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), To = [
|
|
1354
|
+
Eo
|
|
1355
|
+
], $o = {
|
|
1395
1356
|
__name: "AITranslateBtn",
|
|
1396
1357
|
props: {
|
|
1397
1358
|
isLoading: Boolean,
|
|
@@ -1399,11 +1360,11 @@ const at = /* @__PURE__ */ te(qn, [["render", to]]), no = {
|
|
|
1399
1360
|
isFilled: Boolean
|
|
1400
1361
|
},
|
|
1401
1362
|
setup(e) {
|
|
1402
|
-
return (t, n) => (
|
|
1403
|
-
e.isLoading ? (
|
|
1363
|
+
return (t, n) => (v(), b("div", bo, [
|
|
1364
|
+
e.isLoading ? (v(), V(wt, {
|
|
1404
1365
|
key: 0,
|
|
1405
1366
|
class: "inset-0 flex items-center justify-center"
|
|
1406
|
-
})) : (
|
|
1367
|
+
})) : (v(), b("button", {
|
|
1407
1368
|
key: 1,
|
|
1408
1369
|
class: k(["btn btn-xs btn-circle", [
|
|
1409
1370
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1411,46 +1372,46 @@ const at = /* @__PURE__ */ te(qn, [["render", to]]), no = {
|
|
|
1411
1372
|
]]),
|
|
1412
1373
|
disabled: e.disabled
|
|
1413
1374
|
}, [
|
|
1414
|
-
e.isFilled ? (
|
|
1375
|
+
e.isFilled ? (v(), b("svg", {
|
|
1415
1376
|
key: 1,
|
|
1416
1377
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1417
1378
|
viewBox: "0 0 12 12",
|
|
1418
1379
|
fill: "none",
|
|
1419
1380
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1420
|
-
},
|
|
1381
|
+
}, To, 2)) : (v(), b("svg", {
|
|
1421
1382
|
key: 0,
|
|
1422
1383
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1423
1384
|
viewBox: "0 0 12 12",
|
|
1424
1385
|
fill: "none",
|
|
1425
1386
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1426
|
-
},
|
|
1427
|
-
], 10,
|
|
1387
|
+
}, So, 2))
|
|
1388
|
+
], 10, wo))
|
|
1428
1389
|
]));
|
|
1429
1390
|
}
|
|
1430
|
-
},
|
|
1391
|
+
}, Ao = {
|
|
1431
1392
|
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",
|
|
1432
1393
|
"data-tip": "AI Summarize"
|
|
1433
|
-
},
|
|
1394
|
+
}, ko = ["disabled"], Ro = /* @__PURE__ */ w("path", {
|
|
1434
1395
|
stroke: "currentColor",
|
|
1435
1396
|
"stroke-linecap": "round",
|
|
1436
1397
|
"stroke-linejoin": "round",
|
|
1437
1398
|
"stroke-width": "2",
|
|
1438
1399
|
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"
|
|
1439
|
-
}, null, -1),
|
|
1440
|
-
|
|
1441
|
-
],
|
|
1400
|
+
}, null, -1), Bo = [
|
|
1401
|
+
Ro
|
|
1402
|
+
], Io = /* @__PURE__ */ w("path", {
|
|
1442
1403
|
fill: "currentColor",
|
|
1443
1404
|
d: "M12 7a5 5 0 0 0-2 9.584V19h4v-2.416A5.001 5.001 0 0 0 12 7z"
|
|
1444
|
-
}, null, -1),
|
|
1405
|
+
}, null, -1), Mo = /* @__PURE__ */ w("path", {
|
|
1445
1406
|
stroke: "currentColor",
|
|
1446
1407
|
"stroke-linecap": "round",
|
|
1447
1408
|
"stroke-linejoin": "round",
|
|
1448
1409
|
"stroke-width": "2",
|
|
1449
1410
|
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"
|
|
1450
|
-
}, null, -1),
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
],
|
|
1411
|
+
}, null, -1), Do = [
|
|
1412
|
+
Io,
|
|
1413
|
+
Mo
|
|
1414
|
+
], Oo = {
|
|
1454
1415
|
__name: "AIExplainBtn",
|
|
1455
1416
|
props: {
|
|
1456
1417
|
isLoading: Boolean,
|
|
@@ -1458,8 +1419,8 @@ const at = /* @__PURE__ */ te(qn, [["render", to]]), no = {
|
|
|
1458
1419
|
isFilled: Boolean
|
|
1459
1420
|
},
|
|
1460
1421
|
setup(e) {
|
|
1461
|
-
return (t, n) => (
|
|
1462
|
-
e.isLoading ? (
|
|
1422
|
+
return (t, n) => (v(), b("div", Ao, [
|
|
1423
|
+
e.isLoading ? (v(), V(wt, { key: 0 })) : (v(), b("button", {
|
|
1463
1424
|
key: 1,
|
|
1464
1425
|
class: k(["btn btn-xs btn-circle", [
|
|
1465
1426
|
{ "btn-ghost": !e.disabled },
|
|
@@ -1467,23 +1428,23 @@ const at = /* @__PURE__ */ te(qn, [["render", to]]), no = {
|
|
|
1467
1428
|
]]),
|
|
1468
1429
|
disabled: e.disabled
|
|
1469
1430
|
}, [
|
|
1470
|
-
e.isFilled ? (
|
|
1431
|
+
e.isFilled ? (v(), b("svg", {
|
|
1471
1432
|
key: 1,
|
|
1472
1433
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1473
1434
|
viewBox: "0 0 24 24",
|
|
1474
1435
|
fill: "none",
|
|
1475
1436
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1476
|
-
},
|
|
1437
|
+
}, Do, 2)) : (v(), b("svg", {
|
|
1477
1438
|
key: 0,
|
|
1478
1439
|
class: k(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1479
1440
|
viewBox: "0 0 24 24",
|
|
1480
1441
|
fill: "none",
|
|
1481
1442
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1482
|
-
},
|
|
1483
|
-
], 10,
|
|
1443
|
+
}, Bo, 2))
|
|
1444
|
+
], 10, ko))
|
|
1484
1445
|
]));
|
|
1485
1446
|
}
|
|
1486
|
-
},
|
|
1447
|
+
}, Fo = {}, zo = { class: "btn btn-xs btn-ghost btn-circle" }, _o = /* @__PURE__ */ w("svg", {
|
|
1487
1448
|
class: "w-4 h-4 text-primary",
|
|
1488
1449
|
viewBox: "0 0 24 24",
|
|
1489
1450
|
fill: "none",
|
|
@@ -1497,13 +1458,13 @@ const at = /* @__PURE__ */ te(qn, [["render", to]]), no = {
|
|
|
1497
1458
|
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",
|
|
1498
1459
|
fill: "currentColor"
|
|
1499
1460
|
})
|
|
1500
|
-
], -1),
|
|
1501
|
-
|
|
1461
|
+
], -1), Po = [
|
|
1462
|
+
_o
|
|
1502
1463
|
];
|
|
1503
|
-
function
|
|
1504
|
-
return
|
|
1464
|
+
function Vo(e, t) {
|
|
1465
|
+
return v(), b("button", zo, Po);
|
|
1505
1466
|
}
|
|
1506
|
-
const
|
|
1467
|
+
const No = /* @__PURE__ */ oe(Fo, [["render", Vo]]), Ho = {}, Uo = { class: "btn btn-xs btn-circle btn-ghost" }, Wo = /* @__PURE__ */ w("svg", {
|
|
1507
1468
|
class: "w-4 h-4 text-primary",
|
|
1508
1469
|
viewBox: "0 0 16 16",
|
|
1509
1470
|
fill: "none",
|
|
@@ -1521,13 +1482,13 @@ const To = /* @__PURE__ */ te(wo, [["render", So]]), Ao = {}, Eo = { class: "btn
|
|
|
1521
1482
|
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",
|
|
1522
1483
|
fill: "currentColor"
|
|
1523
1484
|
})
|
|
1524
|
-
], -1),
|
|
1525
|
-
|
|
1485
|
+
], -1), Zo = [
|
|
1486
|
+
Wo
|
|
1526
1487
|
];
|
|
1527
|
-
function
|
|
1528
|
-
return
|
|
1488
|
+
function Xo(e, t) {
|
|
1489
|
+
return v(), b("button", Uo, Zo);
|
|
1529
1490
|
}
|
|
1530
|
-
const
|
|
1491
|
+
const jo = /* @__PURE__ */ oe(Ho, [["render", Xo]]), Yo = {
|
|
1531
1492
|
name: "ThemeSelector",
|
|
1532
1493
|
props: {
|
|
1533
1494
|
currentTheme: {
|
|
@@ -1564,7 +1525,7 @@ const Io = /* @__PURE__ */ te(Ao, [["render", Bo]]), Ro = {
|
|
|
1564
1525
|
});
|
|
1565
1526
|
}
|
|
1566
1527
|
}
|
|
1567
|
-
},
|
|
1528
|
+
}, Go = { class: "dropdown dropdown-end z-50" }, Ko = /* @__PURE__ */ w("div", {
|
|
1568
1529
|
tabindex: "0",
|
|
1569
1530
|
role: "button",
|
|
1570
1531
|
class: "btn btn-ghost btn-circle btn-xs"
|
|
@@ -1576,15 +1537,15 @@ const Io = /* @__PURE__ */ te(Ao, [["render", Bo]]), Ro = {
|
|
|
1576
1537
|
}, [
|
|
1577
1538
|
/* @__PURE__ */ w("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" })
|
|
1578
1539
|
])
|
|
1579
|
-
], -1),
|
|
1540
|
+
], -1), qo = {
|
|
1580
1541
|
tabindex: "0",
|
|
1581
1542
|
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"
|
|
1582
|
-
},
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1585
|
-
|
|
1586
|
-
w("ul",
|
|
1587
|
-
(
|
|
1543
|
+
}, Jo = ["id", "value", "checked", "onChange"], Qo = ["for"], ei = { class: "flex items-center gap-2" };
|
|
1544
|
+
function ti(e, t, n, o, i, r) {
|
|
1545
|
+
return v(), b("div", Go, [
|
|
1546
|
+
Ko,
|
|
1547
|
+
w("ul", qo, [
|
|
1548
|
+
(v(!0), b(de, null, Ce(i.availableThemes, (s) => (v(), b("li", {
|
|
1588
1549
|
key: s.value
|
|
1589
1550
|
}, [
|
|
1590
1551
|
w("input", {
|
|
@@ -1592,27 +1553,27 @@ function Po(e, t, n, o, i, l) {
|
|
|
1592
1553
|
id: `theme-${s.value}`,
|
|
1593
1554
|
value: s.value,
|
|
1594
1555
|
checked: n.currentTheme === s.value,
|
|
1595
|
-
onChange: (a) =>
|
|
1556
|
+
onChange: (a) => r.handleThemeChange(s.value),
|
|
1596
1557
|
class: "theme-controller sr-only"
|
|
1597
|
-
}, null, 40,
|
|
1558
|
+
}, null, 40, Jo),
|
|
1598
1559
|
w("label", {
|
|
1599
1560
|
for: `theme-${s.value}`,
|
|
1600
1561
|
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) =>
|
|
1562
|
+
onClick: t[0] || (t[0] = (...a) => r.handleLabelClick && r.handleLabelClick(...a))
|
|
1602
1563
|
}, [
|
|
1603
|
-
w("span",
|
|
1564
|
+
w("span", ei, [
|
|
1604
1565
|
w("span", {
|
|
1605
1566
|
class: "w-3 h-3 rounded-full",
|
|
1606
|
-
style:
|
|
1567
|
+
style: Ve({ backgroundColor: s.color })
|
|
1607
1568
|
}, null, 4),
|
|
1608
|
-
|
|
1569
|
+
ve(" " + pe(s.name), 1)
|
|
1609
1570
|
])
|
|
1610
|
-
], 10,
|
|
1571
|
+
], 10, Qo)
|
|
1611
1572
|
]))), 128))
|
|
1612
1573
|
])
|
|
1613
1574
|
]);
|
|
1614
1575
|
}
|
|
1615
|
-
const
|
|
1576
|
+
const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-col" }, ii = { class: "flex justify-start items-center" }, si = { class: "flex items-center gap-1" }, ri = /* @__PURE__ */ w("div", { class: "w-5" }, null, -1), ai = { class: "flex justify-end items-center" }, it = {
|
|
1616
1577
|
__name: "Header",
|
|
1617
1578
|
props: {
|
|
1618
1579
|
tts: String,
|
|
@@ -1647,75 +1608,102 @@ const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-co
|
|
|
1647
1608
|
setup(e, { emit: t }) {
|
|
1648
1609
|
const n = e, o = t, i = (s) => {
|
|
1649
1610
|
s.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "mouse", event: s }), s.preventDefault());
|
|
1650
|
-
},
|
|
1611
|
+
}, r = (s) => {
|
|
1651
1612
|
s.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "touch", event: s }), s.preventDefault());
|
|
1652
1613
|
};
|
|
1653
|
-
return (s, a) => (
|
|
1614
|
+
return (s, a) => (v(), b("div", oi, [
|
|
1654
1615
|
w("div", {
|
|
1655
1616
|
class: "flex p-2 pt-2 pb-1 flex-row justify-between cursor-grab active:cursor-grabbing",
|
|
1656
1617
|
onMousedown: i,
|
|
1657
|
-
onTouchstart:
|
|
1618
|
+
onTouchstart: r
|
|
1658
1619
|
}, [
|
|
1659
|
-
w("div",
|
|
1660
|
-
e.isServiceUnavailable ? M("", !0) : (
|
|
1620
|
+
w("div", ii, [
|
|
1621
|
+
e.isServiceUnavailable ? M("", !0) : (v(), V(so, {
|
|
1661
1622
|
key: 0,
|
|
1662
1623
|
disabled: e.isAITranslationLoading || e.isAIExplainLoading,
|
|
1663
1624
|
tts: n.tts,
|
|
1664
|
-
onLoadTTS: a[0] || (a[0] = (
|
|
1625
|
+
onLoadTTS: a[0] || (a[0] = (l) => s.$emit("loadTTS"))
|
|
1665
1626
|
}, null, 8, ["disabled", "tts"]))
|
|
1666
1627
|
]),
|
|
1667
|
-
w("div",
|
|
1668
|
-
|
|
1669
|
-
!e.isServiceUnavailable && e.isAITranslateVisible ? (
|
|
1628
|
+
w("div", si, [
|
|
1629
|
+
ri,
|
|
1630
|
+
!e.isServiceUnavailable && e.isAITranslateVisible ? (v(), V($o, {
|
|
1670
1631
|
key: 0,
|
|
1671
1632
|
isLoading: e.isAITranslationLoading,
|
|
1672
1633
|
isFilled: e.isAITranslate,
|
|
1673
|
-
onClick: a[1] || (a[1] = (
|
|
1634
|
+
onClick: a[1] || (a[1] = (l) => o("aiTranslate"))
|
|
1674
1635
|
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1675
|
-
!e.isServiceUnavailable && e.isAIExplainVisible ? (
|
|
1636
|
+
!e.isServiceUnavailable && e.isAIExplainVisible ? (v(), V(Oo, {
|
|
1676
1637
|
key: 1,
|
|
1677
1638
|
isLoading: e.isAIExplainLoading,
|
|
1678
1639
|
isFilled: e.isAIExplain,
|
|
1679
|
-
onClick: a[2] || (a[2] = (
|
|
1640
|
+
onClick: a[2] || (a[2] = (l) => o("aiExplain"))
|
|
1680
1641
|
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1681
|
-
!e.isServiceUnavailable && n.isFavoriteFeatureEnabled ? (
|
|
1642
|
+
!e.isServiceUnavailable && n.isFavoriteFeatureEnabled ? (v(), V(mo, {
|
|
1682
1643
|
key: 2,
|
|
1683
1644
|
isFilled: n.isFavorite,
|
|
1684
|
-
onClick: a[3] || (a[3] = (
|
|
1645
|
+
onClick: a[3] || (a[3] = (l) => o("favorite")),
|
|
1685
1646
|
disabled: e.isAITranslationLoading || e.isAIExplainLoading
|
|
1686
1647
|
}, null, 8, ["isFilled", "disabled"])) : M("", !0)
|
|
1687
1648
|
]),
|
|
1688
|
-
w("div",
|
|
1689
|
-
e.showThemeSelector ? (
|
|
1649
|
+
w("div", ai, [
|
|
1650
|
+
e.showThemeSelector ? (v(), V(ni, {
|
|
1690
1651
|
key: 0,
|
|
1691
1652
|
"current-theme": e.theme,
|
|
1692
|
-
onThemeChange: a[4] || (a[4] = (
|
|
1653
|
+
onThemeChange: a[4] || (a[4] = (l) => o("themeChange", l))
|
|
1693
1654
|
}, null, 8, ["current-theme"])) : M("", !0),
|
|
1694
|
-
|
|
1695
|
-
onClick: a[5] || (a[5] = (
|
|
1655
|
+
P(No, {
|
|
1656
|
+
onClick: a[5] || (a[5] = (l) => o("setting"))
|
|
1696
1657
|
}),
|
|
1697
|
-
|
|
1698
|
-
onClick: a[6] || (a[6] = (
|
|
1658
|
+
P(jo, {
|
|
1659
|
+
onClick: a[6] || (a[6] = (l) => o("close"))
|
|
1699
1660
|
})
|
|
1700
1661
|
])
|
|
1701
1662
|
], 32)
|
|
1702
1663
|
]));
|
|
1703
1664
|
}
|
|
1704
|
-
},
|
|
1665
|
+
}, li = { class: "pointer-events-none absolute inset-0 z-20" }, ci = ["data-resize", "aria-label", "onPointerdown"], ui = {
|
|
1666
|
+
__name: "ResizeHandle",
|
|
1667
|
+
emits: ["resizeStart"],
|
|
1668
|
+
setup(e, { emit: t }) {
|
|
1669
|
+
const n = t, o = [
|
|
1670
|
+
{ name: "n", class: "inset-x-3 top-0 h-2 cursor-ns-resize" },
|
|
1671
|
+
{ name: "s", class: "inset-x-3 bottom-0 h-2 cursor-ns-resize" },
|
|
1672
|
+
{ name: "e", class: "inset-y-3 right-0 w-2 cursor-ew-resize" },
|
|
1673
|
+
{ name: "w", class: "inset-y-3 left-0 w-2 cursor-ew-resize" },
|
|
1674
|
+
{ name: "nw", class: "left-0 top-0 h-3 w-3 cursor-nwse-resize" },
|
|
1675
|
+
{ name: "ne", class: "right-0 top-0 h-3 w-3 cursor-nesw-resize" },
|
|
1676
|
+
{ name: "sw", class: "bottom-0 left-0 h-3 w-3 cursor-nesw-resize" },
|
|
1677
|
+
{ name: "se", class: "bottom-0 right-0 h-3 w-3 cursor-nwse-resize" }
|
|
1678
|
+
], i = (r, s) => {
|
|
1679
|
+
var a, l;
|
|
1680
|
+
s.pointerType === "mouse" && s.button !== 0 || (s.preventDefault(), s.stopPropagation(), (l = (a = s.currentTarget).setPointerCapture) == null || l.call(a, s.pointerId), n("resizeStart", { edge: r, event: s }));
|
|
1681
|
+
};
|
|
1682
|
+
return (r, s) => (v(), b("div", li, [
|
|
1683
|
+
(v(), b(de, null, Ce(o, (a) => w("div", {
|
|
1684
|
+
key: a.name,
|
|
1685
|
+
"data-resize": a.name,
|
|
1686
|
+
class: k(["pointer-events-auto absolute touch-none hover:bg-base-content/20", a.class]),
|
|
1687
|
+
"aria-label": `Resize from the ${a.name} border`,
|
|
1688
|
+
onPointerdown: (l) => i(a.name, l),
|
|
1689
|
+
onClick: s[0] || (s[0] = Rt(() => {
|
|
1690
|
+
}, ["stop"]))
|
|
1691
|
+
}, null, 42, ci)), 64))
|
|
1692
|
+
]));
|
|
1693
|
+
}
|
|
1694
|
+
}, Q = {
|
|
1705
1695
|
LOGO: "LOGO",
|
|
1706
1696
|
LOADING: "LOADING",
|
|
1707
1697
|
DATA: "DATA",
|
|
1708
1698
|
ERROR: "ERROR",
|
|
1709
1699
|
HIDDEN: "HIDDEN"
|
|
1710
|
-
},
|
|
1700
|
+
}, di = 320, fi = 240, mi = 250, hi = 120, pi = 8, vi = ["ar", "fa", "iw", "yi", "ur", "pa"], gi = {
|
|
1711
1701
|
key: 0,
|
|
1712
1702
|
class: "flex justify-center"
|
|
1713
|
-
},
|
|
1703
|
+
}, Ci = {
|
|
1714
1704
|
key: 1,
|
|
1715
1705
|
class: "flex justify-center"
|
|
1716
|
-
},
|
|
1717
|
-
class: /* @__PURE__ */ k(["bg-base-100 rounded-md relative z-10"])
|
|
1718
|
-
}, Go = { class: "p-3 border-t border-base-300" }, qo = {
|
|
1706
|
+
}, bi = { class: "p-3 border-t border-base-300" }, wi = {
|
|
1719
1707
|
name: "Bubble",
|
|
1720
1708
|
props: [
|
|
1721
1709
|
"translation",
|
|
@@ -1728,7 +1716,8 @@ const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-co
|
|
|
1728
1716
|
"isAIExplain",
|
|
1729
1717
|
"aiExplainMinLength",
|
|
1730
1718
|
"theme",
|
|
1731
|
-
"showThemeSelector"
|
|
1719
|
+
"showThemeSelector",
|
|
1720
|
+
"constrained"
|
|
1732
1721
|
],
|
|
1733
1722
|
emits: [
|
|
1734
1723
|
"logo",
|
|
@@ -1740,7 +1729,8 @@ const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-co
|
|
|
1740
1729
|
"aiExplain",
|
|
1741
1730
|
"learn",
|
|
1742
1731
|
"themeChange",
|
|
1743
|
-
"dragStart"
|
|
1732
|
+
"dragStart",
|
|
1733
|
+
"resizeStart"
|
|
1744
1734
|
],
|
|
1745
1735
|
data() {
|
|
1746
1736
|
return {
|
|
@@ -1802,32 +1792,39 @@ const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-co
|
|
|
1802
1792
|
immediate: !0
|
|
1803
1793
|
},
|
|
1804
1794
|
status() {
|
|
1805
|
-
this.status ===
|
|
1795
|
+
this.status === Q.ERROR && (this.isServiceUnavailable = !0);
|
|
1806
1796
|
}
|
|
1807
1797
|
}
|
|
1808
|
-
},
|
|
1798
|
+
}, yi = /* @__PURE__ */ Object.assign(wi, {
|
|
1809
1799
|
setup(e) {
|
|
1810
1800
|
return (t, n) => {
|
|
1811
|
-
var o, i,
|
|
1812
|
-
return e.status ===
|
|
1813
|
-
|
|
1801
|
+
var o, i, r, s, a, l, c, u, d, h, m;
|
|
1802
|
+
return e.status === Te(Q).LOGO ? (v(), b("div", gi, [
|
|
1803
|
+
P(bn, {
|
|
1814
1804
|
onClick: n[0] || (n[0] = (f) => t.$emit("logo"))
|
|
1815
1805
|
})
|
|
1816
|
-
])) : e.status ===
|
|
1817
|
-
|
|
1818
|
-
])) : e.status !==
|
|
1806
|
+
])) : e.status === Te(Q).LOADING ? (v(), b("div", Ci, [
|
|
1807
|
+
P(An)
|
|
1808
|
+
])) : e.status !== Te(Q).HIDDEN ? (v(), b("div", {
|
|
1819
1809
|
key: 2,
|
|
1820
1810
|
class: k([
|
|
1821
1811
|
"wrapper rounded-lg text-base-content text-sm shadow-lg relative bg-[length:300%_300%] bg-[position:0%_50%]",
|
|
1812
|
+
e.constrained ? "flex h-full w-full min-w-0 flex-col" : "",
|
|
1822
1813
|
{
|
|
1823
1814
|
"p-0.5 bg-gradient-to-br from-primary via-secondary via-accent to-info animate-moveGradient": e.isAITranslate || e.isAIExplain,
|
|
1824
1815
|
"p-0.5 bg-base-300": !e.isAITranslate && !e.isAIExplain
|
|
1825
1816
|
}
|
|
1826
1817
|
])
|
|
1827
1818
|
}, [
|
|
1828
|
-
w("div",
|
|
1829
|
-
|
|
1819
|
+
w("div", {
|
|
1820
|
+
class: k([
|
|
1821
|
+
"bg-base-100 rounded-md relative z-10",
|
|
1822
|
+
e.constrained ? "flex min-h-0 min-w-0 flex-1 flex-col" : ""
|
|
1823
|
+
])
|
|
1824
|
+
}, [
|
|
1825
|
+
t.isServiceUnavailable ? (v(), V(it, {
|
|
1830
1826
|
key: 0,
|
|
1827
|
+
class: "shrink-0",
|
|
1831
1828
|
isServiceUnavailable: t.isServiceUnavailable,
|
|
1832
1829
|
isLongSentence: !1,
|
|
1833
1830
|
theme: e.theme,
|
|
@@ -1837,14 +1834,15 @@ const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-co
|
|
|
1837
1834
|
onClose: n[3] || (n[3] = (f) => t.$emit("close")),
|
|
1838
1835
|
onLoadTTS: n[4] || (n[4] = (f) => t.$emit("loadTTS")),
|
|
1839
1836
|
onThemeChange: n[5] || (n[5] = (f) => t.$emit("themeChange", f))
|
|
1840
|
-
}, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector"])) : (
|
|
1837
|
+
}, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector"])) : (v(), V(it, {
|
|
1841
1838
|
key: 1,
|
|
1839
|
+
class: "shrink-0",
|
|
1842
1840
|
tts: e.tts,
|
|
1843
1841
|
isFavorite: e.isFavorite,
|
|
1844
1842
|
isAITranslate: e.isAITranslate,
|
|
1845
1843
|
isAITranslateVisible: ((i = (o = t.data) == null ? void 0 : o.dictionary) == null ? void 0 : i.length) === 0,
|
|
1846
1844
|
isAIExplain: e.isAIExplain,
|
|
1847
|
-
isAIExplainVisible: ((s = (
|
|
1845
|
+
isAIExplainVisible: ((s = (r = t.data) == null ? void 0 : r.text) == null ? void 0 : s.length) >= e.aiExplainMinLength,
|
|
1848
1846
|
isAITranslationLoading: t.isAITranslationLoading,
|
|
1849
1847
|
isAIExplainLoading: t.isAIExplainLoading,
|
|
1850
1848
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
@@ -1860,50 +1858,59 @@ const No = /* @__PURE__ */ te(Ro, [["render", Po]]), Ho = { class: "flex flex-co
|
|
|
1860
1858
|
onThemeChange: n[10] || (n[10] = (f) => t.$emit("themeChange", f)),
|
|
1861
1859
|
onDragStart: n[11] || (n[11] = (f) => t.$emit("dragStart", f))
|
|
1862
1860
|
}, null, 8, ["tts", "isFavorite", "isAITranslate", "isAITranslateVisible", "isAIExplain", "isAIExplainVisible", "isAITranslationLoading", "isAIExplainLoading", "isFavoriteFeatureEnabled", "isLongSentence", "theme", "showThemeSelector", "onAiTranslate", "onAiExplain"])),
|
|
1863
|
-
w("div",
|
|
1864
|
-
|
|
1861
|
+
w("div", {
|
|
1862
|
+
class: k(
|
|
1863
|
+
e.constrained ? "min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden break-words overscroll-contain" : ""
|
|
1864
|
+
)
|
|
1865
|
+
}, [
|
|
1866
|
+
w("div", bi, [
|
|
1867
|
+
(l = (a = t.data) == null ? void 0 : a.phonetic) != null && l.src ? (v(), V(Mn, {
|
|
1868
|
+
key: 0,
|
|
1869
|
+
phonetic: (u = (c = t.data) == null ? void 0 : c.phonetic) == null ? void 0 : u.src
|
|
1870
|
+
}, null, 8, ["phonetic"])) : M("", !0),
|
|
1871
|
+
P(On, {
|
|
1872
|
+
sentences: t.isServiceUnavailable ? "Service Unavailable" : (d = t.data) == null ? void 0 : d.result
|
|
1873
|
+
}, null, 8, ["sentences"]),
|
|
1874
|
+
P(_n, {
|
|
1875
|
+
show: t.showAIPrompt,
|
|
1876
|
+
isLoading: t.isAITranslationLoading,
|
|
1877
|
+
onClick: t.handleAITranslate
|
|
1878
|
+
}, null, 8, ["show", "isLoading", "onClick"]),
|
|
1879
|
+
P(Nn, {
|
|
1880
|
+
show: t.showAIExplainPrompt,
|
|
1881
|
+
isLoading: t.isAIExplainLoading,
|
|
1882
|
+
onClick: t.handleAIExplain
|
|
1883
|
+
}, null, 8, ["show", "isLoading", "onClick"]),
|
|
1884
|
+
P(Wn, {
|
|
1885
|
+
show: t.showLearnPrompt,
|
|
1886
|
+
onClick: t.handleLearn
|
|
1887
|
+
}, null, 8, ["show", "onClick"])
|
|
1888
|
+
]),
|
|
1889
|
+
!t.isServiceUnavailable && ((m = (h = t.data) == null ? void 0 : h.dictionary) == null ? void 0 : m.length) > 0 ? (v(), V(jn, {
|
|
1865
1890
|
key: 0,
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
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"])
|
|
1885
|
-
]),
|
|
1886
|
-
!t.isServiceUnavailable && ((m = (h = t.data) == null ? void 0 : h.dictionary) == null ? void 0 : m.length) > 0 ? (g(), V(In, {
|
|
1887
|
-
key: 2,
|
|
1888
|
-
class: "p-3 pt-0 border-t border-base-300",
|
|
1889
|
-
dictionary: t.data.dictionary
|
|
1890
|
-
}, null, 8, ["dictionary"])) : M("", !0),
|
|
1891
|
-
!t.isServiceUnavailable && e.isAIExplain && e.explanation ? (g(), V(Dn, {
|
|
1892
|
-
key: 3,
|
|
1893
|
-
class: "p-3 pt-0 border-t border-base-300",
|
|
1894
|
-
explanation: e.explanation
|
|
1895
|
-
}, null, 8, ["explanation"])) : M("", !0)
|
|
1896
|
-
])
|
|
1891
|
+
class: "p-3 pt-0 border-t border-base-300",
|
|
1892
|
+
dictionary: t.data.dictionary
|
|
1893
|
+
}, null, 8, ["dictionary"])) : M("", !0),
|
|
1894
|
+
!t.isServiceUnavailable && e.isAIExplain && e.explanation ? (v(), V(Jn, {
|
|
1895
|
+
key: 1,
|
|
1896
|
+
class: "p-3 pt-0 border-t border-base-300",
|
|
1897
|
+
explanation: e.explanation
|
|
1898
|
+
}, null, 8, ["explanation"])) : M("", !0)
|
|
1899
|
+
], 2),
|
|
1900
|
+
P(ui, {
|
|
1901
|
+
onResizeStart: n[12] || (n[12] = (f) => t.$emit("resizeStart", f))
|
|
1902
|
+
})
|
|
1903
|
+
], 2)
|
|
1897
1904
|
], 2)) : M("", !0);
|
|
1898
1905
|
};
|
|
1899
1906
|
}
|
|
1900
1907
|
});
|
|
1901
|
-
function
|
|
1908
|
+
function xi(e) {
|
|
1902
1909
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1903
1910
|
}
|
|
1904
|
-
var
|
|
1905
|
-
function
|
|
1906
|
-
return
|
|
1911
|
+
var Pe = { exports: {} }, st;
|
|
1912
|
+
function Li() {
|
|
1913
|
+
return st || (st = 1, function(e) {
|
|
1907
1914
|
(function() {
|
|
1908
1915
|
var t = [
|
|
1909
1916
|
"direction",
|
|
@@ -1943,61 +1950,61 @@ function ei() {
|
|
|
1943
1950
|
"tabSize",
|
|
1944
1951
|
"MozTabSize"
|
|
1945
1952
|
], n = typeof window < "u", o = n && window.mozInnerScreenX != null;
|
|
1946
|
-
function i(
|
|
1953
|
+
function i(r, s, a) {
|
|
1947
1954
|
if (!n)
|
|
1948
1955
|
throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");
|
|
1949
|
-
var
|
|
1950
|
-
if (
|
|
1956
|
+
var l = a && a.debug || !1;
|
|
1957
|
+
if (l) {
|
|
1951
1958
|
var c = document.querySelector("#input-textarea-caret-position-mirror-div");
|
|
1952
1959
|
c && c.parentNode.removeChild(c);
|
|
1953
1960
|
}
|
|
1954
|
-
var
|
|
1955
|
-
|
|
1956
|
-
var
|
|
1957
|
-
|
|
1958
|
-
m &&
|
|
1959
|
-
}), o ?
|
|
1961
|
+
var u = document.createElement("div");
|
|
1962
|
+
u.id = "input-textarea-caret-position-mirror-div", document.body.appendChild(u);
|
|
1963
|
+
var d = u.style, h = window.getComputedStyle ? window.getComputedStyle(r) : r.currentStyle, m = r.nodeName === "INPUT";
|
|
1964
|
+
d.whiteSpace = "pre-wrap", m || (d.wordWrap = "break-word"), d.position = "absolute", l || (d.visibility = "hidden"), t.forEach(function(y) {
|
|
1965
|
+
m && y === "lineHeight" ? d.lineHeight = h.height : d[y] = h[y];
|
|
1966
|
+
}), o ? r.scrollHeight > parseInt(h.height) && (d.overflowY = "scroll") : d.overflow = "hidden", u.textContent = r.value.substring(0, s), m && (u.textContent = u.textContent.replace(/\s/g, " "));
|
|
1960
1967
|
var f = document.createElement("span");
|
|
1961
|
-
f.textContent =
|
|
1962
|
-
var
|
|
1968
|
+
f.textContent = r.value.substring(s) || ".", u.appendChild(f);
|
|
1969
|
+
var g = {
|
|
1963
1970
|
top: f.offsetTop + parseInt(h.borderTopWidth),
|
|
1964
1971
|
left: f.offsetLeft + parseInt(h.borderLeftWidth),
|
|
1965
1972
|
height: parseInt(h.lineHeight)
|
|
1966
1973
|
};
|
|
1967
|
-
return
|
|
1974
|
+
return l ? f.style.backgroundColor = "#aaa" : document.body.removeChild(u), g;
|
|
1968
1975
|
}
|
|
1969
1976
|
e.exports = i;
|
|
1970
1977
|
})();
|
|
1971
|
-
}(
|
|
1978
|
+
}(Pe)), Pe.exports;
|
|
1972
1979
|
}
|
|
1973
|
-
var
|
|
1974
|
-
const
|
|
1975
|
-
function
|
|
1980
|
+
var Si = Li();
|
|
1981
|
+
const rt = /* @__PURE__ */ xi(Si);
|
|
1982
|
+
function re(e) {
|
|
1976
1983
|
const t = window.getSelection();
|
|
1977
1984
|
let n = t + "";
|
|
1978
1985
|
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)))
|
|
1979
1986
|
return !1;
|
|
1980
|
-
let i = t.getRangeAt(0).getBoundingClientRect(), { top:
|
|
1987
|
+
let i = t.getRangeAt(0).getBoundingClientRect(), { top: r, bottom: s, left: a, width: l, height: c } = i;
|
|
1981
1988
|
if (!s && !a) {
|
|
1982
1989
|
if (!e.selectionEnd)
|
|
1983
1990
|
return !1;
|
|
1984
|
-
let
|
|
1985
|
-
i = e.getBoundingClientRect(), a = i.left +
|
|
1991
|
+
let u = rt(e, e.selectionStart), d = rt(e, e.selectionEnd);
|
|
1992
|
+
i = e.getBoundingClientRect(), a = i.left + u.left, l = d.left - u.left, u.top != d.top && (a = i.left, l = i.width), r = i.top + u.top, s = i.top + d.top + 20;
|
|
1986
1993
|
}
|
|
1987
|
-
return c === 0 && (c = s -
|
|
1994
|
+
return c === 0 && (c = s - r), {
|
|
1988
1995
|
text: n,
|
|
1989
1996
|
// position
|
|
1990
1997
|
x: a,
|
|
1991
|
-
y:
|
|
1992
|
-
top:
|
|
1998
|
+
y: r,
|
|
1999
|
+
top: r,
|
|
1993
2000
|
bottom: s,
|
|
1994
2001
|
left: a,
|
|
1995
|
-
right: a +
|
|
1996
|
-
width:
|
|
2002
|
+
right: a + l,
|
|
2003
|
+
width: l,
|
|
1997
2004
|
height: c
|
|
1998
2005
|
};
|
|
1999
2006
|
}
|
|
2000
|
-
function
|
|
2007
|
+
function Ei() {
|
|
2001
2008
|
const e = document.getElementsByTagName("ddict-div");
|
|
2002
2009
|
for (let t of e)
|
|
2003
2010
|
if (!t.parentNode.matches('wrapper[dir="rtl"]')) {
|
|
@@ -2005,17 +2012,76 @@ function ni() {
|
|
|
2005
2012
|
n.setAttribute("dir", "rtl"), t.parentNode.insertBefore(n, t), n.appendChild(t);
|
|
2006
2013
|
}
|
|
2007
2014
|
}
|
|
2008
|
-
function
|
|
2015
|
+
function Ti() {
|
|
2009
2016
|
const e = document.querySelectorAll('wrapper[dir="rtl"]');
|
|
2010
2017
|
for (let t of e) {
|
|
2011
2018
|
const n = t.querySelector("ddict-div");
|
|
2012
2019
|
n && (t.parentNode.insertBefore(n, t), t.remove());
|
|
2013
2020
|
}
|
|
2014
2021
|
}
|
|
2015
|
-
const
|
|
2016
|
-
supportRTL:
|
|
2017
|
-
removeRTL:
|
|
2018
|
-
},
|
|
2022
|
+
const at = {
|
|
2023
|
+
supportRTL: Ei,
|
|
2024
|
+
removeRTL: Ti
|
|
2025
|
+
}, $i = 2, Ai = {
|
|
2026
|
+
n: { x: !1, y: !0, fromStartX: !1, fromStartY: !0 },
|
|
2027
|
+
s: { x: !1, y: !0, fromStartX: !1, fromStartY: !1 },
|
|
2028
|
+
e: { x: !0, y: !1, fromStartX: !1, fromStartY: !1 },
|
|
2029
|
+
w: { x: !0, y: !1, fromStartX: !0, fromStartY: !1 },
|
|
2030
|
+
ne: { x: !0, y: !0, fromStartX: !1, fromStartY: !0 },
|
|
2031
|
+
nw: { x: !0, y: !0, fromStartX: !0, fromStartY: !0 },
|
|
2032
|
+
se: { x: !0, y: !0, fromStartX: !1, fromStartY: !1 },
|
|
2033
|
+
sw: { x: !0, y: !0, fromStartX: !0, fromStartY: !1 }
|
|
2034
|
+
};
|
|
2035
|
+
function ki(e, t, n = $i) {
|
|
2036
|
+
return Math.abs(e) >= n || Math.abs(t) >= n;
|
|
2037
|
+
}
|
|
2038
|
+
function Ee(e, t, n) {
|
|
2039
|
+
const o = n > t ? n : t;
|
|
2040
|
+
return Math.min(o, Math.max(t, e));
|
|
2041
|
+
}
|
|
2042
|
+
function Ri({
|
|
2043
|
+
x: e,
|
|
2044
|
+
y: t,
|
|
2045
|
+
width: n,
|
|
2046
|
+
height: o,
|
|
2047
|
+
dx: i,
|
|
2048
|
+
dy: r,
|
|
2049
|
+
scale: s = 1,
|
|
2050
|
+
edge: a,
|
|
2051
|
+
minWidth: l,
|
|
2052
|
+
minHeight: c,
|
|
2053
|
+
viewportWidth: u,
|
|
2054
|
+
viewportHeight: d,
|
|
2055
|
+
margin: h = 8
|
|
2056
|
+
}) {
|
|
2057
|
+
const m = Ai[a];
|
|
2058
|
+
if (!m) return { x: e, y: t, width: n, height: o };
|
|
2059
|
+
const f = s > 0 ? s : 1, g = e + n * f, y = t + o * f, x = u - h, L = d - h;
|
|
2060
|
+
let S = e, $ = t, T = n, I = o;
|
|
2061
|
+
if (m.x && m.fromStartX) {
|
|
2062
|
+
const E = h, D = g - l * f;
|
|
2063
|
+
S = Ee(e + i, E, D), T = (g - S) / f;
|
|
2064
|
+
} else m.x && (T = Ee(
|
|
2065
|
+
n + i / f,
|
|
2066
|
+
l,
|
|
2067
|
+
Math.max(l, (x - e) / f)
|
|
2068
|
+
));
|
|
2069
|
+
if (m.y && m.fromStartY) {
|
|
2070
|
+
const E = h, D = y - c * f;
|
|
2071
|
+
$ = Ee(t + r, E, D), I = (y - $) / f;
|
|
2072
|
+
} else m.y && (I = Ee(
|
|
2073
|
+
o + r / f,
|
|
2074
|
+
c,
|
|
2075
|
+
Math.max(c, (L - t) / f)
|
|
2076
|
+
));
|
|
2077
|
+
return {
|
|
2078
|
+
x: Math.round(S),
|
|
2079
|
+
y: Math.round($),
|
|
2080
|
+
width: Math.round(T),
|
|
2081
|
+
height: Math.round(I)
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
const Bi = {
|
|
2019
2085
|
__name: "HotKeysListener",
|
|
2020
2086
|
props: {
|
|
2021
2087
|
textSelected: String
|
|
@@ -2026,12 +2092,12 @@ const Ge = {
|
|
|
2026
2092
|
setTimeout(() => {
|
|
2027
2093
|
n.textSelected && a("DoubleClick");
|
|
2028
2094
|
}, 50);
|
|
2029
|
-
},
|
|
2030
|
-
(
|
|
2031
|
-
}, s = (
|
|
2032
|
-
|
|
2033
|
-
}, a = (
|
|
2034
|
-
switch (
|
|
2095
|
+
}, r = (l) => {
|
|
2096
|
+
(l.altKey && l.key.toLowerCase() === "w" || l.key === "∑") && n.textSelected && (a("Alt+W"), l.preventDefault()), l.key === "Escape" && (a("Escape"), l.preventDefault());
|
|
2097
|
+
}, s = (l) => {
|
|
2098
|
+
l.key === "Shift" && n.textSelected && a("Shift");
|
|
2099
|
+
}, a = (l) => {
|
|
2100
|
+
switch (l) {
|
|
2035
2101
|
case "DoubleClick":
|
|
2036
2102
|
o("toggleKey", "DoubleClick");
|
|
2037
2103
|
break;
|
|
@@ -2046,13 +2112,13 @@ const Ge = {
|
|
|
2046
2112
|
break;
|
|
2047
2113
|
}
|
|
2048
2114
|
};
|
|
2049
|
-
return
|
|
2050
|
-
window.addEventListener("dblclick", i), window.addEventListener("keydown",
|
|
2051
|
-
}),
|
|
2052
|
-
window.removeEventListener("dblclick", i), window.removeEventListener("keydown",
|
|
2053
|
-
}), (
|
|
2115
|
+
return lt(() => {
|
|
2116
|
+
window.addEventListener("dblclick", i), window.addEventListener("keydown", r), window.addEventListener("keyup", s);
|
|
2117
|
+
}), Ue(() => {
|
|
2118
|
+
window.removeEventListener("dblclick", i), window.removeEventListener("keydown", r), window.removeEventListener("keyup", s);
|
|
2119
|
+
}), (l, c) => (v(), b("div"));
|
|
2054
2120
|
}
|
|
2055
|
-
},
|
|
2121
|
+
}, Ii = ["data-theme"], Di = {
|
|
2056
2122
|
__name: "BubbleWrapper",
|
|
2057
2123
|
props: {
|
|
2058
2124
|
translation: Object,
|
|
@@ -2093,148 +2159,218 @@ const Ge = {
|
|
|
2093
2159
|
"themeChange"
|
|
2094
2160
|
],
|
|
2095
2161
|
setup(e, { emit: t }) {
|
|
2096
|
-
const n = e, o = t, i =
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2162
|
+
const n = e, o = t, i = R(null), r = R(null), s = R(null), a = R(!1), l = R(""), c = R(n.theme), u = R(!1), d = R(!1), h = R({ x: 0, y: 0 }), m = R(null), f = R(null), g = R(null), y = R(!1);
|
|
2163
|
+
let x = !1, L = 0, S = !1, $ = "", T = "";
|
|
2164
|
+
const I = B(() => typeof window > "u" || !s.value || !l.value ? null : {
|
|
2165
|
+
getBoundingClientRect: () => re(s.value),
|
|
2166
|
+
getClientRects: () => re(s.value)
|
|
2167
|
+
}), { floatingStyles: E, update: D } = hn(I, i, {
|
|
2100
2168
|
placement: "bottom",
|
|
2101
|
-
middleware: [
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
jt(),
|
|
2105
|
-
Xt({
|
|
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",
|
|
2110
|
-
zIndex: 9999
|
|
2111
|
-
});
|
|
2112
|
-
}
|
|
2113
|
-
})
|
|
2114
|
-
],
|
|
2115
|
-
whileElementsMounted(b, p, $) {
|
|
2116
|
-
return Ut(b, p, $, {
|
|
2169
|
+
middleware: [cn(4), dn(), un()],
|
|
2170
|
+
whileElementsMounted(p, C, A) {
|
|
2171
|
+
return ln(p, C, A, {
|
|
2117
2172
|
ancestorScroll: !0,
|
|
2118
2173
|
elementResize: !1
|
|
2119
2174
|
});
|
|
2120
2175
|
}
|
|
2121
|
-
}),
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2176
|
+
}), H = B(
|
|
2177
|
+
() => n.status === Q.DATA || n.status === Q.ERROR
|
|
2178
|
+
), O = B(() => {
|
|
2179
|
+
var p, C;
|
|
2180
|
+
return H.value ? {
|
|
2181
|
+
width: ((p = f.value) == null ? void 0 : p.width) ?? di,
|
|
2182
|
+
height: ((C = f.value) == null ? void 0 : C.height) ?? fi
|
|
2183
|
+
} : null;
|
|
2184
|
+
}), we = B(() => {
|
|
2185
|
+
let p = E.value;
|
|
2186
|
+
if (m.value)
|
|
2187
|
+
p = {
|
|
2188
|
+
...p,
|
|
2126
2189
|
position: "fixed",
|
|
2127
|
-
left: `${
|
|
2128
|
-
top: `${
|
|
2190
|
+
left: `${m.value.x}px`,
|
|
2191
|
+
top: `${m.value.y}px`,
|
|
2129
2192
|
transform: "none"
|
|
2130
2193
|
};
|
|
2131
|
-
else if (
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2134
|
-
...
|
|
2194
|
+
else if (y.value && s.value && l.value) {
|
|
2195
|
+
const C = re(s.value);
|
|
2196
|
+
C && (p = {
|
|
2197
|
+
...p,
|
|
2135
2198
|
position: "fixed",
|
|
2136
|
-
left: `${
|
|
2137
|
-
top: `${
|
|
2199
|
+
left: `${C.x}px`,
|
|
2200
|
+
top: `${C.y + C.height + 4}px`,
|
|
2138
2201
|
transform: "none"
|
|
2139
2202
|
});
|
|
2140
2203
|
}
|
|
2141
|
-
return
|
|
2204
|
+
return p = {
|
|
2205
|
+
...p,
|
|
2206
|
+
zIndex: 9999
|
|
2207
|
+
}, O.value && (p = {
|
|
2208
|
+
...p,
|
|
2209
|
+
width: `${O.value.width}px`,
|
|
2210
|
+
height: `${O.value.height}px`,
|
|
2211
|
+
maxWidth: `${O.value.width}px`,
|
|
2212
|
+
boxSizing: "border-box"
|
|
2213
|
+
}), p;
|
|
2214
|
+
}), ye = B(() => {
|
|
2215
|
+
const p = {
|
|
2216
|
+
transform: n.scale !== 1 ? `scale(${n.scale})` : "none",
|
|
2217
|
+
transformOrigin: "top left"
|
|
2218
|
+
};
|
|
2219
|
+
return O.value && (p.width = `${O.value.width}px`, p.height = `${O.value.height}px`, p.boxSizing = "border-box"), p;
|
|
2142
2220
|
});
|
|
2143
|
-
|
|
2144
|
-
document.addEventListener("keyup", (
|
|
2145
|
-
if (!
|
|
2146
|
-
|
|
2221
|
+
lt(() => {
|
|
2222
|
+
document.addEventListener("keyup", (p) => {
|
|
2223
|
+
if (!re(p.target)) {
|
|
2224
|
+
l.value = "", j();
|
|
2147
2225
|
return;
|
|
2148
2226
|
}
|
|
2149
|
-
}), document.documentElement.onclick = (
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2227
|
+
}), document.documentElement.onclick = (p) => {
|
|
2228
|
+
if (Ye()) return;
|
|
2229
|
+
const C = re(p.target);
|
|
2230
|
+
if (!C) {
|
|
2231
|
+
l.value = "", j();
|
|
2153
2232
|
return;
|
|
2154
2233
|
}
|
|
2155
|
-
|
|
2156
|
-
}, document.documentElement.ontouchend = (
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2234
|
+
fe(C, p);
|
|
2235
|
+
}, document.documentElement.ontouchend = (p) => {
|
|
2236
|
+
if (Ye()) return;
|
|
2237
|
+
const C = re(p.target);
|
|
2238
|
+
if (!C) {
|
|
2239
|
+
l.value = "", j();
|
|
2160
2240
|
return;
|
|
2161
2241
|
}
|
|
2162
|
-
|
|
2242
|
+
fe(C, p);
|
|
2163
2243
|
};
|
|
2164
|
-
}),
|
|
2165
|
-
document.documentElement.onclick = null, document.documentElement.ontouchend = null, document.removeEventListener("mousemove",
|
|
2244
|
+
}), Ue(() => {
|
|
2245
|
+
document.documentElement.onclick = null, document.documentElement.ontouchend = null, clearTimeout(L), document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", me), document.removeEventListener("touchmove", _), document.removeEventListener("touchend", Oe), ze();
|
|
2166
2246
|
});
|
|
2167
|
-
const
|
|
2168
|
-
n.status !==
|
|
2169
|
-
},
|
|
2170
|
-
|
|
2171
|
-
},
|
|
2172
|
-
|
|
2173
|
-
},
|
|
2174
|
-
|
|
2175
|
-
},
|
|
2176
|
-
|
|
2177
|
-
const
|
|
2178
|
-
if (
|
|
2179
|
-
|
|
2180
|
-
x:
|
|
2181
|
-
y:
|
|
2182
|
-
}, document.addEventListener("mousemove",
|
|
2183
|
-
else if (
|
|
2184
|
-
const
|
|
2185
|
-
|
|
2186
|
-
x:
|
|
2187
|
-
y:
|
|
2188
|
-
}, document.addEventListener("touchmove",
|
|
2247
|
+
const fe = (p, C) => {
|
|
2248
|
+
n.status !== Q.LOGO && o("close"), a.value && !y.value && (y.value = !0), s.value = C.target, l.value = p.text, a.value = !0, Ke(D);
|
|
2249
|
+
}, Z = (p) => {
|
|
2250
|
+
p.stopPropagation();
|
|
2251
|
+
}, j = async () => {
|
|
2252
|
+
ze(), a.value = !1, m.value = null, y.value = !1, o("close");
|
|
2253
|
+
}, q = (p) => {
|
|
2254
|
+
c.value = p, o("themeChange", p);
|
|
2255
|
+
}, Y = ({ type: p, event: C }) => {
|
|
2256
|
+
u.value = !0;
|
|
2257
|
+
const A = i.value.getBoundingClientRect();
|
|
2258
|
+
if (p === "mouse")
|
|
2259
|
+
h.value = {
|
|
2260
|
+
x: C.clientX - A.left,
|
|
2261
|
+
y: C.clientY - A.top
|
|
2262
|
+
}, document.addEventListener("mousemove", z), document.addEventListener("mouseup", me);
|
|
2263
|
+
else if (p === "touch") {
|
|
2264
|
+
const ie = C.touches[0];
|
|
2265
|
+
h.value = {
|
|
2266
|
+
x: ie.clientX - A.left,
|
|
2267
|
+
y: ie.clientY - A.top
|
|
2268
|
+
}, document.addEventListener("touchmove", _), document.addEventListener("touchend", Oe);
|
|
2189
2269
|
}
|
|
2190
|
-
},
|
|
2191
|
-
|
|
2192
|
-
x:
|
|
2193
|
-
y:
|
|
2270
|
+
}, z = (p) => {
|
|
2271
|
+
u.value && (m.value = {
|
|
2272
|
+
x: p.clientX - h.value.x,
|
|
2273
|
+
y: p.clientY - h.value.y
|
|
2194
2274
|
});
|
|
2195
|
-
},
|
|
2196
|
-
if (!
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2199
|
-
x:
|
|
2200
|
-
y:
|
|
2275
|
+
}, _ = (p) => {
|
|
2276
|
+
if (!u.value) return;
|
|
2277
|
+
const C = p.touches[0];
|
|
2278
|
+
m.value = {
|
|
2279
|
+
x: C.clientX - h.value.x,
|
|
2280
|
+
y: C.clientY - h.value.y
|
|
2201
2281
|
};
|
|
2202
|
-
},
|
|
2203
|
-
|
|
2204
|
-
},
|
|
2205
|
-
|
|
2206
|
-
},
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2282
|
+
}, me = () => {
|
|
2283
|
+
u.value && Fe(), u.value = !1, document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", me);
|
|
2284
|
+
}, Oe = () => {
|
|
2285
|
+
u.value && Fe(), u.value = !1, document.removeEventListener("touchmove", _), document.removeEventListener("touchend", Oe);
|
|
2286
|
+
}, Ye = () => u.value || d.value ? !0 : x ? (x = !1, clearTimeout(L), !0) : !1, Fe = () => {
|
|
2287
|
+
x = !0, clearTimeout(L), L = window.setTimeout(() => {
|
|
2288
|
+
x = !1;
|
|
2289
|
+
}, 50);
|
|
2290
|
+
}, yt = {
|
|
2291
|
+
n: "ns-resize",
|
|
2292
|
+
s: "ns-resize",
|
|
2293
|
+
e: "ew-resize",
|
|
2294
|
+
w: "ew-resize",
|
|
2295
|
+
ne: "nesw-resize",
|
|
2296
|
+
sw: "nesw-resize",
|
|
2297
|
+
nw: "nwse-resize",
|
|
2298
|
+
se: "nwse-resize"
|
|
2299
|
+
}, xt = (p) => {
|
|
2300
|
+
!document.body || S || ($ = document.body.style.cursor, T = document.body.style.userSelect, document.body.style.cursor = yt[p] || "nwse-resize", document.body.style.userSelect = "none", S = !0);
|
|
2301
|
+
}, Lt = () => {
|
|
2302
|
+
!document.body || !S || (document.body.style.cursor = $, document.body.style.userSelect = T, S = !1);
|
|
2303
|
+
}, St = ({ edge: p, event: C }) => {
|
|
2304
|
+
if (!r.value || !i.value || !r.value.offsetWidth || !r.value.offsetHeight) return;
|
|
2305
|
+
const A = i.value.getBoundingClientRect();
|
|
2306
|
+
d.value = !0, g.value = {
|
|
2307
|
+
pointerX: C.clientX,
|
|
2308
|
+
pointerY: C.clientY,
|
|
2309
|
+
left: A.left,
|
|
2310
|
+
top: A.top,
|
|
2311
|
+
width: r.value.offsetWidth,
|
|
2312
|
+
height: r.value.offsetHeight,
|
|
2313
|
+
edge: p,
|
|
2314
|
+
moved: !1
|
|
2315
|
+
}, xt(p), document.addEventListener("pointermove", Ge), document.addEventListener("pointerup", xe), document.addEventListener("pointercancel", xe);
|
|
2316
|
+
}, Et = (p, C) => {
|
|
2317
|
+
if (!d.value || !g.value || !i.value) return;
|
|
2318
|
+
const A = p - g.value.pointerX, ie = C - g.value.pointerY;
|
|
2319
|
+
if (!g.value.moved && !ki(A, ie)) return;
|
|
2320
|
+
g.value.moved = !0;
|
|
2321
|
+
const Le = Ri({
|
|
2322
|
+
x: g.value.left,
|
|
2323
|
+
y: g.value.top,
|
|
2324
|
+
width: g.value.width,
|
|
2325
|
+
height: g.value.height,
|
|
2326
|
+
dx: A,
|
|
2327
|
+
dy: ie,
|
|
2328
|
+
scale: n.scale,
|
|
2329
|
+
edge: g.value.edge,
|
|
2330
|
+
minWidth: mi,
|
|
2331
|
+
minHeight: hi,
|
|
2332
|
+
viewportWidth: window.innerWidth,
|
|
2333
|
+
viewportHeight: window.innerHeight,
|
|
2334
|
+
margin: pi
|
|
2335
|
+
});
|
|
2336
|
+
m.value = { x: Le.x, y: Le.y }, f.value = { width: Le.width, height: Le.height };
|
|
2337
|
+
}, Ge = (p) => {
|
|
2338
|
+
p.cancelable && p.preventDefault(), Et(p.clientX, p.clientY);
|
|
2339
|
+
}, xe = () => {
|
|
2340
|
+
ze();
|
|
2341
|
+
}, ze = () => {
|
|
2342
|
+
d.value && Fe(), d.value = !1, g.value = null, Lt(), document.removeEventListener("pointermove", Ge), document.removeEventListener("pointerup", xe), document.removeEventListener("pointercancel", xe);
|
|
2343
|
+
}, Tt = () => {
|
|
2344
|
+
var C;
|
|
2345
|
+
const p = (C = n == null ? void 0 : n.translation) == null ? void 0 : C.target;
|
|
2346
|
+
vi.includes(p) ? at.supportRTL() : at.removeRTL();
|
|
2210
2347
|
};
|
|
2211
|
-
return
|
|
2348
|
+
return ae(
|
|
2212
2349
|
() => n.status,
|
|
2213
2350
|
() => {
|
|
2214
|
-
|
|
2351
|
+
a.value && Ke(D), Tt();
|
|
2215
2352
|
}
|
|
2216
|
-
),
|
|
2353
|
+
), ae(
|
|
2217
2354
|
() => n.theme,
|
|
2218
|
-
(
|
|
2219
|
-
|
|
2355
|
+
(p) => {
|
|
2356
|
+
c.value = p;
|
|
2220
2357
|
}
|
|
2221
|
-
), (
|
|
2222
|
-
|
|
2358
|
+
), (p, C) => (v(), b(de, null, [
|
|
2359
|
+
a.value ? (v(), b("div", {
|
|
2223
2360
|
key: 0,
|
|
2224
2361
|
ref_key: "floatingEl",
|
|
2225
2362
|
ref: i,
|
|
2226
|
-
style:
|
|
2227
|
-
onClick:
|
|
2363
|
+
style: Ve(we.value),
|
|
2364
|
+
onClick: Z
|
|
2228
2365
|
}, [
|
|
2229
2366
|
w("div", {
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
"data-theme": r.value
|
|
2367
|
+
ref_key: "contentEl",
|
|
2368
|
+
ref: r,
|
|
2369
|
+
class: "relative rounded-lg",
|
|
2370
|
+
style: Ve(ye.value),
|
|
2371
|
+
"data-theme": c.value
|
|
2236
2372
|
}, [
|
|
2237
|
-
|
|
2373
|
+
P(yi, {
|
|
2238
2374
|
translation: n.translation,
|
|
2239
2375
|
explanation: n.explanation,
|
|
2240
2376
|
tts: n.tts,
|
|
@@ -2244,29 +2380,31 @@ const Ge = {
|
|
|
2244
2380
|
isAITranslate: n.isAITranslate,
|
|
2245
2381
|
isAIExplain: n.isAIExplain,
|
|
2246
2382
|
aiExplainMinLength: n.aiExplainMinLength,
|
|
2247
|
-
theme:
|
|
2383
|
+
theme: c.value,
|
|
2248
2384
|
showThemeSelector: n.showThemeSelector,
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2385
|
+
constrained: H.value,
|
|
2386
|
+
onLogo: C[0] || (C[0] = (A) => o("logo")),
|
|
2387
|
+
onFavorite: C[1] || (C[1] = (A) => o("favorite")),
|
|
2388
|
+
onSettings: C[2] || (C[2] = (A) => o("settings")),
|
|
2389
|
+
onClose: j,
|
|
2390
|
+
onLoadTTS: C[3] || (C[3] = (A) => o("loadTTS")),
|
|
2391
|
+
onAiTranslate: C[4] || (C[4] = (A) => o("aiTranslate")),
|
|
2392
|
+
onAiExplain: C[5] || (C[5] = (A) => o("aiExplain")),
|
|
2393
|
+
onLearn: C[6] || (C[6] = (A) => o("learn", A)),
|
|
2394
|
+
onThemeChange: q,
|
|
2395
|
+
onDragStart: Y,
|
|
2396
|
+
onResizeStart: St
|
|
2397
|
+
}, null, 8, ["translation", "explanation", "tts", "status", "isFavorite", "isFavoriteFeatureEnabled", "isAITranslate", "isAIExplain", "aiExplainMinLength", "theme", "showThemeSelector", "constrained"])
|
|
2398
|
+
], 12, Ii)
|
|
2261
2399
|
], 4)) : M("", !0),
|
|
2262
|
-
|
|
2263
|
-
textSelected:
|
|
2264
|
-
onToggleKey:
|
|
2265
|
-
onClose:
|
|
2400
|
+
P(Bi, {
|
|
2401
|
+
textSelected: l.value,
|
|
2402
|
+
onToggleKey: C[7] || (C[7] = (A) => o("toggleKey", A)),
|
|
2403
|
+
onClose: j
|
|
2266
2404
|
}, null, 8, ["textSelected"])
|
|
2267
2405
|
], 64));
|
|
2268
2406
|
}
|
|
2269
2407
|
};
|
|
2270
2408
|
export {
|
|
2271
|
-
|
|
2409
|
+
Di as default
|
|
2272
2410
|
};
|