@ddict/popup 1.6.4 → 1.6.5

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/popup.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createElementBlock as g, openBlock as h, createElementVNode as f, Fragment as z, renderList as Y, normalizeClass as P, createTextVNode as Ee, normalizeStyle as Zn, toDisplayString as G, createStaticVNode as Be, createCommentVNode as R, createBlock as W, computed as L, unref as M, shallowRef as Un, watch as F, triggerRef as Dt, onScopeDispose as Tt, ref as O, onUnmounted as Fe, inject as le, watchEffect as fe, onMounted as se, cloneVNode as sn, h as Ve, defineComponent as pe, provide as ce, nextTick as X, toRaw as ne, reactive as an, hasInjectionContext as Wn, getCurrentInstance as rn, markRaw as be, effectScope as un, isRef as $e, isReactive as St, toRef as it, getCurrentScope as cn, toRefs as Rt, mergeModels as qn, useModel as Gn, withCtx as ze, createVNode as B, withModifiers as ft, withDirectives as tt, vModelText as nt, pushScopeId as Et, popScopeId as $t, withKeys as Jn } from "vue";
1
+ import { createElementBlock as C, openBlock as h, createElementVNode as f, Fragment as z, renderList as Y, normalizeClass as P, createTextVNode as Ee, normalizeStyle as Zn, toDisplayString as G, createStaticVNode as Be, createCommentVNode as R, createBlock as W, computed as L, unref as k, shallowRef as Un, watch as F, triggerRef as Dt, onScopeDispose as Tt, ref as $, onUnmounted as Fe, inject as le, watchEffect as fe, onMounted as se, cloneVNode as sn, h as Ve, defineComponent as pe, provide as ce, nextTick as X, toRaw as ne, reactive as an, hasInjectionContext as Wn, getCurrentInstance as rn, markRaw as be, effectScope as un, isRef as $e, isReactive as St, toRef as it, getCurrentScope as cn, toRefs as Rt, mergeModels as qn, useModel as Gn, withCtx as ze, createVNode as B, withModifiers as ft, withDirectives as tt, vModelText as nt, pushScopeId as Et, popScopeId as $t, withKeys as Jn } from "vue";
2
2
  const vt = navigator.userAgent.match(
3
3
  /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
4
4
  ), Ze = {
@@ -56,10 +56,10 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
56
56
  ], l = (s) => {
57
57
  t("themeChange", s);
58
58
  };
