@ddict/bubble 1.3.6 → 1.3.8
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 +1524 -1135
- package/dist/bubble.umd.js +3 -3
- package/package.json +1 -1
package/dist/bubble.es.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
const $e = Math.min,
|
|
1
|
+
import { computed as R, ref as k, shallowRef as Nt, watch as ee, getCurrentScope as Ht, onScopeDispose as Ut, shallowReadonly as ce, unref as ve, createElementBlock as v, openBlock as p, createStaticVNode as Xe, createElementVNode as C, createVNode as O, toDisplayString as ie, Fragment as G, renderList as me, createCommentVNode as M, normalizeClass as $, createTextVNode as be, onUnmounted as qe, createBlock as z, normalizeStyle as Ze, withModifiers as Zt, onMounted as gt, nextTick as it } from "vue";
|
|
2
|
+
const $e = Math.min, te = Math.max, ke = Math.round, Se = Math.floor, Y = (e) => ({
|
|
3
3
|
x: e,
|
|
4
4
|
y: e
|
|
5
|
-
}),
|
|
5
|
+
}), jt = {
|
|
6
6
|
left: "right",
|
|
7
7
|
right: "left",
|
|
8
8
|
bottom: "top",
|
|
9
9
|
top: "bottom"
|
|
10
|
-
},
|
|
10
|
+
}, Xt = {
|
|
11
11
|
start: "end",
|
|
12
12
|
end: "start"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function ot(e, t, n) {
|
|
15
|
+
return te(e, $e(t, n));
|
|
16
16
|
}
|
|
17
17
|
function Be(e, t) {
|
|
18
18
|
return typeof e == "function" ? e(t) : e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function oe(e) {
|
|
21
21
|
return e.split("-")[0];
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Me(e) {
|
|
24
24
|
return e.split("-")[1];
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function vt(e) {
|
|
27
27
|
return e === "x" ? "y" : "x";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function bt(e) {
|
|
30
30
|
return e === "y" ? "height" : "width";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return ["top", "bottom"].includes(
|
|
32
|
+
function de(e) {
|
|
33
|
+
return ["top", "bottom"].includes(oe(e)) ? "y" : "x";
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function Ct(e) {
|
|
36
|
+
return vt(de(e));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function qt(e, t, n) {
|
|
39
39
|
n === void 0 && (n = !1);
|
|
40
|
-
const
|
|
41
|
-
let
|
|
42
|
-
return t.reference[
|
|
40
|
+
const i = Me(e), o = Ct(e), s = bt(o);
|
|
41
|
+
let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
42
|
+
return t.reference[s] > t.floating[s] && (r = Re(r)), [r, Re(r)];
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const t =
|
|
46
|
-
return [
|
|
44
|
+
function Yt(e) {
|
|
45
|
+
const t = Re(e);
|
|
46
|
+
return [je(e), t, je(t)];
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return e.replace(/start|end/g, (t) =>
|
|
48
|
+
function je(e) {
|
|
49
|
+
return e.replace(/start|end/g, (t) => Xt[t]);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
51
|
+
function Kt(e, t, n) {
|
|
52
|
+
const i = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
53
53
|
switch (e) {
|
|
54
54
|
case "top":
|
|
55
55
|
case "bottom":
|
|
56
|
-
return n ? t ?
|
|
56
|
+
return n ? t ? o : i : t ? i : o;
|
|
57
57
|
case "left":
|
|
58
58
|
case "right":
|
|
59
|
-
return t ?
|
|
59
|
+
return t ? s : r;
|
|
60
60
|
default:
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
let
|
|
67
|
-
return
|
|
64
|
+
function Gt(e, t, n, i) {
|
|
65
|
+
const o = Me(e);
|
|
66
|
+
let s = Kt(oe(e), n === "start", i);
|
|
67
|
+
return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(je)))), s;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
69
|
+
function Re(e) {
|
|
70
|
+
return e.replace(/left|right|bottom|top/g, (t) => jt[t]);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Jt(e) {
|
|
73
73
|
return {
|
|
74
74
|
top: 0,
|
|
75
75
|
right: 0,
|
|
@@ -78,256 +78,256 @@ function zt(e) {
|
|
|
78
78
|
...e
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return typeof e != "number" ?
|
|
81
|
+
function Qt(e) {
|
|
82
|
+
return typeof e != "number" ? Jt(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 Ie(e) {
|
|
90
90
|
const {
|
|
91
91
|
x: t,
|
|
92
92
|
y: n,
|
|
93
|
-
width:
|
|
94
|
-
height:
|
|
93
|
+
width: i,
|
|
94
|
+
height: o
|
|
95
95
|
} = e;
|
|
96
96
|
return {
|
|
97
|
-
width:
|
|
98
|
-
height:
|
|
97
|
+
width: i,
|
|
98
|
+
height: o,
|
|
99
99
|
top: n,
|
|
100
100
|
left: t,
|
|
101
|
-
right: t +
|
|
102
|
-
bottom: n +
|
|
101
|
+
right: t + i,
|
|
102
|
+
bottom: n + o,
|
|
103
103
|
x: t,
|
|
104
104
|
y: n
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function rt(e, t, n) {
|
|
108
108
|
let {
|
|
109
|
-
reference:
|
|
110
|
-
floating:
|
|
109
|
+
reference: i,
|
|
110
|
+
floating: o
|
|
111
111
|
} = e;
|
|
112
|
-
const
|
|
113
|
-
let
|
|
112
|
+
const s = de(t), r = Ct(t), a = bt(r), l = oe(t), c = s === "y", d = i.x + i.width / 2 - o.width / 2, h = i.y + i.height / 2 - o.height / 2, g = i[a] / 2 - o[a] / 2;
|
|
113
|
+
let f;
|
|
114
114
|
switch (l) {
|
|
115
115
|
case "top":
|
|
116
|
-
|
|
117
|
-
x:
|
|
118
|
-
y:
|
|
116
|
+
f = {
|
|
117
|
+
x: d,
|
|
118
|
+
y: i.y - o.height
|
|
119
119
|
};
|
|
120
120
|
break;
|
|
121
121
|
case "bottom":
|
|
122
|
-
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
122
|
+
f = {
|
|
123
|
+
x: d,
|
|
124
|
+
y: i.y + i.height
|
|
125
125
|
};
|
|
126
126
|
break;
|
|
127
127
|
case "right":
|
|
128
|
-
|
|
129
|
-
x:
|
|
130
|
-
y:
|
|
128
|
+
f = {
|
|
129
|
+
x: i.x + i.width,
|
|
130
|
+
y: h
|
|
131
131
|
};
|
|
132
132
|
break;
|
|
133
133
|
case "left":
|
|
134
|
-
|
|
135
|
-
x:
|
|
136
|
-
y:
|
|
134
|
+
f = {
|
|
135
|
+
x: i.x - o.width,
|
|
136
|
+
y: h
|
|
137
137
|
};
|
|
138
138
|
break;
|
|
139
139
|
default:
|
|
140
|
-
|
|
141
|
-
x:
|
|
142
|
-
y:
|
|
140
|
+
f = {
|
|
141
|
+
x: i.x,
|
|
142
|
+
y: i.y
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
switch (
|
|
145
|
+
switch (Me(t)) {
|
|
146
146
|
case "start":
|
|
147
|
-
|
|
147
|
+
f[r] -= g * (n && c ? -1 : 1);
|
|
148
148
|
break;
|
|
149
149
|
case "end":
|
|
150
|
-
|
|
150
|
+
f[r] += g * (n && c ? -1 : 1);
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
153
|
+
return f;
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const en = async (e, t, n) => {
|
|
156
156
|
const {
|
|
157
|
-
placement:
|
|
158
|
-
strategy:
|
|
159
|
-
middleware:
|
|
160
|
-
platform:
|
|
161
|
-
} = n, a =
|
|
162
|
-
let c = await
|
|
157
|
+
placement: i = "bottom",
|
|
158
|
+
strategy: o = "absolute",
|
|
159
|
+
middleware: s = [],
|
|
160
|
+
platform: r
|
|
161
|
+
} = n, a = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
162
|
+
let c = await r.getElementRects({
|
|
163
163
|
reference: e,
|
|
164
164
|
floating: t,
|
|
165
|
-
strategy:
|
|
165
|
+
strategy: o
|
|
166
166
|
}), {
|
|
167
|
-
x:
|
|
168
|
-
y:
|
|
169
|
-
} =
|
|
170
|
-
for (let
|
|
167
|
+
x: d,
|
|
168
|
+
y: h
|
|
169
|
+
} = rt(c, i, l), g = i, f = {}, m = 0;
|
|
170
|
+
for (let w = 0; w < a.length; w++) {
|
|
171
171
|
const {
|
|
172
172
|
name: y,
|
|
173
|
-
fn:
|
|
174
|
-
} = a[
|
|
175
|
-
x
|
|
176
|
-
y:
|
|
177
|
-
data:
|
|
178
|
-
reset:
|
|
179
|
-
} = await
|
|
180
|
-
x:
|
|
181
|
-
y:
|
|
182
|
-
initialPlacement:
|
|
183
|
-
placement:
|
|
184
|
-
strategy:
|
|
185
|
-
middlewareData:
|
|
173
|
+
fn: L
|
|
174
|
+
} = a[w], {
|
|
175
|
+
x,
|
|
176
|
+
y: T,
|
|
177
|
+
data: A,
|
|
178
|
+
reset: S
|
|
179
|
+
} = await L({
|
|
180
|
+
x: d,
|
|
181
|
+
y: h,
|
|
182
|
+
initialPlacement: i,
|
|
183
|
+
placement: g,
|
|
184
|
+
strategy: o,
|
|
185
|
+
middlewareData: f,
|
|
186
186
|
rects: c,
|
|
187
|
-
platform:
|
|
187
|
+
platform: r,
|
|
188
188
|
elements: {
|
|
189
189
|
reference: e,
|
|
190
190
|
floating: t
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
|
|
194
|
-
...
|
|
193
|
+
d = x ?? d, h = T ?? h, f = {
|
|
194
|
+
...f,
|
|
195
195
|
[y]: {
|
|
196
|
-
...
|
|
197
|
-
|
|
196
|
+
...f[y],
|
|
197
|
+
...A
|
|
198
198
|
}
|
|
199
|
-
},
|
|
199
|
+
}, S && m <= 50 && (m++, typeof S == "object" && (S.placement && (g = S.placement), S.rects && (c = S.rects === !0 ? await r.getElementRects({
|
|
200
200
|
reference: e,
|
|
201
201
|
floating: t,
|
|
202
|
-
strategy:
|
|
203
|
-
}) :
|
|
204
|
-
x:
|
|
205
|
-
y:
|
|
206
|
-
} =
|
|
202
|
+
strategy: o
|
|
203
|
+
}) : S.rects), {
|
|
204
|
+
x: d,
|
|
205
|
+
y: h
|
|
206
|
+
} = rt(c, g, l)), w = -1);
|
|
207
207
|
}
|
|
208
208
|
return {
|
|
209
|
-
x:
|
|
210
|
-
y:
|
|
211
|
-
placement:
|
|
212
|
-
strategy:
|
|
213
|
-
middlewareData:
|
|
209
|
+
x: d,
|
|
210
|
+
y: h,
|
|
211
|
+
placement: g,
|
|
212
|
+
strategy: o,
|
|
213
|
+
middlewareData: f
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
-
async function
|
|
216
|
+
async function wt(e, t) {
|
|
217
217
|
var n;
|
|
218
218
|
t === void 0 && (t = {});
|
|
219
219
|
const {
|
|
220
|
-
x:
|
|
221
|
-
y:
|
|
222
|
-
platform:
|
|
223
|
-
rects:
|
|
220
|
+
x: i,
|
|
221
|
+
y: o,
|
|
222
|
+
platform: s,
|
|
223
|
+
rects: r,
|
|
224
224
|
elements: a,
|
|
225
225
|
strategy: l
|
|
226
226
|
} = e, {
|
|
227
227
|
boundary: c = "clippingAncestors",
|
|
228
|
-
rootBoundary:
|
|
229
|
-
elementContext:
|
|
230
|
-
altBoundary:
|
|
231
|
-
padding:
|
|
232
|
-
} = Be(t, e),
|
|
233
|
-
element: (n = await (
|
|
228
|
+
rootBoundary: d = "viewport",
|
|
229
|
+
elementContext: h = "floating",
|
|
230
|
+
altBoundary: g = !1,
|
|
231
|
+
padding: f = 0
|
|
232
|
+
} = Be(t, e), m = Qt(f), y = a[g ? h === "floating" ? "reference" : "floating" : h], L = Ie(await s.getClippingRect({
|
|
233
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
|
|
234
234
|
boundary: c,
|
|
235
|
-
rootBoundary:
|
|
235
|
+
rootBoundary: d,
|
|
236
236
|
strategy: l
|
|
237
|
-
})),
|
|
238
|
-
x:
|
|
239
|
-
y:
|
|
240
|
-
width:
|
|
241
|
-
height:
|
|
242
|
-
} :
|
|
237
|
+
})), x = h === "floating" ? {
|
|
238
|
+
x: i,
|
|
239
|
+
y: o,
|
|
240
|
+
width: r.floating.width,
|
|
241
|
+
height: r.floating.height
|
|
242
|
+
} : r.reference, T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), A = await (s.isElement == null ? void 0 : s.isElement(T)) ? await (s.getScale == null ? void 0 : s.getScale(T)) || {
|
|
243
243
|
x: 1,
|
|
244
244
|
y: 1
|
|
245
245
|
} : {
|
|
246
246
|
x: 1,
|
|
247
247
|
y: 1
|
|
248
|
-
},
|
|
248
|
+
}, S = Ie(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
249
249
|
elements: a,
|
|
250
|
-
rect:
|
|
251
|
-
offsetParent:
|
|
250
|
+
rect: x,
|
|
251
|
+
offsetParent: T,
|
|
252
252
|
strategy: l
|
|
253
|
-
}) :
|
|
253
|
+
}) : x);
|
|
254
254
|
return {
|
|
255
|
-
top: (
|
|
256
|
-
bottom: (
|
|
257
|
-
left: (
|
|
258
|
-
right: (
|
|
255
|
+
top: (L.top - S.top + m.top) / A.y,
|
|
256
|
+
bottom: (S.bottom - L.bottom + m.bottom) / A.y,
|
|
257
|
+
left: (L.left - S.left + m.left) / A.x,
|
|
258
|
+
right: (S.right - L.right + m.right) / A.x
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const tn = function(e) {
|
|
262
262
|
return e === void 0 && (e = {}), {
|
|
263
263
|
name: "flip",
|
|
264
264
|
options: e,
|
|
265
265
|
async fn(t) {
|
|
266
|
-
var n,
|
|
266
|
+
var n, i;
|
|
267
267
|
const {
|
|
268
|
-
placement:
|
|
269
|
-
middlewareData:
|
|
270
|
-
rects:
|
|
268
|
+
placement: o,
|
|
269
|
+
middlewareData: s,
|
|
270
|
+
rects: r,
|
|
271
271
|
initialPlacement: a,
|
|
272
272
|
platform: l,
|
|
273
273
|
elements: c
|
|
274
274
|
} = t, {
|
|
275
|
-
mainAxis:
|
|
276
|
-
crossAxis:
|
|
277
|
-
fallbackPlacements:
|
|
278
|
-
fallbackStrategy:
|
|
279
|
-
fallbackAxisSideDirection:
|
|
280
|
-
flipAlignment:
|
|
275
|
+
mainAxis: d = !0,
|
|
276
|
+
crossAxis: h = !0,
|
|
277
|
+
fallbackPlacements: g,
|
|
278
|
+
fallbackStrategy: f = "bestFit",
|
|
279
|
+
fallbackAxisSideDirection: m = "none",
|
|
280
|
+
flipAlignment: w = !0,
|
|
281
281
|
...y
|
|
282
282
|
} = Be(e, t);
|
|
283
|
-
if ((n =
|
|
283
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
284
284
|
return {};
|
|
285
|
-
const
|
|
286
|
-
!
|
|
287
|
-
const E = [a, ...
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
|
|
285
|
+
const L = oe(o), x = de(a), T = oe(a) === a, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = g || (T || !w ? [Re(a)] : Yt(a)), B = m !== "none";
|
|
286
|
+
!g && B && S.push(...Gt(a, w, m, A));
|
|
287
|
+
const E = [a, ...S], D = await wt(t, y), Z = [];
|
|
288
|
+
let J = ((i = s.flip) == null ? void 0 : i.overflows) || [];
|
|
289
|
+
if (d && Z.push(D[L]), h) {
|
|
290
|
+
const j = qt(o, r, A);
|
|
291
|
+
Z.push(D[j[0]], D[j[1]]);
|
|
292
292
|
}
|
|
293
|
-
if (
|
|
294
|
-
placement:
|
|
295
|
-
overflows:
|
|
296
|
-
}], !
|
|
297
|
-
var
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
293
|
+
if (J = [...J, {
|
|
294
|
+
placement: o,
|
|
295
|
+
overflows: Z
|
|
296
|
+
}], !Z.every((j) => j <= 0)) {
|
|
297
|
+
var he, pe;
|
|
298
|
+
const j = (((he = s.flip) == null ? void 0 : he.index) || 0) + 1, ye = E[j];
|
|
299
|
+
if (ye)
|
|
300
300
|
return {
|
|
301
301
|
data: {
|
|
302
|
-
index:
|
|
303
|
-
overflows:
|
|
302
|
+
index: j,
|
|
303
|
+
overflows: J
|
|
304
304
|
},
|
|
305
305
|
reset: {
|
|
306
|
-
placement:
|
|
306
|
+
placement: ye
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
|
-
let q = (
|
|
309
|
+
let q = (pe = J.filter((N) => N.overflows[0] <= 0).sort((N, W) => N.overflows[1] - W.overflows[1])[0]) == null ? void 0 : pe.placement;
|
|
310
310
|
if (!q)
|
|
311
|
-
switch (
|
|
311
|
+
switch (f) {
|
|
312
312
|
case "bestFit": {
|
|
313
|
-
var
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
316
|
-
const _ =
|
|
317
|
-
return _ ===
|
|
313
|
+
var V;
|
|
314
|
+
const N = (V = J.filter((W) => {
|
|
315
|
+
if (B) {
|
|
316
|
+
const _ = de(W.placement);
|
|
317
|
+
return _ === x || // 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((W) => [W.placement, W.overflows.filter((_) => _ > 0).reduce((_, Fe) => _ + Fe, 0)]).sort((W, _) => W[1] - _[1])[0]) == null ? void 0 : V[0];
|
|
323
|
+
N && (q = N);
|
|
324
324
|
break;
|
|
325
325
|
}
|
|
326
326
|
case "initialPlacement":
|
|
327
327
|
q = a;
|
|
328
328
|
break;
|
|
329
329
|
}
|
|
330
|
-
if (
|
|
330
|
+
if (o !== q)
|
|
331
331
|
return {
|
|
332
332
|
reset: {
|
|
333
333
|
placement: q
|
|
@@ -338,111 +338,111 @@ const Vt = function(e) {
|
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
340
|
};
|
|
341
|
-
async function
|
|
341
|
+
async function nn(e, t) {
|
|
342
342
|
const {
|
|
343
343
|
placement: n,
|
|
344
|
-
platform:
|
|
345
|
-
elements:
|
|
346
|
-
} = e,
|
|
344
|
+
platform: i,
|
|
345
|
+
elements: o
|
|
346
|
+
} = e, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = oe(n), a = Me(n), l = de(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, d = s && l ? -1 : 1, h = Be(t, e);
|
|
347
347
|
let {
|
|
348
|
+
mainAxis: g,
|
|
349
|
+
crossAxis: f,
|
|
350
|
+
alignmentAxis: m
|
|
351
|
+
} = typeof h == "number" ? {
|
|
348
352
|
mainAxis: h,
|
|
349
|
-
crossAxis: m,
|
|
350
|
-
alignmentAxis: f
|
|
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
|
+
...h
|
|
360
360
|
};
|
|
361
|
-
return a && typeof
|
|
362
|
-
x:
|
|
363
|
-
y:
|
|
361
|
+
return a && typeof m == "number" && (f = a === "end" ? m * -1 : m), l ? {
|
|
362
|
+
x: f * d,
|
|
363
|
+
y: g * c
|
|
364
364
|
} : {
|
|
365
|
-
x:
|
|
366
|
-
y:
|
|
365
|
+
x: g * c,
|
|
366
|
+
y: f * d
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const on = function(e) {
|
|
370
370
|
return e === void 0 && (e = 0), {
|
|
371
371
|
name: "offset",
|
|
372
372
|
options: e,
|
|
373
373
|
async fn(t) {
|
|
374
|
-
var n,
|
|
374
|
+
var n, i;
|
|
375
375
|
const {
|
|
376
|
-
x:
|
|
377
|
-
y:
|
|
378
|
-
placement:
|
|
376
|
+
x: o,
|
|
377
|
+
y: s,
|
|
378
|
+
placement: r,
|
|
379
379
|
middlewareData: a
|
|
380
|
-
} = t, l = await
|
|
381
|
-
return
|
|
382
|
-
x:
|
|
383
|
-
y:
|
|
380
|
+
} = t, l = await nn(t, e);
|
|
381
|
+
return r === ((n = a.offset) == null ? void 0 : n.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
|
|
382
|
+
x: o + l.x,
|
|
383
|
+
y: s + l.y,
|
|
384
384
|
data: {
|
|
385
385
|
...l,
|
|
386
|
-
placement:
|
|
386
|
+
placement: r
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
},
|
|
391
|
+
}, rn = function(e) {
|
|
392
392
|
return e === void 0 && (e = {}), {
|
|
393
393
|
name: "shift",
|
|
394
394
|
options: e,
|
|
395
395
|
async fn(t) {
|
|
396
396
|
const {
|
|
397
397
|
x: n,
|
|
398
|
-
y:
|
|
399
|
-
placement:
|
|
398
|
+
y: i,
|
|
399
|
+
placement: o
|
|
400
400
|
} = t, {
|
|
401
|
-
mainAxis:
|
|
402
|
-
crossAxis:
|
|
401
|
+
mainAxis: s = !0,
|
|
402
|
+
crossAxis: r = !1,
|
|
403
403
|
limiter: a = {
|
|
404
404
|
fn: (y) => {
|
|
405
405
|
let {
|
|
406
|
-
x,
|
|
407
|
-
y:
|
|
406
|
+
x: L,
|
|
407
|
+
y: x
|
|
408
408
|
} = y;
|
|
409
409
|
return {
|
|
410
|
-
x,
|
|
411
|
-
y:
|
|
410
|
+
x: L,
|
|
411
|
+
y: x
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
},
|
|
415
415
|
...l
|
|
416
416
|
} = Be(e, t), c = {
|
|
417
417
|
x: n,
|
|
418
|
-
y:
|
|
419
|
-
},
|
|
420
|
-
let
|
|
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
|
-
}
|
|
418
|
+
y: i
|
|
419
|
+
}, d = await wt(t, l), h = de(oe(o)), g = vt(h);
|
|
420
|
+
let f = c[g], m = c[h];
|
|
425
421
|
if (s) {
|
|
426
|
-
const y =
|
|
427
|
-
f =
|
|
422
|
+
const y = g === "y" ? "top" : "left", L = g === "y" ? "bottom" : "right", x = f + d[y], T = f - d[L];
|
|
423
|
+
f = ot(x, f, T);
|
|
428
424
|
}
|
|
429
|
-
|
|
425
|
+
if (r) {
|
|
426
|
+
const y = h === "y" ? "top" : "left", L = h === "y" ? "bottom" : "right", x = m + d[y], T = m - d[L];
|
|
427
|
+
m = ot(x, m, T);
|
|
428
|
+
}
|
|
429
|
+
const w = a.fn({
|
|
430
430
|
...t,
|
|
431
|
-
[
|
|
432
|
-
[
|
|
431
|
+
[g]: f,
|
|
432
|
+
[h]: m
|
|
433
433
|
});
|
|
434
434
|
return {
|
|
435
|
-
...
|
|
435
|
+
...w,
|
|
436
436
|
data: {
|
|
437
|
-
x:
|
|
438
|
-
y:
|
|
437
|
+
x: w.x - n,
|
|
438
|
+
y: w.y - i
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
443
|
};
|
|
444
|
-
function
|
|
445
|
-
return
|
|
444
|
+
function se(e) {
|
|
445
|
+
return Ye(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
446
446
|
}
|
|
447
447
|
function F(e) {
|
|
448
448
|
var t;
|
|
@@ -450,33 +450,33 @@ function F(e) {
|
|
|
450
450
|
}
|
|
451
451
|
function X(e) {
|
|
452
452
|
var t;
|
|
453
|
-
return (t = (
|
|
453
|
+
return (t = (Ye(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Ye(e) {
|
|
456
456
|
return e instanceof Node || e instanceof F(e).Node;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function H(e) {
|
|
459
459
|
return e instanceof Element || e instanceof F(e).Element;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function U(e) {
|
|
462
462
|
return e instanceof HTMLElement || e instanceof F(e).HTMLElement;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function st(e) {
|
|
465
465
|
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function we(e) {
|
|
468
468
|
const {
|
|
469
469
|
overflow: t,
|
|
470
470
|
overflowX: n,
|
|
471
|
-
overflowY:
|
|
472
|
-
display:
|
|
473
|
-
} =
|
|
474
|
-
return /auto|scroll|overlay|hidden|clip/.test(t +
|
|
471
|
+
overflowY: i,
|
|
472
|
+
display: o
|
|
473
|
+
} = P(e);
|
|
474
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(o);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
return ["table", "td", "th"].includes(
|
|
476
|
+
function sn(e) {
|
|
477
|
+
return ["table", "td", "th"].includes(se(e));
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Oe(e) {
|
|
480
480
|
return [":popover-open", ":modal"].some((t) => {
|
|
481
481
|
try {
|
|
482
482
|
return e.matches(t);
|
|
@@ -485,32 +485,32 @@ function Me(e) {
|
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const t =
|
|
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((
|
|
488
|
+
function Ke(e) {
|
|
489
|
+
const t = Ge(), n = P(e);
|
|
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((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function ln(e) {
|
|
493
493
|
let t = K(e);
|
|
494
|
-
for (;
|
|
495
|
-
if (
|
|
494
|
+
for (; U(t) && !fe(t); ) {
|
|
495
|
+
if (Oe(t))
|
|
496
496
|
return null;
|
|
497
|
-
if (
|
|
497
|
+
if (Ke(t))
|
|
498
498
|
return t;
|
|
499
499
|
t = K(t);
|
|
500
500
|
}
|
|
501
501
|
return null;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ge() {
|
|
504
504
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
return ["html", "body", "#document"].includes(
|
|
506
|
+
function fe(e) {
|
|
507
|
+
return ["html", "body", "#document"].includes(se(e));
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function P(e) {
|
|
510
510
|
return F(e).getComputedStyle(e);
|
|
511
511
|
}
|
|
512
512
|
function De(e) {
|
|
513
|
-
return
|
|
513
|
+
return H(e) ? {
|
|
514
514
|
scrollLeft: e.scrollLeft,
|
|
515
515
|
scrollTop: e.scrollTop
|
|
516
516
|
} : {
|
|
@@ -519,201 +519,201 @@ function De(e) {
|
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
521
|
function K(e) {
|
|
522
|
-
if (
|
|
522
|
+
if (se(e) === "html")
|
|
523
523
|
return e;
|
|
524
524
|
const t = (
|
|
525
525
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
526
526
|
e.assignedSlot || // DOM Element detected.
|
|
527
527
|
e.parentNode || // ShadowRoot detected.
|
|
528
|
-
|
|
528
|
+
st(e) && e.host || // Fallback.
|
|
529
529
|
X(e)
|
|
530
530
|
);
|
|
531
|
-
return
|
|
531
|
+
return st(t) ? t.host : t;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function yt(e) {
|
|
534
534
|
const t = K(e);
|
|
535
|
-
return
|
|
535
|
+
return fe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && we(t) ? t : yt(t);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
var
|
|
537
|
+
function Ce(e, t, n) {
|
|
538
|
+
var i;
|
|
539
539
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
540
|
-
const
|
|
541
|
-
return
|
|
542
|
-
}
|
|
543
|
-
function
|
|
544
|
-
const t =
|
|
545
|
-
let n = parseFloat(t.width) || 0,
|
|
546
|
-
const
|
|
547
|
-
return a && (n =
|
|
540
|
+
const o = yt(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), r = F(o);
|
|
541
|
+
return s ? t.concat(r, r.visualViewport || [], we(o) ? o : [], r.frameElement && n ? Ce(r.frameElement) : []) : t.concat(o, Ce(o, [], n));
|
|
542
|
+
}
|
|
543
|
+
function xt(e) {
|
|
544
|
+
const t = P(e);
|
|
545
|
+
let n = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
546
|
+
const o = U(e), s = o ? e.offsetWidth : n, r = o ? e.offsetHeight : i, a = ke(n) !== s || ke(i) !== r;
|
|
547
|
+
return a && (n = s, i = r), {
|
|
548
548
|
width: n,
|
|
549
|
-
height:
|
|
549
|
+
height: i,
|
|
550
550
|
$: a
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
return
|
|
553
|
+
function Je(e) {
|
|
554
|
+
return H(e) ? e : e.contextElement;
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
const t =
|
|
558
|
-
if (!
|
|
559
|
-
return
|
|
556
|
+
function ue(e) {
|
|
557
|
+
const t = Je(e);
|
|
558
|
+
if (!U(t))
|
|
559
|
+
return Y(1);
|
|
560
560
|
const n = t.getBoundingClientRect(), {
|
|
561
|
-
width:
|
|
562
|
-
height:
|
|
563
|
-
$:
|
|
564
|
-
} =
|
|
565
|
-
let
|
|
566
|
-
return (!
|
|
567
|
-
x:
|
|
561
|
+
width: i,
|
|
562
|
+
height: o,
|
|
563
|
+
$: s
|
|
564
|
+
} = xt(t);
|
|
565
|
+
let r = (s ? ke(n.width) : n.width) / i, a = (s ? ke(n.height) : n.height) / o;
|
|
566
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
567
|
+
x: r,
|
|
568
568
|
y: a
|
|
569
569
|
};
|
|
570
570
|
}
|
|
571
|
-
const
|
|
572
|
-
function
|
|
571
|
+
const an = /* @__PURE__ */ Y(0);
|
|
572
|
+
function Lt(e) {
|
|
573
573
|
const t = F(e);
|
|
574
|
-
return !
|
|
574
|
+
return !Ge() || !t.visualViewport ? an : {
|
|
575
575
|
x: t.visualViewport.offsetLeft,
|
|
576
576
|
y: t.visualViewport.offsetTop
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function cn(e, t, n) {
|
|
580
580
|
return t === void 0 && (t = !1), !n || t && n !== F(e) ? !1 : t;
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function re(e, t, n, i) {
|
|
583
583
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
584
|
-
const
|
|
585
|
-
let
|
|
586
|
-
t && (
|
|
587
|
-
const a =
|
|
588
|
-
let l = (
|
|
589
|
-
if (
|
|
590
|
-
const
|
|
591
|
-
let
|
|
592
|
-
for (;
|
|
593
|
-
const y =
|
|
594
|
-
l *= y.x, c *= y.y,
|
|
584
|
+
const o = e.getBoundingClientRect(), s = Je(e);
|
|
585
|
+
let r = Y(1);
|
|
586
|
+
t && (i ? H(i) && (r = ue(i)) : r = ue(e));
|
|
587
|
+
const a = cn(s, n, i) ? Lt(s) : Y(0);
|
|
588
|
+
let l = (o.left + a.x) / r.x, c = (o.top + a.y) / r.y, d = o.width / r.x, h = o.height / r.y;
|
|
589
|
+
if (s) {
|
|
590
|
+
const g = F(s), f = i && H(i) ? F(i) : i;
|
|
591
|
+
let m = g, w = m.frameElement;
|
|
592
|
+
for (; w && i && f !== m; ) {
|
|
593
|
+
const y = ue(w), L = w.getBoundingClientRect(), x = P(w), T = L.left + (w.clientLeft + parseFloat(x.paddingLeft)) * y.x, A = L.top + (w.clientTop + parseFloat(x.paddingTop)) * y.y;
|
|
594
|
+
l *= y.x, c *= y.y, d *= y.x, h *= y.y, l += T, c += A, m = F(w), w = m.frameElement;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
return
|
|
598
|
-
width:
|
|
599
|
-
height:
|
|
597
|
+
return Ie({
|
|
598
|
+
width: d,
|
|
599
|
+
height: h,
|
|
600
600
|
x: l,
|
|
601
601
|
y: c
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function un(e) {
|
|
605
605
|
let {
|
|
606
606
|
elements: t,
|
|
607
607
|
rect: n,
|
|
608
|
-
offsetParent:
|
|
609
|
-
strategy:
|
|
608
|
+
offsetParent: i,
|
|
609
|
+
strategy: o
|
|
610
610
|
} = e;
|
|
611
|
-
const
|
|
612
|
-
if (
|
|
611
|
+
const s = o === "fixed", r = X(i), a = t ? Oe(t.floating) : !1;
|
|
612
|
+
if (i === r || a && s)
|
|
613
613
|
return n;
|
|
614
614
|
let l = {
|
|
615
615
|
scrollLeft: 0,
|
|
616
616
|
scrollTop: 0
|
|
617
|
-
}, c =
|
|
618
|
-
const
|
|
619
|
-
if ((
|
|
620
|
-
const
|
|
621
|
-
c =
|
|
617
|
+
}, c = Y(1);
|
|
618
|
+
const d = Y(0), h = U(i);
|
|
619
|
+
if ((h || !h && !s) && ((se(i) !== "body" || we(r)) && (l = De(i)), U(i))) {
|
|
620
|
+
const g = re(i);
|
|
621
|
+
c = ue(i), d.x = g.x + i.clientLeft, d.y = g.y + i.clientTop;
|
|
622
622
|
}
|
|
623
623
|
return {
|
|
624
624
|
width: n.width * c.x,
|
|
625
625
|
height: n.height * c.y,
|
|
626
|
-
x: n.x * c.x - l.scrollLeft * c.x +
|
|
627
|
-
y: n.y * c.y - l.scrollTop * c.y +
|
|
626
|
+
x: n.x * c.x - l.scrollLeft * c.x + d.x,
|
|
627
|
+
y: n.y * c.y - l.scrollTop * c.y + d.y
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function dn(e) {
|
|
631
631
|
return Array.from(e.getClientRects());
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
633
|
+
function Tt(e) {
|
|
634
|
+
return re(X(e)).left + De(e).scrollLeft;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
const t = X(e), n = De(e),
|
|
638
|
-
let
|
|
636
|
+
function fn(e) {
|
|
637
|
+
const t = X(e), n = De(e), i = e.ownerDocument.body, o = te(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), s = te(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
638
|
+
let r = -n.scrollLeft + Tt(e);
|
|
639
639
|
const a = -n.scrollTop;
|
|
640
|
-
return
|
|
641
|
-
width:
|
|
642
|
-
height:
|
|
643
|
-
x:
|
|
640
|
+
return P(i).direction === "rtl" && (r += te(t.clientWidth, i.clientWidth) - o), {
|
|
641
|
+
width: o,
|
|
642
|
+
height: s,
|
|
643
|
+
x: r,
|
|
644
644
|
y: a
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const n = F(e),
|
|
649
|
-
let
|
|
650
|
-
if (
|
|
651
|
-
|
|
652
|
-
const c =
|
|
653
|
-
(!c || c && t === "fixed") && (a =
|
|
647
|
+
function mn(e, t) {
|
|
648
|
+
const n = F(e), i = X(e), o = n.visualViewport;
|
|
649
|
+
let s = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
|
|
650
|
+
if (o) {
|
|
651
|
+
s = o.width, r = o.height;
|
|
652
|
+
const c = Ge();
|
|
653
|
+
(!c || c && t === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
|
|
654
654
|
}
|
|
655
655
|
return {
|
|
656
|
-
width:
|
|
657
|
-
height:
|
|
656
|
+
width: s,
|
|
657
|
+
height: r,
|
|
658
658
|
x: a,
|
|
659
659
|
y: l
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const n =
|
|
662
|
+
function hn(e, t) {
|
|
663
|
+
const n = re(e, !0, t === "fixed"), i = n.top + e.clientTop, o = n.left + e.clientLeft, s = U(e) ? ue(e) : Y(1), r = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = i * s.y;
|
|
664
664
|
return {
|
|
665
|
-
width:
|
|
665
|
+
width: r,
|
|
666
666
|
height: a,
|
|
667
667
|
x: l,
|
|
668
668
|
y: c
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
let
|
|
671
|
+
function lt(e, t, n) {
|
|
672
|
+
let i;
|
|
673
673
|
if (t === "viewport")
|
|
674
|
-
|
|
674
|
+
i = mn(e, n);
|
|
675
675
|
else if (t === "document")
|
|
676
|
-
|
|
677
|
-
else if (
|
|
678
|
-
|
|
676
|
+
i = fn(X(e));
|
|
677
|
+
else if (H(t))
|
|
678
|
+
i = hn(t, n);
|
|
679
679
|
else {
|
|
680
|
-
const
|
|
681
|
-
|
|
680
|
+
const o = Lt(e);
|
|
681
|
+
i = {
|
|
682
682
|
...t,
|
|
683
|
-
x: t.x -
|
|
684
|
-
y: t.y -
|
|
683
|
+
x: t.x - o.x,
|
|
684
|
+
y: t.y - o.y
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
|
-
return
|
|
687
|
+
return Ie(i);
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function St(e, t) {
|
|
690
690
|
const n = K(e);
|
|
691
|
-
return n === t || !
|
|
691
|
+
return n === t || !H(n) || fe(n) ? !1 : P(n).position === "fixed" || St(n, t);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function pn(e, t) {
|
|
694
694
|
const n = t.get(e);
|
|
695
695
|
if (n)
|
|
696
696
|
return n;
|
|
697
|
-
let
|
|
698
|
-
const
|
|
699
|
-
let
|
|
700
|
-
for (;
|
|
701
|
-
const a =
|
|
702
|
-
!l && a.position === "fixed" && (
|
|
697
|
+
let i = Ce(e, [], !1).filter((a) => H(a) && se(a) !== "body"), o = null;
|
|
698
|
+
const s = P(e).position === "fixed";
|
|
699
|
+
let r = s ? K(e) : e;
|
|
700
|
+
for (; H(r) && !fe(r); ) {
|
|
701
|
+
const a = P(r), l = Ke(r);
|
|
702
|
+
!l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || we(r) && !l && St(e, r)) ? i = i.filter((d) => d !== r) : o = a, r = K(r);
|
|
703
703
|
}
|
|
704
|
-
return t.set(e,
|
|
704
|
+
return t.set(e, i), i;
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function gn(e) {
|
|
707
707
|
let {
|
|
708
708
|
element: t,
|
|
709
709
|
boundary: n,
|
|
710
|
-
rootBoundary:
|
|
711
|
-
strategy:
|
|
710
|
+
rootBoundary: i,
|
|
711
|
+
strategy: o
|
|
712
712
|
} = e;
|
|
713
|
-
const
|
|
714
|
-
const
|
|
715
|
-
return c.top =
|
|
716
|
-
},
|
|
713
|
+
const r = [...n === "clippingAncestors" ? Oe(t) ? [] : pn(t, this._c) : [].concat(n), i], a = r[0], l = r.reduce((c, d) => {
|
|
714
|
+
const h = lt(t, d, o);
|
|
715
|
+
return c.top = te(h.top, c.top), c.right = $e(h.right, c.right), c.bottom = $e(h.bottom, c.bottom), c.left = te(h.left, c.left), c;
|
|
716
|
+
}, lt(t, a, o));
|
|
717
717
|
return {
|
|
718
718
|
width: l.right - l.left,
|
|
719
719
|
height: l.bottom - l.top,
|
|
@@ -721,324 +721,324 @@ function en(e) {
|
|
|
721
721
|
y: l.top
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function vn(e) {
|
|
725
725
|
const {
|
|
726
726
|
width: t,
|
|
727
727
|
height: n
|
|
728
|
-
} =
|
|
728
|
+
} = xt(e);
|
|
729
729
|
return {
|
|
730
730
|
width: t,
|
|
731
731
|
height: n
|
|
732
732
|
};
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
const
|
|
734
|
+
function bn(e, t, n) {
|
|
735
|
+
const i = U(t), o = X(t), s = n === "fixed", r = re(e, !0, s, t);
|
|
736
736
|
let a = {
|
|
737
737
|
scrollLeft: 0,
|
|
738
738
|
scrollTop: 0
|
|
739
739
|
};
|
|
740
|
-
const l =
|
|
741
|
-
if (
|
|
742
|
-
if ((
|
|
743
|
-
const
|
|
744
|
-
l.x =
|
|
745
|
-
} else
|
|
746
|
-
const c =
|
|
740
|
+
const l = Y(0);
|
|
741
|
+
if (i || !i && !s)
|
|
742
|
+
if ((se(t) !== "body" || we(o)) && (a = De(t)), i) {
|
|
743
|
+
const h = re(t, !0, s, t);
|
|
744
|
+
l.x = h.x + t.clientLeft, l.y = h.y + t.clientTop;
|
|
745
|
+
} else o && (l.x = Tt(o));
|
|
746
|
+
const c = r.left + a.scrollLeft - l.x, d = r.top + a.scrollTop - l.y;
|
|
747
747
|
return {
|
|
748
748
|
x: c,
|
|
749
|
-
y:
|
|
750
|
-
width:
|
|
751
|
-
height:
|
|
749
|
+
y: d,
|
|
750
|
+
width: r.width,
|
|
751
|
+
height: r.height
|
|
752
752
|
};
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
754
|
+
function He(e) {
|
|
755
|
+
return P(e).position === "static";
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
return !
|
|
757
|
+
function at(e, t) {
|
|
758
|
+
return !U(e) || P(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function Et(e, t) {
|
|
761
761
|
const n = F(e);
|
|
762
|
-
if (
|
|
762
|
+
if (Oe(e))
|
|
763
763
|
return n;
|
|
764
|
-
if (!
|
|
765
|
-
let
|
|
766
|
-
for (;
|
|
767
|
-
if (
|
|
768
|
-
return
|
|
769
|
-
|
|
764
|
+
if (!U(e)) {
|
|
765
|
+
let o = K(e);
|
|
766
|
+
for (; o && !fe(o); ) {
|
|
767
|
+
if (H(o) && !He(o))
|
|
768
|
+
return o;
|
|
769
|
+
o = K(o);
|
|
770
770
|
}
|
|
771
771
|
return n;
|
|
772
772
|
}
|
|
773
|
-
let
|
|
774
|
-
for (;
|
|
775
|
-
|
|
776
|
-
return
|
|
773
|
+
let i = at(e, t);
|
|
774
|
+
for (; i && sn(i) && He(i); )
|
|
775
|
+
i = at(i, t);
|
|
776
|
+
return i && fe(i) && He(i) && !Ke(i) ? n : i || ln(e) || n;
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
const t = this.getOffsetParent ||
|
|
778
|
+
const Cn = async function(e) {
|
|
779
|
+
const t = this.getOffsetParent || Et, n = this.getDimensions, i = await n(e.floating);
|
|
780
780
|
return {
|
|
781
|
-
reference:
|
|
781
|
+
reference: bn(e.reference, await t(e.floating), e.strategy),
|
|
782
782
|
floating: {
|
|
783
783
|
x: 0,
|
|
784
784
|
y: 0,
|
|
785
|
-
width:
|
|
786
|
-
height:
|
|
785
|
+
width: i.width,
|
|
786
|
+
height: i.height
|
|
787
787
|
}
|
|
788
788
|
};
|
|
789
789
|
};
|
|
790
|
-
function
|
|
791
|
-
return
|
|
790
|
+
function wn(e) {
|
|
791
|
+
return P(e).direction === "rtl";
|
|
792
792
|
}
|
|
793
|
-
const
|
|
794
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
793
|
+
const yn = {
|
|
794
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: un,
|
|
795
795
|
getDocumentElement: X,
|
|
796
|
-
getClippingRect:
|
|
797
|
-
getOffsetParent:
|
|
798
|
-
getElementRects:
|
|
799
|
-
getClientRects:
|
|
800
|
-
getDimensions:
|
|
801
|
-
getScale:
|
|
802
|
-
isElement:
|
|
803
|
-
isRTL:
|
|
796
|
+
getClippingRect: gn,
|
|
797
|
+
getOffsetParent: Et,
|
|
798
|
+
getElementRects: Cn,
|
|
799
|
+
getClientRects: dn,
|
|
800
|
+
getDimensions: vn,
|
|
801
|
+
getScale: ue,
|
|
802
|
+
isElement: H,
|
|
803
|
+
isRTL: wn
|
|
804
804
|
};
|
|
805
|
-
function
|
|
806
|
-
let n = null,
|
|
807
|
-
const
|
|
808
|
-
function
|
|
805
|
+
function xn(e, t) {
|
|
806
|
+
let n = null, i;
|
|
807
|
+
const o = X(e);
|
|
808
|
+
function s() {
|
|
809
809
|
var a;
|
|
810
|
-
clearTimeout(
|
|
810
|
+
clearTimeout(i), (a = n) == null || a.disconnect(), n = null;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
a === void 0 && (a = !1), l === void 0 && (l = 1),
|
|
812
|
+
function r(a, l) {
|
|
813
|
+
a === void 0 && (a = !1), l === void 0 && (l = 1), s();
|
|
814
814
|
const {
|
|
815
815
|
left: c,
|
|
816
|
-
top:
|
|
817
|
-
width:
|
|
818
|
-
height:
|
|
816
|
+
top: d,
|
|
817
|
+
width: h,
|
|
818
|
+
height: g
|
|
819
819
|
} = e.getBoundingClientRect();
|
|
820
|
-
if (a || t(), !
|
|
820
|
+
if (a || t(), !h || !g)
|
|
821
821
|
return;
|
|
822
|
-
const
|
|
823
|
-
rootMargin: -
|
|
824
|
-
threshold:
|
|
822
|
+
const f = Se(d), m = Se(o.clientWidth - (c + h)), w = Se(o.clientHeight - (d + g)), y = Se(c), x = {
|
|
823
|
+
rootMargin: -f + "px " + -m + "px " + -w + "px " + -y + "px",
|
|
824
|
+
threshold: te(0, $e(1, l)) || 1
|
|
825
825
|
};
|
|
826
|
-
let
|
|
827
|
-
function
|
|
828
|
-
const
|
|
829
|
-
if (
|
|
830
|
-
if (!
|
|
831
|
-
return
|
|
832
|
-
|
|
833
|
-
|
|
826
|
+
let T = !0;
|
|
827
|
+
function A(S) {
|
|
828
|
+
const B = S[0].intersectionRatio;
|
|
829
|
+
if (B !== l) {
|
|
830
|
+
if (!T)
|
|
831
|
+
return r();
|
|
832
|
+
B ? r(!1, B) : i = setTimeout(() => {
|
|
833
|
+
r(!1, 1e-7);
|
|
834
834
|
}, 1e3);
|
|
835
835
|
}
|
|
836
|
-
|
|
836
|
+
T = !1;
|
|
837
837
|
}
|
|
838
838
|
try {
|
|
839
|
-
n = new IntersectionObserver(
|
|
840
|
-
...
|
|
839
|
+
n = new IntersectionObserver(A, {
|
|
840
|
+
...x,
|
|
841
841
|
// Handle <iframe>s
|
|
842
|
-
root:
|
|
842
|
+
root: o.ownerDocument
|
|
843
843
|
});
|
|
844
844
|
} catch {
|
|
845
|
-
n = new IntersectionObserver(
|
|
845
|
+
n = new IntersectionObserver(A, x);
|
|
846
846
|
}
|
|
847
847
|
n.observe(e);
|
|
848
848
|
}
|
|
849
|
-
return
|
|
849
|
+
return r(!0), s;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
|
|
851
|
+
function Ln(e, t, n, i) {
|
|
852
|
+
i === void 0 && (i = {});
|
|
853
853
|
const {
|
|
854
|
-
ancestorScroll:
|
|
855
|
-
ancestorResize:
|
|
856
|
-
elementResize:
|
|
854
|
+
ancestorScroll: o = !0,
|
|
855
|
+
ancestorResize: s = !0,
|
|
856
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
857
857
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
858
858
|
animationFrame: l = !1
|
|
859
|
-
} =
|
|
860
|
-
|
|
861
|
-
|
|
859
|
+
} = i, c = Je(e), d = o || s ? [...c ? Ce(c) : [], ...Ce(t)] : [];
|
|
860
|
+
d.forEach((L) => {
|
|
861
|
+
o && L.addEventListener("scroll", n, {
|
|
862
862
|
passive: !0
|
|
863
|
-
}),
|
|
863
|
+
}), s && L.addEventListener("resize", n);
|
|
864
864
|
});
|
|
865
|
-
const
|
|
866
|
-
let
|
|
867
|
-
|
|
868
|
-
let [
|
|
869
|
-
|
|
870
|
-
var
|
|
871
|
-
(
|
|
865
|
+
const h = c && a ? xn(c, n) : null;
|
|
866
|
+
let g = -1, f = null;
|
|
867
|
+
r && (f = new ResizeObserver((L) => {
|
|
868
|
+
let [x] = L;
|
|
869
|
+
x && x.target === c && f && (f.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
870
|
+
var T;
|
|
871
|
+
(T = f) == null || T.observe(t);
|
|
872
872
|
})), n();
|
|
873
|
-
}), c && !l &&
|
|
874
|
-
let
|
|
873
|
+
}), c && !l && f.observe(c), f.observe(t));
|
|
874
|
+
let m, w = l ? re(e) : null;
|
|
875
875
|
l && y();
|
|
876
876
|
function y() {
|
|
877
|
-
const
|
|
878
|
-
|
|
877
|
+
const L = re(e);
|
|
878
|
+
w && (L.x !== w.x || L.y !== w.y || L.width !== w.width || L.height !== w.height) && n(), w = L, m = requestAnimationFrame(y);
|
|
879
879
|
}
|
|
880
880
|
return n(), () => {
|
|
881
|
-
var
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
}),
|
|
881
|
+
var L;
|
|
882
|
+
d.forEach((x) => {
|
|
883
|
+
o && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
|
|
884
|
+
}), h == null || h(), (L = f) == null || L.disconnect(), f = null, l && cancelAnimationFrame(m);
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
const
|
|
888
|
-
const
|
|
889
|
-
platform:
|
|
887
|
+
const Tn = on, Sn = rn, En = tn, An = (e, t, n) => {
|
|
888
|
+
const i = /* @__PURE__ */ new Map(), o = {
|
|
889
|
+
platform: yn,
|
|
890
890
|
...n
|
|
891
|
-
},
|
|
892
|
-
...
|
|
893
|
-
_c:
|
|
891
|
+
}, s = {
|
|
892
|
+
...o.platform,
|
|
893
|
+
_c: i
|
|
894
894
|
};
|
|
895
|
-
return
|
|
896
|
-
...
|
|
897
|
-
platform:
|
|
895
|
+
return en(e, t, {
|
|
896
|
+
...o,
|
|
897
|
+
platform: s
|
|
898
898
|
});
|
|
899
899
|
};
|
|
900
|
-
function
|
|
900
|
+
function $n(e) {
|
|
901
901
|
return e != null && typeof e == "object" && "$el" in e;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
if (
|
|
903
|
+
function ct(e) {
|
|
904
|
+
if ($n(e)) {
|
|
905
905
|
const t = e.$el;
|
|
906
|
-
return
|
|
906
|
+
return Ye(t) && se(t) === "#comment" ? null : t;
|
|
907
907
|
}
|
|
908
908
|
return e;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
return typeof e == "function" ? e() :
|
|
910
|
+
function ge(e) {
|
|
911
|
+
return typeof e == "function" ? e() : ve(e);
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function At(e) {
|
|
914
914
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
const n =
|
|
916
|
+
function ut(e, t) {
|
|
917
|
+
const n = At(e);
|
|
918
918
|
return Math.round(t * n) / n;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function kn(e, t, n) {
|
|
921
921
|
n === void 0 && (n = {});
|
|
922
|
-
const
|
|
922
|
+
const i = n.whileElementsMounted, o = R(() => {
|
|
923
923
|
var E;
|
|
924
|
-
return (E =
|
|
925
|
-
}),
|
|
924
|
+
return (E = ge(n.open)) != null ? E : !0;
|
|
925
|
+
}), s = R(() => ge(n.middleware)), r = R(() => {
|
|
926
926
|
var E;
|
|
927
|
-
return (E =
|
|
928
|
-
}), a =
|
|
927
|
+
return (E = ge(n.placement)) != null ? E : "bottom";
|
|
928
|
+
}), a = R(() => {
|
|
929
929
|
var E;
|
|
930
|
-
return (E =
|
|
931
|
-
}), l =
|
|
930
|
+
return (E = ge(n.strategy)) != null ? E : "absolute";
|
|
931
|
+
}), l = R(() => {
|
|
932
932
|
var E;
|
|
933
|
-
return (E =
|
|
934
|
-
}), c =
|
|
933
|
+
return (E = ge(n.transform)) != null ? E : !0;
|
|
934
|
+
}), c = R(() => ct(e.value)), d = R(() => ct(t.value)), h = k(0), g = k(0), f = k(a.value), m = k(r.value), w = Nt({}), y = k(!1), L = R(() => {
|
|
935
935
|
const E = {
|
|
936
|
-
position:
|
|
936
|
+
position: f.value,
|
|
937
937
|
left: "0",
|
|
938
938
|
top: "0"
|
|
939
939
|
};
|
|
940
|
-
if (!
|
|
940
|
+
if (!d.value)
|
|
941
941
|
return E;
|
|
942
|
-
const D =
|
|
942
|
+
const D = ut(d.value, h.value), Z = ut(d.value, g.value);
|
|
943
943
|
return l.value ? {
|
|
944
944
|
...E,
|
|
945
|
-
transform: "translate(" + D + "px, " +
|
|
946
|
-
...
|
|
945
|
+
transform: "translate(" + D + "px, " + Z + "px)",
|
|
946
|
+
...At(d.value) >= 1.5 && {
|
|
947
947
|
willChange: "transform"
|
|
948
948
|
}
|
|
949
949
|
} : {
|
|
950
|
-
position:
|
|
950
|
+
position: f.value,
|
|
951
951
|
left: D + "px",
|
|
952
|
-
top:
|
|
952
|
+
top: Z + "px"
|
|
953
953
|
};
|
|
954
954
|
});
|
|
955
|
-
let
|
|
956
|
-
function
|
|
957
|
-
c.value == null ||
|
|
958
|
-
middleware:
|
|
959
|
-
placement:
|
|
955
|
+
let x;
|
|
956
|
+
function T() {
|
|
957
|
+
c.value == null || d.value == null || An(c.value, d.value, {
|
|
958
|
+
middleware: s.value,
|
|
959
|
+
placement: r.value,
|
|
960
960
|
strategy: a.value
|
|
961
961
|
}).then((E) => {
|
|
962
|
-
|
|
962
|
+
h.value = E.x, g.value = E.y, f.value = E.strategy, m.value = E.placement, w.value = E.middlewareData, y.value = !0;
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
-
function
|
|
966
|
-
typeof
|
|
965
|
+
function A() {
|
|
966
|
+
typeof x == "function" && (x(), x = void 0);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
if (
|
|
970
|
-
|
|
968
|
+
function S() {
|
|
969
|
+
if (A(), i === void 0) {
|
|
970
|
+
T();
|
|
971
971
|
return;
|
|
972
972
|
}
|
|
973
|
-
if (c.value != null &&
|
|
974
|
-
|
|
973
|
+
if (c.value != null && d.value != null) {
|
|
974
|
+
x = i(c.value, d.value, T);
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
|
|
978
|
+
function B() {
|
|
979
|
+
o.value || (y.value = !1);
|
|
980
980
|
}
|
|
981
|
-
return
|
|
981
|
+
return ee([s, r, a], T, {
|
|
982
982
|
flush: "sync"
|
|
983
|
-
}),
|
|
983
|
+
}), ee([c, d], S, {
|
|
984
984
|
flush: "sync"
|
|
985
|
-
}),
|
|
985
|
+
}), ee(o, B, {
|
|
986
986
|
flush: "sync"
|
|
987
|
-
}),
|
|
988
|
-
x:
|
|
989
|
-
y:
|
|
990
|
-
strategy:
|
|
991
|
-
placement:
|
|
992
|
-
middlewareData:
|
|
993
|
-
isPositioned:
|
|
994
|
-
floatingStyles:
|
|
995
|
-
update:
|
|
987
|
+
}), Ht() && Ut(A), {
|
|
988
|
+
x: ce(h),
|
|
989
|
+
y: ce(g),
|
|
990
|
+
strategy: ce(f),
|
|
991
|
+
placement: ce(m),
|
|
992
|
+
middlewareData: ce(w),
|
|
993
|
+
isPositioned: ce(y),
|
|
994
|
+
floatingStyles: L,
|
|
995
|
+
update: T
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const Rn = "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", le = (e, t) => {
|
|
999
999
|
const n = e.__vccOpts || e;
|
|
1000
|
-
for (const [
|
|
1001
|
-
n[
|
|
1000
|
+
for (const [i, o] of t)
|
|
1001
|
+
n[i] = o;
|
|
1002
1002
|
return n;
|
|
1003
|
-
},
|
|
1003
|
+
}, In = {
|
|
1004
1004
|
name: "Logo"
|
|
1005
|
-
},
|
|
1006
|
-
src:
|
|
1005
|
+
}, Bn = {
|
|
1006
|
+
src: Rn,
|
|
1007
1007
|
alt: "DDict Logo",
|
|
1008
1008
|
class: "w-6 h-6 cursor-pointer"
|
|
1009
1009
|
};
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
1010
|
+
function Mn(e, t, n, i, o, s) {
|
|
1011
|
+
return p(), v("img", Bn);
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1013
|
+
const On = /* @__PURE__ */ le(In, [["render", Mn]]), Dn = {}, Fn = {
|
|
1014
1014
|
class: "w-12 h-12 text-primary",
|
|
1015
1015
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1016
1016
|
viewBox: "0 0 24 24"
|
|
1017
|
-
},
|
|
1018
|
-
|
|
1017
|
+
}, Wn = /* @__PURE__ */ Xe('<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), _n = [
|
|
1018
|
+
Wn
|
|
1019
1019
|
];
|
|
1020
|
-
function
|
|
1021
|
-
return
|
|
1020
|
+
function zn(e, t) {
|
|
1021
|
+
return p(), v("svg", Fn, _n);
|
|
1022
1022
|
}
|
|
1023
|
-
const
|
|
1023
|
+
const Pn = /* @__PURE__ */ le(Dn, [["render", zn]]), Vn = { class: "rounded-lg bg-base-100 px-4 py-2 border border-base-300 shadow-lg" }, Nn = { class: "flex justify-center" }, Hn = {
|
|
1024
1024
|
__name: "Loading",
|
|
1025
1025
|
setup(e) {
|
|
1026
|
-
return (t, n) => (
|
|
1027
|
-
|
|
1028
|
-
|
|
1026
|
+
return (t, n) => (p(), v("div", Vn, [
|
|
1027
|
+
C("div", Nn, [
|
|
1028
|
+
O(Pn)
|
|
1029
1029
|
])
|
|
1030
1030
|
]));
|
|
1031
1031
|
}
|
|
1032
|
-
},
|
|
1032
|
+
}, Un = {
|
|
1033
1033
|
name: "Phonetic",
|
|
1034
1034
|
props: ["phonetic"]
|
|
1035
|
-
},
|
|
1036
|
-
function
|
|
1037
|
-
return
|
|
1038
|
-
|
|
1035
|
+
}, Zn = { class: "p-0 m-0" }, jn = { class: "text-xs font-md text-base-content/60" };
|
|
1036
|
+
function Xn(e, t, n, i, o, s) {
|
|
1037
|
+
return p(), v("p", Zn, [
|
|
1038
|
+
C("span", jn, "/" + ie(n.phonetic) + "/", 1)
|
|
1039
1039
|
]);
|
|
1040
1040
|
}
|
|
1041
|
-
const
|
|
1041
|
+
const qn = /* @__PURE__ */ le(Un, [["render", Xn]]), Yn = { class: "flex flex-col gap-2" }, Kn = {
|
|
1042
1042
|
__name: "Sentences",
|
|
1043
1043
|
props: {
|
|
1044
1044
|
sentences: {
|
|
@@ -1047,22 +1047,22 @@ const Mn = /* @__PURE__ */ oe(kn, [["render", In]]), Dn = { class: "flex flex-co
|
|
|
1047
1047
|
}
|
|
1048
1048
|
},
|
|
1049
1049
|
setup(e) {
|
|
1050
|
-
const t = e, n =
|
|
1050
|
+
const t = e, n = R(() => t.sentences.split(`
|
|
1051
1051
|
`));
|
|
1052
|
-
return (
|
|
1053
|
-
(
|
|
1054
|
-
key:
|
|
1052
|
+
return (i, o) => (p(), v("div", Yn, [
|
|
1053
|
+
(p(!0), v(G, null, me(n.value, (s, r) => (p(), v("p", {
|
|
1054
|
+
key: r,
|
|
1055
1055
|
class: "text-base text-base-content leading-tight p-0 mr-2"
|
|
1056
|
-
},
|
|
1056
|
+
}, ie(s), 1))), 128))
|
|
1057
1057
|
]));
|
|
1058
1058
|
}
|
|
1059
|
-
},
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
], -1),
|
|
1064
|
-
|
|
1065
|
-
],
|
|
1059
|
+
}, Gn = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-primary text-center" }, [
|
|
1060
|
+
/* @__PURE__ */ be(" 🤔 Don't understand? "),
|
|
1061
|
+
/* @__PURE__ */ C("span", { class: "text-secondary font-semibold" }, "Try AI"),
|
|
1062
|
+
/* @__PURE__ */ be(" ✨ ")
|
|
1063
|
+
], -1), Jn = [
|
|
1064
|
+
Gn
|
|
1065
|
+
], Qn = {
|
|
1066
1066
|
__name: "AIPromptButton",
|
|
1067
1067
|
props: {
|
|
1068
1068
|
show: {
|
|
@@ -1076,18 +1076,18 @@ const Mn = /* @__PURE__ */ oe(kn, [["render", In]]), Dn = { class: "flex flex-co
|
|
|
1076
1076
|
},
|
|
1077
1077
|
emits: ["click"],
|
|
1078
1078
|
setup(e) {
|
|
1079
|
-
return (t, n) => e.show ? (
|
|
1079
|
+
return (t, n) => e.show ? (p(), v("div", {
|
|
1080
1080
|
key: 0,
|
|
1081
|
-
class:
|
|
1081
|
+
class: $([
|
|
1082
1082
|
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1083
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"
|
|
1084
1084
|
]),
|
|
1085
|
-
onClick: n[0] || (n[0] = (
|
|
1086
|
-
},
|
|
1085
|
+
onClick: n[0] || (n[0] = (i) => !e.isLoading && t.$emit("click"))
|
|
1086
|
+
}, Jn, 2)) : M("", !0);
|
|
1087
1087
|
}
|
|
1088
|
-
},
|
|
1089
|
-
|
|
1090
|
-
],
|
|
1088
|
+
}, ei = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-accent text-center" }, "💡 Need Summary? ✨", -1), ti = [
|
|
1089
|
+
ei
|
|
1090
|
+
], ni = {
|
|
1091
1091
|
__name: "AIExplainPromptButton",
|
|
1092
1092
|
props: {
|
|
1093
1093
|
show: {
|
|
@@ -1101,22 +1101,22 @@ const Mn = /* @__PURE__ */ oe(kn, [["render", In]]), Dn = { class: "flex flex-co
|
|
|
1101
1101
|
},
|
|
1102
1102
|
emits: ["click"],
|
|
1103
1103
|
setup(e) {
|
|
1104
|
-
return (t, n) => e.show ? (
|
|
1104
|
+
return (t, n) => e.show ? (p(), v("div", {
|
|
1105
1105
|
key: 0,
|
|
1106
|
-
class:
|
|
1106
|
+
class: $([
|
|
1107
1107
|
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1108
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"
|
|
1109
1109
|
]),
|
|
1110
|
-
onClick: n[0] || (n[0] = (
|
|
1111
|
-
},
|
|
1110
|
+
onClick: n[0] || (n[0] = (i) => !e.isLoading && t.$emit("click"))
|
|
1111
|
+
}, ti, 2)) : M("", !0);
|
|
1112
1112
|
}
|
|
1113
|
-
},
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1117
|
-
], -1),
|
|
1118
|
-
|
|
1119
|
-
],
|
|
1113
|
+
}, ii = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-success text-center" }, [
|
|
1114
|
+
/* @__PURE__ */ be(" 📚 Learn this? "),
|
|
1115
|
+
/* @__PURE__ */ C("span", { class: "text-warning font-semibold" }, "Study now"),
|
|
1116
|
+
/* @__PURE__ */ be(" 🎯 ")
|
|
1117
|
+
], -1), oi = [
|
|
1118
|
+
ii
|
|
1119
|
+
], ri = {
|
|
1120
1120
|
__name: "LearnPromptButton",
|
|
1121
1121
|
props: {
|
|
1122
1122
|
show: {
|
|
@@ -1126,68 +1126,68 @@ const Mn = /* @__PURE__ */ oe(kn, [["render", In]]), Dn = { class: "flex flex-co
|
|
|
1126
1126
|
},
|
|
1127
1127
|
emits: ["click"],
|
|
1128
1128
|
setup(e) {
|
|
1129
|
-
return (t, n) => e.show ? (
|
|
1129
|
+
return (t, n) => e.show ? (p(), v("div", {
|
|
1130
1130
|
key: 0,
|
|
1131
|
-
class:
|
|
1131
|
+
class: $([
|
|
1132
1132
|
"mt-2 p-2 bg-gradient-to-r rounded-lg border transition-all duration-200",
|
|
1133
1133
|
"from-success/10 to-warning/10 border-success/20 cursor-pointer hover:from-success/20 hover:to-warning/20 hover:border-success/30"
|
|
1134
1134
|
]),
|
|
1135
|
-
onClick: n[0] || (n[0] = (
|
|
1136
|
-
},
|
|
1135
|
+
onClick: n[0] || (n[0] = (i) => t.$emit("click"))
|
|
1136
|
+
}, oi)) : M("", !0);
|
|
1137
1137
|
}
|
|
1138
|
-
},
|
|
1138
|
+
}, si = { class: "capitalize text-base italic font-normal text-base-content/60" }, li = { class: "text-base leading-6 text-base-content" }, ai = {
|
|
1139
1139
|
__name: "Dict",
|
|
1140
1140
|
props: {
|
|
1141
1141
|
dictionary: Array
|
|
1142
1142
|
},
|
|
1143
1143
|
setup(e) {
|
|
1144
|
-
return (t, n) => (
|
|
1145
|
-
(
|
|
1146
|
-
key:
|
|
1144
|
+
return (t, n) => (p(), v("div", null, [
|
|
1145
|
+
(p(!0), v(G, null, me(e.dictionary, (i, o) => (p(), v("div", {
|
|
1146
|
+
key: o,
|
|
1147
1147
|
class: "mt-2"
|
|
1148
1148
|
}, [
|
|
1149
|
-
|
|
1150
|
-
|
|
1149
|
+
C("p", si, ie(i.pos), 1),
|
|
1150
|
+
C("span", li, ie(i.terms.join(", ")), 1)
|
|
1151
1151
|
]))), 128))
|
|
1152
1152
|
]));
|
|
1153
1153
|
}
|
|
1154
|
-
},
|
|
1154
|
+
}, ci = { class: "" }, ui = /* @__PURE__ */ C("p", { class: "capitalize text-base italic font-normal text-base-content/60 mt-2" }, "Summary", -1), di = {
|
|
1155
1155
|
key: 0,
|
|
1156
1156
|
class: "list-none list-outside mt-2"
|
|
1157
|
-
},
|
|
1157
|
+
}, fi = ["innerHTML"], mi = {
|
|
1158
1158
|
__name: "Explanation",
|
|
1159
1159
|
props: {
|
|
1160
1160
|
explanation: Object
|
|
1161
1161
|
},
|
|
1162
1162
|
setup(e) {
|
|
1163
1163
|
return (t, n) => {
|
|
1164
|
-
var
|
|
1165
|
-
return
|
|
1166
|
-
|
|
1167
|
-
(
|
|
1168
|
-
(
|
|
1169
|
-
`)) || [], (
|
|
1170
|
-
key: `${
|
|
1171
|
-
innerHTML:
|
|
1164
|
+
var i, o;
|
|
1165
|
+
return p(), v("div", ci, [
|
|
1166
|
+
ui,
|
|
1167
|
+
(i = e.explanation) != null && i.result ? (p(), v("ul", di, [
|
|
1168
|
+
(p(!0), v(G, null, me(((o = e.explanation) == null ? void 0 : o.result.split(`
|
|
1169
|
+
`)) || [], (s, r) => (p(), v("li", {
|
|
1170
|
+
key: `${s}-${r}`,
|
|
1171
|
+
innerHTML: s,
|
|
1172
1172
|
class: "text-base text-base-content"
|
|
1173
|
-
}, null, 8,
|
|
1173
|
+
}, null, 8, fi))), 128))
|
|
1174
1174
|
])) : M("", !0)
|
|
1175
1175
|
]);
|
|
1176
1176
|
};
|
|
1177
1177
|
}
|
|
1178
|
-
},
|
|
1178
|
+
}, hi = ["disabled"], pi = /* @__PURE__ */ C("path", {
|
|
1179
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",
|
|
1180
1180
|
fill: "currentColor"
|
|
1181
|
-
}, null, -1),
|
|
1182
|
-
|
|
1183
|
-
],
|
|
1181
|
+
}, null, -1), gi = [
|
|
1182
|
+
pi
|
|
1183
|
+
], vi = ["disabled"], bi = /* @__PURE__ */ C("path", {
|
|
1184
1184
|
"fill-rule": "evenodd",
|
|
1185
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",
|
|
1186
1186
|
"clip-rule": "evenodd",
|
|
1187
1187
|
fill: "currentColor"
|
|
1188
|
-
}, null, -1),
|
|
1189
|
-
|
|
1190
|
-
],
|
|
1188
|
+
}, null, -1), Ci = [
|
|
1189
|
+
bi
|
|
1190
|
+
], wi = {
|
|
1191
1191
|
__name: "Player",
|
|
1192
1192
|
props: {
|
|
1193
1193
|
tts: {
|
|
@@ -1201,158 +1201,158 @@ const Mn = /* @__PURE__ */ oe(kn, [["render", In]]), Dn = { class: "flex flex-co
|
|
|
1201
1201
|
},
|
|
1202
1202
|
emits: ["loadTTS"],
|
|
1203
1203
|
setup(e, { emit: t }) {
|
|
1204
|
-
const n = e,
|
|
1204
|
+
const n = e, i = t, o = R(() => n.tts), s = k(!1), r = new Audio(), a = new (window.AudioContext || window.webkitAudioContext)();
|
|
1205
1205
|
let l = null;
|
|
1206
|
-
|
|
1207
|
-
|
|
1206
|
+
ee(
|
|
1207
|
+
o,
|
|
1208
1208
|
() => {
|
|
1209
|
-
if (!
|
|
1210
|
-
|
|
1209
|
+
if (!o.value) {
|
|
1210
|
+
s.value = !1;
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
|
-
|
|
1213
|
+
d();
|
|
1214
1214
|
},
|
|
1215
1215
|
{ immediate: !0 }
|
|
1216
|
-
),
|
|
1217
|
-
|
|
1216
|
+
), qe(() => {
|
|
1217
|
+
g(), r.src = "", a.close();
|
|
1218
1218
|
});
|
|
1219
1219
|
function c() {
|
|
1220
|
-
if (
|
|
1221
|
-
|
|
1220
|
+
if (o.value) {
|
|
1221
|
+
d();
|
|
1222
1222
|
return;
|
|
1223
1223
|
}
|
|
1224
|
-
|
|
1224
|
+
s.value = !0, i("loadTTS");
|
|
1225
1225
|
}
|
|
1226
|
-
async function
|
|
1227
|
-
if (
|
|
1228
|
-
|
|
1226
|
+
async function d() {
|
|
1227
|
+
if (o.value) {
|
|
1228
|
+
s.value = !0;
|
|
1229
1229
|
try {
|
|
1230
|
-
|
|
1231
|
-
|
|
1230
|
+
r.src = o.value, r.playbackRate = 0.7, await r.play(), r.onended = () => {
|
|
1231
|
+
s.value = !1;
|
|
1232
1232
|
};
|
|
1233
1233
|
} catch {
|
|
1234
|
-
await
|
|
1234
|
+
await h();
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
|
-
async function
|
|
1238
|
+
async function h() {
|
|
1239
1239
|
try {
|
|
1240
|
-
const
|
|
1241
|
-
l = a.createBufferSource(), l.buffer =
|
|
1242
|
-
|
|
1240
|
+
const m = await (await fetch(o.value)).arrayBuffer(), w = await a.decodeAudioData(m);
|
|
1241
|
+
l = a.createBufferSource(), l.buffer = w, l.playbackRate.value = 0.7, l.connect(a.destination), l.start(), l.onended = () => {
|
|
1242
|
+
s.value = !1, l = null;
|
|
1243
1243
|
};
|
|
1244
1244
|
} catch {
|
|
1245
|
-
|
|
1245
|
+
s.value = !1;
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1249
|
-
l && (l.stop(), l.disconnect(), l = null),
|
|
1248
|
+
function g() {
|
|
1249
|
+
l && (l.stop(), l.disconnect(), l = null), r.pause(), r.currentTime = 0, s.value = !1;
|
|
1250
1250
|
}
|
|
1251
|
-
return (
|
|
1251
|
+
return (f, m) => s.value ? (p(), v("button", {
|
|
1252
1252
|
key: 1,
|
|
1253
|
-
class:
|
|
1253
|
+
class: $(["btn btn-xs btn-circle", [
|
|
1254
1254
|
{ "btn-ghost": !e.disabled },
|
|
1255
1255
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
1256
1256
|
]]),
|
|
1257
1257
|
disabled: e.disabled,
|
|
1258
|
-
onClick:
|
|
1258
|
+
onClick: g
|
|
1259
1259
|
}, [
|
|
1260
|
-
(
|
|
1261
|
-
class:
|
|
1260
|
+
(p(), v("svg", {
|
|
1261
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1262
1262
|
viewBox: "0 0 24 24",
|
|
1263
1263
|
fill: "none",
|
|
1264
1264
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1265
|
-
},
|
|
1266
|
-
], 10,
|
|
1265
|
+
}, Ci, 2))
|
|
1266
|
+
], 10, vi)) : (p(), v("button", {
|
|
1267
1267
|
key: 0,
|
|
1268
|
-
class:
|
|
1268
|
+
class: $(["btn btn-xs btn-circle", [
|
|
1269
1269
|
{ "btn-ghost": !e.disabled },
|
|
1270
1270
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
1271
1271
|
]]),
|
|
1272
1272
|
disabled: e.disabled,
|
|
1273
1273
|
onClick: c
|
|
1274
1274
|
}, [
|
|
1275
|
-
(
|
|
1276
|
-
class:
|
|
1275
|
+
(p(), v("svg", {
|
|
1276
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1277
1277
|
viewBox: "0 0 16 16",
|
|
1278
1278
|
fill: "none",
|
|
1279
1279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1280
|
-
},
|
|
1281
|
-
], 10,
|
|
1280
|
+
}, gi, 2))
|
|
1281
|
+
], 10, hi));
|
|
1282
1282
|
}
|
|
1283
|
-
},
|
|
1283
|
+
}, yi = {
|
|
1284
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",
|
|
1285
1285
|
"data-tip": "Favorite"
|
|
1286
|
-
},
|
|
1286
|
+
}, xi = ["disabled"], Li = /* @__PURE__ */ C("path", {
|
|
1287
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",
|
|
1288
1288
|
fill: "currentColor"
|
|
1289
|
-
}, null, -1),
|
|
1290
|
-
|
|
1291
|
-
],
|
|
1289
|
+
}, null, -1), Ti = [
|
|
1290
|
+
Li
|
|
1291
|
+
], Si = /* @__PURE__ */ C("path", {
|
|
1292
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",
|
|
1293
1293
|
fill: "currentColor"
|
|
1294
|
-
}, null, -1),
|
|
1295
|
-
|
|
1296
|
-
],
|
|
1294
|
+
}, null, -1), Ei = [
|
|
1295
|
+
Si
|
|
1296
|
+
], Ai = {
|
|
1297
1297
|
__name: "Favorite",
|
|
1298
1298
|
props: {
|
|
1299
1299
|
isFilled: Boolean,
|
|
1300
1300
|
disabled: Boolean
|
|
1301
1301
|
},
|
|
1302
1302
|
setup(e) {
|
|
1303
|
-
return (t, n) => (
|
|
1304
|
-
|
|
1305
|
-
class:
|
|
1303
|
+
return (t, n) => (p(), v("div", yi, [
|
|
1304
|
+
C("button", {
|
|
1305
|
+
class: $(["btn btn-xs btn-circle", [
|
|
1306
1306
|
{ "btn-ghost": !e.disabled },
|
|
1307
1307
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
1308
1308
|
]]),
|
|
1309
1309
|
disabled: e.disabled
|
|
1310
1310
|
}, [
|
|
1311
|
-
e.isFilled ? (
|
|
1311
|
+
e.isFilled ? (p(), v("svg", {
|
|
1312
1312
|
key: 1,
|
|
1313
|
-
class:
|
|
1313
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1314
1314
|
viewBox: "0 0 16 16",
|
|
1315
1315
|
fill: "none",
|
|
1316
1316
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1317
|
-
},
|
|
1317
|
+
}, Ei, 2)) : (p(), v("svg", {
|
|
1318
1318
|
key: 0,
|
|
1319
|
-
class:
|
|
1319
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1320
1320
|
viewBox: "0 0 16 16",
|
|
1321
1321
|
fill: "none",
|
|
1322
1322
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1323
|
-
},
|
|
1324
|
-
], 10,
|
|
1323
|
+
}, Ti, 2))
|
|
1324
|
+
], 10, xi)
|
|
1325
1325
|
]));
|
|
1326
1326
|
}
|
|
1327
|
-
},
|
|
1327
|
+
}, $i = {}, ki = {
|
|
1328
1328
|
class: "w-6 h-6 text-primary",
|
|
1329
1329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1330
1330
|
viewBox: "0 0 24 24"
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1331
|
+
}, Ri = /* @__PURE__ */ Xe('<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), Ii = [
|
|
1332
|
+
Ri
|
|
1333
1333
|
];
|
|
1334
|
-
function
|
|
1335
|
-
return
|
|
1334
|
+
function Bi(e, t) {
|
|
1335
|
+
return p(), v("svg", ki, Ii);
|
|
1336
1336
|
}
|
|
1337
|
-
const
|
|
1337
|
+
const Qe = /* @__PURE__ */ le($i, [["render", Bi]]), Mi = {
|
|
1338
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",
|
|
1339
1339
|
"data-tip": "AI Translate"
|
|
1340
|
-
},
|
|
1340
|
+
}, Oi = ["disabled"], Di = /* @__PURE__ */ C("path", {
|
|
1341
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",
|
|
1342
1342
|
fill: "currentColor"
|
|
1343
|
-
}, null, -1),
|
|
1343
|
+
}, null, -1), Fi = /* @__PURE__ */ C("path", {
|
|
1344
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",
|
|
1345
1345
|
fill: "currentColor"
|
|
1346
|
-
}, null, -1),
|
|
1346
|
+
}, null, -1), Wi = /* @__PURE__ */ C("path", {
|
|
1347
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",
|
|
1348
1348
|
fill: "currentColor"
|
|
1349
|
-
}, null, -1),
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
],
|
|
1354
|
-
|
|
1355
|
-
],
|
|
1349
|
+
}, null, -1), _i = [
|
|
1350
|
+
Di,
|
|
1351
|
+
Fi,
|
|
1352
|
+
Wi
|
|
1353
|
+
], zi = /* @__PURE__ */ Xe('<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), Pi = [
|
|
1354
|
+
zi
|
|
1355
|
+
], Vi = {
|
|
1356
1356
|
__name: "AITranslateBtn",
|
|
1357
1357
|
props: {
|
|
1358
1358
|
isLoading: Boolean,
|
|
@@ -1360,58 +1360,58 @@ const wt = /* @__PURE__ */ oe(ho, [["render", Co]]), bo = {
|
|
|
1360
1360
|
isFilled: Boolean
|
|
1361
1361
|
},
|
|
1362
1362
|
setup(e) {
|
|
1363
|
-
return (t, n) => (
|
|
1364
|
-
e.isLoading ? (
|
|
1363
|
+
return (t, n) => (p(), v("div", Mi, [
|
|
1364
|
+
e.isLoading ? (p(), z(Qe, {
|
|
1365
1365
|
key: 0,
|
|
1366
1366
|
class: "inset-0 flex items-center justify-center"
|
|
1367
|
-
})) : (
|
|
1367
|
+
})) : (p(), v("button", {
|
|
1368
1368
|
key: 1,
|
|
1369
|
-
class:
|
|
1369
|
+
class: $(["btn btn-xs btn-circle", [
|
|
1370
1370
|
{ "btn-ghost": !e.disabled },
|
|
1371
1371
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
1372
1372
|
]]),
|
|
1373
1373
|
disabled: e.disabled
|
|
1374
1374
|
}, [
|
|
1375
|
-
e.isFilled ? (
|
|
1375
|
+
e.isFilled ? (p(), v("svg", {
|
|
1376
1376
|
key: 1,
|
|
1377
|
-
class:
|
|
1377
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1378
1378
|
viewBox: "0 0 12 12",
|
|
1379
1379
|
fill: "none",
|
|
1380
1380
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1381
|
-
},
|
|
1381
|
+
}, Pi, 2)) : (p(), v("svg", {
|
|
1382
1382
|
key: 0,
|
|
1383
|
-
class:
|
|
1383
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1384
1384
|
viewBox: "0 0 12 12",
|
|
1385
1385
|
fill: "none",
|
|
1386
1386
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1387
|
-
},
|
|
1388
|
-
], 10,
|
|
1387
|
+
}, _i, 2))
|
|
1388
|
+
], 10, Oi))
|
|
1389
1389
|
]));
|
|
1390
1390
|
}
|
|
1391
|
-
},
|
|
1391
|
+
}, Ni = {
|
|
1392
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",
|
|
1393
1393
|
"data-tip": "AI Summarize"
|
|
1394
|
-
},
|
|
1394
|
+
}, Hi = ["disabled"], Ui = /* @__PURE__ */ C("path", {
|
|
1395
1395
|
stroke: "currentColor",
|
|
1396
1396
|
"stroke-linecap": "round",
|
|
1397
1397
|
"stroke-linejoin": "round",
|
|
1398
1398
|
"stroke-width": "2",
|
|
1399
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"
|
|
1400
|
-
}, null, -1),
|
|
1401
|
-
|
|
1402
|
-
],
|
|
1400
|
+
}, null, -1), Zi = [
|
|
1401
|
+
Ui
|
|
1402
|
+
], ji = /* @__PURE__ */ C("path", {
|
|
1403
1403
|
fill: "currentColor",
|
|
1404
1404
|
d: "M12 7a5 5 0 0 0-2 9.584V19h4v-2.416A5.001 5.001 0 0 0 12 7z"
|
|
1405
|
-
}, null, -1),
|
|
1405
|
+
}, null, -1), Xi = /* @__PURE__ */ C("path", {
|
|
1406
1406
|
stroke: "currentColor",
|
|
1407
1407
|
"stroke-linecap": "round",
|
|
1408
1408
|
"stroke-linejoin": "round",
|
|
1409
1409
|
"stroke-width": "2",
|
|
1410
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"
|
|
1411
|
-
}, null, -1),
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
],
|
|
1411
|
+
}, null, -1), qi = [
|
|
1412
|
+
ji,
|
|
1413
|
+
Xi
|
|
1414
|
+
], Yi = {
|
|
1415
1415
|
__name: "AIExplainBtn",
|
|
1416
1416
|
props: {
|
|
1417
1417
|
isLoading: Boolean,
|
|
@@ -1419,76 +1419,76 @@ const wt = /* @__PURE__ */ oe(ho, [["render", Co]]), bo = {
|
|
|
1419
1419
|
isFilled: Boolean
|
|
1420
1420
|
},
|
|
1421
1421
|
setup(e) {
|
|
1422
|
-
return (t, n) => (
|
|
1423
|
-
e.isLoading ? (
|
|
1422
|
+
return (t, n) => (p(), v("div", Ni, [
|
|
1423
|
+
e.isLoading ? (p(), z(Qe, { key: 0 })) : (p(), v("button", {
|
|
1424
1424
|
key: 1,
|
|
1425
|
-
class:
|
|
1425
|
+
class: $(["btn btn-xs btn-circle", [
|
|
1426
1426
|
{ "btn-ghost": !e.disabled },
|
|
1427
1427
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
1428
1428
|
]]),
|
|
1429
1429
|
disabled: e.disabled
|
|
1430
1430
|
}, [
|
|
1431
|
-
e.isFilled ? (
|
|
1431
|
+
e.isFilled ? (p(), v("svg", {
|
|
1432
1432
|
key: 1,
|
|
1433
|
-
class:
|
|
1433
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1434
1434
|
viewBox: "0 0 24 24",
|
|
1435
1435
|
fill: "none",
|
|
1436
1436
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1437
|
-
},
|
|
1437
|
+
}, qi, 2)) : (p(), v("svg", {
|
|
1438
1438
|
key: 0,
|
|
1439
|
-
class:
|
|
1439
|
+
class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
|
|
1440
1440
|
viewBox: "0 0 24 24",
|
|
1441
1441
|
fill: "none",
|
|
1442
1442
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1443
|
-
},
|
|
1444
|
-
], 10,
|
|
1443
|
+
}, Zi, 2))
|
|
1444
|
+
], 10, Hi))
|
|
1445
1445
|
]));
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, Ki = {}, Gi = { class: "btn btn-xs btn-ghost btn-circle" }, Ji = /* @__PURE__ */ C("svg", {
|
|
1448
1448
|
class: "w-4 h-4 text-primary",
|
|
1449
1449
|
viewBox: "0 0 24 24",
|
|
1450
1450
|
fill: "none",
|
|
1451
1451
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1452
1452
|
}, [
|
|
1453
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ C("path", {
|
|
1454
1454
|
d: "M9.12596 1.63869C9.46935 1.54364 9.83221 1.70329 9.99413 2.02068C10.3672 2.75191 11.1261 3.25 12 3.25C12.8739 3.25 13.6328 2.75191 14.0059 2.02068C14.1678 1.70329 14.5307 1.54364 14.874 1.63869C16.5585 2.10497 18.0759 2.9704 19.3184 4.12574C19.5611 4.35137 19.6269 4.70948 19.4804 5.00666C19.3331 5.30535 19.25 5.6419 19.25 6C19.25 7.24263 20.2574 8.25 21.5 8.25L21.5314 8.24977C21.8629 8.24504 22.1583 8.45859 22.2576 8.77495C22.5777 9.79397 22.75 10.8776 22.75 12C22.75 12.7408 22.6749 13.4649 22.5318 14.1648C22.4548 14.5411 22.1059 14.7985 21.7237 14.7609C21.6504 14.7537 21.5758 14.75 21.5 14.75C20.2574 14.75 19.25 15.7574 19.25 17C19.25 17.5531 19.4486 18.0579 19.7793 18.4498C20.027 18.7434 20.0128 19.1767 19.7465 19.4535C18.4777 20.7719 16.8745 21.7678 15.0721 22.3044C14.6807 22.4209 14.2681 22.2029 14.1437 21.814C13.8535 20.906 13.0024 20.25 12 20.25C10.9976 20.25 10.1465 20.906 9.85629 21.814C9.73195 22.2029 9.31927 22.4209 8.92789 22.3044C7.12545 21.7678 5.52229 20.7719 4.25353 19.4535C3.98716 19.1767 3.97299 18.7434 4.22072 18.4498C4.55139 18.0579 4.75 17.5531 4.75 17C4.75 15.7574 3.74264 14.75 2.5 14.75C2.42423 14.75 2.34963 14.7537 2.27634 14.7609C1.89406 14.7985 1.54519 14.5411 1.46821 14.1648C1.32505 13.4649 1.25 12.7408 1.25 12C1.25 10.8776 1.42227 9.79398 1.74236 8.77494C1.84173 8.45859 2.13705 8.24504 2.4686 8.24977L2.5 8.25C3.74264 8.25 4.75 7.24263 4.75 6C4.75 5.6419 4.66689 5.30535 4.51962 5.00666C4.3731 4.70948 4.43894 4.35137 4.68159 4.12574C5.92411 2.9704 7.44153 2.10497 9.12596 1.63869ZM6.08277 4.88991C6.19152 5.24123 6.25 5.61424 6.25 6C6.25 7.88945 4.85261 9.45253 3.03493 9.71213C2.84898 10.4432 2.75 11.2096 2.75 12C2.75 12.4294 2.77921 12.8516 2.83567 13.2648C4.74948 13.4346 6.25 15.0421 6.25 17C6.25 17.6669 6.0754 18.2941 5.76971 18.8372C6.62645 19.6184 7.63002 20.2404 8.73362 20.657C9.37706 19.5189 10.598 18.75 12 18.75C13.402 18.75 14.6229 19.5189 15.2664 20.657C16.37 20.2404 17.3735 19.6184 18.2303 18.8372C17.9246 18.2941 17.75 17.6669 17.75 17C17.75 15.0421 19.2505 13.4346 21.1643 13.2648C21.2208 12.8516 21.25 12.4294 21.25 12C21.25 11.2096 21.151 10.4432 20.9651 9.71213C19.1474 9.45252 17.75 7.88945 17.75 6C17.75 5.61424 17.8085 5.24123 17.9172 4.88991C17.0618 4.1771 16.0762 3.61614 15.0018 3.24775C14.3184 4.15897 13.2287 4.75 12 4.75C10.7713 4.75 9.68158 4.15897 8.99819 3.24775C7.92382 3.61614 6.93823 4.1771 6.08277 4.88991Z",
|
|
1455
1455
|
fill: "currentColor"
|
|
1456
1456
|
}),
|
|
1457
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ C("path", {
|
|
1458
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",
|
|
1459
1459
|
fill: "currentColor"
|
|
1460
1460
|
})
|
|
1461
|
-
], -1),
|
|
1462
|
-
|
|
1461
|
+
], -1), Qi = [
|
|
1462
|
+
Ji
|
|
1463
1463
|
];
|
|
1464
|
-
function
|
|
1465
|
-
return
|
|
1464
|
+
function eo(e, t) {
|
|
1465
|
+
return p(), v("button", Gi, Qi);
|
|
1466
1466
|
}
|
|
1467
|
-
const
|
|
1467
|
+
const to = /* @__PURE__ */ le(Ki, [["render", eo]]), no = {}, io = { class: "btn btn-xs btn-circle btn-ghost" }, oo = /* @__PURE__ */ C("svg", {
|
|
1468
1468
|
class: "w-4 h-4 text-primary",
|
|
1469
1469
|
viewBox: "0 0 16 16",
|
|
1470
1470
|
fill: "none",
|
|
1471
1471
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1472
1472
|
}, [
|
|
1473
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ C("path", {
|
|
1474
1474
|
"fill-rule": "evenodd",
|
|
1475
1475
|
"clip-rule": "evenodd",
|
|
1476
1476
|
d: "M3.19102 3.19102C3.44571 2.93633 3.85864 2.93633 4.11333 3.19102L12.809 11.8867C13.0637 12.1414 13.0637 12.5543 12.809 12.809C12.5543 13.0637 12.1414 13.0637 11.8867 12.809L3.19102 4.11333C2.93633 3.85864 2.93633 3.44571 3.19102 3.19102Z",
|
|
1477
1477
|
fill: "currentColor"
|
|
1478
1478
|
}),
|
|
1479
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ C("path", {
|
|
1480
1480
|
"fill-rule": "evenodd",
|
|
1481
1481
|
"clip-rule": "evenodd",
|
|
1482
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",
|
|
1483
1483
|
fill: "currentColor"
|
|
1484
1484
|
})
|
|
1485
|
-
], -1),
|
|
1486
|
-
|
|
1485
|
+
], -1), ro = [
|
|
1486
|
+
oo
|
|
1487
1487
|
];
|
|
1488
|
-
function
|
|
1489
|
-
return
|
|
1488
|
+
function so(e, t) {
|
|
1489
|
+
return p(), v("button", io, ro);
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1491
|
+
const lo = /* @__PURE__ */ le(no, [["render", so]]), ao = {
|
|
1492
1492
|
name: "ThemeSelector",
|
|
1493
1493
|
props: {
|
|
1494
1494
|
currentTheme: {
|
|
@@ -1525,55 +1525,61 @@ const jo = /* @__PURE__ */ oe(Ho, [["render", Xo]]), Yo = {
|
|
|
1525
1525
|
});
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
|
-
},
|
|
1528
|
+
}, co = { class: "dropdown dropdown-end z-50" }, uo = /* @__PURE__ */ C("div", {
|
|
1529
1529
|
tabindex: "0",
|
|
1530
1530
|
role: "button",
|
|
1531
1531
|
class: "btn btn-ghost btn-circle btn-xs"
|
|
1532
1532
|
}, [
|
|
1533
|
-
/* @__PURE__ */
|
|
1533
|
+
/* @__PURE__ */ C("svg", {
|
|
1534
1534
|
class: "w-4 h-4 text-primary",
|
|
1535
1535
|
fill: "currentColor",
|
|
1536
1536
|
viewBox: "0 0 20 20"
|
|
1537
1537
|
}, [
|
|
1538
|
-
/* @__PURE__ */
|
|
1538
|
+
/* @__PURE__ */ C("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" })
|
|
1539
1539
|
])
|
|
1540
|
-
], -1),
|
|
1540
|
+
], -1), fo = {
|
|
1541
1541
|
tabindex: "0",
|
|
1542
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"
|
|
1543
|
-
},
|
|
1544
|
-
function
|
|
1545
|
-
return
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
(
|
|
1549
|
-
key:
|
|
1543
|
+
}, mo = ["id", "value", "checked", "onChange"], ho = ["for"], po = { class: "flex items-center gap-2" };
|
|
1544
|
+
function go(e, t, n, i, o, s) {
|
|
1545
|
+
return p(), v("div", co, [
|
|
1546
|
+
uo,
|
|
1547
|
+
C("ul", fo, [
|
|
1548
|
+
(p(!0), v(G, null, me(o.availableThemes, (r) => (p(), v("li", {
|
|
1549
|
+
key: r.value
|
|
1550
1550
|
}, [
|
|
1551
|
-
|
|
1551
|
+
C("input", {
|
|
1552
1552
|
type: "radio",
|
|
1553
|
-
id: `theme-${
|
|
1554
|
-
value:
|
|
1555
|
-
checked: n.currentTheme ===
|
|
1556
|
-
onChange: (a) =>
|
|
1553
|
+
id: `theme-${r.value}`,
|
|
1554
|
+
value: r.value,
|
|
1555
|
+
checked: n.currentTheme === r.value,
|
|
1556
|
+
onChange: (a) => s.handleThemeChange(r.value),
|
|
1557
1557
|
class: "theme-controller sr-only"
|
|
1558
|
-
}, null, 40,
|
|
1559
|
-
|
|
1560
|
-
for: `theme-${
|
|
1561
|
-
class:
|
|
1562
|
-
onClick: t[0] || (t[0] = (...a) =>
|
|
1558
|
+
}, null, 40, mo),
|
|
1559
|
+
C("label", {
|
|
1560
|
+
for: `theme-${r.value}`,
|
|
1561
|
+
class: $(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200", { "bg-primary text-primary-content": n.currentTheme === r.value }]),
|
|
1562
|
+
onClick: t[0] || (t[0] = (...a) => s.handleLabelClick && s.handleLabelClick(...a))
|
|
1563
1563
|
}, [
|
|
1564
|
-
|
|
1565
|
-
|
|
1564
|
+
C("span", po, [
|
|
1565
|
+
C("span", {
|
|
1566
1566
|
class: "w-3 h-3 rounded-full",
|
|
1567
|
-
style:
|
|
1567
|
+
style: Ze({ backgroundColor: r.color })
|
|
1568
1568
|
}, null, 4),
|
|
1569
|
-
|
|
1569
|
+
be(" " + ie(r.name), 1)
|
|
1570
1570
|
])
|
|
1571
|
-
], 10,
|
|
1571
|
+
], 10, ho)
|
|
1572
1572
|
]))), 128))
|
|
1573
1573
|
])
|
|
1574
1574
|
]);
|
|
1575
1575
|
}
|
|
1576
|
-
const
|
|
1576
|
+
const vo = /* @__PURE__ */ le(ao, [["render", go]]), bo = { class: "flex flex-col" }, Co = {
|
|
1577
|
+
class: "flex min-w-0 gap-1",
|
|
1578
|
+
"data-mode-toggle": ""
|
|
1579
|
+
}, wo = ["disabled"], yo = { class: "flex shrink-0 items-center" }, xo = {
|
|
1580
|
+
key: 0,
|
|
1581
|
+
class: "flex items-center gap-1 px-2 pb-1"
|
|
1582
|
+
}, dt = {
|
|
1577
1583
|
__name: "Header",
|
|
1578
1584
|
props: {
|
|
1579
1585
|
tts: String,
|
|
@@ -1593,6 +1599,14 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1593
1599
|
showThemeSelector: {
|
|
1594
1600
|
type: Boolean,
|
|
1595
1601
|
default: !0
|
|
1602
|
+
},
|
|
1603
|
+
mode: {
|
|
1604
|
+
type: String,
|
|
1605
|
+
default: "translate"
|
|
1606
|
+
},
|
|
1607
|
+
canWrite: {
|
|
1608
|
+
type: Boolean,
|
|
1609
|
+
default: !0
|
|
1596
1610
|
}
|
|
1597
1611
|
},
|
|
1598
1612
|
emits: [
|
|
@@ -1603,70 +1617,83 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1603
1617
|
"aiTranslate",
|
|
1604
1618
|
"aiExplain",
|
|
1605
1619
|
"themeChange",
|
|
1606
|
-
"dragStart"
|
|
1620
|
+
"dragStart",
|
|
1621
|
+
"requestTranslate",
|
|
1622
|
+
"requestWrite"
|
|
1607
1623
|
],
|
|
1608
1624
|
setup(e, { emit: t }) {
|
|
1609
|
-
const n = e, o = t,
|
|
1610
|
-
|
|
1611
|
-
}, r = (
|
|
1612
|
-
|
|
1625
|
+
const n = e, i = R(() => n.mode !== "write" && !n.isServiceUnavailable), o = t, s = (a) => {
|
|
1626
|
+
a.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "mouse", event: a }), a.preventDefault());
|
|
1627
|
+
}, r = (a) => {
|
|
1628
|
+
a.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "touch", event: a }), a.preventDefault());
|
|
1613
1629
|
};
|
|
1614
|
-
return (
|
|
1615
|
-
|
|
1616
|
-
class: "flex
|
|
1617
|
-
onMousedown:
|
|
1630
|
+
return (a, l) => (p(), v("div", bo, [
|
|
1631
|
+
C("div", {
|
|
1632
|
+
class: "flex cursor-grab flex-row items-center justify-between gap-1 p-2 pb-1 active:cursor-grabbing",
|
|
1633
|
+
onMousedown: s,
|
|
1618
1634
|
onTouchstart: r
|
|
1619
1635
|
}, [
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
onClick: a[1] || (a[1] = (l) => o("aiTranslate"))
|
|
1635
|
-
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1636
|
-
!e.isServiceUnavailable && e.isAIExplainVisible ? (v(), V(Oo, {
|
|
1637
|
-
key: 1,
|
|
1638
|
-
isLoading: e.isAIExplainLoading,
|
|
1639
|
-
isFilled: e.isAIExplain,
|
|
1640
|
-
onClick: a[2] || (a[2] = (l) => o("aiExplain"))
|
|
1641
|
-
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1642
|
-
!e.isServiceUnavailable && n.isFavoriteFeatureEnabled ? (v(), V(mo, {
|
|
1643
|
-
key: 2,
|
|
1644
|
-
isFilled: n.isFavorite,
|
|
1645
|
-
onClick: a[3] || (a[3] = (l) => o("favorite")),
|
|
1646
|
-
disabled: e.isAITranslationLoading || e.isAIExplainLoading
|
|
1647
|
-
}, null, 8, ["isFilled", "disabled"])) : M("", !0)
|
|
1636
|
+
C("div", Co, [
|
|
1637
|
+
C("button", {
|
|
1638
|
+
type: "button",
|
|
1639
|
+
class: $(["btn btn-xs", e.mode === "write" ? "btn-ghost" : "btn-primary"]),
|
|
1640
|
+
"data-mode": "translate",
|
|
1641
|
+
onClick: l[0] || (l[0] = (c) => o("requestTranslate"))
|
|
1642
|
+
}, " Translate ", 2),
|
|
1643
|
+
C("button", {
|
|
1644
|
+
type: "button",
|
|
1645
|
+
class: $(["btn btn-xs", e.mode === "write" ? "btn-primary" : "btn-ghost"]),
|
|
1646
|
+
disabled: !e.canWrite,
|
|
1647
|
+
"data-mode": "write",
|
|
1648
|
+
onClick: l[1] || (l[1] = (c) => o("requestWrite"))
|
|
1649
|
+
}, " Write ", 10, wo)
|
|
1648
1650
|
]),
|
|
1649
|
-
|
|
1650
|
-
e.showThemeSelector ? (
|
|
1651
|
+
C("div", yo, [
|
|
1652
|
+
e.showThemeSelector ? (p(), z(vo, {
|
|
1651
1653
|
key: 0,
|
|
1652
1654
|
"current-theme": e.theme,
|
|
1653
|
-
onThemeChange:
|
|
1655
|
+
onThemeChange: l[2] || (l[2] = (c) => o("themeChange", c))
|
|
1654
1656
|
}, null, 8, ["current-theme"])) : M("", !0),
|
|
1655
|
-
|
|
1656
|
-
onClick:
|
|
1657
|
+
O(to, {
|
|
1658
|
+
onClick: l[3] || (l[3] = (c) => o("setting"))
|
|
1657
1659
|
}),
|
|
1658
|
-
|
|
1659
|
-
onClick:
|
|
1660
|
+
O(lo, {
|
|
1661
|
+
onClick: l[4] || (l[4] = (c) => o("close"))
|
|
1660
1662
|
})
|
|
1661
1663
|
])
|
|
1662
|
-
], 32)
|
|
1664
|
+
], 32),
|
|
1665
|
+
i.value ? (p(), v("div", xo, [
|
|
1666
|
+
O(wi, {
|
|
1667
|
+
disabled: e.isAITranslationLoading || e.isAIExplainLoading,
|
|
1668
|
+
tts: n.tts,
|
|
1669
|
+
onLoadTTS: l[5] || (l[5] = (c) => a.$emit("loadTTS"))
|
|
1670
|
+
}, null, 8, ["disabled", "tts"]),
|
|
1671
|
+
e.isAITranslateVisible ? (p(), z(Vi, {
|
|
1672
|
+
key: 0,
|
|
1673
|
+
isLoading: e.isAITranslationLoading,
|
|
1674
|
+
isFilled: e.isAITranslate,
|
|
1675
|
+
onClick: l[6] || (l[6] = (c) => o("aiTranslate"))
|
|
1676
|
+
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1677
|
+
e.isAIExplainVisible ? (p(), z(Yi, {
|
|
1678
|
+
key: 1,
|
|
1679
|
+
isLoading: e.isAIExplainLoading,
|
|
1680
|
+
isFilled: e.isAIExplain,
|
|
1681
|
+
onClick: l[7] || (l[7] = (c) => o("aiExplain"))
|
|
1682
|
+
}, null, 8, ["isLoading", "isFilled"])) : M("", !0),
|
|
1683
|
+
n.isFavoriteFeatureEnabled ? (p(), z(Ai, {
|
|
1684
|
+
key: 2,
|
|
1685
|
+
isFilled: n.isFavorite,
|
|
1686
|
+
onClick: l[8] || (l[8] = (c) => o("favorite")),
|
|
1687
|
+
disabled: e.isAITranslationLoading || e.isAIExplainLoading
|
|
1688
|
+
}, null, 8, ["isFilled", "disabled"])) : M("", !0)
|
|
1689
|
+
])) : M("", !0)
|
|
1663
1690
|
]));
|
|
1664
1691
|
}
|
|
1665
|
-
},
|
|
1692
|
+
}, Lo = { class: "pointer-events-none absolute inset-0 z-20" }, To = ["data-resize", "aria-label", "onPointerdown"], So = {
|
|
1666
1693
|
__name: "ResizeHandle",
|
|
1667
1694
|
emits: ["resizeStart"],
|
|
1668
1695
|
setup(e, { emit: t }) {
|
|
1669
|
-
const n = t,
|
|
1696
|
+
const n = t, i = [
|
|
1670
1697
|
{ name: "n", class: "inset-x-3 top-0 h-2 cursor-ns-resize" },
|
|
1671
1698
|
{ name: "s", class: "inset-x-3 bottom-0 h-2 cursor-ns-resize" },
|
|
1672
1699
|
{ name: "e", class: "inset-y-3 right-0 w-2 cursor-ew-resize" },
|
|
@@ -1675,35 +1702,188 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1675
1702
|
{ name: "ne", class: "right-0 top-0 h-3 w-3 cursor-nesw-resize" },
|
|
1676
1703
|
{ name: "sw", class: "bottom-0 left-0 h-3 w-3 cursor-nesw-resize" },
|
|
1677
1704
|
{ name: "se", class: "bottom-0 right-0 h-3 w-3 cursor-nwse-resize" }
|
|
1678
|
-
],
|
|
1705
|
+
], o = (s, r) => {
|
|
1679
1706
|
var a, l;
|
|
1680
|
-
|
|
1707
|
+
r.pointerType === "mouse" && r.button !== 0 || (r.preventDefault(), r.stopPropagation(), (l = (a = r.currentTarget).setPointerCapture) == null || l.call(a, r.pointerId), n("resizeStart", { edge: s, event: r }));
|
|
1681
1708
|
};
|
|
1682
|
-
return (
|
|
1683
|
-
(
|
|
1709
|
+
return (s, r) => (p(), v("div", Lo, [
|
|
1710
|
+
(p(), v(G, null, me(i, (a) => C("div", {
|
|
1684
1711
|
key: a.name,
|
|
1685
1712
|
"data-resize": a.name,
|
|
1686
|
-
class:
|
|
1713
|
+
class: $(["pointer-events-auto absolute touch-none hover:bg-base-content/20", a.class]),
|
|
1687
1714
|
"aria-label": `Resize from the ${a.name} border`,
|
|
1688
|
-
onPointerdown: (l) =>
|
|
1689
|
-
onClick:
|
|
1715
|
+
onPointerdown: (l) => o(a.name, l),
|
|
1716
|
+
onClick: r[0] || (r[0] = Zt(() => {
|
|
1690
1717
|
}, ["stop"]))
|
|
1691
|
-
}, null, 42,
|
|
1718
|
+
}, null, 42, To)), 64))
|
|
1692
1719
|
]));
|
|
1693
1720
|
}
|
|
1694
|
-
},
|
|
1721
|
+
}, et = 4, Ae = "check", Eo = [
|
|
1722
|
+
{ value: "check", label: "Check" },
|
|
1723
|
+
{ value: "improve", label: "Improve" },
|
|
1724
|
+
{ value: "improve-plus", label: "Academy" },
|
|
1725
|
+
{ value: "friendly", label: "Friendly" },
|
|
1726
|
+
{ value: "simplify", label: "Simplify" },
|
|
1727
|
+
{ value: "more-detailed", label: "More detailed" }
|
|
1728
|
+
], Ao = /* @__PURE__ */ new Set(["", "text", "search", "email", "url", "tel"]), $o = 4e4;
|
|
1729
|
+
function $t(e, t) {
|
|
1730
|
+
return !!e && String(t || "").trim().length >= et;
|
|
1731
|
+
}
|
|
1732
|
+
function ko(e) {
|
|
1733
|
+
const t = (e == null ? void 0 : e.nodeType) === 3 ? e.parentElement : e;
|
|
1734
|
+
if (!t || t.nodeType !== 1) return !1;
|
|
1735
|
+
if (Ro(t)) return !0;
|
|
1736
|
+
if (t.disabled || t.readOnly) return !1;
|
|
1737
|
+
const n = t.tagName;
|
|
1738
|
+
return n === "TEXTAREA" ? !0 : n === "INPUT" ? Ao.has((t.type || "text").toLowerCase()) : !1;
|
|
1739
|
+
}
|
|
1740
|
+
function Ro(e) {
|
|
1741
|
+
var n;
|
|
1742
|
+
let t = e;
|
|
1743
|
+
for (; t && t.nodeType === 1; ) {
|
|
1744
|
+
const i = (n = t.getAttribute) == null ? void 0 : n.call(t, "contenteditable"), o = typeof t.contentEditable == "string" ? t.contentEditable : "";
|
|
1745
|
+
if (i === "false" || o === "false") return !1;
|
|
1746
|
+
if (t.isContentEditable || i === "" || i === "true" || i === "plaintext-only" || o === "true" || o === "plaintext-only")
|
|
1747
|
+
return !0;
|
|
1748
|
+
t = t.parentElement;
|
|
1749
|
+
}
|
|
1750
|
+
return !1;
|
|
1751
|
+
}
|
|
1752
|
+
function Io(e, t) {
|
|
1753
|
+
const n = ft(e), i = ft(t);
|
|
1754
|
+
return !n.length && !i.length ? [] : n.length * i.length > $o ? [{ value: String(t || ""), added: !1, removed: !1 }] : Do(n, i, Oo(n, i));
|
|
1755
|
+
}
|
|
1756
|
+
function Bo(e) {
|
|
1757
|
+
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1758
|
+
}
|
|
1759
|
+
function Mo(e, t) {
|
|
1760
|
+
return Io(e, t).map((n) => {
|
|
1761
|
+
const i = Bo(n.value);
|
|
1762
|
+
return n.added ? `<span class="bg-success/40">${i}</span>` : n.removed ? `<span class="bg-error/30 line-through">${i}</span>` : i;
|
|
1763
|
+
}).join("");
|
|
1764
|
+
}
|
|
1765
|
+
function ft(e) {
|
|
1766
|
+
return String(e || "").split(/(\s+)/).filter((t) => t.length);
|
|
1767
|
+
}
|
|
1768
|
+
function Oo(e, t) {
|
|
1769
|
+
const n = Array.from({ length: e.length + 1 }, () => new Array(t.length + 1).fill(0));
|
|
1770
|
+
for (let i = e.length - 1; i >= 0; i--)
|
|
1771
|
+
for (let o = t.length - 1; o >= 0; o--)
|
|
1772
|
+
n[i][o] = e[i] === t[o] ? n[i + 1][o + 1] + 1 : Math.max(n[i + 1][o], n[i][o + 1]);
|
|
1773
|
+
return n;
|
|
1774
|
+
}
|
|
1775
|
+
function Do(e, t, n) {
|
|
1776
|
+
const i = [];
|
|
1777
|
+
let o = 0, s = 0;
|
|
1778
|
+
const r = (a, l, c) => {
|
|
1779
|
+
const d = i[i.length - 1];
|
|
1780
|
+
if (d && d.added === l && d.removed === c) {
|
|
1781
|
+
d.value += a;
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
i.push({ value: a, added: l, removed: c });
|
|
1785
|
+
};
|
|
1786
|
+
for (; o < e.length && s < t.length; )
|
|
1787
|
+
e[o] === t[s] ? (r(e[o], !1, !1), o += 1, s += 1) : n[o + 1][s] >= n[o][s + 1] ? (r(e[o], !1, !0), o += 1) : (r(t[s], !0, !1), s += 1);
|
|
1788
|
+
for (; o < e.length; )
|
|
1789
|
+
r(e[o], !1, !0), o += 1;
|
|
1790
|
+
for (; s < t.length; )
|
|
1791
|
+
r(t[s], !0, !1), s += 1;
|
|
1792
|
+
return i;
|
|
1793
|
+
}
|
|
1794
|
+
const Fo = {
|
|
1795
|
+
class: "flex flex-col gap-2 border-t border-base-300 p-3",
|
|
1796
|
+
"data-write-view": ""
|
|
1797
|
+
}, Wo = { class: "flex items-center gap-1" }, _o = ["value", "disabled"], zo = ["value"], Po = ["disabled"], Vo = ["disabled"], No = {
|
|
1798
|
+
key: 0,
|
|
1799
|
+
"data-write-loading": ""
|
|
1800
|
+
}, Ho = {
|
|
1801
|
+
key: 1,
|
|
1802
|
+
class: "text-sm"
|
|
1803
|
+
}, Uo = ["innerHTML"], Zo = {
|
|
1804
|
+
key: 3,
|
|
1805
|
+
class: "whitespace-pre-wrap break-words text-sm",
|
|
1806
|
+
"data-result": ""
|
|
1807
|
+
}, jo = {
|
|
1808
|
+
__name: "WriteView",
|
|
1809
|
+
props: {
|
|
1810
|
+
text: {
|
|
1811
|
+
type: String,
|
|
1812
|
+
default: ""
|
|
1813
|
+
},
|
|
1814
|
+
result: {
|
|
1815
|
+
type: String,
|
|
1816
|
+
default: ""
|
|
1817
|
+
},
|
|
1818
|
+
action: {
|
|
1819
|
+
type: String,
|
|
1820
|
+
default: "check"
|
|
1821
|
+
},
|
|
1822
|
+
loading: Boolean,
|
|
1823
|
+
editable: Boolean,
|
|
1824
|
+
unavailable: Boolean
|
|
1825
|
+
},
|
|
1826
|
+
emits: ["action", "copy", "replace"],
|
|
1827
|
+
setup(e, { emit: t }) {
|
|
1828
|
+
const n = e, i = t, o = R(() => n.text.trim().length < et), s = R(() => !n.loading && !!n.result), r = R(() => n.editable && s.value), a = R(() => n.action === "check" && !!n.result), l = R(() => a.value ? Mo(n.text, n.result) : "");
|
|
1829
|
+
function c() {
|
|
1830
|
+
s.value && i("copy", n.result);
|
|
1831
|
+
}
|
|
1832
|
+
function d() {
|
|
1833
|
+
r.value && i("replace", { text: n.text, result: n.result });
|
|
1834
|
+
}
|
|
1835
|
+
return (h, g) => (p(), v("div", Fo, [
|
|
1836
|
+
C("div", Wo, [
|
|
1837
|
+
C("select", {
|
|
1838
|
+
class: "select select-bordered select-xs min-w-0 flex-1",
|
|
1839
|
+
value: e.action,
|
|
1840
|
+
disabled: e.loading || o.value,
|
|
1841
|
+
"data-write-action": "",
|
|
1842
|
+
onChange: g[0] || (g[0] = (f) => i("action", f.target.value))
|
|
1843
|
+
}, [
|
|
1844
|
+
(p(!0), v(G, null, me(ve(Eo), (f) => (p(), v("option", {
|
|
1845
|
+
key: f.value,
|
|
1846
|
+
value: f.value
|
|
1847
|
+
}, ie(f.label), 9, zo))), 128))
|
|
1848
|
+
], 40, _o),
|
|
1849
|
+
C("button", {
|
|
1850
|
+
type: "button",
|
|
1851
|
+
class: "btn btn-xs",
|
|
1852
|
+
disabled: !s.value,
|
|
1853
|
+
"data-copy": "",
|
|
1854
|
+
onClick: c
|
|
1855
|
+
}, " Copy ", 8, Po),
|
|
1856
|
+
C("button", {
|
|
1857
|
+
type: "button",
|
|
1858
|
+
class: "btn btn-xs btn-primary",
|
|
1859
|
+
disabled: !r.value,
|
|
1860
|
+
"data-replace": "",
|
|
1861
|
+
onClick: d
|
|
1862
|
+
}, " Replace ", 8, Vo)
|
|
1863
|
+
]),
|
|
1864
|
+
e.loading ? (p(), v("div", No, [
|
|
1865
|
+
O(Qe)
|
|
1866
|
+
])) : e.unavailable ? (p(), v("p", Ho, "Service Unavailable")) : a.value ? (p(), v("pre", {
|
|
1867
|
+
key: 2,
|
|
1868
|
+
class: "m-0 whitespace-pre-wrap break-words font-sans text-sm",
|
|
1869
|
+
"data-diff": "",
|
|
1870
|
+
innerHTML: l.value
|
|
1871
|
+
}, null, 8, Uo)) : e.result ? (p(), v("p", Zo, ie(e.result), 1)) : M("", !0)
|
|
1872
|
+
]));
|
|
1873
|
+
}
|
|
1874
|
+
}, ne = {
|
|
1695
1875
|
LOGO: "LOGO",
|
|
1696
1876
|
LOADING: "LOADING",
|
|
1697
1877
|
DATA: "DATA",
|
|
1698
1878
|
ERROR: "ERROR",
|
|
1699
1879
|
HIDDEN: "HIDDEN"
|
|
1700
|
-
},
|
|
1880
|
+
}, Xo = 320, qo = 240, Yo = 250, Ko = 120, Go = 8, Jo = ["ar", "fa", "iw", "yi", "ur", "pa"], Qo = {
|
|
1701
1881
|
key: 0,
|
|
1702
1882
|
class: "flex justify-center"
|
|
1703
|
-
},
|
|
1883
|
+
}, er = {
|
|
1704
1884
|
key: 1,
|
|
1705
1885
|
class: "flex justify-center"
|
|
1706
|
-
},
|
|
1886
|
+
}, tr = { class: "p-3 border-t border-base-300" }, nr = {
|
|
1707
1887
|
name: "Bubble",
|
|
1708
1888
|
props: [
|
|
1709
1889
|
"translation",
|
|
@@ -1717,7 +1897,13 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1717
1897
|
"aiExplainMinLength",
|
|
1718
1898
|
"theme",
|
|
1719
1899
|
"showThemeSelector",
|
|
1720
|
-
"constrained"
|
|
1900
|
+
"constrained",
|
|
1901
|
+
"mode",
|
|
1902
|
+
"editable",
|
|
1903
|
+
"writing",
|
|
1904
|
+
"writeAction",
|
|
1905
|
+
"isWriteLoading",
|
|
1906
|
+
"selectedText"
|
|
1721
1907
|
],
|
|
1722
1908
|
emits: [
|
|
1723
1909
|
"logo",
|
|
@@ -1730,7 +1916,10 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1730
1916
|
"learn",
|
|
1731
1917
|
"themeChange",
|
|
1732
1918
|
"dragStart",
|
|
1733
|
-
"resizeStart"
|
|
1919
|
+
"resizeStart",
|
|
1920
|
+
"write",
|
|
1921
|
+
"replace",
|
|
1922
|
+
"copy"
|
|
1734
1923
|
],
|
|
1735
1924
|
data() {
|
|
1736
1925
|
return {
|
|
@@ -1747,15 +1936,55 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1747
1936
|
return !this.isAITranslate && !this.isServiceUnavailable && ((t = (e = this.data) == null ? void 0 : e.dictionary) == null ? void 0 : t.length) === 0 && !!((n = this.data) != null && n.result);
|
|
1748
1937
|
},
|
|
1749
1938
|
showAIExplainPrompt() {
|
|
1750
|
-
var e, t, n,
|
|
1751
|
-
return !this.isAIExplain && !this.isServiceUnavailable && ((t = (e = this.data) == null ? void 0 : e.dictionary) == null ? void 0 : t.length) === 0 && !!((n = this.data) != null && n.result) && ((
|
|
1939
|
+
var e, t, n, i, o;
|
|
1940
|
+
return !this.isAIExplain && !this.isServiceUnavailable && ((t = (e = this.data) == null ? void 0 : e.dictionary) == null ? void 0 : t.length) === 0 && !!((n = this.data) != null && n.result) && ((o = (i = this.data) == null ? void 0 : i.text) == null ? void 0 : o.length) >= this.aiExplainMinLength;
|
|
1752
1941
|
},
|
|
1753
1942
|
showLearnPrompt() {
|
|
1754
1943
|
var e;
|
|
1755
1944
|
return this.isFavorite && !this.isServiceUnavailable && !!((e = this.data) != null && e.result);
|
|
1945
|
+
},
|
|
1946
|
+
isWrite() {
|
|
1947
|
+
return this.mode === "write";
|
|
1948
|
+
},
|
|
1949
|
+
currentAction() {
|
|
1950
|
+
var e;
|
|
1951
|
+
return this.writeAction || ((e = this.writing) == null ? void 0 : e.action) || Ae;
|
|
1952
|
+
},
|
|
1953
|
+
activeText() {
|
|
1954
|
+
var e, t;
|
|
1955
|
+
return this.selectedText || ((e = this.writing) == null ? void 0 : e.text) || ((t = this.data) == null ? void 0 : t.text) || "";
|
|
1956
|
+
},
|
|
1957
|
+
canWrite() {
|
|
1958
|
+
return this.activeText.trim().length >= et;
|
|
1959
|
+
},
|
|
1960
|
+
shownResult() {
|
|
1961
|
+
var e;
|
|
1962
|
+
return !((e = this.writing) != null && e.result) || this.selectedText && this.writing.text && this.writing.text !== this.selectedText ? "" : this.writing.result;
|
|
1756
1963
|
}
|
|
1757
1964
|
},
|
|
1758
1965
|
methods: {
|
|
1966
|
+
handleLogo() {
|
|
1967
|
+
if ($t(this.editable, this.selectedText)) {
|
|
1968
|
+
this.$emit("write", { text: this.selectedText, action: this.currentAction });
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
this.$emit("logo");
|
|
1972
|
+
},
|
|
1973
|
+
requestWrite() {
|
|
1974
|
+
this.isWrite || !this.canWrite || this.$emit("write", { text: this.activeText, action: this.currentAction });
|
|
1975
|
+
},
|
|
1976
|
+
requestTranslate() {
|
|
1977
|
+
this.isWrite && this.$emit("logo");
|
|
1978
|
+
},
|
|
1979
|
+
handleWriteAction(e) {
|
|
1980
|
+
!this.canWrite || e === this.currentAction || this.$emit("write", { text: this.activeText, action: e });
|
|
1981
|
+
},
|
|
1982
|
+
handleCopy(e) {
|
|
1983
|
+
this.$emit("copy", e);
|
|
1984
|
+
},
|
|
1985
|
+
handleReplace(e) {
|
|
1986
|
+
this.editable && this.$emit("replace", e);
|
|
1987
|
+
},
|
|
1759
1988
|
handleAITranslate() {
|
|
1760
1989
|
this.isAITranslationLoading = !0, this.$emit("aiTranslate");
|
|
1761
1990
|
},
|
|
@@ -1774,9 +2003,9 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1774
2003
|
watch: {
|
|
1775
2004
|
translation: {
|
|
1776
2005
|
handler() {
|
|
1777
|
-
var e, t, n,
|
|
2006
|
+
var e, t, n, i;
|
|
1778
2007
|
try {
|
|
1779
|
-
this.data = this.translation, this.isLongSentence = !((t = (e = this.data) == null ? void 0 : e.phonetic) != null && t.src || ((
|
|
2008
|
+
this.data = this.translation, this.isLongSentence = !((t = (e = this.data) == null ? void 0 : e.phonetic) != null && t.src || ((i = (n = this.data) == null ? void 0 : n.dictionary) == null ? void 0 : i.length) > 0), this.isServiceUnavailable = !1;
|
|
1780
2009
|
} catch {
|
|
1781
2010
|
this.isServiceUnavailable = !0;
|
|
1782
2011
|
} finally {
|
|
@@ -1792,22 +2021,20 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1792
2021
|
immediate: !0
|
|
1793
2022
|
},
|
|
1794
2023
|
status() {
|
|
1795
|
-
this.status ===
|
|
2024
|
+
this.status === ne.ERROR && (this.isServiceUnavailable = !0);
|
|
1796
2025
|
}
|
|
1797
2026
|
}
|
|
1798
|
-
},
|
|
2027
|
+
}, ir = /* @__PURE__ */ Object.assign(nr, {
|
|
1799
2028
|
setup(e) {
|
|
1800
2029
|
return (t, n) => {
|
|
1801
|
-
var o,
|
|
1802
|
-
return e.status ===
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
])) : e.status
|
|
1807
|
-
P(An)
|
|
1808
|
-
])) : e.status !== Te(Q).HIDDEN ? (v(), b("div", {
|
|
2030
|
+
var i, o, s, r, a, l, c, d, h, g, f;
|
|
2031
|
+
return e.status === ve(ne).LOGO ? (p(), v("div", Qo, [
|
|
2032
|
+
O(On, { onClick: t.handleLogo }, null, 8, ["onClick"])
|
|
2033
|
+
])) : e.status === ve(ne).LOADING ? (p(), v("div", er, [
|
|
2034
|
+
O(Hn)
|
|
2035
|
+
])) : e.status !== ve(ne).HIDDEN ? (p(), v("div", {
|
|
1809
2036
|
key: 2,
|
|
1810
|
-
class:
|
|
2037
|
+
class: $([
|
|
1811
2038
|
"wrapper rounded-lg text-base-content text-sm shadow-lg relative bg-[length:300%_300%] bg-[position:0%_50%]",
|
|
1812
2039
|
e.constrained ? "flex h-full w-full min-w-0 flex-col" : "",
|
|
1813
2040
|
{
|
|
@@ -1816,101 +2043,122 @@ const ni = /* @__PURE__ */ oe(Yo, [["render", ti]]), oi = { class: "flex flex-co
|
|
|
1816
2043
|
}
|
|
1817
2044
|
])
|
|
1818
2045
|
}, [
|
|
1819
|
-
|
|
1820
|
-
class:
|
|
2046
|
+
C("div", {
|
|
2047
|
+
class: $([
|
|
1821
2048
|
"bg-base-100 rounded-md relative z-10",
|
|
1822
2049
|
e.constrained ? "flex min-h-0 min-w-0 flex-1 flex-col" : ""
|
|
1823
2050
|
])
|
|
1824
2051
|
}, [
|
|
1825
|
-
t.isServiceUnavailable ? (
|
|
2052
|
+
t.isServiceUnavailable ? (p(), z(dt, {
|
|
1826
2053
|
key: 0,
|
|
1827
2054
|
class: "shrink-0",
|
|
1828
2055
|
isServiceUnavailable: t.isServiceUnavailable,
|
|
1829
2056
|
isLongSentence: !1,
|
|
1830
2057
|
theme: e.theme,
|
|
1831
2058
|
showThemeSelector: e.showThemeSelector,
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
2059
|
+
mode: e.mode,
|
|
2060
|
+
canWrite: t.canWrite,
|
|
2061
|
+
onFavorite: n[0] || (n[0] = (m) => t.$emit("favorite")),
|
|
2062
|
+
onSetting: n[1] || (n[1] = (m) => t.$emit("settings")),
|
|
2063
|
+
onClose: n[2] || (n[2] = (m) => t.$emit("close")),
|
|
2064
|
+
onLoadTTS: n[3] || (n[3] = (m) => t.$emit("loadTTS")),
|
|
2065
|
+
onThemeChange: n[4] || (n[4] = (m) => t.$emit("themeChange", m)),
|
|
2066
|
+
onRequestTranslate: t.requestTranslate,
|
|
2067
|
+
onRequestWrite: t.requestWrite
|
|
2068
|
+
}, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector", "mode", "canWrite", "onRequestTranslate", "onRequestWrite"])) : (p(), z(dt, {
|
|
1838
2069
|
key: 1,
|
|
1839
2070
|
class: "shrink-0",
|
|
1840
2071
|
tts: e.tts,
|
|
1841
2072
|
isFavorite: e.isFavorite,
|
|
1842
2073
|
isAITranslate: e.isAITranslate,
|
|
1843
|
-
isAITranslateVisible: ((
|
|
2074
|
+
isAITranslateVisible: ((o = (i = t.data) == null ? void 0 : i.dictionary) == null ? void 0 : o.length) === 0,
|
|
1844
2075
|
isAIExplain: e.isAIExplain,
|
|
1845
|
-
isAIExplainVisible: ((
|
|
2076
|
+
isAIExplainVisible: ((r = (s = t.data) == null ? void 0 : s.text) == null ? void 0 : r.length) >= e.aiExplainMinLength,
|
|
1846
2077
|
isAITranslationLoading: t.isAITranslationLoading,
|
|
1847
2078
|
isAIExplainLoading: t.isAIExplainLoading,
|
|
1848
2079
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
1849
2080
|
isLongSentence: t.isLongSentence,
|
|
1850
2081
|
theme: e.theme,
|
|
1851
2082
|
showThemeSelector: e.showThemeSelector,
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
2083
|
+
mode: e.mode,
|
|
2084
|
+
canWrite: t.canWrite,
|
|
2085
|
+
onFavorite: n[5] || (n[5] = (m) => t.$emit("favorite")),
|
|
2086
|
+
onSetting: n[6] || (n[6] = (m) => t.$emit("settings")),
|
|
2087
|
+
onClose: n[7] || (n[7] = (m) => t.$emit("close")),
|
|
2088
|
+
onLoadTTS: n[8] || (n[8] = (m) => t.$emit("loadTTS")),
|
|
1856
2089
|
onAiTranslate: t.handleAITranslate,
|
|
1857
2090
|
onAiExplain: t.handleAIExplain,
|
|
1858
|
-
onThemeChange: n[
|
|
1859
|
-
onDragStart: n[
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
2091
|
+
onThemeChange: n[9] || (n[9] = (m) => t.$emit("themeChange", m)),
|
|
2092
|
+
onDragStart: n[10] || (n[10] = (m) => t.$emit("dragStart", m)),
|
|
2093
|
+
onRequestTranslate: t.requestTranslate,
|
|
2094
|
+
onRequestWrite: t.requestWrite
|
|
2095
|
+
}, null, 8, ["tts", "isFavorite", "isAITranslate", "isAITranslateVisible", "isAIExplain", "isAIExplainVisible", "isAITranslationLoading", "isAIExplainLoading", "isFavoriteFeatureEnabled", "isLongSentence", "theme", "showThemeSelector", "mode", "canWrite", "onAiTranslate", "onAiExplain", "onRequestTranslate", "onRequestWrite"])),
|
|
2096
|
+
C("div", {
|
|
2097
|
+
class: $(
|
|
1863
2098
|
e.constrained ? "min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden break-words overscroll-contain" : ""
|
|
1864
2099
|
)
|
|
1865
2100
|
}, [
|
|
1866
|
-
|
|
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, {
|
|
2101
|
+
t.isWrite ? (p(), z(jo, {
|
|
1890
2102
|
key: 0,
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
2103
|
+
text: t.activeText,
|
|
2104
|
+
result: t.shownResult,
|
|
2105
|
+
action: t.currentAction,
|
|
2106
|
+
loading: e.isWriteLoading,
|
|
2107
|
+
editable: e.editable,
|
|
2108
|
+
unavailable: t.isServiceUnavailable,
|
|
2109
|
+
onAction: t.handleWriteAction,
|
|
2110
|
+
onCopy: t.handleCopy,
|
|
2111
|
+
onReplace: t.handleReplace
|
|
2112
|
+
}, null, 8, ["text", "result", "action", "loading", "editable", "unavailable", "onAction", "onCopy", "onReplace"])) : (p(), v(G, { key: 1 }, [
|
|
2113
|
+
C("div", tr, [
|
|
2114
|
+
(l = (a = t.data) == null ? void 0 : a.phonetic) != null && l.src ? (p(), z(qn, {
|
|
2115
|
+
key: 0,
|
|
2116
|
+
phonetic: (d = (c = t.data) == null ? void 0 : c.phonetic) == null ? void 0 : d.src
|
|
2117
|
+
}, null, 8, ["phonetic"])) : M("", !0),
|
|
2118
|
+
O(Kn, {
|
|
2119
|
+
sentences: t.isServiceUnavailable ? "Service Unavailable" : (h = t.data) == null ? void 0 : h.result
|
|
2120
|
+
}, null, 8, ["sentences"]),
|
|
2121
|
+
O(Qn, {
|
|
2122
|
+
show: t.showAIPrompt,
|
|
2123
|
+
isLoading: t.isAITranslationLoading,
|
|
2124
|
+
onClick: t.handleAITranslate
|
|
2125
|
+
}, null, 8, ["show", "isLoading", "onClick"]),
|
|
2126
|
+
O(ni, {
|
|
2127
|
+
show: t.showAIExplainPrompt,
|
|
2128
|
+
isLoading: t.isAIExplainLoading,
|
|
2129
|
+
onClick: t.handleAIExplain
|
|
2130
|
+
}, null, 8, ["show", "isLoading", "onClick"]),
|
|
2131
|
+
O(ri, {
|
|
2132
|
+
show: t.showLearnPrompt,
|
|
2133
|
+
onClick: t.handleLearn
|
|
2134
|
+
}, null, 8, ["show", "onClick"])
|
|
2135
|
+
]),
|
|
2136
|
+
!t.isServiceUnavailable && ((f = (g = t.data) == null ? void 0 : g.dictionary) == null ? void 0 : f.length) > 0 ? (p(), z(ai, {
|
|
2137
|
+
key: 0,
|
|
2138
|
+
class: "p-3 pt-0 border-t border-base-300",
|
|
2139
|
+
dictionary: t.data.dictionary
|
|
2140
|
+
}, null, 8, ["dictionary"])) : M("", !0),
|
|
2141
|
+
!t.isServiceUnavailable && e.isAIExplain && e.explanation ? (p(), z(mi, {
|
|
2142
|
+
key: 1,
|
|
2143
|
+
class: "p-3 pt-0 border-t border-base-300",
|
|
2144
|
+
explanation: e.explanation
|
|
2145
|
+
}, null, 8, ["explanation"])) : M("", !0)
|
|
2146
|
+
], 64))
|
|
1899
2147
|
], 2),
|
|
1900
|
-
|
|
1901
|
-
onResizeStart: n[
|
|
2148
|
+
O(So, {
|
|
2149
|
+
onResizeStart: n[11] || (n[11] = (m) => t.$emit("resizeStart", m))
|
|
1902
2150
|
})
|
|
1903
2151
|
], 2)
|
|
1904
2152
|
], 2)) : M("", !0);
|
|
1905
2153
|
};
|
|
1906
2154
|
}
|
|
1907
2155
|
});
|
|
1908
|
-
function
|
|
2156
|
+
function or(e) {
|
|
1909
2157
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1910
2158
|
}
|
|
1911
|
-
var
|
|
1912
|
-
function
|
|
1913
|
-
return
|
|
2159
|
+
var Ue = { exports: {} }, mt;
|
|
2160
|
+
function rr() {
|
|
2161
|
+
return mt || (mt = 1, function(e) {
|
|
1914
2162
|
(function() {
|
|
1915
2163
|
var t = [
|
|
1916
2164
|
"direction",
|
|
@@ -1949,8 +2197,8 @@ function Li() {
|
|
|
1949
2197
|
"wordSpacing",
|
|
1950
2198
|
"tabSize",
|
|
1951
2199
|
"MozTabSize"
|
|
1952
|
-
], n = typeof window < "u",
|
|
1953
|
-
function
|
|
2200
|
+
], n = typeof window < "u", i = n && window.mozInnerScreenX != null;
|
|
2201
|
+
function o(s, r, a) {
|
|
1954
2202
|
if (!n)
|
|
1955
2203
|
throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");
|
|
1956
2204
|
var l = a && a.debug || !1;
|
|
@@ -1958,53 +2206,66 @@ function Li() {
|
|
|
1958
2206
|
var c = document.querySelector("#input-textarea-caret-position-mirror-div");
|
|
1959
2207
|
c && c.parentNode.removeChild(c);
|
|
1960
2208
|
}
|
|
1961
|
-
var
|
|
1962
|
-
|
|
1963
|
-
var
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
}),
|
|
1967
|
-
var
|
|
1968
|
-
|
|
1969
|
-
var
|
|
1970
|
-
top:
|
|
1971
|
-
left:
|
|
1972
|
-
height: parseInt(
|
|
2209
|
+
var d = document.createElement("div");
|
|
2210
|
+
d.id = "input-textarea-caret-position-mirror-div", document.body.appendChild(d);
|
|
2211
|
+
var h = d.style, g = window.getComputedStyle ? window.getComputedStyle(s) : s.currentStyle, f = s.nodeName === "INPUT";
|
|
2212
|
+
h.whiteSpace = "pre-wrap", f || (h.wordWrap = "break-word"), h.position = "absolute", l || (h.visibility = "hidden"), t.forEach(function(y) {
|
|
2213
|
+
f && y === "lineHeight" ? h.lineHeight = g.height : h[y] = g[y];
|
|
2214
|
+
}), i ? s.scrollHeight > parseInt(g.height) && (h.overflowY = "scroll") : h.overflow = "hidden", d.textContent = s.value.substring(0, r), f && (d.textContent = d.textContent.replace(/\s/g, " "));
|
|
2215
|
+
var m = document.createElement("span");
|
|
2216
|
+
m.textContent = s.value.substring(r) || ".", d.appendChild(m);
|
|
2217
|
+
var w = {
|
|
2218
|
+
top: m.offsetTop + parseInt(g.borderTopWidth),
|
|
2219
|
+
left: m.offsetLeft + parseInt(g.borderLeftWidth),
|
|
2220
|
+
height: parseInt(g.lineHeight)
|
|
1973
2221
|
};
|
|
1974
|
-
return l ?
|
|
2222
|
+
return l ? m.style.backgroundColor = "#aaa" : document.body.removeChild(d), w;
|
|
1975
2223
|
}
|
|
1976
|
-
e.exports =
|
|
2224
|
+
e.exports = o;
|
|
1977
2225
|
})();
|
|
1978
|
-
}(
|
|
2226
|
+
}(Ue)), Ue.exports;
|
|
1979
2227
|
}
|
|
1980
|
-
var
|
|
1981
|
-
const
|
|
1982
|
-
function
|
|
2228
|
+
var sr = rr();
|
|
2229
|
+
const ht = /* @__PURE__ */ or(sr);
|
|
2230
|
+
function Q(e) {
|
|
1983
2231
|
const t = window.getSelection();
|
|
1984
2232
|
let n = t + "";
|
|
1985
2233
|
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)))
|
|
1986
2234
|
return !1;
|
|
1987
|
-
let i = t
|
|
1988
|
-
if (!s && !
|
|
2235
|
+
let i = ar(t), { top: o, bottom: s, left: r, width: a, height: l } = i;
|
|
2236
|
+
if (!s && !r) {
|
|
1989
2237
|
if (!e.selectionEnd)
|
|
1990
2238
|
return !1;
|
|
1991
|
-
let
|
|
1992
|
-
i = e.getBoundingClientRect(),
|
|
2239
|
+
let c = ht(e, e.selectionStart), d = ht(e, e.selectionEnd);
|
|
2240
|
+
i = e.getBoundingClientRect(), r = i.left + c.left, a = d.left - c.left, c.top != d.top && (r = i.left, a = i.width), o = i.top + c.top, s = i.top + d.top + 20;
|
|
1993
2241
|
}
|
|
1994
|
-
return
|
|
2242
|
+
return l === 0 && (l = s - o), {
|
|
1995
2243
|
text: n,
|
|
1996
2244
|
// position
|
|
1997
|
-
x:
|
|
1998
|
-
y:
|
|
1999
|
-
top:
|
|
2245
|
+
x: r,
|
|
2246
|
+
y: o,
|
|
2247
|
+
top: o,
|
|
2000
2248
|
bottom: s,
|
|
2001
|
-
left:
|
|
2002
|
-
right:
|
|
2003
|
-
width:
|
|
2004
|
-
height:
|
|
2249
|
+
left: r,
|
|
2250
|
+
right: r + a,
|
|
2251
|
+
width: a,
|
|
2252
|
+
height: l
|
|
2005
2253
|
};
|
|
2006
2254
|
}
|
|
2007
|
-
function
|
|
2255
|
+
function lr(e) {
|
|
2256
|
+
var t;
|
|
2257
|
+
return ((t = e == null ? void 0 : e.key) == null ? void 0 : t.toLowerCase()) === "a" && !!(e.ctrlKey || e.metaKey);
|
|
2258
|
+
}
|
|
2259
|
+
function ar(e) {
|
|
2260
|
+
if (!e || e.rangeCount === 0)
|
|
2261
|
+
return { top: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
2262
|
+
try {
|
|
2263
|
+
return e.getRangeAt(0).getBoundingClientRect();
|
|
2264
|
+
} catch {
|
|
2265
|
+
return { top: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
function cr() {
|
|
2008
2269
|
const e = document.getElementsByTagName("ddict-div");
|
|
2009
2270
|
for (let t of e)
|
|
2010
2271
|
if (!t.parentNode.matches('wrapper[dir="rtl"]')) {
|
|
@@ -2012,17 +2273,17 @@ function Ei() {
|
|
|
2012
2273
|
n.setAttribute("dir", "rtl"), t.parentNode.insertBefore(n, t), n.appendChild(t);
|
|
2013
2274
|
}
|
|
2014
2275
|
}
|
|
2015
|
-
function
|
|
2276
|
+
function ur() {
|
|
2016
2277
|
const e = document.querySelectorAll('wrapper[dir="rtl"]');
|
|
2017
2278
|
for (let t of e) {
|
|
2018
2279
|
const n = t.querySelector("ddict-div");
|
|
2019
2280
|
n && (t.parentNode.insertBefore(n, t), t.remove());
|
|
2020
2281
|
}
|
|
2021
2282
|
}
|
|
2022
|
-
const
|
|
2023
|
-
supportRTL:
|
|
2024
|
-
removeRTL:
|
|
2025
|
-
},
|
|
2283
|
+
const pt = {
|
|
2284
|
+
supportRTL: cr,
|
|
2285
|
+
removeRTL: ur
|
|
2286
|
+
}, dr = 2, fr = {
|
|
2026
2287
|
n: { x: !1, y: !0, fromStartX: !1, fromStartY: !0 },
|
|
2027
2288
|
s: { x: !1, y: !0, fromStartX: !1, fromStartY: !1 },
|
|
2028
2289
|
e: { x: !0, y: !1, fromStartX: !1, fromStartY: !1 },
|
|
@@ -2032,93 +2293,164 @@ const at = {
|
|
|
2032
2293
|
se: { x: !0, y: !0, fromStartX: !1, fromStartY: !1 },
|
|
2033
2294
|
sw: { x: !0, y: !0, fromStartX: !0, fromStartY: !1 }
|
|
2034
2295
|
};
|
|
2035
|
-
function
|
|
2296
|
+
function mr(e, t, n = dr) {
|
|
2036
2297
|
return Math.abs(e) >= n || Math.abs(t) >= n;
|
|
2037
2298
|
}
|
|
2038
2299
|
function Ee(e, t, n) {
|
|
2039
|
-
const
|
|
2040
|
-
return Math.min(
|
|
2300
|
+
const i = n > t ? n : t;
|
|
2301
|
+
return Math.min(i, Math.max(t, e));
|
|
2041
2302
|
}
|
|
2042
|
-
function
|
|
2303
|
+
function hr({
|
|
2043
2304
|
x: e,
|
|
2044
2305
|
y: t,
|
|
2045
2306
|
width: n,
|
|
2046
|
-
height:
|
|
2047
|
-
dx:
|
|
2048
|
-
dy:
|
|
2049
|
-
scale:
|
|
2307
|
+
height: i,
|
|
2308
|
+
dx: o,
|
|
2309
|
+
dy: s,
|
|
2310
|
+
scale: r = 1,
|
|
2050
2311
|
edge: a,
|
|
2051
2312
|
minWidth: l,
|
|
2052
2313
|
minHeight: c,
|
|
2053
|
-
viewportWidth:
|
|
2054
|
-
viewportHeight:
|
|
2055
|
-
margin:
|
|
2314
|
+
viewportWidth: d,
|
|
2315
|
+
viewportHeight: h,
|
|
2316
|
+
margin: g = 8
|
|
2056
2317
|
}) {
|
|
2057
|
-
const
|
|
2058
|
-
if (!
|
|
2059
|
-
const
|
|
2060
|
-
let
|
|
2061
|
-
if (
|
|
2062
|
-
const E =
|
|
2063
|
-
|
|
2064
|
-
} else
|
|
2065
|
-
n +
|
|
2318
|
+
const f = fr[a];
|
|
2319
|
+
if (!f) return { x: e, y: t, width: n, height: i };
|
|
2320
|
+
const m = r > 0 ? r : 1, w = e + n * m, y = t + i * m, L = d - g, x = h - g;
|
|
2321
|
+
let T = e, A = t, S = n, B = i;
|
|
2322
|
+
if (f.x && f.fromStartX) {
|
|
2323
|
+
const E = g, D = w - l * m;
|
|
2324
|
+
T = Ee(e + o, E, D), S = (w - T) / m;
|
|
2325
|
+
} else f.x && (S = Ee(
|
|
2326
|
+
n + o / m,
|
|
2066
2327
|
l,
|
|
2067
|
-
Math.max(l, (
|
|
2328
|
+
Math.max(l, (L - e) / m)
|
|
2068
2329
|
));
|
|
2069
|
-
if (
|
|
2070
|
-
const E =
|
|
2071
|
-
|
|
2072
|
-
} else
|
|
2073
|
-
|
|
2330
|
+
if (f.y && f.fromStartY) {
|
|
2331
|
+
const E = g, D = y - c * m;
|
|
2332
|
+
A = Ee(t + s, E, D), B = (y - A) / m;
|
|
2333
|
+
} else f.y && (B = Ee(
|
|
2334
|
+
i + s / m,
|
|
2074
2335
|
c,
|
|
2075
|
-
Math.max(c, (
|
|
2336
|
+
Math.max(c, (x - t) / m)
|
|
2076
2337
|
));
|
|
2077
2338
|
return {
|
|
2078
|
-
x: Math.round(
|
|
2079
|
-
y: Math.round(
|
|
2080
|
-
width: Math.round(
|
|
2081
|
-
height: Math.round(
|
|
2339
|
+
x: Math.round(T),
|
|
2340
|
+
y: Math.round(A),
|
|
2341
|
+
width: Math.round(S),
|
|
2342
|
+
height: Math.round(B)
|
|
2082
2343
|
};
|
|
2083
2344
|
}
|
|
2084
|
-
|
|
2345
|
+
function pr(e) {
|
|
2346
|
+
const t = xr(e);
|
|
2347
|
+
if (!t) return null;
|
|
2348
|
+
if (Lr(t)) {
|
|
2349
|
+
const s = t.selectionStart, r = t.selectionEnd;
|
|
2350
|
+
return s == null || r == null || s === r ? null : {
|
|
2351
|
+
kind: "value",
|
|
2352
|
+
element: t,
|
|
2353
|
+
start: s,
|
|
2354
|
+
end: r,
|
|
2355
|
+
text: t.value.slice(s, r)
|
|
2356
|
+
};
|
|
2357
|
+
}
|
|
2358
|
+
const n = window.getSelection();
|
|
2359
|
+
if (!n || n.rangeCount === 0) return null;
|
|
2360
|
+
const i = n.getRangeAt(0).cloneRange(), o = i.toString();
|
|
2361
|
+
return o ? { kind: "range", element: t, range: i, text: o } : null;
|
|
2362
|
+
}
|
|
2363
|
+
function gr(e, t) {
|
|
2364
|
+
return !e || t == null ? !1 : e.kind === "value" ? br(e, t) : Cr(e, t);
|
|
2365
|
+
}
|
|
2366
|
+
async function vr(e) {
|
|
2367
|
+
var t;
|
|
2368
|
+
if (!e) return !1;
|
|
2369
|
+
try {
|
|
2370
|
+
if ((t = navigator.clipboard) != null && t.writeText)
|
|
2371
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
2372
|
+
} catch {
|
|
2373
|
+
}
|
|
2374
|
+
return yr(e);
|
|
2375
|
+
}
|
|
2376
|
+
function br(e, t) {
|
|
2377
|
+
const n = e.element;
|
|
2378
|
+
if (!n || n.value.slice(e.start, e.end) !== e.text) return !1;
|
|
2379
|
+
const i = n.value.slice(0, e.start) + t + n.value.slice(e.end);
|
|
2380
|
+
wr(n, i);
|
|
2381
|
+
const o = e.start + t.length;
|
|
2382
|
+
return n.focus(), n.setSelectionRange(o, o), kt(n), !0;
|
|
2383
|
+
}
|
|
2384
|
+
function Cr(e, t) {
|
|
2385
|
+
const n = e.range;
|
|
2386
|
+
if (!n || n.toString() !== e.text) return !1;
|
|
2387
|
+
n.deleteContents();
|
|
2388
|
+
const i = n.startContainer.ownerDocument.createTextNode(t);
|
|
2389
|
+
return n.insertNode(i), n.setStartAfter(i), n.collapse(!0), kt(e.element), !0;
|
|
2390
|
+
}
|
|
2391
|
+
function wr(e, t) {
|
|
2392
|
+
var i;
|
|
2393
|
+
const n = (i = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e), "value")) == null ? void 0 : i.set;
|
|
2394
|
+
n ? n.call(e, t) : e.value = t;
|
|
2395
|
+
}
|
|
2396
|
+
function kt(e) {
|
|
2397
|
+
e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2398
|
+
}
|
|
2399
|
+
function yr(e) {
|
|
2400
|
+
const t = document.createElement("textarea");
|
|
2401
|
+
t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.left = "-9999px", document.body.appendChild(t), t.select();
|
|
2402
|
+
let n = !1;
|
|
2403
|
+
try {
|
|
2404
|
+
n = document.execCommand("copy");
|
|
2405
|
+
} catch {
|
|
2406
|
+
n = !1;
|
|
2407
|
+
}
|
|
2408
|
+
return t.remove(), n;
|
|
2409
|
+
}
|
|
2410
|
+
function xr(e) {
|
|
2411
|
+
return e ? e.nodeType === 3 ? e.parentElement : e : null;
|
|
2412
|
+
}
|
|
2413
|
+
function Lr(e) {
|
|
2414
|
+
return e.tagName === "TEXTAREA" || e.tagName === "INPUT";
|
|
2415
|
+
}
|
|
2416
|
+
const Tr = {
|
|
2085
2417
|
__name: "HotKeysListener",
|
|
2086
2418
|
props: {
|
|
2087
2419
|
textSelected: String
|
|
2088
2420
|
},
|
|
2089
2421
|
emits: ["toggleKey", "close"],
|
|
2090
2422
|
setup(e, { emit: t }) {
|
|
2091
|
-
const n = e,
|
|
2423
|
+
const n = e, i = t, o = () => {
|
|
2092
2424
|
setTimeout(() => {
|
|
2093
2425
|
n.textSelected && a("DoubleClick");
|
|
2094
2426
|
}, 50);
|
|
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
2427
|
}, s = (l) => {
|
|
2428
|
+
(l.altKey && l.key.toLowerCase() === "w" || l.key === "∑") && n.textSelected && (a("Alt+W"), l.preventDefault()), l.key === "Escape" && (a("Escape"), l.preventDefault());
|
|
2429
|
+
}, r = (l) => {
|
|
2098
2430
|
l.key === "Shift" && n.textSelected && a("Shift");
|
|
2099
2431
|
}, a = (l) => {
|
|
2100
2432
|
switch (l) {
|
|
2101
2433
|
case "DoubleClick":
|
|
2102
|
-
|
|
2434
|
+
i("toggleKey", "DoubleClick");
|
|
2103
2435
|
break;
|
|
2104
2436
|
case "Shift":
|
|
2105
|
-
|
|
2437
|
+
i("toggleKey", "Shift");
|
|
2106
2438
|
break;
|
|
2107
2439
|
case "Alt+W":
|
|
2108
|
-
|
|
2440
|
+
i("toggleKey", "Alt+W");
|
|
2109
2441
|
break;
|
|
2110
2442
|
case "Escape":
|
|
2111
|
-
|
|
2443
|
+
i("close");
|
|
2112
2444
|
break;
|
|
2113
2445
|
}
|
|
2114
2446
|
};
|
|
2115
|
-
return
|
|
2116
|
-
window.addEventListener("dblclick",
|
|
2117
|
-
}),
|
|
2118
|
-
window.removeEventListener("dblclick",
|
|
2119
|
-
}), (l, c) => (
|
|
2447
|
+
return gt(() => {
|
|
2448
|
+
window.addEventListener("dblclick", o), window.addEventListener("keydown", s), window.addEventListener("keyup", r);
|
|
2449
|
+
}), qe(() => {
|
|
2450
|
+
window.removeEventListener("dblclick", o), window.removeEventListener("keydown", s), window.removeEventListener("keyup", r);
|
|
2451
|
+
}), (l, c) => (p(), v("div"));
|
|
2120
2452
|
}
|
|
2121
|
-
},
|
|
2453
|
+
}, Sr = ["data-theme"], Ar = {
|
|
2122
2454
|
__name: "BubbleWrapper",
|
|
2123
2455
|
props: {
|
|
2124
2456
|
translation: Object,
|
|
@@ -2144,6 +2476,22 @@ const Bi = {
|
|
|
2144
2476
|
showThemeSelector: {
|
|
2145
2477
|
type: Boolean,
|
|
2146
2478
|
default: !0
|
|
2479
|
+
},
|
|
2480
|
+
mode: {
|
|
2481
|
+
type: String,
|
|
2482
|
+
default: "translate"
|
|
2483
|
+
},
|
|
2484
|
+
writing: {
|
|
2485
|
+
type: Object,
|
|
2486
|
+
default: null
|
|
2487
|
+
},
|
|
2488
|
+
writeAction: {
|
|
2489
|
+
type: String,
|
|
2490
|
+
default: Ae
|
|
2491
|
+
},
|
|
2492
|
+
isWriteLoading: {
|
|
2493
|
+
type: Boolean,
|
|
2494
|
+
default: !1
|
|
2147
2495
|
}
|
|
2148
2496
|
},
|
|
2149
2497
|
emits: [
|
|
@@ -2156,138 +2504,170 @@ const Bi = {
|
|
|
2156
2504
|
"aiTranslate",
|
|
2157
2505
|
"aiExplain",
|
|
2158
2506
|
"learn",
|
|
2159
|
-
"themeChange"
|
|
2507
|
+
"themeChange",
|
|
2508
|
+
"write",
|
|
2509
|
+
"replace",
|
|
2510
|
+
"copy"
|
|
2160
2511
|
],
|
|
2161
2512
|
setup(e, { emit: t }) {
|
|
2162
|
-
const n = e,
|
|
2163
|
-
let
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2513
|
+
const n = e, i = t, o = k(null), s = k(null), r = k(null), a = k(!1), l = k(""), c = k(!1), d = k(n.writeAction || Ae);
|
|
2514
|
+
let h = null;
|
|
2515
|
+
ee(
|
|
2516
|
+
() => n.writeAction,
|
|
2517
|
+
(u, b) => {
|
|
2518
|
+
u && u !== b && (d.value = u);
|
|
2519
|
+
}
|
|
2520
|
+
);
|
|
2521
|
+
const g = k(n.theme), f = k(!1), m = k(!1), w = k({ x: 0, y: 0 }), y = k(null), L = k(null), x = k(null), T = k(!1);
|
|
2522
|
+
let A = !1, S = 0, B = !1, E = "", D = "";
|
|
2523
|
+
const Z = R(() => typeof window > "u" || !r.value || !l.value ? null : {
|
|
2524
|
+
getBoundingClientRect: () => Q(r.value),
|
|
2525
|
+
getClientRects: () => Q(r.value)
|
|
2526
|
+
}), { floatingStyles: J, update: he } = kn(Z, o, {
|
|
2168
2527
|
placement: "bottom",
|
|
2169
|
-
middleware: [
|
|
2170
|
-
whileElementsMounted(
|
|
2171
|
-
return
|
|
2528
|
+
middleware: [Tn(4), En(), Sn()],
|
|
2529
|
+
whileElementsMounted(u, b, I) {
|
|
2530
|
+
return Ln(u, b, I, {
|
|
2172
2531
|
ancestorScroll: !0,
|
|
2173
2532
|
elementResize: !1
|
|
2174
2533
|
});
|
|
2175
2534
|
}
|
|
2176
|
-
}),
|
|
2177
|
-
() => n.status ===
|
|
2178
|
-
),
|
|
2179
|
-
var
|
|
2180
|
-
return
|
|
2181
|
-
width: ((
|
|
2182
|
-
height: ((
|
|
2535
|
+
}), pe = R(
|
|
2536
|
+
() => n.status === ne.DATA || n.status === ne.ERROR
|
|
2537
|
+
), V = R(() => {
|
|
2538
|
+
var u, b;
|
|
2539
|
+
return pe.value ? {
|
|
2540
|
+
width: ((u = L.value) == null ? void 0 : u.width) ?? Xo,
|
|
2541
|
+
height: ((b = L.value) == null ? void 0 : b.height) ?? qo
|
|
2183
2542
|
} : null;
|
|
2184
|
-
}),
|
|
2185
|
-
let
|
|
2186
|
-
if (
|
|
2187
|
-
|
|
2188
|
-
...
|
|
2543
|
+
}), j = R(() => {
|
|
2544
|
+
let u = J.value;
|
|
2545
|
+
if (y.value)
|
|
2546
|
+
u = {
|
|
2547
|
+
...u,
|
|
2189
2548
|
position: "fixed",
|
|
2190
|
-
left: `${
|
|
2191
|
-
top: `${
|
|
2549
|
+
left: `${y.value.x}px`,
|
|
2550
|
+
top: `${y.value.y}px`,
|
|
2192
2551
|
transform: "none"
|
|
2193
2552
|
};
|
|
2194
|
-
else if (
|
|
2195
|
-
const
|
|
2196
|
-
|
|
2197
|
-
...
|
|
2553
|
+
else if (T.value && r.value && l.value) {
|
|
2554
|
+
const b = Q(r.value);
|
|
2555
|
+
b && (u = {
|
|
2556
|
+
...u,
|
|
2198
2557
|
position: "fixed",
|
|
2199
|
-
left: `${
|
|
2200
|
-
top: `${
|
|
2558
|
+
left: `${b.x}px`,
|
|
2559
|
+
top: `${b.y + b.height + 4}px`,
|
|
2201
2560
|
transform: "none"
|
|
2202
2561
|
});
|
|
2203
2562
|
}
|
|
2204
|
-
return
|
|
2205
|
-
...
|
|
2563
|
+
return u = {
|
|
2564
|
+
...u,
|
|
2206
2565
|
zIndex: 9999
|
|
2207
|
-
},
|
|
2208
|
-
...
|
|
2209
|
-
width: `${
|
|
2210
|
-
height: `${
|
|
2211
|
-
maxWidth: `${
|
|
2566
|
+
}, V.value && (u = {
|
|
2567
|
+
...u,
|
|
2568
|
+
width: `${V.value.width}px`,
|
|
2569
|
+
height: `${V.value.height}px`,
|
|
2570
|
+
maxWidth: `${V.value.width}px`,
|
|
2212
2571
|
boxSizing: "border-box"
|
|
2213
|
-
}),
|
|
2214
|
-
}), ye =
|
|
2215
|
-
const
|
|
2572
|
+
}), u;
|
|
2573
|
+
}), ye = R(() => {
|
|
2574
|
+
const u = {
|
|
2216
2575
|
transform: n.scale !== 1 ? `scale(${n.scale})` : "none",
|
|
2217
2576
|
transformOrigin: "top left"
|
|
2218
2577
|
};
|
|
2219
|
-
return
|
|
2578
|
+
return V.value && (u.width = `${V.value.width}px`, u.height = `${V.value.height}px`, u.boxSizing = "border-box"), u;
|
|
2220
2579
|
});
|
|
2221
|
-
|
|
2222
|
-
document.addEventListener("keyup", (
|
|
2223
|
-
if (
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
}), document.documentElement.onclick = (p) => {
|
|
2228
|
-
if (Ye()) return;
|
|
2229
|
-
const C = re(p.target);
|
|
2230
|
-
if (!C) {
|
|
2231
|
-
l.value = "", j();
|
|
2580
|
+
gt(() => {
|
|
2581
|
+
document.addEventListener("keyup", q), document.addEventListener("select", N), document.documentElement.onclick = (u) => {
|
|
2582
|
+
if (tt()) return;
|
|
2583
|
+
const b = Q(u.target);
|
|
2584
|
+
if (!b) {
|
|
2585
|
+
_();
|
|
2232
2586
|
return;
|
|
2233
2587
|
}
|
|
2234
|
-
|
|
2235
|
-
}, document.documentElement.ontouchend = (
|
|
2236
|
-
if (
|
|
2237
|
-
const
|
|
2238
|
-
if (!
|
|
2239
|
-
|
|
2588
|
+
W(b, u);
|
|
2589
|
+
}, document.documentElement.ontouchend = (u) => {
|
|
2590
|
+
if (tt()) return;
|
|
2591
|
+
const b = Q(u.target);
|
|
2592
|
+
if (!b) {
|
|
2593
|
+
_();
|
|
2240
2594
|
return;
|
|
2241
2595
|
}
|
|
2242
|
-
|
|
2596
|
+
W(b, u);
|
|
2243
2597
|
};
|
|
2244
|
-
}),
|
|
2245
|
-
document.documentElement.onclick = null, document.documentElement.ontouchend = null, clearTimeout(
|
|
2598
|
+
}), qe(() => {
|
|
2599
|
+
document.removeEventListener("keyup", q), document.removeEventListener("select", N), document.documentElement.onclick = null, document.documentElement.ontouchend = null, clearTimeout(S), document.removeEventListener("mousemove", We), document.removeEventListener("mouseup", ze), document.removeEventListener("touchmove", _e), document.removeEventListener("touchend", Pe), Ne();
|
|
2246
2600
|
});
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
},
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2601
|
+
const q = (u) => {
|
|
2602
|
+
if (lr(u)) {
|
|
2603
|
+
N(u);
|
|
2604
|
+
return;
|
|
2605
|
+
}
|
|
2606
|
+
Q(u.target) || _();
|
|
2607
|
+
}, N = (u) => {
|
|
2608
|
+
const b = Q(u.target);
|
|
2609
|
+
b && W(b, u);
|
|
2610
|
+
}, W = (u, b) => {
|
|
2611
|
+
n.status !== ne.LOGO && i("close"), a.value && !T.value && (T.value = !0), r.value = b.target, c.value = ko(b.target), h = c.value ? pr(b.target) : null, l.value = u.text, a.value = !0, it(he);
|
|
2612
|
+
}, _ = () => {
|
|
2613
|
+
l.value = "", c.value = !1, h = null, xe();
|
|
2614
|
+
}, Fe = (u) => {
|
|
2615
|
+
vr(u), i("copy", u);
|
|
2616
|
+
}, Rt = (u) => {
|
|
2617
|
+
gr(h, u == null ? void 0 : u.result), h = null, i("replace", u), xe();
|
|
2618
|
+
}, It = (u) => {
|
|
2619
|
+
u != null && u.action && (d.value = u.action), i("write", u);
|
|
2620
|
+
}, Bt = (u) => {
|
|
2621
|
+
if ($t(c.value, l.value)) {
|
|
2622
|
+
i("write", {
|
|
2623
|
+
text: l.value,
|
|
2624
|
+
action: d.value || Ae
|
|
2625
|
+
});
|
|
2626
|
+
return;
|
|
2627
|
+
}
|
|
2628
|
+
i("toggleKey", u);
|
|
2629
|
+
}, Mt = (u) => {
|
|
2630
|
+
u.stopPropagation();
|
|
2631
|
+
}, xe = async () => {
|
|
2632
|
+
Ne(), a.value = !1, y.value = null, T.value = !1, i("close");
|
|
2633
|
+
}, Ot = (u) => {
|
|
2634
|
+
g.value = u, i("themeChange", u);
|
|
2635
|
+
}, Dt = ({ type: u, event: b }) => {
|
|
2636
|
+
f.value = !0;
|
|
2637
|
+
const I = o.value.getBoundingClientRect();
|
|
2638
|
+
if (u === "mouse")
|
|
2639
|
+
w.value = {
|
|
2640
|
+
x: b.clientX - I.left,
|
|
2641
|
+
y: b.clientY - I.top
|
|
2642
|
+
}, document.addEventListener("mousemove", We), document.addEventListener("mouseup", ze);
|
|
2643
|
+
else if (u === "touch") {
|
|
2644
|
+
const ae = b.touches[0];
|
|
2645
|
+
w.value = {
|
|
2646
|
+
x: ae.clientX - I.left,
|
|
2647
|
+
y: ae.clientY - I.top
|
|
2648
|
+
}, document.addEventListener("touchmove", _e), document.addEventListener("touchend", Pe);
|
|
2269
2649
|
}
|
|
2270
|
-
},
|
|
2271
|
-
|
|
2272
|
-
x:
|
|
2273
|
-
y:
|
|
2650
|
+
}, We = (u) => {
|
|
2651
|
+
f.value && (y.value = {
|
|
2652
|
+
x: u.clientX - w.value.x,
|
|
2653
|
+
y: u.clientY - w.value.y
|
|
2274
2654
|
});
|
|
2275
|
-
},
|
|
2276
|
-
if (!
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2279
|
-
x:
|
|
2280
|
-
y:
|
|
2655
|
+
}, _e = (u) => {
|
|
2656
|
+
if (!f.value) return;
|
|
2657
|
+
const b = u.touches[0];
|
|
2658
|
+
y.value = {
|
|
2659
|
+
x: b.clientX - w.value.x,
|
|
2660
|
+
y: b.clientY - w.value.y
|
|
2281
2661
|
};
|
|
2282
|
-
},
|
|
2283
|
-
|
|
2284
|
-
},
|
|
2285
|
-
|
|
2286
|
-
},
|
|
2287
|
-
|
|
2288
|
-
|
|
2662
|
+
}, ze = () => {
|
|
2663
|
+
f.value && Ve(), f.value = !1, document.removeEventListener("mousemove", We), document.removeEventListener("mouseup", ze);
|
|
2664
|
+
}, Pe = () => {
|
|
2665
|
+
f.value && Ve(), f.value = !1, document.removeEventListener("touchmove", _e), document.removeEventListener("touchend", Pe);
|
|
2666
|
+
}, tt = () => f.value || m.value ? !0 : A ? (A = !1, clearTimeout(S), !0) : !1, Ve = () => {
|
|
2667
|
+
A = !0, clearTimeout(S), S = window.setTimeout(() => {
|
|
2668
|
+
A = !1;
|
|
2289
2669
|
}, 50);
|
|
2290
|
-
},
|
|
2670
|
+
}, Ft = {
|
|
2291
2671
|
n: "ns-resize",
|
|
2292
2672
|
s: "ns-resize",
|
|
2293
2673
|
e: "ew-resize",
|
|
@@ -2296,81 +2676,81 @@ const Bi = {
|
|
|
2296
2676
|
sw: "nesw-resize",
|
|
2297
2677
|
nw: "nwse-resize",
|
|
2298
2678
|
se: "nwse-resize"
|
|
2299
|
-
},
|
|
2300
|
-
!document.body ||
|
|
2301
|
-
},
|
|
2302
|
-
!document.body || !
|
|
2303
|
-
},
|
|
2304
|
-
if (!
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
pointerX:
|
|
2308
|
-
pointerY:
|
|
2309
|
-
left:
|
|
2310
|
-
top:
|
|
2311
|
-
width:
|
|
2312
|
-
height:
|
|
2313
|
-
edge:
|
|
2679
|
+
}, Wt = (u) => {
|
|
2680
|
+
!document.body || B || (E = document.body.style.cursor, D = document.body.style.userSelect, document.body.style.cursor = Ft[u] || "nwse-resize", document.body.style.userSelect = "none", B = !0);
|
|
2681
|
+
}, _t = () => {
|
|
2682
|
+
!document.body || !B || (document.body.style.cursor = E, document.body.style.userSelect = D, B = !1);
|
|
2683
|
+
}, zt = ({ edge: u, event: b }) => {
|
|
2684
|
+
if (!s.value || !o.value || !s.value.offsetWidth || !s.value.offsetHeight) return;
|
|
2685
|
+
const I = o.value.getBoundingClientRect();
|
|
2686
|
+
m.value = !0, x.value = {
|
|
2687
|
+
pointerX: b.clientX,
|
|
2688
|
+
pointerY: b.clientY,
|
|
2689
|
+
left: I.left,
|
|
2690
|
+
top: I.top,
|
|
2691
|
+
width: s.value.offsetWidth,
|
|
2692
|
+
height: s.value.offsetHeight,
|
|
2693
|
+
edge: u,
|
|
2314
2694
|
moved: !1
|
|
2315
|
-
},
|
|
2316
|
-
},
|
|
2317
|
-
if (!
|
|
2318
|
-
const
|
|
2319
|
-
if (!
|
|
2320
|
-
|
|
2321
|
-
const
|
|
2322
|
-
x:
|
|
2323
|
-
y:
|
|
2324
|
-
width:
|
|
2325
|
-
height:
|
|
2326
|
-
dx:
|
|
2327
|
-
dy:
|
|
2695
|
+
}, Wt(u), document.addEventListener("pointermove", nt), document.addEventListener("pointerup", Le), document.addEventListener("pointercancel", Le);
|
|
2696
|
+
}, Pt = (u, b) => {
|
|
2697
|
+
if (!m.value || !x.value || !o.value) return;
|
|
2698
|
+
const I = u - x.value.pointerX, ae = b - x.value.pointerY;
|
|
2699
|
+
if (!x.value.moved && !mr(I, ae)) return;
|
|
2700
|
+
x.value.moved = !0;
|
|
2701
|
+
const Te = hr({
|
|
2702
|
+
x: x.value.left,
|
|
2703
|
+
y: x.value.top,
|
|
2704
|
+
width: x.value.width,
|
|
2705
|
+
height: x.value.height,
|
|
2706
|
+
dx: I,
|
|
2707
|
+
dy: ae,
|
|
2328
2708
|
scale: n.scale,
|
|
2329
|
-
edge:
|
|
2330
|
-
minWidth:
|
|
2331
|
-
minHeight:
|
|
2709
|
+
edge: x.value.edge,
|
|
2710
|
+
minWidth: Yo,
|
|
2711
|
+
minHeight: Ko,
|
|
2332
2712
|
viewportWidth: window.innerWidth,
|
|
2333
2713
|
viewportHeight: window.innerHeight,
|
|
2334
|
-
margin:
|
|
2714
|
+
margin: Go
|
|
2335
2715
|
});
|
|
2336
|
-
|
|
2337
|
-
},
|
|
2338
|
-
|
|
2339
|
-
},
|
|
2340
|
-
|
|
2341
|
-
},
|
|
2342
|
-
|
|
2343
|
-
},
|
|
2344
|
-
var
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2716
|
+
y.value = { x: Te.x, y: Te.y }, L.value = { width: Te.width, height: Te.height };
|
|
2717
|
+
}, nt = (u) => {
|
|
2718
|
+
u.cancelable && u.preventDefault(), Pt(u.clientX, u.clientY);
|
|
2719
|
+
}, Le = () => {
|
|
2720
|
+
Ne();
|
|
2721
|
+
}, Ne = () => {
|
|
2722
|
+
m.value && Ve(), m.value = !1, x.value = null, _t(), document.removeEventListener("pointermove", nt), document.removeEventListener("pointerup", Le), document.removeEventListener("pointercancel", Le);
|
|
2723
|
+
}, Vt = () => {
|
|
2724
|
+
var b;
|
|
2725
|
+
const u = (b = n == null ? void 0 : n.translation) == null ? void 0 : b.target;
|
|
2726
|
+
Jo.includes(u) ? pt.supportRTL() : pt.removeRTL();
|
|
2347
2727
|
};
|
|
2348
|
-
return
|
|
2728
|
+
return ee(
|
|
2349
2729
|
() => n.status,
|
|
2350
2730
|
() => {
|
|
2351
|
-
a.value &&
|
|
2731
|
+
a.value && it(he), Vt();
|
|
2352
2732
|
}
|
|
2353
|
-
),
|
|
2733
|
+
), ee(
|
|
2354
2734
|
() => n.theme,
|
|
2355
|
-
(
|
|
2356
|
-
|
|
2735
|
+
(u) => {
|
|
2736
|
+
g.value = u;
|
|
2357
2737
|
}
|
|
2358
|
-
), (
|
|
2359
|
-
a.value ? (
|
|
2738
|
+
), (u, b) => (p(), v(G, null, [
|
|
2739
|
+
a.value ? (p(), v("div", {
|
|
2360
2740
|
key: 0,
|
|
2361
2741
|
ref_key: "floatingEl",
|
|
2362
|
-
ref:
|
|
2363
|
-
style:
|
|
2364
|
-
onClick:
|
|
2742
|
+
ref: o,
|
|
2743
|
+
style: Ze(j.value),
|
|
2744
|
+
onClick: Mt
|
|
2365
2745
|
}, [
|
|
2366
|
-
|
|
2746
|
+
C("div", {
|
|
2367
2747
|
ref_key: "contentEl",
|
|
2368
|
-
ref:
|
|
2748
|
+
ref: s,
|
|
2369
2749
|
class: "relative rounded-lg",
|
|
2370
|
-
style:
|
|
2371
|
-
"data-theme":
|
|
2750
|
+
style: Ze(ye.value),
|
|
2751
|
+
"data-theme": g.value
|
|
2372
2752
|
}, [
|
|
2373
|
-
|
|
2753
|
+
O(ir, {
|
|
2374
2754
|
translation: n.translation,
|
|
2375
2755
|
explanation: n.explanation,
|
|
2376
2756
|
tts: n.tts,
|
|
@@ -2380,31 +2760,40 @@ const Bi = {
|
|
|
2380
2760
|
isAITranslate: n.isAITranslate,
|
|
2381
2761
|
isAIExplain: n.isAIExplain,
|
|
2382
2762
|
aiExplainMinLength: n.aiExplainMinLength,
|
|
2383
|
-
theme:
|
|
2763
|
+
theme: g.value,
|
|
2384
2764
|
showThemeSelector: n.showThemeSelector,
|
|
2385
|
-
constrained:
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2765
|
+
constrained: pe.value,
|
|
2766
|
+
mode: n.mode,
|
|
2767
|
+
writing: n.writing,
|
|
2768
|
+
writeAction: d.value,
|
|
2769
|
+
isWriteLoading: n.isWriteLoading,
|
|
2770
|
+
editable: c.value,
|
|
2771
|
+
selectedText: l.value,
|
|
2772
|
+
onLogo: b[0] || (b[0] = (I) => i("logo")),
|
|
2773
|
+
onWrite: It,
|
|
2774
|
+
onReplace: Rt,
|
|
2775
|
+
onCopy: Fe,
|
|
2776
|
+
onFavorite: b[1] || (b[1] = (I) => i("favorite")),
|
|
2777
|
+
onSettings: b[2] || (b[2] = (I) => i("settings")),
|
|
2778
|
+
onClose: xe,
|
|
2779
|
+
onLoadTTS: b[3] || (b[3] = (I) => i("loadTTS")),
|
|
2780
|
+
onAiTranslate: b[4] || (b[4] = (I) => i("aiTranslate")),
|
|
2781
|
+
onAiExplain: b[5] || (b[5] = (I) => i("aiExplain")),
|
|
2782
|
+
onLearn: b[6] || (b[6] = (I) => i("learn", I)),
|
|
2783
|
+
onThemeChange: Ot,
|
|
2784
|
+
onDragStart: Dt,
|
|
2785
|
+
onResizeStart: zt
|
|
2786
|
+
}, null, 8, ["translation", "explanation", "tts", "status", "isFavorite", "isFavoriteFeatureEnabled", "isAITranslate", "isAIExplain", "aiExplainMinLength", "theme", "showThemeSelector", "constrained", "mode", "writing", "writeAction", "isWriteLoading", "editable", "selectedText"])
|
|
2787
|
+
], 12, Sr)
|
|
2399
2788
|
], 4)) : M("", !0),
|
|
2400
|
-
|
|
2789
|
+
O(Tr, {
|
|
2401
2790
|
textSelected: l.value,
|
|
2402
|
-
onToggleKey:
|
|
2403
|
-
onClose:
|
|
2791
|
+
onToggleKey: Bt,
|
|
2792
|
+
onClose: xe
|
|
2404
2793
|
}, null, 8, ["textSelected"])
|
|
2405
2794
|
], 64));
|
|
2406
2795
|
}
|
|
2407
2796
|
};
|
|
2408
2797
|
export {
|
|
2409
|
-
|
|
2798
|
+
Ar as default
|
|
2410
2799
|
};
|