@ddict/bubble 1.3.7 → 1.3.9

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.es.js CHANGED
@@ -1,54 +1,54 @@
1
- import { computed as R, ref as k, shallowRef as Pt, watch as Q, getCurrentScope as Vt, onScopeDispose as Nt, shallowReadonly as ae, unref as ve, createElementBlock as v, openBlock as p, createStaticVNode as Xe, createElementVNode as C, createVNode as O, toDisplayString as ne, Fragment as K, renderList as me, createCommentVNode as M, normalizeClass as $, createTextVNode as be, onUnmounted as qe, createBlock as W, normalizeStyle as Ze, withModifiers as Ht, onMounted as gt, nextTick as it } from "vue";
2
- const Ae = Math.min, ee = Math.max, $e = Math.round, Te = Math.floor, Y = (e) => ({
1
+ import { computed as I, ref as R, shallowRef as Zt, watch as te, getCurrentScope as jt, onScopeDispose as qt, shallowReadonly as ce, unref as Ce, createElementBlock as v, openBlock as p, createStaticVNode as Ye, createElementVNode as C, createVNode as O, toDisplayString as ie, Fragment as J, renderList as me, createCommentVNode as M, normalizeClass as k, createTextVNode as we, onUnmounted as Ke, createBlock as W, normalizeStyle as qe, withModifiers as Xt, onMounted as bt, nextTick as rt } from "vue";
2
+ const ke = Math.min, ne = Math.max, Re = Math.round, Ee = Math.floor, K = (e) => ({
3
3
  x: e,
4
4
  y: e
5
- }), Ut = {
5
+ }), Yt = {
6
6
  left: "right",
7
7
  right: "left",
8
8
  bottom: "top",
9
9
  top: "bottom"
10
- }, Zt = {
10
+ }, Kt = {
11
11
  start: "end",
12
12
  end: "start"
13
13
  };
14
- function ot(e, t, n) {
15
- return ee(e, Ae(t, n));
14
+ function st(e, t, n) {
15
+ return ne(e, ke(t, n));
16
16
  }
17
- function Ie(e, t) {
17
+ function Me(e, t) {
18
18
  return typeof e == "function" ? e(t) : e;
19
19
  }
20
- function ie(e) {
20
+ function oe(e) {
21
21
  return e.split("-")[0];
22
22
  }
23
- function Be(e) {
23
+ function Oe(e) {
24
24
  return e.split("-")[1];
25
25
  }
26
- function vt(e) {
26
+ function Ct(e) {
27
27
  return e === "x" ? "y" : "x";
28
28
  }
29
- function bt(e) {
29
+ function wt(e) {
30
30
  return e === "y" ? "height" : "width";
31
31
  }
32
32
  function de(e) {
33
- return ["top", "bottom"].includes(ie(e)) ? "y" : "x";
33
+ return ["top", "bottom"].includes(oe(e)) ? "y" : "x";
34
34
  }
35
- function Ct(e) {
36
- return vt(de(e));
35
+ function yt(e) {
36
+ return Ct(de(e));
37
37
  }
38
- function jt(e, t, n) {
38
+ function Gt(e, t, n) {
39
39
  n === void 0 && (n = !1);
40
- const i = Be(e), o = Ct(e), s = bt(o);
40
+ const i = Oe(e), o = yt(e), s = wt(o);
41
41
  let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
42
- return t.reference[s] > t.floating[s] && (r = ke(r)), [r, ke(r)];
42
+ return t.reference[s] > t.floating[s] && (r = Ie(r)), [r, Ie(r)];
43
43
  }
44
- function Xt(e) {
45
- const t = ke(e);
46
- return [je(e), t, je(t)];
44
+ function Jt(e) {
45
+ const t = Ie(e);
46
+ return [Xe(e), t, Xe(t)];
47
47
  }
48
- function je(e) {
49
- return e.replace(/start|end/g, (t) => Zt[t]);
48
+ function Xe(e) {
49
+ return e.replace(/start|end/g, (t) => Kt[t]);
50
50
  }
51
- function qt(e, t, n) {
51
+ function Qt(e, t, n) {
52
52
  const i = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
53
53
  switch (e) {
54
54
  case "top":
@@ -61,15 +61,15 @@ function qt(e, t, n) {
61
61
  return [];
62
62
  }
63
63
  }
64
- function Yt(e, t, n, i) {
65
- const o = Be(e);
66
- let s = qt(ie(e), n === "start", i);
67
- return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(je)))), s;
64
+ function en(e, t, n, i) {
65
+ const o = Oe(e);
66
+ let s = Qt(oe(e), n === "start", i);
67
+ return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(Xe)))), s;
68
68
  }
69
- function ke(e) {
70
- return e.replace(/left|right|bottom|top/g, (t) => Ut[t]);
69
+ function Ie(e) {
70
+ return e.replace(/left|right|bottom|top/g, (t) => Yt[t]);
71
71
  }
72
- function Gt(e) {
72
+ function tn(e) {
73
73
  return {
74
74
  top: 0,
75
75
  right: 0,
@@ -78,15 +78,15 @@ function Gt(e) {
78
78
  ...e
79
79
  };
80
80
  }
81
- function Kt(e) {
82
- return typeof e != "number" ? Gt(e) : {
81
+ function nn(e) {
82
+ return typeof e != "number" ? tn(e) : {
83
83
  top: e,
84
84
  right: e,
85
85
  bottom: e,
86
86
  left: e
87
87
  };
88
88
  }
89
- function Re(e) {
89
+ function Be(e) {
90
90
  const {
91
91
  x: t,
92
92
  y: n,
@@ -104,23 +104,23 @@ function Re(e) {
104
104
  y: n
105
105
  };
106
106
  }
107
- function rt(e, t, n) {
107
+ function lt(e, t, n) {
108
108
  let {
109
109
  reference: i,
110
110
  floating: o
111
111
  } = e;
112
- const s = de(t), r = Ct(t), a = bt(r), l = ie(t), c = s === "y", u = i.x + i.width / 2 - o.width / 2, h = i.y + i.height / 2 - o.height / 2, g = i[a] / 2 - o[a] / 2;
112
+ const s = de(t), r = yt(t), a = wt(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
113
  let f;
114
114
  switch (l) {
115
115
  case "top":
116
116
  f = {
117
- x: u,
117
+ x: d,
118
118
  y: i.y - o.height
119
119
  };
120
120
  break;
121
121
  case "bottom":
122
122
  f = {
123
- x: u,
123
+ x: d,
124
124
  y: i.y + i.height
125
125
  };
126
126
  break;
@@ -142,7 +142,7 @@ function rt(e, t, n) {
142
142
  y: i.y
143
143
  };
144
144
  }
145
- switch (Be(t)) {
145
+ switch (Oe(t)) {
146
146
  case "start":
147
147
  f[r] -= g * (n && c ? -1 : 1);
148
148
  break;
@@ -152,7 +152,7 @@ function rt(e, t, n) {
152
152
  }
153
153
  return f;
154
154
  }
155
- const Jt = async (e, t, n) => {
155
+ const on = async (e, t, n) => {
156
156
  const {
157
157
  placement: i = "bottom",
158
158
  strategy: o = "absolute",
@@ -164,20 +164,20 @@ const Jt = async (e, t, n) => {
164
164
  floating: t,
165
165
  strategy: o
166
166
  }), {
167
- x: u,
167
+ x: d,
168
168
  y: h
169
- } = rt(c, i, l), g = i, f = {}, m = 0;
169
+ } = lt(c, i, l), g = i, f = {}, m = 0;
170
170
  for (let w = 0; w < a.length; w++) {
171
171
  const {
172
172
  name: y,
173
173
  fn: L
174
174
  } = a[w], {
175
175
  x,
176
- y: T,
176
+ y: S,
177
177
  data: A,
178
- reset: S
178
+ reset: T
179
179
  } = await L({
180
- x: u,
180
+ x: d,
181
181
  y: h,
182
182
  initialPlacement: i,
183
183
  placement: g,
@@ -190,30 +190,30 @@ const Jt = async (e, t, n) => {
190
190
  floating: t
191
191
  }
192
192
  });
193
- u = x ?? u, h = T ?? h, f = {
193
+ d = x ?? d, h = S ?? h, f = {
194
194
  ...f,
195
195
  [y]: {
196
196
  ...f[y],
197
197
  ...A
198
198
  }
199
- }, S && m <= 50 && (m++, typeof S == "object" && (S.placement && (g = S.placement), S.rects && (c = S.rects === !0 ? await r.getElementRects({
199
+ }, T && m <= 50 && (m++, typeof T == "object" && (T.placement && (g = T.placement), T.rects && (c = T.rects === !0 ? await r.getElementRects({
200
200
  reference: e,
201
201
  floating: t,
202
202
  strategy: o
203
- }) : S.rects), {
204
- x: u,
203
+ }) : T.rects), {
204
+ x: d,
205
205
  y: h
206
- } = rt(c, g, l)), w = -1);
206
+ } = lt(c, g, l)), w = -1);
207
207
  }
208
208
  return {
209
- x: u,
209
+ x: d,
210
210
  y: h,
211
211
  placement: g,
212
212
  strategy: o,
213
213
  middlewareData: f
214
214
  };
215
215
  };
216
- async function wt(e, t) {
216
+ async function xt(e, t) {
217
217
  var n;
218
218
  t === void 0 && (t = {});
219
219
  const {
@@ -225,40 +225,40 @@ async function wt(e, t) {
225
225
  strategy: l
226
226
  } = e, {
227
227
  boundary: c = "clippingAncestors",
228
- rootBoundary: u = "viewport",
228
+ rootBoundary: d = "viewport",
229
229
  elementContext: h = "floating",
230
230
  altBoundary: g = !1,
231
231
  padding: f = 0
232
- } = Ie(t, e), m = Kt(f), y = a[g ? h === "floating" ? "reference" : "floating" : h], L = Re(await s.getClippingRect({
232
+ } = Me(t, e), m = nn(f), y = a[g ? h === "floating" ? "reference" : "floating" : h], L = Be(await s.getClippingRect({
233
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: u,
235
+ rootBoundary: d,
236
236
  strategy: l
237
237
  })), x = h === "floating" ? {
238
238
  x: i,
239
239
  y: o,
240
240
  width: r.floating.width,
241
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)) || {
242
+ } : r.reference, S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), A = await (s.isElement == null ? void 0 : s.isElement(S)) ? await (s.getScale == null ? void 0 : s.getScale(S)) || {
243
243
  x: 1,
244
244
  y: 1
245
245
  } : {
246
246
  x: 1,
247
247
  y: 1
248
- }, S = Re(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
248
+ }, T = Be(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
249
249
  elements: a,
250
250
  rect: x,
251
- offsetParent: T,
251
+ offsetParent: S,
252
252
  strategy: l
253
253
  }) : x);
254
254
  return {
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
255
+ top: (L.top - T.top + m.top) / A.y,
256
+ bottom: (T.bottom - L.bottom + m.bottom) / A.y,
257
+ left: (L.left - T.left + m.left) / A.x,
258
+ right: (T.right - L.right + m.right) / A.x
259
259
  };
260
260
  }
261
- const Qt = function(e) {
261
+ const rn = function(e) {
262
262
  return e === void 0 && (e = {}), {
263
263
  name: "flip",
264
264
  options: e,
@@ -272,65 +272,65 @@ const Qt = function(e) {
272
272
  platform: l,
273
273
  elements: c
274
274
  } = t, {
275
- mainAxis: u = !0,
275
+ mainAxis: d = !0,
276
276
  crossAxis: h = !0,
277
277
  fallbackPlacements: g,
278
278
  fallbackStrategy: f = "bestFit",
279
279
  fallbackAxisSideDirection: m = "none",
280
280
  flipAlignment: w = !0,
281
281
  ...y
282
- } = Ie(e, t);
282
+ } = Me(e, t);
283
283
  if ((n = s.arrow) != null && n.alignmentOffset)
284
284
  return {};
285
- const L = ie(o), x = de(a), T = ie(a) === a, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = g || (T || !w ? [ke(a)] : Xt(a)), B = m !== "none";
286
- !g && B && S.push(...Yt(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 (u && Z.push(D[L]), h) {
290
- const j = jt(o, r, A);
291
- Z.push(D[j[0]], D[j[1]]);
285
+ const L = oe(o), x = de(a), S = oe(a) === a, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = g || (S || !w ? [Ie(a)] : Jt(a)), B = m !== "none";
286
+ !g && B && T.push(...en(a, w, m, A));
287
+ const E = [a, ...T], F = await xt(t, y), U = [];
288
+ let Q = ((i = s.flip) == null ? void 0 : i.overflows) || [];
289
+ if (d && U.push(F[L]), h) {
290
+ const Z = Gt(o, r, A);
291
+ U.push(F[Z[0]], F[Z[1]]);
292
292
  }
293
- if (J = [...J, {
293
+ if (Q = [...Q, {
294
294
  placement: o,
295
- overflows: Z
296
- }], !Z.every((j) => j <= 0)) {
295
+ overflows: U
296
+ }], !U.every((Z) => Z <= 0)) {
297
297
  var he, pe;
298
- const j = (((he = s.flip) == null ? void 0 : he.index) || 0) + 1, ye = E[j];
299
- if (ye)
298
+ const Z = (((he = s.flip) == null ? void 0 : he.index) || 0) + 1, Le = E[Z];
299
+ if (Le)
300
300
  return {
301
301
  data: {
302
- index: j,
303
- overflows: J
302
+ index: Z,
303
+ overflows: Q
304
304
  },
305
305
  reset: {
306
- placement: ye
306
+ placement: Le
307
307
  }
308
308
  };
309
- let q = (pe = J.filter((P) => P.overflows[0] <= 0).sort((P, V) => P.overflows[1] - V.overflows[1])[0]) == null ? void 0 : pe.placement;
310
- if (!q)
309
+ let j = (pe = Q.filter((q) => q.overflows[0] <= 0).sort((q, _) => q.overflows[1] - _.overflows[1])[0]) == null ? void 0 : pe.placement;
310
+ if (!j)
311
311
  switch (f) {
312
312
  case "bestFit": {
313
- var z;
314
- const P = (z = J.filter((V) => {
313
+ var V;
314
+ const q = (V = Q.filter((_) => {
315
315
  if (B) {
316
- const N = de(V.placement);
317
- return N === x || // Create a bias to the `y` side axis due to horizontal
316
+ const z = de(_.placement);
317
+ return z === x || // Create a bias to the `y` side axis due to horizontal
318
318
  // reading directions favoring greater width.
319
- N === "y";
319
+ z === "y";
320
320
  }
321
321
  return !0;
322
- }).map((V) => [V.placement, V.overflows.filter((N) => N > 0).reduce((N, De) => N + De, 0)]).sort((V, N) => V[1] - N[1])[0]) == null ? void 0 : z[0];
323
- P && (q = P);
322
+ }).map((_) => [_.placement, _.overflows.filter((z) => z > 0).reduce((z, ge) => z + ge, 0)]).sort((_, z) => _[1] - z[1])[0]) == null ? void 0 : V[0];
323
+ q && (j = q);
324
324
  break;
325
325
  }
326
326
  case "initialPlacement":
327
- q = a;
327
+ j = a;
328
328
  break;
329
329
  }
330
- if (o !== q)
330
+ if (o !== j)
331
331
  return {
332
332
  reset: {
333
- placement: q
333
+ placement: j
334
334
  }
335
335
  };
336
336
  }
@@ -338,12 +338,12 @@ const Qt = function(e) {
338
338
  }
339
339
  };
340
340
  };
341
- async function en(e, t) {
341
+ async function sn(e, t) {
342
342
  const {
343
343
  placement: n,
344
344
  platform: i,
345
345
  elements: o
346
- } = e, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = ie(n), a = Be(n), l = de(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, u = s && l ? -1 : 1, h = Ie(t, e);
346
+ } = e, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = oe(n), a = Oe(n), l = de(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, d = s && l ? -1 : 1, h = Me(t, e);
347
347
  let {
348
348
  mainAxis: g,
349
349
  crossAxis: f,
@@ -359,14 +359,14 @@ async function en(e, t) {
359
359
  ...h
360
360
  };
361
361
  return a && typeof m == "number" && (f = a === "end" ? m * -1 : m), l ? {
362
- x: f * u,
362
+ x: f * d,
363
363
  y: g * c
364
364
  } : {
365
365
  x: g * c,
366
- y: f * u
366
+ y: f * d
367
367
  };
368
368
  }
369
- const tn = function(e) {
369
+ const ln = function(e) {
370
370
  return e === void 0 && (e = 0), {
371
371
  name: "offset",
372
372
  options: e,
@@ -377,7 +377,7 @@ const tn = function(e) {
377
377
  y: s,
378
378
  placement: r,
379
379
  middlewareData: a
380
- } = t, l = await en(t, e);
380
+ } = t, l = await sn(t, e);
381
381
  return r === ((n = a.offset) == null ? void 0 : n.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
382
382
  x: o + l.x,
383
383
  y: s + l.y,
@@ -388,7 +388,7 @@ const tn = function(e) {
388
388
  };
389
389
  }
390
390
  };
391
- }, nn = function(e) {
391
+ }, an = function(e) {
392
392
  return e === void 0 && (e = {}), {
393
393
  name: "shift",
394
394
  options: e,
@@ -413,18 +413,18 @@ const tn = function(e) {
413
413
  }
414
414
  },
415
415
  ...l
416
- } = Ie(e, t), c = {
416
+ } = Me(e, t), c = {
417
417
  x: n,
418
418
  y: i
419
- }, u = await wt(t, l), h = de(ie(o)), g = vt(h);
419
+ }, d = await xt(t, l), h = de(oe(o)), g = Ct(h);
420
420
  let f = c[g], m = c[h];
421
421
  if (s) {
422
- const y = g === "y" ? "top" : "left", L = g === "y" ? "bottom" : "right", x = f + u[y], T = f - u[L];
423
- f = ot(x, f, T);
422
+ const y = g === "y" ? "top" : "left", L = g === "y" ? "bottom" : "right", x = f + d[y], S = f - d[L];
423
+ f = st(x, f, S);
424
424
  }
425
425
  if (r) {
426
- const y = h === "y" ? "top" : "left", L = h === "y" ? "bottom" : "right", x = m + u[y], T = m - u[L];
427
- m = ot(x, m, T);
426
+ const y = h === "y" ? "top" : "left", L = h === "y" ? "bottom" : "right", x = m + d[y], S = m - d[L];
427
+ m = st(x, m, S);
428
428
  }
429
429
  const w = a.fn({
430
430
  ...t,
@@ -441,42 +441,42 @@ const tn = function(e) {
441
441
  }
442
442
  };
443
443
  };
444
- function re(e) {
445
- return Ye(e) ? (e.nodeName || "").toLowerCase() : "#document";
444
+ function se(e) {
445
+ return Ge(e) ? (e.nodeName || "").toLowerCase() : "#document";
446
446
  }
447
- function F(e) {
447
+ function D(e) {
448
448
  var t;
449
449
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
450
450
  }
451
- function X(e) {
451
+ function Y(e) {
452
452
  var t;
453
- return (t = (Ye(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
453
+ return (t = (Ge(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
454
454
  }
455
- function Ye(e) {
456
- return e instanceof Node || e instanceof F(e).Node;
455
+ function Ge(e) {
456
+ return e instanceof Node || e instanceof D(e).Node;
457
457
  }
458
- function H(e) {
459
- return e instanceof Element || e instanceof F(e).Element;
458
+ function N(e) {
459
+ return e instanceof Element || e instanceof D(e).Element;
460
460
  }
461
- function U(e) {
462
- return e instanceof HTMLElement || e instanceof F(e).HTMLElement;
461
+ function H(e) {
462
+ return e instanceof HTMLElement || e instanceof D(e).HTMLElement;
463
463
  }
464
- function st(e) {
465
- return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
464
+ function at(e) {
465
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof D(e).ShadowRoot;
466
466
  }
467
- function we(e) {
467
+ function xe(e) {
468
468
  const {
469
469
  overflow: t,
470
470
  overflowX: n,
471
471
  overflowY: i,
472
472
  display: o
473
- } = _(e);
473
+ } = P(e);
474
474
  return /auto|scroll|overlay|hidden|clip/.test(t + i + n) && !["inline", "contents"].includes(o);
475
475
  }
476
- function on(e) {
477
- return ["table", "td", "th"].includes(re(e));
476
+ function cn(e) {
477
+ return ["table", "td", "th"].includes(se(e));
478
478
  }
479
- function Me(e) {
479
+ function Fe(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 Ge(e) {
489
- const t = Ke(), n = _(e);
488
+ function Je(e) {
489
+ const t = Qe(), n = P(e);
490
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 rn(e) {
492
+ function un(e) {
493
493
  let t = G(e);
494
- for (; U(t) && !fe(t); ) {
495
- if (Me(t))
494
+ for (; H(t) && !fe(t); ) {
495
+ if (Fe(t))
496
496
  return null;
497
- if (Ge(t))
497
+ if (Je(t))
498
498
  return t;
499
499
  t = G(t);
500
500
  }
501
501
  return null;
502
502
  }
503
- function Ke() {
503
+ function Qe() {
504
504
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
505
505
  }
506
506
  function fe(e) {
507
- return ["html", "body", "#document"].includes(re(e));
507
+ return ["html", "body", "#document"].includes(se(e));
508
508
  }
509
- function _(e) {
510
- return F(e).getComputedStyle(e);
509
+ function P(e) {
510
+ return D(e).getComputedStyle(e);
511
511
  }
512
- function Oe(e) {
513
- return H(e) ? {
512
+ function De(e) {
513
+ return N(e) ? {
514
514
  scrollLeft: e.scrollLeft,
515
515
  scrollTop: e.scrollTop
516
516
  } : {
@@ -519,137 +519,137 @@ function Oe(e) {
519
519
  };
520
520
  }
521
521
  function G(e) {
522
- if (re(e) === "html")
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
- st(e) && e.host || // Fallback.
529
- X(e)
528
+ at(e) && e.host || // Fallback.
529
+ Y(e)
530
530
  );
531
- return st(t) ? t.host : t;
531
+ return at(t) ? t.host : t;
532
532
  }
533
- function yt(e) {
533
+ function Lt(e) {
534
534
  const t = G(e);
535
- return fe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && we(t) ? t : yt(t);
535
+ return fe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : H(t) && xe(t) ? t : Lt(t);
536
536
  }
537
- function Ce(e, t, n) {
537
+ function ye(e, t, n) {
538
538
  var i;
539
539
  t === void 0 && (t = []), n === void 0 && (n = !0);
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));
540
+ const o = Lt(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), r = D(o);
541
+ return s ? t.concat(r, r.visualViewport || [], xe(o) ? o : [], r.frameElement && n ? ye(r.frameElement) : []) : t.concat(o, ye(o, [], n));
542
542
  }
543
- function xt(e) {
544
- const t = _(e);
543
+ function St(e) {
544
+ const t = P(e);
545
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 = $e(n) !== s || $e(i) !== r;
546
+ const o = H(e), s = o ? e.offsetWidth : n, r = o ? e.offsetHeight : i, a = Re(n) !== s || Re(i) !== r;
547
547
  return a && (n = s, i = r), {
548
548
  width: n,
549
549
  height: i,
550
550
  $: a
551
551
  };
552
552
  }
553
- function Je(e) {
554
- return H(e) ? e : e.contextElement;
553
+ function et(e) {
554
+ return N(e) ? e : e.contextElement;
555
555
  }
556
556
  function ue(e) {
557
- const t = Je(e);
558
- if (!U(t))
559
- return Y(1);
557
+ const t = et(e);
558
+ if (!H(t))
559
+ return K(1);
560
560
  const n = t.getBoundingClientRect(), {
561
561
  width: i,
562
562
  height: o,
563
563
  $: s
564
- } = xt(t);
565
- let r = (s ? $e(n.width) : n.width) / i, a = (s ? $e(n.height) : n.height) / o;
564
+ } = St(t);
565
+ let r = (s ? Re(n.width) : n.width) / i, a = (s ? Re(n.height) : n.height) / o;
566
566
  return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
567
567
  x: r,
568
568
  y: a
569
569
  };
570
570
  }
571
- const sn = /* @__PURE__ */ Y(0);
572
- function Lt(e) {
573
- const t = F(e);
574
- return !Ke() || !t.visualViewport ? sn : {
571
+ const dn = /* @__PURE__ */ K(0);
572
+ function Tt(e) {
573
+ const t = D(e);
574
+ return !Qe() || !t.visualViewport ? dn : {
575
575
  x: t.visualViewport.offsetLeft,
576
576
  y: t.visualViewport.offsetTop
577
577
  };
578
578
  }
579
- function ln(e, t, n) {
580
- return t === void 0 && (t = !1), !n || t && n !== F(e) ? !1 : t;
579
+ function fn(e, t, n) {
580
+ return t === void 0 && (t = !1), !n || t && n !== D(e) ? !1 : t;
581
581
  }
582
- function oe(e, t, n, i) {
582
+ function re(e, t, n, i) {
583
583
  t === void 0 && (t = !1), n === void 0 && (n = !1);
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 = ln(s, n, i) ? Lt(s) : Y(0);
588
- let l = (o.left + a.x) / r.x, c = (o.top + a.y) / r.y, u = o.width / r.x, h = o.height / r.y;
584
+ const o = e.getBoundingClientRect(), s = et(e);
585
+ let r = K(1);
586
+ t && (i ? N(i) && (r = ue(i)) : r = ue(e));
587
+ const a = fn(s, n, i) ? Tt(s) : K(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
589
  if (s) {
590
- const g = F(s), f = i && H(i) ? F(i) : i;
590
+ const g = D(s), f = i && N(i) ? D(i) : i;
591
591
  let m = g, w = m.frameElement;
592
592
  for (; w && i && f !== m; ) {
593
- const y = ue(w), L = w.getBoundingClientRect(), x = _(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, u *= y.x, h *= y.y, l += T, c += A, m = F(w), w = m.frameElement;
593
+ const y = ue(w), L = w.getBoundingClientRect(), x = P(w), S = 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 += S, c += A, m = D(w), w = m.frameElement;
595
595
  }
596
596
  }
597
- return Re({
598
- width: u,
597
+ return Be({
598
+ width: d,
599
599
  height: h,
600
600
  x: l,
601
601
  y: c
602
602
  });
603
603
  }
604
- function an(e) {
604
+ function mn(e) {
605
605
  let {
606
606
  elements: t,
607
607
  rect: n,
608
608
  offsetParent: i,
609
609
  strategy: o
610
610
  } = e;
611
- const s = o === "fixed", r = X(i), a = t ? Me(t.floating) : !1;
611
+ const s = o === "fixed", r = Y(i), a = t ? Fe(t.floating) : !1;
612
612
  if (i === r || a && s)
613
613
  return n;
614
614
  let l = {
615
615
  scrollLeft: 0,
616
616
  scrollTop: 0
617
- }, c = Y(1);
618
- const u = Y(0), h = U(i);
619
- if ((h || !h && !s) && ((re(i) !== "body" || we(r)) && (l = Oe(i)), U(i))) {
620
- const g = oe(i);
621
- c = ue(i), u.x = g.x + i.clientLeft, u.y = g.y + i.clientTop;
617
+ }, c = K(1);
618
+ const d = K(0), h = H(i);
619
+ if ((h || !h && !s) && ((se(i) !== "body" || xe(r)) && (l = De(i)), H(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 + u.x,
627
- y: n.y * c.y - l.scrollTop * c.y + u.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 cn(e) {
630
+ function hn(e) {
631
631
  return Array.from(e.getClientRects());
632
632
  }
633
- function Tt(e) {
634
- return oe(X(e)).left + Oe(e).scrollLeft;
633
+ function Et(e) {
634
+ return re(Y(e)).left + De(e).scrollLeft;
635
635
  }
636
- function un(e) {
637
- const t = X(e), n = Oe(e), i = e.ownerDocument.body, o = ee(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), s = ee(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
638
- let r = -n.scrollLeft + Tt(e);
636
+ function pn(e) {
637
+ const t = Y(e), n = De(e), i = e.ownerDocument.body, o = ne(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), s = ne(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
638
+ let r = -n.scrollLeft + Et(e);
639
639
  const a = -n.scrollTop;
640
- return _(i).direction === "rtl" && (r += ee(t.clientWidth, i.clientWidth) - o), {
640
+ return P(i).direction === "rtl" && (r += ne(t.clientWidth, i.clientWidth) - o), {
641
641
  width: o,
642
642
  height: s,
643
643
  x: r,
644
644
  y: a
645
645
  };
646
646
  }
647
- function dn(e, t) {
648
- const n = F(e), i = X(e), o = n.visualViewport;
647
+ function gn(e, t) {
648
+ const n = D(e), i = Y(e), o = n.visualViewport;
649
649
  let s = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
650
650
  if (o) {
651
651
  s = o.width, r = o.height;
652
- const c = Ke();
652
+ const c = Qe();
653
653
  (!c || c && t === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
654
654
  }
655
655
  return {
@@ -659,8 +659,8 @@ function dn(e, t) {
659
659
  y: l
660
660
  };
661
661
  }
662
- function fn(e, t) {
663
- const n = oe(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;
662
+ function vn(e, t) {
663
+ const n = re(e, !0, t === "fixed"), i = n.top + e.clientTop, o = n.left + e.clientLeft, s = H(e) ? ue(e) : K(1), r = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, c = i * s.y;
664
664
  return {
665
665
  width: r,
666
666
  height: a,
@@ -668,52 +668,52 @@ function fn(e, t) {
668
668
  y: c
669
669
  };
670
670
  }
671
- function lt(e, t, n) {
671
+ function ct(e, t, n) {
672
672
  let i;
673
673
  if (t === "viewport")
674
- i = dn(e, n);
674
+ i = gn(e, n);
675
675
  else if (t === "document")
676
- i = un(X(e));
677
- else if (H(t))
678
- i = fn(t, n);
676
+ i = pn(Y(e));
677
+ else if (N(t))
678
+ i = vn(t, n);
679
679
  else {
680
- const o = Lt(e);
680
+ const o = Tt(e);
681
681
  i = {
682
682
  ...t,
683
683
  x: t.x - o.x,
684
684
  y: t.y - o.y
685
685
  };
686
686
  }
687
- return Re(i);
687
+ return Be(i);
688
688
  }
689
- function St(e, t) {
689
+ function At(e, t) {
690
690
  const n = G(e);
691
- return n === t || !H(n) || fe(n) ? !1 : _(n).position === "fixed" || St(n, t);
691
+ return n === t || !N(n) || fe(n) ? !1 : P(n).position === "fixed" || At(n, t);
692
692
  }
693
- function mn(e, t) {
693
+ function bn(e, t) {
694
694
  const n = t.get(e);
695
695
  if (n)
696
696
  return n;
697
- let i = Ce(e, [], !1).filter((a) => H(a) && re(a) !== "body"), o = null;
698
- const s = _(e).position === "fixed";
697
+ let i = ye(e, [], !1).filter((a) => N(a) && se(a) !== "body"), o = null;
698
+ const s = P(e).position === "fixed";
699
699
  let r = s ? G(e) : e;
700
- for (; H(r) && !fe(r); ) {
701
- const a = _(r), l = Ge(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((u) => u !== r) : o = a, r = G(r);
700
+ for (; N(r) && !fe(r); ) {
701
+ const a = P(r), l = Je(r);
702
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || xe(r) && !l && At(e, r)) ? i = i.filter((d) => d !== r) : o = a, r = G(r);
703
703
  }
704
704
  return t.set(e, i), i;
705
705
  }
706
- function hn(e) {
706
+ function Cn(e) {
707
707
  let {
708
708
  element: t,
709
709
  boundary: n,
710
710
  rootBoundary: i,
711
711
  strategy: o
712
712
  } = e;
713
- const r = [...n === "clippingAncestors" ? Me(t) ? [] : mn(t, this._c) : [].concat(n), i], a = r[0], l = r.reduce((c, u) => {
714
- const h = lt(t, u, o);
715
- return c.top = ee(h.top, c.top), c.right = Ae(h.right, c.right), c.bottom = Ae(h.bottom, c.bottom), c.left = ee(h.left, c.left), c;
716
- }, lt(t, a, o));
713
+ const r = [...n === "clippingAncestors" ? Fe(t) ? [] : bn(t, this._c) : [].concat(n), i], a = r[0], l = r.reduce((c, d) => {
714
+ const h = ct(t, d, o);
715
+ return c.top = ne(h.top, c.top), c.right = ke(h.right, c.right), c.bottom = ke(h.bottom, c.bottom), c.left = ne(h.left, c.left), c;
716
+ }, ct(t, a, o));
717
717
  return {
718
718
  width: l.right - l.left,
719
719
  height: l.bottom - l.top,
@@ -721,64 +721,64 @@ function hn(e) {
721
721
  y: l.top
722
722
  };
723
723
  }
724
- function pn(e) {
724
+ function wn(e) {
725
725
  const {
726
726
  width: t,
727
727
  height: n
728
- } = xt(e);
728
+ } = St(e);
729
729
  return {
730
730
  width: t,
731
731
  height: n
732
732
  };
733
733
  }
734
- function gn(e, t, n) {
735
- const i = U(t), o = X(t), s = n === "fixed", r = oe(e, !0, s, t);
734
+ function yn(e, t, n) {
735
+ const i = H(t), o = Y(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 = Y(0);
740
+ const l = K(0);
741
741
  if (i || !i && !s)
742
- if ((re(t) !== "body" || we(o)) && (a = Oe(t)), i) {
743
- const h = oe(t, !0, s, t);
742
+ if ((se(t) !== "body" || xe(o)) && (a = De(t)), i) {
743
+ const h = re(t, !0, s, t);
744
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, u = r.top + a.scrollTop - l.y;
745
+ } else o && (l.x = Et(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: u,
749
+ y: d,
750
750
  width: r.width,
751
751
  height: r.height
752
752
  };
753
753
  }
754
- function He(e) {
755
- return _(e).position === "static";
754
+ function Ze(e) {
755
+ return P(e).position === "static";
756
756
  }
757
- function at(e, t) {
758
- return !U(e) || _(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
757
+ function ut(e, t) {
758
+ return !H(e) || P(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
759
759
  }
760
- function Et(e, t) {
761
- const n = F(e);
762
- if (Me(e))
760
+ function $t(e, t) {
761
+ const n = D(e);
762
+ if (Fe(e))
763
763
  return n;
764
- if (!U(e)) {
764
+ if (!H(e)) {
765
765
  let o = G(e);
766
766
  for (; o && !fe(o); ) {
767
- if (H(o) && !He(o))
767
+ if (N(o) && !Ze(o))
768
768
  return o;
769
769
  o = G(o);
770
770
  }
771
771
  return n;
772
772
  }
773
- let i = at(e, t);
774
- for (; i && on(i) && He(i); )
775
- i = at(i, t);
776
- return i && fe(i) && He(i) && !Ge(i) ? n : i || rn(e) || n;
773
+ let i = ut(e, t);
774
+ for (; i && cn(i) && Ze(i); )
775
+ i = ut(i, t);
776
+ return i && fe(i) && Ze(i) && !Je(i) ? n : i || un(e) || n;
777
777
  }
778
- const vn = async function(e) {
779
- const t = this.getOffsetParent || Et, n = this.getDimensions, i = await n(e.floating);
778
+ const xn = async function(e) {
779
+ const t = this.getOffsetParent || $t, n = this.getDimensions, i = await n(e.floating);
780
780
  return {
781
- reference: gn(e.reference, await t(e.floating), e.strategy),
781
+ reference: yn(e.reference, await t(e.floating), e.strategy),
782
782
  floating: {
783
783
  x: 0,
784
784
  y: 0,
@@ -787,24 +787,24 @@ const vn = async function(e) {
787
787
  }
788
788
  };
789
789
  };
790
- function bn(e) {
791
- return _(e).direction === "rtl";
792
- }
793
- const Cn = {
794
- convertOffsetParentRelativeRectToViewportRelativeRect: an,
795
- getDocumentElement: X,
796
- getClippingRect: hn,
797
- getOffsetParent: Et,
798
- getElementRects: vn,
799
- getClientRects: cn,
800
- getDimensions: pn,
790
+ function Ln(e) {
791
+ return P(e).direction === "rtl";
792
+ }
793
+ const Sn = {
794
+ convertOffsetParentRelativeRectToViewportRelativeRect: mn,
795
+ getDocumentElement: Y,
796
+ getClippingRect: Cn,
797
+ getOffsetParent: $t,
798
+ getElementRects: xn,
799
+ getClientRects: hn,
800
+ getDimensions: wn,
801
801
  getScale: ue,
802
- isElement: H,
803
- isRTL: bn
802
+ isElement: N,
803
+ isRTL: Ln
804
804
  };
805
- function wn(e, t) {
805
+ function Tn(e, t) {
806
806
  let n = null, i;
807
- const o = X(e);
807
+ const o = Y(e);
808
808
  function s() {
809
809
  var a;
810
810
  clearTimeout(i), (a = n) == null || a.disconnect(), n = null;
@@ -813,27 +813,27 @@ function wn(e, t) {
813
813
  a === void 0 && (a = !1), l === void 0 && (l = 1), s();
814
814
  const {
815
815
  left: c,
816
- top: u,
816
+ top: d,
817
817
  width: h,
818
818
  height: g
819
819
  } = e.getBoundingClientRect();
820
820
  if (a || t(), !h || !g)
821
821
  return;
822
- const f = Te(u), m = Te(o.clientWidth - (c + h)), w = Te(o.clientHeight - (u + g)), y = Te(c), x = {
822
+ const f = Ee(d), m = Ee(o.clientWidth - (c + h)), w = Ee(o.clientHeight - (d + g)), y = Ee(c), x = {
823
823
  rootMargin: -f + "px " + -m + "px " + -w + "px " + -y + "px",
824
- threshold: ee(0, Ae(1, l)) || 1
824
+ threshold: ne(0, ke(1, l)) || 1
825
825
  };
826
- let T = !0;
827
- function A(S) {
828
- const B = S[0].intersectionRatio;
826
+ let S = !0;
827
+ function A(T) {
828
+ const B = T[0].intersectionRatio;
829
829
  if (B !== l) {
830
- if (!T)
830
+ if (!S)
831
831
  return r();
832
832
  B ? r(!1, B) : i = setTimeout(() => {
833
833
  r(!1, 1e-7);
834
834
  }, 1e3);
835
835
  }
836
- T = !1;
836
+ S = !1;
837
837
  }
838
838
  try {
839
839
  n = new IntersectionObserver(A, {
@@ -848,7 +848,7 @@ function wn(e, t) {
848
848
  }
849
849
  return r(!0), s;
850
850
  }
851
- function yn(e, t, n, i) {
851
+ function En(e, t, n, i) {
852
852
  i === void 0 && (i = {});
853
853
  const {
854
854
  ancestorScroll: o = !0,
@@ -856,105 +856,105 @@ function yn(e, t, n, i) {
856
856
  elementResize: r = typeof ResizeObserver == "function",
857
857
  layoutShift: a = typeof IntersectionObserver == "function",
858
858
  animationFrame: l = !1
859
- } = i, c = Je(e), u = o || s ? [...c ? Ce(c) : [], ...Ce(t)] : [];
860
- u.forEach((L) => {
859
+ } = i, c = et(e), d = o || s ? [...c ? ye(c) : [], ...ye(t)] : [];
860
+ d.forEach((L) => {
861
861
  o && L.addEventListener("scroll", n, {
862
862
  passive: !0
863
863
  }), s && L.addEventListener("resize", n);
864
864
  });
865
- const h = c && a ? wn(c, n) : null;
865
+ const h = c && a ? Tn(c, n) : null;
866
866
  let g = -1, f = null;
867
867
  r && (f = new ResizeObserver((L) => {
868
868
  let [x] = L;
869
869
  x && x.target === c && f && (f.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
870
- var T;
871
- (T = f) == null || T.observe(t);
870
+ var S;
871
+ (S = f) == null || S.observe(t);
872
872
  })), n();
873
873
  }), c && !l && f.observe(c), f.observe(t));
874
- let m, w = l ? oe(e) : null;
874
+ let m, w = l ? re(e) : null;
875
875
  l && y();
876
876
  function y() {
877
- const L = oe(e);
877
+ const L = re(e);
878
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
881
  var L;
882
- u.forEach((x) => {
882
+ d.forEach((x) => {
883
883
  o && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
884
884
  }), h == null || h(), (L = f) == null || L.disconnect(), f = null, l && cancelAnimationFrame(m);
885
885
  };
886
886
  }
887
- const xn = tn, Ln = nn, Tn = Qt, Sn = (e, t, n) => {
887
+ const An = ln, $n = an, kn = rn, Rn = (e, t, n) => {
888
888
  const i = /* @__PURE__ */ new Map(), o = {
889
- platform: Cn,
889
+ platform: Sn,
890
890
  ...n
891
891
  }, s = {
892
892
  ...o.platform,
893
893
  _c: i
894
894
  };
895
- return Jt(e, t, {
895
+ return on(e, t, {
896
896
  ...o,
897
897
  platform: s
898
898
  });
899
899
  };
900
- function En(e) {
900
+ function In(e) {
901
901
  return e != null && typeof e == "object" && "$el" in e;
902
902
  }
903
- function ct(e) {
904
- if (En(e)) {
903
+ function dt(e) {
904
+ if (In(e)) {
905
905
  const t = e.$el;
906
- return Ye(t) && re(t) === "#comment" ? null : t;
906
+ return Ge(t) && se(t) === "#comment" ? null : t;
907
907
  }
908
908
  return e;
909
909
  }
910
- function ge(e) {
911
- return typeof e == "function" ? e() : ve(e);
910
+ function be(e) {
911
+ return typeof e == "function" ? e() : Ce(e);
912
912
  }
913
- function At(e) {
913
+ function kt(e) {
914
914
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
915
915
  }
916
- function ut(e, t) {
917
- const n = At(e);
916
+ function ft(e, t) {
917
+ const n = kt(e);
918
918
  return Math.round(t * n) / n;
919
919
  }
920
- function An(e, t, n) {
920
+ function Bn(e, t, n) {
921
921
  n === void 0 && (n = {});
922
- const i = n.whileElementsMounted, o = R(() => {
922
+ const i = n.whileElementsMounted, o = I(() => {
923
923
  var E;
924
- return (E = ge(n.open)) != null ? E : !0;
925
- }), s = R(() => ge(n.middleware)), r = R(() => {
924
+ return (E = be(n.open)) != null ? E : !0;
925
+ }), s = I(() => be(n.middleware)), r = I(() => {
926
926
  var E;
927
- return (E = ge(n.placement)) != null ? E : "bottom";
928
- }), a = R(() => {
927
+ return (E = be(n.placement)) != null ? E : "bottom";
928
+ }), a = I(() => {
929
929
  var E;
930
- return (E = ge(n.strategy)) != null ? E : "absolute";
931
- }), l = R(() => {
930
+ return (E = be(n.strategy)) != null ? E : "absolute";
931
+ }), l = I(() => {
932
932
  var E;
933
- return (E = ge(n.transform)) != null ? E : !0;
934
- }), c = R(() => ct(e.value)), u = R(() => ct(t.value)), h = k(0), g = k(0), f = k(a.value), m = k(r.value), w = Pt({}), y = k(!1), L = R(() => {
933
+ return (E = be(n.transform)) != null ? E : !0;
934
+ }), c = I(() => dt(e.value)), d = I(() => dt(t.value)), h = R(0), g = R(0), f = R(a.value), m = R(r.value), w = Zt({}), y = R(!1), L = I(() => {
935
935
  const E = {
936
936
  position: f.value,
937
937
  left: "0",
938
938
  top: "0"
939
939
  };
940
- if (!u.value)
940
+ if (!d.value)
941
941
  return E;
942
- const D = ut(u.value, h.value), Z = ut(u.value, g.value);
942
+ const F = ft(d.value, h.value), U = ft(d.value, g.value);
943
943
  return l.value ? {
944
944
  ...E,
945
- transform: "translate(" + D + "px, " + Z + "px)",
946
- ...At(u.value) >= 1.5 && {
945
+ transform: "translate(" + F + "px, " + U + "px)",
946
+ ...kt(d.value) >= 1.5 && {
947
947
  willChange: "transform"
948
948
  }
949
949
  } : {
950
950
  position: f.value,
951
- left: D + "px",
952
- top: Z + "px"
951
+ left: F + "px",
952
+ top: U + "px"
953
953
  };
954
954
  });
955
955
  let x;
956
- function T() {
957
- c.value == null || u.value == null || Sn(c.value, u.value, {
956
+ function S() {
957
+ c.value == null || d.value == null || Rn(c.value, d.value, {
958
958
  middleware: s.value,
959
959
  placement: r.value,
960
960
  strategy: a.value
@@ -965,80 +965,80 @@ function An(e, t, n) {
965
965
  function A() {
966
966
  typeof x == "function" && (x(), x = void 0);
967
967
  }
968
- function S() {
968
+ function T() {
969
969
  if (A(), i === void 0) {
970
- T();
970
+ S();
971
971
  return;
972
972
  }
973
- if (c.value != null && u.value != null) {
974
- x = i(c.value, u.value, T);
973
+ if (c.value != null && d.value != null) {
974
+ x = i(c.value, d.value, S);
975
975
  return;
976
976
  }
977
977
  }
978
978
  function B() {
979
979
  o.value || (y.value = !1);
980
980
  }
981
- return Q([s, r, a], T, {
981
+ return te([s, r, a], S, {
982
982
  flush: "sync"
983
- }), Q([c, u], S, {
983
+ }), te([c, d], T, {
984
984
  flush: "sync"
985
- }), Q(o, B, {
985
+ }), te(o, B, {
986
986
  flush: "sync"
987
- }), Vt() && Nt(A), {
988
- x: ae(h),
989
- y: ae(g),
990
- strategy: ae(f),
991
- placement: ae(m),
992
- middlewareData: ae(w),
993
- isPositioned: ae(y),
987
+ }), jt() && qt(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
994
  floatingStyles: L,
995
- update: T
995
+ update: S
996
996
  };
997
997
  }
998
- const $n = "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", se = (e, t) => {
998
+ const Mn = "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
1000
  for (const [i, o] of t)
1001
1001
  n[i] = o;
1002
1002
  return n;
1003
- }, kn = {
1003
+ }, On = {
1004
1004
  name: "Logo"
1005
- }, Rn = {
1006
- src: $n,
1005
+ }, Fn = {
1006
+ src: Mn,
1007
1007
  alt: "DDict Logo",
1008
1008
  class: "w-6 h-6 cursor-pointer"
1009
1009
  };
1010
- function In(e, t, n, i, o, s) {
1011
- return p(), v("img", Rn);
1010
+ function Dn(e, t, n, i, o, s) {
1011
+ return p(), v("img", Fn);
1012
1012
  }
1013
- const Bn = /* @__PURE__ */ se(kn, [["render", In]]), Mn = {}, On = {
1013
+ const Wn = /* @__PURE__ */ le(On, [["render", Dn]]), _n = {}, zn = {
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
- }, Dn = /* @__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), Fn = [
1018
- Dn
1017
+ }, Pn = /* @__PURE__ */ Ye('<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), Vn = [
1018
+ Pn
1019
1019
  ];
1020
- function Wn(e, t) {
1021
- return p(), v("svg", On, Fn);
1020
+ function Nn(e, t) {
1021
+ return p(), v("svg", zn, Vn);
1022
1022
  }
1023
- const _n = /* @__PURE__ */ se(Mn, [["render", Wn]]), zn = { class: "rounded-lg bg-base-100 px-4 py-2 border border-base-300 shadow-lg" }, Pn = { class: "flex justify-center" }, Vn = {
1023
+ const Hn = /* @__PURE__ */ le(_n, [["render", Nn]]), Un = { class: "rounded-lg bg-base-100 px-4 py-2 border border-base-300 shadow-lg" }, Zn = { class: "flex justify-center" }, jn = {
1024
1024
  __name: "Loading",
1025
1025
  setup(e) {
1026
- return (t, n) => (p(), v("div", zn, [
1027
- C("div", Pn, [
1028
- O(_n)
1026
+ return (t, n) => (p(), v("div", Un, [
1027
+ C("div", Zn, [
1028
+ O(Hn)
1029
1029
  ])
1030
1030
  ]));
1031
1031
  }
1032
- }, Nn = {
1032
+ }, qn = {
1033
1033
  name: "Phonetic",
1034
1034
  props: ["phonetic"]
1035
- }, Hn = { class: "p-0 m-0" }, Un = { class: "text-xs font-md text-base-content/60" };
1036
- function Zn(e, t, n, i, o, s) {
1037
- return p(), v("p", Hn, [
1038
- C("span", Un, "/" + ne(n.phonetic) + "/", 1)
1035
+ }, Xn = { class: "p-0 m-0" }, Yn = { class: "text-xs font-md text-base-content/60" };
1036
+ function Kn(e, t, n, i, o, s) {
1037
+ return p(), v("p", Xn, [
1038
+ C("span", Yn, "/" + ie(n.phonetic) + "/", 1)
1039
1039
  ]);
1040
1040
  }
1041
- const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-col gap-2" }, qn = {
1041
+ const Gn = /* @__PURE__ */ le(qn, [["render", Kn]]), Jn = { class: "flex flex-col gap-2" }, Qn = {
1042
1042
  __name: "Sentences",
1043
1043
  props: {
1044
1044
  sentences: {
@@ -1047,22 +1047,22 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1047
1047
  }
1048
1048
  },
1049
1049
  setup(e) {
1050
- const t = e, n = R(() => t.sentences.split(`
1050
+ const t = e, n = I(() => t.sentences.split(`
1051
1051
  `));
1052
- return (i, o) => (p(), v("div", Xn, [
1053
- (p(!0), v(K, null, me(n.value, (s, r) => (p(), v("p", {
1052
+ return (i, o) => (p(), v("div", Jn, [
1053
+ (p(!0), v(J, null, me(n.value, (s, r) => (p(), v("p", {
1054
1054
  key: r,
1055
1055
  class: "text-base text-base-content leading-tight p-0 mr-2"
1056
- }, ne(s), 1))), 128))
1056
+ }, ie(s), 1))), 128))
1057
1057
  ]));
1058
1058
  }
1059
- }, Yn = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-primary text-center" }, [
1060
- /* @__PURE__ */ be(" 🤔 Don't understand? "),
1059
+ }, ei = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-primary text-center" }, [
1060
+ /* @__PURE__ */ we(" 🤔 Don't understand? "),
1061
1061
  /* @__PURE__ */ C("span", { class: "text-secondary font-semibold" }, "Try AI"),
1062
- /* @__PURE__ */ be(" ✨ ")
1063
- ], -1), Gn = [
1064
- Yn
1065
- ], Kn = {
1062
+ /* @__PURE__ */ we(" ✨ ")
1063
+ ], -1), ti = [
1064
+ ei
1065
+ ], ni = {
1066
1066
  __name: "AIPromptButton",
1067
1067
  props: {
1068
1068
  show: {
@@ -1078,16 +1078,16 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1078
1078
  setup(e) {
1079
1079
  return (t, n) => e.show ? (p(), v("div", {
1080
1080
  key: 0,
1081
- class: $([
1081
+ class: k([
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
1085
  onClick: n[0] || (n[0] = (i) => !e.isLoading && t.$emit("click"))
1086
- }, Gn, 2)) : M("", !0);
1086
+ }, ti, 2)) : M("", !0);
1087
1087
  }
1088
- }, Jn = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-accent text-center" }, "💡 Need Summary? ✨", -1), Qn = [
1089
- Jn
1090
- ], ei = {
1088
+ }, ii = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-accent text-center" }, "💡 Need Summary? ✨", -1), oi = [
1089
+ ii
1090
+ ], ri = {
1091
1091
  __name: "AIExplainPromptButton",
1092
1092
  props: {
1093
1093
  show: {
@@ -1103,20 +1103,20 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1103
1103
  setup(e) {
1104
1104
  return (t, n) => e.show ? (p(), v("div", {
1105
1105
  key: 0,
1106
- class: $([
1106
+ class: k([
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
1110
  onClick: n[0] || (n[0] = (i) => !e.isLoading && t.$emit("click"))
1111
- }, Qn, 2)) : M("", !0);
1111
+ }, oi, 2)) : M("", !0);
1112
1112
  }
1113
- }, ti = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-success text-center" }, [
1114
- /* @__PURE__ */ be(" 📚 Learn this? "),
1113
+ }, si = /* @__PURE__ */ C("p", { class: "text-sm font-medium text-success text-center" }, [
1114
+ /* @__PURE__ */ we(" 📚 Learn this? "),
1115
1115
  /* @__PURE__ */ C("span", { class: "text-warning font-semibold" }, "Study now"),
1116
- /* @__PURE__ */ be(" 🎯 ")
1117
- ], -1), ni = [
1118
- ti
1119
- ], ii = {
1116
+ /* @__PURE__ */ we(" 🎯 ")
1117
+ ], -1), li = [
1118
+ si
1119
+ ], ai = {
1120
1120
  __name: "LearnPromptButton",
1121
1121
  props: {
1122
1122
  show: {
@@ -1128,33 +1128,33 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1128
1128
  setup(e) {
1129
1129
  return (t, n) => e.show ? (p(), v("div", {
1130
1130
  key: 0,
1131
- class: $([
1131
+ class: k([
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
1135
  onClick: n[0] || (n[0] = (i) => t.$emit("click"))
1136
- }, ni)) : M("", !0);
1136
+ }, li)) : M("", !0);
1137
1137
  }
1138
- }, oi = { class: "capitalize text-base italic font-normal text-base-content/60" }, ri = { class: "text-base leading-6 text-base-content" }, si = {
1138
+ }, ci = { class: "capitalize text-base italic font-normal text-base-content/60" }, ui = { class: "text-base leading-6 text-base-content" }, di = {
1139
1139
  __name: "Dict",
1140
1140
  props: {
1141
1141
  dictionary: Array
1142
1142
  },
1143
1143
  setup(e) {
1144
1144
  return (t, n) => (p(), v("div", null, [
1145
- (p(!0), v(K, null, me(e.dictionary, (i, o) => (p(), v("div", {
1145
+ (p(!0), v(J, null, me(e.dictionary, (i, o) => (p(), v("div", {
1146
1146
  key: o,
1147
1147
  class: "mt-2"
1148
1148
  }, [
1149
- C("p", oi, ne(i.pos), 1),
1150
- C("span", ri, ne(i.terms.join(", ")), 1)
1149
+ C("p", ci, ie(i.pos), 1),
1150
+ C("span", ui, ie(i.terms.join(", ")), 1)
1151
1151
  ]))), 128))
1152
1152
  ]));
1153
1153
  }
1154
- }, li = { class: "" }, ai = /* @__PURE__ */ C("p", { class: "capitalize text-base italic font-normal text-base-content/60 mt-2" }, "Summary", -1), ci = {
1154
+ }, fi = { class: "" }, mi = /* @__PURE__ */ C("p", { class: "capitalize text-base italic font-normal text-base-content/60 mt-2" }, "Summary", -1), hi = {
1155
1155
  key: 0,
1156
1156
  class: "list-none list-outside mt-2"
1157
- }, ui = ["innerHTML"], di = {
1157
+ }, pi = ["innerHTML"], gi = {
1158
1158
  __name: "Explanation",
1159
1159
  props: {
1160
1160
  explanation: Object
@@ -1162,32 +1162,32 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1162
1162
  setup(e) {
1163
1163
  return (t, n) => {
1164
1164
  var i, o;
1165
- return p(), v("div", li, [
1166
- ai,
1167
- (i = e.explanation) != null && i.result ? (p(), v("ul", ci, [
1168
- (p(!0), v(K, null, me(((o = e.explanation) == null ? void 0 : o.result.split(`
1165
+ return p(), v("div", fi, [
1166
+ mi,
1167
+ (i = e.explanation) != null && i.result ? (p(), v("ul", hi, [
1168
+ (p(!0), v(J, null, me(((o = e.explanation) == null ? void 0 : o.result.split(`
1169
1169
  `)) || [], (s, r) => (p(), v("li", {
1170
1170
  key: `${s}-${r}`,
1171
1171
  innerHTML: s,
1172
1172
  class: "text-base text-base-content"
1173
- }, null, 8, ui))), 128))
1173
+ }, null, 8, pi))), 128))
1174
1174
  ])) : M("", !0)
1175
1175
  ]);
1176
1176
  };
1177
1177
  }
1178
- }, fi = ["disabled"], mi = /* @__PURE__ */ C("path", {
1178
+ }, vi = ["disabled"], bi = /* @__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), hi = [
1182
- mi
1183
- ], pi = ["disabled"], gi = /* @__PURE__ */ C("path", {
1181
+ }, null, -1), Ci = [
1182
+ bi
1183
+ ], wi = ["disabled"], yi = /* @__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), vi = [
1189
- gi
1190
- ], bi = {
1188
+ }, null, -1), xi = [
1189
+ yi
1190
+ ], Li = {
1191
1191
  __name: "Player",
1192
1192
  props: {
1193
1193
  tts: {
@@ -1201,29 +1201,29 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1201
1201
  },
1202
1202
  emits: ["loadTTS"],
1203
1203
  setup(e, { emit: t }) {
1204
- const n = e, i = t, o = R(() => n.tts), s = k(!1), r = new Audio(), a = new (window.AudioContext || window.webkitAudioContext)();
1204
+ const n = e, i = t, o = I(() => n.tts), s = R(!1), r = new Audio(), a = new (window.AudioContext || window.webkitAudioContext)();
1205
1205
  let l = null;
1206
- Q(
1206
+ te(
1207
1207
  o,
1208
1208
  () => {
1209
1209
  if (!o.value) {
1210
1210
  s.value = !1;
1211
1211
  return;
1212
1212
  }
1213
- u();
1213
+ d();
1214
1214
  },
1215
1215
  { immediate: !0 }
1216
- ), qe(() => {
1216
+ ), Ke(() => {
1217
1217
  g(), r.src = "", a.close();
1218
1218
  });
1219
1219
  function c() {
1220
1220
  if (o.value) {
1221
- u();
1221
+ d();
1222
1222
  return;
1223
1223
  }
1224
1224
  s.value = !0, i("loadTTS");
1225
1225
  }
1226
- async function u() {
1226
+ async function d() {
1227
1227
  if (o.value) {
1228
1228
  s.value = !0;
1229
1229
  try {
@@ -1250,7 +1250,7 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1250
1250
  }
1251
1251
  return (f, m) => s.value ? (p(), v("button", {
1252
1252
  key: 1,
1253
- class: $(["btn btn-xs btn-circle", [
1253
+ class: k(["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
  ]]),
@@ -1258,14 +1258,14 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1258
1258
  onClick: g
1259
1259
  }, [
1260
1260
  (p(), v("svg", {
1261
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1261
+ class: k(["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
- }, vi, 2))
1266
- ], 10, pi)) : (p(), v("button", {
1265
+ }, xi, 2))
1266
+ ], 10, wi)) : (p(), v("button", {
1267
1267
  key: 0,
1268
- class: $(["btn btn-xs btn-circle", [
1268
+ class: k(["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
  ]]),
@@ -1273,36 +1273,36 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1273
1273
  onClick: c
1274
1274
  }, [
1275
1275
  (p(), v("svg", {
1276
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1276
+ class: k(["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
- }, hi, 2))
1281
- ], 10, fi));
1280
+ }, Ci, 2))
1281
+ ], 10, vi));
1282
1282
  }
1283
- }, Ci = {
1283
+ }, Si = {
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
- }, wi = ["disabled"], yi = /* @__PURE__ */ C("path", {
1286
+ }, Ti = ["disabled"], Ei = /* @__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), xi = [
1290
- yi
1291
- ], Li = /* @__PURE__ */ C("path", {
1289
+ }, null, -1), Ai = [
1290
+ Ei
1291
+ ], $i = /* @__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), Ti = [
1295
- Li
1296
- ], Si = {
1294
+ }, null, -1), ki = [
1295
+ $i
1296
+ ], Ri = {
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) => (p(), v("div", Ci, [
1303
+ return (t, n) => (p(), v("div", Si, [
1304
1304
  C("button", {
1305
- class: $(["btn btn-xs btn-circle", [
1305
+ class: k(["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
  ]]),
@@ -1310,49 +1310,49 @@ const jn = /* @__PURE__ */ se(Nn, [["render", Zn]]), Xn = { class: "flex flex-co
1310
1310
  }, [
1311
1311
  e.isFilled ? (p(), v("svg", {
1312
1312
  key: 1,
1313
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1313
+ class: k(["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
- }, Ti, 2)) : (p(), v("svg", {
1317
+ }, ki, 2)) : (p(), v("svg", {
1318
1318
  key: 0,
1319
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1319
+ class: k(["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
- }, xi, 2))
1324
- ], 10, wi)
1323
+ }, Ai, 2))
1324
+ ], 10, Ti)
1325
1325
  ]));
1326
1326
  }
1327
- }, Ei = {}, Ai = {
1327
+ }, Ii = {}, Bi = {
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
- }, $i = /* @__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), ki = [
1332
- $i
1331
+ }, Mi = /* @__PURE__ */ Ye('<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), Oi = [
1332
+ Mi
1333
1333
  ];
1334
- function Ri(e, t) {
1335
- return p(), v("svg", Ai, ki);
1334
+ function Fi(e, t) {
1335
+ return p(), v("svg", Bi, Oi);
1336
1336
  }
1337
- const Qe = /* @__PURE__ */ se(Ei, [["render", Ri]]), Ii = {
1337
+ const tt = /* @__PURE__ */ le(Ii, [["render", Fi]]), Di = {
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
- }, Bi = ["disabled"], Mi = /* @__PURE__ */ C("path", {
1340
+ }, Wi = ["disabled"], _i = /* @__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), Oi = /* @__PURE__ */ C("path", {
1343
+ }, null, -1), zi = /* @__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), Di = /* @__PURE__ */ C("path", {
1346
+ }, null, -1), Pi = /* @__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), Fi = [
1350
- Mi,
1351
- Oi,
1352
- Di
1353
- ], Wi = /* @__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), _i = [
1354
- Wi
1355
- ], zi = {
1349
+ }, null, -1), Vi = [
1350
+ _i,
1351
+ zi,
1352
+ Pi
1353
+ ], Ni = /* @__PURE__ */ Ye('<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), Hi = [
1354
+ Ni
1355
+ ], Ui = {
1356
1356
  __name: "AITranslateBtn",
1357
1357
  props: {
1358
1358
  isLoading: Boolean,
@@ -1360,13 +1360,13 @@ const Qe = /* @__PURE__ */ se(Ei, [["render", Ri]]), Ii = {
1360
1360
  isFilled: Boolean
1361
1361
  },
1362
1362
  setup(e) {
1363
- return (t, n) => (p(), v("div", Ii, [
1364
- e.isLoading ? (p(), W(Qe, {
1363
+ return (t, n) => (p(), v("div", Di, [
1364
+ e.isLoading ? (p(), W(tt, {
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: $(["btn btn-xs btn-circle", [
1369
+ class: k(["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
  ]]),
@@ -1374,44 +1374,44 @@ const Qe = /* @__PURE__ */ se(Ei, [["render", Ri]]), Ii = {
1374
1374
  }, [
1375
1375
  e.isFilled ? (p(), v("svg", {
1376
1376
  key: 1,
1377
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1377
+ class: k(["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
- }, _i, 2)) : (p(), v("svg", {
1381
+ }, Hi, 2)) : (p(), v("svg", {
1382
1382
  key: 0,
1383
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1383
+ class: k(["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
- }, Fi, 2))
1388
- ], 10, Bi))
1387
+ }, Vi, 2))
1388
+ ], 10, Wi))
1389
1389
  ]));
1390
1390
  }
1391
- }, Pi = {
1391
+ }, Zi = {
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
- }, Vi = ["disabled"], Ni = /* @__PURE__ */ C("path", {
1394
+ }, ji = ["disabled"], qi = /* @__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), Hi = [
1401
- Ni
1402
- ], Ui = /* @__PURE__ */ C("path", {
1400
+ }, null, -1), Xi = [
1401
+ qi
1402
+ ], Yi = /* @__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), Zi = /* @__PURE__ */ C("path", {
1405
+ }, null, -1), Ki = /* @__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), ji = [
1412
- Ui,
1413
- Zi
1414
- ], Xi = {
1411
+ }, null, -1), Gi = [
1412
+ Yi,
1413
+ Ki
1414
+ ], Ji = {
1415
1415
  __name: "AIExplainBtn",
1416
1416
  props: {
1417
1417
  isLoading: Boolean,
@@ -1419,10 +1419,10 @@ const Qe = /* @__PURE__ */ se(Ei, [["render", Ri]]), Ii = {
1419
1419
  isFilled: Boolean
1420
1420
  },
1421
1421
  setup(e) {
1422
- return (t, n) => (p(), v("div", Pi, [
1423
- e.isLoading ? (p(), W(Qe, { key: 0 })) : (p(), v("button", {
1422
+ return (t, n) => (p(), v("div", Zi, [
1423
+ e.isLoading ? (p(), W(tt, { key: 0 })) : (p(), v("button", {
1424
1424
  key: 1,
1425
- class: $(["btn btn-xs btn-circle", [
1425
+ class: k(["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
  ]]),
@@ -1430,21 +1430,21 @@ const Qe = /* @__PURE__ */ se(Ei, [["render", Ri]]), Ii = {
1430
1430
  }, [
1431
1431
  e.isFilled ? (p(), v("svg", {
1432
1432
  key: 1,
1433
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1433
+ class: k(["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
- }, ji, 2)) : (p(), v("svg", {
1437
+ }, Gi, 2)) : (p(), v("svg", {
1438
1438
  key: 0,
1439
- class: $(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform": e.disabled }]]),
1439
+ class: k(["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
- }, Hi, 2))
1444
- ], 10, Vi))
1443
+ }, Xi, 2))
1444
+ ], 10, ji))
1445
1445
  ]));
1446
1446
  }
1447
- }, qi = {}, Yi = { class: "btn btn-xs btn-ghost btn-circle" }, Gi = /* @__PURE__ */ C("svg", {
1447
+ }, Qi = {}, eo = { class: "btn btn-xs btn-ghost btn-circle" }, to = /* @__PURE__ */ C("svg", {
1448
1448
  class: "w-4 h-4 text-primary",
1449
1449
  viewBox: "0 0 24 24",
1450
1450
  fill: "none",
@@ -1458,13 +1458,13 @@ const Qe = /* @__PURE__ */ se(Ei, [["render", Ri]]), Ii = {
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), Ki = [
1462
- Gi
1461
+ ], -1), no = [
1462
+ to
1463
1463
  ];
1464
- function Ji(e, t) {
1465
- return p(), v("button", Yi, Ki);
1464
+ function io(e, t) {
1465
+ return p(), v("button", eo, no);
1466
1466
  }
1467
- const Qi = /* @__PURE__ */ se(qi, [["render", Ji]]), eo = {}, to = { class: "btn btn-xs btn-circle btn-ghost" }, no = /* @__PURE__ */ C("svg", {
1467
+ const oo = /* @__PURE__ */ le(Qi, [["render", io]]), ro = {}, so = { class: "btn btn-xs btn-circle btn-ghost" }, lo = /* @__PURE__ */ C("svg", {
1468
1468
  class: "w-4 h-4 text-primary",
1469
1469
  viewBox: "0 0 16 16",
1470
1470
  fill: "none",
@@ -1482,13 +1482,13 @@ const Qi = /* @__PURE__ */ se(qi, [["render", Ji]]), eo = {}, to = { class: "btn
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), io = [
1486
- no
1485
+ ], -1), ao = [
1486
+ lo
1487
1487
  ];
1488
- function oo(e, t) {
1489
- return p(), v("button", to, io);
1488
+ function co(e, t) {
1489
+ return p(), v("button", so, ao);
1490
1490
  }
1491
- const ro = /* @__PURE__ */ se(eo, [["render", oo]]), so = {
1491
+ const uo = /* @__PURE__ */ le(ro, [["render", co]]), fo = {
1492
1492
  name: "ThemeSelector",
1493
1493
  props: {
1494
1494
  currentTheme: {
@@ -1525,7 +1525,7 @@ const ro = /* @__PURE__ */ se(eo, [["render", oo]]), so = {
1525
1525
  });
1526
1526
  }
1527
1527
  }
1528
- }, lo = { class: "dropdown dropdown-end z-50" }, ao = /* @__PURE__ */ C("div", {
1528
+ }, mo = { class: "dropdown dropdown-end z-50" }, ho = /* @__PURE__ */ C("div", {
1529
1529
  tabindex: "0",
1530
1530
  role: "button",
1531
1531
  class: "btn btn-ghost btn-circle btn-xs"
@@ -1537,15 +1537,15 @@ const ro = /* @__PURE__ */ se(eo, [["render", oo]]), so = {
1537
1537
  }, [
1538
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), co = {
1540
+ ], -1), po = {
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
- }, uo = ["id", "value", "checked", "onChange"], fo = ["for"], mo = { class: "flex items-center gap-2" };
1544
- function ho(e, t, n, i, o, s) {
1545
- return p(), v("div", lo, [
1546
- ao,
1547
- C("ul", co, [
1548
- (p(!0), v(K, null, me(o.availableThemes, (r) => (p(), v("li", {
1543
+ }, go = ["id", "value", "checked", "onChange"], vo = ["for"], bo = { class: "flex items-center gap-2" };
1544
+ function Co(e, t, n, i, o, s) {
1545
+ return p(), v("div", mo, [
1546
+ ho,
1547
+ C("ul", po, [
1548
+ (p(!0), v(J, null, me(o.availableThemes, (r) => (p(), v("li", {
1549
1549
  key: r.value
1550
1550
  }, [
1551
1551
  C("input", {
@@ -1555,31 +1555,31 @@ function ho(e, t, n, i, o, s) {
1555
1555
  checked: n.currentTheme === r.value,
1556
1556
  onChange: (a) => s.handleThemeChange(r.value),
1557
1557
  class: "theme-controller sr-only"
1558
- }, null, 40, uo),
1558
+ }, null, 40, go),
1559
1559
  C("label", {
1560
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 }]),
1561
+ class: k(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200", { "bg-primary text-primary-content": n.currentTheme === r.value }]),
1562
1562
  onClick: t[0] || (t[0] = (...a) => s.handleLabelClick && s.handleLabelClick(...a))
1563
1563
  }, [
1564
- C("span", mo, [
1564
+ C("span", bo, [
1565
1565
  C("span", {
1566
1566
  class: "w-3 h-3 rounded-full",
1567
- style: Ze({ backgroundColor: r.color })
1567
+ style: qe({ backgroundColor: r.color })
1568
1568
  }, null, 4),
1569
- be(" " + ne(r.name), 1)
1569
+ we(" " + ie(r.name), 1)
1570
1570
  ])
1571
- ], 10, fo)
1571
+ ], 10, vo)
1572
1572
  ]))), 128))
1573
1573
  ])
1574
1574
  ]);
1575
1575
  }
1576
- const po = /* @__PURE__ */ se(so, [["render", ho]]), go = { class: "flex flex-col" }, vo = {
1576
+ const wo = /* @__PURE__ */ le(fo, [["render", Co]]), yo = { class: "flex flex-col" }, xo = {
1577
1577
  class: "flex min-w-0 gap-1",
1578
1578
  "data-mode-toggle": ""
1579
- }, bo = ["disabled"], Co = { class: "flex shrink-0 items-center" }, wo = {
1579
+ }, Lo = ["disabled"], So = { class: "flex shrink-0 items-center" }, To = {
1580
1580
  key: 0,
1581
1581
  class: "flex items-center gap-1 px-2 pb-1"
1582
- }, dt = {
1582
+ }, mt = {
1583
1583
  __name: "Header",
1584
1584
  props: {
1585
1585
  tts: String,
@@ -1622,65 +1622,65 @@ const po = /* @__PURE__ */ se(so, [["render", ho]]), go = { class: "flex flex-co
1622
1622
  "requestWrite"
1623
1623
  ],
1624
1624
  setup(e, { emit: t }) {
1625
- const n = e, i = R(() => n.mode !== "write" && !n.isServiceUnavailable), o = t, s = (a) => {
1625
+ const n = e, i = I(() => n.mode !== "write" && !n.isServiceUnavailable), o = t, s = (a) => {
1626
1626
  a.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "mouse", event: a }), a.preventDefault());
1627
1627
  }, r = (a) => {
1628
1628
  a.target.closest('button, input, select, textarea, [role="button"]') || (o("dragStart", { type: "touch", event: a }), a.preventDefault());
1629
1629
  };
1630
- return (a, l) => (p(), v("div", go, [
1630
+ return (a, l) => (p(), v("div", yo, [
1631
1631
  C("div", {
1632
1632
  class: "flex cursor-grab flex-row items-center justify-between gap-1 p-2 pb-1 active:cursor-grabbing",
1633
1633
  onMousedown: s,
1634
1634
  onTouchstart: r
1635
1635
  }, [
1636
- C("div", vo, [
1636
+ C("div", xo, [
1637
1637
  C("button", {
1638
1638
  type: "button",
1639
- class: $(["btn btn-xs", e.mode === "write" ? "btn-ghost" : "btn-primary"]),
1639
+ class: k(["btn btn-xs", e.mode === "write" ? "btn-ghost" : "btn-primary"]),
1640
1640
  "data-mode": "translate",
1641
1641
  onClick: l[0] || (l[0] = (c) => o("requestTranslate"))
1642
1642
  }, " Translate ", 2),
1643
1643
  C("button", {
1644
1644
  type: "button",
1645
- class: $(["btn btn-xs", e.mode === "write" ? "btn-primary" : "btn-ghost"]),
1645
+ class: k(["btn btn-xs", e.mode === "write" ? "btn-primary" : "btn-ghost"]),
1646
1646
  disabled: !e.canWrite,
1647
1647
  "data-mode": "write",
1648
1648
  onClick: l[1] || (l[1] = (c) => o("requestWrite"))
1649
- }, " Write ", 10, bo)
1649
+ }, " Write ", 10, Lo)
1650
1650
  ]),
1651
- C("div", Co, [
1652
- e.showThemeSelector ? (p(), W(po, {
1651
+ C("div", So, [
1652
+ e.showThemeSelector ? (p(), W(wo, {
1653
1653
  key: 0,
1654
1654
  "current-theme": e.theme,
1655
1655
  onThemeChange: l[2] || (l[2] = (c) => o("themeChange", c))
1656
1656
  }, null, 8, ["current-theme"])) : M("", !0),
1657
- O(Qi, {
1657
+ O(oo, {
1658
1658
  onClick: l[3] || (l[3] = (c) => o("setting"))
1659
1659
  }),
1660
- O(ro, {
1660
+ O(uo, {
1661
1661
  onClick: l[4] || (l[4] = (c) => o("close"))
1662
1662
  })
1663
1663
  ])
1664
1664
  ], 32),
1665
- i.value ? (p(), v("div", wo, [
1666
- O(bi, {
1665
+ i.value ? (p(), v("div", To, [
1666
+ O(Li, {
1667
1667
  disabled: e.isAITranslationLoading || e.isAIExplainLoading,
1668
1668
  tts: n.tts,
1669
1669
  onLoadTTS: l[5] || (l[5] = (c) => a.$emit("loadTTS"))
1670
1670
  }, null, 8, ["disabled", "tts"]),
1671
- e.isAITranslateVisible ? (p(), W(zi, {
1671
+ e.isAITranslateVisible ? (p(), W(Ui, {
1672
1672
  key: 0,
1673
1673
  isLoading: e.isAITranslationLoading,
1674
1674
  isFilled: e.isAITranslate,
1675
1675
  onClick: l[6] || (l[6] = (c) => o("aiTranslate"))
1676
1676
  }, null, 8, ["isLoading", "isFilled"])) : M("", !0),
1677
- e.isAIExplainVisible ? (p(), W(Xi, {
1677
+ e.isAIExplainVisible ? (p(), W(Ji, {
1678
1678
  key: 1,
1679
1679
  isLoading: e.isAIExplainLoading,
1680
1680
  isFilled: e.isAIExplain,
1681
1681
  onClick: l[7] || (l[7] = (c) => o("aiExplain"))
1682
1682
  }, null, 8, ["isLoading", "isFilled"])) : M("", !0),
1683
- n.isFavoriteFeatureEnabled ? (p(), W(Si, {
1683
+ n.isFavoriteFeatureEnabled ? (p(), W(Ri, {
1684
1684
  key: 2,
1685
1685
  isFilled: n.isFavorite,
1686
1686
  onClick: l[8] || (l[8] = (c) => o("favorite")),
@@ -1689,7 +1689,7 @@ const po = /* @__PURE__ */ se(so, [["render", ho]]), go = { class: "flex flex-co
1689
1689
  ])) : M("", !0)
1690
1690
  ]));
1691
1691
  }
1692
- }, yo = { class: "pointer-events-none absolute inset-0 z-20" }, xo = ["data-resize", "aria-label", "onPointerdown"], Lo = {
1692
+ }, Eo = { class: "pointer-events-none absolute inset-0 z-20" }, Ao = ["data-resize", "aria-label", "onPointerdown"], $o = {
1693
1693
  __name: "ResizeHandle",
1694
1694
  emits: ["resizeStart"],
1695
1695
  setup(e, { emit: t }) {
@@ -1706,38 +1706,38 @@ const po = /* @__PURE__ */ se(so, [["render", ho]]), go = { class: "flex flex-co
1706
1706
  var a, l;
1707
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 }));
1708
1708
  };
1709
- return (s, r) => (p(), v("div", yo, [
1710
- (p(), v(K, null, me(i, (a) => C("div", {
1709
+ return (s, r) => (p(), v("div", Eo, [
1710
+ (p(), v(J, null, me(i, (a) => C("div", {
1711
1711
  key: a.name,
1712
1712
  "data-resize": a.name,
1713
- class: $(["pointer-events-auto absolute touch-none hover:bg-base-content/20", a.class]),
1713
+ class: k(["pointer-events-auto absolute touch-none hover:bg-base-content/20", a.class]),
1714
1714
  "aria-label": `Resize from the ${a.name} border`,
1715
1715
  onPointerdown: (l) => o(a.name, l),
1716
- onClick: r[0] || (r[0] = Ht(() => {
1716
+ onClick: r[0] || (r[0] = Xt(() => {
1717
1717
  }, ["stop"]))
1718
- }, null, 42, xo)), 64))
1718
+ }, null, 42, Ao)), 64))
1719
1719
  ]));
1720
1720
  }
1721
- }, et = 4, Ee = "check", To = [
1721
+ }, nt = 4, $e = "check", ko = [
1722
1722
  { value: "check", label: "Check" },
1723
1723
  { value: "improve", label: "Improve" },
1724
1724
  { value: "improve-plus", label: "Academy" },
1725
1725
  { value: "friendly", label: "Friendly" },
1726
1726
  { value: "simplify", label: "Simplify" },
1727
1727
  { value: "more-detailed", label: "More detailed" }
1728
- ], So = /* @__PURE__ */ new Set(["", "text", "search", "email", "url", "tel"]), Eo = 4e4;
1729
- function $t(e, t) {
1730
- return !!e && String(t || "").trim().length >= et;
1728
+ ], Ro = /* @__PURE__ */ new Set(["", "text", "search", "email", "url", "tel"]), Io = 4e4;
1729
+ function Rt(e, t) {
1730
+ return !!e && String(t || "").trim().length >= nt;
1731
1731
  }
1732
- function Ao(e) {
1732
+ function Bo(e) {
1733
1733
  const t = (e == null ? void 0 : e.nodeType) === 3 ? e.parentElement : e;
1734
1734
  if (!t || t.nodeType !== 1) return !1;
1735
- if ($o(t)) return !0;
1735
+ if (Mo(t)) return !0;
1736
1736
  if (t.disabled || t.readOnly) return !1;
1737
1737
  const n = t.tagName;
1738
- return n === "TEXTAREA" ? !0 : n === "INPUT" ? So.has((t.type || "text").toLowerCase()) : !1;
1738
+ return n === "TEXTAREA" ? !0 : n === "INPUT" ? Ro.has((t.type || "text").toLowerCase()) : !1;
1739
1739
  }
1740
- function $o(e) {
1740
+ function Mo(e) {
1741
1741
  var n;
1742
1742
  let t = e;
1743
1743
  for (; t && t.nodeType === 1; ) {
@@ -1749,36 +1749,36 @@ function $o(e) {
1749
1749
  }
1750
1750
  return !1;
1751
1751
  }
1752
- function ko(e, t) {
1753
- const n = ft(e), i = ft(t);
1754
- return !n.length && !i.length ? [] : n.length * i.length > Eo ? [{ value: String(t || ""), added: !1, removed: !1 }] : Mo(n, i, Bo(n, i));
1752
+ function Oo(e, t) {
1753
+ const n = ht(e), i = ht(t);
1754
+ return !n.length && !i.length ? [] : n.length * i.length > Io ? [{ value: String(t || ""), added: !1, removed: !1 }] : _o(n, i, Wo(n, i));
1755
1755
  }
1756
- function Ro(e) {
1756
+ function Fo(e) {
1757
1757
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1758
1758
  }
1759
- function Io(e, t) {
1760
- return ko(e, t).map((n) => {
1761
- const i = Ro(n.value);
1759
+ function Do(e, t) {
1760
+ return Oo(e, t).map((n) => {
1761
+ const i = Fo(n.value);
1762
1762
  return n.added ? `<span class="bg-success/40">${i}</span>` : n.removed ? `<span class="bg-error/30 line-through">${i}</span>` : i;
1763
1763
  }).join("");
1764
1764
  }
1765
- function ft(e) {
1765
+ function ht(e) {
1766
1766
  return String(e || "").split(/(\s+)/).filter((t) => t.length);
1767
1767
  }
1768
- function Bo(e, t) {
1768
+ function Wo(e, t) {
1769
1769
  const n = Array.from({ length: e.length + 1 }, () => new Array(t.length + 1).fill(0));
1770
1770
  for (let i = e.length - 1; i >= 0; i--)
1771
1771
  for (let o = t.length - 1; o >= 0; o--)
1772
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
1773
  return n;
1774
1774
  }
1775
- function Mo(e, t, n) {
1775
+ function _o(e, t, n) {
1776
1776
  const i = [];
1777
1777
  let o = 0, s = 0;
1778
1778
  const r = (a, l, c) => {
1779
- const u = i[i.length - 1];
1780
- if (u && u.added === l && u.removed === c) {
1781
- u.value += a;
1779
+ const d = i[i.length - 1];
1780
+ if (d && d.added === l && d.removed === c) {
1781
+ d.value += a;
1782
1782
  return;
1783
1783
  }
1784
1784
  i.push({ value: a, added: l, removed: c });
@@ -1791,20 +1791,20 @@ function Mo(e, t, n) {
1791
1791
  r(t[s], !0, !1), s += 1;
1792
1792
  return i;
1793
1793
  }
1794
- const Oo = {
1794
+ const zo = {
1795
1795
  class: "flex flex-col gap-2 border-t border-base-300 p-3",
1796
1796
  "data-write-view": ""
1797
- }, Do = { class: "flex items-center gap-1" }, Fo = ["value", "disabled"], Wo = ["value"], _o = ["disabled"], zo = ["disabled"], Po = {
1797
+ }, Po = { class: "flex items-center gap-1" }, Vo = ["value", "disabled"], No = ["value"], Ho = ["disabled"], Uo = ["disabled"], Zo = {
1798
1798
  key: 0,
1799
1799
  "data-write-loading": ""
1800
- }, Vo = {
1800
+ }, jo = {
1801
1801
  key: 1,
1802
1802
  class: "text-sm"
1803
- }, No = ["innerHTML"], Ho = {
1803
+ }, qo = ["innerHTML"], Xo = {
1804
1804
  key: 3,
1805
1805
  class: "whitespace-pre-wrap break-words text-sm",
1806
1806
  "data-result": ""
1807
- }, Uo = {
1807
+ }, Yo = {
1808
1808
  __name: "WriteView",
1809
1809
  props: {
1810
1810
  text: {
@@ -1825,15 +1825,15 @@ const Oo = {
1825
1825
  },
1826
1826
  emits: ["action", "copy", "replace"],
1827
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 ? Io(n.text, n.result) : "");
1828
+ const n = e, i = t, o = I(() => n.text.trim().length < nt), s = I(() => !n.loading && !!n.result), r = I(() => n.editable && s.value), a = I(() => n.action === "check" && !!n.result), l = I(() => a.value ? Do(n.text, n.result) : "");
1829
1829
  function c() {
1830
1830
  s.value && i("copy", n.result);
1831
1831
  }
1832
- function u() {
1832
+ function d() {
1833
1833
  r.value && i("replace", { text: n.text, result: n.result });
1834
1834
  }
1835
- return (h, g) => (p(), v("div", Oo, [
1836
- C("div", Do, [
1835
+ return (h, g) => (p(), v("div", zo, [
1836
+ C("div", Po, [
1837
1837
  C("select", {
1838
1838
  class: "select select-bordered select-xs min-w-0 flex-1",
1839
1839
  value: e.action,
@@ -1841,49 +1841,49 @@ const Oo = {
1841
1841
  "data-write-action": "",
1842
1842
  onChange: g[0] || (g[0] = (f) => i("action", f.target.value))
1843
1843
  }, [
1844
- (p(!0), v(K, null, me(ve(To), (f) => (p(), v("option", {
1844
+ (p(!0), v(J, null, me(Ce(ko), (f) => (p(), v("option", {
1845
1845
  key: f.value,
1846
1846
  value: f.value
1847
- }, ne(f.label), 9, Wo))), 128))
1848
- ], 40, Fo),
1847
+ }, ie(f.label), 9, No))), 128))
1848
+ ], 40, Vo),
1849
1849
  C("button", {
1850
1850
  type: "button",
1851
1851
  class: "btn btn-xs",
1852
1852
  disabled: !s.value,
1853
1853
  "data-copy": "",
1854
1854
  onClick: c
1855
- }, " Copy ", 8, _o),
1855
+ }, " Copy ", 8, Ho),
1856
1856
  C("button", {
1857
1857
  type: "button",
1858
1858
  class: "btn btn-xs btn-primary",
1859
1859
  disabled: !r.value,
1860
1860
  "data-replace": "",
1861
- onClick: u
1862
- }, " Replace ", 8, zo)
1861
+ onClick: d
1862
+ }, " Replace ", 8, Uo)
1863
1863
  ]),
1864
- e.loading ? (p(), v("div", Po, [
1865
- O(Qe)
1866
- ])) : e.unavailable ? (p(), v("p", Vo, "Service Unavailable")) : a.value ? (p(), v("pre", {
1864
+ e.loading ? (p(), v("div", Zo, [
1865
+ O(tt)
1866
+ ])) : e.unavailable ? (p(), v("p", jo, "Service Unavailable")) : a.value ? (p(), v("pre", {
1867
1867
  key: 2,
1868
1868
  class: "m-0 whitespace-pre-wrap break-words font-sans text-sm",
1869
1869
  "data-diff": "",
1870
1870
  innerHTML: l.value
1871
- }, null, 8, No)) : e.result ? (p(), v("p", Ho, ne(e.result), 1)) : M("", !0)
1871
+ }, null, 8, qo)) : e.result ? (p(), v("p", Xo, ie(e.result), 1)) : M("", !0)
1872
1872
  ]));
1873
1873
  }
1874
- }, te = {
1874
+ }, X = {
1875
1875
  LOGO: "LOGO",
1876
1876
  LOADING: "LOADING",
1877
1877
  DATA: "DATA",
1878
1878
  ERROR: "ERROR",
1879
1879
  HIDDEN: "HIDDEN"
1880
- }, Zo = 320, jo = 240, Xo = 250, qo = 120, Yo = 8, Go = ["ar", "fa", "iw", "yi", "ur", "pa"], Ko = {
1880
+ }, Ko = 320, Go = 240, Jo = 250, Qo = 120, er = 8, tr = ["ar", "fa", "iw", "yi", "ur", "pa"], nr = {
1881
1881
  key: 0,
1882
1882
  class: "flex justify-center"
1883
- }, Jo = {
1883
+ }, ir = {
1884
1884
  key: 1,
1885
1885
  class: "flex justify-center"
1886
- }, Qo = { class: "p-3 border-t border-base-300" }, er = {
1886
+ }, or = { class: "p-3 border-t border-base-300" }, rr = {
1887
1887
  name: "Bubble",
1888
1888
  props: [
1889
1889
  "translation",
@@ -1948,14 +1948,14 @@ const Oo = {
1948
1948
  },
1949
1949
  currentAction() {
1950
1950
  var e;
1951
- return this.writeAction || ((e = this.writing) == null ? void 0 : e.action) || Ee;
1951
+ return this.writeAction || ((e = this.writing) == null ? void 0 : e.action) || $e;
1952
1952
  },
1953
1953
  activeText() {
1954
1954
  var e, t;
1955
1955
  return this.selectedText || ((e = this.writing) == null ? void 0 : e.text) || ((t = this.data) == null ? void 0 : t.text) || "";
1956
1956
  },
1957
1957
  canWrite() {
1958
- return this.activeText.trim().length >= et;
1958
+ return this.activeText.trim().length >= nt;
1959
1959
  },
1960
1960
  shownResult() {
1961
1961
  var e;
@@ -1964,7 +1964,7 @@ const Oo = {
1964
1964
  },
1965
1965
  methods: {
1966
1966
  handleLogo() {
1967
- if ($t(this.editable, this.selectedText)) {
1967
+ if (Rt(this.editable, this.selectedText)) {
1968
1968
  this.$emit("write", { text: this.selectedText, action: this.currentAction });
1969
1969
  return;
1970
1970
  }
@@ -2021,20 +2021,20 @@ const Oo = {
2021
2021
  immediate: !0
2022
2022
  },
2023
2023
  status() {
2024
- this.status === te.ERROR && (this.isServiceUnavailable = !0);
2024
+ this.status === X.ERROR && (this.isServiceUnavailable = !0);
2025
2025
  }
2026
2026
  }
2027
- }, tr = /* @__PURE__ */ Object.assign(er, {
2027
+ }, sr = /* @__PURE__ */ Object.assign(rr, {
2028
2028
  setup(e) {
2029
2029
  return (t, n) => {
2030
- var i, o, s, r, a, l, c, u, h, g, f;
2031
- return e.status === ve(te).LOGO ? (p(), v("div", Ko, [
2032
- O(Bn, { onClick: t.handleLogo }, null, 8, ["onClick"])
2033
- ])) : e.status === ve(te).LOADING ? (p(), v("div", Jo, [
2034
- O(Vn)
2035
- ])) : e.status !== ve(te).HIDDEN ? (p(), v("div", {
2030
+ var i, o, s, r, a, l, c, d, h, g, f;
2031
+ return e.status === Ce(X).LOGO ? (p(), v("div", nr, [
2032
+ O(Wn, { onClick: t.handleLogo }, null, 8, ["onClick"])
2033
+ ])) : e.status === Ce(X).LOADING ? (p(), v("div", ir, [
2034
+ O(jn)
2035
+ ])) : e.status !== Ce(X).HIDDEN ? (p(), v("div", {
2036
2036
  key: 2,
2037
- class: $([
2037
+ class: k([
2038
2038
  "wrapper rounded-lg text-base-content text-sm shadow-lg relative bg-[length:300%_300%] bg-[position:0%_50%]",
2039
2039
  e.constrained ? "flex h-full w-full min-w-0 flex-col" : "",
2040
2040
  {
@@ -2044,12 +2044,12 @@ const Oo = {
2044
2044
  ])
2045
2045
  }, [
2046
2046
  C("div", {
2047
- class: $([
2047
+ class: k([
2048
2048
  "bg-base-100 rounded-md relative z-10",
2049
2049
  e.constrained ? "flex min-h-0 min-w-0 flex-1 flex-col" : ""
2050
2050
  ])
2051
2051
  }, [
2052
- t.isServiceUnavailable ? (p(), W(dt, {
2052
+ t.isServiceUnavailable ? (p(), W(mt, {
2053
2053
  key: 0,
2054
2054
  class: "shrink-0",
2055
2055
  isServiceUnavailable: t.isServiceUnavailable,
@@ -2065,7 +2065,7 @@ const Oo = {
2065
2065
  onThemeChange: n[4] || (n[4] = (m) => t.$emit("themeChange", m)),
2066
2066
  onRequestTranslate: t.requestTranslate,
2067
2067
  onRequestWrite: t.requestWrite
2068
- }, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector", "mode", "canWrite", "onRequestTranslate", "onRequestWrite"])) : (p(), W(dt, {
2068
+ }, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector", "mode", "canWrite", "onRequestTranslate", "onRequestWrite"])) : (p(), W(mt, {
2069
2069
  key: 1,
2070
2070
  class: "shrink-0",
2071
2071
  tts: e.tts,
@@ -2094,11 +2094,11 @@ const Oo = {
2094
2094
  onRequestWrite: t.requestWrite
2095
2095
  }, null, 8, ["tts", "isFavorite", "isAITranslate", "isAITranslateVisible", "isAIExplain", "isAIExplainVisible", "isAITranslationLoading", "isAIExplainLoading", "isFavoriteFeatureEnabled", "isLongSentence", "theme", "showThemeSelector", "mode", "canWrite", "onAiTranslate", "onAiExplain", "onRequestTranslate", "onRequestWrite"])),
2096
2096
  C("div", {
2097
- class: $(
2097
+ class: k(
2098
2098
  e.constrained ? "min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden break-words overscroll-contain" : ""
2099
2099
  )
2100
2100
  }, [
2101
- t.isWrite ? (p(), W(Uo, {
2101
+ t.isWrite ? (p(), W(Yo, {
2102
2102
  key: 0,
2103
2103
  text: t.activeText,
2104
2104
  result: t.shownResult,
@@ -2109,43 +2109,43 @@ const Oo = {
2109
2109
  onAction: t.handleWriteAction,
2110
2110
  onCopy: t.handleCopy,
2111
2111
  onReplace: t.handleReplace
2112
- }, null, 8, ["text", "result", "action", "loading", "editable", "unavailable", "onAction", "onCopy", "onReplace"])) : (p(), v(K, { key: 1 }, [
2113
- C("div", Qo, [
2114
- (l = (a = t.data) == null ? void 0 : a.phonetic) != null && l.src ? (p(), W(jn, {
2112
+ }, null, 8, ["text", "result", "action", "loading", "editable", "unavailable", "onAction", "onCopy", "onReplace"])) : (p(), v(J, { key: 1 }, [
2113
+ C("div", or, [
2114
+ (l = (a = t.data) == null ? void 0 : a.phonetic) != null && l.src ? (p(), W(Gn, {
2115
2115
  key: 0,
2116
- phonetic: (u = (c = t.data) == null ? void 0 : c.phonetic) == null ? void 0 : u.src
2116
+ phonetic: (d = (c = t.data) == null ? void 0 : c.phonetic) == null ? void 0 : d.src
2117
2117
  }, null, 8, ["phonetic"])) : M("", !0),
2118
- O(qn, {
2118
+ O(Qn, {
2119
2119
  sentences: t.isServiceUnavailable ? "Service Unavailable" : (h = t.data) == null ? void 0 : h.result
2120
2120
  }, null, 8, ["sentences"]),
2121
- O(Kn, {
2121
+ O(ni, {
2122
2122
  show: t.showAIPrompt,
2123
2123
  isLoading: t.isAITranslationLoading,
2124
2124
  onClick: t.handleAITranslate
2125
2125
  }, null, 8, ["show", "isLoading", "onClick"]),
2126
- O(ei, {
2126
+ O(ri, {
2127
2127
  show: t.showAIExplainPrompt,
2128
2128
  isLoading: t.isAIExplainLoading,
2129
2129
  onClick: t.handleAIExplain
2130
2130
  }, null, 8, ["show", "isLoading", "onClick"]),
2131
- O(ii, {
2131
+ O(ai, {
2132
2132
  show: t.showLearnPrompt,
2133
2133
  onClick: t.handleLearn
2134
2134
  }, null, 8, ["show", "onClick"])
2135
2135
  ]),
2136
- !t.isServiceUnavailable && ((f = (g = t.data) == null ? void 0 : g.dictionary) == null ? void 0 : f.length) > 0 ? (p(), W(si, {
2136
+ !t.isServiceUnavailable && ((f = (g = t.data) == null ? void 0 : g.dictionary) == null ? void 0 : f.length) > 0 ? (p(), W(di, {
2137
2137
  key: 0,
2138
2138
  class: "p-3 pt-0 border-t border-base-300",
2139
2139
  dictionary: t.data.dictionary
2140
2140
  }, null, 8, ["dictionary"])) : M("", !0),
2141
- !t.isServiceUnavailable && e.isAIExplain && e.explanation ? (p(), W(di, {
2141
+ !t.isServiceUnavailable && e.isAIExplain && e.explanation ? (p(), W(gi, {
2142
2142
  key: 1,
2143
2143
  class: "p-3 pt-0 border-t border-base-300",
2144
2144
  explanation: e.explanation
2145
2145
  }, null, 8, ["explanation"])) : M("", !0)
2146
2146
  ], 64))
2147
2147
  ], 2),
2148
- O(Lo, {
2148
+ O($o, {
2149
2149
  onResizeStart: n[11] || (n[11] = (m) => t.$emit("resizeStart", m))
2150
2150
  })
2151
2151
  ], 2)
@@ -2153,12 +2153,12 @@ const Oo = {
2153
2153
  };
2154
2154
  }
2155
2155
  });
2156
- function nr(e) {
2156
+ function lr(e) {
2157
2157
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2158
2158
  }
2159
- var Ue = { exports: {} }, mt;
2160
- function ir() {
2161
- return mt || (mt = 1, function(e) {
2159
+ var je = { exports: {} }, pt;
2160
+ function ar() {
2161
+ return pt || (pt = 1, function(e) {
2162
2162
  (function() {
2163
2163
  var t = [
2164
2164
  "direction",
@@ -2206,53 +2206,68 @@ function ir() {
2206
2206
  var c = document.querySelector("#input-textarea-caret-position-mirror-div");
2207
2207
  c && c.parentNode.removeChild(c);
2208
2208
  }
2209
- var u = document.createElement("div");
2210
- u.id = "input-textarea-caret-position-mirror-div", document.body.appendChild(u);
2211
- var h = u.style, g = window.getComputedStyle ? window.getComputedStyle(s) : s.currentStyle, f = s.nodeName === "INPUT";
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
2212
  h.whiteSpace = "pre-wrap", f || (h.wordWrap = "break-word"), h.position = "absolute", l || (h.visibility = "hidden"), t.forEach(function(y) {
2213
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", u.textContent = s.value.substring(0, r), f && (u.textContent = u.textContent.replace(/\s/g, " "));
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
2215
  var m = document.createElement("span");
2216
- m.textContent = s.value.substring(r) || ".", u.appendChild(m);
2216
+ m.textContent = s.value.substring(r) || ".", d.appendChild(m);
2217
2217
  var w = {
2218
2218
  top: m.offsetTop + parseInt(g.borderTopWidth),
2219
2219
  left: m.offsetLeft + parseInt(g.borderLeftWidth),
2220
2220
  height: parseInt(g.lineHeight)
2221
2221
  };
2222
- return l ? m.style.backgroundColor = "#aaa" : document.body.removeChild(u), w;
2222
+ return l ? m.style.backgroundColor = "#aaa" : document.body.removeChild(d), w;
2223
2223
  }
2224
2224
  e.exports = o;
2225
2225
  })();
2226
- }(Ue)), Ue.exports;
2226
+ }(je)), je.exports;
2227
2227
  }
2228
- var or = ir();
2229
- const ht = /* @__PURE__ */ nr(or);
2230
- function ce(e) {
2228
+ var cr = ar();
2229
+ const gt = /* @__PURE__ */ lr(cr);
2230
+ function ee(e) {
2231
2231
  const t = window.getSelection();
2232
2232
  let n = t + "";
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)))
2233
+ if (n = n.trim(), e && e.type === "password" || !n.length && (!e || e.selectionStart == null || e.selectionEnd == null || e.selectionStart === e.selectionEnd || (n = e.value.substring(e.selectionStart, e.selectionEnd), n = n.trim(), !n.length)))
2234
2234
  return !1;
2235
- let o = t.getRangeAt(0).getBoundingClientRect(), { top: s, bottom: r, left: a, width: l, height: c } = o;
2236
- if (!r && !a) {
2237
- if (!e.selectionEnd)
2238
- return !1;
2239
- let u = ht(e, e.selectionStart), h = ht(e, e.selectionEnd);
2240
- o = e.getBoundingClientRect(), a = o.left + u.left, l = h.left - u.left, u.top != h.top && (a = o.left, l = o.width), s = o.top + u.top, r = o.top + h.top + 20;
2235
+ let i = fr(t), { top: o, bottom: s, left: r, width: a, height: l } = i;
2236
+ if (!s && !r) {
2237
+ if (!e || e.selectionStart == null || e.selectionEnd == null) return !1;
2238
+ let c = gt(e, e.selectionStart), d = gt(e, e.selectionEnd);
2239
+ 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;
2241
2240
  }
2242
- return c === 0 && (c = r - s), {
2241
+ return l === 0 && (l = s - o), {
2243
2242
  text: n,
2244
2243
  // position
2245
- x: a,
2246
- y: s,
2247
- top: s,
2248
- bottom: r,
2249
- left: a,
2250
- right: a + l,
2251
- width: l,
2252
- height: c
2244
+ x: r,
2245
+ y: o,
2246
+ top: o,
2247
+ bottom: s,
2248
+ left: r,
2249
+ right: r + a,
2250
+ width: a,
2251
+ height: l
2253
2252
  };
2254
2253
  }
2255
- function rr() {
2254
+ function ur(e) {
2255
+ var t;
2256
+ return ((t = e == null ? void 0 : e.key) == null ? void 0 : t.toLowerCase()) === "a" && !!(e.ctrlKey || e.metaKey);
2257
+ }
2258
+ function dr(e) {
2259
+ return (e == null ? void 0 : e.key) === "Control" || (e == null ? void 0 : e.key) === "Meta" || (e == null ? void 0 : e.key) === "Shift" || (e == null ? void 0 : e.key) === "Alt";
2260
+ }
2261
+ function fr(e) {
2262
+ if (!e || e.rangeCount === 0)
2263
+ return { top: 0, bottom: 0, left: 0, width: 0, height: 0 };
2264
+ try {
2265
+ return e.getRangeAt(0).getBoundingClientRect();
2266
+ } catch {
2267
+ return { top: 0, bottom: 0, left: 0, width: 0, height: 0 };
2268
+ }
2269
+ }
2270
+ function mr() {
2256
2271
  const e = document.getElementsByTagName("ddict-div");
2257
2272
  for (let t of e)
2258
2273
  if (!t.parentNode.matches('wrapper[dir="rtl"]')) {
@@ -2260,17 +2275,17 @@ function rr() {
2260
2275
  n.setAttribute("dir", "rtl"), t.parentNode.insertBefore(n, t), n.appendChild(t);
2261
2276
  }
2262
2277
  }
2263
- function sr() {
2278
+ function hr() {
2264
2279
  const e = document.querySelectorAll('wrapper[dir="rtl"]');
2265
2280
  for (let t of e) {
2266
2281
  const n = t.querySelector("ddict-div");
2267
2282
  n && (t.parentNode.insertBefore(n, t), t.remove());
2268
2283
  }
2269
2284
  }
2270
- const pt = {
2271
- supportRTL: rr,
2272
- removeRTL: sr
2273
- }, lr = 2, ar = {
2285
+ const vt = {
2286
+ supportRTL: mr,
2287
+ removeRTL: hr
2288
+ }, pr = 2, gr = {
2274
2289
  n: { x: !1, y: !0, fromStartX: !1, fromStartY: !0 },
2275
2290
  s: { x: !1, y: !0, fromStartX: !1, fromStartY: !1 },
2276
2291
  e: { x: !0, y: !1, fromStartX: !1, fromStartY: !1 },
@@ -2280,14 +2295,14 @@ const pt = {
2280
2295
  se: { x: !0, y: !0, fromStartX: !1, fromStartY: !1 },
2281
2296
  sw: { x: !0, y: !0, fromStartX: !0, fromStartY: !1 }
2282
2297
  };
2283
- function cr(e, t, n = lr) {
2298
+ function vr(e, t, n = pr) {
2284
2299
  return Math.abs(e) >= n || Math.abs(t) >= n;
2285
2300
  }
2286
- function Se(e, t, n) {
2301
+ function Ae(e, t, n) {
2287
2302
  const i = n > t ? n : t;
2288
2303
  return Math.min(i, Math.max(t, e));
2289
2304
  }
2290
- function ur({
2305
+ function br({
2291
2306
  x: e,
2292
2307
  y: t,
2293
2308
  width: n,
@@ -2298,41 +2313,41 @@ function ur({
2298
2313
  edge: a,
2299
2314
  minWidth: l,
2300
2315
  minHeight: c,
2301
- viewportWidth: u,
2316
+ viewportWidth: d,
2302
2317
  viewportHeight: h,
2303
2318
  margin: g = 8
2304
2319
  }) {
2305
- const f = ar[a];
2320
+ const f = gr[a];
2306
2321
  if (!f) return { x: e, y: t, width: n, height: i };
2307
- const m = r > 0 ? r : 1, w = e + n * m, y = t + i * m, L = u - g, x = h - g;
2308
- let T = e, A = t, S = n, B = i;
2322
+ const m = r > 0 ? r : 1, w = e + n * m, y = t + i * m, L = d - g, x = h - g;
2323
+ let S = e, A = t, T = n, B = i;
2309
2324
  if (f.x && f.fromStartX) {
2310
- const E = g, D = w - l * m;
2311
- T = Se(e + o, E, D), S = (w - T) / m;
2312
- } else f.x && (S = Se(
2325
+ const E = g, F = w - l * m;
2326
+ S = Ae(e + o, E, F), T = (w - S) / m;
2327
+ } else f.x && (T = Ae(
2313
2328
  n + o / m,
2314
2329
  l,
2315
2330
  Math.max(l, (L - e) / m)
2316
2331
  ));
2317
2332
  if (f.y && f.fromStartY) {
2318
- const E = g, D = y - c * m;
2319
- A = Se(t + s, E, D), B = (y - A) / m;
2320
- } else f.y && (B = Se(
2333
+ const E = g, F = y - c * m;
2334
+ A = Ae(t + s, E, F), B = (y - A) / m;
2335
+ } else f.y && (B = Ae(
2321
2336
  i + s / m,
2322
2337
  c,
2323
2338
  Math.max(c, (x - t) / m)
2324
2339
  ));
2325
2340
  return {
2326
- x: Math.round(T),
2341
+ x: Math.round(S),
2327
2342
  y: Math.round(A),
2328
- width: Math.round(S),
2343
+ width: Math.round(T),
2329
2344
  height: Math.round(B)
2330
2345
  };
2331
2346
  }
2332
- function dr(e) {
2333
- const t = br(e);
2347
+ function Cr(e) {
2348
+ const t = Er(e);
2334
2349
  if (!t) return null;
2335
- if (Cr(t)) {
2350
+ if (Ar(t)) {
2336
2351
  const s = t.selectionStart, r = t.selectionEnd;
2337
2352
  return s == null || r == null || s === r ? null : {
2338
2353
  kind: "value",
@@ -2347,10 +2362,10 @@ function dr(e) {
2347
2362
  const i = n.getRangeAt(0).cloneRange(), o = i.toString();
2348
2363
  return o ? { kind: "range", element: t, range: i, text: o } : null;
2349
2364
  }
2350
- function fr(e, t) {
2351
- return !e || t == null ? !1 : e.kind === "value" ? hr(e, t) : pr(e, t);
2365
+ function wr(e, t) {
2366
+ return !e || t == null ? !1 : e.kind === "value" ? xr(e, t) : Lr(e, t);
2352
2367
  }
2353
- async function mr(e) {
2368
+ async function yr(e) {
2354
2369
  var t;
2355
2370
  if (!e) return !1;
2356
2371
  try {
@@ -2358,32 +2373,32 @@ async function mr(e) {
2358
2373
  return await navigator.clipboard.writeText(e), !0;
2359
2374
  } catch {
2360
2375
  }
2361
- return vr(e);
2376
+ return Tr(e);
2362
2377
  }
2363
- function hr(e, t) {
2378
+ function xr(e, t) {
2364
2379
  const n = e.element;
2365
2380
  if (!n || n.value.slice(e.start, e.end) !== e.text) return !1;
2366
2381
  const i = n.value.slice(0, e.start) + t + n.value.slice(e.end);
2367
- gr(n, i);
2382
+ Sr(n, i);
2368
2383
  const o = e.start + t.length;
2369
- return n.focus(), n.setSelectionRange(o, o), kt(n), !0;
2384
+ return n.focus(), n.setSelectionRange(o, o), It(n), !0;
2370
2385
  }
2371
- function pr(e, t) {
2386
+ function Lr(e, t) {
2372
2387
  const n = e.range;
2373
2388
  if (!n || n.toString() !== e.text) return !1;
2374
2389
  n.deleteContents();
2375
2390
  const i = n.startContainer.ownerDocument.createTextNode(t);
2376
- return n.insertNode(i), n.setStartAfter(i), n.collapse(!0), kt(e.element), !0;
2391
+ return n.insertNode(i), n.setStartAfter(i), n.collapse(!0), It(e.element), !0;
2377
2392
  }
2378
- function gr(e, t) {
2393
+ function Sr(e, t) {
2379
2394
  var i;
2380
2395
  const n = (i = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e), "value")) == null ? void 0 : i.set;
2381
2396
  n ? n.call(e, t) : e.value = t;
2382
2397
  }
2383
- function kt(e) {
2398
+ function It(e) {
2384
2399
  e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
2385
2400
  }
2386
- function vr(e) {
2401
+ function Tr(e) {
2387
2402
  const t = document.createElement("textarea");
2388
2403
  t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.left = "-9999px", document.body.appendChild(t), t.select();
2389
2404
  let n = !1;
@@ -2394,13 +2409,13 @@ function vr(e) {
2394
2409
  }
2395
2410
  return t.remove(), n;
2396
2411
  }
2397
- function br(e) {
2412
+ function Er(e) {
2398
2413
  return e ? e.nodeType === 3 ? e.parentElement : e : null;
2399
2414
  }
2400
- function Cr(e) {
2415
+ function Ar(e) {
2401
2416
  return e.tagName === "TEXTAREA" || e.tagName === "INPUT";
2402
2417
  }
2403
- const wr = {
2418
+ const $r = {
2404
2419
  __name: "HotKeysListener",
2405
2420
  props: {
2406
2421
  textSelected: String
@@ -2431,13 +2446,13 @@ const wr = {
2431
2446
  break;
2432
2447
  }
2433
2448
  };
2434
- return gt(() => {
2449
+ return bt(() => {
2435
2450
  window.addEventListener("dblclick", o), window.addEventListener("keydown", s), window.addEventListener("keyup", r);
2436
- }), qe(() => {
2451
+ }), Ke(() => {
2437
2452
  window.removeEventListener("dblclick", o), window.removeEventListener("keydown", s), window.removeEventListener("keyup", r);
2438
2453
  }), (l, c) => (p(), v("div"));
2439
2454
  }
2440
- }, yr = ["data-theme"], Lr = {
2455
+ }, kr = ["data-theme"], Ir = {
2441
2456
  __name: "BubbleWrapper",
2442
2457
  props: {
2443
2458
  translation: Object,
@@ -2474,7 +2489,7 @@ const wr = {
2474
2489
  },
2475
2490
  writeAction: {
2476
2491
  type: String,
2477
- default: Ee
2492
+ default: $e
2478
2493
  },
2479
2494
  isWriteLoading: {
2480
2495
  type: Boolean,
@@ -2497,160 +2512,173 @@ const wr = {
2497
2512
  "copy"
2498
2513
  ],
2499
2514
  setup(e, { emit: t }) {
2500
- const n = e, i = t, o = k(null), s = k(null), r = k(null), a = k(!1), l = k(""), c = k(!1), u = k(n.writeAction || Ee);
2515
+ const n = e, i = t, o = R(null), s = R(null), r = R(null), a = R(!1), l = R(""), c = R(!1), d = R(n.writeAction || $e);
2501
2516
  let h = null;
2502
- Q(
2517
+ te(
2503
2518
  () => n.writeAction,
2504
- (d, b) => {
2505
- d && d !== b && (u.value = d);
2519
+ (u, b) => {
2520
+ u && u !== b && (d.value = u);
2506
2521
  }
2507
2522
  );
2508
- 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);
2509
- let A = !1, S = 0, B = !1, E = "", D = "";
2510
- const Z = R(() => typeof window > "u" || !r.value || !l.value ? null : {
2511
- getBoundingClientRect: () => ce(r.value),
2512
- getClientRects: () => ce(r.value)
2513
- }), { floatingStyles: J, update: he } = An(Z, o, {
2523
+ const g = R(n.theme), f = R(!1), m = R(!1), w = R({ x: 0, y: 0 }), y = R(null), L = R(null), x = R(null), S = R(!1);
2524
+ let A = !1, T = 0, B = !1, E = "", F = "";
2525
+ const U = I(() => typeof window > "u" || !r.value || !l.value ? null : {
2526
+ getBoundingClientRect: () => ee(r.value),
2527
+ getClientRects: () => ee(r.value)
2528
+ }), { floatingStyles: Q, update: he } = Bn(U, o, {
2514
2529
  placement: "bottom",
2515
- middleware: [xn(4), Tn(), Ln()],
2516
- whileElementsMounted(d, b, I) {
2517
- return yn(d, b, I, {
2530
+ middleware: [An(4), kn(), $n()],
2531
+ whileElementsMounted(u, b, $) {
2532
+ return En(u, b, $, {
2518
2533
  ancestorScroll: !0,
2519
2534
  elementResize: !1
2520
2535
  });
2521
2536
  }
2522
- }), pe = R(
2523
- () => n.status === te.DATA || n.status === te.ERROR
2524
- ), z = R(() => {
2525
- var d, b;
2537
+ }), pe = I(
2538
+ () => n.status === X.DATA || n.status === X.ERROR
2539
+ ), V = I(() => {
2540
+ var u, b;
2526
2541
  return pe.value ? {
2527
- width: ((d = L.value) == null ? void 0 : d.width) ?? Zo,
2528
- height: ((b = L.value) == null ? void 0 : b.height) ?? jo
2542
+ width: ((u = L.value) == null ? void 0 : u.width) ?? Ko,
2543
+ height: ((b = L.value) == null ? void 0 : b.height) ?? Go
2529
2544
  } : null;
2530
- }), j = R(() => {
2531
- let d = J.value;
2545
+ }), Z = I(() => {
2546
+ let u = Q.value;
2532
2547
  if (y.value)
2533
- d = {
2534
- ...d,
2548
+ u = {
2549
+ ...u,
2535
2550
  position: "fixed",
2536
2551
  left: `${y.value.x}px`,
2537
2552
  top: `${y.value.y}px`,
2538
2553
  transform: "none"
2539
2554
  };
2540
- else if (T.value && r.value && l.value) {
2541
- const b = ce(r.value);
2542
- b && (d = {
2543
- ...d,
2555
+ else if (S.value && r.value && l.value) {
2556
+ const b = ee(r.value);
2557
+ b && (u = {
2558
+ ...u,
2544
2559
  position: "fixed",
2545
2560
  left: `${b.x}px`,
2546
2561
  top: `${b.y + b.height + 4}px`,
2547
2562
  transform: "none"
2548
2563
  });
2549
2564
  }
2550
- return d = {
2551
- ...d,
2565
+ return u = {
2566
+ ...u,
2552
2567
  zIndex: 9999
2553
- }, z.value && (d = {
2554
- ...d,
2555
- width: `${z.value.width}px`,
2556
- height: `${z.value.height}px`,
2557
- maxWidth: `${z.value.width}px`,
2568
+ }, V.value && (u = {
2569
+ ...u,
2570
+ width: `${V.value.width}px`,
2571
+ height: `${V.value.height}px`,
2572
+ maxWidth: `${V.value.width}px`,
2558
2573
  boxSizing: "border-box"
2559
- }), d;
2560
- }), ye = R(() => {
2561
- const d = {
2574
+ }), u;
2575
+ }), Le = I(() => {
2576
+ const u = {
2562
2577
  transform: n.scale !== 1 ? `scale(${n.scale})` : "none",
2563
2578
  transformOrigin: "top left"
2564
2579
  };
2565
- return z.value && (d.width = `${z.value.width}px`, d.height = `${z.value.height}px`, d.boxSizing = "border-box"), d;
2580
+ return V.value && (u.width = `${V.value.width}px`, u.height = `${V.value.height}px`, u.boxSizing = "border-box"), u;
2566
2581
  });
2567
- gt(() => {
2568
- document.addEventListener("keyup", (d) => {
2569
- if (!ce(d.target)) {
2570
- P();
2571
- return;
2572
- }
2573
- }), document.documentElement.onclick = (d) => {
2574
- if (tt()) return;
2575
- const b = ce(d.target);
2582
+ bt(() => {
2583
+ document.addEventListener("keyup", q), document.addEventListener("select", _), document.addEventListener("selectionchange", z), document.documentElement.onclick = (u) => {
2584
+ if (it()) return;
2585
+ const b = ee(u.target);
2576
2586
  if (!b) {
2577
- P();
2587
+ _e();
2578
2588
  return;
2579
2589
  }
2580
- q(b, d);
2581
- }, document.documentElement.ontouchend = (d) => {
2582
- if (tt()) return;
2583
- const b = ce(d.target);
2590
+ We(b, u);
2591
+ }, document.documentElement.ontouchend = (u) => {
2592
+ if (it()) return;
2593
+ const b = ee(u.target);
2584
2594
  if (!b) {
2585
- P();
2595
+ _e();
2586
2596
  return;
2587
2597
  }
2588
- q(b, d);
2598
+ We(b, u);
2589
2599
  };
2590
- }), qe(() => {
2591
- 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();
2600
+ }), Ke(() => {
2601
+ document.removeEventListener("keyup", q), document.removeEventListener("select", _), document.removeEventListener("selectionchange", z), cancelAnimationFrame(j), document.documentElement.onclick = null, document.documentElement.ontouchend = null, clearTimeout(T), document.removeEventListener("mousemove", ze), document.removeEventListener("mouseup", Ve), document.removeEventListener("touchmove", Pe), document.removeEventListener("touchend", Ne), Ue();
2592
2602
  });
2593
- const q = (d, b) => {
2594
- n.status !== te.LOGO && i("close"), a.value && !T.value && (T.value = !0), r.value = b.target, c.value = Ao(b.target), h = c.value ? dr(b.target) : null, l.value = d.text, a.value = !0, it(he);
2595
- }, P = () => {
2596
- l.value = "", c.value = !1, h = null, Fe();
2597
- }, V = (d) => {
2598
- mr(d), i("copy", d);
2599
- }, N = (d) => {
2600
- fr(h, d == null ? void 0 : d.result) && (l.value = d.result, h = null), i("replace", d);
2601
- }, De = (d) => {
2602
- d != null && d.action && (u.value = d.action), i("write", d);
2603
- }, Rt = (d) => {
2604
- if ($t(c.value, l.value)) {
2603
+ let j = 0;
2604
+ const q = (u) => {
2605
+ if (!dr(u)) {
2606
+ if (ur(u)) {
2607
+ ge();
2608
+ return;
2609
+ }
2610
+ ee(u.target) || _e();
2611
+ }
2612
+ }, _ = (u) => {
2613
+ ge(u.target);
2614
+ }, z = () => {
2615
+ n.status === X.DATA || n.status === X.LOADING || ge();
2616
+ }, ge = (u) => {
2617
+ cancelAnimationFrame(j), j = requestAnimationFrame(() => {
2618
+ const b = u || document.activeElement, $ = ee(b);
2619
+ $ && (a.value && l.value === $.text || We($, { target: b }));
2620
+ });
2621
+ }, We = (u, b) => {
2622
+ n.status !== X.LOGO && i("close"), a.value && !S.value && (S.value = !0), r.value = b.target, c.value = Bo(b.target), h = c.value ? Cr(b.target) : null, l.value = u.text, a.value = !0, rt(he);
2623
+ }, _e = () => {
2624
+ l.value = "", c.value = !1, h = null, ve();
2625
+ }, Bt = (u) => {
2626
+ yr(u), i("copy", u), ve();
2627
+ }, Mt = (u) => {
2628
+ wr(h, u == null ? void 0 : u.result), h = null, i("replace", u), ve();
2629
+ }, Ot = (u) => {
2630
+ u != null && u.action && (d.value = u.action), i("write", u);
2631
+ }, Ft = (u) => {
2632
+ if (Rt(c.value, l.value)) {
2605
2633
  i("write", {
2606
2634
  text: l.value,
2607
- action: u.value || Ee
2635
+ action: d.value || $e
2608
2636
  });
2609
2637
  return;
2610
2638
  }
2611
- i("toggleKey", d);
2612
- }, It = (d) => {
2613
- d.stopPropagation();
2614
- }, Fe = async () => {
2615
- Ne(), a.value = !1, y.value = null, T.value = !1, i("close");
2616
- }, Bt = (d) => {
2617
- g.value = d, i("themeChange", d);
2618
- }, Mt = ({ type: d, event: b }) => {
2639
+ i("toggleKey", u);
2640
+ }, Dt = (u) => {
2641
+ u.stopPropagation();
2642
+ }, ve = async () => {
2643
+ Ue(), a.value = !1, y.value = null, S.value = !1, i("close");
2644
+ }, Wt = (u) => {
2645
+ g.value = u, i("themeChange", u);
2646
+ }, _t = ({ type: u, event: b }) => {
2619
2647
  f.value = !0;
2620
- const I = o.value.getBoundingClientRect();
2621
- if (d === "mouse")
2648
+ const $ = o.value.getBoundingClientRect();
2649
+ if (u === "mouse")
2622
2650
  w.value = {
2623
- x: b.clientX - I.left,
2624
- y: b.clientY - I.top
2625
- }, document.addEventListener("mousemove", We), document.addEventListener("mouseup", ze);
2626
- else if (d === "touch") {
2627
- const le = b.touches[0];
2651
+ x: b.clientX - $.left,
2652
+ y: b.clientY - $.top
2653
+ }, document.addEventListener("mousemove", ze), document.addEventListener("mouseup", Ve);
2654
+ else if (u === "touch") {
2655
+ const ae = b.touches[0];
2628
2656
  w.value = {
2629
- x: le.clientX - I.left,
2630
- y: le.clientY - I.top
2631
- }, document.addEventListener("touchmove", _e), document.addEventListener("touchend", Pe);
2657
+ x: ae.clientX - $.left,
2658
+ y: ae.clientY - $.top
2659
+ }, document.addEventListener("touchmove", Pe), document.addEventListener("touchend", Ne);
2632
2660
  }
2633
- }, We = (d) => {
2661
+ }, ze = (u) => {
2634
2662
  f.value && (y.value = {
2635
- x: d.clientX - w.value.x,
2636
- y: d.clientY - w.value.y
2663
+ x: u.clientX - w.value.x,
2664
+ y: u.clientY - w.value.y
2637
2665
  });
2638
- }, _e = (d) => {
2666
+ }, Pe = (u) => {
2639
2667
  if (!f.value) return;
2640
- const b = d.touches[0];
2668
+ const b = u.touches[0];
2641
2669
  y.value = {
2642
2670
  x: b.clientX - w.value.x,
2643
2671
  y: b.clientY - w.value.y
2644
2672
  };
2645
- }, ze = () => {
2646
- f.value && Ve(), f.value = !1, document.removeEventListener("mousemove", We), document.removeEventListener("mouseup", ze);
2647
- }, Pe = () => {
2648
- f.value && Ve(), f.value = !1, document.removeEventListener("touchmove", _e), document.removeEventListener("touchend", Pe);
2649
- }, tt = () => f.value || m.value ? !0 : A ? (A = !1, clearTimeout(S), !0) : !1, Ve = () => {
2650
- A = !0, clearTimeout(S), S = window.setTimeout(() => {
2673
+ }, Ve = () => {
2674
+ f.value && He(), f.value = !1, document.removeEventListener("mousemove", ze), document.removeEventListener("mouseup", Ve);
2675
+ }, Ne = () => {
2676
+ f.value && He(), f.value = !1, document.removeEventListener("touchmove", Pe), document.removeEventListener("touchend", Ne);
2677
+ }, it = () => f.value || m.value ? !0 : A ? (A = !1, clearTimeout(T), !0) : !1, He = () => {
2678
+ A = !0, clearTimeout(T), T = window.setTimeout(() => {
2651
2679
  A = !1;
2652
2680
  }, 50);
2653
- }, Ot = {
2681
+ }, zt = {
2654
2682
  n: "ns-resize",
2655
2683
  s: "ns-resize",
2656
2684
  e: "ew-resize",
@@ -2659,81 +2687,81 @@ const wr = {
2659
2687
  sw: "nesw-resize",
2660
2688
  nw: "nwse-resize",
2661
2689
  se: "nwse-resize"
2662
- }, Dt = (d) => {
2663
- !document.body || B || (E = document.body.style.cursor, D = document.body.style.userSelect, document.body.style.cursor = Ot[d] || "nwse-resize", document.body.style.userSelect = "none", B = !0);
2664
- }, Ft = () => {
2665
- !document.body || !B || (document.body.style.cursor = E, document.body.style.userSelect = D, B = !1);
2666
- }, Wt = ({ edge: d, event: b }) => {
2690
+ }, Pt = (u) => {
2691
+ !document.body || B || (E = document.body.style.cursor, F = document.body.style.userSelect, document.body.style.cursor = zt[u] || "nwse-resize", document.body.style.userSelect = "none", B = !0);
2692
+ }, Vt = () => {
2693
+ !document.body || !B || (document.body.style.cursor = E, document.body.style.userSelect = F, B = !1);
2694
+ }, Nt = ({ edge: u, event: b }) => {
2667
2695
  if (!s.value || !o.value || !s.value.offsetWidth || !s.value.offsetHeight) return;
2668
- const I = o.value.getBoundingClientRect();
2696
+ const $ = o.value.getBoundingClientRect();
2669
2697
  m.value = !0, x.value = {
2670
2698
  pointerX: b.clientX,
2671
2699
  pointerY: b.clientY,
2672
- left: I.left,
2673
- top: I.top,
2700
+ left: $.left,
2701
+ top: $.top,
2674
2702
  width: s.value.offsetWidth,
2675
2703
  height: s.value.offsetHeight,
2676
- edge: d,
2704
+ edge: u,
2677
2705
  moved: !1
2678
- }, Dt(d), document.addEventListener("pointermove", nt), document.addEventListener("pointerup", xe), document.addEventListener("pointercancel", xe);
2679
- }, _t = (d, b) => {
2706
+ }, Pt(u), document.addEventListener("pointermove", ot), document.addEventListener("pointerup", Se), document.addEventListener("pointercancel", Se);
2707
+ }, Ht = (u, b) => {
2680
2708
  if (!m.value || !x.value || !o.value) return;
2681
- const I = d - x.value.pointerX, le = b - x.value.pointerY;
2682
- if (!x.value.moved && !cr(I, le)) return;
2709
+ const $ = u - x.value.pointerX, ae = b - x.value.pointerY;
2710
+ if (!x.value.moved && !vr($, ae)) return;
2683
2711
  x.value.moved = !0;
2684
- const Le = ur({
2712
+ const Te = br({
2685
2713
  x: x.value.left,
2686
2714
  y: x.value.top,
2687
2715
  width: x.value.width,
2688
2716
  height: x.value.height,
2689
- dx: I,
2690
- dy: le,
2717
+ dx: $,
2718
+ dy: ae,
2691
2719
  scale: n.scale,
2692
2720
  edge: x.value.edge,
2693
- minWidth: Xo,
2694
- minHeight: qo,
2721
+ minWidth: Jo,
2722
+ minHeight: Qo,
2695
2723
  viewportWidth: window.innerWidth,
2696
2724
  viewportHeight: window.innerHeight,
2697
- margin: Yo
2725
+ margin: er
2698
2726
  });
2699
- y.value = { x: Le.x, y: Le.y }, L.value = { width: Le.width, height: Le.height };
2700
- }, nt = (d) => {
2701
- d.cancelable && d.preventDefault(), _t(d.clientX, d.clientY);
2702
- }, xe = () => {
2703
- Ne();
2704
- }, Ne = () => {
2705
- m.value && Ve(), m.value = !1, x.value = null, Ft(), document.removeEventListener("pointermove", nt), document.removeEventListener("pointerup", xe), document.removeEventListener("pointercancel", xe);
2706
- }, zt = () => {
2727
+ y.value = { x: Te.x, y: Te.y }, L.value = { width: Te.width, height: Te.height };
2728
+ }, ot = (u) => {
2729
+ u.cancelable && u.preventDefault(), Ht(u.clientX, u.clientY);
2730
+ }, Se = () => {
2731
+ Ue();
2732
+ }, Ue = () => {
2733
+ m.value && He(), m.value = !1, x.value = null, Vt(), document.removeEventListener("pointermove", ot), document.removeEventListener("pointerup", Se), document.removeEventListener("pointercancel", Se);
2734
+ }, Ut = () => {
2707
2735
  var b;
2708
- const d = (b = n == null ? void 0 : n.translation) == null ? void 0 : b.target;
2709
- Go.includes(d) ? pt.supportRTL() : pt.removeRTL();
2736
+ const u = (b = n == null ? void 0 : n.translation) == null ? void 0 : b.target;
2737
+ tr.includes(u) ? vt.supportRTL() : vt.removeRTL();
2710
2738
  };
2711
- return Q(
2739
+ return te(
2712
2740
  () => n.status,
2713
2741
  () => {
2714
- a.value && it(he), zt();
2742
+ a.value && rt(he), Ut();
2715
2743
  }
2716
- ), Q(
2744
+ ), te(
2717
2745
  () => n.theme,
2718
- (d) => {
2719
- g.value = d;
2746
+ (u) => {
2747
+ g.value = u;
2720
2748
  }
2721
- ), (d, b) => (p(), v(K, null, [
2749
+ ), (u, b) => (p(), v(J, null, [
2722
2750
  a.value ? (p(), v("div", {
2723
2751
  key: 0,
2724
2752
  ref_key: "floatingEl",
2725
2753
  ref: o,
2726
- style: Ze(j.value),
2727
- onClick: It
2754
+ style: qe(Z.value),
2755
+ onClick: Dt
2728
2756
  }, [
2729
2757
  C("div", {
2730
2758
  ref_key: "contentEl",
2731
2759
  ref: s,
2732
2760
  class: "relative rounded-lg",
2733
- style: Ze(ye.value),
2761
+ style: qe(Le.value),
2734
2762
  "data-theme": g.value
2735
2763
  }, [
2736
- O(tr, {
2764
+ O(sr, {
2737
2765
  translation: n.translation,
2738
2766
  explanation: n.explanation,
2739
2767
  tts: n.tts,
@@ -2748,35 +2776,35 @@ const wr = {
2748
2776
  constrained: pe.value,
2749
2777
  mode: n.mode,
2750
2778
  writing: n.writing,
2751
- writeAction: u.value,
2779
+ writeAction: d.value,
2752
2780
  isWriteLoading: n.isWriteLoading,
2753
2781
  editable: c.value,
2754
2782
  selectedText: l.value,
2755
- onLogo: b[0] || (b[0] = (I) => i("logo")),
2756
- onWrite: De,
2757
- onReplace: N,
2758
- onCopy: V,
2759
- onFavorite: b[1] || (b[1] = (I) => i("favorite")),
2760
- onSettings: b[2] || (b[2] = (I) => i("settings")),
2761
- onClose: Fe,
2762
- onLoadTTS: b[3] || (b[3] = (I) => i("loadTTS")),
2763
- onAiTranslate: b[4] || (b[4] = (I) => i("aiTranslate")),
2764
- onAiExplain: b[5] || (b[5] = (I) => i("aiExplain")),
2765
- onLearn: b[6] || (b[6] = (I) => i("learn", I)),
2766
- onThemeChange: Bt,
2767
- onDragStart: Mt,
2768
- onResizeStart: Wt
2783
+ onLogo: b[0] || (b[0] = ($) => i("logo")),
2784
+ onWrite: Ot,
2785
+ onReplace: Mt,
2786
+ onCopy: Bt,
2787
+ onFavorite: b[1] || (b[1] = ($) => i("favorite")),
2788
+ onSettings: b[2] || (b[2] = ($) => i("settings")),
2789
+ onClose: ve,
2790
+ onLoadTTS: b[3] || (b[3] = ($) => i("loadTTS")),
2791
+ onAiTranslate: b[4] || (b[4] = ($) => i("aiTranslate")),
2792
+ onAiExplain: b[5] || (b[5] = ($) => i("aiExplain")),
2793
+ onLearn: b[6] || (b[6] = ($) => i("learn", $)),
2794
+ onThemeChange: Wt,
2795
+ onDragStart: _t,
2796
+ onResizeStart: Nt
2769
2797
  }, null, 8, ["translation", "explanation", "tts", "status", "isFavorite", "isFavoriteFeatureEnabled", "isAITranslate", "isAIExplain", "aiExplainMinLength", "theme", "showThemeSelector", "constrained", "mode", "writing", "writeAction", "isWriteLoading", "editable", "selectedText"])
2770
- ], 12, yr)
2798
+ ], 12, kr)
2771
2799
  ], 4)) : M("", !0),
2772
- O(wr, {
2800
+ O($r, {
2773
2801
  textSelected: l.value,
2774
- onToggleKey: Rt,
2775
- onClose: Fe
2802
+ onToggleKey: Ft,
2803
+ onClose: ve
2776
2804
  }, null, 8, ["textSelected"])
2777
2805
  ], 64));
2778
2806
  }
2779
2807
  };
2780
2808
  export {
2781
- Lr as default
2809
+ Ir as default
2782
2810
  };