59
- return (s, r) => (h(), g("div", Kn, [
59
+ return (s, r) => (h(), C("div", Kn, [
60
60
  eo,
61
61
  f("ul", to, [
62
- (h(), g(z, null, Y(o, (a) => f("li", {
62
+ (h(), C(z, null, Y(o, (a) => f("li", {
63
63
  key: a.value
64
64
  }, [
65
65
  f("input", {
@@ -207,10 +207,10 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
207
207
  const t = n, o = (l) => {
208
208
  t("themeChange", l);
209
209
  };
210
- return (l, s) => (h(), g("div", ao, [
210
+ return (l, s) => (h(), C("div", ao, [
211
211
  f("div", ro, [
212
212
  io,
213
- e.isPremium ? (h(), g("span", uo, "Premium")) : R("", !0)
213
+ e.isPremium ? (h(), C("span", uo, "Premium")) : R("", !0)
214
214
  ]),
215
215
  f("div", co, [
216
216
  e.headerSettings.showThemeSelector ? (h(), W(so, {
@@ -218,7 +218,7 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
218
218
  "current-theme": e.currentTheme,
219
219
  onThemeChange: o
220
220
  }, null, 8, ["current-theme"])) : R("", !0),
221
- e.headerSettings.showReader ? (h(), g("button", {
221
+ e.headerSettings.showReader ? (h(), C("button", {
222
222
  key: 1,
223
223
  class: "btn btn-ghost btn-circle btn-sm",
224
224
  onClick: s[0] || (s[0] = (r) => t("reader"))
@@ -228,19 +228,19 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
228
228
  onClick: s[1] || (s[1] = (r) => t("learn"))
229
229
  }, [
230
230
  po,
231
- e.headerSettings.showLearn > 0 ? (h(), g("span", ho, G(e.headerSettings.showLearn > 999 ? "999+" : e.headerSettings.showLearn), 1)) : R("", !0)
231
+ e.headerSettings.showLearn > 0 ? (h(), C("span", ho, G(e.headerSettings.showLearn > 999 ? "999+" : e.headerSettings.showLearn), 1)) : R("", !0)
232
232
  ]),
233
- e.headerSettings.showAccount ? (h(), g("button", {
233
+ e.headerSettings.showAccount ? (h(), C("button", {
234
234
  key: 2,
235
235
  class: "btn btn-ghost btn-circle btn-sm",
236
236
  onClick: s[2] || (s[2] = (r) => t("account"))
237
237
  }, go)) : R("", !0),
238
- e.headerSettings.showSettings ? (h(), g("button", {
238
+ e.headerSettings.showSettings ? (h(), C("button", {
239
239
  key: 3,
240
240
  class: "btn btn-ghost btn-circle btn-sm",
241
241
  onClick: s[3] || (s[3] = (r) => t("settings"))
242
242
  }, Co)) : R("", !0),
243
- e.headerSettings.showFullscreen ? (h(), g("button", {
243
+ e.headerSettings.showFullscreen ? (h(), C("button", {
244
244
  key: 4,
245
245
  class: "btn btn-ghost btn-circle btn-sm",
246
246
  onClick: s[4] || (s[4] = (r) => t("fullScreen"))
@@ -249,31 +249,31 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
249
249
  ]));
250
250
  }
251
251
  };
252
- function Le(e, n, t) {
252
+ function Ie(e, n, t) {
253
253
  let o = t.initialDeps ?? [], l;
254
254
  return () => {
255
255
  var s, r, a, i;
256
256
  let u;
257
257
  t.key && ((s = t.debug) != null && s.call(t)) && (u = Date.now());
258
258
  const c = e();
259
- if (!(c.length !== o.length || c.some((m, C) => o[C] !== m)))
259
+ if (!(c.length !== o.length || c.some((m, y) => o[y] !== m)))
260
260
  return l;
261
261
  o = c;
262
- let x;
263
- if (t.key && ((r = t.debug) != null && r.call(t)) && (x = Date.now()), l = n(...c), t.key && ((a = t.debug) != null && a.call(t))) {
264
- const m = Math.round((Date.now() - u) * 100) / 100, C = Math.round((Date.now() - x) * 100) / 100, b = C / 16, I = ($, w) => {
265
- for ($ = String($); $.length < w; )
266
- $ = " " + $;
267
- return $;
262
+ let w;
263
+ if (t.key && ((r = t.debug) != null && r.call(t)) && (w = Date.now()), l = n(...c), t.key && ((a = t.debug) != null && a.call(t))) {
264
+ const m = Math.round((Date.now() - u) * 100) / 100, y = Math.round((Date.now() - w) * 100) / 100, x = y / 16, O = (D, b) => {
265
+ for (D = String(D); D.length < b; )
266
+ D = " " + D;
267
+ return D;
268
268
  };
269
269
  console.info(
270
- `%c⏱ ${I(C, 5)} /${I(m, 5)} ms`,
270
+ `%c⏱ ${O(y, 5)} /${O(m, 5)} ms`,
271
271
  `
272
272
  font-size: .6rem;
273
273
  font-weight: bold;
274
274
  color: hsl(${Math.max(
275
275
  0,
276
- Math.min(120 - 120 * b, 120)
276
+ Math.min(120 - 120 * x, 120)
277
277
  )}deg 100% 31%);`,
278
278
  t == null ? void 0 : t.key
279
279
  );
@@ -326,7 +326,7 @@ const _o = (e, n) => Math.abs(e - n) < 1, To = (e, n, t) => {
326
326
  };
327
327
  }, Pt = {
328
328
  passive: !0
329
- }, Oo = typeof window > "u" ? !0 : "onscrollend" in window, Io = (e, n) => {
329
+ }, Oo = typeof window > "u" ? !0 : "onscrollend" in window, Lo = (e, n) => {
330
330
  const t = e.scrollElement;
331
331
  if (!t)
332
332
  return;
@@ -347,7 +347,7 @@ const _o = (e, n) => Math.abs(e - n) < 1, To = (e, n, t) => {
347
347
  return i(), t.addEventListener("scroll", a, Pt), t.addEventListener("scrollend", i, Pt), () => {
348
348
  t.removeEventListener("scroll", a), t.removeEventListener("scrollend", i);
349
349
  };
350
- }, Lo = (e, n, t) => {
350
+ }, Io = (e, n, t) => {
351
351
  if (n != null && n.borderBoxSize) {
352
352
  const o = n.borderBoxSize[0];
353
353
  if (o)
@@ -408,7 +408,7 @@ class Mo {
408
408
  rangeExtractor: Eo,
409
409
  onChange: () => {
410
410
  },
411
- measureElement: Lo,
411
+ measureElement: Io,
412
412
  initialRect: { width: 0, height: 0 },
413
413
  scrollMargin: 0,
414
414
  gap: 0,
@@ -466,7 +466,7 @@ class Mo {
466
466
  break;
467
467
  }
468
468
  return s.size === this.options.lanes ? Array.from(s.values()).sort((r, a) => r.end === a.end ? r.index - a.index : r.end - a.end)[0] : void 0;
469
- }, this.getMeasurementOptions = Le(
469
+ }, this.getMeasurementOptions = Ie(
470
470
  () => [
471
471
  this.options.count,
472
472
  this.options.paddingStart,
@@ -484,7 +484,7 @@ class Mo {
484
484
  {
485
485
  key: !1
486
486
  }
487
- ), this.getMeasurements = Le(
487
+ ), this.getMeasurements = Ie(
488
488
  () => [this.getMeasurementOptions(), this.itemSizeCache],
489
489
  ({ count: t, paddingStart: o, scrollMargin: l, getItemKey: s, enabled: r }, a) => {
490
490
  var i;
@@ -497,27 +497,27 @@ class Mo {
497
497
  this.pendingMeasuredCacheIndexes = [];
498
498
  const c = this.measurementsCache.slice(0, u);
499
499
  for (let d = u; d < t; d++) {
500
- let x = (i = this.measurementsCache[d]) == null ? void 0 : i.measureElement;
501
- x || (x = (_) => {
502
- const T = s(d), V = this.elementsCache.get(T);
500
+ let w = (i = this.measurementsCache[d]) == null ? void 0 : i.measureElement;
501
+ w || (w = (_) => {
502
+ const T = s(d), A = this.elementsCache.get(T);
503
503
  if (!_) {
504
- V && (this.observer.unobserve(V), this.elementsCache.delete(T));
504
+ A && (this.observer.unobserve(A), this.elementsCache.delete(T));
505
505
  return;
506
506
  }
507
- V !== _ && (V && this.observer.unobserve(V), this.observer.observe(_), this.elementsCache.set(T, _)), _.isConnected && this.resizeItem(
507
+ A !== _ && (A && this.observer.unobserve(A), this.observer.observe(_), this.elementsCache.set(T, _)), _.isConnected && this.resizeItem(
508
508
  d,
509
509
  this.options.measureElement(_, void 0, this)
510
510
  );
511
511
  });
512
- const m = s(d), C = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d), b = C ? C.end + this.options.gap : o + l, I = a.get(m), $ = typeof I == "number" ? I : this.options.estimateSize(d), w = b + $, y = C ? C.lane : d % this.options.lanes;
512
+ const m = s(d), y = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d), x = y ? y.end + this.options.gap : o + l, O = a.get(m), D = typeof O == "number" ? O : this.options.estimateSize(d), b = x + D, g = y ? y.lane : d % this.options.lanes;
513
513
  c[d] = {
514
514
  index: d,
515
- start: b,
516
- size: $,
517
- end: w,
515
+ start: x,
516
+ size: D,
517
+ end: b,
518
518
  key: m,
519
- lane: y,
520
- measureElement: x
519
+ lane: g,
520
+ measureElement: w
521
521
  };
522
522
  }
523
523
  return this.measurementsCache = c, c;
@@ -526,7 +526,7 @@ class Mo {
526
526
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
527
527
  debug: () => this.options.debug
528
528
  }
529
- ), this.calculateRange = Le(
529
+ ), this.calculateRange = Ie(
530
530
  () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
531
531
  (t, o, l) => this.range = t.length > 0 && o > 0 ? Ao({
532
532
  measurements: t,
@@ -537,7 +537,7 @@ class Mo {
537
537
  key: process.env.NODE_ENV !== "production" && "calculateRange",
538
538
  debug: () => this.options.debug
539
539
  }
540
- ), this.getIndexes = Le(
540
+ ), this.getIndexes = Ie(
541
541
  () => [
542
542
  this.options.rangeExtractor,
543
543
  this.calculateRange(),
@@ -580,7 +580,7 @@ class Mo {
580
580
  })), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, o)), this.notify(!0, !1));
581
581
  }, this.measureElement = (t) => {
582
582
  t && this._measureElement(t, void 0);
583
- }, this.getVirtualItems = Le(
583
+ }, this.getVirtualItems = Ie(
584
584
  () => [this.getIndexes(), this.getMeasurements()],
585
585
  (t, o) => {
586
586
  const l = [];
@@ -701,9 +701,9 @@ function Ao({
701
701
  return { startIndex: s, endIndex: r };
702
702
  }
703
703
  function Vo(e) {
704
- const n = new Mo(M(e)), t = Un(n), o = n._didMount();
704
+ const n = new Mo(k(e)), t = Un(n), o = n._didMount();
705
705
  return F(
706
- () => M(e).getScrollElement(),
706
+ () => k(e).getScrollElement(),
707
707
  (l) => {
708
708
  l && n._willUpdate();
709
709
  },
@@ -711,7 +711,7 @@ function Vo(e) {
711
711
  immediate: !0
712
712
  }
713
713
  ), F(
714
- () => M(e),
714
+ () => k(e),
715
715
  (l) => {
716
716
  n.setOptions({
717
717
  ...l,
@@ -730,14 +730,14 @@ function Do(e) {
730
730
  return Vo(
731
731
  L(() => ({
732
732
  observeElementRect: $o,
733
- observeElementOffset: Io,
733
+ observeElementOffset: Lo,
734
734
  scrollToFn: ko,
735
- ...M(e)
735
+ ...k(e)
736
736
  }))
737
737
  );
738
738
  }
739
739
  function Ro(e, n, t) {
740
- let o = O(t == null ? void 0 : t.value), l = L(() => e.value !== void 0);
740
+ let o = $(t == null ? void 0 : t.value), l = L(() => e.value !== void 0);
741
741
  return [L(() => l.value ? e.value : o.value), function(s) {
742
742
  return l.value || (o.value = s), n == null ? void 0 : n(s);
743
743
  }];
@@ -837,7 +837,7 @@ let Zo = class {
837
837
  return typeof window > "u" || typeof document > "u" ? "server" : "client";
838
838
  }
839
839
  }, Ot = new Zo();
840
- function It(e) {
840
+ function Lt(e) {
841
841
  if (Ot.isServer) return null;
842
842
  if (e instanceof Node) return e.ownerDocument;
843
843
  if (e != null && e.hasOwnProperty("value")) {
@@ -850,7 +850,7 @@ let Bt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "butt
850
850
  var Uo = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Uo || {}), Wo = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Wo || {}), qo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(qo || {}), fn = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(fn || {});
851
851
  function Go(e, n = 0) {
852
852
  var t;
853
- return e === ((t = It(e)) == null ? void 0 : t.body) ? !1 : ue(n, { 0() {
853
+ return e === ((t = Lt(e)) == null ? void 0 : t.body) ? !1 : ue(n, { 0() {
854
854
  return e.matches(Bt);
855
855
  }, 1() {
856
856
  let o = e;
@@ -909,7 +909,7 @@ function el(e, n, t = L(() => !0)) {
909
909
  }
910
910
  return !Go(a, fn.Loose) && a.tabIndex !== -1 && s.preventDefault(), n(s, a);
911
911
  }
912
- let l = O(null);
912
+ let l = $(null);
913
913
  Ue("pointerdown", (s) => {
914
914
  var r, a;
915
915
  t.value && (l.value = ((a = (r = s.composedPath) == null ? void 0 : r.call(s)) == null ? void 0 : a[0]) || s.target);
@@ -926,7 +926,7 @@ function Ft(e, n) {
926
926
  if (typeof t == "string" && t.toLowerCase() === "button") return "button";
927
927
  }
928
928
  function tl(e, n) {
929
- let t = O(Ft(e.value.type, e.value.as));
929
+ let t = $(Ft(e.value.type, e.value.as));
930
930
  return se(() => {
931
931
  t.value = Ft(e.value.type, e.value.as);
932
932
  }), fe(() => {
@@ -938,7 +938,7 @@ function jt(e) {
938
938
  return [e.screenX, e.screenY];
939
939
  }
940
940
  function nl() {
941
- let e = O([-1, -1]);
941
+ let e = $([-1, -1]);
942
942
  return { wasMoved(n) {
943
943
  let t = jt(n);
944
944
  return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
@@ -950,7 +950,7 @@ function ol({ container: e, accept: n, walk: t, enabled: o }) {
950
950
  fe(() => {
951
951
  let l = e.value;
952
952
  if (!l || o !== void 0 && !o.value) return;
953
- let s = It(e);
953
+ let s = Lt(e);
954
954
  if (!s) return;
955
955
  let r = Object.assign((i) => n(i), { acceptNode: n }), a = s.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, r, !1);
956
956
  for (; a.nextNode(); ) t(a.currentNode);
@@ -975,20 +975,20 @@ function ct({ props: e, attrs: n, slots: t, slot: o, name: l }) {
975
975
  var s, r;
976
976
  let { as: a, ...i } = ot(e, ["unmount", "static"]), u = (s = t.default) == null ? void 0 : s.call(t, o), c = {};
977
977
  if (o) {
978
- let d = !1, x = [];
979
- for (let [m, C] of Object.entries(o)) typeof C == "boolean" && (d = !0), C === !0 && x.push(m);
980
- d && (c["data-headlessui-state"] = x.join(" "));
978
+ let d = !1, w = [];
979
+ for (let [m, y] of Object.entries(o)) typeof y == "boolean" && (d = !0), y === !0 && w.push(m);
980
+ d && (c["data-headlessui-state"] = w.join(" "));
981
981
  }
982
982
  if (a === "template") {
983
983
  if (u = pn(u ?? []), Object.keys(i).length > 0 || Object.keys(n).length > 0) {
984
- let [d, ...x] = u ?? [];
985
- if (!al(d) || x.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(i).concat(Object.keys(n)).map((b) => b.trim()).filter((b, I, $) => $.indexOf(b) === I).sort((b, I) => b.localeCompare(I)).map((b) => ` - ${b}`).join(`
986
- `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((b) => ` - ${b}`).join(`
984
+ let [d, ...w] = u ?? [];
985
+ if (!al(d) || w.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(i).concat(Object.keys(n)).map((x) => x.trim()).filter((x, O, D) => D.indexOf(x) === O).sort((x, O) => x.localeCompare(O)).map((x) => ` - ${x}`).join(`
986
+ `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((x) => ` - ${x}`).join(`
987
987
  `)].join(`
988
988
  `));
989
- let m = hn((r = d.props) != null ? r : {}, i, c), C = sn(d, m, !0);
990
- for (let b in m) b.startsWith("on") && (C.props || (C.props = {}), C.props[b] = m[b]);
991
- return C;
989
+ let m = hn((r = d.props) != null ? r : {}, i, c), y = sn(d, m, !0);
990
+ for (let x in m) x.startsWith("on") && (y.props || (y.props = {}), y.props[x] = m[x]);
991
+ return y;
992
992
  }
993
993
  return Array.isArray(u) && u.length === 1 ? u[0] : u;
994
994
  }
@@ -1127,7 +1127,7 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1127
1127
  }, overscan: 12 }))), s = L(() => {
1128
1128
  var a;
1129
1129
  return (a = t.virtual.value) == null ? void 0 : a.options;
1130
- }), r = O(0);
1130
+ }), r = $(0);
1131
1131
  return F([s], () => {
1132
1132
  r.value += 1;
1133
1133
  }), ce(_n, t.virtual.value ? l : null), () => [Ve("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (a) => {
@@ -1137,44 +1137,44 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1137
1137
  }
1138
1138
  } }, l.value.getVirtualItems().map((a) => sn(n.default({ option: t.virtual.value.options[a.index], open: t.comboboxState.value === 0 })[0], { key: `${r.value}-${a.index}`, "data-index": a.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": a.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${a.start}px)`, overflowAnchor: "none" } })))];
1139
1139
  } }), gl = pe({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: n, attrs: t, emit: o }) {
1140
- let l = O(1), s = O(null), r = O(null), a = O(null), i = O(null), u = O({ static: !1, hold: !1 }), c = O([]), d = O(null), x = O(2), m = O(!1);
1141
- function C(v = (p) => p) {
1142
- let p = d.value !== null ? c.value[d.value] : null, k = v(c.value.slice()), A = k.length > 0 && k[0].dataRef.order.value !== null ? k.sort((H, K) => H.dataRef.order.value - K.dataRef.order.value) : Yo(k, (H) => N(H.dataRef.domRef)), j = p ? A.indexOf(p) : null;
1143
- return j === -1 && (j = null), { options: A, activeOptionIndex: j };
1140
+ let l = $(1), s = $(null), r = $(null), a = $(null), i = $(null), u = $({ static: !1, hold: !1 }), c = $([]), d = $(null), w = $(2), m = $(!1);
1141
+ function y(v = (p) => p) {
1142
+ let p = d.value !== null ? c.value[d.value] : null, I = v(c.value.slice()), M = I.length > 0 && I[0].dataRef.order.value !== null ? I.sort((H, K) => H.dataRef.order.value - K.dataRef.order.value) : Yo(I, (H) => N(H.dataRef.domRef)), j = p ? M.indexOf(p) : null;
1143
+ return j === -1 && (j = null), { options: M, activeOptionIndex: j };
1144
1144
  }
1145
- let b = L(() => e.multiple ? 1 : 0), I = L(() => e.nullable), [$, w] = Ro(L(() => e.modelValue), (v) => o("update:modelValue", v), L(() => e.defaultValue)), y = L(() => $.value === void 0 ? ue(b.value, { 1: [], 0: void 0 }) : $.value), _ = null, T = null;
1146
- function V(v) {
1147
- return ue(b.value, { 0() {
1148
- return w == null ? void 0 : w(v);
1145
+ let x = L(() => e.multiple ? 1 : 0), O = L(() => e.nullable), [D, b] = Ro(L(() => e.modelValue), (v) => o("update:modelValue", v), L(() => e.defaultValue)), g = L(() => D.value === void 0 ? ue(x.value, { 1: [], 0: void 0 }) : D.value), _ = null, T = null;
1146
+ function A(v) {
1147
+ return ue(x.value, { 0() {
1148
+ return b == null ? void 0 : b(v);
1149
1149
  }, 1: () => {
1150
- let p = ne(E.value.value).slice(), k = ne(v), A = p.findIndex((j) => E.compare(k, ne(j)));
1151
- return A === -1 ? p.push(k) : p.splice(A, 1), w == null ? void 0 : w(p);
1150
+ let p = ne(E.value.value).slice(), I = ne(v), M = p.findIndex((j) => E.compare(I, ne(j)));
1151
+ return M === -1 ? p.push(I) : p.splice(M, 1), b == null ? void 0 : b(p);
1152
1152
  } });
1153
1153
  }
1154
1154
  let S = L(() => {
1155
1155
  });
1156
1156
  F([S], ([v], [p]) => {
1157
1157
  if (E.virtual.value && v && p && d.value !== null) {
1158
- let k = v.indexOf(p[d.value]);
1159
- k !== -1 ? d.value = k : d.value = null;
1158
+ let I = v.indexOf(p[d.value]);
1159
+ I !== -1 ? d.value = I : d.value = null;
1160
1160
  }
1161
1161
  });
1162
- let E = { comboboxState: l, value: y, mode: b, compare(v, p) {
1162
+ let E = { comboboxState: l, value: g, mode: x, compare(v, p) {
1163
1163
  if (typeof e.by == "string") {
1164
- let k = e.by;
1165
- return (v == null ? void 0 : v[k]) === (p == null ? void 0 : p[k]);
1164
+ let I = e.by;
1165
+ return (v == null ? void 0 : v[I]) === (p == null ? void 0 : p[I]);
1166
1166
  }
1167
1167
  return e.by === null ? fl(v, p) : e.by(v, p);
1168
1168
  }, calculateIndex(v) {
1169
1169
  return E.virtual.value ? e.by === null ? E.virtual.value.options.indexOf(v) : E.virtual.value.options.findIndex((p) => E.compare(p, v)) : c.value.findIndex((p) => E.compare(p.dataRef.value, v));
1170
- }, defaultValue: L(() => e.defaultValue), nullable: I, immediate: L(() => !1), virtual: L(() => null), inputRef: r, labelRef: s, buttonRef: a, optionsRef: i, disabled: L(() => e.disabled), options: c, change(v) {
1171
- w(v);
1170
+ }, defaultValue: L(() => e.defaultValue), nullable: O, immediate: L(() => !1), virtual: L(() => null), inputRef: r, labelRef: s, buttonRef: a, optionsRef: i, disabled: L(() => e.disabled), options: c, change(v) {
1171
+ b(v);
1172
1172
  }, activeOptionIndex: L(() => {
1173
1173
  if (m.value && d.value === null && (E.virtual.value ? E.virtual.value.options.length > 0 : c.value.length > 0)) {
1174
1174
  if (E.virtual.value) {
1175
- let p = E.virtual.value.options.findIndex((k) => {
1176
- var A;
1177
- return !((A = E.virtual.value) != null && A.disabled(k));
1175
+ let p = E.virtual.value.options.findIndex((I) => {
1176
+ var M;
1177
+ return !((M = E.virtual.value) != null && M.disabled(I));
1178
1178
  });
1179
1179
  if (p !== -1) return p;
1180
1180
  }
@@ -1182,7 +1182,7 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1182
1182
  if (v !== -1) return v;
1183
1183
  }
1184
1184
  return d.value;
1185
- }), activationTrigger: x, optionsPropsRef: u, closeCombobox() {
1185
+ }), activationTrigger: w, optionsPropsRef: u, closeCombobox() {
1186
1186
  m.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, d.value = null);
1187
1187
  }, openCombobox() {
1188
1188
  if (m.value = !0, !e.disabled && l.value !== 0) {
@@ -1193,8 +1193,8 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1193
1193
  l.value = 0;
1194
1194
  }
1195
1195
  }, setActivationTrigger(v) {
1196
- x.value = v;
1197
- }, goToOption(v, p, k) {
1196
+ w.value = v;
1197
+ }, goToOption(v, p, I) {
1198
1198
  m.value = !1, _ !== null && cancelAnimationFrame(_), _ = requestAnimationFrame(() => {
1199
1199
  if (e.disabled || i.value && !u.value.static && l.value === 1) return;
1200
1200
  if (E.virtual.value) {
@@ -1206,78 +1206,78 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1206
1206
  })) != null ? K : null;
1207
1207
  }, resolveDisabled: (H) => E.virtual.value.disabled(H), resolveId() {
1208
1208
  throw new Error("Function not implemented.");
1209
- } }), x.value = k ?? 2;
1209
+ } }), w.value = I ?? 2;
1210
1210
  return;
1211
1211
  }
1212
- let A = C();
1213
- if (A.activeOptionIndex === null) {
1214
- let H = A.options.findIndex((K) => !K.dataRef.disabled);
1215
- H !== -1 && (A.activeOptionIndex = H);
1212
+ let M = y();
1213
+ if (M.activeOptionIndex === null) {
1214
+ let H = M.options.findIndex((K) => !K.dataRef.disabled);
1215
+ H !== -1 && (M.activeOptionIndex = H);
1216
1216
  }
1217
- let j = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => A.options, resolveActiveIndex: () => A.activeOptionIndex, resolveId: (H) => H.id, resolveDisabled: (H) => H.dataRef.disabled });
1218
- d.value = j, x.value = k ?? 2, c.value = A.options;
1217
+ let j = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => M.options, resolveActiveIndex: () => M.activeOptionIndex, resolveId: (H) => H.id, resolveDisabled: (H) => H.dataRef.disabled });
1218
+ d.value = j, w.value = I ?? 2, c.value = M.options;
1219
1219
  });
1220
1220
  }, selectOption(v) {
1221
- let p = c.value.find((A) => A.id === v);
1221
+ let p = c.value.find((M) => M.id === v);
1222
1222
  if (!p) return;
1223
- let { dataRef: k } = p;
1224
- V(k.value);
1223
+ let { dataRef: I } = p;
1224
+ A(I.value);
1225
1225
  }, selectActiveOption() {
1226
1226
  if (E.activeOptionIndex.value !== null) {
1227
- if (E.virtual.value) V(E.virtual.value.options[E.activeOptionIndex.value]);
1227
+ if (E.virtual.value) A(E.virtual.value.options[E.activeOptionIndex.value]);
1228
1228
  else {
1229
1229
  let { dataRef: v } = c.value[E.activeOptionIndex.value];
1230
- V(v.value);
1230
+ A(v.value);
1231
1231
  }
1232
1232
  E.goToOption(q.Specific, E.activeOptionIndex.value);
1233
1233
  }
1234
1234
  }, registerOption(v, p) {
1235
- let k = an({ id: v, dataRef: p });
1235
+ let I = an({ id: v, dataRef: p });
1236
1236
  if (E.virtual.value) {
1237
- c.value.push(k);
1237
+ c.value.push(I);
1238
1238
  return;
1239
1239
  }
1240
1240
  T && cancelAnimationFrame(T);
1241
- let A = C((j) => (j.push(k), j));
1242
- d.value === null && E.isSelected(p.value.value) && (A.activeOptionIndex = A.options.indexOf(k)), c.value = A.options, d.value = A.activeOptionIndex, x.value = 2, A.options.some((j) => !N(j.dataRef.domRef)) && (T = requestAnimationFrame(() => {
1243
- let j = C();
1241
+ let M = y((j) => (j.push(I), j));
1242
+ d.value === null && E.isSelected(p.value.value) && (M.activeOptionIndex = M.options.indexOf(I)), c.value = M.options, d.value = M.activeOptionIndex, w.value = 2, M.options.some((j) => !N(j.dataRef.domRef)) && (T = requestAnimationFrame(() => {
1243
+ let j = y();
1244
1244
  c.value = j.options, d.value = j.activeOptionIndex;
1245
1245
  }));
1246
1246
  }, unregisterOption(v, p) {
1247
1247
  if (_ !== null && cancelAnimationFrame(_), p && (m.value = !0), E.virtual.value) {
1248
- c.value = c.value.filter((A) => A.id !== v);
1248
+ c.value = c.value.filter((M) => M.id !== v);
1249
1249
  return;
1250
1250
  }
1251
- let k = C((A) => {
1252
- let j = A.findIndex((H) => H.id === v);
1253
- return j !== -1 && A.splice(j, 1), A;
1251
+ let I = y((M) => {
1252
+ let j = M.findIndex((H) => H.id === v);
1253
+ return j !== -1 && M.splice(j, 1), M;
1254
1254
  });
1255
- c.value = k.options, d.value = k.activeOptionIndex, x.value = 2;
1255
+ c.value = I.options, d.value = I.activeOptionIndex, w.value = 2;
1256
1256
  }, isSelected(v) {
1257
- return ue(b.value, { 0: () => E.compare(ne(E.value.value), ne(v)), 1: () => ne(E.value.value).some((p) => E.compare(ne(p), ne(v))) });
1257
+ return ue(x.value, { 0: () => E.compare(ne(E.value.value), ne(v)), 1: () => ne(E.value.value).some((p) => E.compare(ne(p), ne(v))) });
1258
1258
  }, isActive(v) {
1259
1259
  return d.value === E.calculateIndex(v);
1260
1260
  } };
1261
1261
  el([r, a, i], () => E.closeCombobox(), L(() => l.value === 0)), ce(wn, E), ul(L(() => ue(l.value, { 0: Re.Open, 1: Re.Closed })));
1262
- let D = L(() => {
1262
+ let V = L(() => {
1263
1263
  var v;
1264
1264
  return (v = N(r)) == null ? void 0 : v.closest("form");
1265
1265
  });
1266
1266
  return se(() => {
1267
- F([D], () => {
1268
- if (!D.value || e.defaultValue === void 0) return;
1267
+ F([V], () => {
1268
+ if (!V.value || e.defaultValue === void 0) return;
1269
1269
  function v() {
1270
1270
  E.change(e.defaultValue);
1271
1271
  }
1272
- return D.value.addEventListener("reset", v), () => {
1272
+ return V.value.addEventListener("reset", v), () => {
1273
1273
  var p;
1274
- (p = D.value) == null || p.removeEventListener("reset", v);
1274
+ (p = V.value) == null || p.removeEventListener("reset", v);
1275
1275
  };
1276
1276
  }, { immediate: !0 });
1277
1277
  }), () => {
1278
- var v, p, k;
1279
- let { name: A, disabled: j, form: H, ...K } = e, ee = { open: l.value === 0, disabled: j, activeIndex: E.activeOptionIndex.value, activeOption: E.activeOptionIndex.value === null ? null : E.virtual.value ? E.virtual.value.options[(v = E.activeOptionIndex.value) != null ? v : 0] : (k = (p = E.options.value[E.activeOptionIndex.value]) == null ? void 0 : p.dataRef.value) != null ? k : null, value: y.value };
1280
- return Ve(z, [...A != null && y.value != null ? Cn({ [A]: y.value }).map(([Z, zn]) => Ve(rl, sl({ features: mn.Hidden, key: Z, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: H, disabled: j, name: Z, value: zn }))) : [], ye({ theirProps: { ...t, ...ot(K, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: ee, slots: n, attrs: t, name: "Combobox" })]);
1278
+ var v, p, I;
1279
+ let { name: M, disabled: j, form: H, ...K } = e, ee = { open: l.value === 0, disabled: j, activeIndex: E.activeOptionIndex.value, activeOption: E.activeOptionIndex.value === null ? null : E.virtual.value ? E.virtual.value.options[(v = E.activeOptionIndex.value) != null ? v : 0] : (I = (p = E.options.value[E.activeOptionIndex.value]) == null ? void 0 : p.dataRef.value) != null ? I : null, value: g.value };
1280
+ return Ve(z, [...M != null && g.value != null ? Cn({ [M]: g.value }).map(([Z, zn]) => Ve(rl, sl({ features: mn.Hidden, key: Z, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: H, disabled: j, name: Z, value: zn }))) : [], ye({ theirProps: { ...t, ...ot(K, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: ee, slots: n, attrs: t, name: "Combobox" })]);
1281
1281
  };
1282
1282
  } });
1283
1283
  pe({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: n, slots: t }) {
@@ -1330,12 +1330,12 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1330
1330
  let u = tl(L(() => ({ as: e.as, type: n.type })), r.buttonRef);
1331
1331
  return () => {
1332
1332
  var c, d;
1333
- let x = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...m } = e, C = { ref: r.buttonRef, id: s, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = N(r.optionsRef)) == null ? void 0 : c.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(d = N(r.labelRef)) == null ? void 0 : d.id, s].join(" ") : void 0, disabled: r.disabled.value === !0 ? !0 : void 0, onKeydown: i, onClick: a };
1334
- return ye({ ourProps: C, theirProps: m, slot: x, attrs: n, slots: t, name: "ComboboxButton" });
1333
+ let w = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...m } = e, y = { ref: r.buttonRef, id: s, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = N(r.optionsRef)) == null ? void 0 : c.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(d = N(r.labelRef)) == null ? void 0 : d.id, s].join(" ") : void 0, disabled: r.disabled.value === !0 ? !0 : void 0, onKeydown: i, onClick: a };
1334
+ return ye({ ourProps: y, theirProps: m, slot: w, attrs: n, slots: t, name: "ComboboxButton" });
1335
1335
  };
1336
1336
  } }), Cl = pe({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: n, attrs: t, slots: o, expose: l }) {
1337
1337
  var s;
1338
- let r = (s = e.id) != null ? s : `headlessui-combobox-input-${je()}`, a = we("ComboboxInput"), i = L(() => It(N(a.inputRef))), u = { value: !1 };
1338
+ let r = (s = e.id) != null ? s : `headlessui-combobox-input-${je()}`, a = we("ComboboxInput"), i = L(() => Lt(N(a.inputRef))), u = { value: !1 };
1339
1339
  l({ el: a.inputRef, $el: a.inputRef });
1340
1340
  function c() {
1341
1341
  a.change(null);
@@ -1344,45 +1344,45 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1344
1344
  }
1345
1345
  let d = L(() => {
1346
1346
  var T;
1347
- let V = a.value.value;
1348
- return N(a.inputRef) ? typeof e.displayValue < "u" && V !== void 0 ? (T = e.displayValue(V)) != null ? T : "" : typeof V == "string" ? V : "" : "";
1347
+ let A = a.value.value;
1348
+ return N(a.inputRef) ? typeof e.displayValue < "u" && A !== void 0 ? (T = e.displayValue(A)) != null ? T : "" : typeof A == "string" ? A : "" : "";
1349
1349
  });
1350
1350
  se(() => {
1351
- F([d, a.comboboxState, i], ([T, V], [S, E]) => {
1351
+ F([d, a.comboboxState, i], ([T, A], [S, E]) => {
1352
1352
  if (u.value) return;
1353
- let D = N(a.inputRef);
1354
- D && ((E === 0 && V === 1 || T !== S) && (D.value = T), requestAnimationFrame(() => {
1353
+ let V = N(a.inputRef);
1354
+ V && ((E === 0 && A === 1 || T !== S) && (V.value = T), requestAnimationFrame(() => {
1355
1355
  var v;
1356
- if (u.value || !D || ((v = i.value) == null ? void 0 : v.activeElement) !== D) return;
1357
- let { selectionStart: p, selectionEnd: k } = D;
1358
- Math.abs((k ?? 0) - (p ?? 0)) === 0 && p === 0 && D.setSelectionRange(D.value.length, D.value.length);
1356
+ if (u.value || !V || ((v = i.value) == null ? void 0 : v.activeElement) !== V) return;
1357
+ let { selectionStart: p, selectionEnd: I } = V;
1358
+ Math.abs((I ?? 0) - (p ?? 0)) === 0 && p === 0 && V.setSelectionRange(V.value.length, V.value.length);
1359
1359
  }));
1360
- }, { immediate: !0 }), F([a.comboboxState], ([T], [V]) => {
1361
- if (T === 0 && V === 1) {
1360
+ }, { immediate: !0 }), F([a.comboboxState], ([T], [A]) => {
1361
+ if (T === 0 && A === 1) {
1362
1362
  if (u.value) return;
1363
1363
  let S = N(a.inputRef);
1364
1364
  if (!S) return;
1365
- let E = S.value, { selectionStart: D, selectionEnd: v, selectionDirection: p } = S;
1366
- S.value = "", S.value = E, p !== null ? S.setSelectionRange(D, v, p) : S.setSelectionRange(D, v);
1365
+ let E = S.value, { selectionStart: V, selectionEnd: v, selectionDirection: p } = S;
1366
+ S.value = "", S.value = E, p !== null ? S.setSelectionRange(V, v, p) : S.setSelectionRange(V, v);
1367
1367
  }
1368
1368
  });
1369
1369
  });
1370
- let x = O(!1);
1370
+ let w = $(!1);
1371
1371
  function m() {
1372
- x.value = !0;
1372
+ w.value = !0;
1373
1373
  }
1374
- function C() {
1374
+ function y() {
1375
1375
  Qe().nextFrame(() => {
1376
- x.value = !1;
1376
+ w.value = !1;
1377
1377
  });
1378
1378
  }
1379
- let b = Bo();
1380
- function I(T) {
1381
- switch (u.value = !0, b(() => {
1379
+ let x = Bo();
1380
+ function O(T) {
1381
+ switch (u.value = !0, x(() => {
1382
1382
  u.value = !1;
1383
1383
  }), T.key) {
1384
1384
  case Q.Enter:
1385
- if (u.value = !1, a.comboboxState.value !== 0 || x.value) return;
1385
+ if (u.value = !1, a.comboboxState.value !== 0 || w.value) return;
1386
1386
  if (T.preventDefault(), T.stopPropagation(), a.activeOptionIndex.value === null) {
1387
1387
  a.closeCombobox();
1388
1388
  return;
@@ -1417,29 +1417,29 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1417
1417
  break;
1418
1418
  }
1419
1419
  }
1420
- function $(T) {
1420
+ function D(T) {
1421
1421
  n("change", T), a.nullable.value && a.mode.value === 0 && T.target.value === "" && c(), a.openCombobox();
1422
1422
  }
1423
- function w(T) {
1424
- var V, S, E;
1425
- let D = (V = T.relatedTarget) != null ? V : ge.find((v) => v !== T.currentTarget);
1426
- if (u.value = !1, !((S = N(a.optionsRef)) != null && S.contains(D)) && !((E = N(a.buttonRef)) != null && E.contains(D)) && a.comboboxState.value === 0) return T.preventDefault(), a.mode.value === 0 && (a.nullable.value && a.value.value === null ? c() : a.activationTrigger.value !== 1 && a.selectActiveOption()), a.closeCombobox();
1423
+ function b(T) {
1424
+ var A, S, E;
1425
+ let V = (A = T.relatedTarget) != null ? A : ge.find((v) => v !== T.currentTarget);
1426
+ if (u.value = !1, !((S = N(a.optionsRef)) != null && S.contains(V)) && !((E = N(a.buttonRef)) != null && E.contains(V)) && a.comboboxState.value === 0) return T.preventDefault(), a.mode.value === 0 && (a.nullable.value && a.value.value === null ? c() : a.activationTrigger.value !== 1 && a.selectActiveOption()), a.closeCombobox();
1427
1427
  }
1428
- function y(T) {
1429
- var V, S, E;
1430
- let D = (V = T.relatedTarget) != null ? V : ge.find((v) => v !== T.currentTarget);
1431
- (S = N(a.buttonRef)) != null && S.contains(D) || (E = N(a.optionsRef)) != null && E.contains(D) || a.disabled.value || a.immediate.value && a.comboboxState.value !== 0 && (a.openCombobox(), Qe().nextFrame(() => {
1428
+ function g(T) {
1429
+ var A, S, E;
1430
+ let V = (A = T.relatedTarget) != null ? A : ge.find((v) => v !== T.currentTarget);
1431
+ (S = N(a.buttonRef)) != null && S.contains(V) || (E = N(a.optionsRef)) != null && E.contains(V) || a.disabled.value || a.immediate.value && a.comboboxState.value !== 0 && (a.openCombobox(), Qe().nextFrame(() => {
1432
1432
  a.setActivationTrigger(1);
1433
1433
  }));
1434
1434
  }
1435
1435
  let _ = L(() => {
1436
- var T, V, S, E;
1437
- return (E = (S = (V = e.defaultValue) != null ? V : a.defaultValue.value !== void 0 ? (T = e.displayValue) == null ? void 0 : T.call(e, a.defaultValue.value) : null) != null ? S : a.defaultValue.value) != null ? E : "";
1436
+ var T, A, S, E;
1437
+ return (E = (S = (A = e.defaultValue) != null ? A : a.defaultValue.value !== void 0 ? (T = e.displayValue) == null ? void 0 : T.call(e, a.defaultValue.value) : null) != null ? S : a.defaultValue.value) != null ? E : "";
1438
1438
  });
1439
1439
  return () => {
1440
- var T, V, S, E, D, v, p;
1441
- let k = { open: a.comboboxState.value === 0 }, { displayValue: A, onChange: j, ...H } = e, K = { "aria-controls": (T = a.optionsRef.value) == null ? void 0 : T.id, "aria-expanded": a.comboboxState.value === 0, "aria-activedescendant": a.activeOptionIndex.value === null ? void 0 : a.virtual.value ? (V = a.options.value.find((ee) => !a.virtual.value.disabled(ee.dataRef.value) && a.compare(ee.dataRef.value, a.virtual.value.options[a.activeOptionIndex.value]))) == null ? void 0 : V.id : (S = a.options.value[a.activeOptionIndex.value]) == null ? void 0 : S.id, "aria-labelledby": (v = (E = N(a.labelRef)) == null ? void 0 : E.id) != null ? v : (D = N(a.buttonRef)) == null ? void 0 : D.id, "aria-autocomplete": "list", id: r, onCompositionstart: m, onCompositionend: C, onKeydown: I, onInput: $, onFocus: y, onBlur: w, role: "combobox", type: (p = t.type) != null ? p : "text", tabIndex: 0, ref: a.inputRef, defaultValue: _.value, disabled: a.disabled.value === !0 ? !0 : void 0 };
1442
- return ye({ ourProps: K, theirProps: H, slot: k, attrs: t, slots: o, features: De.RenderStrategy | De.Static, name: "ComboboxInput" });
1440
+ var T, A, S, E, V, v, p;
1441
+ let I = { open: a.comboboxState.value === 0 }, { displayValue: M, onChange: j, ...H } = e, K = { "aria-controls": (T = a.optionsRef.value) == null ? void 0 : T.id, "aria-expanded": a.comboboxState.value === 0, "aria-activedescendant": a.activeOptionIndex.value === null ? void 0 : a.virtual.value ? (A = a.options.value.find((ee) => !a.virtual.value.disabled(ee.dataRef.value) && a.compare(ee.dataRef.value, a.virtual.value.options[a.activeOptionIndex.value]))) == null ? void 0 : A.id : (S = a.options.value[a.activeOptionIndex.value]) == null ? void 0 : S.id, "aria-labelledby": (v = (E = N(a.labelRef)) == null ? void 0 : E.id) != null ? v : (V = N(a.buttonRef)) == null ? void 0 : V.id, "aria-autocomplete": "list", id: r, onCompositionstart: m, onCompositionend: y, onKeydown: O, onInput: D, onFocus: g, onBlur: b, role: "combobox", type: (p = t.type) != null ? p : "text", tabIndex: 0, ref: a.inputRef, defaultValue: _.value, disabled: a.disabled.value === !0 ? !0 : void 0 };
1442
+ return ye({ ourProps: K, theirProps: H, slot: I, attrs: t, slots: o, features: De.RenderStrategy | De.Static, name: "ComboboxInput" });
1443
1443
  };
1444
1444
  } }), xl = pe({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: n, slots: t, expose: o }) {
1445
1445
  let l = we("ComboboxOptions"), s = `headlessui-combobox-options-${je()}`;
@@ -1459,58 +1459,58 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1459
1459
  }
1460
1460
  return () => {
1461
1461
  var u, c, d;
1462
- let x = { open: l.comboboxState.value === 0 }, m = { "aria-labelledby": (d = (u = N(l.labelRef)) == null ? void 0 : u.id) != null ? d : (c = N(l.buttonRef)) == null ? void 0 : c.id, id: s, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: i }, C = ot(e, ["hold"]);
1463
- return ye({ ourProps: m, theirProps: C, slot: x, attrs: n, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ve(ml, {}, t.default)] } : t, features: De.RenderStrategy | De.Static, visible: a.value, name: "ComboboxOptions" });
1462
+ let w = { open: l.comboboxState.value === 0 }, m = { "aria-labelledby": (d = (u = N(l.labelRef)) == null ? void 0 : u.id) != null ? d : (c = N(l.buttonRef)) == null ? void 0 : c.id, id: s, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: i }, y = ot(e, ["hold"]);
1463
+ return ye({ ourProps: m, theirProps: y, slot: w, attrs: n, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ve(ml, {}, t.default)] } : t, features: De.RenderStrategy | De.Static, visible: a.value, name: "ComboboxOptions" });
1464
1464
  };
1465
1465
  } }), yl = pe({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: n, attrs: t, expose: o }) {
1466
- let l = we("ComboboxOption"), s = `headlessui-combobox-option-${je()}`, r = O(null), a = L(() => e.disabled);
1466
+ let l = we("ComboboxOption"), s = `headlessui-combobox-option-${je()}`, r = $(null), a = L(() => e.disabled);
1467
1467
  o({ el: r, $el: r });
1468
1468
  let i = L(() => {
1469
- var w;
1470
- return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((w = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : w.id) === s;
1469
+ var b;
1470
+ return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((b = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : b.id) === s;
1471
1471
  }), u = L(() => l.isSelected(e.value)), c = le(_n, null), d = L(() => ({ disabled: e.disabled, value: e.value, domRef: r, order: L(() => e.order) }));
1472
1472
  se(() => l.registerOption(s, d)), Fe(() => l.unregisterOption(s, i.value)), fe(() => {
1473
- let w = N(r);
1474
- w && (c == null || c.value.measureElement(w));
1473
+ let b = N(r);
1474
+ b && (c == null || c.value.measureElement(b));
1475
1475
  }), fe(() => {
1476
1476
  l.comboboxState.value === 0 && i.value && (l.virtual.value || l.activationTrigger.value !== 0 && X(() => {
1477
- var w, y;
1478
- return (y = (w = N(r)) == null ? void 0 : w.scrollIntoView) == null ? void 0 : y.call(w, { block: "nearest" });
1477
+ var b, g;
1478
+ return (g = (b = N(r)) == null ? void 0 : b.scrollIntoView) == null ? void 0 : g.call(b, { block: "nearest" });
1479
1479
  }));
1480
1480
  });
1481
- function x(w) {
1482
- w.preventDefault(), w.button === bn.Left && (a.value || (l.selectOption(s), vn() || requestAnimationFrame(() => {
1483
- var y;
1484
- return (y = N(l.inputRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
1481
+ function w(b) {
1482
+ b.preventDefault(), b.button === bn.Left && (a.value || (l.selectOption(s), vn() || requestAnimationFrame(() => {
1483
+ var g;
1484
+ return (g = N(l.inputRef)) == null ? void 0 : g.focus({ preventScroll: !0 });
1485
1485
  }), l.mode.value === 0 && l.closeCombobox()));
1486
1486
  }
1487
1487
  function m() {
1488
- var w;
1489
- if (e.disabled || (w = l.virtual.value) != null && w.disabled(e.value)) return l.goToOption(q.Nothing);
1490
- let y = l.calculateIndex(e.value);
1491
- l.goToOption(q.Specific, y);
1488
+ var b;
1489
+ if (e.disabled || (b = l.virtual.value) != null && b.disabled(e.value)) return l.goToOption(q.Nothing);
1490
+ let g = l.calculateIndex(e.value);
1491
+ l.goToOption(q.Specific, g);
1492
1492
  }
1493
- let C = nl();
1494
- function b(w) {
1495
- C.update(w);
1493
+ let y = nl();
1494
+ function x(b) {
1495
+ y.update(b);
1496
1496
  }
1497
- function I(w) {
1498
- var y;
1499
- if (!C.wasMoved(w) || e.disabled || (y = l.virtual.value) != null && y.disabled(e.value) || i.value) return;
1497
+ function O(b) {
1498
+ var g;
1499
+ if (!y.wasMoved(b) || e.disabled || (g = l.virtual.value) != null && g.disabled(e.value) || i.value) return;
1500
1500
  let _ = l.calculateIndex(e.value);
1501
1501
  l.goToOption(q.Specific, _, 0);
1502
1502
  }
1503
- function $(w) {
1504
- var y;
1505
- C.wasMoved(w) && (e.disabled || (y = l.virtual.value) != null && y.disabled(e.value) || i.value && (l.optionsPropsRef.value.hold || l.goToOption(q.Nothing)));
1503
+ function D(b) {
1504
+ var g;
1505
+ y.wasMoved(b) && (e.disabled || (g = l.virtual.value) != null && g.disabled(e.value) || i.value && (l.optionsPropsRef.value.hold || l.goToOption(q.Nothing)));
1506
1506
  }
1507
1507
  return () => {
1508
- let { disabled: w } = e, y = { active: i.value, selected: u.value, disabled: w }, _ = { id: s, ref: r, role: "option", tabIndex: w === !0 ? void 0 : -1, "aria-disabled": w === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: x, onFocus: m, onPointerenter: b, onMouseenter: b, onPointermove: I, onMousemove: I, onPointerleave: $, onMouseleave: $ }, T = ot(e, ["order", "value"]);
1509
- return ye({ ourProps: _, theirProps: T, slot: y, attrs: t, slots: n, name: "ComboboxOption" });
1508
+ let { disabled: b } = e, g = { active: i.value, selected: u.value, disabled: b }, _ = { id: s, ref: r, role: "option", tabIndex: b === !0 ? void 0 : -1, "aria-disabled": b === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: w, onFocus: m, onPointerenter: x, onMouseenter: x, onPointermove: O, onMousemove: O, onPointerleave: D, onMouseleave: D }, T = ot(e, ["order", "value"]);
1509
+ return ye({ ourProps: _, theirProps: T, slot: g, attrs: t, slots: n, name: "ComboboxOption" });
1510
1510
  };
1511
1511
  } });
1512
1512
  function wl(e, n) {
1513
- return h(), g("svg", {
1513
+ return h(), C("svg", {
1514
1514
  xmlns: "http://www.w3.org/2000/svg",
1515
1515
  viewBox: "0 0 20 20",
1516
1516
  fill: "currentColor",
@@ -1525,7 +1525,7 @@ function wl(e, n) {
1525
1525
  ]);
1526
1526
  }
1527
1527
  function _l(e, n) {
1528
- return h(), g("svg", {
1528
+ return h(), C("svg", {
1529
1529
  xmlns: "http://www.w3.org/2000/svg",
1530
1530
  viewBox: "0 0 20 20",
1531
1531
  fill: "currentColor",
@@ -1540,7 +1540,7 @@ function _l(e, n) {
1540
1540
  ]);
1541
1541
  }
1542
1542
  function Tl(e, n) {
1543
- return h(), g("svg", {
1543
+ return h(), C("svg", {
1544
1544
  xmlns: "http://www.w3.org/2000/svg",
1545
1545
  viewBox: "0 0 20 20",
1546
1546
  fill: "currentColor",
@@ -1572,12 +1572,12 @@ function Tn() {
1572
1572
  }
1573
1573
  const El = typeof Proxy == "function", $l = "devtools-plugin:setup", Ol = "plugin:settings:set";
1574
1574
  let _e, pt;
1575
- function Il() {
1575
+ function Ll() {
1576
1576
  var e;
1577
1577
  return _e !== void 0 || (typeof window < "u" && window.performance ? (_e = !0, pt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (_e = !0, pt = globalThis.perf_hooks.performance) : _e = !1), _e;
1578
1578
  }
1579
- function Ll() {
1580
- return Il() ? pt.now() : Date.now();
1579
+ function Il() {
1580
+ return Ll() ? pt.now() : Date.now();
1581
1581
  }
1582
1582
  class kl {
1583
1583
  constructor(n, t) {
@@ -1607,7 +1607,7 @@ class kl {
1607
1607
  s = r;
1608
1608
  },
1609
1609
  now() {
1610
- return Ll();
1610
+ return Il();
1611
1611
  }
1612
1612
  }, t && t.on(Ol, (r, a) => {
1613
1613
  r === this.plugin.id && this.fallbacks.setSettings(a);
@@ -1675,10 +1675,10 @@ const lt = typeof window < "u", Ae = (process.env.NODE_ENV !== "production" || !
1675
1675
  function Ml(e, { autoBom: n = !1 } = {}) {
1676
1676
  return n && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
1677
1677
  }
1678
- function Lt(e, n, t) {
1678
+ function It(e, n, t) {
1679
1679
  const o = new XMLHttpRequest();
1680
1680
  o.open("GET", e), o.responseType = "blob", o.onload = function() {
1681
- In(o.response, n, t);
1681
+ Ln(o.response, n, t);
1682
1682
  }, o.onerror = function() {
1683
1683
  console.error("could not download file");
1684
1684
  }, o.send();
@@ -1700,7 +1700,7 @@ function Ge(e) {
1700
1700
  t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
1701
1701
  }
1702
1702
  }
1703
- const Je = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Je.userAgent) && /AppleWebKit/.test(Je.userAgent) && !/Safari/.test(Je.userAgent), In = lt ? (
1703
+ const Je = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Je.userAgent) && /AppleWebKit/.test(Je.userAgent) && !/Safari/.test(Je.userAgent), Ln = lt ? (
1704
1704
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
1705
1705
  typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !On ? Al : (
1706
1706
  // Use msSaveOrOpenBlob as a second approach
@@ -1713,7 +1713,7 @@ const Je = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /M
1713
1713
  };
1714
1714
  function Al(e, n = "download", t) {
1715
1715
  const o = document.createElement("a");
1716
- o.download = n, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin !== location.origin ? $n(o.href) ? Lt(e, n, t) : (o.target = "_blank", Ge(o)) : Ge(o)) : (o.href = URL.createObjectURL(e), setTimeout(function() {
1716
+ o.download = n, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin !== location.origin ? $n(o.href) ? It(e, n, t) : (o.target = "_blank", Ge(o)) : Ge(o)) : (o.href = URL.createObjectURL(e), setTimeout(function() {
1717
1717
  URL.revokeObjectURL(o.href);
1718
1718
  }, 4e4), setTimeout(function() {
1719
1719
  Ge(o);
@@ -1722,7 +1722,7 @@ function Al(e, n = "download", t) {
1722
1722
  function Vl(e, n = "download", t) {
1723
1723
  if (typeof e == "string")
1724
1724
  if ($n(e))
1725
- Lt(e, n, t);
1725
+ It(e, n, t);
1726
1726
  else {
1727
1727
  const o = document.createElement("a");
1728
1728
  o.href = e, o.target = "_blank", setTimeout(function() {
@@ -1734,7 +1734,7 @@ function Vl(e, n = "download", t) {
1734
1734
  }
1735
1735
  function Dl(e, n, t, o) {
1736
1736
  if (o = o || open("", "_blank"), o && (o.document.title = o.document.body.innerText = "downloading..."), typeof e == "string")
1737
- return Lt(e, n, t);
1737
+ return It(e, n, t);
1738
1738
  const l = e.type === "application/octet-stream", s = /constructor/i.test(String(zt.HTMLElement)) || "safari" in zt, r = /CriOS\/[\d]+/.test(navigator.userAgent);
1739
1739
  if ((r || l && s || On) && typeof FileReader < "u") {
1740
1740
  const a = new FileReader();
@@ -1758,7 +1758,7 @@ function U(e, n) {
1758
1758
  function kt(e) {
1759
1759
  return "_a" in e && "install" in e;
1760
1760
  }
1761
- function Ln() {
1761
+ function In() {
1762
1762
  if (!("clipboard" in navigator))
1763
1763
  return U("Your browser doesn't support the Clipboard API", "error"), !0;
1764
1764
  }
@@ -1766,7 +1766,7 @@ function kn(e) {
1766
1766
  return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (U('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
1767
1767
  }
1768
1768
  async function Rl(e) {
1769
- if (!Ln())
1769
+ if (!In())
1770
1770
  try {
1771
1771
  await navigator.clipboard.writeText(JSON.stringify(e.state.value)), U("Global state copied to clipboard.");
1772
1772
  } catch (n) {
@@ -1776,7 +1776,7 @@ async function Rl(e) {
1776
1776
  }
1777
1777
  }
1778
1778
  async function Pl(e) {
1779
- if (!Ln())
1779
+ if (!In())
1780
1780
  try {
1781
1781
  Mn(e, JSON.parse(await navigator.clipboard.readText())), U("Global state pasted from clipboard.");
1782
1782
  } catch (n) {
@@ -1787,7 +1787,7 @@ async function Pl(e) {
1787
1787
  }
1788
1788
  async function Nl(e) {
1789
1789
  try {
1790
- In(new Blob([JSON.stringify(e.state.value)], {
1790
+ Ln(new Blob([JSON.stringify(e.state.value)], {
1791
1791
  type: "text/plain;charset=utf-8"
1792
1792
  }), "pinia-state.json");
1793
1793
  } catch (n) {
@@ -2113,7 +2113,7 @@ function ql(e, n) {
2113
2113
  });
2114
2114
  });
2115
2115
  }, !0), n._customProperties.forEach((r) => {
2116
- F(() => M(n[r]), (a, i) => {
2116
+ F(() => k(n[r]), (a, i) => {
2117
2117
  t.notifyComponentUpdate(), t.sendInspectorState(J), Se && t.addTimelineEvent({
2118
2118
  layerId: me,
2119
2119
  event: {
@@ -2202,7 +2202,7 @@ function Gl({ app: e, store: n, options: t }) {
2202
2202
  );
2203
2203
  }
2204
2204
  function Jl() {
2205
- const e = un(!0), n = e.run(() => O({}));
2205
+ const e = un(!0), n = e.run(() => $({}));
2206
2206
  let t = [], o = [];
2207
2207
  const l = be({
2208
2208
  install(s) {
@@ -2275,12 +2275,12 @@ function qt(e, n, t, o) {
2275
2275
  !a && (process.env.NODE_ENV === "production" || !o) && (t.state.value[e] = l ? l() : {});
2276
2276
  const c = process.env.NODE_ENV !== "production" && o ? (
2277
2277
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
2278
- Rt(O(l ? l() : {}).value)
2278
+ Rt($(l ? l() : {}).value)
2279
2279
  ) : Rt(t.state.value[e]);
2280
- return te(c, s, Object.keys(r || {}).reduce((d, x) => (process.env.NODE_ENV !== "production" && x in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${x}" in store "${e}".`), d[x] = be(L(() => {
2280
+ return te(c, s, Object.keys(r || {}).reduce((d, w) => (process.env.NODE_ENV !== "production" && w in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${w}" in store "${e}".`), d[w] = be(L(() => {
2281
2281
  Pe(t);
2282
2282
  const m = t._s.get(e);
2283
- return r[x].call(m, m);
2283
+ return r[w].call(m, m);
2284
2284
  })), d), {}));
2285
2285
  }
2286
2286
  return i = gt(e, u, n, t, o, !0), i;
@@ -2297,12 +2297,12 @@ function gt(e, n, t = {}, o, l, s) {
2297
2297
  process.env.NODE_ENV !== "production" && (i.onTrigger = (v) => {
2298
2298
  u ? m = v : u == !1 && !S._hotUpdating && (Array.isArray(m) ? m.push(v) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
2299
2299
  });
2300
- let u, c, d = [], x = [], m;
2301
- const C = o.state.value[e];
2302
- !s && !C && (process.env.NODE_ENV === "production" || !l) && (o.state.value[e] = {});
2303
- const b = O({});
2304
- let I;
2305
- function $(v) {
2300
+ let u, c, d = [], w = [], m;
2301
+ const y = o.state.value[e];
2302
+ !s && !y && (process.env.NODE_ENV === "production" || !l) && (o.state.value[e] = {});
2303
+ const x = $({});
2304
+ let O;
2305
+ function D(v) {
2306
2306
  let p;
2307
2307
  u = c = !1, process.env.NODE_ENV !== "production" && (m = []), typeof v == "function" ? (v(o.state.value[e]), p = {
2308
2308
  type: ae.patchFunction,
@@ -2314,15 +2314,15 @@ function gt(e, n, t = {}, o, l, s) {
2314
2314
  storeId: e,
2315
2315
  events: m
2316
2316
  });
2317
- const k = I = Symbol();
2317
+ const I = O = Symbol();
2318
2318
  X().then(() => {
2319
- I === k && (u = !0);
2319
+ O === I && (u = !0);
2320
2320
  }), c = !0, Te(d, p, o.state.value[e]);
2321
2321
  }
2322
- const w = s ? function() {
2323
- const { state: p } = t, k = p ? p() : {};
2324
- this.$patch((A) => {
2325
- te(A, k);
2322
+ const b = s ? function() {
2323
+ const { state: p } = t, I = p ? p() : {};
2324
+ this.$patch((M) => {
2325
+ te(M, I);
2326
2326
  });
2327
2327
  } : (
2328
2328
  /* istanbul ignore next */
@@ -2330,21 +2330,21 @@ function gt(e, n, t = {}, o, l, s) {
2330
2330
  throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
2331
2331
  } : Rn
2332
2332
  );
2333
- function y() {
2334
- r.stop(), d = [], x = [], o._s.delete(e);
2333
+ function g() {
2334
+ r.stop(), d = [], w = [], o._s.delete(e);
2335
2335
  }
2336
2336
  function _(v, p) {
2337
2337
  return function() {
2338
2338
  Pe(o);
2339
- const k = Array.from(arguments), A = [], j = [];
2339
+ const I = Array.from(arguments), M = [], j = [];
2340
2340
  function H(Z) {
2341
- A.push(Z);
2341
+ M.push(Z);
2342
2342
  }
2343
2343
  function K(Z) {
2344
2344
  j.push(Z);
2345
2345
  }
2346
- Te(x, {
2347
- args: k,
2346
+ Te(w, {
2347
+ args: I,
2348
2348
  name: v,
2349
2349
  store: S,
2350
2350
  after: H,
@@ -2352,75 +2352,75 @@ function gt(e, n, t = {}, o, l, s) {
2352
2352
  });
2353
2353
  let ee;
2354
2354
  try {
2355
- ee = p.apply(this && this.$id === e ? this : S, k);
2355
+ ee = p.apply(this && this.$id === e ? this : S, I);
2356
2356
  } catch (Z) {
2357
2357
  throw Te(j, Z), Z;
2358
2358
  }
2359
- return ee instanceof Promise ? ee.then((Z) => (Te(A, Z), Z)).catch((Z) => (Te(j, Z), Promise.reject(Z))) : (Te(A, ee), ee);
2359
+ return ee instanceof Promise ? ee.then((Z) => (Te(M, Z), Z)).catch((Z) => (Te(j, Z), Promise.reject(Z))) : (Te(M, ee), ee);
2360
2360
  };
2361
2361
  }
2362
2362
  const T = /* @__PURE__ */ be({
2363
2363
  actions: {},
2364
2364
  getters: {},
2365
2365
  state: [],
2366
- hotState: b
2367
- }), V = {
2366
+ hotState: x
2367
+ }), A = {
2368
2368
  _p: o,
2369
2369
  // _s: scope,
2370
2370
  $id: e,
2371
- $onAction: Ut.bind(null, x),
2372
- $patch: $,
2373
- $reset: w,
2371
+ $onAction: Ut.bind(null, w),
2372
+ $patch: D,
2373
+ $reset: b,
2374
2374
  $subscribe(v, p = {}) {
2375
- const k = Ut(d, v, p.detached, () => A()), A = r.run(() => F(() => o.state.value[e], (j) => {
2375
+ const I = Ut(d, v, p.detached, () => M()), M = r.run(() => F(() => o.state.value[e], (j) => {
2376
2376
  (p.flush === "sync" ? c : u) && v({
2377
2377
  storeId: e,
2378
2378
  type: ae.direct,
2379
2379
  events: m
2380
2380
  }, j);
2381
2381
  }, te({}, i, p)));
2382
- return k;
2382
+ return I;
2383
2383
  },
2384
- $dispose: y
2384
+ $dispose: g
2385
2385
  }, S = an(process.env.NODE_ENV !== "production" || Ae ? te(
2386
2386
  {
2387
2387
  _hmrPayload: T,
2388
2388
  _customProperties: be(/* @__PURE__ */ new Set())
2389
2389
  // devtools custom properties
2390
2390
  },
2391
- V
2391
+ A
2392
2392
  // must be added later
2393
2393
  // setupStore
2394
- ) : V);
2394
+ ) : A);
2395
2395
  o._s.set(e, S);
2396
- const D = (o._a && o._a.runWithContext || Yl)(() => o._e.run(() => (r = un()).run(n)));
2397
- for (const v in D) {
2398
- const p = D[v];
2396
+ const V = (o._a && o._a.runWithContext || Yl)(() => o._e.run(() => (r = un()).run(n)));
2397
+ for (const v in V) {
2398
+ const p = V[v];
2399
2399
  if ($e(p) && !Wt(p) || St(p))
2400
- process.env.NODE_ENV !== "production" && l ? We(b.value, v, it(D, v)) : s || (C && Xl(p) && ($e(p) ? p.value = C[v] : mt(p, C[v])), o.state.value[e][v] = p), process.env.NODE_ENV !== "production" && T.state.push(v);
2400
+ process.env.NODE_ENV !== "production" && l ? We(x.value, v, it(V, v)) : s || (y && Xl(p) && ($e(p) ? p.value = y[v] : mt(p, y[v])), o.state.value[e][v] = p), process.env.NODE_ENV !== "production" && T.state.push(v);
2401
2401
  else if (typeof p == "function") {
2402
- const k = process.env.NODE_ENV !== "production" && l ? p : _(v, p);
2403
- D[v] = k, process.env.NODE_ENV !== "production" && (T.actions[v] = p), a.actions[v] = p;
2402
+ const I = process.env.NODE_ENV !== "production" && l ? p : _(v, p);
2403
+ V[v] = I, process.env.NODE_ENV !== "production" && (T.actions[v] = p), a.actions[v] = p;
2404
2404
  } else process.env.NODE_ENV !== "production" && Wt(p) && (T.getters[v] = s ? (
2405
2405
  // @ts-expect-error
2406
2406
  t.getters[v]
2407
- ) : p, lt && (D._getters || // @ts-expect-error: same
2408
- (D._getters = be([]))).push(v));
2407
+ ) : p, lt && (V._getters || // @ts-expect-error: same
2408
+ (V._getters = be([]))).push(v));
2409
2409
  }
2410
- if (te(S, D), te(ne(S), D), Object.defineProperty(S, "$state", {
2411
- get: () => process.env.NODE_ENV !== "production" && l ? b.value : o.state.value[e],
2410
+ if (te(S, V), te(ne(S), V), Object.defineProperty(S, "$state", {
2411
+ get: () => process.env.NODE_ENV !== "production" && l ? x.value : o.state.value[e],
2412
2412
  set: (v) => {
2413
2413
  if (process.env.NODE_ENV !== "production" && l)
2414
2414
  throw new Error("cannot set hotState");
2415
- $((p) => {
2415
+ D((p) => {
2416
2416
  te(p, v);
2417
2417
  });
2418
2418
  }
2419
2419
  }), process.env.NODE_ENV !== "production" && (S._hotUpdate = be((v) => {
2420
2420
  S._hotUpdating = !0, v._hmrPayload.state.forEach((p) => {
2421
2421
  if (p in S.$state) {
2422
- const k = v.$state[p], A = S.$state[p];
2423
- typeof k == "object" && Ce(k) && Ce(A) ? Dn(k, A) : v.$state[p] = A;
2422
+ const I = v.$state[p], M = S.$state[p];
2423
+ typeof I == "object" && Ce(I) && Ce(M) ? Dn(I, M) : v.$state[p] = M;
2424
2424
  }
2425
2425
  We(S, p, it(v.$state, p));
2426
2426
  }), Object.keys(S.$state).forEach((p) => {
@@ -2429,15 +2429,15 @@ function gt(e, n, t = {}, o, l, s) {
2429
2429
  u = !0;
2430
2430
  });
2431
2431
  for (const p in v._hmrPayload.actions) {
2432
- const k = v[p];
2433
- We(S, p, _(p, k));
2432
+ const I = v[p];
2433
+ We(S, p, _(p, I));
2434
2434
  }
2435
2435
  for (const p in v._hmrPayload.getters) {
2436
- const k = v._hmrPayload.getters[p], A = s ? (
2436
+ const I = v._hmrPayload.getters[p], M = s ? (
2437
2437
  // special handling of options api
2438
- L(() => (Pe(o), k.call(S, S)))
2439
- ) : k;
2440
- We(S, p, A);
2438
+ L(() => (Pe(o), I.call(S, S)))
2439
+ ) : I;
2440
+ We(S, p, M);
2441
2441
  }
2442
2442
  Object.keys(S._hmrPayload.getters).forEach((p) => {
2443
2443
  p in v._hmrPayload.getters || dt(S, p);
@@ -2463,7 +2463,7 @@ function gt(e, n, t = {}, o, l, s) {
2463
2463
  pinia: o,
2464
2464
  options: a
2465
2465
  }));
2466
- Object.keys(p || {}).forEach((k) => S._customProperties.add(k)), te(S, p);
2466
+ Object.keys(p || {}).forEach((I) => S._customProperties.add(I)), te(S, p);
2467
2467
  } else
2468
2468
  te(S, r.run(() => v({
2469
2469
  store: S,
@@ -2473,7 +2473,7 @@ function gt(e, n, t = {}, o, l, s) {
2473
2473
  })));
2474
2474
  }), process.env.NODE_ENV !== "production" && S.$state && typeof S.$state == "object" && typeof S.$state.constructor == "function" && !S.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
2475
2475
  state: () => new MyClass()
2476
- Found in store "${S.$id}".`), C && s && t.hydrate && t.hydrate(S.$state, C), u = !0, c = !0, S;
2476
+ Found in store "${S.$id}".`), y && s && t.hydrate && t.hydrate(S.$state, y), u = !0, c = !0, S;
2477
2477
  }
2478
2478
  function He(e, n, t) {
2479
2479
  let o, l;
@@ -2493,14 +2493,14 @@ This will fail in production.`);
2493
2493
  a = Me, a._s.has(o) || (s ? gt(o, n, l, a) : qt(o, l, a), process.env.NODE_ENV !== "production" && (r._pinia = a));
2494
2494
  const c = a._s.get(o);
2495
2495
  if (process.env.NODE_ENV !== "production" && i) {
2496
- const d = "__hot:" + o, x = s ? gt(d, n, l, a, !0) : qt(d, te({}, l), a, !0);
2497
- i._hotUpdate(x), delete a.state.value[d], a._s.delete(d);
2496
+ const d = "__hot:" + o, w = s ? gt(d, n, l, a, !0) : qt(d, te({}, l), a, !0);
2497
+ i._hotUpdate(w), delete a.state.value[d], a._s.delete(d);
2498
2498
  }
2499
2499
  if (process.env.NODE_ENV !== "production" && lt) {
2500
2500
  const d = rn();
2501
2501
  if (d && d.proxy && // avoid adding stores that are just built for hot module replacement
2502
2502
  !i) {
2503
- const x = d.proxy, m = "_pStores" in x ? x._pStores : x._pStores = {};
2503
+ const w = d.proxy, m = "_pStores" in w ? w._pStores : w._pStores = {};
2504
2504
  m[o] = c;
2505
2505
  }
2506
2506
  }
@@ -2509,7 +2509,7 @@ This will fail in production.`);
2509
2509
  return r.$id = o, r;
2510
2510
  }
2511
2511
  const xe = He("loader", () => {
2512
- const e = O({
2512
+ const e = $({
2513
2513
  translation: !1,
2514
2514
  aiExplanation: !1,
2515
2515
  writing: !1
@@ -2530,32 +2530,32 @@ const xe = He("loader", () => {
2530
2530
  }),
2531
2531
  emits: ["update:modelValue"],
2532
2532
  setup(e) {
2533
- const n = xe(), t = e, o = Gn(e, "modelValue"), l = O(""), s = O(null), r = L(() => Object.entries(t.languages).filter(
2533
+ const n = xe(), t = e, o = Gn(e, "modelValue"), l = $(""), s = $(null), r = L(() => Object.entries(t.languages).filter(
2534
2534
  ([, i]) => i.toLowerCase().includes(l.value.toLowerCase())
2535
2535
  )), a = (i) => {
2536
2536
  i.target.value = "", l.value = "", s.value && s.value.$el.click();
2537
2537
  };
2538
- return (i, u) => (h(), W(M(gl), {
2538
+ return (i, u) => (h(), W(k(gl), {
2539
2539
  modelValue: o.value,
2540
2540
  "onUpdate:modelValue": u[3] || (u[3] = (c) => o.value = c),
2541
- disabled: M(n).loading,
2541
+ disabled: k(n).loading,
2542
2542
  as: "div",
2543
2543
  class: "relative mt-1"
2544
2544
  }, {
2545
2545
  default: ze(() => [
2546
- B(M(Cl), {
2546
+ B(k(Cl), {
2547
2547
  class: "w-full bg-base-100 border border-base-300 rounded py-2.5 pl-3 pr-10 text-sm text-base-content font-medium focus:outline-none focus:ring-0.5 focus:ring-primary focus:border-primary",
2548
2548
  onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
2549
2549
  displayValue: (c) => e.languages[c],
2550
2550
  onFocus: u[1] || (u[1] = (c) => a(c))
2551
2551
  }, null, 8, ["displayValue"]),
2552
- B(M(bl), {
2552
+ B(k(bl), {
2553
2553
  ref_key: "btnSelect",
2554
2554
  ref: s,
2555
2555
  class: "absolute inset-y-0 right-0 flex items-center pr-2"
2556
2556
  }, {
2557
2557
  default: ze(() => [
2558
- B(M(_l), {
2558
+ B(k(_l), {
2559
2559
  class: "h-5 w-5 text-base-content/50",
2560
2560
  "aria-hidden": "true",
2561
2561
  onClick: u[2] || (u[2] = (c) => a(c))
@@ -2563,17 +2563,17 @@ const xe = He("loader", () => {
2563
2563
  ]),
2564
2564
  _: 1
2565
2565
  }, 512),
2566
- B(M(xl), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-base-300 focus:outline-none sm:text-sm z-50" }, {
2566
+ B(k(xl), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-base-300 focus:outline-none sm:text-sm z-50" }, {
2567
2567
  default: ze(() => [
2568
- (h(!0), g(z, null, Y(r.value, ([c, d]) => (h(), W(M(yl), {
2568
+ (h(!0), C(z, null, Y(r.value, ([c, d]) => (h(), W(k(yl), {
2569
2569
  key: c,
2570
2570
  value: c
2571
2571
  }, {
2572
- default: ze(({ active: x, selected: m }) => [
2572
+ default: ze(({ active: w, selected: m }) => [
2573
2573
  f("li", {
2574
2574
  class: P([
2575
2575
  "relative cursor-default select-none py-2 pl-3 pr-9",
2576
- x ? "bg-primary text-primary-content" : "text-base-content"
2576
+ w ? "bg-primary text-primary-content" : "text-base-content"
2577
2577
  ])
2578
2578
  }, [
2579
2579
  f("span", {
@@ -2605,17 +2605,17 @@ const xe = He("loader", () => {
2605
2605
  emits: ["swap"],
2606
2606
  setup(e, { emit: n }) {
2607
2607
  const t = xe(), o = L(() => t.isLoading("translation")), l = n;
2608
- return (s, r) => e.isBidirect ? (h(), g("button", {
2608
+ return (s, r) => e.isBidirect ? (h(), C("button", {
2609
2609
  key: 1,
2610
2610
  onClick: r[0] || (r[0] = (a) => l("swap")),
2611
2611
  disabled: o.value
2612
- }, ls, 8, ns)) : (h(), g("button", {
2612
+ }, ls, 8, ns)) : (h(), C("button", {
2613
2613
  key: 0,
2614
2614
  disabled: o.value
2615
2615
  }, ts, 8, Kl));
2616
2616
  }
2617
2617
  }, Oe = He("language", () => {
2618
- const e = O("auto"), n = O("vi"), t = O({
2618
+ const e = $("auto"), n = $("vi"), t = $({
2619
2619
  src: [],
2620
2620
  target: []
2621
2621
  }), o = L(() => t.value.src[e.value]), l = L(() => t.value.target[n.value]);
@@ -2643,7 +2643,7 @@ const xe = He("loader", () => {
2643
2643
  }, vs = ["onClick"], ps = { class: "flex" }, hs = { class: "grow flex flex-col" }, ms = { class: "grow flex flex-col" }, Jt = 3, gs = {
2644
2644
  __name: "Selects",
2645
2645
  setup(e) {
2646
- const n = Oe(), t = O([]), o = O([]);
2646
+ const n = Oe(), t = $([]), o = $([]);
2647
2647
  function l() {
2648
2648
  n.swap();
2649
2649
  }
@@ -2660,53 +2660,53 @@ const xe = He("loader", () => {
2660
2660
  (s) => {
2661
2661
  s && (o.value.includes(s) || (o.value.unshift(s), o.value = o.value.slice(0, Jt), Ze.setLocalStorage("recentTarget", o.value)));
2662
2662
  }
2663
- ), (s, r) => M(n).languages ? (h(), g("div", as, [
2663
+ ), (s, r) => k(n).languages ? (h(), C("div", as, [
2664
2664
  f("div", rs, [
2665
2665
  f("div", is, [
2666
- t.value.length > 0 ? (h(), g("div", us, [
2667
- (h(!0), g(z, null, Y(t.value, (a) => (h(), g("button", {
2666
+ t.value.length > 0 ? (h(), C("div", us, [
2667
+ (h(!0), C(z, null, Y(t.value, (a) => (h(), C("button", {
2668
2668
  key: a,
2669
2669
  class: "px-1 bg-base-100 border border-primary text-primary text-xs rounded hover:bg-primary hover:text-primary-content",
2670
- onClick: (i) => M(n).src = a
2671
- }, G(M(n).languages.src[a]), 9, cs))), 128))
2670
+ onClick: (i) => k(n).src = a
2671
+ }, G(k(n).languages.src[a]), 9, cs))), 128))
2672
2672
  ])) : R("", !0)
2673
2673
  ]),
2674
2674
  f("div", ds, [
2675
- o.value.length > 0 ? (h(), g("div", fs, [
2676
- (h(!0), g(z, null, Y(o.value, (a) => (h(), g("button", {
2675
+ o.value.length > 0 ? (h(), C("div", fs, [
2676
+ (h(!0), C(z, null, Y(o.value, (a) => (h(), C("button", {
2677
2677
  key: a,
2678
2678
  class: "px-1 bg-base-100 border border-primary text-primary text-xs rounded hover:bg-primary hover:text-primary-content",
2679
- onClick: (i) => M(n).target = a
2680
- }, G(M(n).languages.target[a]), 9, vs))), 128))
2679
+ onClick: (i) => k(n).target = a
2680
+ }, G(k(n).languages.target[a]), 9, vs))), 128))
2681
2681
  ])) : R("", !0)
2682
2682
  ])
2683
2683
  ]),
2684
2684
  f("div", ps, [
2685
2685
  f("div", hs, [
2686
2686
  B(Gt, {
2687
- modelValue: M(n).src,
2688
- "onUpdate:modelValue": r[0] || (r[0] = (a) => M(n).src = a),
2689
- languages: M(n).languages.src,
2687
+ modelValue: k(n).src,
2688
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => k(n).src = a),
2689
+ languages: k(n).languages.src,
2690
2690
  class: "grow"
2691
2691
  }, null, 8, ["modelValue", "languages"])
2692
2692
  ]),
2693
2693
  B(ss, {
2694
- isBidirect: M(n).src !== "auto",
2694
+ isBidirect: k(n).src !== "auto",
2695
2695
  class: "grow-0 mx-3 mt-4 self-start",
2696
2696
  onSwap: l
2697
2697
  }, null, 8, ["isBidirect"]),
2698
2698
  f("div", ms, [
2699
2699
  B(Gt, {
2700
- modelValue: M(n).target,
2701
- "onUpdate:modelValue": r[1] || (r[1] = (a) => M(n).target = a),
2702
- languages: M(n).languages.target,
2700
+ modelValue: k(n).target,
2701
+ "onUpdate:modelValue": r[1] || (r[1] = (a) => k(n).target = a),
2702
+ languages: k(n).languages.target,
2703
2703
  class: "grow"
2704
2704
  }, null, 8, ["modelValue", "languages"])
2705
2705
  ])
2706
2706
  ])
2707
2707
  ])) : R("", !0);
2708
2708
  }
2709
- }, Ie = {
2709
+ }, Le = {
2710
2710
  INPUT_MAX_LENGTH: 5e3,
2711
2711
  INPUT_DEBOUNCE: 1e3,
2712
2712
  IMPROVE_INPUT_MIN_LENGTH: 4,
@@ -2718,10 +2718,10 @@ const xe = He("loader", () => {
2718
2718
  return t;
2719
2719
  }, bs = {}, Cs = { class: "mr-2 loading loading-dots loading-xs" };
2720
2720
  function xs(e, n) {
2721
- return h(), g("span", Cs);
2721
+ return h(), C("span", Cs);
2722
2722
  }
2723
2723
  const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2724
- const e = O({
2724
+ const e = $({
2725
2725
  src: null,
2726
2726
  target: null
2727
2727
  });
@@ -2774,7 +2774,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2774
2774
  },
2775
2775
  emits: ["loadTTS"],
2776
2776
  setup(e, { emit: n }) {
2777
- const t = bt(), o = e, l = n, s = L(() => t.tts[o.type]), r = O(!1), a = new Audio(), i = O(!1);
2777
+ const t = bt(), o = e, l = n, s = L(() => t.tts[o.type]), r = $(!1), a = new Audio(), i = $(!1);
2778
2778
  F(
2779
2779
  s,
2780
2780
  () => {
@@ -2805,11 +2805,11 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2805
2805
  }
2806
2806
  return a.onended = () => {
2807
2807
  r.value = !1;
2808
- }, (x, m) => r.value ? (h(), g("button", {
2808
+ }, (w, m) => r.value ? (h(), C("button", {
2809
2809
  key: 1,
2810
2810
  class: "btn btn-xs btn-circle",
2811
2811
  onClick: ft(d, ["prevent"])
2812
- }, Ss)) : (h(), g("button", {
2812
+ }, Ss)) : (h(), C("button", {
2813
2813
  key: 0,
2814
2814
  class: P(["btn btn-xs btn-circle", [
2815
2815
  { "btn-ghost": !e.disabled },
@@ -2818,7 +2818,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2818
2818
  disabled: e.disabled,
2819
2819
  onClick: ft(u, ["prevent"])
2820
2820
  }, [
2821
- (h(), g("svg", {
2821
+ (h(), C("svg", {
2822
2822
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2823
2823
  viewBox: "0 0 16 16",
2824
2824
  fill: "none",
@@ -2829,26 +2829,26 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2829
2829
  }, $s = {
2830
2830
  class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
2831
2831
  "data-tip": "Clear"
2832
- }, Os = ["disabled"], Is = /* @__PURE__ */ f("path", {
2832
+ }, Os = ["disabled"], Ls = /* @__PURE__ */ f("path", {
2833
2833
  "fill-rule": "evenodd",
2834
2834
  "clip-rule": "evenodd",
2835
2835
  d: "M3.19102 3.19102C3.44571 2.93633 3.85864 2.93633 4.11333 3.19102L12.809 11.8867C13.0637 12.1414 13.0637 12.5543 12.809 12.809C12.5543 13.0637 12.1414 13.0637 11.8867 12.809L3.19102 4.11333C2.93633 3.85864 2.93633 3.44571 3.19102 3.19102Z",
2836
2836
  fill: "currentColor"
2837
- }, null, -1), Ls = /* @__PURE__ */ f("path", {
2837
+ }, null, -1), Is = /* @__PURE__ */ f("path", {
2838
2838
  "fill-rule": "evenodd",
2839
2839
  "clip-rule": "evenodd",
2840
2840
  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",
2841
2841
  fill: "currentColor"
2842
2842
  }, null, -1), ks = [
2843
- Is,
2844
- Ls
2843
+ Ls,
2844
+ Is
2845
2845
  ], Pn = {
2846
2846
  __name: "ClearBtn",
2847
2847
  props: {
2848
2848
  disabled: Boolean
2849
2849
  },
2850
2850
  setup(e) {
2851
- return (n, t) => (h(), g("div", $s, [
2851
+ return (n, t) => (h(), C("div", $s, [
2852
2852
  f("button", {
2853
2853
  class: P(["btn btn-xs btn-circle", [
2854
2854
  { "btn-ghost": !e.disabled },
@@ -2856,7 +2856,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2856
2856
  ]]),
2857
2857
  disabled: e.disabled
2858
2858
  }, [
2859
- (h(), g("svg", {
2859
+ (h(), C("svg", {
2860
2860
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2861
2861
  viewBox: "0 0 16 16",
2862
2862
  fill: "none",
@@ -2885,7 +2885,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2885
2885
  isFilled: Boolean
2886
2886
  },
2887
2887
  setup(e) {
2888
- return (n, t) => (h(), g("div", Ms, [
2888
+ return (n, t) => (h(), C("div", Ms, [
2889
2889
  f("button", {
2890
2890
  class: P(["btn btn-xs btn-circle", [
2891
2891
  { "btn-ghost": !e.disabled },
@@ -2893,13 +2893,13 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2893
2893
  ]]),
2894
2894
  disabled: e.disabled
2895
2895
  }, [
2896
- e.isFilled ? (h(), g("svg", {
2896
+ e.isFilled ? (h(), C("svg", {
2897
2897
  key: 1,
2898
2898
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2899
2899
  viewBox: "0 0 16 16",
2900
2900
  fill: "none",
2901
2901
  xmlns: "http://www.w3.org/2000/svg"
2902
- }, Ps, 2)) : (h(), g("svg", {
2902
+ }, Ps, 2)) : (h(), C("svg", {
2903
2903
  key: 0,
2904
2904
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2905
2905
  viewBox: "0 0 16 16",
@@ -2934,7 +2934,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2934
2934
  isFilled: Boolean
2935
2935
  },
2936
2936
  setup(e) {
2937
- return (n, t) => (h(), g("div", Bs, [
2937
+ return (n, t) => (h(), C("div", Bs, [
2938
2938
  f("button", {
2939
2939
  class: P(["btn btn-xs btn-circle", [
2940
2940
  { "btn-ghost": !e.disabled },
@@ -2942,13 +2942,13 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2942
2942
  ]]),
2943
2943
  disabled: e.disabled
2944
2944
  }, [
2945
- e.isFilled ? (h(), g("svg", {
2945
+ e.isFilled ? (h(), C("svg", {
2946
2946
  key: 1,
2947
2947
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2948
2948
  viewBox: "0 0 12 12",
2949
2949
  fill: "none",
2950
2950
  xmlns: "http://www.w3.org/2000/svg"
2951
- }, Ws, 2)) : (h(), g("svg", {
2951
+ }, Ws, 2)) : (h(), C("svg", {
2952
2952
  key: 0,
2953
2953
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2954
2954
  viewBox: "0 0 12 12",
@@ -2969,12 +2969,12 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2969
2969
  disabled: Boolean
2970
2970
  },
2971
2971
  setup(e) {
2972
- const n = O("Copy"), t = () => {
2972
+ const n = $("Copy"), t = () => {
2973
2973
  n.value = "Copied", setTimeout(() => {
2974
2974
  n.value = "Copy";
2975
2975
  }, 1e3);
2976
2976
  };
2977
- return (o, l) => (h(), g("div", {
2977
+ return (o, l) => (h(), C("div", {
2978
2978
  class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
2979
2979
  "data-tip": n.value
2980
2980
  }, [
@@ -2986,7 +2986,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2986
2986
  disabled: e.disabled,
2987
2987
  onClick: t
2988
2988
  }, [
2989
- (h(), g("svg", {
2989
+ (h(), C("svg", {
2990
2990
  class: P(["w-3 h-3 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2991
2991
  viewBox: "0 0 14 16",
2992
2992
  fill: "none",
@@ -3058,7 +3058,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3058
3058
  emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
3059
3059
  setup(e, { emit: n }) {
3060
3060
  const t = n;
3061
- return (o, l) => (h(), g("div", Xs, [
3061
+ return (o, l) => (h(), C("div", Xs, [
3062
3062
  e.src && e.isTTS ? (h(), W(Es, {
3063
3063
  key: 0,
3064
3064
  type: e.type,
@@ -3066,7 +3066,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3066
3066
  }, null, 8, ["type"])) : R("", !0),
3067
3067
  f("div", Ks, [
3068
3068
  Ee(G(e.srcLabel) + " ", 1),
3069
- e.phonetic ? (h(), g("span", ea, "- " + G(e.phonetic), 1)) : R("", !0)
3069
+ e.phonetic ? (h(), C("span", ea, "- " + G(e.phonetic), 1)) : R("", !0)
3070
3070
  ]),
3071
3071
  e.loading ? (h(), W(Mt, {
3072
3072
  key: 1,
@@ -3099,17 +3099,17 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3099
3099
  ]));
3100
3100
  }
3101
3101
  }, Bn = /* @__PURE__ */ he(na, [["__scopeId", "data-v-faca0157"]]), ve = He("translation", () => {
3102
- const e = O(null), n = O(null), t = O(null), o = O({
3102
+ const e = $(null), n = $(null), t = $(null), o = $({
3103
3103
  src: null,
3104
3104
  target: null
3105
- }), l = O(null), s = O([]), r = O([]), a = O([]), i = O([]), u = O({
3105
+ }), l = $(null), s = $([]), r = $([]), a = $([]), i = $([]), u = $({
3106
3106
  src: null,
3107
3107
  target: null
3108
- }), c = Oe(), d = L(() => c.getLabel(e.value)), x = L(() => c.getLabel(n.value));
3109
- function m(b) {
3110
- e.value = b.src, n.value = b.target, t.value = b.text, o.value = b.phonetic, l.value = b.result, s.value = b.dictionary, r.value = b.definitions, a.value = b.synonyms, i.value = b.examples, u.value = b.tts;
3108
+ }), c = Oe(), d = L(() => c.getLabel(e.value)), w = L(() => c.getLabel(n.value));
3109
+ function m(x) {
3110
+ e.value = x.src, n.value = x.target, t.value = x.text, o.value = x.phonetic, l.value = x.result, s.value = x.dictionary, r.value = x.definitions, a.value = x.synonyms, i.value = x.examples, u.value = x.tts;
3111
3111
  }
3112
- function C() {
3112
+ function y() {
3113
3113
  e.value = null, n.value = null, t.value = null, o.value = {
3114
3114
  src: null,
3115
3115
  target: null
@@ -3122,7 +3122,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3122
3122
  src: e,
3123
3123
  srcLabel: d,
3124
3124
  target: n,
3125
- targetLabel: x,
3125
+ targetLabel: w,
3126
3126
  phonetic: o,
3127
3127
  text: t,
3128
3128
  result: l,
@@ -3132,14 +3132,14 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3132
3132
  examples: i,
3133
3133
  tts: u,
3134
3134
  init: m,
3135
- reset: C
3135
+ reset: y
3136
3136
  };
3137
3137
  });
3138
3138
  function oa(e) {
3139
3139
  return cn() ? (Tt(e), !0) : !1;
3140
3140
  }
3141
3141
  function Ke(e) {
3142
- return typeof e == "function" ? e() : M(e);
3142
+ return typeof e == "function" ? e() : k(e);
3143
3143
  }
3144
3144
  const la = typeof window < "u" && typeof document < "u";
3145
3145
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -3182,7 +3182,7 @@ function Qt(e) {
3182
3182
  }
3183
3183
  const ia = la ? window : void 0;
3184
3184
  function ua() {
3185
- const e = O(!1), n = rn();
3185
+ const e = $(!1), n = rn();
3186
3186
  return n && se(() => {
3187
3187
  e.value = !0;
3188
3188
  }, n), e;
@@ -3201,8 +3201,8 @@ function da(e, n, t = {}) {
3201
3201
  (d) => {
3202
3202
  if (a(), r.value && o) {
3203
3203
  s = new ResizeObserver(n);
3204
- for (const x of d)
3205
- x && s.observe(x, l);
3204
+ for (const w of d)
3205
+ w && s.observe(w, l);
3206
3206
  }
3207
3207
  },
3208
3208
  { immediate: !0, flush: "post" }
@@ -3216,7 +3216,7 @@ function da(e, n, t = {}) {
3216
3216
  }
3217
3217
  function st(e) {
3218
3218
  var n;
3219
- const t = O(e == null ? void 0 : e.element), o = O(e == null ? void 0 : e.input), l = (n = e == null ? void 0 : e.styleProp) != null ? n : "height", s = O(1);
3219
+ const t = $(e == null ? void 0 : e.element), o = $(e == null ? void 0 : e.input), l = (n = e == null ? void 0 : e.styleProp) != null ? n : "height", s = $(1);
3220
3220
  function r() {
3221
3221
  var a;
3222
3222
  if (!t.value)
@@ -3247,23 +3247,23 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3247
3247
  },
3248
3248
  emits: ["change", "clear", "loadTTS"],
3249
3249
  setup(e, { emit: n }) {
3250
- const t = ve(), o = e, l = O(o.text), s = L(() => t.src), r = L(() => t.srcLabel), a = L(() => {
3251
- var C;
3252
- return (C = t.phonetic) == null ? void 0 : C.src;
3250
+ const t = ve(), o = e, l = $(o.text), s = L(() => t.src), r = L(() => t.srcLabel), a = L(() => {
3251
+ var y;
3252
+ return (y = t.phonetic) == null ? void 0 : y.src;
3253
3253
  }), { textarea: i } = st({ input: l, styleProp: "minHeight" }), u = n, c = ra(() => {
3254
3254
  u("change", l.value);
3255
- }, Ie.INPUT_DEBOUNCE);
3255
+ }, Le.INPUT_DEBOUNCE);
3256
3256
  se(() => {
3257
3257
  m();
3258
3258
  });
3259
3259
  function d() {
3260
3260
  if (!l.value) {
3261
- x();
3261
+ w();
3262
3262
  return;
3263
3263
  }
3264
3264
  c();
3265
3265
  }
3266
- function x() {
3266
+ function w() {
3267
3267
  u("clear"), l.value = "", i.value.focus();
3268
3268
  }
3269
3269
  async function m() {
@@ -3271,10 +3271,10 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3271
3271
  }
3272
3272
  return F(
3273
3273
  () => o.text,
3274
- (C) => {
3275
- l.value !== C && m(), l.value = C;
3274
+ (y) => {
3275
+ l.value !== y && m(), l.value = y;
3276
3276
  }
3277
- ), (C, b) => (h(), g("div", fa, [
3277
+ ), (y, x) => (h(), C("div", fa, [
3278
3278
  B(Bn, {
3279
3279
  src: s.value,
3280
3280
  srcLabel: r.value,
@@ -3282,13 +3282,13 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3282
3282
  type: "src",
3283
3283
  phonetic: a.value,
3284
3284
  hasClearBtn: l.value.length > 0,
3285
- onClear: x,
3286
- onLoadTTS: b[0] || (b[0] = (I) => u("loadTTS"))
3285
+ onClear: w,
3286
+ onLoadTTS: x[0] || (x[0] = (O) => u("loadTTS"))
3287
3287
  }, null, 8, ["src", "srcLabel", "isTTS", "phonetic", "hasClearBtn"]),
3288
3288
  tt(f("textarea", {
3289
3289
  ref_key: "textarea",
3290
3290
  ref: i,
3291
- "onUpdate:modelValue": b[1] || (b[1] = (I) => l.value = I),
3291
+ "onUpdate:modelValue": x[1] || (x[1] = (O) => l.value = O),
3292
3292
  class: "w-full outline-none px-2 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden",
3293
3293
  autofocus: "",
3294
3294
  rows: "2",
@@ -3319,10 +3319,10 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3319
3319
  emits: ["loadTTS", "favorite", "aiTranslate", "copy"],
3320
3320
  setup(e, { emit: n }) {
3321
3321
  const t = ve(), o = L(() => t.result), l = L(() => t.target), s = L(() => t.targetLabel), r = L(() => {
3322
- var x;
3323
- return (x = t.phonetic) == null ? void 0 : x.target;
3322
+ var w;
3323
+ return (w = t.phonetic) == null ? void 0 : w.target;
3324
3324
  }), a = xe(), i = L(() => a.isLoading("translation")), { textarea: u, input: c } = st({ input: o, styleProp: "minHeight" }), d = n;
3325
- return (x, m) => (h(), g("div", {
3325
+ return (w, m) => (h(), C("div", {
3326
3326
  class: P([
3327
3327
  "relative p-0.5 bg-[length:300%_300%] bg-[position:0%_50%] border border-base-300 rounded",
3328
3328
  {
@@ -3343,22 +3343,22 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3343
3343
  isFavorite: e.isFavorite,
3344
3344
  isAITranslate: e.isAITranslate,
3345
3345
  phonetic: r.value,
3346
- onFavorite: m[0] || (m[0] = (C) => d("favorite")),
3347
- onLoadTTS: m[1] || (m[1] = (C) => d("loadTTS")),
3348
- onAiTranslate: m[2] || (m[2] = (C) => d("aiTranslate")),
3349
- onCopy: m[3] || (m[3] = (C) => d("copy"))
3346
+ onFavorite: m[0] || (m[0] = (y) => d("favorite")),
3347
+ onLoadTTS: m[1] || (m[1] = (y) => d("loadTTS")),
3348
+ onAiTranslate: m[2] || (m[2] = (y) => d("aiTranslate")),
3349
+ onCopy: m[3] || (m[3] = (y) => d("copy"))
3350
3350
  }, null, 8, ["loading", "src", "srcLabel", "isTTS", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "phonetic"]),
3351
3351
  f("div", ma, [
3352
3352
  tt(f("textarea", {
3353
3353
  ref_key: "textarea",
3354
3354
  ref: u,
3355
- "onUpdate:modelValue": m[4] || (m[4] = (C) => $e(c) ? c.value = C : null),
3355
+ "onUpdate:modelValue": m[4] || (m[4] = (y) => $e(c) ? c.value = y : null),
3356
3356
  class: "w-full outline-none px-2 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden",
3357
3357
  readonly: "",
3358
3358
  rows: "2",
3359
3359
  spellcheck: "false"
3360
3360
  }, null, 512), [
3361
- [nt, M(c)]
3361
+ [nt, k(c)]
3362
3362
  ])
3363
3363
  ])
3364
3364
  ])
@@ -3371,11 +3371,11 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3371
3371
  },
3372
3372
  setup(e) {
3373
3373
  const n = e;
3374
- return (t, o) => (h(), g("button", Ca, [
3375
- n.isExpanded ? (h(), W(M(Tl), {
3374
+ return (t, o) => (h(), C("button", Ca, [
3375
+ n.isExpanded ? (h(), W(k(Tl), {
3376
3376
  key: 0,
3377
3377
  class: "w-7 text-base-content/50"
3378
- })) : (h(), W(M(wl), {
3378
+ })) : (h(), W(k(wl), {
3379
3379
  key: 1,
3380
3380
  class: "w-7 text-base-content/50"
3381
3381
  }))
@@ -3385,12 +3385,12 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3385
3385
  __name: "Dictionary",
3386
3386
  emits: ["translate"],
3387
3387
  setup(e, { emit: n }) {
3388
- const t = O(!0), o = ve(), l = Oe(), s = L(() => o.dictionary), r = n, a = () => {
3388
+ const t = $(!0), o = ve(), l = Oe(), s = L(() => o.dictionary), r = n, a = () => {
3389
3389
  t.value = !t.value;
3390
3390
  }, i = (u) => {
3391
3391
  r("translate", u, o.target, o.src), l.src = o.target, l.target = o.src, window.scrollTo(0, 0);
3392
3392
  };
3393
- return (u, c) => (h(), g(z, null, [
3393
+ return (u, c) => (h(), C(z, null, [
3394
3394
  f("div", {
3395
3395
  class: "flex justify-between items-center",
3396
3396
  onClick: a
@@ -3402,18 +3402,18 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3402
3402
  class: P(["overflow-hidden", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3403
3403
  }, [
3404
3404
  f("ul", null, [
3405
- (h(!0), g(z, null, Y(s.value, (d, x) => (h(), g("li", {
3406
- key: `${d.pos}-${x}`,
3405
+ (h(!0), C(z, null, Y(s.value, (d, w) => (h(), C("li", {
3406
+ key: `${d.pos}-${w}`,
3407
3407
  class: "mb-2"
3408
3408
  }, [
3409
3409
  f("h5", ya, G(d.pos), 1),
3410
3410
  f("ul", wa, [
3411
- (h(!0), g(z, null, Y(d.items, (m, C) => (h(), g("li", {
3412
- key: `${m.word}-${C}`
3411
+ (h(!0), C(z, null, Y(d.items, (m, y) => (h(), C("li", {
3412
+ key: `${m.word}-${y}`
3413
3413
  }, [
3414
3414
  f("span", {
3415
3415
  class: "m-0.5 font-normal badge badge-ghost bg-primary text-primary-content cursor-pointer border-0 rounded",
3416
- onClick: (b) => i(m.word)
3416
+ onClick: (x) => i(m.word)
3417
3417
  }, G(m.word), 9, _a),
3418
3418
  f("small", Ta, " - " + G(m.reverse_translation.join(", ")), 1)
3419
3419
  ]))), 128))
@@ -3423,16 +3423,16 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3423
3423
  ], 2)
3424
3424
  ], 64));
3425
3425
  }
3426
- }, Ea = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Definitions", -1), $a = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Oa = { class: "text-sm text-base-content list-disc list-outside ml-5" }, Ia = /* @__PURE__ */ f("br", null, null, -1), La = {
3426
+ }, Ea = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Definitions", -1), $a = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Oa = { class: "text-sm text-base-content list-disc list-outside ml-5" }, La = /* @__PURE__ */ f("br", null, null, -1), Ia = {
3427
3427
  key: 0,
3428
3428
  class: "italic text-base-content/70"
3429
3429
  }, ka = {
3430
3430
  __name: "Definition",
3431
3431
  setup(e) {
3432
- const n = O(!0), t = ve(), o = L(() => t.definitions), l = () => {
3432
+ const n = $(!0), t = ve(), o = L(() => t.definitions), l = () => {
3433
3433
  n.value = !n.value;
3434
3434
  };
3435
- return (s, r) => (h(), g(z, null, [
3435
+ return (s, r) => (h(), C(z, null, [
3436
3436
  f("div", {
3437
3437
  class: "flex justify-between items-center",
3438
3438
  onClick: l
@@ -3444,19 +3444,19 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3444
3444
  class: P(["overflow-hidden", n.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3445
3445
  }, [
3446
3446
  f("ul", null, [
3447
- (h(!0), g(z, null, Y(o.value, (a, i) => (h(), g("li", {
3447
+ (h(!0), C(z, null, Y(o.value, (a, i) => (h(), C("li", {
3448
3448
  key: `${a.pos}-${i}`,
3449
3449
  class: "mb-2"
3450
3450
  }, [
3451
3451
  f("h5", $a, G(a.pos), 1),
3452
3452
  f("ul", Oa, [
3453
- (h(!0), g(z, null, Y(a.items, (u, c) => (h(), g("li", {
3453
+ (h(!0), C(z, null, Y(a.items, (u, c) => (h(), C("li", {
3454
3454
  key: `${u.gloss}-${c}`,
3455
3455
  class: "mb-1"
3456
3456
  }, [
3457
3457
  f("span", null, G(u.gloss), 1),
3458
- Ia,
3459
- u.example ? (h(), g("small", La, '"' + G(u.example) + '"', 1)) : R("", !0)
3458
+ La,
3459
+ u.example ? (h(), C("small", Ia, '"' + G(u.example) + '"', 1)) : R("", !0)
3460
3460
  ]))), 128))
3461
3461
  ])
3462
3462
  ]))), 128))
@@ -3467,10 +3467,10 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3467
3467
  }, Ma = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Examples", -1), Aa = { class: "text-base-content text-sm list-disc list-outside ml-5 my-2" }, Va = ["innerHTML"], Da = {
3468
3468
  __name: "Example",
3469
3469
  setup(e) {
3470
- const n = O(!0), t = ve(), o = L(() => t.examples), l = () => {
3470
+ const n = $(!0), t = ve(), o = L(() => t.examples), l = () => {
3471
3471
  n.value = !n.value;
3472
3472
  };
3473
- return (s, r) => (h(), g(z, null, [
3473
+ return (s, r) => (h(), C(z, null, [
3474
3474
  f("div", {
3475
3475
  class: "flex justify-between items-center",
3476
3476
  onClick: l
@@ -3482,7 +3482,7 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3482
3482
  class: P(["overflow-hidden", n.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
3483
3483
  }, [
3484
3484
  f("ul", Aa, [
3485
- (h(!0), g(z, null, Y(o.value, (a, i) => (h(), g("li", {
3485
+ (h(!0), C(z, null, Y(o.value, (a, i) => (h(), C("li", {
3486
3486
  key: `${a.definition_id}-${i}`,
3487
3487
  innerHTML: a
3488
3488
  }, null, 8, Va))), 128))
@@ -3494,12 +3494,12 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3494
3494
  __name: "Synonyms",
3495
3495
  emits: ["translate"],
3496
3496
  setup(e, { emit: n }) {
3497
- const t = O(!0), o = ve(), l = L(() => o.synonyms), s = n, r = () => {
3497
+ const t = $(!0), o = ve(), l = L(() => o.synonyms), s = n, r = () => {
3498
3498
  t.value = !t.value;
3499
3499
  }, a = (i) => {
3500
3500
  s("translate", i), window.scrollTo(0, 0);
3501
3501
  };
3502
- return (i, u) => (h(), g(z, null, [
3502
+ return (i, u) => (h(), C(z, null, [
3503
3503
  f("div", {
3504
3504
  class: "flex justify-between items-center",
3505
3505
  onClick: r
@@ -3511,22 +3511,22 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3511
3511
  class: P(["overflow-hidden", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3512
3512
  }, [
3513
3513
  f("ul", null, [
3514
- (h(!0), g(z, null, Y(l.value, (c, d) => (h(), g("li", {
3514
+ (h(!0), C(z, null, Y(l.value, (c, d) => (h(), C("li", {
3515
3515
  key: `${c.pos}-${d}`,
3516
3516
  class: "mb-2"
3517
3517
  }, [
3518
3518
  f("h5", Pa, G(c.pos), 1),
3519
3519
  f("ul", Na, [
3520
- (h(!0), g(z, null, Y(c.items, (x, m) => (h(), g("li", {
3521
- key: `${x.word}-${m}`,
3520
+ (h(!0), C(z, null, Y(c.items, (w, m) => (h(), C("li", {
3521
+ key: `${w.word}-${m}`,
3522
3522
  class: "mb-2"
3523
3523
  }, [
3524
3524
  f("div", Ba, [
3525
- (h(!0), g(z, null, Y(x.synonym, (C, b) => (h(), g("span", {
3526
- key: `${C}-${b}`,
3525
+ (h(!0), C(z, null, Y(w.synonym, (y, x) => (h(), C("span", {
3526
+ key: `${y}-${x}`,
3527
3527
  class: "m-0.5 ml-0 font-normal badge badge-ghost bg-primary text-primary-content cursor-pointer border-0 rounded",
3528
- onClick: (I) => a(C)
3529
- }, G(C), 9, Fa))), 128))
3528
+ onClick: (O) => a(y)
3529
+ }, G(y), 9, Fa))), 128))
3530
3530
  ])
3531
3531
  ]))), 128))
3532
3532
  ])
@@ -3562,20 +3562,20 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3562
3562
  isExpanded: Boolean
3563
3563
  },
3564
3564
  setup(e) {
3565
- return (n, t) => (h(), g("button", {
3565
+ return (n, t) => (h(), C("button", {
3566
3566
  class: P(["btn btn-xs btn-circle", [
3567
3567
  { "btn-ghost": !e.disabled },
3568
3568
  { "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
3569
3569
  ]]),
3570
3570
  disabled: e.disabled
3571
3571
  }, [
3572
- e.isExpanded ? (h(), g("svg", {
3572
+ e.isExpanded ? (h(), C("svg", {
3573
3573
  key: 1,
3574
3574
  class: P(["w-6 h-6 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3575
3575
  viewBox: "0 0 24 24",
3576
3576
  xmlns: "http://www.w3.org/2000/svg",
3577
3577
  fill: "none"
3578
- }, qa, 2)) : (h(), g("svg", {
3578
+ }, qa, 2)) : (h(), C("svg", {
3579
3579
  key: 0,
3580
3580
  class: P(["w-6 h-6 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3581
3581
  viewBox: "0 0 24 24",
@@ -3611,7 +3611,7 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3611
3611
  }
3612
3612
  return (r, a) => {
3613
3613
  var i, u;
3614
- return h(), g("div", Ja, [
3614
+ return h(), C("div", Ja, [
3615
3615
  f("div", Ya, [
3616
3616
  Qa,
3617
3617
  f("div", Xa, [
@@ -3628,9 +3628,9 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3628
3628
  f("div", {
3629
3629
  class: P(["overflow-hidden", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
3630
3630
  }, [
3631
- (i = e.explanation) != null && i.result ? (h(), g("ul", er, [
3632
- (h(!0), g(z, null, Y(((u = e.explanation) == null ? void 0 : u.result.split(`
3633
- `)) || [], (c, d) => (h(), g("li", {
3631
+ (i = e.explanation) != null && i.result ? (h(), C("ul", er, [
3632
+ (h(!0), C(z, null, Y(((u = e.explanation) == null ? void 0 : u.result.split(`
3633
+ `)) || [], (c, d) => (h(), C("li", {
3634
3634
  key: `${c}-${d}`,
3635
3635
  innerHTML: c
3636
3636
  }, null, 8, tr))), 128))
@@ -3649,7 +3649,7 @@ function lr() {
3649
3649
  const Xt = {
3650
3650
  supportRTL: or,
3651
3651
  removeRTL: lr
3652
- }, sr = ["ar", "fa", "iw", "yi", "ur", "pa"], ar = (e) => (Et("data-v-08f9cb53"), e = e(), $t(), e), rr = { class: "pb-6" }, ir = { class: "flex flex-col lg:flex-row lg:gap-2" }, ur = {
3652
+ }, sr = ["ar", "fa", "iw", "yi", "ur", "pa"], ar = (e) => (Et("data-v-ba5c119c"), e = e(), $t(), e), rr = { class: "pb-6" }, ir = { class: "flex flex-col lg:flex-row lg:gap-2" }, ur = {
3653
3653
  id: "input",
3654
3654
  class: "w-full lg:w-[calc(50%-1rem)] flex mt-1"
3655
3655
  }, cr = /* @__PURE__ */ ar(() => /* @__PURE__ */ f("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1)), dr = { class: "w-full lg:w-[calc(50%-1rem)] flex mt-1" }, fr = {
@@ -3699,86 +3699,91 @@ const Xt = {
3699
3699
  "copy"
3700
3700
  ],
3701
3701
  setup(e, { emit: n }) {
3702
- const t = O(""), o = e, l = le("translationStore"), s = le("ttsStore"), r = le("languageStore"), a = le("loaderStore"), i = n, u = () => {
3703
- const $ = o.opt.target;
3704
- sr.includes($) ? Xt.supportRTL() : Xt.removeRTL();
3702
+ const t = $(""), o = $(!1), l = e, s = le("translationStore"), r = le("ttsStore"), a = le("languageStore"), i = le("loaderStore"), u = n, c = () => {
3703
+ const b = l.opt.target;
3704
+ sr.includes(b) ? Xt.supportRTL() : Xt.removeRTL();
3705
3705
  };
3706
3706
  F(
3707
- () => o.translation,
3708
- ($) => {
3709
- a.setLoading("translation", !1), $ && (t.value = $.text, l.init($), s.reset());
3707
+ () => l.translation,
3708
+ (b) => {
3709
+ if (!b) {
3710
+ i.setLoading("translation", !1);
3711
+ return;
3712
+ }
3713
+ const g = b.text || "", _ = t.value || "";
3714
+ o.value && g !== _ || (i.setLoading("translation", !1), t.value = g, s.init(b), r.reset());
3710
3715
  },
3711
3716
  { immediate: !0 }
3712
3717
  ), F(
3713
- [() => o.explanation, () => o.isAIExplain],
3714
- ([$]) => {
3715
- $ != null && $.result && a.setLoading("aiExplanation", !1);
3718
+ [() => l.explanation, () => l.isAIExplain],
3719
+ ([b]) => {
3720
+ b != null && b.result && i.setLoading("aiExplanation", !1);
3716
3721
  },
3717
3722
  { immediate: !0, deep: !0 }
3718
3723
  ), F(
3719
- () => o.tts,
3720
- ($) => {
3721
- if (!$) {
3722
- s.reset();
3724
+ () => l.tts,
3725
+ (b) => {
3726
+ if (!b) {
3727
+ r.reset();
3723
3728
  return;
3724
3729
  }
3725
- s.set($);
3730
+ r.set(b);
3726
3731
  },
3727
3732
  { immediate: !0 }
3728
- ), F([() => o.opt, () => o.languages], ([$, w]) => {
3729
- r.init($, w), u();
3730
- }), F([() => r.src, () => r.target], ([$, w]) => {
3731
- i("opt", { src: $, target: w }), m(t.value);
3733
+ ), F([() => l.opt, () => l.languages], ([b, g]) => {
3734
+ a.init(b, g), c();
3735
+ }), F([() => a.src, () => a.target], ([b, g]) => {
3736
+ u("opt", { src: b, target: g }), y(t.value);
3732
3737
  }), se(() => {
3733
- r.init(o.opt, o.languages), u();
3738
+ a.init(l.opt, l.languages), c();
3734
3739
  });
3735
- function c() {
3736
- t.value = "", o.isAITranslate && C(), l.reset();
3740
+ function d() {
3741
+ o.value = !0, t.value = "", i.setLoading("translation", !1), l.isAITranslate && x(), s.reset();
3737
3742
  }
3738
- function d($) {
3739
- t.value = $, m($);
3743
+ function w(b) {
3744
+ o.value = !0, t.value = b, y(b);
3740
3745
  }
3741
- function x($) {
3742
- const w = $ === "src" ? l.text : l.result;
3743
- i("loadTTS", { type: $, data: w });
3746
+ function m(b) {
3747
+ const g = b === "src" ? s.text : s.result;
3748
+ u("loadTTS", { type: b, data: g });
3744
3749
  }
3745
- function m($, w = r.src, y = r.target) {
3746
- $ && (I(), t.value = $, a.setLoading("translation", !0), i("translate", {
3747
- src: w,
3748
- target: y,
3749
- text: $
3750
+ function y(b, g = a.src, _ = a.target) {
3751
+ b && (D(), t.value = b, i.setLoading("translation", !0), u("translate", {
3752
+ src: g,
3753
+ target: _,
3754
+ text: b
3750
3755
  }));
3751
3756
  }
3752
- function C() {
3753
- o.isAITranslate || a.setLoading("translation", !0), i("aiTranslate", {
3754
- src: r.src,
3755
- target: r.target,
3757
+ function x() {
3758
+ l.isAITranslate || i.setLoading("translation", !0), u("aiTranslate", {
3759
+ src: a.src,
3760
+ target: a.target,
3756
3761
  text: t.value
3757
3762
  });
3758
3763
  }
3759
- function b() {
3760
- o.isAIExplain || a.setLoading("aiExplanation", !0), i("aiExplain", {
3761
- src: r.src,
3762
- target: r.target,
3764
+ function O() {
3765
+ l.isAIExplain || i.setLoading("aiExplanation", !0), u("aiExplain", {
3766
+ src: a.src,
3767
+ target: a.target,
3763
3768
  text: t.value
3764
3769
  });
3765
3770
  }
3766
- function I() {
3767
- const $ = document.getElementById("input");
3768
- $ && $.getBoundingClientRect().top < 0 && $.scrollIntoView({ behavior: "smooth" });
3771
+ function D() {
3772
+ const b = document.getElementById("input");
3773
+ b && b.getBoundingClientRect().top < 0 && b.scrollIntoView({ behavior: "smooth" });
3769
3774
  }
3770
- return ($, w) => {
3771
- var y, _, T, V, S;
3772
- return h(), g("div", rr, [
3775
+ return (b, g) => {
3776
+ var _, T, A, S, E;
3777
+ return h(), C("div", rr, [
3773
3778
  B(gs),
3774
3779
  f("div", ir, [
3775
3780
  f("div", ur, [
3776
3781
  B(pa, {
3777
3782
  text: t.value,
3778
3783
  isTTS: e.isTTS,
3779
- onChange: d,
3780
- onClear: c,
3781
- onLoadTTS: w[0] || (w[0] = (E) => x("src")),
3784
+ onChange: w,
3785
+ onClear: d,
3786
+ onLoadTTS: g[0] || (g[0] = (V) => m("src")),
3782
3787
  class: "flex-grow flex flex-col"
3783
3788
  }, null, 8, ["text", "isTTS"])
3784
3789
  ]),
@@ -3790,50 +3795,50 @@ const Xt = {
3790
3795
  isAITranslate: e.isAITranslate,
3791
3796
  isFavorite: e.isFavorite,
3792
3797
  isTTS: e.isTTS,
3793
- onCopy: w[1] || (w[1] = (E) => {
3794
- var D;
3795
- return $.$emit("copy", (D = M(l)) == null ? void 0 : D.result);
3798
+ onCopy: g[1] || (g[1] = (V) => {
3799
+ var v;
3800
+ return b.$emit("copy", (v = k(s)) == null ? void 0 : v.result);
3796
3801
  }),
3797
- onAiTranslate: C,
3798
- onFavorite: w[2] || (w[2] = (E) => $.$emit("favorite")),
3799
- onLoadTTS: w[3] || (w[3] = (E) => x("target")),
3802
+ onAiTranslate: x,
3803
+ onFavorite: g[2] || (g[2] = (V) => b.$emit("favorite")),
3804
+ onLoadTTS: g[3] || (g[3] = (V) => m("target")),
3800
3805
  class: "flex-grow flex flex-col"
3801
3806
  }, null, 8, ["isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isAITranslate", "isFavorite", "isTTS"])
3802
3807
  ])
3803
3808
  ]),
3804
- e.translation ? (h(), g("div", fr, [
3805
- ((y = M(l).result) == null ? void 0 : y.length) > e.aiExplainMinLength ? (h(), g("div", vr, [
3809
+ e.translation ? (h(), C("div", fr, [
3810
+ ((_ = k(s).result) == null ? void 0 : _.length) > e.aiExplainMinLength ? (h(), C("div", vr, [
3806
3811
  B(nr, {
3807
3812
  isAIExplain: e.isAIExplain,
3808
3813
  explanation: e.explanation,
3809
- onAiExplain: b
3814
+ onAiExplain: O
3810
3815
  }, null, 8, ["isAIExplain", "explanation"])
3811
3816
  ])) : R("", !0),
3812
- (_ = M(l).dictionary) != null && _.length ? (h(), g("div", pr, [
3817
+ (T = k(s).dictionary) != null && T.length ? (h(), C("div", pr, [
3813
3818
  f("div", hr, [
3814
- B(Sa, { onTranslate: m })
3819
+ B(Sa, { onTranslate: y })
3815
3820
  ])
3816
3821
  ])) : R("", !0),
3817
- (T = M(l).definitions) != null && T.length ? (h(), g("div", mr, [
3822
+ (A = k(s).definitions) != null && A.length ? (h(), C("div", mr, [
3818
3823
  f("div", gr, [
3819
3824
  B(ka)
3820
3825
  ])
3821
3826
  ])) : R("", !0),
3822
- (V = M(l).synonyms) != null && V.length ? (h(), g("div", br, [
3827
+ (S = k(s).synonyms) != null && S.length ? (h(), C("div", br, [
3823
3828
  f("div", Cr, [
3824
- B(ja, { onTranslate: m })
3829
+ B(ja, { onTranslate: y })
3825
3830
  ])
3826
3831
  ])) : R("", !0),
3827
- (S = M(l).examples) != null && S.length ? (h(), g("div", xr, [
3832
+ (E = k(s).examples) != null && E.length ? (h(), C("div", xr, [
3828
3833
  f("div", yr, [
3829
3834
  B(Da)
3830
3835
  ])
3831
3836
  ])) : R("", !0)
3832
- ])) : (h(), g("span", wr, "Service unavailable"))
3837
+ ])) : (h(), C("span", wr, "Service unavailable"))
3833
3838
  ]);
3834
3839
  };
3835
3840
  }
3836
- }, Tr = /* @__PURE__ */ he(_r, [["__scopeId", "data-v-08f9cb53"]]), Sr = ["disabled"], Er = /* @__PURE__ */ f("path", {
3841
+ }, Tr = /* @__PURE__ */ he(_r, [["__scopeId", "data-v-ba5c119c"]]), Sr = ["disabled"], Er = /* @__PURE__ */ f("path", {
3837
3842
  "stroke-linecap": "round",
3838
3843
  "stroke-linejoin": "round",
3839
3844
  "stroke-width": "2",
@@ -3847,13 +3852,13 @@ const Xt = {
3847
3852
  },
3848
3853
  emits: ["click"],
3849
3854
  setup(e) {
3850
- return (n, t) => (h(), g("button", {
3855
+ return (n, t) => (h(), C("button", {
3851
3856
  class: "bg-base-100 rounded-full hover:bg-base-200 focus:outline-none active:scale-95",
3852
3857
  onClick: t[0] || (t[0] = (o) => n.$emit("click")),
3853
3858
  disabled: e.disabled,
3854
3859
  "aria-label": "Retry"
3855
3860
  }, [
3856
- (h(), g("svg", {
3861
+ (h(), C("svg", {
3857
3862
  class: P(["h-5 w-5 text-primary", { "opacity-50": e.disabled }]),
3858
3863
  xmlns: "http://www.w3.org/2000/svg",
3859
3864
  fill: "none",
@@ -3862,7 +3867,7 @@ const Xt = {
3862
3867
  }, $r, 2))
3863
3868
  ], 8, Sr));
3864
3869
  }
3865
- }, Ir = ["data-tip"], Lr = ["disabled"], kr = /* @__PURE__ */ f("path", { d: "M2.293,21.707a1,1,0,0,0,1.414,0l3.2-3.2A9.581,9.581,0,0,0,12,20c4.325,0,8.227-3,9.938-7.654a.993.993,0,0,0,0-.692A12.6,12.6,0,0,0,18.7,6.719l3.012-3.012a1,1,0,1,0-1.414-1.414l-3.2,3.2A9.581,9.581,0,0,0,12,4C7.675,4,3.773,7,2.062,11.654a.993.993,0,0,0,0,.692,12.6,12.6,0,0,0,3.243,4.935L2.293,20.293A1,1,0,0,0,2.293,21.707ZM17.266,8.148A10.454,10.454,0,0,1,19.929,12c-1.478,3.657-4.556,6-7.929,6a7.52,7.52,0,0,1-3.632-.954l1.613-1.613A3.947,3.947,0,0,0,12,16a4,4,0,0,0,4-4,3.947,3.947,0,0,0-.567-2.019Zm-7.191,4.363A1.96,1.96,0,0,1,10,12a2,2,0,0,1,2-2,1.96,1.96,0,0,1,.511.075Zm3.85-1.022A1.96,1.96,0,0,1,14,12a2,2,0,0,1-2,2,1.96,1.96,0,0,1-.511-.075ZM4.071,12C5.549,8.343,8.627,6,12,6a7.52,7.52,0,0,1,3.632.954L14.019,8.567A3.947,3.947,0,0,0,12,8a4,4,0,0,0-4,4,3.947,3.947,0,0,0,.567,2.019L6.734,15.852A10.454,10.454,0,0,1,4.071,12Z" }, null, -1), Mr = [
3870
+ }, Lr = ["data-tip"], Ir = ["disabled"], kr = /* @__PURE__ */ f("path", { d: "M2.293,21.707a1,1,0,0,0,1.414,0l3.2-3.2A9.581,9.581,0,0,0,12,20c4.325,0,8.227-3,9.938-7.654a.993.993,0,0,0,0-.692A12.6,12.6,0,0,0,18.7,6.719l3.012-3.012a1,1,0,1,0-1.414-1.414l-3.2,3.2A9.581,9.581,0,0,0,12,4C7.675,4,3.773,7,2.062,11.654a.993.993,0,0,0,0,.692,12.6,12.6,0,0,0,3.243,4.935L2.293,20.293A1,1,0,0,0,2.293,21.707ZM17.266,8.148A10.454,10.454,0,0,1,19.929,12c-1.478,3.657-4.556,6-7.929,6a7.52,7.52,0,0,1-3.632-.954l1.613-1.613A3.947,3.947,0,0,0,12,16a4,4,0,0,0,4-4,3.947,3.947,0,0,0-.567-2.019Zm-7.191,4.363A1.96,1.96,0,0,1,10,12a2,2,0,0,1,2-2,1.96,1.96,0,0,1,.511.075Zm3.85-1.022A1.96,1.96,0,0,1,14,12a2,2,0,0,1-2,2,1.96,1.96,0,0,1-.511-.075ZM4.071,12C5.549,8.343,8.627,6,12,6a7.52,7.52,0,0,1,3.632.954L14.019,8.567A3.947,3.947,0,0,0,12,8a4,4,0,0,0-4,4,3.947,3.947,0,0,0,.567,2.019L6.734,15.852A10.454,10.454,0,0,1,4.071,12Z" }, null, -1), Mr = [
3866
3871
  kr
3867
3872
  ], Ar = /* @__PURE__ */ f("path", { d: "M12,7a4,4,0,1,0,4,4A4,4,0,0,0,12,7Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,13Zm6.5,2v1.5H20a1,1,0,0,1,0,2H18.5V20a1,1,0,0,1-2,0V18.5H15a1,1,0,0,1,0-2h1.5V15a1,1,0,0,1,2,0Zm3.438-4.345a.987.987,0,0,1,0,.69,13.339,13.339,0,0,1-1.08,2.264,1,1,0,1,1-1.715-1.028A11.3,11.3,0,0,0,19.928,11C18.451,7.343,15.373,5,12,5S5.549,7.343,4.072,11a9.315,9.315,0,0,0,6.167,5.787,1,1,0,1,1-.478,1.942,11.393,11.393,0,0,1-7.7-7.383.99.99,0,0,1,0-.691C3.773,6,7.674,3,12,3S20.227,6,21.938,10.655Z" }, null, -1), Vr = [
3868
3873
  Ar
@@ -3874,7 +3879,7 @@ const Xt = {
3874
3879
  },
3875
3880
  emits: ["toggle"],
3876
3881
  setup(e) {
3877
- return (n, t) => (h(), g("div", {
3882
+ return (n, t) => (h(), C("div", {
3878
3883
  class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
3879
3884
  "data-tip": e.isDiffMode ? "Hide Differences" : "Show Differences"
3880
3885
  }, [
@@ -3886,21 +3891,21 @@ const Xt = {
3886
3891
  disabled: e.disabled,
3887
3892
  onClick: t[0] || (t[0] = (o) => n.$emit("toggle"))
3888
3893
  }, [
3889
- e.isDiffMode ? (h(), g("svg", {
3894
+ e.isDiffMode ? (h(), C("svg", {
3890
3895
  key: 1,
3891
3896
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3892
3897
  fill: "currentColor",
3893
3898
  viewBox: "0 0 24 24",
3894
3899
  xmlns: "http://www.w3.org/2000/svg"
3895
- }, Vr, 2)) : (h(), g("svg", {
3900
+ }, Vr, 2)) : (h(), C("svg", {
3896
3901
  key: 0,
3897
3902
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3898
3903
  fill: "currentColor",
3899
3904
  viewBox: "0 0 24 24",
3900
3905
  xmlns: "http://www.w3.org/2000/svg"
3901
3906
  }, Mr, 2))
3902
- ], 10, Lr)
3903
- ], 8, Ir));
3907
+ ], 10, Ir)
3908
+ ], 8, Lr));
3904
3909
  }
3905
3910
  }, Rr = { class: "flex flex-row px-2 pr-10 items-center bg-transparent relative" }, Pr = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, Fn = {
3906
3911
  __name: "InputBtnGroup",
@@ -3936,7 +3941,7 @@ const Xt = {
3936
3941
  },
3937
3942
  emits: ["copy", "clear", "toggleDiff", "info"],
3938
3943
  setup(e) {
3939
- return (n, t) => (h(), g("div", Rr, [
3944
+ return (n, t) => (h(), C("div", Rr, [
3940
3945
  e.loading ? (h(), W(Mt, {
3941
3946
  key: 0,
3942
3947
  class: "absolute right-6 top-2"
@@ -3970,7 +3975,7 @@ const Xt = {
3970
3975
  },
3971
3976
  emits: ["change", "clear", "improve"],
3972
3977
  setup(e, { emit: n }) {
3973
- const t = e, o = O(t.text), { textarea: l } = st({ input: o, styleProp: "minHeight" }), s = n;
3978
+ const t = e, o = $(t.text), { textarea: l } = st({ input: o, styleProp: "minHeight" }), s = n;
3974
3979
  function r() {
3975
3980
  if (!o.value) {
3976
3981
  a();
@@ -3996,7 +4001,7 @@ const Xt = {
3996
4001
  o.value = t.text, X(() => {
3997
4002
  l.value.focus(), i();
3998
4003
  });
3999
- }), (c, d) => (h(), g("div", Nr, [
4004
+ }), (c, d) => (h(), C("div", Nr, [
4000
4005
  B(Fn, {
4001
4006
  src: e.text,
4002
4007
  hasClearBtn: !0,
@@ -4007,14 +4012,14 @@ const Xt = {
4007
4012
  tt(f("textarea", {
4008
4013
  ref_key: "textarea",
4009
4014
  ref: l,
4010
- "onUpdate:modelValue": d[0] || (d[0] = (x) => o.value = x),
4015
+ "onUpdate:modelValue": d[0] || (d[0] = (w) => o.value = w),
4011
4016
  class: "w-full outline-none px-2 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden h-full",
4012
4017
  autofocus: "",
4013
4018
  rows: "2",
4014
4019
  onInput: r,
4015
4020
  onFocus: i,
4016
4021
  onKeydown: Jn(ft(u, ["ctrl", "prevent"]), ["enter"]),
4017
- placeholder: `Min ${M(Ie).IMPROVE_INPUT_MIN_LENGTH} characters. ${M(vt) ? "" : "Ctrl+Enter to improve"}`
4022
+ placeholder: `Min ${k(Le).IMPROVE_INPUT_MIN_LENGTH} characters. ${k(vt) ? "" : "Ctrl+Enter to improve"}`
4018
4023
  }, null, 40, Br), [
4019
4024
  [
4020
4025
  nt,
@@ -4041,30 +4046,30 @@ re.prototype = {
4041
4046
  n = this.castInput(n, l), t = this.castInput(t, l), n = this.removeEmpty(this.tokenize(n, l)), t = this.removeEmpty(this.tokenize(t, l));
4042
4047
  var i = t.length, u = n.length, c = 1, d = i + u;
4043
4048
  l.maxEditLength != null && (d = Math.min(d, l.maxEditLength));
4044
- var x = (o = l.timeout) !== null && o !== void 0 ? o : 1 / 0, m = Date.now() + x, C = [{
4049
+ var w = (o = l.timeout) !== null && o !== void 0 ? o : 1 / 0, m = Date.now() + w, y = [{
4045
4050
  oldPos: -1,
4046
4051
  lastComponent: void 0
4047
- }], b = this.extractCommon(C[0], t, n, 0, l);
4048
- if (C[0].oldPos + 1 >= u && b + 1 >= i)
4049
- return a(Kt(r, C[0].lastComponent, t, n, r.useLongestToken));
4050
- var I = -1 / 0, $ = 1 / 0;
4051
- function w() {
4052
- for (var _ = Math.max(I, -c); _ <= Math.min($, c); _ += 2) {
4053
- var T = void 0, V = C[_ - 1], S = C[_ + 1];
4054
- V && (C[_ - 1] = void 0);
4052
+ }], x = this.extractCommon(y[0], t, n, 0, l);
4053
+ if (y[0].oldPos + 1 >= u && x + 1 >= i)
4054
+ return a(Kt(r, y[0].lastComponent, t, n, r.useLongestToken));
4055
+ var O = -1 / 0, D = 1 / 0;
4056
+ function b() {
4057
+ for (var _ = Math.max(O, -c); _ <= Math.min(D, c); _ += 2) {
4058
+ var T = void 0, A = y[_ - 1], S = y[_ + 1];
4059
+ A && (y[_ - 1] = void 0);
4055
4060
  var E = !1;
4056
4061
  if (S) {
4057
- var D = S.oldPos - _;
4058
- E = S && 0 <= D && D < i;
4062
+ var V = S.oldPos - _;
4063
+ E = S && 0 <= V && V < i;
4059
4064
  }
4060
- var v = V && V.oldPos + 1 < u;
4065
+ var v = A && A.oldPos + 1 < u;
4061
4066
  if (!E && !v) {
4062
- C[_] = void 0;
4067
+ y[_] = void 0;
4063
4068
  continue;
4064
4069
  }
4065
- if (!v || E && V.oldPos < S.oldPos ? T = r.addToPath(S, !0, !1, 0, l) : T = r.addToPath(V, !1, !0, 1, l), b = r.extractCommon(T, t, n, _, l), T.oldPos + 1 >= u && b + 1 >= i)
4070
+ if (!v || E && A.oldPos < S.oldPos ? T = r.addToPath(S, !0, !1, 0, l) : T = r.addToPath(A, !1, !0, 1, l), x = r.extractCommon(T, t, n, _, l), T.oldPos + 1 >= u && x + 1 >= i)
4066
4071
  return a(Kt(r, T.lastComponent, t, n, r.useLongestToken));
4067
- C[_] = T, T.oldPos + 1 >= u && ($ = Math.min($, _ - 1)), b + 1 >= i && (I = Math.max(I, _ + 1));
4072
+ y[_] = T, T.oldPos + 1 >= u && (D = Math.min(D, _ - 1)), x + 1 >= i && (O = Math.max(O, _ + 1));
4068
4073
  }
4069
4074
  c++;
4070
4075
  }
@@ -4073,14 +4078,14 @@ re.prototype = {
4073
4078
  setTimeout(function() {
4074
4079
  if (c > d || Date.now() > m)
4075
4080
  return s();
4076
- w() || _();
4081
+ b() || _();
4077
4082
  }, 0);
4078
4083
  })();
4079
4084
  else
4080
4085
  for (; c <= d && Date.now() <= m; ) {
4081
- var y = w();
4082
- if (y)
4083
- return y;
4086
+ var g = b();
4087
+ if (g)
4088
+ return g;
4084
4089
  }
4085
4090
  },
4086
4091
  addToPath: function(n, t, o, l, s) {
@@ -4149,11 +4154,11 @@ function Kt(e, n, t, o, l) {
4149
4154
  d.value = e.join(o.slice(c, c + d.count)), c += d.count;
4150
4155
  else {
4151
4156
  if (!d.added && l) {
4152
- var x = t.slice(u, u + d.count);
4153
- x = x.map(function(m, C) {
4154
- var b = o[c + C];
4155
- return b.length > m.length ? b : m;
4156
- }), d.value = e.join(x);
4157
+ var w = t.slice(u, u + d.count);
4158
+ w = w.map(function(m, y) {
4159
+ var x = o[c + y];
4160
+ return x.length > m.length ? x : m;
4161
+ }), d.value = e.join(w);
4157
4162
  } else
4158
4163
  d.value = e.join(t.slice(u, u + d.count));
4159
4164
  u += d.count, d.added || (c += d.count);
@@ -4264,15 +4269,15 @@ function on(e, n, t, o) {
4264
4269
  } else if (t)
4265
4270
  e && (t.value = t.value.replace(/^\s*/, "")), o && (o.value = o.value.replace(/^\s*/, ""));
4266
4271
  else if (e && o) {
4267
- var c = o.value.match(/^\s*/)[0], d = n.value.match(/^\s*/)[0], x = n.value.match(/\s*$/)[0], m = en(c, d);
4272
+ var c = o.value.match(/^\s*/)[0], d = n.value.match(/^\s*/)[0], w = n.value.match(/\s*$/)[0], m = en(c, d);
4268
4273
  n.value = ke(n.value, m);
4269
- var C = tn(ke(c, m), x);
4270
- n.value = qe(n.value, C), o.value = Ct(o.value, c, C), e.value = xt(e.value, c, c.slice(0, c.length - C.length));
4274
+ var y = tn(ke(c, m), w);
4275
+ n.value = qe(n.value, y), o.value = Ct(o.value, c, y), e.value = xt(e.value, c, c.slice(0, c.length - y.length));
4271
4276
  } else if (o) {
4272
- var b = o.value.match(/^\s*/)[0], I = n.value.match(/\s*$/)[0], $ = nn(I, b);
4273
- n.value = qe(n.value, $);
4277
+ var x = o.value.match(/^\s*/)[0], O = n.value.match(/\s*$/)[0], D = nn(O, x);
4278
+ n.value = qe(n.value, D);
4274
4279
  } else if (e) {
4275
- var w = e.value.match(/\s*$/)[0], y = n.value.match(/^\s*/)[0], _ = nn(w, y);
4280
+ var b = e.value.match(/\s*$/)[0], g = n.value.match(/^\s*/)[0], _ = nn(b, g);
4276
4281
  n.value = ke(n.value, _);
4277
4282
  }
4278
4283
  }
@@ -4380,15 +4385,15 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4380
4385
  },
4381
4386
  emits: ["copy", "change", "clear"],
4382
4387
  setup(e, { emit: n }) {
4383
- const t = e, o = xe(), l = L(() => o.isLoading("writing")), s = L(() => l.value ? "" : t.text), r = O(""), a = O(Ie.DEFAULT_DIFF_MODE), { textarea: i } = st({ input: s, styleProp: "minHeight" }), u = n;
4388
+ const t = e, o = xe(), l = L(() => o.isLoading("writing")), s = L(() => l.value ? "" : t.text), r = $(""), a = $(Le.DEFAULT_DIFF_MODE), { textarea: i } = st({ input: s, styleProp: "minHeight" }), u = n;
4384
4389
  function c() {
4385
4390
  !l.value && s.value && u("copy", s.value);
4386
4391
  }
4387
- function d(m, C) {
4388
- return Zr(m, C).map((I) => I.added ? `<span class="bg-addedBg inline leading-snug animate-addedText">${I.value}</span>` : I.removed ? `<span class="bg-removedBg inline leading-snug animate-removedText">${I.value}</span>` : I.value).join("");
4392
+ function d(m, y) {
4393
+ return Zr(m, y).map((O) => O.added ? `<span class="bg-addedBg inline leading-snug animate-addedText">${O.value}</span>` : O.removed ? `<span class="bg-removedBg inline leading-snug animate-removedText">${O.value}</span>` : O.value).join("");
4389
4394
  }
4390
- function x() {
4391
- a.value = !a.value, Ie.DEFAULT_DIFF_MODE = a.value;
4395
+ function w() {
4396
+ a.value = !a.value, Le.DEFAULT_DIFF_MODE = a.value;
4392
4397
  }
4393
4398
  return F(
4394
4399
  () => t.text,
@@ -4398,7 +4403,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4398
4403
  { immediate: !0 }
4399
4404
  ), F(s, (m) => {
4400
4405
  u("change", m);
4401
- }), (m, C) => (h(), g("div", qr, [
4406
+ }), (m, y) => (h(), C("div", qr, [
4402
4407
  f("div", Gr, [
4403
4408
  B(Fn, {
4404
4409
  loading: l.value,
@@ -4407,21 +4412,21 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4407
4412
  showDiffToggle: e.type === "check",
4408
4413
  isDiffMode: a.value,
4409
4414
  onCopy: c,
4410
- onToggleDiff: x
4415
+ onToggleDiff: w
4411
4416
  }, null, 8, ["loading", "src", "hasCopyBtn", "showDiffToggle", "isDiffMode"])
4412
4417
  ]),
4413
4418
  f("div", Jr, [
4414
- e.type !== "check" || !a.value ? tt((h(), g("textarea", {
4419
+ e.type !== "check" || !a.value ? tt((h(), C("textarea", {
4415
4420
  key: 0,
4416
4421
  ref_key: "textarea",
4417
4422
  ref: i,
4418
- "onUpdate:modelValue": C[0] || (C[0] = (b) => s.value = b),
4423
+ "onUpdate:modelValue": y[0] || (y[0] = (x) => s.value = x),
4419
4424
  class: "w-full outline-none px-1 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden font-sans text-base leading-normal",
4420
4425
  readonly: "",
4421
4426
  spellcheck: "false"
4422
4427
  }, null, 512)), [
4423
4428
  [nt, s.value]
4424
- ]) : (h(), g("pre", {
4429
+ ]) : (h(), C("pre", {
4425
4430
  key: 1,
4426
4431
  class: "w-full min-h-[80px] outline-none px-1 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden whitespace-pre-wrap break-words font-sans text-base leading-normal",
4427
4432
  innerHTML: l.value ? "" : r.value
@@ -4471,7 +4476,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4471
4476
  },
4472
4477
  emits: ["update:modelValue", "action"],
4473
4478
  setup(e, { emit: n }) {
4474
- const t = e, o = n, l = O(!1), s = O(t.modelValue), r = O(null), a = L(() => t.options.find((m) => m.value === s.value) || t.options[0]);
4479
+ const t = e, o = n, l = $(!1), s = $(t.modelValue), r = $(null), a = L(() => t.options.find((m) => m.value === s.value) || t.options[0]);
4475
4480
  function i() {
4476
4481
  o("action");
4477
4482
  }
@@ -4484,7 +4489,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4484
4489
  function d(m) {
4485
4490
  return new URL((/* @__PURE__ */ Object.assign({ "../../assets/icons/ai-explain.svg": Xr, "../../assets/icons/ai-translate.svg": Kr, "../../assets/icons/chevron-down.svg": ei }))[`../../assets/icons/${m}.svg`], import.meta.url).href;
4486
4491
  }
4487
- function x(m) {
4492
+ function w(m) {
4488
4493
  r.value && !r.value.contains(m.target) && (l.value = !1);
4489
4494
  }
4490
4495
  return F(
@@ -4498,10 +4503,10 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4498
4503
  m && (l.value = !1);
4499
4504
  }
4500
4505
  ), se(() => {
4501
- document.addEventListener("click", x);
4506
+ document.addEventListener("click", w);
4502
4507
  }), Fe(() => {
4503
- document.removeEventListener("click", x);
4504
- }), (m, C) => (h(), g("div", {
4508
+ document.removeEventListener("click", w);
4509
+ }), (m, y) => (h(), C("div", {
4505
4510
  class: "relative inline-block text-left flex-1",
4506
4511
  ref_key: "dropdownRef",
4507
4512
  ref: r
@@ -4544,22 +4549,22 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4544
4549
  ])
4545
4550
  ])
4546
4551
  ], 2),
4547
- l.value ? (h(), g("div", fi, [
4552
+ l.value ? (h(), C("div", fi, [
4548
4553
  f("div", vi, [
4549
- (h(!0), g(z, null, Y(e.options, (b) => (h(), g("a", {
4550
- key: b.value,
4551
- onClick: (I) => c(b),
4554
+ (h(!0), C(z, null, Y(e.options, (x) => (h(), C("a", {
4555
+ key: x.value,
4556
+ onClick: (O) => c(x),
4552
4557
  href: "#",
4553
4558
  class: "block px-1 py-1 text-sm text-base-content hover:bg-base-200 hover:text-primary",
4554
4559
  role: "menuitem"
4555
4560
  }, [
4556
4561
  f("div", hi, [
4557
4562
  f("img", {
4558
- src: d(b.icon),
4563
+ src: d(x.icon),
4559
4564
  alt: "",
4560
4565
  class: "w-4 h-4 mr-2"
4561
4566
  }, null, 8, mi),
4562
- Ee(" " + G(b.label), 1)
4567
+ Ee(" " + G(x.label), 1)
4563
4568
  ])
4564
4569
  ], 8, pi))), 128))
4565
4570
  ])
@@ -4597,54 +4602,54 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4597
4602
  ];
4598
4603
  F(
4599
4604
  () => l.writing,
4600
- (b) => {
4601
- o.setLoading("writing", !1), b && (t.reset(), t.init(b));
4605
+ (x) => {
4606
+ o.setLoading("writing", !1), x && (t.reset(), t.init(x));
4602
4607
  },
4603
4608
  { immediate: !0 }
4604
4609
  ), F(
4605
4610
  () => l.opt,
4606
- (b) => {
4607
- b.src !== t.src && t.init({ ...t.$state, src: b.src });
4611
+ (x) => {
4612
+ x.src !== t.src && t.init({ ...t.$state, src: x.src });
4608
4613
  },
4609
4614
  { deep: !0 }
4610
4615
  );
4611
- function a(b) {
4612
- t.init({ ...t.$state, text: b });
4616
+ function a(x) {
4617
+ t.init({ ...t.$state, text: x });
4613
4618
  }
4614
4619
  function i() {
4615
4620
  t.reset();
4616
4621
  }
4617
- function u(b) {
4618
- t.init({ ...t.$state, result: b });
4622
+ function u(x) {
4623
+ t.init({ ...t.$state, result: x });
4619
4624
  }
4620
4625
  function c() {
4621
4626
  t.init({ ...t.$state, result: "", suggestions: [] });
4622
4627
  }
4623
- function d(b = null) {
4624
- t.text.length < Ie.IMPROVE_INPUT_MIN_LENGTH || (o.setLoading("writing", !0), m(t.text, l.opt.type, b));
4628
+ function d(x = null) {
4629
+ t.text.length < Le.IMPROVE_INPUT_MIN_LENGTH || (o.setLoading("writing", !0), m(t.text, l.opt.type, x));
4625
4630
  }
4626
- function x() {
4631
+ function w() {
4627
4632
  d("retry");
4628
4633
  }
4629
- function m(b, I = l.opt.type, $) {
4630
- b && (o.setLoading("writing", !0), s("write", {
4634
+ function m(x, O = l.opt.type, D) {
4635
+ x && (o.setLoading("writing", !0), s("write", {
4631
4636
  src: l.opt.src,
4632
- text: b,
4633
- action: I,
4634
- flag: $
4637
+ text: x,
4638
+ action: O,
4639
+ flag: D
4635
4640
  }));
4636
4641
  }
4637
- function C(b) {
4638
- o.setLoading("writing", !0), s("opt", { ...l.opt, type: b, text: t.text });
4642
+ function y(x) {
4643
+ o.setLoading("writing", !0), s("opt", { ...l.opt, type: x, text: t.text });
4639
4644
  }
4640
- return (b, I) => {
4641
- var $, w;
4642
- return h(), g("div", Ci, [
4645
+ return (x, O) => {
4646
+ var D, b;
4647
+ return h(), C("div", Ci, [
4643
4648
  f("div", xi, [
4644
4649
  f("div", yi, [
4645
4650
  B(jr, {
4646
4651
  class: "my-2 lg:my-0 w-full flex-grow lg:min-h-[50vh]",
4647
- text: M(t).text,
4652
+ text: k(t).text,
4648
4653
  onChange: a,
4649
4654
  onClear: i,
4650
4655
  onImprove: d
@@ -4656,30 +4661,30 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4656
4661
  class: "w-full",
4657
4662
  modelValue: l.opt.type,
4658
4663
  options: r,
4659
- loading: M(o).isLoading("writing"),
4660
- isTextEmpty: M(t).text && (($ = M(t).text) == null ? void 0 : $.length) < M(Ie).IMPROVE_INPUT_MIN_LENGTH,
4661
- hasResult: !!M(t).result,
4662
- "onUpdate:modelValue": C,
4664
+ loading: k(o).isLoading("writing"),
4665
+ isTextEmpty: k(t).text && ((D = k(t).text) == null ? void 0 : D.length) < k(Le).IMPROVE_INPUT_MIN_LENGTH,
4666
+ hasResult: !!k(t).result,
4667
+ "onUpdate:modelValue": y,
4663
4668
  onAction: d
4664
4669
  }, null, 8, ["modelValue", "loading", "isTextEmpty", "hasResult"])
4665
4670
  ]),
4666
4671
  B(Or, {
4667
4672
  class: "ml-2 lg:m-2",
4668
- disabled: ((w = M(t).text) == null ? void 0 : w.length) < 5 || !M(t).result,
4669
- onClick: x
4673
+ disabled: ((b = k(t).text) == null ? void 0 : b.length) < 5 || !k(t).result,
4674
+ onClick: w
4670
4675
  }, null, 8, ["disabled"])
4671
4676
  ]),
4672
4677
  f("div", Ti, [
4673
4678
  B(Qr, {
4674
4679
  class: "my-2 lg:my-0 w-full flex-grow lg:min-h-[50vh]",
4675
- text: M(t).result,
4676
- originalText: M(t).text,
4680
+ text: k(t).result,
4681
+ originalText: k(t).text,
4677
4682
  type: l.opt.type,
4678
4683
  onChange: u,
4679
4684
  onClear: c,
4680
- onCopy: I[0] || (I[0] = (y) => {
4685
+ onCopy: O[0] || (O[0] = (g) => {
4681
4686
  var _;
4682
- return s("copy", (_ = M(t)) == null ? void 0 : _.result);
4687
+ return s("copy", (_ = k(t)) == null ? void 0 : _.result);
4683
4688
  })
4684
4689
  }, null, 8, ["text", "originalText", "type"])
4685
4690
  ])
@@ -4688,7 +4693,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4688
4693
  };
4689
4694
  }
4690
4695
  }, ln = He("writing", () => {
4691
- const e = O(null), n = O(""), t = O(""), o = O([]), l = O(null), s = Oe(), r = L(() => s.getLabel(e.value));
4696
+ const e = $(null), n = $(""), t = $(""), o = $([]), l = $(null), s = Oe(), r = L(() => s.getLabel(e.value));
4692
4697
  function a(u) {
4693
4698
  e.value = u.src, n.value = u.text, t.value = u.result, o.value = u.suggestions, l.value = u.action;
4694
4699
  }
@@ -4705,7 +4710,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4705
4710
  init: a,
4706
4711
  reset: i
4707
4712
  };
4708
- }), Hn = (e) => (Et("data-v-8885ead1"), e = e(), $t(), e), Ei = ["data-theme"], $i = { class: "flex-none py-2 pl-3 pr-2 shadow border border-base-300" }, Oi = { class: "flex-none" }, Ii = { class: "flex w-full border-b border-base-300 items-center" }, Li = {
4713
+ }), Hn = (e) => (Et("data-v-8885ead1"), e = e(), $t(), e), Ei = ["data-theme"], $i = { class: "flex-none py-2 pl-3 pr-2 shadow border border-base-300" }, Oi = { class: "flex-none" }, Li = { class: "flex w-full border-b border-base-300 items-center" }, Ii = {
4709
4714
  key: 0,
4710
4715
  class: "text-xs text-base-content/40 ml-1 italic"
4711
4716
  }, ki = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Mi = [
@@ -4765,17 +4770,17 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4765
4770
  ve(t), bt(t), Oe(t), xe(t), ln(t);
4766
4771
  const o = ve(), l = bt(), s = Oe(), r = xe(), a = ln();
4767
4772
  ce("translationStore", o), ce("ttsStore", l), ce("languageStore", s), ce("loaderStore", r), ce("writingStore", a);
4768
- const i = n, u = (w, y) => {
4769
- i("nav", { action: w, payload: y });
4770
- }, c = (w) => {
4771
- i("nav", { action: "themeChange", payload: w });
4772
- }, d = (w, y = {}) => {
4773
- i("translate", { action: w, payload: y });
4774
- }, x = (w, y = {}) => {
4775
- i("write", { action: w, payload: y });
4776
- }, m = (w, y = {}) => {
4777
- i("common", { action: w, payload: y });
4778
- }, C = e, b = {
4773
+ const i = n, u = (b, g) => {
4774
+ i("nav", { action: b, payload: g });
4775
+ }, c = (b) => {
4776
+ i("nav", { action: "themeChange", payload: b });
4777
+ }, d = (b, g = {}) => {
4778
+ i("translate", { action: b, payload: g });
4779
+ }, w = (b, g = {}) => {
4780
+ i("write", { action: b, payload: g });
4781
+ }, m = (b, g = {}) => {
4782
+ i("common", { action: b, payload: g });
4783
+ }, y = e, x = {
4779
4784
  activeTab: "translate",
4780
4785
  translateOpts: { src: "auto", target: "en" },
4781
4786
  writeOpts: { type: "check" },
@@ -4791,18 +4796,18 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4791
4796
  isAIExplain: !1,
4792
4797
  aiExplainMinLength: 5,
4793
4798
  isTTS: !0
4794
- }, I = L(() => Object.assign({}, b, C.options)), $ = (w) => {
4795
- if (w.key === "Tab") {
4796
- w.preventDefault();
4797
- const _ = I.value.activeTab === "translate" ? "write" : "translate";
4799
+ }, O = L(() => Object.assign({}, x, y.options)), D = (b) => {
4800
+ if (b.key === "Tab") {
4801
+ b.preventDefault();
4802
+ const _ = O.value.activeTab === "translate" ? "write" : "translate";
4798
4803
  u("activeTab", _);
4799
4804
  }
4800
4805
  };
4801
4806
  return se(() => {
4802
- window.addEventListener("keydown", $);
4807
+ window.addEventListener("keydown", D);
4803
4808
  }), Fe(() => {
4804
- window.removeEventListener("keydown", $);
4805
- }), (w, y) => (h(), g("div", {
4809
+ window.removeEventListener("keydown", D);
4810
+ }), (b, g) => (h(), C("div", {
4806
4811
  "data-theme": e.theme,
4807
4812
  class: "h-screen flex flex-col bg-base-100"
4808
4813
  }, [
@@ -4811,70 +4816,70 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4811
4816
  "header-settings": e.headerSettings,
4812
4817
  "current-theme": e.theme,
4813
4818
  "is-premium": e.isPremium,
4814
- onReader: y[0] || (y[0] = (_) => u("reader")),
4815
- onLearn: y[1] || (y[1] = (_) => u("learn")),
4816
- onSettings: y[2] || (y[2] = (_) => u("settings")),
4817
- onFullScreen: y[3] || (y[3] = (_) => u("fullscreen")),
4818
- onAccount: y[4] || (y[4] = (_) => u("account")),
4819
+ onReader: g[0] || (g[0] = (_) => u("reader")),
4820
+ onLearn: g[1] || (g[1] = (_) => u("learn")),
4821
+ onSettings: g[2] || (g[2] = (_) => u("settings")),
4822
+ onFullScreen: g[3] || (g[3] = (_) => u("fullscreen")),
4823
+ onAccount: g[4] || (g[4] = (_) => u("account")),
4819
4824
  onThemeChange: c
4820
4825
  }, null, 8, ["header-settings", "current-theme", "is-premium"])
4821
4826
  ]),
4822
4827
  f("div", Oi, [
4823
- f("div", Ii, [
4828
+ f("div", Li, [
4824
4829
  f("button", {
4825
4830
  class: P([
4826
4831
  "w-1/2 px-4 py-2 text-sm font-medium",
4827
- I.value.activeTab === "translate" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4832
+ O.value.activeTab === "translate" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4828
4833
  ]),
4829
- onClick: y[5] || (y[5] = (_) => u("activeTab", "translate"))
4834
+ onClick: g[5] || (g[5] = (_) => u("activeTab", "translate"))
4830
4835
  }, [
4831
4836
  Ee(" Translate "),
4832
- !M(vt) && I.value.activeTab !== "translate" ? (h(), g("span", Li, Mi)) : R("", !0)
4837
+ !k(vt) && O.value.activeTab !== "translate" ? (h(), C("span", Ii, Mi)) : R("", !0)
4833
4838
  ], 2),
4834
4839
  f("button", {
4835
4840
  class: P([
4836
4841
  "w-1/2 px-4 py-2 text-sm font-medium",
4837
- I.value.activeTab === "write" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4842
+ O.value.activeTab === "write" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4838
4843
  ]),
4839
- onClick: y[6] || (y[6] = (_) => u("activeTab", "write"))
4844
+ onClick: g[6] || (g[6] = (_) => u("activeTab", "write"))
4840
4845
  }, [
4841
4846
  Ee(" Write "),
4842
- !M(vt) && I.value.activeTab !== "write" ? (h(), g("span", Ai, Di)) : R("", !0)
4847
+ !k(vt) && O.value.activeTab !== "write" ? (h(), C("span", Ai, Di)) : R("", !0)
4843
4848
  ], 2)
4844
4849
  ])
4845
4850
  ]),
4846
4851
  f("div", Ri, [
4847
4852
  f("div", Pi, [
4848
- I.value.activeTab === "translate" ? (h(), W(Tr, {
4853
+ O.value.activeTab === "translate" ? (h(), W(Tr, {
4849
4854
  key: 0,
4850
- opt: I.value.translateOpts,
4851
- languages: I.value.languages,
4855
+ opt: O.value.translateOpts,
4856
+ languages: O.value.languages,
4852
4857
  translation: e.data.translation,
4853
4858
  explanation: e.data.explanation,
4854
4859
  tts: e.data.tts,
4855
- isTTS: I.value.isTTS,
4856
- isFavoriteFeatureEnabled: I.value.isFavoriteFeatureEnabled,
4857
- isAITranslateFeatureEnabled: I.value.isAITranslateFeatureEnabled,
4858
- isFavorite: I.value.isFavorite,
4859
- isAITranslate: I.value.isAITranslate,
4860
- isAIExplain: I.value.isAIExplain,
4861
- aiExplainMinLength: I.value.aiExplainMinLength,
4862
- onOpt: y[7] || (y[7] = (_) => d("updateOpts", _)),
4863
- onTranslate: y[8] || (y[8] = (_) => d("translate", _)),
4864
- onLoadTTS: y[9] || (y[9] = (_) => d("loadTTS", _)),
4865
- onFavorite: y[10] || (y[10] = (_) => d("favorite")),
4866
- onAiTranslate: y[11] || (y[11] = (_) => d("aiTranslate", _)),
4867
- onAiExplain: y[12] || (y[12] = (_) => d("aiExplain", _)),
4868
- onCopy: y[13] || (y[13] = (_) => m("copy", _))
4860
+ isTTS: O.value.isTTS,
4861
+ isFavoriteFeatureEnabled: O.value.isFavoriteFeatureEnabled,
4862
+ isAITranslateFeatureEnabled: O.value.isAITranslateFeatureEnabled,
4863
+ isFavorite: O.value.isFavorite,
4864
+ isAITranslate: O.value.isAITranslate,
4865
+ isAIExplain: O.value.isAIExplain,
4866
+ aiExplainMinLength: O.value.aiExplainMinLength,
4867
+ onOpt: g[7] || (g[7] = (_) => d("updateOpts", _)),
4868
+ onTranslate: g[8] || (g[8] = (_) => d("translate", _)),
4869
+ onLoadTTS: g[9] || (g[9] = (_) => d("loadTTS", _)),
4870
+ onFavorite: g[10] || (g[10] = (_) => d("favorite")),
4871
+ onAiTranslate: g[11] || (g[11] = (_) => d("aiTranslate", _)),
4872
+ onAiExplain: g[12] || (g[12] = (_) => d("aiExplain", _)),
4873
+ onCopy: g[13] || (g[13] = (_) => m("copy", _))
4869
4874
  }, null, 8, ["opt", "languages", "translation", "explanation", "tts", "isTTS", "isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isFavorite", "isAITranslate", "isAIExplain", "aiExplainMinLength"])) : R("", !0),
4870
- I.value.activeTab === "write" ? (h(), W(Si, {
4875
+ O.value.activeTab === "write" ? (h(), W(Si, {
4871
4876
  key: 1,
4872
- opt: I.value.writeOpts,
4873
- languages: I.value.languages,
4877
+ opt: O.value.writeOpts,
4878
+ languages: O.value.languages,
4874
4879
  writing: e.data.writing,
4875
- onOpt: y[14] || (y[14] = (_) => x("updateOpts", _)),
4876
- onWrite: y[15] || (y[15] = (_) => x("write", _)),
4877
- onCopy: y[16] || (y[16] = (_) => m("copy", _))
4880
+ onOpt: g[14] || (g[14] = (_) => w("updateOpts", _)),
4881
+ onWrite: g[15] || (g[15] = (_) => w("write", _)),
4882
+ onCopy: g[16] || (g[16] = (_) => m("copy", _))
4878
4883
  }, null, 8, ["opt", "languages", "writing"])) : R("", !0)
4879
4884
  ])
4880
4885
  ])