@ddict/popup 1.6.4 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +970 -889
- package/dist/popup.umd.js +10 -10
- package/package.json +7 -3
package/dist/popup.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
1
|
+
import { createElementBlock as C, openBlock as h, createElementVNode as f, Fragment as z, renderList as Q, normalizeClass as P, createTextVNode as Ee, normalizeStyle as Zn, toDisplayString as G, createStaticVNode as Ne, createCommentVNode as R, createBlock as Z, computed as O, 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 Y, 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 N, 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(),
|
|
59
|
+
return (s, r) => (h(), C("div", Kn, [
|
|
60
60
|
eo,
|
|
61
61
|
f("ul", to, [
|
|
62
|
-
(h(),
|
|
62
|
+
(h(), C(z, null, Q(o, (a) => f("li", {
|
|
63
63
|
key: a.value
|
|
64
64
|
}, [
|
|
65
65
|
f("input", {
|
|
@@ -86,7 +86,7 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
|
|
|
86
86
|
])
|
|
87
87
|
]));
|
|
88
88
|
}
|
|
89
|
-
}, ao = { class: "flex justify-between" }, ro = { class: "flex flex-row items-center" }, io = /* @__PURE__ */
|
|
89
|
+
}, ao = { class: "flex justify-between" }, ro = { class: "flex flex-row items-center" }, io = /* @__PURE__ */ Ne('<svg class="w-24 text-primary" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M40.151 8.94498H35.7256V23.055H40.151C44.7473 23.055 47.826 20.0825 47.826 15.9795C47.8267 11.8093 44.7678 8.94498 40.151 8.94498ZM40.1312 21.025H37.993V10.9974H40.1312C43.4217 10.9974 45.4972 12.9846 45.4972 15.9795C45.4965 18.9296 43.4012 21.025 40.1312 21.025Z" fill="currentColor"></path><path d="M54.5158 8.94498H50.0903V23.055H54.5158C59.1121 23.055 62.1908 20.0825 62.1908 15.9795C62.1914 11.8093 59.1351 8.94498 54.5158 8.94498ZM54.496 21.025H52.3578V10.9974H54.496C57.789 10.9974 59.8619 12.9846 59.8619 15.9795C59.8613 18.9296 57.766 21.025 54.496 21.025Z" fill="currentColor"></path><path d="M66.7237 8.94498H64.4575V23.055H66.7237V8.94498Z" fill="currentColor"></path><path d="M76.4301 10.7837C78.29 10.7837 79.7436 11.6603 80.7487 13.2207L82.4589 11.9591C81.2401 9.97057 78.9957 8.70953 76.409 8.70953C72.3898 8.64555 68.9048 11.9591 68.9906 16C68.9048 20.0403 72.3898 23.3544 76.409 23.2905C79.0385 23.2905 81.2618 22.0294 82.4589 20.0409L80.7487 18.7793C79.7436 20.3397 78.29 21.2163 76.4301 21.2163C73.544 21.2163 71.3418 18.993 71.3418 16C71.3418 13.007 73.5433 10.7837 76.4301 10.7837Z" fill="currentColor"></path><path d="M83.3135 8.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z" fill="currentColor"></path><path d="M8.66351 4.7121H4.604V15.4427L6.87208 13.3839V6.79143H8.64559C11.4639 6.79143 13.2835 8.47857 13.2835 11.0877C13.2835 13.6916 11.421 15.4427 8.64559 15.4427H4.604V17.5016H8.66351C12.7531 17.5016 15.6098 14.8644 15.6098 11.0877C15.6104 7.27575 12.8196 4.7121 8.66351 4.7121Z" fill="currentColor"></path><path d="M26.2425 9.25528H21.5502L20.7537 14.293L21.4523 14.3308L21.4069 14.7294C21.3916 14.8656 21.3289 15.0448 21.112 15.1734C21.1017 15.9399 21.0845 17.0493 20.9706 18.1766H26.5937V19.8586H21.4677C22.4133 22.9424 24.1254 24.9648 26.5611 25.8669L27.1536 26.0864L26.6795 26.5048C26.4875 26.6737 26.2182 27.0141 26.0896 27.2489L25.9258 27.5438L25.6155 27.4152C23.167 26.4095 21.4223 24.4926 20.2905 21.563C19.3602 24.3365 17.5797 26.2553 14.8592 27.428L14.5438 27.5617L14.3775 27.2642C14.2764 27.08 14.0294 26.7876 13.8151 26.5989L13.3564 26.1951L13.9239 25.9655C16.4555 24.9392 18.064 23.1414 18.8228 20.4837C19.6647 19.8381 20.2099 18.8221 20.2169 17.6801V4.53231C20.2169 2.58349 18.6334 1 16.6846 1H3.53487C1.58349 1 0 2.58349 0 4.53231V17.6795C0 19.6283 1.58349 21.2143 3.53487 21.2143H8.25528V27.2431C8.25528 29.3135 9.93986 31 12.0096 31H26.2431C28.3161 31 29.9974 29.3129 29.9974 27.2431V13.0096C29.9974 10.9392 28.3154 9.25528 26.2425 9.25528ZM3.53487 19.4517C2.55662 19.4517 1.762 18.6603 1.762 17.6788V4.53231C1.762 3.55662 2.55598 2.762 3.53487 2.762H16.6839C17.6571 2.762 18.4517 3.55598 18.4517 4.53231V17.6795C18.4517 17.778 18.444 17.8733 18.4267 17.9667C18.3941 18.1811 18.3231 18.38 18.215 18.5592C17.9149 19.0934 17.3372 19.4517 16.6846 19.4517H3.53487Z" fill="currentColor"></path></svg>', 1), uo = {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "ml-2 px-1.5 py-0.5 text-[10px] font-medium bg-primary/10 text-primary border border-primary/20 rounded-full"
|
|
92
92
|
}, co = { class: "flex" }, fo = /* @__PURE__ */ f("svg", {
|
|
@@ -176,7 +176,7 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
|
|
|
176
176
|
})
|
|
177
177
|
], -1), Co = [
|
|
178
178
|
bo
|
|
179
|
-
], xo = /* @__PURE__ */
|
|
179
|
+
], xo = /* @__PURE__ */ Ne('<svg class="w-6 h-6 text-primary" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.467 2.47236C2.75841 2.17799 3.23328 2.17559 3.52764 2.467L8.52765 7.41675C8.82201 7.70816 8.82441 8.18303 8.533 8.4774C8.24159 8.77176 7.76672 8.77416 7.47235 8.48275L2.47236 3.533C2.17799 3.24159 2.17559 2.76672 2.467 2.47236Z" fill="currentColor"></path><path d="M8.533 15.4724C8.82441 15.7667 8.82201 16.2416 8.52765 16.533L3.52765 21.4828C3.23328 21.7742 2.75841 21.7718 2.467 21.4774C2.17559 21.183 2.17799 20.7082 2.47236 20.4167L7.47235 15.467C7.76672 15.1756 8.24159 15.178 8.533 15.4724Z" fill="currentColor"></path><path d="M15.52 15.4697C15.8129 15.1768 16.2877 15.1768 16.5806 15.4697L21.5304 20.4194C21.8233 20.7123 21.8233 21.1872 21.5304 21.4801C21.2375 21.773 20.7626 21.773 20.4697 21.4801L15.52 16.5303C15.2271 16.2374 15.2271 15.7626 15.52 15.4697Z" fill="currentColor"></path><path d="M21.4801 2.46967C21.773 2.76256 21.773 3.23744 21.4801 3.53033L16.5303 8.48008C16.2374 8.77297 15.7626 8.77297 15.4697 8.48008C15.1768 8.18719 15.1768 7.71231 15.4697 7.41942L20.4194 2.46967C20.7123 2.17678 21.1872 2.17678 21.4801 2.46967Z" fill="currentColor"></path><path d="M15.75 3C15.75 2.58579 16.0858 2.25 16.5 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V7.5C21.75 7.91421 21.4142 8.25 21 8.25C20.5858 8.25 20.25 7.91421 20.25 7.5V3.75H16.5C16.0858 3.75 15.75 3.41421 15.75 3Z" fill="currentColor"></path><path d="M21 15.75C21.4142 15.75 21.75 16.0858 21.75 16.5V21C21.75 21.4142 21.4142 21.75 21 21.75H16.5C16.0858 21.75 15.75 21.4142 15.75 21C15.75 20.5858 16.0858 20.25 16.5 20.25H20.25V16.5C20.25 16.0858 20.5858 15.75 21 15.75Z" fill="currentColor"></path><path d="M3 15.75C3.41421 15.75 3.75 16.0858 3.75 16.5V20.25H7.5C7.91421 20.25 8.25 20.5858 8.25 21C8.25 21.4142 7.91421 21.75 7.5 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V16.5C2.25 16.0858 2.58579 15.75 3 15.75Z" fill="currentColor"></path><path d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H7.5C7.91421 2.25 8.25 2.58579 8.25 3C8.25 3.41421 7.91421 3.75 7.5 3.75H3.75V7.5C3.75 7.91421 3.41421 8.25 3 8.25C2.58579 8.25 2.25 7.91421 2.25 7.5V3Z" fill="currentColor"></path></svg>', 1), yo = [
|
|
180
180
|
xo
|
|
181
181
|
], wo = {
|
|
182
182
|
__name: "Header",
|
|
@@ -207,18 +207,18 @@ 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(),
|
|
210
|
+
return (l, s) => (h(), C("div", ao, [
|
|
211
211
|
f("div", ro, [
|
|
212
212
|
io,
|
|
213
|
-
e.isPremium ? (h(),
|
|
213
|
+
e.isPremium ? (h(), C("span", uo, "Premium")) : R("", !0)
|
|
214
214
|
]),
|
|
215
215
|
f("div", co, [
|
|
216
|
-
e.headerSettings.showThemeSelector ? (h(),
|
|
216
|
+
e.headerSettings.showThemeSelector ? (h(), Z(so, {
|
|
217
217
|
key: 0,
|
|
218
218
|
"current-theme": e.currentTheme,
|
|
219
219
|
onThemeChange: o
|
|
220
220
|
}, null, 8, ["current-theme"])) : R("", !0),
|
|
221
|
-
e.headerSettings.showReader ? (h(),
|
|
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(),
|
|
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(),
|
|
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(),
|
|
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(),
|
|
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,25 +249,25 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
|
|
|
249
249
|
]));
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
function
|
|
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((
|
|
259
|
+
if (!(c.length !== o.length || c.some((g, x) => o[x] !== g)))
|
|
260
260
|
return l;
|
|
261
261
|
o = c;
|
|
262
|
-
let
|
|
263
|
-
if (t.key && ((r = t.debug) != null && r.call(t)) && (
|
|
264
|
-
const
|
|
265
|
-
for (
|
|
266
|
-
|
|
267
|
-
return
|
|
262
|
+
let T;
|
|
263
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (T = Date.now()), l = n(...c), t.key && ((a = t.debug) != null && a.call(t))) {
|
|
264
|
+
const g = Math.round((Date.now() - u) * 100) / 100, x = Math.round((Date.now() - T) * 100) / 100, b = x / 16, A = (V, I) => {
|
|
265
|
+
for (V = String(V); V.length < I; )
|
|
266
|
+
V = " " + V;
|
|
267
|
+
return V;
|
|
268
268
|
};
|
|
269
269
|
console.info(
|
|
270
|
-
`%c⏱ ${
|
|
270
|
+
`%c⏱ ${A(x, 5)} /${A(g, 5)} ms`,
|
|
271
271
|
`
|
|
272
272
|
font-size: .6rem;
|
|
273
273
|
font-weight: bold;
|
|
@@ -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,
|
|
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
|
-
},
|
|
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:
|
|
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 =
|
|
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 =
|
|
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
|
|
501
|
-
|
|
502
|
-
const
|
|
503
|
-
if (!
|
|
504
|
-
|
|
500
|
+
let T = (i = this.measurementsCache[d]) == null ? void 0 : i.measureElement;
|
|
501
|
+
T || (T = (E) => {
|
|
502
|
+
const y = s(d), w = this.elementsCache.get(y);
|
|
503
|
+
if (!E) {
|
|
504
|
+
w && (this.observer.unobserve(w), this.elementsCache.delete(y));
|
|
505
505
|
return;
|
|
506
506
|
}
|
|
507
|
-
|
|
507
|
+
w !== E && (w && this.observer.unobserve(w), this.observer.observe(E), this.elementsCache.set(y, E)), E.isConnected && this.resizeItem(
|
|
508
508
|
d,
|
|
509
|
-
this.options.measureElement(
|
|
509
|
+
this.options.measureElement(E, void 0, this)
|
|
510
510
|
);
|
|
511
511
|
});
|
|
512
|
-
const
|
|
512
|
+
const g = s(d), x = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d), b = x ? x.end + this.options.gap : o + l, A = a.get(g), V = typeof A == "number" ? A : this.options.estimateSize(d), I = b + V, _ = x ? x.lane : d % this.options.lanes;
|
|
513
513
|
c[d] = {
|
|
514
514
|
index: d,
|
|
515
515
|
start: b,
|
|
516
|
-
size:
|
|
517
|
-
end:
|
|
518
|
-
key:
|
|
519
|
-
lane:
|
|
520
|
-
measureElement:
|
|
516
|
+
size: V,
|
|
517
|
+
end: I,
|
|
518
|
+
key: g,
|
|
519
|
+
lane: _,
|
|
520
|
+
measureElement: T
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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(
|
|
704
|
+
const n = new Mo(k(e)), t = Un(n), o = n._didMount();
|
|
705
705
|
return F(
|
|
706
|
-
() =>
|
|
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
|
-
() =>
|
|
714
|
+
() => k(e),
|
|
715
715
|
(l) => {
|
|
716
716
|
n.setOptions({
|
|
717
717
|
...l,
|
|
@@ -728,17 +728,17 @@ function Vo(e) {
|
|
|
728
728
|
}
|
|
729
729
|
function Do(e) {
|
|
730
730
|
return Vo(
|
|
731
|
-
|
|
731
|
+
O(() => ({
|
|
732
732
|
observeElementRect: $o,
|
|
733
|
-
observeElementOffset:
|
|
733
|
+
observeElementOffset: Lo,
|
|
734
734
|
scrollToFn: ko,
|
|
735
|
-
...
|
|
735
|
+
...k(e)
|
|
736
736
|
}))
|
|
737
737
|
);
|
|
738
738
|
}
|
|
739
739
|
function Ro(e, n, t) {
|
|
740
|
-
let o =
|
|
741
|
-
return [
|
|
740
|
+
let o = $(t == null ? void 0 : t.value), l = O(() => e.value !== void 0);
|
|
741
|
+
return [O(() => l.value ? e.value : o.value), function(s) {
|
|
742
742
|
return l.value || (o.value = s), n == null ? void 0 : n(s);
|
|
743
743
|
}];
|
|
744
744
|
}
|
|
@@ -785,12 +785,12 @@ function Qe() {
|
|
|
785
785
|
} };
|
|
786
786
|
return n;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Bo() {
|
|
789
789
|
let e = Qe();
|
|
790
790
|
return Fe(() => e.dispose()), e;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
793
|
-
let e =
|
|
792
|
+
function No() {
|
|
793
|
+
let e = Bo();
|
|
794
794
|
return (n) => {
|
|
795
795
|
e.dispose(), e.nextFrame(n);
|
|
796
796
|
};
|
|
@@ -799,7 +799,7 @@ let Fo = Symbol("headlessui.useid"), jo = 0;
|
|
|
799
799
|
function je() {
|
|
800
800
|
return le(Fo, () => `${++jo}`)();
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function B(e) {
|
|
803
803
|
var n;
|
|
804
804
|
if (e == null || e.value == null) return null;
|
|
805
805
|
let t = (n = e.value.$el) != null ? n : e.value;
|
|
@@ -813,10 +813,10 @@ function ue(e, n, ...t) {
|
|
|
813
813
|
let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map((l) => `"${l}"`).join(", ")}.`);
|
|
814
814
|
throw Error.captureStackTrace && Error.captureStackTrace(o, ue), o;
|
|
815
815
|
}
|
|
816
|
-
var Ho = Object.defineProperty, zo = (e, n, t) => n in e ? Ho(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t,
|
|
816
|
+
var Ho = Object.defineProperty, zo = (e, n, t) => n in e ? Ho(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, Bt = (e, n, t) => (zo(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
817
817
|
let Zo = class {
|
|
818
818
|
constructor() {
|
|
819
|
-
|
|
819
|
+
Bt(this, "current", this.detect()), Bt(this, "currentId", 0);
|
|
820
820
|
}
|
|
821
821
|
set(n) {
|
|
822
822
|
this.current !== n && (this.currentId = 0, this.current = n);
|
|
@@ -837,25 +837,25 @@ let Zo = class {
|
|
|
837
837
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
838
838
|
}
|
|
839
839
|
}, Ot = new Zo();
|
|
840
|
-
function
|
|
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")) {
|
|
844
|
-
let n =
|
|
844
|
+
let n = B(e);
|
|
845
845
|
if (n) return n.ownerDocument;
|
|
846
846
|
}
|
|
847
847
|
return document;
|
|
848
848
|
}
|
|
849
|
-
let
|
|
849
|
+
let Nt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
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 =
|
|
854
|
-
return e.matches(
|
|
853
|
+
return e === ((t = Lt(e)) == null ? void 0 : t.body) ? !1 : ue(n, { 0() {
|
|
854
|
+
return e.matches(Nt);
|
|
855
855
|
}, 1() {
|
|
856
856
|
let o = e;
|
|
857
857
|
for (; o !== null; ) {
|
|
858
|
-
if (o.matches(
|
|
858
|
+
if (o.matches(Nt)) return !0;
|
|
859
859
|
o = o.parentElement;
|
|
860
860
|
}
|
|
861
861
|
return !1;
|
|
@@ -894,7 +894,7 @@ function Ko(e, n, t) {
|
|
|
894
894
|
window.addEventListener(e, n, t), o(() => window.removeEventListener(e, n, t));
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
|
-
function el(e, n, t =
|
|
897
|
+
function el(e, n, t = O(() => !0)) {
|
|
898
898
|
function o(s, r) {
|
|
899
899
|
if (!t.value || s.defaultPrevented) return;
|
|
900
900
|
let a = r(s);
|
|
@@ -904,12 +904,12 @@ function el(e, n, t = L(() => !0)) {
|
|
|
904
904
|
}(e);
|
|
905
905
|
for (let u of i) {
|
|
906
906
|
if (u === null) continue;
|
|
907
|
-
let c = u instanceof HTMLElement ? u :
|
|
907
|
+
let c = u instanceof HTMLElement ? u : B(u);
|
|
908
908
|
if (c != null && c.contains(a) || s.composed && s.composedPath().includes(c)) return;
|
|
909
909
|
}
|
|
910
910
|
return !Go(a, fn.Loose) && a.tabIndex !== -1 && s.preventDefault(), n(s, a);
|
|
911
911
|
}
|
|
912
|
-
let l =
|
|
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,19 +926,19 @@ 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 =
|
|
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(() => {
|
|
933
933
|
var o;
|
|
934
|
-
t.value ||
|
|
934
|
+
t.value || B(n) && B(n) instanceof HTMLButtonElement && !((o = B(n)) != null && o.hasAttribute("type")) && (t.value = "button");
|
|
935
935
|
}), t;
|
|
936
936
|
}
|
|
937
937
|
function jt(e) {
|
|
938
938
|
return [e.screenX, e.screenY];
|
|
939
939
|
}
|
|
940
940
|
function nl() {
|
|
941
|
-
let e =
|
|
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 =
|
|
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,
|
|
979
|
-
for (let [
|
|
980
|
-
d && (c["data-headlessui-state"] =
|
|
978
|
+
let d = !1, T = [];
|
|
979
|
+
for (let [g, x] of Object.entries(o)) typeof x == "boolean" && (d = !0), x === !0 && T.push(g);
|
|
980
|
+
d && (c["data-headlessui-state"] = T.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, ...
|
|
985
|
-
if (!al(d) ||
|
|
984
|
+
let [d, ...T] = u ?? [];
|
|
985
|
+
if (!al(d) || T.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, A, V) => V.indexOf(b) === A).sort((b, A) => b.localeCompare(A)).map((b) => ` - ${b}`).join(`
|
|
986
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(`
|
|
987
987
|
`)].join(`
|
|
988
988
|
`));
|
|
989
|
-
let
|
|
990
|
-
for (let b in
|
|
991
|
-
return
|
|
989
|
+
let g = hn((r = d.props) != null ? r : {}, i, c), x = sn(d, g, !0);
|
|
990
|
+
for (let b in g) b.startsWith("on") && (x.props || (x.props = {}), x.props[b] = g[b]);
|
|
991
|
+
return x;
|
|
992
992
|
}
|
|
993
993
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
994
994
|
}
|
|
@@ -1040,7 +1040,7 @@ function il() {
|
|
|
1040
1040
|
function ul(e) {
|
|
1041
1041
|
ce(gn, e);
|
|
1042
1042
|
}
|
|
1043
|
-
var
|
|
1043
|
+
var X = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(X || {}), bn = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(bn || {});
|
|
1044
1044
|
function cl(e) {
|
|
1045
1045
|
function n() {
|
|
1046
1046
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", n));
|
|
@@ -1115,19 +1115,19 @@ function we(e) {
|
|
|
1115
1115
|
return n;
|
|
1116
1116
|
}
|
|
1117
1117
|
let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, { slots: n }) {
|
|
1118
|
-
let t = we("VirtualProvider"), o =
|
|
1119
|
-
let a =
|
|
1118
|
+
let t = we("VirtualProvider"), o = O(() => {
|
|
1119
|
+
let a = B(t.optionsRef);
|
|
1120
1120
|
if (!a) return { start: 0, end: 0 };
|
|
1121
1121
|
let i = window.getComputedStyle(a);
|
|
1122
1122
|
return { start: parseFloat(i.paddingBlockStart || i.paddingTop), end: parseFloat(i.paddingBlockEnd || i.paddingBottom) };
|
|
1123
|
-
}), l = Do(
|
|
1123
|
+
}), l = Do(O(() => ({ scrollPaddingStart: o.value.start, scrollPaddingEnd: o.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
1124
1124
|
return 40;
|
|
1125
1125
|
}, getScrollElement() {
|
|
1126
|
-
return
|
|
1127
|
-
}, overscan: 12 }))), s =
|
|
1126
|
+
return B(t.optionsRef);
|
|
1127
|
+
}, overscan: 12 }))), s = O(() => {
|
|
1128
1128
|
var a;
|
|
1129
1129
|
return (a = t.virtual.value) == null ? void 0 : a.options;
|
|
1130
|
-
}), r =
|
|
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 =
|
|
1141
|
-
function
|
|
1142
|
-
let p = d.value !== null ? c.value[d.value] : null,
|
|
1143
|
-
return j === -1 && (j = null), { options:
|
|
1140
|
+
let l = $(1), s = $(null), r = $(null), a = $(null), i = $(null), u = $({ static: !1, hold: !1 }), c = $([]), d = $(null), T = $(2), g = $(!1);
|
|
1141
|
+
function x(v = (p) => p) {
|
|
1142
|
+
let p = d.value !== null ? c.value[d.value] : null, L = v(c.value.slice()), M = L.length > 0 && L[0].dataRef.order.value !== null ? L.sort((H, K) => H.dataRef.order.value - K.dataRef.order.value) : Yo(L, (H) => B(H.dataRef.domRef)), j = p ? M.indexOf(p) : null;
|
|
1143
|
+
return j === -1 && (j = null), { options: M, activeOptionIndex: j };
|
|
1144
1144
|
}
|
|
1145
|
-
let b =
|
|
1146
|
-
function
|
|
1145
|
+
let b = O(() => e.multiple ? 1 : 0), A = O(() => e.nullable), [V, I] = Ro(O(() => e.modelValue), (v) => o("update:modelValue", v), O(() => e.defaultValue)), _ = O(() => V.value === void 0 ? ue(b.value, { 1: [], 0: void 0 }) : V.value), E = null, y = null;
|
|
1146
|
+
function w(v) {
|
|
1147
1147
|
return ue(b.value, { 0() {
|
|
1148
|
-
return
|
|
1148
|
+
return I == null ? void 0 : I(v);
|
|
1149
1149
|
}, 1: () => {
|
|
1150
|
-
let p = ne(
|
|
1151
|
-
return
|
|
1150
|
+
let p = ne(S.value.value).slice(), L = ne(v), M = p.findIndex((j) => S.compare(L, ne(j)));
|
|
1151
|
+
return M === -1 ? p.push(L) : p.splice(M, 1), I == null ? void 0 : I(p);
|
|
1152
1152
|
} });
|
|
1153
1153
|
}
|
|
1154
|
-
let
|
|
1154
|
+
let m = O(() => {
|
|
1155
1155
|
});
|
|
1156
|
-
F([
|
|
1157
|
-
if (
|
|
1158
|
-
let
|
|
1159
|
-
|
|
1156
|
+
F([m], ([v], [p]) => {
|
|
1157
|
+
if (S.virtual.value && v && p && d.value !== null) {
|
|
1158
|
+
let L = v.indexOf(p[d.value]);
|
|
1159
|
+
L !== -1 ? d.value = L : d.value = null;
|
|
1160
1160
|
}
|
|
1161
1161
|
});
|
|
1162
|
-
let
|
|
1162
|
+
let S = { comboboxState: l, value: _, mode: b, compare(v, p) {
|
|
1163
1163
|
if (typeof e.by == "string") {
|
|
1164
|
-
let
|
|
1165
|
-
return (v == null ? void 0 : v[
|
|
1164
|
+
let L = e.by;
|
|
1165
|
+
return (v == null ? void 0 : v[L]) === (p == null ? void 0 : p[L]);
|
|
1166
1166
|
}
|
|
1167
1167
|
return e.by === null ? fl(v, p) : e.by(v, p);
|
|
1168
1168
|
}, calculateIndex(v) {
|
|
1169
|
-
return
|
|
1170
|
-
}, defaultValue:
|
|
1171
|
-
|
|
1172
|
-
}, activeOptionIndex:
|
|
1173
|
-
if (
|
|
1174
|
-
if (
|
|
1175
|
-
let p =
|
|
1176
|
-
var
|
|
1177
|
-
return !((
|
|
1169
|
+
return S.virtual.value ? e.by === null ? S.virtual.value.options.indexOf(v) : S.virtual.value.options.findIndex((p) => S.compare(p, v)) : c.value.findIndex((p) => S.compare(p.dataRef.value, v));
|
|
1170
|
+
}, defaultValue: O(() => e.defaultValue), nullable: A, immediate: O(() => !1), virtual: O(() => null), inputRef: r, labelRef: s, buttonRef: a, optionsRef: i, disabled: O(() => e.disabled), options: c, change(v) {
|
|
1171
|
+
I(v);
|
|
1172
|
+
}, activeOptionIndex: O(() => {
|
|
1173
|
+
if (g.value && d.value === null && (S.virtual.value ? S.virtual.value.options.length > 0 : c.value.length > 0)) {
|
|
1174
|
+
if (S.virtual.value) {
|
|
1175
|
+
let p = S.virtual.value.options.findIndex((L) => {
|
|
1176
|
+
var M;
|
|
1177
|
+
return !((M = S.virtual.value) != null && M.disabled(L));
|
|
1178
1178
|
});
|
|
1179
1179
|
if (p !== -1) return p;
|
|
1180
1180
|
}
|
|
@@ -1182,92 +1182,92 @@ 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:
|
|
1186
|
-
|
|
1185
|
+
}), activationTrigger: T, optionsPropsRef: u, closeCombobox() {
|
|
1186
|
+
g.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, d.value = null);
|
|
1187
1187
|
}, openCombobox() {
|
|
1188
|
-
if (
|
|
1189
|
-
if (
|
|
1190
|
-
let v =
|
|
1188
|
+
if (g.value = !0, !e.disabled && l.value !== 0) {
|
|
1189
|
+
if (S.value.value) {
|
|
1190
|
+
let v = S.calculateIndex(S.value.value);
|
|
1191
1191
|
v !== -1 && (d.value = v);
|
|
1192
1192
|
}
|
|
1193
1193
|
l.value = 0;
|
|
1194
1194
|
}
|
|
1195
1195
|
}, setActivationTrigger(v) {
|
|
1196
|
-
|
|
1197
|
-
}, goToOption(v, p,
|
|
1198
|
-
|
|
1196
|
+
T.value = v;
|
|
1197
|
+
}, goToOption(v, p, L) {
|
|
1198
|
+
g.value = !1, E !== null && cancelAnimationFrame(E), E = requestAnimationFrame(() => {
|
|
1199
1199
|
if (e.disabled || i.value && !u.value.static && l.value === 1) return;
|
|
1200
|
-
if (
|
|
1201
|
-
d.value = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () =>
|
|
1200
|
+
if (S.virtual.value) {
|
|
1201
|
+
d.value = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => S.virtual.value.options, resolveActiveIndex: () => {
|
|
1202
1202
|
var H, K;
|
|
1203
|
-
return (K = (H =
|
|
1204
|
-
var
|
|
1205
|
-
return !((
|
|
1203
|
+
return (K = (H = S.activeOptionIndex.value) != null ? H : S.virtual.value.options.findIndex((ee) => {
|
|
1204
|
+
var U;
|
|
1205
|
+
return !((U = S.virtual.value) != null && U.disabled(ee));
|
|
1206
1206
|
})) != null ? K : null;
|
|
1207
|
-
}, resolveDisabled: (H) =>
|
|
1207
|
+
}, resolveDisabled: (H) => S.virtual.value.disabled(H), resolveId() {
|
|
1208
1208
|
throw new Error("Function not implemented.");
|
|
1209
|
-
} }),
|
|
1209
|
+
} }), T.value = L ?? 2;
|
|
1210
1210
|
return;
|
|
1211
1211
|
}
|
|
1212
|
-
let
|
|
1213
|
-
if (
|
|
1214
|
-
let H =
|
|
1215
|
-
H !== -1 && (
|
|
1212
|
+
let M = x();
|
|
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: () =>
|
|
1218
|
-
d.value = j,
|
|
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, T.value = L ?? 2, c.value = M.options;
|
|
1219
1219
|
});
|
|
1220
1220
|
}, selectOption(v) {
|
|
1221
|
-
let p = c.value.find((
|
|
1221
|
+
let p = c.value.find((M) => M.id === v);
|
|
1222
1222
|
if (!p) return;
|
|
1223
|
-
let { dataRef:
|
|
1224
|
-
|
|
1223
|
+
let { dataRef: L } = p;
|
|
1224
|
+
w(L.value);
|
|
1225
1225
|
}, selectActiveOption() {
|
|
1226
|
-
if (
|
|
1227
|
-
if (
|
|
1226
|
+
if (S.activeOptionIndex.value !== null) {
|
|
1227
|
+
if (S.virtual.value) w(S.virtual.value.options[S.activeOptionIndex.value]);
|
|
1228
1228
|
else {
|
|
1229
|
-
let { dataRef: v } = c.value[
|
|
1230
|
-
|
|
1229
|
+
let { dataRef: v } = c.value[S.activeOptionIndex.value];
|
|
1230
|
+
w(v.value);
|
|
1231
1231
|
}
|
|
1232
|
-
|
|
1232
|
+
S.goToOption(q.Specific, S.activeOptionIndex.value);
|
|
1233
1233
|
}
|
|
1234
1234
|
}, registerOption(v, p) {
|
|
1235
|
-
let
|
|
1236
|
-
if (
|
|
1237
|
-
c.value.push(
|
|
1235
|
+
let L = an({ id: v, dataRef: p });
|
|
1236
|
+
if (S.virtual.value) {
|
|
1237
|
+
c.value.push(L);
|
|
1238
1238
|
return;
|
|
1239
1239
|
}
|
|
1240
|
-
|
|
1241
|
-
let
|
|
1242
|
-
d.value === null &&
|
|
1243
|
-
let j =
|
|
1240
|
+
y && cancelAnimationFrame(y);
|
|
1241
|
+
let M = x((j) => (j.push(L), j));
|
|
1242
|
+
d.value === null && S.isSelected(p.value.value) && (M.activeOptionIndex = M.options.indexOf(L)), c.value = M.options, d.value = M.activeOptionIndex, T.value = 2, M.options.some((j) => !B(j.dataRef.domRef)) && (y = requestAnimationFrame(() => {
|
|
1243
|
+
let j = x();
|
|
1244
1244
|
c.value = j.options, d.value = j.activeOptionIndex;
|
|
1245
1245
|
}));
|
|
1246
1246
|
}, unregisterOption(v, p) {
|
|
1247
|
-
if (
|
|
1248
|
-
c.value = c.value.filter((
|
|
1247
|
+
if (E !== null && cancelAnimationFrame(E), p && (g.value = !0), S.virtual.value) {
|
|
1248
|
+
c.value = c.value.filter((M) => M.id !== v);
|
|
1249
1249
|
return;
|
|
1250
1250
|
}
|
|
1251
|
-
let
|
|
1252
|
-
let j =
|
|
1253
|
-
return j !== -1 &&
|
|
1251
|
+
let L = x((M) => {
|
|
1252
|
+
let j = M.findIndex((H) => H.id === v);
|
|
1253
|
+
return j !== -1 && M.splice(j, 1), M;
|
|
1254
1254
|
});
|
|
1255
|
-
c.value =
|
|
1255
|
+
c.value = L.options, d.value = L.activeOptionIndex, T.value = 2;
|
|
1256
1256
|
}, isSelected(v) {
|
|
1257
|
-
return ue(b.value, { 0: () =>
|
|
1257
|
+
return ue(b.value, { 0: () => S.compare(ne(S.value.value), ne(v)), 1: () => ne(S.value.value).some((p) => S.compare(ne(p), ne(v))) });
|
|
1258
1258
|
}, isActive(v) {
|
|
1259
|
-
return d.value ===
|
|
1259
|
+
return d.value === S.calculateIndex(v);
|
|
1260
1260
|
} };
|
|
1261
|
-
el([r, a, i], () =>
|
|
1262
|
-
let D =
|
|
1261
|
+
el([r, a, i], () => S.closeCombobox(), O(() => l.value === 0)), ce(wn, S), ul(O(() => ue(l.value, { 0: Re.Open, 1: Re.Closed })));
|
|
1262
|
+
let D = O(() => {
|
|
1263
1263
|
var v;
|
|
1264
|
-
return (v =
|
|
1264
|
+
return (v = B(r)) == null ? void 0 : v.closest("form");
|
|
1265
1265
|
});
|
|
1266
1266
|
return se(() => {
|
|
1267
1267
|
F([D], () => {
|
|
1268
1268
|
if (!D.value || e.defaultValue === void 0) return;
|
|
1269
1269
|
function v() {
|
|
1270
|
-
|
|
1270
|
+
S.change(e.defaultValue);
|
|
1271
1271
|
}
|
|
1272
1272
|
return D.value.addEventListener("reset", v), () => {
|
|
1273
1273
|
var p;
|
|
@@ -1275,9 +1275,9 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
|
|
|
1275
1275
|
};
|
|
1276
1276
|
}, { immediate: !0 });
|
|
1277
1277
|
}), () => {
|
|
1278
|
-
var v, p,
|
|
1279
|
-
let { name:
|
|
1280
|
-
return Ve(z, [...
|
|
1278
|
+
var v, p, L;
|
|
1279
|
+
let { name: M, disabled: j, form: H, ...K } = e, ee = { open: l.value === 0, disabled: j, activeIndex: S.activeOptionIndex.value, activeOption: S.activeOptionIndex.value === null ? null : S.virtual.value ? S.virtual.value.options[(v = S.activeOptionIndex.value) != null ? v : 0] : (L = (p = S.options.value[S.activeOptionIndex.value]) == null ? void 0 : p.dataRef.value) != null ? L : null, value: _.value };
|
|
1280
|
+
return Ve(z, [...M != null && _.value != null ? Cn({ [M]: _.value }).map(([U, zn]) => Ve(rl, sl({ features: mn.Hidden, key: U, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: H, disabled: j, name: U, 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 }) {
|
|
@@ -1285,7 +1285,7 @@ pe({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "lab
|
|
|
1285
1285
|
let l = (o = e.id) != null ? o : `headlessui-combobox-label-${je()}`, s = we("ComboboxLabel");
|
|
1286
1286
|
function r() {
|
|
1287
1287
|
var a;
|
|
1288
|
-
(a =
|
|
1288
|
+
(a = B(s.inputRef)) == null || a.focus({ preventScroll: !0 });
|
|
1289
1289
|
}
|
|
1290
1290
|
return () => {
|
|
1291
1291
|
let a = { open: s.comboboxState.value === 0, disabled: s.disabled.value }, { ...i } = e, u = { id: l, ref: s.labelRef, onClick: r };
|
|
@@ -1297,149 +1297,149 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1297
1297
|
let s = (l = e.id) != null ? l : `headlessui-combobox-button-${je()}`, r = we("ComboboxButton");
|
|
1298
1298
|
o({ el: r.buttonRef, $el: r.buttonRef });
|
|
1299
1299
|
function a(c) {
|
|
1300
|
-
r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (c.preventDefault(), r.openCombobox()),
|
|
1300
|
+
r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (c.preventDefault(), r.openCombobox()), Y(() => {
|
|
1301
1301
|
var d;
|
|
1302
|
-
return (d =
|
|
1302
|
+
return (d = B(r.inputRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1303
1303
|
}));
|
|
1304
1304
|
}
|
|
1305
1305
|
function i(c) {
|
|
1306
1306
|
switch (c.key) {
|
|
1307
|
-
case
|
|
1308
|
-
c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && r.openCombobox(),
|
|
1307
|
+
case X.ArrowDown:
|
|
1308
|
+
c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && r.openCombobox(), Y(() => {
|
|
1309
1309
|
var d;
|
|
1310
1310
|
return (d = r.inputRef.value) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1311
1311
|
});
|
|
1312
1312
|
return;
|
|
1313
|
-
case
|
|
1314
|
-
c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && (r.openCombobox(),
|
|
1313
|
+
case X.ArrowUp:
|
|
1314
|
+
c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && (r.openCombobox(), Y(() => {
|
|
1315
1315
|
r.value.value || r.goToOption(q.Last);
|
|
1316
|
-
})),
|
|
1316
|
+
})), Y(() => {
|
|
1317
1317
|
var d;
|
|
1318
1318
|
return (d = r.inputRef.value) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1319
1319
|
});
|
|
1320
1320
|
return;
|
|
1321
|
-
case
|
|
1321
|
+
case X.Escape:
|
|
1322
1322
|
if (r.comboboxState.value !== 0) return;
|
|
1323
|
-
c.preventDefault(), r.optionsRef.value && !r.optionsPropsRef.value.static && c.stopPropagation(), r.closeCombobox(),
|
|
1323
|
+
c.preventDefault(), r.optionsRef.value && !r.optionsPropsRef.value.static && c.stopPropagation(), r.closeCombobox(), Y(() => {
|
|
1324
1324
|
var d;
|
|
1325
1325
|
return (d = r.inputRef.value) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1326
1326
|
});
|
|
1327
1327
|
return;
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
1330
|
-
let u = tl(
|
|
1330
|
+
let u = tl(O(() => ({ as: e.as, type: n.type })), r.buttonRef);
|
|
1331
1331
|
return () => {
|
|
1332
1332
|
var c, d;
|
|
1333
|
-
let
|
|
1334
|
-
return ye({ ourProps:
|
|
1333
|
+
let T = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...g } = e, x = { ref: r.buttonRef, id: s, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = B(r.optionsRef)) == null ? void 0 : c.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(d = B(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: x, theirProps: g, slot: T, 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 =
|
|
1338
|
+
let r = (s = e.id) != null ? s : `headlessui-combobox-input-${je()}`, a = we("ComboboxInput"), i = O(() => Lt(B(a.inputRef))), u = { value: !1 };
|
|
1339
1339
|
l({ el: a.inputRef, $el: a.inputRef });
|
|
1340
1340
|
function c() {
|
|
1341
1341
|
a.change(null);
|
|
1342
|
-
let
|
|
1343
|
-
|
|
1342
|
+
let y = B(a.optionsRef);
|
|
1343
|
+
y && (y.scrollTop = 0), a.goToOption(q.Nothing);
|
|
1344
1344
|
}
|
|
1345
|
-
let d =
|
|
1346
|
-
var
|
|
1347
|
-
let
|
|
1348
|
-
return
|
|
1345
|
+
let d = O(() => {
|
|
1346
|
+
var y;
|
|
1347
|
+
let w = a.value.value;
|
|
1348
|
+
return B(a.inputRef) ? typeof e.displayValue < "u" && w !== void 0 ? (y = e.displayValue(w)) != null ? y : "" : typeof w == "string" ? w : "" : "";
|
|
1349
1349
|
});
|
|
1350
1350
|
se(() => {
|
|
1351
|
-
F([d, a.comboboxState, i], ([
|
|
1351
|
+
F([d, a.comboboxState, i], ([y, w], [m, S]) => {
|
|
1352
1352
|
if (u.value) return;
|
|
1353
|
-
let D =
|
|
1354
|
-
D && ((
|
|
1353
|
+
let D = B(a.inputRef);
|
|
1354
|
+
D && ((S === 0 && w === 1 || y !== m) && (D.value = y), requestAnimationFrame(() => {
|
|
1355
1355
|
var v;
|
|
1356
1356
|
if (u.value || !D || ((v = i.value) == null ? void 0 : v.activeElement) !== D) return;
|
|
1357
|
-
let { selectionStart: p, selectionEnd:
|
|
1358
|
-
Math.abs((
|
|
1357
|
+
let { selectionStart: p, selectionEnd: L } = D;
|
|
1358
|
+
Math.abs((L ?? 0) - (p ?? 0)) === 0 && p === 0 && D.setSelectionRange(D.value.length, D.value.length);
|
|
1359
1359
|
}));
|
|
1360
|
-
}, { immediate: !0 }), F([a.comboboxState], ([
|
|
1361
|
-
if (
|
|
1360
|
+
}, { immediate: !0 }), F([a.comboboxState], ([y], [w]) => {
|
|
1361
|
+
if (y === 0 && w === 1) {
|
|
1362
1362
|
if (u.value) return;
|
|
1363
|
-
let
|
|
1364
|
-
if (!
|
|
1365
|
-
let
|
|
1366
|
-
|
|
1363
|
+
let m = B(a.inputRef);
|
|
1364
|
+
if (!m) return;
|
|
1365
|
+
let S = m.value, { selectionStart: D, selectionEnd: v, selectionDirection: p } = m;
|
|
1366
|
+
m.value = "", m.value = S, p !== null ? m.setSelectionRange(D, v, p) : m.setSelectionRange(D, v);
|
|
1367
1367
|
}
|
|
1368
1368
|
});
|
|
1369
1369
|
});
|
|
1370
|
-
let
|
|
1371
|
-
function
|
|
1372
|
-
|
|
1370
|
+
let T = $(!1);
|
|
1371
|
+
function g() {
|
|
1372
|
+
T.value = !0;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function x() {
|
|
1375
1375
|
Qe().nextFrame(() => {
|
|
1376
|
-
|
|
1376
|
+
T.value = !1;
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
|
-
let b =
|
|
1380
|
-
function
|
|
1379
|
+
let b = No();
|
|
1380
|
+
function A(y) {
|
|
1381
1381
|
switch (u.value = !0, b(() => {
|
|
1382
1382
|
u.value = !1;
|
|
1383
|
-
}),
|
|
1384
|
-
case
|
|
1385
|
-
if (u.value = !1, a.comboboxState.value !== 0 ||
|
|
1386
|
-
if (
|
|
1383
|
+
}), y.key) {
|
|
1384
|
+
case X.Enter:
|
|
1385
|
+
if (u.value = !1, a.comboboxState.value !== 0 || T.value) return;
|
|
1386
|
+
if (y.preventDefault(), y.stopPropagation(), a.activeOptionIndex.value === null) {
|
|
1387
1387
|
a.closeCombobox();
|
|
1388
1388
|
return;
|
|
1389
1389
|
}
|
|
1390
1390
|
a.selectActiveOption(), a.mode.value === 0 && a.closeCombobox();
|
|
1391
1391
|
break;
|
|
1392
|
-
case
|
|
1393
|
-
return u.value = !1,
|
|
1394
|
-
case
|
|
1395
|
-
return u.value = !1,
|
|
1396
|
-
a.openCombobox(),
|
|
1392
|
+
case X.ArrowDown:
|
|
1393
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ue(a.comboboxState.value, { 0: () => a.goToOption(q.Next), 1: () => a.openCombobox() });
|
|
1394
|
+
case X.ArrowUp:
|
|
1395
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ue(a.comboboxState.value, { 0: () => a.goToOption(q.Previous), 1: () => {
|
|
1396
|
+
a.openCombobox(), Y(() => {
|
|
1397
1397
|
a.value.value || a.goToOption(q.Last);
|
|
1398
1398
|
});
|
|
1399
1399
|
} });
|
|
1400
|
-
case
|
|
1401
|
-
if (
|
|
1402
|
-
return u.value = !1,
|
|
1403
|
-
case
|
|
1404
|
-
return u.value = !1,
|
|
1405
|
-
case
|
|
1406
|
-
if (
|
|
1407
|
-
return u.value = !1,
|
|
1408
|
-
case
|
|
1409
|
-
return u.value = !1,
|
|
1410
|
-
case
|
|
1400
|
+
case X.Home:
|
|
1401
|
+
if (y.shiftKey) break;
|
|
1402
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.First);
|
|
1403
|
+
case X.PageUp:
|
|
1404
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.First);
|
|
1405
|
+
case X.End:
|
|
1406
|
+
if (y.shiftKey) break;
|
|
1407
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.Last);
|
|
1408
|
+
case X.PageDown:
|
|
1409
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.Last);
|
|
1410
|
+
case X.Escape:
|
|
1411
1411
|
if (u.value = !1, a.comboboxState.value !== 0) return;
|
|
1412
|
-
|
|
1412
|
+
y.preventDefault(), a.optionsRef.value && !a.optionsPropsRef.value.static && y.stopPropagation(), a.nullable.value && a.mode.value === 0 && a.value.value === null && c(), a.closeCombobox();
|
|
1413
1413
|
break;
|
|
1414
|
-
case
|
|
1414
|
+
case X.Tab:
|
|
1415
1415
|
if (u.value = !1, a.comboboxState.value !== 0) return;
|
|
1416
1416
|
a.mode.value === 0 && a.activationTrigger.value !== 1 && a.selectActiveOption(), a.closeCombobox();
|
|
1417
1417
|
break;
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1421
|
-
n("change",
|
|
1420
|
+
function V(y) {
|
|
1421
|
+
n("change", y), a.nullable.value && a.mode.value === 0 && y.target.value === "" && c(), a.openCombobox();
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
var
|
|
1425
|
-
let D = (
|
|
1426
|
-
if (u.value = !1, !((
|
|
1423
|
+
function I(y) {
|
|
1424
|
+
var w, m, S;
|
|
1425
|
+
let D = (w = y.relatedTarget) != null ? w : ge.find((v) => v !== y.currentTarget);
|
|
1426
|
+
if (u.value = !1, !((m = B(a.optionsRef)) != null && m.contains(D)) && !((S = B(a.buttonRef)) != null && S.contains(D)) && a.comboboxState.value === 0) return y.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
|
|
1429
|
-
var
|
|
1430
|
-
let D = (
|
|
1431
|
-
(
|
|
1428
|
+
function _(y) {
|
|
1429
|
+
var w, m, S;
|
|
1430
|
+
let D = (w = y.relatedTarget) != null ? w : ge.find((v) => v !== y.currentTarget);
|
|
1431
|
+
(m = B(a.buttonRef)) != null && m.contains(D) || (S = B(a.optionsRef)) != null && S.contains(D) || a.disabled.value || a.immediate.value && a.comboboxState.value !== 0 && (a.openCombobox(), Qe().nextFrame(() => {
|
|
1432
1432
|
a.setActivationTrigger(1);
|
|
1433
1433
|
}));
|
|
1434
1434
|
}
|
|
1435
|
-
let
|
|
1436
|
-
var
|
|
1437
|
-
return (
|
|
1435
|
+
let E = O(() => {
|
|
1436
|
+
var y, w, m, S;
|
|
1437
|
+
return (S = (m = (w = e.defaultValue) != null ? w : a.defaultValue.value !== void 0 ? (y = e.displayValue) == null ? void 0 : y.call(e, a.defaultValue.value) : null) != null ? m : a.defaultValue.value) != null ? S : "";
|
|
1438
1438
|
});
|
|
1439
1439
|
return () => {
|
|
1440
|
-
var
|
|
1441
|
-
let
|
|
1442
|
-
return ye({ ourProps: K, theirProps: H, slot:
|
|
1440
|
+
var y, w, m, S, D, v, p;
|
|
1441
|
+
let L = { open: a.comboboxState.value === 0 }, { displayValue: M, onChange: j, ...H } = e, K = { "aria-controls": (y = a.optionsRef.value) == null ? void 0 : y.id, "aria-expanded": a.comboboxState.value === 0, "aria-activedescendant": a.activeOptionIndex.value === null ? void 0 : a.virtual.value ? (w = 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 : w.id : (m = a.options.value[a.activeOptionIndex.value]) == null ? void 0 : m.id, "aria-labelledby": (v = (S = B(a.labelRef)) == null ? void 0 : S.id) != null ? v : (D = B(a.buttonRef)) == null ? void 0 : D.id, "aria-autocomplete": "list", id: r, onCompositionstart: g, onCompositionend: x, onKeydown: A, onInput: V, onFocus: _, onBlur: I, role: "combobox", type: (p = t.type) != null ? p : "text", tabIndex: 0, ref: a.inputRef, defaultValue: E.value, disabled: a.disabled.value === !0 ? !0 : void 0 };
|
|
1442
|
+
return ye({ ourProps: K, theirProps: H, slot: L, 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()}`;
|
|
@@ -1448,8 +1448,8 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1448
1448
|
}), fe(() => {
|
|
1449
1449
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1450
1450
|
});
|
|
1451
|
-
let r = il(), a =
|
|
1452
|
-
ol({ container:
|
|
1451
|
+
let r = il(), a = O(() => r !== null ? (r.value & Re.Open) === Re.Open : l.comboboxState.value === 0);
|
|
1452
|
+
ol({ container: O(() => B(l.optionsRef)), enabled: O(() => l.comboboxState.value === 0), accept(u) {
|
|
1453
1453
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1454
1454
|
}, walk(u) {
|
|
1455
1455
|
u.setAttribute("role", "none");
|
|
@@ -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
|
|
1463
|
-
return ye({ ourProps:
|
|
1462
|
+
let T = { open: l.comboboxState.value === 0 }, g = { "aria-labelledby": (d = (u = B(l.labelRef)) == null ? void 0 : u.id) != null ? d : (c = B(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 }, x = ot(e, ["hold"]);
|
|
1463
|
+
return ye({ ourProps: g, theirProps: x, slot: T, 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 =
|
|
1466
|
+
let l = we("ComboboxOption"), s = `headlessui-combobox-option-${je()}`, r = $(null), a = O(() => e.disabled);
|
|
1467
1467
|
o({ el: r, $el: r });
|
|
1468
|
-
let i =
|
|
1469
|
-
var
|
|
1470
|
-
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((
|
|
1471
|
-
}), u =
|
|
1468
|
+
let i = O(() => {
|
|
1469
|
+
var I;
|
|
1470
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((I = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : I.id) === s;
|
|
1471
|
+
}), u = O(() => l.isSelected(e.value)), c = le(_n, null), d = O(() => ({ disabled: e.disabled, value: e.value, domRef: r, order: O(() => e.order) }));
|
|
1472
1472
|
se(() => l.registerOption(s, d)), Fe(() => l.unregisterOption(s, i.value)), fe(() => {
|
|
1473
|
-
let
|
|
1474
|
-
|
|
1473
|
+
let I = B(r);
|
|
1474
|
+
I && (c == null || c.value.measureElement(I));
|
|
1475
1475
|
}), fe(() => {
|
|
1476
|
-
l.comboboxState.value === 0 && i.value && (l.virtual.value || l.activationTrigger.value !== 0 &&
|
|
1477
|
-
var
|
|
1478
|
-
return (
|
|
1476
|
+
l.comboboxState.value === 0 && i.value && (l.virtual.value || l.activationTrigger.value !== 0 && Y(() => {
|
|
1477
|
+
var I, _;
|
|
1478
|
+
return (_ = (I = B(r)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : _.call(I, { block: "nearest" });
|
|
1479
1479
|
}));
|
|
1480
1480
|
});
|
|
1481
|
-
function
|
|
1482
|
-
|
|
1483
|
-
var
|
|
1484
|
-
return (
|
|
1481
|
+
function T(I) {
|
|
1482
|
+
I.preventDefault(), I.button === bn.Left && (a.value || (l.selectOption(s), vn() || requestAnimationFrame(() => {
|
|
1483
|
+
var _;
|
|
1484
|
+
return (_ = B(l.inputRef)) == null ? void 0 : _.focus({ preventScroll: !0 });
|
|
1485
1485
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1488
|
-
var
|
|
1489
|
-
if (e.disabled || (
|
|
1490
|
-
let
|
|
1491
|
-
l.goToOption(q.Specific,
|
|
1487
|
+
function g() {
|
|
1488
|
+
var I;
|
|
1489
|
+
if (e.disabled || (I = l.virtual.value) != null && I.disabled(e.value)) return l.goToOption(q.Nothing);
|
|
1490
|
+
let _ = l.calculateIndex(e.value);
|
|
1491
|
+
l.goToOption(q.Specific, _);
|
|
1492
1492
|
}
|
|
1493
|
-
let
|
|
1494
|
-
function b(
|
|
1495
|
-
|
|
1493
|
+
let x = nl();
|
|
1494
|
+
function b(I) {
|
|
1495
|
+
x.update(I);
|
|
1496
1496
|
}
|
|
1497
|
-
function I
|
|
1498
|
-
var
|
|
1499
|
-
if (!
|
|
1500
|
-
let
|
|
1501
|
-
l.goToOption(q.Specific,
|
|
1497
|
+
function A(I) {
|
|
1498
|
+
var _;
|
|
1499
|
+
if (!x.wasMoved(I) || e.disabled || (_ = l.virtual.value) != null && _.disabled(e.value) || i.value) return;
|
|
1500
|
+
let E = l.calculateIndex(e.value);
|
|
1501
|
+
l.goToOption(q.Specific, E, 0);
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1504
|
-
var
|
|
1505
|
-
|
|
1503
|
+
function V(I) {
|
|
1504
|
+
var _;
|
|
1505
|
+
x.wasMoved(I) && (e.disabled || (_ = l.virtual.value) != null && _.disabled(e.value) || i.value && (l.optionsPropsRef.value.hold || l.goToOption(q.Nothing)));
|
|
1506
1506
|
}
|
|
1507
1507
|
return () => {
|
|
1508
|
-
let { disabled:
|
|
1509
|
-
return ye({ ourProps:
|
|
1508
|
+
let { disabled: I } = e, _ = { active: i.value, selected: u.value, disabled: I }, E = { id: s, ref: r, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: T, onFocus: g, onPointerenter: b, onMouseenter: b, onPointermove: A, onMousemove: A, onPointerleave: V, onMouseleave: V }, y = ot(e, ["order", "value"]);
|
|
1509
|
+
return ye({ ourProps: E, theirProps: y, slot: _, attrs: t, slots: n, name: "ComboboxOption" });
|
|
1510
1510
|
};
|
|
1511
1511
|
} });
|
|
1512
1512
|
function wl(e, n) {
|
|
1513
|
-
return h(),
|
|
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(),
|
|
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(),
|
|
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
|
|
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
|
|
1580
|
-
return
|
|
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
|
|
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
|
|
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
|
-
|
|
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),
|
|
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) ?
|
|
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
|
-
|
|
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
|
|
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();
|
|
@@ -1751,51 +1751,51 @@ function Dl(e, n, t, o) {
|
|
|
1751
1751
|
}, 4e4);
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function W(e, n) {
|
|
1755
1755
|
const t = "🍍 " + e;
|
|
1756
1756
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, n) : n === "error" ? console.error(t) : n === "warn" ? console.warn(t) : console.log(t);
|
|
1757
1757
|
}
|
|
1758
1758
|
function kt(e) {
|
|
1759
1759
|
return "_a" in e && "install" in e;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function In() {
|
|
1762
1762
|
if (!("clipboard" in navigator))
|
|
1763
|
-
return
|
|
1763
|
+
return W("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1764
1764
|
}
|
|
1765
1765
|
function kn(e) {
|
|
1766
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1766
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (W('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 (!
|
|
1769
|
+
if (!In())
|
|
1770
1770
|
try {
|
|
1771
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
1771
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), W("Global state copied to clipboard.");
|
|
1772
1772
|
} catch (n) {
|
|
1773
1773
|
if (kn(n))
|
|
1774
1774
|
return;
|
|
1775
|
-
|
|
1775
|
+
W("Failed to serialize the state. Check the console for more details.", "error"), console.error(n);
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
1778
|
async function Pl(e) {
|
|
1779
|
-
if (!
|
|
1779
|
+
if (!In())
|
|
1780
1780
|
try {
|
|
1781
|
-
Mn(e, JSON.parse(await navigator.clipboard.readText())),
|
|
1781
|
+
Mn(e, JSON.parse(await navigator.clipboard.readText())), W("Global state pasted from clipboard.");
|
|
1782
1782
|
} catch (n) {
|
|
1783
1783
|
if (kn(n))
|
|
1784
1784
|
return;
|
|
1785
|
-
|
|
1785
|
+
W("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(n);
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
|
-
async function
|
|
1788
|
+
async function Bl(e) {
|
|
1789
1789
|
try {
|
|
1790
|
-
|
|
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) {
|
|
1794
|
-
|
|
1794
|
+
W("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(n);
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
1797
|
let ie;
|
|
1798
|
-
function
|
|
1798
|
+
function Nl() {
|
|
1799
1799
|
ie || (ie = document.createElement("input"), ie.type = "file", ie.accept = ".json");
|
|
1800
1800
|
function e() {
|
|
1801
1801
|
return new Promise((n, t) => {
|
|
@@ -1812,13 +1812,13 @@ function Bl() {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
async function Fl(e) {
|
|
1814
1814
|
try {
|
|
1815
|
-
const t = await
|
|
1815
|
+
const t = await Nl()();
|
|
1816
1816
|
if (!t)
|
|
1817
1817
|
return;
|
|
1818
1818
|
const { text: o, file: l } = t;
|
|
1819
|
-
Mn(e, JSON.parse(o)),
|
|
1819
|
+
Mn(e, JSON.parse(o)), W(`Global state imported from "${l.name}".`);
|
|
1820
1820
|
} catch (n) {
|
|
1821
|
-
|
|
1821
|
+
W("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(n);
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
function Mn(e, n) {
|
|
@@ -1917,7 +1917,7 @@ function Wl(e, n) {
|
|
|
1917
1917
|
componentStateTypes: Ye,
|
|
1918
1918
|
app: e
|
|
1919
1919
|
}, (t) => {
|
|
1920
|
-
typeof t.now != "function" &&
|
|
1920
|
+
typeof t.now != "function" && W("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
|
|
1921
1921
|
id: me,
|
|
1922
1922
|
label: "Pinia 🍍",
|
|
1923
1923
|
color: 15064968
|
|
@@ -1944,7 +1944,7 @@ function Wl(e, n) {
|
|
|
1944
1944
|
{
|
|
1945
1945
|
icon: "save",
|
|
1946
1946
|
action: () => {
|
|
1947
|
-
|
|
1947
|
+
Bl(n);
|
|
1948
1948
|
},
|
|
1949
1949
|
tooltip: "Save the state as a JSON file"
|
|
1950
1950
|
},
|
|
@@ -1962,7 +1962,7 @@ function Wl(e, n) {
|
|
|
1962
1962
|
tooltip: 'Reset the state (with "$reset")',
|
|
1963
1963
|
action: (o) => {
|
|
1964
1964
|
const l = n._s.get(o);
|
|
1965
|
-
l ? typeof l.$reset != "function" ?
|
|
1965
|
+
l ? typeof l.$reset != "function" ? W(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), W(`Store "${o}" reset.`)) : W(`Cannot reset "${o}" store because it wasn't found.`, "warn");
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
1968
|
]
|
|
@@ -2021,7 +2021,7 @@ function Wl(e, n) {
|
|
|
2021
2021
|
if (o.app === e && o.inspectorId === J) {
|
|
2022
2022
|
const s = o.nodeId === ht ? n : n._s.get(o.nodeId);
|
|
2023
2023
|
if (!s)
|
|
2024
|
-
return
|
|
2024
|
+
return W(`store "${o.nodeId}" not found`, "error");
|
|
2025
2025
|
const { path: r } = o;
|
|
2026
2026
|
kt(s) ? r.unshift("state") : (r.length !== 1 || !s._customProperties.has(r[0]) || r[0] in s.$state) && r.unshift("$state"), Se = !1, o.set(s, r, o.state.value), Se = !0;
|
|
2027
2027
|
}
|
|
@@ -2029,10 +2029,10 @@ function Wl(e, n) {
|
|
|
2029
2029
|
if (o.type.startsWith("🍍")) {
|
|
2030
2030
|
const l = o.type.replace(/^🍍\s*/, ""), s = n._s.get(l);
|
|
2031
2031
|
if (!s)
|
|
2032
|
-
return
|
|
2032
|
+
return W(`store "${l}" not found`, "error");
|
|
2033
2033
|
const { path: r } = o;
|
|
2034
2034
|
if (r[0] !== "state")
|
|
2035
|
-
return
|
|
2035
|
+
return W(`Invalid path for store "${l}":
|
|
2036
2036
|
${r}
|
|
2037
2037
|
Only state can be modified.`);
|
|
2038
2038
|
r[0] = "$state", Se = !1, o.set(s, r, o.state.value), Se = !0;
|
|
@@ -2113,7 +2113,7 @@ function ql(e, n) {
|
|
|
2113
2113
|
});
|
|
2114
2114
|
});
|
|
2115
2115
|
}, !0), n._customProperties.forEach((r) => {
|
|
2116
|
-
F(() =>
|
|
2116
|
+
F(() => k(n[r]), (a, i) => {
|
|
2117
2117
|
t.notifyComponentUpdate(), t.sendInspectorState(J), Se && t.addTimelineEvent({
|
|
2118
2118
|
layerId: me,
|
|
2119
2119
|
event: {
|
|
@@ -2166,8 +2166,8 @@ function ql(e, n) {
|
|
|
2166
2166
|
});
|
|
2167
2167
|
const { $dispose: s } = n;
|
|
2168
2168
|
n.$dispose = () => {
|
|
2169
|
-
s(), t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges &&
|
|
2170
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges &&
|
|
2169
|
+
s(), t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges && W(`Disposed "${n.$id}" store 🗑`);
|
|
2170
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges && W(`"${n.$id}" store installed 🆕`);
|
|
2171
2171
|
});
|
|
2172
2172
|
}
|
|
2173
2173
|
let Vn = 0, de;
|
|
@@ -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(() =>
|
|
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(
|
|
2278
|
+
Rt($(l ? l() : {}).value)
|
|
2279
2279
|
) : Rt(t.state.value[e]);
|
|
2280
|
-
return te(c, s, Object.keys(r || {}).reduce((d,
|
|
2280
|
+
return te(c, s, Object.keys(r || {}).reduce((d, T) => (process.env.NODE_ENV !== "production" && T in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${T}" in store "${e}".`), d[T] = be(O(() => {
|
|
2281
2281
|
Pe(t);
|
|
2282
|
-
const
|
|
2283
|
-
return r[
|
|
2282
|
+
const g = t._s.get(e);
|
|
2283
|
+
return r[T].call(g, g);
|
|
2284
2284
|
})), d), {}));
|
|
2285
2285
|
}
|
|
2286
2286
|
return i = gt(e, u, n, t, o, !0), i;
|
|
@@ -2295,34 +2295,34 @@ function gt(e, n, t = {}, o, l, s) {
|
|
|
2295
2295
|
// flush: 'post',
|
|
2296
2296
|
};
|
|
2297
2297
|
process.env.NODE_ENV !== "production" && (i.onTrigger = (v) => {
|
|
2298
|
-
u ?
|
|
2298
|
+
u ? g = v : u == !1 && !m._hotUpdating && (Array.isArray(g) ? g.push(v) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2299
2299
|
});
|
|
2300
|
-
let u, c, d = [],
|
|
2301
|
-
const
|
|
2302
|
-
!s && !
|
|
2303
|
-
const b =
|
|
2304
|
-
let
|
|
2305
|
-
function
|
|
2300
|
+
let u, c, d = [], T = [], g;
|
|
2301
|
+
const x = o.state.value[e];
|
|
2302
|
+
!s && !x && (process.env.NODE_ENV === "production" || !l) && (o.state.value[e] = {});
|
|
2303
|
+
const b = $({});
|
|
2304
|
+
let A;
|
|
2305
|
+
function V(v) {
|
|
2306
2306
|
let p;
|
|
2307
|
-
u = c = !1, process.env.NODE_ENV !== "production" && (
|
|
2307
|
+
u = c = !1, process.env.NODE_ENV !== "production" && (g = []), typeof v == "function" ? (v(o.state.value[e]), p = {
|
|
2308
2308
|
type: ae.patchFunction,
|
|
2309
2309
|
storeId: e,
|
|
2310
|
-
events:
|
|
2310
|
+
events: g
|
|
2311
2311
|
}) : (mt(o.state.value[e], v), p = {
|
|
2312
2312
|
type: ae.patchObject,
|
|
2313
2313
|
payload: v,
|
|
2314
2314
|
storeId: e,
|
|
2315
|
-
events:
|
|
2315
|
+
events: g
|
|
2316
2316
|
});
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2319
|
-
|
|
2317
|
+
const L = A = Symbol();
|
|
2318
|
+
Y().then(() => {
|
|
2319
|
+
A === L && (u = !0);
|
|
2320
2320
|
}), c = !0, Te(d, p, o.state.value[e]);
|
|
2321
2321
|
}
|
|
2322
|
-
const
|
|
2323
|
-
const { state: p } = t,
|
|
2324
|
-
this.$patch((
|
|
2325
|
-
te(
|
|
2322
|
+
const I = s ? function() {
|
|
2323
|
+
const { state: p } = t, L = p ? p() : {};
|
|
2324
|
+
this.$patch((M) => {
|
|
2325
|
+
te(M, L);
|
|
2326
2326
|
});
|
|
2327
2327
|
} : (
|
|
2328
2328
|
/* istanbul ignore next */
|
|
@@ -2330,120 +2330,120 @@ 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
|
|
2334
|
-
r.stop(), d = [],
|
|
2333
|
+
function _() {
|
|
2334
|
+
r.stop(), d = [], T = [], o._s.delete(e);
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2336
|
+
function E(v, p) {
|
|
2337
2337
|
return function() {
|
|
2338
2338
|
Pe(o);
|
|
2339
|
-
const
|
|
2340
|
-
function H(
|
|
2341
|
-
|
|
2339
|
+
const L = Array.from(arguments), M = [], j = [];
|
|
2340
|
+
function H(U) {
|
|
2341
|
+
M.push(U);
|
|
2342
2342
|
}
|
|
2343
|
-
function K(
|
|
2344
|
-
j.push(
|
|
2343
|
+
function K(U) {
|
|
2344
|
+
j.push(U);
|
|
2345
2345
|
}
|
|
2346
|
-
Te(
|
|
2347
|
-
args:
|
|
2346
|
+
Te(T, {
|
|
2347
|
+
args: L,
|
|
2348
2348
|
name: v,
|
|
2349
|
-
store:
|
|
2349
|
+
store: m,
|
|
2350
2350
|
after: H,
|
|
2351
2351
|
onError: K
|
|
2352
2352
|
});
|
|
2353
2353
|
let ee;
|
|
2354
2354
|
try {
|
|
2355
|
-
ee = p.apply(this && this.$id === e ? this :
|
|
2356
|
-
} catch (
|
|
2357
|
-
throw Te(j,
|
|
2355
|
+
ee = p.apply(this && this.$id === e ? this : m, L);
|
|
2356
|
+
} catch (U) {
|
|
2357
|
+
throw Te(j, U), U;
|
|
2358
2358
|
}
|
|
2359
|
-
return ee instanceof Promise ? ee.then((
|
|
2359
|
+
return ee instanceof Promise ? ee.then((U) => (Te(M, U), U)).catch((U) => (Te(j, U), Promise.reject(U))) : (Te(M, ee), ee);
|
|
2360
2360
|
};
|
|
2361
2361
|
}
|
|
2362
|
-
const
|
|
2362
|
+
const y = /* @__PURE__ */ be({
|
|
2363
2363
|
actions: {},
|
|
2364
2364
|
getters: {},
|
|
2365
2365
|
state: [],
|
|
2366
2366
|
hotState: b
|
|
2367
|
-
}),
|
|
2367
|
+
}), w = {
|
|
2368
2368
|
_p: o,
|
|
2369
2369
|
// _s: scope,
|
|
2370
2370
|
$id: e,
|
|
2371
|
-
$onAction: Ut.bind(null,
|
|
2372
|
-
$patch:
|
|
2373
|
-
$reset:
|
|
2371
|
+
$onAction: Ut.bind(null, T),
|
|
2372
|
+
$patch: V,
|
|
2373
|
+
$reset: I,
|
|
2374
2374
|
$subscribe(v, p = {}) {
|
|
2375
|
-
const
|
|
2375
|
+
const L = 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
|
-
events:
|
|
2379
|
+
events: g
|
|
2380
2380
|
}, j);
|
|
2381
2381
|
}, te({}, i, p)));
|
|
2382
|
-
return
|
|
2382
|
+
return L;
|
|
2383
2383
|
},
|
|
2384
|
-
$dispose:
|
|
2385
|
-
},
|
|
2384
|
+
$dispose: _
|
|
2385
|
+
}, m = an(process.env.NODE_ENV !== "production" || Ae ? te(
|
|
2386
2386
|
{
|
|
2387
|
-
_hmrPayload:
|
|
2387
|
+
_hmrPayload: y,
|
|
2388
2388
|
_customProperties: be(/* @__PURE__ */ new Set())
|
|
2389
2389
|
// devtools custom properties
|
|
2390
2390
|
},
|
|
2391
|
-
|
|
2391
|
+
w
|
|
2392
2392
|
// must be added later
|
|
2393
2393
|
// setupStore
|
|
2394
|
-
) :
|
|
2395
|
-
o._s.set(e,
|
|
2394
|
+
) : w);
|
|
2395
|
+
o._s.set(e, m);
|
|
2396
2396
|
const D = (o._a && o._a.runWithContext || Yl)(() => o._e.run(() => (r = un()).run(n)));
|
|
2397
2397
|
for (const v in D) {
|
|
2398
2398
|
const p = D[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 || (
|
|
2400
|
+
process.env.NODE_ENV !== "production" && l ? We(b.value, v, it(D, v)) : s || (x && Xl(p) && ($e(p) ? p.value = x[v] : mt(p, x[v])), o.state.value[e][v] = p), process.env.NODE_ENV !== "production" && y.state.push(v);
|
|
2401
2401
|
else if (typeof p == "function") {
|
|
2402
|
-
const
|
|
2403
|
-
D[v] =
|
|
2404
|
-
} else process.env.NODE_ENV !== "production" && Wt(p) && (
|
|
2402
|
+
const L = process.env.NODE_ENV !== "production" && l ? p : E(v, p);
|
|
2403
|
+
D[v] = L, process.env.NODE_ENV !== "production" && (y.actions[v] = p), a.actions[v] = p;
|
|
2404
|
+
} else process.env.NODE_ENV !== "production" && Wt(p) && (y.getters[v] = s ? (
|
|
2405
2405
|
// @ts-expect-error
|
|
2406
2406
|
t.getters[v]
|
|
2407
2407
|
) : p, lt && (D._getters || // @ts-expect-error: same
|
|
2408
2408
|
(D._getters = be([]))).push(v));
|
|
2409
2409
|
}
|
|
2410
|
-
if (te(
|
|
2410
|
+
if (te(m, D), te(ne(m), D), Object.defineProperty(m, "$state", {
|
|
2411
2411
|
get: () => process.env.NODE_ENV !== "production" && l ? b.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
|
-
|
|
2415
|
+
V((p) => {
|
|
2416
2416
|
te(p, v);
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
2420
|
-
|
|
2421
|
-
if (p in
|
|
2422
|
-
const
|
|
2423
|
-
typeof
|
|
2419
|
+
}), process.env.NODE_ENV !== "production" && (m._hotUpdate = be((v) => {
|
|
2420
|
+
m._hotUpdating = !0, v._hmrPayload.state.forEach((p) => {
|
|
2421
|
+
if (p in m.$state) {
|
|
2422
|
+
const L = v.$state[p], M = m.$state[p];
|
|
2423
|
+
typeof L == "object" && Ce(L) && Ce(M) ? Dn(L, M) : v.$state[p] = M;
|
|
2424
2424
|
}
|
|
2425
|
-
We(
|
|
2426
|
-
}), Object.keys(
|
|
2427
|
-
p in v.$state || dt(
|
|
2428
|
-
}), u = !1, c = !1, o.state.value[e] = it(v._hmrPayload, "hotState"), c = !0,
|
|
2425
|
+
We(m, p, it(v.$state, p));
|
|
2426
|
+
}), Object.keys(m.$state).forEach((p) => {
|
|
2427
|
+
p in v.$state || dt(m, p);
|
|
2428
|
+
}), u = !1, c = !1, o.state.value[e] = it(v._hmrPayload, "hotState"), c = !0, Y().then(() => {
|
|
2429
2429
|
u = !0;
|
|
2430
2430
|
});
|
|
2431
2431
|
for (const p in v._hmrPayload.actions) {
|
|
2432
|
-
const
|
|
2433
|
-
We(
|
|
2432
|
+
const L = v[p];
|
|
2433
|
+
We(m, p, E(p, L));
|
|
2434
2434
|
}
|
|
2435
2435
|
for (const p in v._hmrPayload.getters) {
|
|
2436
|
-
const
|
|
2436
|
+
const L = v._hmrPayload.getters[p], M = s ? (
|
|
2437
2437
|
// special handling of options api
|
|
2438
|
-
|
|
2439
|
-
) :
|
|
2440
|
-
We(
|
|
2438
|
+
O(() => (Pe(o), L.call(m, m)))
|
|
2439
|
+
) : L;
|
|
2440
|
+
We(m, p, M);
|
|
2441
2441
|
}
|
|
2442
|
-
Object.keys(
|
|
2443
|
-
p in v._hmrPayload.getters || dt(
|
|
2444
|
-
}), Object.keys(
|
|
2445
|
-
p in v._hmrPayload.actions || dt(
|
|
2446
|
-
}),
|
|
2442
|
+
Object.keys(m._hmrPayload.getters).forEach((p) => {
|
|
2443
|
+
p in v._hmrPayload.getters || dt(m, p);
|
|
2444
|
+
}), Object.keys(m._hmrPayload.actions).forEach((p) => {
|
|
2445
|
+
p in v._hmrPayload.actions || dt(m, p);
|
|
2446
|
+
}), m._hmrPayload = v._hmrPayload, m._getters = v._getters, m._hotUpdating = !1;
|
|
2447
2447
|
})), Ae) {
|
|
2448
2448
|
const v = {
|
|
2449
2449
|
writable: !0,
|
|
@@ -2452,28 +2452,28 @@ function gt(e, n, t = {}, o, l, s) {
|
|
|
2452
2452
|
enumerable: !1
|
|
2453
2453
|
};
|
|
2454
2454
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
|
|
2455
|
-
Object.defineProperty(
|
|
2455
|
+
Object.defineProperty(m, p, te({ value: m[p] }, v));
|
|
2456
2456
|
});
|
|
2457
2457
|
}
|
|
2458
2458
|
return o._p.forEach((v) => {
|
|
2459
2459
|
if (Ae) {
|
|
2460
2460
|
const p = r.run(() => v({
|
|
2461
|
-
store:
|
|
2461
|
+
store: m,
|
|
2462
2462
|
app: o._a,
|
|
2463
2463
|
pinia: o,
|
|
2464
2464
|
options: a
|
|
2465
2465
|
}));
|
|
2466
|
-
Object.keys(p || {}).forEach((
|
|
2466
|
+
Object.keys(p || {}).forEach((L) => m._customProperties.add(L)), te(m, p);
|
|
2467
2467
|
} else
|
|
2468
|
-
te(
|
|
2469
|
-
store:
|
|
2468
|
+
te(m, r.run(() => v({
|
|
2469
|
+
store: m,
|
|
2470
2470
|
app: o._a,
|
|
2471
2471
|
pinia: o,
|
|
2472
2472
|
options: a
|
|
2473
2473
|
})));
|
|
2474
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
2474
|
+
}), process.env.NODE_ENV !== "production" && m.$state && typeof m.$state == "object" && typeof m.$state.constructor == "function" && !m.$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 "${
|
|
2476
|
+
Found in store "${m.$id}".`), x && s && t.hydrate && t.hydrate(m.$state, x), u = !0, c = !0, m;
|
|
2477
2477
|
}
|
|
2478
2478
|
function He(e, n, t) {
|
|
2479
2479
|
let o, l;
|
|
@@ -2493,15 +2493,15 @@ 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,
|
|
2497
|
-
i._hotUpdate(
|
|
2496
|
+
const d = "__hot:" + o, T = s ? gt(d, n, l, a, !0) : qt(d, te({}, l), a, !0);
|
|
2497
|
+
i._hotUpdate(T), 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
|
|
2504
|
-
|
|
2503
|
+
const T = d.proxy, g = "_pStores" in T ? T._pStores : T._pStores = {};
|
|
2504
|
+
g[o] = c;
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
2507
|
return c;
|
|
@@ -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 =
|
|
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 =
|
|
2533
|
+
const n = xe(), t = e, o = Gn(e, "modelValue"), l = $(""), s = $(null), r = O(() => 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(),
|
|
2538
|
+
return (i, u) => (h(), Z(k(gl), {
|
|
2539
2539
|
modelValue: o.value,
|
|
2540
2540
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => o.value = c),
|
|
2541
|
-
disabled:
|
|
2541
|
+
disabled: k(n).loading,
|
|
2542
2542
|
as: "div",
|
|
2543
2543
|
class: "relative mt-1"
|
|
2544
2544
|
}, {
|
|
2545
2545
|
default: ze(() => [
|
|
2546
|
-
|
|
2546
|
+
N(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
|
-
|
|
2552
|
+
N(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
|
-
|
|
2558
|
+
N(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,21 +2563,21 @@ const xe = He("loader", () => {
|
|
|
2563
2563
|
]),
|
|
2564
2564
|
_: 1
|
|
2565
2565
|
}, 512),
|
|
2566
|
-
|
|
2566
|
+
N(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),
|
|
2568
|
+
(h(!0), C(z, null, Q(r.value, ([c, d]) => (h(), Z(k(yl), {
|
|
2569
2569
|
key: c,
|
|
2570
2570
|
value: c
|
|
2571
2571
|
}, {
|
|
2572
|
-
default: ze(({ active:
|
|
2572
|
+
default: ze(({ active: T, selected: g }) => [
|
|
2573
2573
|
f("li", {
|
|
2574
2574
|
class: P([
|
|
2575
2575
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
2576
|
-
|
|
2576
|
+
T ? "bg-primary text-primary-content" : "text-base-content"
|
|
2577
2577
|
])
|
|
2578
2578
|
}, [
|
|
2579
2579
|
f("span", {
|
|
2580
|
-
class: P(["block truncate",
|
|
2580
|
+
class: P(["block truncate", g && "font-semibold"])
|
|
2581
2581
|
}, G(d), 3)
|
|
2582
2582
|
], 2)
|
|
2583
2583
|
]),
|
|
@@ -2590,9 +2590,9 @@ const xe = He("loader", () => {
|
|
|
2590
2590
|
_: 1
|
|
2591
2591
|
}, 8, ["modelValue", "disabled"]));
|
|
2592
2592
|
}
|
|
2593
|
-
}, Kl = ["disabled"], es = /* @__PURE__ */
|
|
2593
|
+
}, Kl = ["disabled"], es = /* @__PURE__ */ Ne('<svg class="w-4 h-4 text-primary" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.68688 2.3131C3.88214 2.50837 3.88214 2.82495 3.68688 3.02021L2.04043 4.66666L3.68688 6.3131C3.88214 6.50837 3.88214 6.82495 3.68688 7.02021C3.49162 7.21547 3.17504 7.21547 2.97977 7.02021L0.979775 5.02021C0.784513 4.82495 0.784513 4.50837 0.979775 4.3131L2.97977 2.3131C3.17504 2.11784 3.49162 2.11784 3.68688 2.3131Z" fill="currentColor"></path><path d="M12.3131 8.97977C12.5084 8.78451 12.825 8.78451 13.0202 8.97977L15.0202 10.9798C15.2155 11.175 15.2155 11.4916 15.0202 11.6869L13.0202 13.6869C12.825 13.8821 12.5084 13.8821 12.3131 13.6869C12.1178 13.4916 12.1178 13.175 12.3131 12.9798L13.9596 11.3333L12.3131 9.68688C12.1178 9.49161 12.1178 9.17503 12.3131 8.97977Z" fill="currentColor"></path><path d="M0.833328 4.66666C0.833328 4.39051 1.05719 4.16666 1.33333 4.16666H14.6667C14.9428 4.16666 15.1667 4.39051 15.1667 4.66666C15.1667 4.9428 14.9428 5.16666 14.6667 5.16666H1.33333C1.05719 5.16666 0.833328 4.9428 0.833328 4.66666Z" fill="currentColor"></path><path d="M0.833328 11.3333C0.833328 11.0572 1.05719 10.8333 1.33333 10.8333H14.6667C14.9428 10.8333 15.1667 11.0572 15.1667 11.3333C15.1667 11.6095 14.9428 11.8333 14.6667 11.8333H1.33333C1.05719 11.8333 0.833328 11.6095 0.833328 11.3333Z" fill="currentColor"></path></svg>', 1), ts = [
|
|
2594
2594
|
es
|
|
2595
|
-
], ns = ["disabled"], os = /* @__PURE__ */
|
|
2595
|
+
], ns = ["disabled"], os = /* @__PURE__ */ Ne('<svg class="w-4 h-4 text-primary" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.68688 2.3131C3.88214 2.50837 3.88214 2.82495 3.68688 3.02021L2.04043 4.66666L3.68688 6.3131C3.88214 6.50837 3.88214 6.82495 3.68688 7.02021C3.49162 7.21547 3.17504 7.21547 2.97977 7.02021L0.979775 5.02021C0.784513 4.82495 0.784513 4.50837 0.979775 4.3131L2.97977 2.3131C3.17504 2.11784 3.49162 2.11784 3.68688 2.3131Z" fill="currentColor"></path><path d="M12.3131 8.97977C12.5084 8.78451 12.825 8.78451 13.0202 8.97977L15.0202 10.9798C15.2155 11.175 15.2155 11.4916 15.0202 11.6869L13.0202 13.6869C12.825 13.8821 12.5084 13.8821 12.3131 13.6869C12.1178 13.4916 12.1178 13.175 12.3131 12.9798L13.9596 11.3333L12.3131 9.68688C12.1178 9.49161 12.1178 9.17503 12.3131 8.97977Z" fill="currentColor"></path><path d="M0.833328 4.66666C0.833328 4.39051 1.05719 4.16666 1.33333 4.16666H14.6667C14.9428 4.16666 15.1667 4.39051 15.1667 4.66666C15.1667 4.9428 14.9428 5.16666 14.6667 5.16666H1.33333C1.05719 5.16666 0.833328 4.9428 0.833328 4.66666Z" fill="currentColor"></path><path d="M0.833328 11.3333C0.833328 11.0572 1.05719 10.8333 1.33333 10.8333H14.6667C14.9428 10.8333 15.1667 11.0572 15.1667 11.3333C15.1667 11.6095 14.9428 11.8333 14.6667 11.8333H1.33333C1.05719 11.8333 0.833328 11.6095 0.833328 11.3333Z" fill="currentColor"></path></svg>', 1), ls = [
|
|
2596
2596
|
os
|
|
2597
2597
|
], ss = {
|
|
2598
2598
|
__name: "SwapBtn",
|
|
@@ -2604,21 +2604,21 @@ const xe = He("loader", () => {
|
|
|
2604
2604
|
},
|
|
2605
2605
|
emits: ["swap"],
|
|
2606
2606
|
setup(e, { emit: n }) {
|
|
2607
|
-
const t = xe(), o =
|
|
2608
|
-
return (s, r) => e.isBidirect ? (h(),
|
|
2607
|
+
const t = xe(), o = O(() => t.isLoading("translation")), l = n;
|
|
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(),
|
|
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 =
|
|
2618
|
+
const e = $("auto"), n = $("vi"), t = $({
|
|
2619
2619
|
src: [],
|
|
2620
2620
|
target: []
|
|
2621
|
-
}), o =
|
|
2621
|
+
}), o = O(() => t.value.src[e.value]), l = O(() => t.value.target[n.value]);
|
|
2622
2622
|
function s(i, u) {
|
|
2623
2623
|
e.value = i == null ? void 0 : i.src, n.value = i == null ? void 0 : i.target, t.value = u;
|
|
2624
2624
|
}
|
|
@@ -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 =
|
|
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) =>
|
|
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(),
|
|
2667
|
-
(h(!0),
|
|
2666
|
+
t.value.length > 0 ? (h(), C("div", us, [
|
|
2667
|
+
(h(!0), C(z, null, Q(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) =>
|
|
2671
|
-
}, G(
|
|
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(),
|
|
2676
|
-
(h(!0),
|
|
2675
|
+
o.value.length > 0 ? (h(), C("div", fs, [
|
|
2676
|
+
(h(!0), C(z, null, Q(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) =>
|
|
2680
|
-
}, G(
|
|
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
|
-
|
|
2687
|
-
modelValue:
|
|
2688
|
-
"onUpdate:modelValue": r[0] || (r[0] = (a) =>
|
|
2689
|
-
languages:
|
|
2686
|
+
N(Gt, {
|
|
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
|
-
|
|
2694
|
-
isBidirect:
|
|
2693
|
+
N(ss, {
|
|
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
|
-
|
|
2700
|
-
modelValue:
|
|
2701
|
-
"onUpdate:modelValue": r[1] || (r[1] = (a) =>
|
|
2702
|
-
languages:
|
|
2699
|
+
N(Gt, {
|
|
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
|
-
},
|
|
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(),
|
|
2721
|
+
return h(), C("span", Cs);
|
|
2722
2722
|
}
|
|
2723
2723
|
const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
2724
|
-
const e =
|
|
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 =
|
|
2777
|
+
const t = bt(), o = e, l = n, s = O(() => 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
|
-
}, (
|
|
2808
|
+
}, (T, g) => 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(),
|
|
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(),
|
|
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"],
|
|
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),
|
|
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
|
-
|
|
2844
|
-
|
|
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(),
|
|
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(),
|
|
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",
|
|
@@ -2878,14 +2878,14 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
|
2878
2878
|
fill: "currentColor"
|
|
2879
2879
|
}, null, -1), Ps = [
|
|
2880
2880
|
Rs
|
|
2881
|
-
],
|
|
2881
|
+
], Bs = {
|
|
2882
2882
|
__name: "FavoriteBtn",
|
|
2883
2883
|
props: {
|
|
2884
2884
|
disabled: Boolean,
|
|
2885
2885
|
isFilled: Boolean
|
|
2886
2886
|
},
|
|
2887
2887
|
setup(e) {
|
|
2888
|
-
return (n, t) => (h(),
|
|
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(),
|
|
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(),
|
|
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",
|
|
@@ -2909,7 +2909,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
|
2909
2909
|
], 10, As)
|
|
2910
2910
|
]));
|
|
2911
2911
|
}
|
|
2912
|
-
},
|
|
2912
|
+
}, Ns = {
|
|
2913
2913
|
class: "tooltip tooltip-top 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:!text-xs before:!py-1 before:!px-2",
|
|
2914
2914
|
"data-tip": "AI Translate"
|
|
2915
2915
|
}, Fs = ["disabled"], js = /* @__PURE__ */ f("path", {
|
|
@@ -2925,7 +2925,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
|
2925
2925
|
js,
|
|
2926
2926
|
Hs,
|
|
2927
2927
|
zs
|
|
2928
|
-
], Us = /* @__PURE__ */
|
|
2928
|
+
], Us = /* @__PURE__ */ Ne('<path d="M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z" fill="currentColor"></path><path d="M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z" fill="currentColor"></path><path d="M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z" fill="currentColor"></path><circle cx="3.5" cy="3.5" r="1.5" fill="currentColor"></circle><ellipse cx="4.5" cy="10" rx="0.5" ry="1" fill="currentColor"></ellipse><path d="M3.5 1L4.79904 2.5H2.20096L3.5 1Z" fill="currentColor"></path><path d="M6 3.5L4.5 4.79904L4.5 2.20096L6 3.5Z" fill="currentColor"></path><path d="M10.3697 6.67832L8.22108 7.01422L9.5776 4.65296L10.3697 6.67832Z" fill="currentColor"></path><path d="M8.27756 5.34149L10.768 6.00067L9.11199 7.77878L8.27756 5.34149Z" fill="currentColor"></path><path d="M1 3.5L2.5 2.20096L2.5 4.79904L1 3.5Z" fill="currentColor"></path><path d="M3.5 6L2.20096 4.5L4.79904 4.5L3.5 6Z" fill="currentColor"></path><circle cx="9" cy="6" r="1" fill="currentColor"></circle><path d="M5.49718 9.92495L4.03391 10.4693L3.96891 9.60573L5.49718 9.92495Z" fill="currentColor"></path><path d="M3.54089 9.71696L5.10212 9.72621L4.857 10.5568L3.54089 9.71696Z" fill="currentColor"></path><path d="M3.50071 9.96247L5.0159 9.58606L4.9834 10.4515L3.50071 9.96247Z" fill="currentColor"></path>', 15), Ws = [
|
|
2929
2929
|
Us
|
|
2930
2930
|
], qs = {
|
|
2931
2931
|
__name: "AIBtn",
|
|
@@ -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(),
|
|
2937
|
+
return (n, t) => (h(), C("div", Ns, [
|
|
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(),
|
|
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(),
|
|
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",
|
|
@@ -2963,18 +2963,18 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
|
2963
2963
|
fill: "currentColor"
|
|
2964
2964
|
}, null, -1), Qs = [
|
|
2965
2965
|
Ys
|
|
2966
|
-
],
|
|
2966
|
+
], Bn = {
|
|
2967
2967
|
__name: "CopyBtn",
|
|
2968
2968
|
props: {
|
|
2969
2969
|
disabled: Boolean
|
|
2970
2970
|
},
|
|
2971
2971
|
setup(e) {
|
|
2972
|
-
const n =
|
|
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(),
|
|
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(),
|
|
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,39 +3058,39 @@ 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(),
|
|
3062
|
-
e.src && e.isTTS ? (h(),
|
|
3061
|
+
return (o, l) => (h(), C("div", Xs, [
|
|
3062
|
+
e.src && e.isTTS ? (h(), Z(Es, {
|
|
3063
3063
|
key: 0,
|
|
3064
3064
|
type: e.type,
|
|
3065
3065
|
onLoadTTS: l[0] || (l[0] = (s) => t("loadTTS"))
|
|
3066
3066
|
}, null, 8, ["type"])) : R("", !0),
|
|
3067
3067
|
f("div", Ks, [
|
|
3068
3068
|
Ee(G(e.srcLabel) + " ", 1),
|
|
3069
|
-
e.phonetic ? (h(),
|
|
3069
|
+
e.phonetic ? (h(), C("span", ea, "- " + G(e.phonetic), 1)) : R("", !0)
|
|
3070
3070
|
]),
|
|
3071
|
-
e.loading ? (h(),
|
|
3071
|
+
e.loading ? (h(), Z(Mt, {
|
|
3072
3072
|
key: 1,
|
|
3073
3073
|
class: "absolute right-6 top-2"
|
|
3074
3074
|
})) : R("", !0),
|
|
3075
3075
|
f("div", ta, [
|
|
3076
|
-
e.hasClearBtn ? (h(),
|
|
3076
|
+
e.hasClearBtn ? (h(), Z(Pn, {
|
|
3077
3077
|
key: 0,
|
|
3078
3078
|
onClick: l[1] || (l[1] = (s) => t("clear")),
|
|
3079
3079
|
disabled: e.loading
|
|
3080
3080
|
}, null, 8, ["disabled"])) : R("", !0),
|
|
3081
|
-
e.src && e.hasAIBtn ? (h(),
|
|
3081
|
+
e.src && e.hasAIBtn ? (h(), Z(qs, {
|
|
3082
3082
|
key: 1,
|
|
3083
3083
|
isFilled: e.isAITranslate,
|
|
3084
3084
|
onClick: l[2] || (l[2] = (s) => t("aiTranslate")),
|
|
3085
3085
|
disabled: e.loading
|
|
3086
3086
|
}, null, 8, ["isFilled", "disabled"])) : R("", !0),
|
|
3087
|
-
e.src && e.hasFavoriteBtn ? (h(),
|
|
3087
|
+
e.src && e.hasFavoriteBtn ? (h(), Z(Bs, {
|
|
3088
3088
|
key: 2,
|
|
3089
3089
|
isFilled: e.isFavorite,
|
|
3090
3090
|
onClick: l[3] || (l[3] = (s) => t("favorite")),
|
|
3091
3091
|
disabled: e.loading
|
|
3092
3092
|
}, null, 8, ["isFilled", "disabled"])) : R("", !0),
|
|
3093
|
-
e.src && e.hasCopyBtn ? (h(),
|
|
3093
|
+
e.src && e.hasCopyBtn ? (h(), Z(Bn, {
|
|
3094
3094
|
key: 3,
|
|
3095
3095
|
onClick: l[4] || (l[4] = (s) => t("copy")),
|
|
3096
3096
|
disabled: e.loading
|
|
@@ -3098,18 +3098,18 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
|
3098
3098
|
])
|
|
3099
3099
|
]));
|
|
3100
3100
|
}
|
|
3101
|
-
},
|
|
3102
|
-
const e =
|
|
3101
|
+
}, Nn = /* @__PURE__ */ he(na, [["__scopeId", "data-v-faca0157"]]), ve = He("translation", () => {
|
|
3102
|
+
const e = $(null), n = $(null), t = $(null), o = $({
|
|
3103
3103
|
src: null,
|
|
3104
3104
|
target: null
|
|
3105
|
-
}), l =
|
|
3105
|
+
}), l = $(null), s = $([]), r = $([]), a = $([]), i = $([]), u = $({
|
|
3106
3106
|
src: null,
|
|
3107
3107
|
target: null
|
|
3108
|
-
}), c = Oe(), d =
|
|
3109
|
-
function
|
|
3108
|
+
}), c = Oe(), d = O(() => c.getLabel(e.value)), T = O(() => c.getLabel(n.value));
|
|
3109
|
+
function g(b) {
|
|
3110
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;
|
|
3111
3111
|
}
|
|
3112
|
-
function
|
|
3112
|
+
function x() {
|
|
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:
|
|
3125
|
+
targetLabel: T,
|
|
3126
3126
|
phonetic: o,
|
|
3127
3127
|
text: t,
|
|
3128
3128
|
result: l,
|
|
@@ -3131,15 +3131,15 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
|
|
|
3131
3131
|
synonyms: a,
|
|
3132
3132
|
examples: i,
|
|
3133
3133
|
tts: u,
|
|
3134
|
-
init:
|
|
3135
|
-
reset:
|
|
3134
|
+
init: g,
|
|
3135
|
+
reset: x
|
|
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() :
|
|
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,27 +3182,27 @@ function Qt(e) {
|
|
|
3182
3182
|
}
|
|
3183
3183
|
const ia = la ? window : void 0;
|
|
3184
3184
|
function ua() {
|
|
3185
|
-
const e =
|
|
3185
|
+
const e = $(!1), n = rn();
|
|
3186
3186
|
return n && se(() => {
|
|
3187
3187
|
e.value = !0;
|
|
3188
3188
|
}, n), e;
|
|
3189
3189
|
}
|
|
3190
3190
|
function ca(e) {
|
|
3191
3191
|
const n = ua();
|
|
3192
|
-
return
|
|
3192
|
+
return O(() => (n.value, !!e()));
|
|
3193
3193
|
}
|
|
3194
3194
|
function da(e, n, t = {}) {
|
|
3195
3195
|
const { window: o = ia, ...l } = t;
|
|
3196
3196
|
let s;
|
|
3197
3197
|
const r = ca(() => o && "ResizeObserver" in o), a = () => {
|
|
3198
3198
|
s && (s.disconnect(), s = void 0);
|
|
3199
|
-
}, i =
|
|
3199
|
+
}, i = O(() => Array.isArray(e) ? e.map((d) => Qt(d)) : [Qt(e)]), u = F(
|
|
3200
3200
|
i,
|
|
3201
3201
|
(d) => {
|
|
3202
3202
|
if (a(), r.value && o) {
|
|
3203
3203
|
s = new ResizeObserver(n);
|
|
3204
|
-
for (const
|
|
3205
|
-
|
|
3204
|
+
for (const T of d)
|
|
3205
|
+
T && s.observe(T, 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 =
|
|
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)
|
|
@@ -3224,7 +3224,7 @@ function st(e) {
|
|
|
3224
3224
|
let i = "";
|
|
3225
3225
|
t.value.style[l] = "1px", s.value = (a = t.value) == null ? void 0 : a.scrollHeight, e != null && e.styleTarget ? Ke(e.styleTarget).style[l] = `${s.value}px` : i = `${s.value}px`, t.value.style[l] = i;
|
|
3226
3226
|
}
|
|
3227
|
-
return F([o, t], () =>
|
|
3227
|
+
return F([o, t], () => Y(r), { immediate: !0 }), F(s, () => {
|
|
3228
3228
|
var a;
|
|
3229
3229
|
return (a = e == null ? void 0 : e.onResize) == null ? void 0 : a.call(e);
|
|
3230
3230
|
}), da(t, () => r()), e != null && e.watch && F(e.watch, r, { immediate: !0, deep: !0 }), {
|
|
@@ -3247,53 +3247,53 @@ 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 =
|
|
3251
|
-
var
|
|
3252
|
-
return (
|
|
3250
|
+
const t = ve(), o = e, l = $(o.text), s = O(() => t.src), r = O(() => t.srcLabel), a = O(() => {
|
|
3251
|
+
var x;
|
|
3252
|
+
return (x = t.phonetic) == null ? void 0 : x.src;
|
|
3253
3253
|
}), { textarea: i } = st({ input: l, styleProp: "minHeight" }), u = n, c = ra(() => {
|
|
3254
3254
|
u("change", l.value);
|
|
3255
|
-
},
|
|
3255
|
+
}, Le.INPUT_DEBOUNCE);
|
|
3256
3256
|
se(() => {
|
|
3257
|
-
|
|
3257
|
+
g();
|
|
3258
3258
|
});
|
|
3259
3259
|
function d() {
|
|
3260
3260
|
if (!l.value) {
|
|
3261
|
-
|
|
3261
|
+
T();
|
|
3262
3262
|
return;
|
|
3263
3263
|
}
|
|
3264
3264
|
c();
|
|
3265
3265
|
}
|
|
3266
|
-
function
|
|
3266
|
+
function T() {
|
|
3267
3267
|
u("clear"), l.value = "", i.value.focus();
|
|
3268
3268
|
}
|
|
3269
|
-
async function
|
|
3270
|
-
await
|
|
3269
|
+
async function g() {
|
|
3270
|
+
await Y(), i.value.select();
|
|
3271
3271
|
}
|
|
3272
3272
|
return F(
|
|
3273
3273
|
() => o.text,
|
|
3274
|
-
(
|
|
3275
|
-
l.value !==
|
|
3274
|
+
(x) => {
|
|
3275
|
+
l.value !== x && g(), l.value = x;
|
|
3276
3276
|
}
|
|
3277
|
-
), (
|
|
3278
|
-
|
|
3277
|
+
), (x, b) => (h(), C("div", fa, [
|
|
3278
|
+
N(Nn, {
|
|
3279
3279
|
src: s.value,
|
|
3280
3280
|
srcLabel: r.value,
|
|
3281
3281
|
isTTS: e.isTTS,
|
|
3282
3282
|
type: "src",
|
|
3283
3283
|
phonetic: a.value,
|
|
3284
3284
|
hasClearBtn: l.value.length > 0,
|
|
3285
|
-
onClear:
|
|
3286
|
-
onLoadTTS: b[0] || (b[0] = (
|
|
3285
|
+
onClear: T,
|
|
3286
|
+
onLoadTTS: b[0] || (b[0] = (A) => 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] = (
|
|
3291
|
+
"onUpdate:modelValue": b[1] || (b[1] = (A) => l.value = A),
|
|
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",
|
|
3295
3295
|
onInput: d,
|
|
3296
|
-
onFocus:
|
|
3296
|
+
onFocus: g
|
|
3297
3297
|
}, null, 544), [
|
|
3298
3298
|
[
|
|
3299
3299
|
nt,
|
|
@@ -3318,11 +3318,11 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
3318
3318
|
},
|
|
3319
3319
|
emits: ["loadTTS", "favorite", "aiTranslate", "copy"],
|
|
3320
3320
|
setup(e, { emit: n }) {
|
|
3321
|
-
const t = ve(), o =
|
|
3322
|
-
var
|
|
3323
|
-
return (
|
|
3324
|
-
}), a = xe(), i =
|
|
3325
|
-
return (
|
|
3321
|
+
const t = ve(), o = O(() => t.result), l = O(() => t.target), s = O(() => t.targetLabel), r = O(() => {
|
|
3322
|
+
var T;
|
|
3323
|
+
return (T = t.phonetic) == null ? void 0 : T.target;
|
|
3324
|
+
}), a = xe(), i = O(() => a.isLoading("translation")), { textarea: u, input: c } = st({ input: o, styleProp: "minHeight" }), d = n;
|
|
3325
|
+
return (T, g) => (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
|
{
|
|
@@ -3331,7 +3331,7 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
3331
3331
|
])
|
|
3332
3332
|
}, [
|
|
3333
3333
|
f("div", ha, [
|
|
3334
|
-
|
|
3334
|
+
N(Nn, {
|
|
3335
3335
|
loading: i.value,
|
|
3336
3336
|
src: l.value,
|
|
3337
3337
|
srcLabel: s.value,
|
|
@@ -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:
|
|
3347
|
-
onLoadTTS:
|
|
3348
|
-
onAiTranslate:
|
|
3349
|
-
onCopy:
|
|
3346
|
+
onFavorite: g[0] || (g[0] = (x) => d("favorite")),
|
|
3347
|
+
onLoadTTS: g[1] || (g[1] = (x) => d("loadTTS")),
|
|
3348
|
+
onAiTranslate: g[2] || (g[2] = (x) => d("aiTranslate")),
|
|
3349
|
+
onCopy: g[3] || (g[3] = (x) => 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":
|
|
3355
|
+
"onUpdate:modelValue": g[4] || (g[4] = (x) => $e(c) ? c.value = x : 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,
|
|
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(),
|
|
3375
|
-
n.isExpanded ? (h(),
|
|
3374
|
+
return (t, o) => (h(), C("button", Ca, [
|
|
3375
|
+
n.isExpanded ? (h(), Z(k(Tl), {
|
|
3376
3376
|
key: 0,
|
|
3377
3377
|
class: "w-7 text-base-content/50"
|
|
3378
|
-
})) : (h(),
|
|
3378
|
+
})) : (h(), Z(k(wl), {
|
|
3379
3379
|
key: 1,
|
|
3380
3380
|
class: "w-7 text-base-content/50"
|
|
3381
3381
|
}))
|
|
@@ -3385,37 +3385,37 @@ 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 =
|
|
3388
|
+
const t = $(!0), o = ve(), l = Oe(), s = O(() => 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(),
|
|
3393
|
+
return (u, c) => (h(), C(z, null, [
|
|
3394
3394
|
f("div", {
|
|
3395
3395
|
class: "flex justify-between items-center",
|
|
3396
3396
|
onClick: a
|
|
3397
3397
|
}, [
|
|
3398
3398
|
xa,
|
|
3399
|
-
|
|
3399
|
+
N(at, { isExpanded: t.value }, null, 8, ["isExpanded"])
|
|
3400
3400
|
]),
|
|
3401
3401
|
f("div", {
|
|
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),
|
|
3406
|
-
key: `${d.pos}-${
|
|
3405
|
+
(h(!0), C(z, null, Q(s.value, (d, T) => (h(), C("li", {
|
|
3406
|
+
key: `${d.pos}-${T}`,
|
|
3407
3407
|
class: "mb-2"
|
|
3408
3408
|
}, [
|
|
3409
3409
|
f("h5", ya, G(d.pos), 1),
|
|
3410
3410
|
f("ul", wa, [
|
|
3411
|
-
(h(!0),
|
|
3412
|
-
key: `${
|
|
3411
|
+
(h(!0), C(z, null, Q(d.items, (g, x) => (h(), C("li", {
|
|
3412
|
+
key: `${g.word}-${x}`
|
|
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(
|
|
3417
|
-
}, G(
|
|
3418
|
-
f("small", Ta, " - " + G(
|
|
3416
|
+
onClick: (b) => i(g.word)
|
|
3417
|
+
}, G(g.word), 9, _a),
|
|
3418
|
+
f("small", Ta, " - " + G(g.reverse_translation.join(", ")), 1)
|
|
3419
3419
|
]))), 128))
|
|
3420
3420
|
])
|
|
3421
3421
|
]))), 128))
|
|
@@ -3423,40 +3423,40 @@ 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" },
|
|
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 =
|
|
3432
|
+
const n = $(!0), t = ve(), o = O(() => t.definitions), l = () => {
|
|
3433
3433
|
n.value = !n.value;
|
|
3434
3434
|
};
|
|
3435
|
-
return (s, r) => (h(),
|
|
3435
|
+
return (s, r) => (h(), C(z, null, [
|
|
3436
3436
|
f("div", {
|
|
3437
3437
|
class: "flex justify-between items-center",
|
|
3438
3438
|
onClick: l
|
|
3439
3439
|
}, [
|
|
3440
3440
|
Ea,
|
|
3441
|
-
|
|
3441
|
+
N(at, { isExpanded: n.value }, null, 8, ["isExpanded"])
|
|
3442
3442
|
]),
|
|
3443
3443
|
f("div", {
|
|
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),
|
|
3447
|
+
(h(!0), C(z, null, Q(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),
|
|
3453
|
+
(h(!0), C(z, null, Q(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
|
-
|
|
3459
|
-
u.example ? (h(),
|
|
3458
|
+
La,
|
|
3459
|
+
u.example ? (h(), C("small", Ia, '"' + G(u.example) + '"', 1)) : R("", !0)
|
|
3460
3460
|
]))), 128))
|
|
3461
3461
|
])
|
|
3462
3462
|
]))), 128))
|
|
@@ -3467,22 +3467,22 @@ 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 =
|
|
3470
|
+
const n = $(!0), t = ve(), o = O(() => t.examples), l = () => {
|
|
3471
3471
|
n.value = !n.value;
|
|
3472
3472
|
};
|
|
3473
|
-
return (s, r) => (h(),
|
|
3473
|
+
return (s, r) => (h(), C(z, null, [
|
|
3474
3474
|
f("div", {
|
|
3475
3475
|
class: "flex justify-between items-center",
|
|
3476
3476
|
onClick: l
|
|
3477
3477
|
}, [
|
|
3478
3478
|
Ma,
|
|
3479
|
-
|
|
3479
|
+
N(at, { isExpanded: n.value }, null, 8, ["isExpanded"])
|
|
3480
3480
|
]),
|
|
3481
3481
|
f("div", {
|
|
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),
|
|
3485
|
+
(h(!0), C(z, null, Q(o.value, (a, i) => (h(), C("li", {
|
|
3486
3486
|
key: `${a.definition_id}-${i}`,
|
|
3487
3487
|
innerHTML: a
|
|
3488
3488
|
}, null, 8, Va))), 128))
|
|
@@ -3490,43 +3490,43 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
3490
3490
|
], 2)
|
|
3491
3491
|
], 64));
|
|
3492
3492
|
}
|
|
3493
|
-
}, Ra = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Synonyms", -1), Pa = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" },
|
|
3493
|
+
}, Ra = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Synonyms", -1), Pa = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Ba = { class: "list-none list-inside" }, Na = { class: "flex flex-wrap" }, Fa = ["onClick"], ja = {
|
|
3494
3494
|
__name: "Synonyms",
|
|
3495
3495
|
emits: ["translate"],
|
|
3496
3496
|
setup(e, { emit: n }) {
|
|
3497
|
-
const t =
|
|
3497
|
+
const t = $(!0), o = ve(), l = O(() => 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(),
|
|
3502
|
+
return (i, u) => (h(), C(z, null, [
|
|
3503
3503
|
f("div", {
|
|
3504
3504
|
class: "flex justify-between items-center",
|
|
3505
3505
|
onClick: r
|
|
3506
3506
|
}, [
|
|
3507
3507
|
Ra,
|
|
3508
|
-
|
|
3508
|
+
N(at, { isExpanded: t.value }, null, 8, ["isExpanded"])
|
|
3509
3509
|
]),
|
|
3510
3510
|
f("div", {
|
|
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),
|
|
3514
|
+
(h(!0), C(z, null, Q(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
|
-
f("ul",
|
|
3520
|
-
(h(!0),
|
|
3521
|
-
key: `${
|
|
3519
|
+
f("ul", Ba, [
|
|
3520
|
+
(h(!0), C(z, null, Q(c.items, (T, g) => (h(), C("li", {
|
|
3521
|
+
key: `${T.word}-${g}`,
|
|
3522
3522
|
class: "mb-2"
|
|
3523
3523
|
}, [
|
|
3524
|
-
f("div",
|
|
3525
|
-
(h(!0),
|
|
3526
|
-
key: `${
|
|
3524
|
+
f("div", Na, [
|
|
3525
|
+
(h(!0), C(z, null, Q(T.synonym, (x, b) => (h(), C("span", {
|
|
3526
|
+
key: `${x}-${b}`,
|
|
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: (
|
|
3529
|
-
}, G(
|
|
3528
|
+
onClick: (A) => a(x)
|
|
3529
|
+
}, G(x), 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(),
|
|
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(),
|
|
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(),
|
|
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",
|
|
@@ -3605,19 +3605,19 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
3605
3605
|
},
|
|
3606
3606
|
emits: ["aiExplain"],
|
|
3607
3607
|
setup(e, { emit: n }) {
|
|
3608
|
-
const t = xe(), o =
|
|
3608
|
+
const t = xe(), o = O(() => t.isLoading("aiExplanation")), l = n;
|
|
3609
3609
|
function s() {
|
|
3610
3610
|
l("aiExplain");
|
|
3611
3611
|
}
|
|
3612
3612
|
return (r, a) => {
|
|
3613
3613
|
var i, u;
|
|
3614
|
-
return h(),
|
|
3614
|
+
return h(), C("div", Ja, [
|
|
3615
3615
|
f("div", Ya, [
|
|
3616
3616
|
Qa,
|
|
3617
3617
|
f("div", Xa, [
|
|
3618
|
-
o.value ? (h(),
|
|
3618
|
+
o.value ? (h(), Z(Mt, { key: 0 })) : R("", !0),
|
|
3619
3619
|
f("div", Ka, [
|
|
3620
|
-
|
|
3620
|
+
N(Ga, {
|
|
3621
3621
|
isExpanded: e.isAIExplain,
|
|
3622
3622
|
disabled: o.value,
|
|
3623
3623
|
onClick: s
|
|
@@ -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(),
|
|
3632
|
-
(h(!0),
|
|
3633
|
-
`)) || [], (c, d) => (h(),
|
|
3631
|
+
(i = e.explanation) != null && i.result ? (h(), C("ul", er, [
|
|
3632
|
+
(h(!0), C(z, null, Q(((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-
|
|
3652
|
+
}, sr = ["ar", "fa", "iw", "yi", "ur", "pa"], ar = (e) => (Et("data-v-6989ae32"), 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 = {
|
|
@@ -3687,7 +3687,11 @@ const Xt = {
|
|
|
3687
3687
|
isFavorite: Boolean,
|
|
3688
3688
|
isAITranslate: Boolean,
|
|
3689
3689
|
isAIExplain: Boolean,
|
|
3690
|
-
aiExplainMinLength: Number
|
|
3690
|
+
aiExplainMinLength: Number,
|
|
3691
|
+
seedText: {
|
|
3692
|
+
type: String,
|
|
3693
|
+
default: ""
|
|
3694
|
+
}
|
|
3691
3695
|
},
|
|
3692
3696
|
emits: [
|
|
3693
3697
|
"opt",
|
|
@@ -3696,144 +3700,158 @@ const Xt = {
|
|
|
3696
3700
|
"favorite",
|
|
3697
3701
|
"aiTranslate",
|
|
3698
3702
|
"aiExplain",
|
|
3699
|
-
"copy"
|
|
3703
|
+
"copy",
|
|
3704
|
+
"seeded"
|
|
3700
3705
|
],
|
|
3701
3706
|
setup(e, { emit: n }) {
|
|
3702
|
-
const t =
|
|
3703
|
-
const
|
|
3704
|
-
sr.includes(
|
|
3707
|
+
const t = $(""), o = $(!1), l = $(!1), s = e, r = le("translationStore"), a = le("ttsStore"), i = le("languageStore"), u = le("loaderStore"), c = n, d = () => {
|
|
3708
|
+
const _ = s.opt.target;
|
|
3709
|
+
sr.includes(_) ? Xt.supportRTL() : Xt.removeRTL();
|
|
3705
3710
|
};
|
|
3706
3711
|
F(
|
|
3707
|
-
() =>
|
|
3708
|
-
(
|
|
3709
|
-
|
|
3712
|
+
() => s.translation,
|
|
3713
|
+
(_) => {
|
|
3714
|
+
var m;
|
|
3715
|
+
const E = (m = s.seedText) == null ? void 0 : m.trim();
|
|
3716
|
+
if (E && !l.value) {
|
|
3717
|
+
l.value = !0, o.value = !0, t.value = E, u.setLoading("translation", !0), r.reset();
|
|
3718
|
+
return;
|
|
3719
|
+
}
|
|
3720
|
+
if (!_) {
|
|
3721
|
+
l.value || u.setLoading("translation", !1);
|
|
3722
|
+
return;
|
|
3723
|
+
}
|
|
3724
|
+
const y = _.text || "", w = t.value || "";
|
|
3725
|
+
o.value && y !== w || (u.setLoading("translation", !1), t.value = y, r.init(_), a.reset());
|
|
3710
3726
|
},
|
|
3711
3727
|
{ immediate: !0 }
|
|
3712
3728
|
), F(
|
|
3713
|
-
[() =>
|
|
3714
|
-
([
|
|
3715
|
-
|
|
3729
|
+
[() => s.explanation, () => s.isAIExplain],
|
|
3730
|
+
([_]) => {
|
|
3731
|
+
_ != null && _.result && u.setLoading("aiExplanation", !1);
|
|
3716
3732
|
},
|
|
3717
3733
|
{ immediate: !0, deep: !0 }
|
|
3718
3734
|
), F(
|
|
3719
|
-
() =>
|
|
3720
|
-
(
|
|
3721
|
-
if (
|
|
3722
|
-
|
|
3735
|
+
() => s.tts,
|
|
3736
|
+
(_) => {
|
|
3737
|
+
if (!_) {
|
|
3738
|
+
a.reset();
|
|
3723
3739
|
return;
|
|
3724
3740
|
}
|
|
3725
|
-
|
|
3741
|
+
a.set(_);
|
|
3726
3742
|
},
|
|
3727
3743
|
{ immediate: !0 }
|
|
3728
|
-
), F([() =>
|
|
3729
|
-
|
|
3730
|
-
}), F([() =>
|
|
3731
|
-
|
|
3744
|
+
), F([() => s.opt, () => s.languages], ([_, E]) => {
|
|
3745
|
+
i.init(_, E), d();
|
|
3746
|
+
}), F([() => i.src, () => i.target], ([_, E]) => {
|
|
3747
|
+
c("opt", { src: _, target: E }), !l.value && b(t.value);
|
|
3732
3748
|
}), se(() => {
|
|
3733
|
-
|
|
3749
|
+
i.init(s.opt, s.languages), d(), l.value && (b(t.value), c("seeded"), Y(() => {
|
|
3750
|
+
l.value = !1;
|
|
3751
|
+
}));
|
|
3734
3752
|
});
|
|
3735
|
-
function
|
|
3736
|
-
t.value = "",
|
|
3753
|
+
function T() {
|
|
3754
|
+
o.value = !0, t.value = "", u.setLoading("translation", !1), s.isAITranslate && A(), r.reset();
|
|
3737
3755
|
}
|
|
3738
|
-
function
|
|
3739
|
-
t.value =
|
|
3756
|
+
function g(_) {
|
|
3757
|
+
o.value = !0, t.value = _, b(_);
|
|
3740
3758
|
}
|
|
3741
|
-
function x(
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3759
|
+
function x(_) {
|
|
3760
|
+
const E = _ === "src" ? r.text : r.result;
|
|
3761
|
+
c("loadTTS", { type: _, data: E });
|
|
3744
3762
|
}
|
|
3745
|
-
function
|
|
3746
|
-
|
|
3747
|
-
src:
|
|
3763
|
+
function b(_, E = i.src, y = i.target) {
|
|
3764
|
+
_ && (I(), t.value = _, u.setLoading("translation", !0), c("translate", {
|
|
3765
|
+
src: E,
|
|
3748
3766
|
target: y,
|
|
3749
|
-
text:
|
|
3767
|
+
text: _
|
|
3750
3768
|
}));
|
|
3751
3769
|
}
|
|
3752
|
-
function
|
|
3753
|
-
|
|
3754
|
-
src:
|
|
3755
|
-
target:
|
|
3770
|
+
function A() {
|
|
3771
|
+
s.isAITranslate || u.setLoading("translation", !0), c("aiTranslate", {
|
|
3772
|
+
src: i.src,
|
|
3773
|
+
target: i.target,
|
|
3756
3774
|
text: t.value
|
|
3757
3775
|
});
|
|
3758
3776
|
}
|
|
3759
|
-
function
|
|
3760
|
-
|
|
3761
|
-
src:
|
|
3762
|
-
target:
|
|
3777
|
+
function V() {
|
|
3778
|
+
s.isAIExplain || u.setLoading("aiExplanation", !0), c("aiExplain", {
|
|
3779
|
+
src: i.src,
|
|
3780
|
+
target: i.target,
|
|
3763
3781
|
text: t.value
|
|
3764
3782
|
});
|
|
3765
3783
|
}
|
|
3766
3784
|
function I() {
|
|
3767
|
-
const
|
|
3768
|
-
|
|
3785
|
+
const _ = document.getElementById("input");
|
|
3786
|
+
_ && _.getBoundingClientRect().top < 0 && _.scrollIntoView({ behavior: "smooth" });
|
|
3769
3787
|
}
|
|
3770
|
-
return (
|
|
3771
|
-
var y,
|
|
3772
|
-
return h(),
|
|
3773
|
-
|
|
3788
|
+
return (_, E) => {
|
|
3789
|
+
var y, w, m, S, D;
|
|
3790
|
+
return h(), C("div", rr, [
|
|
3791
|
+
N(gs),
|
|
3774
3792
|
f("div", ir, [
|
|
3775
3793
|
f("div", ur, [
|
|
3776
|
-
|
|
3794
|
+
N(pa, {
|
|
3777
3795
|
text: t.value,
|
|
3778
3796
|
isTTS: e.isTTS,
|
|
3779
|
-
onChange:
|
|
3780
|
-
onClear:
|
|
3781
|
-
onLoadTTS:
|
|
3797
|
+
onChange: g,
|
|
3798
|
+
onClear: T,
|
|
3799
|
+
onLoadTTS: E[0] || (E[0] = (v) => x("src")),
|
|
3782
3800
|
class: "flex-grow flex flex-col"
|
|
3783
3801
|
}, null, 8, ["text", "isTTS"])
|
|
3784
3802
|
]),
|
|
3785
3803
|
cr,
|
|
3786
3804
|
f("div", dr, [
|
|
3787
|
-
|
|
3805
|
+
N(ba, {
|
|
3788
3806
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3789
3807
|
isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
|
|
3790
3808
|
isAITranslate: e.isAITranslate,
|
|
3791
3809
|
isFavorite: e.isFavorite,
|
|
3792
3810
|
isTTS: e.isTTS,
|
|
3793
|
-
onCopy:
|
|
3794
|
-
var
|
|
3795
|
-
return
|
|
3811
|
+
onCopy: E[1] || (E[1] = (v) => {
|
|
3812
|
+
var p;
|
|
3813
|
+
return _.$emit("copy", (p = k(r)) == null ? void 0 : p.result);
|
|
3796
3814
|
}),
|
|
3797
|
-
onAiTranslate:
|
|
3798
|
-
onFavorite:
|
|
3799
|
-
onLoadTTS:
|
|
3815
|
+
onAiTranslate: A,
|
|
3816
|
+
onFavorite: E[2] || (E[2] = (v) => _.$emit("favorite")),
|
|
3817
|
+
onLoadTTS: E[3] || (E[3] = (v) => x("target")),
|
|
3800
3818
|
class: "flex-grow flex flex-col"
|
|
3801
3819
|
}, null, 8, ["isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isAITranslate", "isFavorite", "isTTS"])
|
|
3802
3820
|
])
|
|
3803
3821
|
]),
|
|
3804
|
-
e.translation ? (h(),
|
|
3805
|
-
((y =
|
|
3806
|
-
|
|
3822
|
+
e.translation ? (h(), C("div", fr, [
|
|
3823
|
+
((y = k(r).result) == null ? void 0 : y.length) > e.aiExplainMinLength ? (h(), C("div", vr, [
|
|
3824
|
+
N(nr, {
|
|
3807
3825
|
isAIExplain: e.isAIExplain,
|
|
3808
3826
|
explanation: e.explanation,
|
|
3809
|
-
onAiExplain:
|
|
3827
|
+
onAiExplain: V
|
|
3810
3828
|
}, null, 8, ["isAIExplain", "explanation"])
|
|
3811
3829
|
])) : R("", !0),
|
|
3812
|
-
(
|
|
3830
|
+
(w = k(r).dictionary) != null && w.length ? (h(), C("div", pr, [
|
|
3813
3831
|
f("div", hr, [
|
|
3814
|
-
|
|
3832
|
+
N(Sa, { onTranslate: b })
|
|
3815
3833
|
])
|
|
3816
3834
|
])) : R("", !0),
|
|
3817
|
-
(
|
|
3835
|
+
(m = k(r).definitions) != null && m.length ? (h(), C("div", mr, [
|
|
3818
3836
|
f("div", gr, [
|
|
3819
|
-
|
|
3837
|
+
N(ka)
|
|
3820
3838
|
])
|
|
3821
3839
|
])) : R("", !0),
|
|
3822
|
-
(
|
|
3840
|
+
(S = k(r).synonyms) != null && S.length ? (h(), C("div", br, [
|
|
3823
3841
|
f("div", Cr, [
|
|
3824
|
-
|
|
3842
|
+
N(ja, { onTranslate: b })
|
|
3825
3843
|
])
|
|
3826
3844
|
])) : R("", !0),
|
|
3827
|
-
(
|
|
3845
|
+
(D = k(r).examples) != null && D.length ? (h(), C("div", xr, [
|
|
3828
3846
|
f("div", yr, [
|
|
3829
|
-
|
|
3847
|
+
N(Da)
|
|
3830
3848
|
])
|
|
3831
3849
|
])) : R("", !0)
|
|
3832
|
-
])) : (h(),
|
|
3850
|
+
])) : (h(), C("span", wr, "Service unavailable"))
|
|
3833
3851
|
]);
|
|
3834
3852
|
};
|
|
3835
3853
|
}
|
|
3836
|
-
}, Tr = /* @__PURE__ */ he(_r, [["__scopeId", "data-v-
|
|
3854
|
+
}, Tr = /* @__PURE__ */ he(_r, [["__scopeId", "data-v-6989ae32"]]), Sr = ["disabled"], Er = /* @__PURE__ */ f("path", {
|
|
3837
3855
|
"stroke-linecap": "round",
|
|
3838
3856
|
"stroke-linejoin": "round",
|
|
3839
3857
|
"stroke-width": "2",
|
|
@@ -3847,13 +3865,13 @@ const Xt = {
|
|
|
3847
3865
|
},
|
|
3848
3866
|
emits: ["click"],
|
|
3849
3867
|
setup(e) {
|
|
3850
|
-
return (n, t) => (h(),
|
|
3868
|
+
return (n, t) => (h(), C("button", {
|
|
3851
3869
|
class: "bg-base-100 rounded-full hover:bg-base-200 focus:outline-none active:scale-95",
|
|
3852
3870
|
onClick: t[0] || (t[0] = (o) => n.$emit("click")),
|
|
3853
3871
|
disabled: e.disabled,
|
|
3854
3872
|
"aria-label": "Retry"
|
|
3855
3873
|
}, [
|
|
3856
|
-
(h(),
|
|
3874
|
+
(h(), C("svg", {
|
|
3857
3875
|
class: P(["h-5 w-5 text-primary", { "opacity-50": e.disabled }]),
|
|
3858
3876
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3859
3877
|
fill: "none",
|
|
@@ -3862,7 +3880,7 @@ const Xt = {
|
|
|
3862
3880
|
}, $r, 2))
|
|
3863
3881
|
], 8, Sr));
|
|
3864
3882
|
}
|
|
3865
|
-
},
|
|
3883
|
+
}, 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
3884
|
kr
|
|
3867
3885
|
], 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
3886
|
Ar
|
|
@@ -3874,7 +3892,7 @@ const Xt = {
|
|
|
3874
3892
|
},
|
|
3875
3893
|
emits: ["toggle"],
|
|
3876
3894
|
setup(e) {
|
|
3877
|
-
return (n, t) => (h(),
|
|
3895
|
+
return (n, t) => (h(), C("div", {
|
|
3878
3896
|
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
3897
|
"data-tip": e.isDiffMode ? "Hide Differences" : "Show Differences"
|
|
3880
3898
|
}, [
|
|
@@ -3886,23 +3904,58 @@ const Xt = {
|
|
|
3886
3904
|
disabled: e.disabled,
|
|
3887
3905
|
onClick: t[0] || (t[0] = (o) => n.$emit("toggle"))
|
|
3888
3906
|
}, [
|
|
3889
|
-
e.isDiffMode ? (h(),
|
|
3907
|
+
e.isDiffMode ? (h(), C("svg", {
|
|
3890
3908
|
key: 1,
|
|
3891
3909
|
class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
|
|
3892
3910
|
fill: "currentColor",
|
|
3893
3911
|
viewBox: "0 0 24 24",
|
|
3894
3912
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3895
|
-
}, Vr, 2)) : (h(),
|
|
3913
|
+
}, Vr, 2)) : (h(), C("svg", {
|
|
3896
3914
|
key: 0,
|
|
3897
3915
|
class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
|
|
3898
3916
|
fill: "currentColor",
|
|
3899
3917
|
viewBox: "0 0 24 24",
|
|
3900
3918
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3901
3919
|
}, Mr, 2))
|
|
3902
|
-
], 10,
|
|
3903
|
-
], 8,
|
|
3920
|
+
], 10, Ir)
|
|
3921
|
+
], 8, Lr));
|
|
3904
3922
|
}
|
|
3905
|
-
}, Rr = {
|
|
3923
|
+
}, Rr = {
|
|
3924
|
+
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",
|
|
3925
|
+
"data-tip": "Translate"
|
|
3926
|
+
}, Pr = ["disabled"], Br = /* @__PURE__ */ f("path", {
|
|
3927
|
+
d: "m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802",
|
|
3928
|
+
stroke: "currentColor",
|
|
3929
|
+
"stroke-width": "1.5",
|
|
3930
|
+
"stroke-linecap": "round",
|
|
3931
|
+
"stroke-linejoin": "round"
|
|
3932
|
+
}, null, -1), Nr = [
|
|
3933
|
+
Br
|
|
3934
|
+
], Fr = {
|
|
3935
|
+
__name: "TranslateBtn",
|
|
3936
|
+
props: {
|
|
3937
|
+
disabled: Boolean
|
|
3938
|
+
},
|
|
3939
|
+
setup(e) {
|
|
3940
|
+
return (n, t) => (h(), C("div", Rr, [
|
|
3941
|
+
f("button", {
|
|
3942
|
+
class: P(["btn btn-xs btn-circle", [
|
|
3943
|
+
{ "btn-ghost": !e.disabled },
|
|
3944
|
+
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
3945
|
+
]]),
|
|
3946
|
+
disabled: e.disabled,
|
|
3947
|
+
"aria-label": "Translate"
|
|
3948
|
+
}, [
|
|
3949
|
+
(h(), C("svg", {
|
|
3950
|
+
class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
|
|
3951
|
+
viewBox: "0 0 24 24",
|
|
3952
|
+
fill: "none",
|
|
3953
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3954
|
+
}, Nr, 2))
|
|
3955
|
+
], 10, Pr)
|
|
3956
|
+
]));
|
|
3957
|
+
}
|
|
3958
|
+
}, jr = { class: "flex flex-row px-2 pr-10 items-center bg-transparent relative" }, Hr = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, Fn = {
|
|
3906
3959
|
__name: "InputBtnGroup",
|
|
3907
3960
|
props: {
|
|
3908
3961
|
loading: {
|
|
@@ -3917,6 +3970,10 @@ const Xt = {
|
|
|
3917
3970
|
type: Boolean,
|
|
3918
3971
|
default: !1
|
|
3919
3972
|
},
|
|
3973
|
+
hasTranslateBtn: {
|
|
3974
|
+
type: Boolean,
|
|
3975
|
+
default: !1
|
|
3976
|
+
},
|
|
3920
3977
|
hasClearBtn: {
|
|
3921
3978
|
type: Boolean,
|
|
3922
3979
|
default: !1
|
|
@@ -3934,33 +3991,38 @@ const Xt = {
|
|
|
3934
3991
|
default: !1
|
|
3935
3992
|
}
|
|
3936
3993
|
},
|
|
3937
|
-
emits: ["copy", "clear", "toggleDiff", "info"],
|
|
3994
|
+
emits: ["copy", "clear", "toggleDiff", "info", "translate"],
|
|
3938
3995
|
setup(e) {
|
|
3939
|
-
return (n, t) => (h(),
|
|
3940
|
-
e.loading ? (h(),
|
|
3996
|
+
return (n, t) => (h(), C("div", jr, [
|
|
3997
|
+
e.loading ? (h(), Z(Mt, {
|
|
3941
3998
|
key: 0,
|
|
3942
3999
|
class: "absolute right-6 top-2"
|
|
3943
4000
|
})) : R("", !0),
|
|
3944
|
-
f("div",
|
|
3945
|
-
e.showDiffToggle ? (h(),
|
|
4001
|
+
f("div", Hr, [
|
|
4002
|
+
e.showDiffToggle ? (h(), Z(Dr, {
|
|
3946
4003
|
key: 0,
|
|
3947
4004
|
disabled: e.loading,
|
|
3948
4005
|
isDiffMode: e.isDiffMode,
|
|
3949
4006
|
onToggle: t[0] || (t[0] = (o) => n.$emit("toggleDiff"))
|
|
3950
4007
|
}, null, 8, ["disabled", "isDiffMode"])) : R("", !0),
|
|
3951
|
-
e.
|
|
4008
|
+
e.hasTranslateBtn && e.src.trim() ? (h(), Z(Fr, {
|
|
3952
4009
|
key: 1,
|
|
3953
|
-
|
|
3954
|
-
|
|
4010
|
+
disabled: e.loading,
|
|
4011
|
+
onClick: t[1] || (t[1] = (o) => n.$emit("translate"))
|
|
3955
4012
|
}, null, 8, ["disabled"])) : R("", !0),
|
|
3956
|
-
e.
|
|
4013
|
+
e.hasClearBtn && e.src ? (h(), Z(Pn, {
|
|
3957
4014
|
key: 2,
|
|
3958
|
-
onClick: t[2] || (t[2] = (o) => n.$emit("
|
|
4015
|
+
onClick: t[2] || (t[2] = (o) => n.$emit("clear")),
|
|
4016
|
+
disabled: e.loading
|
|
4017
|
+
}, null, 8, ["disabled"])) : R("", !0),
|
|
4018
|
+
e.hasCopyBtn && e.src ? (h(), Z(Bn, {
|
|
4019
|
+
key: 3,
|
|
4020
|
+
onClick: t[3] || (t[3] = (o) => n.$emit("copy"))
|
|
3959
4021
|
})) : R("", !0)
|
|
3960
4022
|
])
|
|
3961
4023
|
]));
|
|
3962
4024
|
}
|
|
3963
|
-
},
|
|
4025
|
+
}, zr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }, Zr = ["onKeydown", "placeholder"], Ur = {
|
|
3964
4026
|
__name: "Input",
|
|
3965
4027
|
props: {
|
|
3966
4028
|
text: {
|
|
@@ -3970,7 +4032,7 @@ const Xt = {
|
|
|
3970
4032
|
},
|
|
3971
4033
|
emits: ["change", "clear", "improve"],
|
|
3972
4034
|
setup(e, { emit: n }) {
|
|
3973
|
-
const t = e, o =
|
|
4035
|
+
const t = e, o = $(t.text), { textarea: l } = st({ input: o, styleProp: "minHeight" }), s = n;
|
|
3974
4036
|
function r() {
|
|
3975
4037
|
if (!o.value) {
|
|
3976
4038
|
a();
|
|
@@ -3990,14 +4052,14 @@ const Xt = {
|
|
|
3990
4052
|
return F(
|
|
3991
4053
|
() => t.text,
|
|
3992
4054
|
(c) => {
|
|
3993
|
-
o.value !== c && (o.value = c,
|
|
4055
|
+
o.value !== c && (o.value = c, Y(i));
|
|
3994
4056
|
}
|
|
3995
4057
|
), se(() => {
|
|
3996
|
-
o.value = t.text,
|
|
4058
|
+
o.value = t.text, Y(() => {
|
|
3997
4059
|
l.value.focus(), i();
|
|
3998
4060
|
});
|
|
3999
|
-
}), (c, d) => (h(),
|
|
4000
|
-
|
|
4061
|
+
}), (c, d) => (h(), C("div", zr, [
|
|
4062
|
+
N(Fn, {
|
|
4001
4063
|
src: e.text,
|
|
4002
4064
|
hasClearBtn: !0,
|
|
4003
4065
|
hasInfoBtn: !0,
|
|
@@ -4007,15 +4069,15 @@ const Xt = {
|
|
|
4007
4069
|
tt(f("textarea", {
|
|
4008
4070
|
ref_key: "textarea",
|
|
4009
4071
|
ref: l,
|
|
4010
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
4072
|
+
"onUpdate:modelValue": d[0] || (d[0] = (T) => o.value = T),
|
|
4011
4073
|
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
4074
|
autofocus: "",
|
|
4013
4075
|
rows: "2",
|
|
4014
4076
|
onInput: r,
|
|
4015
4077
|
onFocus: i,
|
|
4016
4078
|
onKeydown: Jn(ft(u, ["ctrl", "prevent"]), ["enter"]),
|
|
4017
|
-
placeholder: `Min ${
|
|
4018
|
-
}, null, 40,
|
|
4079
|
+
placeholder: `Min ${k(Le).IMPROVE_INPUT_MIN_LENGTH} characters. ${k(vt) ? "" : "Ctrl+Enter to improve"}`
|
|
4080
|
+
}, null, 40, Zr), [
|
|
4019
4081
|
[
|
|
4020
4082
|
nt,
|
|
4021
4083
|
o.value,
|
|
@@ -4025,7 +4087,7 @@ const Xt = {
|
|
|
4025
4087
|
])
|
|
4026
4088
|
]));
|
|
4027
4089
|
}
|
|
4028
|
-
},
|
|
4090
|
+
}, Wr = /* @__PURE__ */ he(Ur, [["__scopeId", "data-v-66614870"]]);
|
|
4029
4091
|
function re() {
|
|
4030
4092
|
}
|
|
4031
4093
|
re.prototype = {
|
|
@@ -4033,54 +4095,54 @@ re.prototype = {
|
|
|
4033
4095
|
var o, l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = l.callback;
|
|
4034
4096
|
typeof l == "function" && (s = l, l = {});
|
|
4035
4097
|
var r = this;
|
|
4036
|
-
function a(
|
|
4037
|
-
return
|
|
4038
|
-
s(
|
|
4039
|
-
}, 0), !0) :
|
|
4098
|
+
function a(E) {
|
|
4099
|
+
return E = r.postProcess(E, l), s ? (setTimeout(function() {
|
|
4100
|
+
s(E);
|
|
4101
|
+
}, 0), !0) : E;
|
|
4040
4102
|
}
|
|
4041
4103
|
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
4104
|
var i = t.length, u = n.length, c = 1, d = i + u;
|
|
4043
4105
|
l.maxEditLength != null && (d = Math.min(d, l.maxEditLength));
|
|
4044
|
-
var
|
|
4106
|
+
var T = (o = l.timeout) !== null && o !== void 0 ? o : 1 / 0, g = Date.now() + T, x = [{
|
|
4045
4107
|
oldPos: -1,
|
|
4046
4108
|
lastComponent: void 0
|
|
4047
|
-
}], b = this.extractCommon(
|
|
4048
|
-
if (
|
|
4049
|
-
return a(Kt(r,
|
|
4050
|
-
var
|
|
4051
|
-
function
|
|
4052
|
-
for (var
|
|
4053
|
-
var
|
|
4054
|
-
|
|
4055
|
-
var
|
|
4056
|
-
if (
|
|
4057
|
-
var D =
|
|
4058
|
-
|
|
4109
|
+
}], b = this.extractCommon(x[0], t, n, 0, l);
|
|
4110
|
+
if (x[0].oldPos + 1 >= u && b + 1 >= i)
|
|
4111
|
+
return a(Kt(r, x[0].lastComponent, t, n, r.useLongestToken));
|
|
4112
|
+
var A = -1 / 0, V = 1 / 0;
|
|
4113
|
+
function I() {
|
|
4114
|
+
for (var E = Math.max(A, -c); E <= Math.min(V, c); E += 2) {
|
|
4115
|
+
var y = void 0, w = x[E - 1], m = x[E + 1];
|
|
4116
|
+
w && (x[E - 1] = void 0);
|
|
4117
|
+
var S = !1;
|
|
4118
|
+
if (m) {
|
|
4119
|
+
var D = m.oldPos - E;
|
|
4120
|
+
S = m && 0 <= D && D < i;
|
|
4059
4121
|
}
|
|
4060
|
-
var v =
|
|
4061
|
-
if (!
|
|
4062
|
-
|
|
4122
|
+
var v = w && w.oldPos + 1 < u;
|
|
4123
|
+
if (!S && !v) {
|
|
4124
|
+
x[E] = void 0;
|
|
4063
4125
|
continue;
|
|
4064
4126
|
}
|
|
4065
|
-
if (!v ||
|
|
4066
|
-
return a(Kt(r,
|
|
4067
|
-
|
|
4127
|
+
if (!v || S && w.oldPos < m.oldPos ? y = r.addToPath(m, !0, !1, 0, l) : y = r.addToPath(w, !1, !0, 1, l), b = r.extractCommon(y, t, n, E, l), y.oldPos + 1 >= u && b + 1 >= i)
|
|
4128
|
+
return a(Kt(r, y.lastComponent, t, n, r.useLongestToken));
|
|
4129
|
+
x[E] = y, y.oldPos + 1 >= u && (V = Math.min(V, E - 1)), b + 1 >= i && (A = Math.max(A, E + 1));
|
|
4068
4130
|
}
|
|
4069
4131
|
c++;
|
|
4070
4132
|
}
|
|
4071
4133
|
if (s)
|
|
4072
|
-
(function
|
|
4134
|
+
(function E() {
|
|
4073
4135
|
setTimeout(function() {
|
|
4074
|
-
if (c > d || Date.now() >
|
|
4136
|
+
if (c > d || Date.now() > g)
|
|
4075
4137
|
return s();
|
|
4076
|
-
|
|
4138
|
+
I() || E();
|
|
4077
4139
|
}, 0);
|
|
4078
4140
|
})();
|
|
4079
4141
|
else
|
|
4080
|
-
for (; c <= d && Date.now() <=
|
|
4081
|
-
var
|
|
4082
|
-
if (
|
|
4083
|
-
return
|
|
4142
|
+
for (; c <= d && Date.now() <= g; ) {
|
|
4143
|
+
var _ = I();
|
|
4144
|
+
if (_)
|
|
4145
|
+
return _;
|
|
4084
4146
|
}
|
|
4085
4147
|
},
|
|
4086
4148
|
addToPath: function(n, t, o, l, s) {
|
|
@@ -4149,11 +4211,11 @@ function Kt(e, n, t, o, l) {
|
|
|
4149
4211
|
d.value = e.join(o.slice(c, c + d.count)), c += d.count;
|
|
4150
4212
|
else {
|
|
4151
4213
|
if (!d.added && l) {
|
|
4152
|
-
var
|
|
4153
|
-
|
|
4154
|
-
var b = o[c +
|
|
4155
|
-
return b.length >
|
|
4156
|
-
}), d.value = e.join(
|
|
4214
|
+
var T = t.slice(u, u + d.count);
|
|
4215
|
+
T = T.map(function(g, x) {
|
|
4216
|
+
var b = o[c + x];
|
|
4217
|
+
return b.length > g.length ? b : g;
|
|
4218
|
+
}), d.value = e.join(T);
|
|
4157
4219
|
} else
|
|
4158
4220
|
d.value = e.join(t.slice(u, u + d.count));
|
|
4159
4221
|
u += d.count, d.added || (c += d.count);
|
|
@@ -4196,9 +4258,9 @@ function qe(e, n) {
|
|
|
4196
4258
|
return xt(e, n, "");
|
|
4197
4259
|
}
|
|
4198
4260
|
function nn(e, n) {
|
|
4199
|
-
return n.slice(0,
|
|
4261
|
+
return n.slice(0, qr(e, n));
|
|
4200
4262
|
}
|
|
4201
|
-
function
|
|
4263
|
+
function qr(e, n) {
|
|
4202
4264
|
var t = 0;
|
|
4203
4265
|
e.length > n.length && (t = e.length - n.length);
|
|
4204
4266
|
var o = n.length;
|
|
@@ -4218,7 +4280,7 @@ function Hr(e, n) {
|
|
|
4218
4280
|
}
|
|
4219
4281
|
return s;
|
|
4220
4282
|
}
|
|
4221
|
-
var et = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",
|
|
4283
|
+
var et = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", Gr = new RegExp("[".concat(et, "]+|\\s+|[^").concat(et, "]"), "ug"), rt = new re();
|
|
4222
4284
|
rt.equals = function(e, n, t) {
|
|
4223
4285
|
return t.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e.trim() === n.trim();
|
|
4224
4286
|
};
|
|
@@ -4231,7 +4293,7 @@ rt.tokenize = function(e) {
|
|
|
4231
4293
|
return s.segment;
|
|
4232
4294
|
});
|
|
4233
4295
|
} else
|
|
4234
|
-
t = e.match(
|
|
4296
|
+
t = e.match(Gr) || [];
|
|
4235
4297
|
var o = [], l = null;
|
|
4236
4298
|
return t.forEach(function(s) {
|
|
4237
4299
|
/\s/.test(s) ? l == null ? o.push(s) : o.push(o.pop() + s) : /\s/.test(l) ? o[o.length - 1] == l ? o.push(o.pop() + s) : o.push(l + s) : o.push(s), l = s;
|
|
@@ -4264,16 +4326,16 @@ function on(e, n, t, o) {
|
|
|
4264
4326
|
} else if (t)
|
|
4265
4327
|
e && (t.value = t.value.replace(/^\s*/, "")), o && (o.value = o.value.replace(/^\s*/, ""));
|
|
4266
4328
|
else if (e && o) {
|
|
4267
|
-
var c = o.value.match(/^\s*/)[0], d = n.value.match(/^\s*/)[0],
|
|
4268
|
-
n.value = ke(n.value,
|
|
4269
|
-
var
|
|
4270
|
-
n.value = qe(n.value,
|
|
4329
|
+
var c = o.value.match(/^\s*/)[0], d = n.value.match(/^\s*/)[0], T = n.value.match(/\s*$/)[0], g = en(c, d);
|
|
4330
|
+
n.value = ke(n.value, g);
|
|
4331
|
+
var x = tn(ke(c, g), T);
|
|
4332
|
+
n.value = qe(n.value, x), o.value = Ct(o.value, c, x), e.value = xt(e.value, c, c.slice(0, c.length - x.length));
|
|
4271
4333
|
} else if (o) {
|
|
4272
|
-
var b = o.value.match(/^\s*/)[0],
|
|
4273
|
-
n.value = qe(n.value,
|
|
4334
|
+
var b = o.value.match(/^\s*/)[0], A = n.value.match(/\s*$/)[0], V = nn(A, b);
|
|
4335
|
+
n.value = qe(n.value, V);
|
|
4274
4336
|
} else if (e) {
|
|
4275
|
-
var
|
|
4276
|
-
n.value = ke(n.value,
|
|
4337
|
+
var I = e.value.match(/\s*$/)[0], _ = n.value.match(/^\s*/)[0], E = nn(I, _);
|
|
4338
|
+
n.value = ke(n.value, E);
|
|
4277
4339
|
}
|
|
4278
4340
|
}
|
|
4279
4341
|
var jn = new re();
|
|
@@ -4281,7 +4343,7 @@ jn.tokenize = function(e) {
|
|
|
4281
4343
|
var n = new RegExp("(\\r?\\n)|[".concat(et, "]+|[^\\S\\n\\r]+|[^").concat(et, "]"), "ug");
|
|
4282
4344
|
return e.match(n) || [];
|
|
4283
4345
|
};
|
|
4284
|
-
function
|
|
4346
|
+
function Jr(e, n, t) {
|
|
4285
4347
|
return jn.diff(e, n, t);
|
|
4286
4348
|
}
|
|
4287
4349
|
var At = new re();
|
|
@@ -4303,12 +4365,12 @@ At.equals = function(e, n, t) {
|
|
|
4303
4365
|
`) && (e = e.slice(0, -1)), n.endsWith(`
|
|
4304
4366
|
`) && (n = n.slice(0, -1))), re.prototype.equals.call(this, e, n, t);
|
|
4305
4367
|
};
|
|
4306
|
-
var
|
|
4307
|
-
|
|
4368
|
+
var Yr = new re();
|
|
4369
|
+
Yr.tokenize = function(e) {
|
|
4308
4370
|
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
4309
4371
|
};
|
|
4310
|
-
var
|
|
4311
|
-
|
|
4372
|
+
var Qr = new re();
|
|
4373
|
+
Qr.tokenize = function(e) {
|
|
4312
4374
|
return e.split(/([{}:;,]|\s+)/);
|
|
4313
4375
|
};
|
|
4314
4376
|
function yt(e) {
|
|
@@ -4319,17 +4381,17 @@ function yt(e) {
|
|
|
4319
4381
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
4320
4382
|
}, yt(e);
|
|
4321
4383
|
}
|
|
4322
|
-
var
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4384
|
+
var Be = new re();
|
|
4385
|
+
Be.useLongestToken = !0;
|
|
4386
|
+
Be.tokenize = At.tokenize;
|
|
4387
|
+
Be.castInput = function(e, n) {
|
|
4326
4388
|
var t = n.undefinedReplacement, o = n.stringifyReplacer, l = o === void 0 ? function(s, r) {
|
|
4327
4389
|
return typeof r > "u" ? t : r;
|
|
4328
4390
|
} : o;
|
|
4329
4391
|
return typeof e == "string" ? e : JSON.stringify(wt(e, null, null, l), l, " ");
|
|
4330
4392
|
};
|
|
4331
|
-
|
|
4332
|
-
return re.prototype.equals.call(
|
|
4393
|
+
Be.equals = function(e, n, t) {
|
|
4394
|
+
return re.prototype.equals.call(Be, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"), t);
|
|
4333
4395
|
};
|
|
4334
4396
|
function wt(e, n, t, o, l) {
|
|
4335
4397
|
n = n || [], t = t || [], o && (e = o(l, e));
|
|
@@ -4362,7 +4424,7 @@ _t.tokenize = function(e) {
|
|
|
4362
4424
|
_t.join = _t.removeEmpty = function(e) {
|
|
4363
4425
|
return e;
|
|
4364
4426
|
};
|
|
4365
|
-
const
|
|
4427
|
+
const Xr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }, Kr = { class: "flex justify-end items-center mb-1" }, ei = { class: "bg-transparent" }, ti = ["innerHTML"], ni = {
|
|
4366
4428
|
__name: "Result",
|
|
4367
4429
|
props: {
|
|
4368
4430
|
text: {
|
|
@@ -4378,74 +4440,81 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4378
4440
|
default: "improve"
|
|
4379
4441
|
}
|
|
4380
4442
|
},
|
|
4381
|
-
emits: ["copy", "change", "clear"],
|
|
4443
|
+
emits: ["copy", "change", "clear", "translate"],
|
|
4382
4444
|
setup(e, { emit: n }) {
|
|
4383
|
-
const t = e, o = xe(), l =
|
|
4445
|
+
const t = e, o = xe(), l = O(() => o.isLoading("writing")), s = O(() => l.value ? "" : t.text), r = $(""), a = $(Le.DEFAULT_DIFF_MODE), { textarea: i } = st({ input: s, styleProp: "minHeight" }), u = n;
|
|
4384
4446
|
function c() {
|
|
4385
4447
|
!l.value && s.value && u("copy", s.value);
|
|
4386
4448
|
}
|
|
4387
|
-
function d(
|
|
4388
|
-
|
|
4449
|
+
function d() {
|
|
4450
|
+
var b;
|
|
4451
|
+
const x = (b = s.value) == null ? void 0 : b.trim();
|
|
4452
|
+
!l.value && x && u("translate", x);
|
|
4453
|
+
}
|
|
4454
|
+
function T(x, b) {
|
|
4455
|
+
return Jr(x, b).map((V) => V.added ? `<span class="bg-addedBg inline leading-snug animate-addedText">${V.value}</span>` : V.removed ? `<span class="bg-removedBg inline leading-snug animate-removedText">${V.value}</span>` : V.value).join("");
|
|
4389
4456
|
}
|
|
4390
|
-
function
|
|
4391
|
-
a.value = !a.value,
|
|
4457
|
+
function g() {
|
|
4458
|
+
a.value = !a.value, Le.DEFAULT_DIFF_MODE = a.value;
|
|
4392
4459
|
}
|
|
4393
4460
|
return F(
|
|
4394
4461
|
() => t.text,
|
|
4395
|
-
(
|
|
4396
|
-
t.type === "check" && (r.value =
|
|
4462
|
+
(x) => {
|
|
4463
|
+
t.type === "check" && (r.value = T(t.originalText, x));
|
|
4397
4464
|
},
|
|
4398
4465
|
{ immediate: !0 }
|
|
4399
|
-
), F(s, (
|
|
4400
|
-
u("change",
|
|
4401
|
-
}), (
|
|
4402
|
-
f("div",
|
|
4403
|
-
|
|
4466
|
+
), F(s, (x) => {
|
|
4467
|
+
u("change", x);
|
|
4468
|
+
}), (x, b) => (h(), C("div", Xr, [
|
|
4469
|
+
f("div", Kr, [
|
|
4470
|
+
N(Fn, {
|
|
4404
4471
|
loading: l.value,
|
|
4405
4472
|
src: s.value,
|
|
4406
4473
|
hasCopyBtn: !l.value && !!s.value,
|
|
4474
|
+
hasTranslateBtn: !l.value && !!s.value,
|
|
4407
4475
|
showDiffToggle: e.type === "check",
|
|
4408
4476
|
isDiffMode: a.value,
|
|
4409
4477
|
onCopy: c,
|
|
4410
|
-
|
|
4411
|
-
|
|
4478
|
+
onTranslate: d,
|
|
4479
|
+
onToggleDiff: g
|
|
4480
|
+
}, null, 8, ["loading", "src", "hasCopyBtn", "hasTranslateBtn", "showDiffToggle", "isDiffMode"])
|
|
4412
4481
|
]),
|
|
4413
|
-
f("div",
|
|
4414
|
-
e.type !== "check" || !a.value ? tt((h(),
|
|
4482
|
+
f("div", ei, [
|
|
4483
|
+
e.type !== "check" || !a.value ? tt((h(), C("textarea", {
|
|
4415
4484
|
key: 0,
|
|
4416
4485
|
ref_key: "textarea",
|
|
4417
4486
|
ref: i,
|
|
4418
|
-
"onUpdate:modelValue":
|
|
4487
|
+
"onUpdate:modelValue": b[0] || (b[0] = (A) => s.value = A),
|
|
4419
4488
|
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
4489
|
readonly: "",
|
|
4421
4490
|
spellcheck: "false"
|
|
4422
4491
|
}, null, 512)), [
|
|
4423
4492
|
[nt, s.value]
|
|
4424
|
-
]) : (h(),
|
|
4493
|
+
]) : (h(), C("pre", {
|
|
4425
4494
|
key: 1,
|
|
4426
4495
|
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
4496
|
innerHTML: l.value ? "" : r.value
|
|
4428
|
-
}, null, 8,
|
|
4497
|
+
}, null, 8, ti))
|
|
4429
4498
|
])
|
|
4430
4499
|
]));
|
|
4431
4500
|
}
|
|
4432
|
-
},
|
|
4433
|
-
src:
|
|
4501
|
+
}, oi = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", li = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='currentColor'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='currentColor'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='currentColor'/%3e%3c/svg%3e", si = "data:image/svg+xml,%3csvg%20class='w-5%20h-5'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='currentColor'%20aria-hidden='true'%20%3e%3cpath%20fill-rule='evenodd'%20d='M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%200%20111.414%201.414l-4%204a1%201%200%2001-1.414%200l-4-4a1%201%200%20010-1.414z'%20clip-rule='evenodd'%20/%3e%3c/svg%3e", ai = "data:image/svg+xml,%3csvg%20class='w-5%20h-5'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='currentColor'%20aria-hidden='true'%20%3e%3cpath%20fill-rule='evenodd'%20d='M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%200%20111.414%201.414l-4%204a1%201%200%2001-1.414%200l-4-4a1%201%200%20010-1.414z'%20clip-rule='evenodd'%20/%3e%3c/svg%3e", Vt = (e) => (Et("data-v-345bc0b4"), e = e(), $t(), e), ri = { class: "flex rounded-md w-full" }, ii = ["disabled"], ui = { class: "flex items-center text-xs" }, ci = ["src"], di = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("div", { class: "w-px bg-base-300" }, null, -1)), fi = { class: "relative block" }, vi = ["aria-expanded", "disabled"], pi = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("span", { class: "sr-only" }, "Open options", -1)), hi = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("img", {
|
|
4502
|
+
src: ai,
|
|
4434
4503
|
alt: "Chevron down",
|
|
4435
4504
|
class: "w-4 h-4 fill-current"
|
|
4436
|
-
}, null, -1)),
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
],
|
|
4505
|
+
}, null, -1)), mi = [
|
|
4506
|
+
pi,
|
|
4507
|
+
hi
|
|
4508
|
+
], gi = {
|
|
4440
4509
|
key: 0,
|
|
4441
4510
|
class: "origin-top-right absolute left-0 mt-1 w-full rounded-md shadow-lg bg-base-100 ring-1 ring-base-300 focus:outline-none z-50",
|
|
4442
4511
|
role: "menu",
|
|
4443
4512
|
"aria-orientation": "vertical",
|
|
4444
4513
|
"aria-labelledby": "options-menu"
|
|
4445
|
-
},
|
|
4514
|
+
}, bi = {
|
|
4446
4515
|
class: "py-1",
|
|
4447
4516
|
role: "none"
|
|
4448
|
-
},
|
|
4517
|
+
}, Ci = ["onClick"], xi = { class: "flex items-center" }, yi = ["src"], wi = {
|
|
4449
4518
|
__name: "ButtonSelect",
|
|
4450
4519
|
props: {
|
|
4451
4520
|
modelValue: {
|
|
@@ -4471,37 +4540,37 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4471
4540
|
},
|
|
4472
4541
|
emits: ["update:modelValue", "action"],
|
|
4473
4542
|
setup(e, { emit: n }) {
|
|
4474
|
-
const t = e, o = n, l =
|
|
4543
|
+
const t = e, o = n, l = $(!1), s = $(t.modelValue), r = $(null), a = O(() => t.options.find((g) => g.value === s.value) || t.options[0]);
|
|
4475
4544
|
function i() {
|
|
4476
4545
|
o("action");
|
|
4477
4546
|
}
|
|
4478
4547
|
function u() {
|
|
4479
4548
|
t.loading || (l.value = !l.value);
|
|
4480
4549
|
}
|
|
4481
|
-
function c(
|
|
4482
|
-
|
|
4550
|
+
function c(g) {
|
|
4551
|
+
g.value !== s.value && (s.value = g.value, o("update:modelValue", g.value)), l.value = !1;
|
|
4483
4552
|
}
|
|
4484
|
-
function d(
|
|
4485
|
-
return new URL((/* @__PURE__ */ Object.assign({ "../../assets/icons/ai-explain.svg":
|
|
4553
|
+
function d(g) {
|
|
4554
|
+
return new URL((/* @__PURE__ */ Object.assign({ "../../assets/icons/ai-explain.svg": oi, "../../assets/icons/ai-translate.svg": li, "../../assets/icons/chevron-down.svg": si }))[`../../assets/icons/${g}.svg`], import.meta.url).href;
|
|
4486
4555
|
}
|
|
4487
|
-
function
|
|
4488
|
-
r.value && !r.value.contains(
|
|
4556
|
+
function T(g) {
|
|
4557
|
+
r.value && !r.value.contains(g.target) && (l.value = !1);
|
|
4489
4558
|
}
|
|
4490
4559
|
return F(
|
|
4491
4560
|
() => t.modelValue,
|
|
4492
|
-
(
|
|
4493
|
-
|
|
4561
|
+
(g) => {
|
|
4562
|
+
g !== s.value && (s.value = g);
|
|
4494
4563
|
}
|
|
4495
4564
|
), F(
|
|
4496
4565
|
() => t.isTextEmpty,
|
|
4497
|
-
(
|
|
4498
|
-
|
|
4566
|
+
(g) => {
|
|
4567
|
+
g && (l.value = !1);
|
|
4499
4568
|
}
|
|
4500
4569
|
), se(() => {
|
|
4501
|
-
document.addEventListener("click",
|
|
4570
|
+
document.addEventListener("click", T);
|
|
4502
4571
|
}), Fe(() => {
|
|
4503
|
-
document.removeEventListener("click",
|
|
4504
|
-
}), (
|
|
4572
|
+
document.removeEventListener("click", T);
|
|
4573
|
+
}), (g, x) => (h(), C("div", {
|
|
4505
4574
|
class: "relative inline-block text-left flex-1",
|
|
4506
4575
|
ref_key: "dropdownRef",
|
|
4507
4576
|
ref: r
|
|
@@ -4512,7 +4581,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4512
4581
|
e.isTextEmpty || t.loading ? "border-base-300" : "border-primary"
|
|
4513
4582
|
])
|
|
4514
4583
|
}, [
|
|
4515
|
-
f("div",
|
|
4584
|
+
f("div", ri, [
|
|
4516
4585
|
f("button", {
|
|
4517
4586
|
onClick: i,
|
|
4518
4587
|
class: P(["px-2 py-1 text-sm font-medium rounded-s focus:z-10 focus:outline-none flex-grow text-left relative", [
|
|
@@ -4520,17 +4589,17 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4520
4589
|
]]),
|
|
4521
4590
|
disabled: e.isTextEmpty || t.loading
|
|
4522
4591
|
}, [
|
|
4523
|
-
f("div",
|
|
4592
|
+
f("div", ui, [
|
|
4524
4593
|
f("img", {
|
|
4525
4594
|
src: d(a.value.icon),
|
|
4526
4595
|
alt: "",
|
|
4527
4596
|
class: "w-4 h-4 mr-2"
|
|
4528
|
-
}, null, 8,
|
|
4597
|
+
}, null, 8, ci),
|
|
4529
4598
|
Ee(" " + G(a.value.label), 1)
|
|
4530
4599
|
])
|
|
4531
|
-
], 10,
|
|
4532
|
-
|
|
4533
|
-
f("div",
|
|
4600
|
+
], 10, ii),
|
|
4601
|
+
di,
|
|
4602
|
+
f("div", fi, [
|
|
4534
4603
|
f("button", {
|
|
4535
4604
|
onClick: u,
|
|
4536
4605
|
type: "button",
|
|
@@ -4540,36 +4609,36 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4540
4609
|
"aria-haspopup": "true",
|
|
4541
4610
|
"aria-expanded": l.value,
|
|
4542
4611
|
disabled: e.isTextEmpty || t.loading
|
|
4543
|
-
},
|
|
4612
|
+
}, mi, 10, vi)
|
|
4544
4613
|
])
|
|
4545
4614
|
])
|
|
4546
4615
|
], 2),
|
|
4547
|
-
l.value ? (h(),
|
|
4548
|
-
f("div",
|
|
4549
|
-
(h(!0),
|
|
4616
|
+
l.value ? (h(), C("div", gi, [
|
|
4617
|
+
f("div", bi, [
|
|
4618
|
+
(h(!0), C(z, null, Q(e.options, (b) => (h(), C("a", {
|
|
4550
4619
|
key: b.value,
|
|
4551
|
-
onClick: (
|
|
4620
|
+
onClick: (A) => c(b),
|
|
4552
4621
|
href: "#",
|
|
4553
4622
|
class: "block px-1 py-1 text-sm text-base-content hover:bg-base-200 hover:text-primary",
|
|
4554
4623
|
role: "menuitem"
|
|
4555
4624
|
}, [
|
|
4556
|
-
f("div",
|
|
4625
|
+
f("div", xi, [
|
|
4557
4626
|
f("img", {
|
|
4558
4627
|
src: d(b.icon),
|
|
4559
4628
|
alt: "",
|
|
4560
4629
|
class: "w-4 h-4 mr-2"
|
|
4561
|
-
}, null, 8,
|
|
4630
|
+
}, null, 8, yi),
|
|
4562
4631
|
Ee(" " + G(b.label), 1)
|
|
4563
4632
|
])
|
|
4564
|
-
], 8,
|
|
4633
|
+
], 8, Ci))), 128))
|
|
4565
4634
|
])
|
|
4566
4635
|
])) : R("", !0)
|
|
4567
4636
|
], 512));
|
|
4568
4637
|
}
|
|
4569
|
-
},
|
|
4638
|
+
}, _i = /* @__PURE__ */ he(wi, [["__scopeId", "data-v-345bc0b4"]]), Ti = { class: "w-full mt-1" }, Si = { class: "flex flex-col lg:flex-row lg:items-stretch lg:space-x-4 lg:min-h-[50vh]" }, Ei = { class: "lg:flex-grow lg:w-0 flex flex-col" }, $i = { class: "flex flex-row lg:flex-col items-center justify-center place-content-center min-h-full" }, Oi = {
|
|
4570
4639
|
class: "flex items-center",
|
|
4571
4640
|
style: { "max-width": "300px" }
|
|
4572
|
-
},
|
|
4641
|
+
}, Li = { class: "lg:flex-grow lg:w-0 flex flex-col" }, Ii = {
|
|
4573
4642
|
__name: "WriteTab",
|
|
4574
4643
|
props: {
|
|
4575
4644
|
opt: {
|
|
@@ -4585,7 +4654,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4585
4654
|
default: null
|
|
4586
4655
|
}
|
|
4587
4656
|
},
|
|
4588
|
-
emits: ["opt", "write", "copy"],
|
|
4657
|
+
emits: ["opt", "write", "copy", "translate"],
|
|
4589
4658
|
setup(e, { emit: n }) {
|
|
4590
4659
|
const t = le("writingStore"), o = le("loaderStore"), l = e, s = n, r = [
|
|
4591
4660
|
{ value: "check", label: "Check", icon: "ai-translate" },
|
|
@@ -4621,66 +4690,67 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4621
4690
|
t.init({ ...t.$state, result: "", suggestions: [] });
|
|
4622
4691
|
}
|
|
4623
4692
|
function d(b = null) {
|
|
4624
|
-
t.text.length <
|
|
4693
|
+
t.text.length < Le.IMPROVE_INPUT_MIN_LENGTH || (o.setLoading("writing", !0), g(t.text, l.opt.type, b));
|
|
4625
4694
|
}
|
|
4626
|
-
function
|
|
4695
|
+
function T() {
|
|
4627
4696
|
d("retry");
|
|
4628
4697
|
}
|
|
4629
|
-
function
|
|
4698
|
+
function g(b, A = l.opt.type, V) {
|
|
4630
4699
|
b && (o.setLoading("writing", !0), s("write", {
|
|
4631
4700
|
src: l.opt.src,
|
|
4632
4701
|
text: b,
|
|
4633
|
-
action:
|
|
4634
|
-
flag:
|
|
4702
|
+
action: A,
|
|
4703
|
+
flag: V
|
|
4635
4704
|
}));
|
|
4636
4705
|
}
|
|
4637
|
-
function
|
|
4706
|
+
function x(b) {
|
|
4638
4707
|
o.setLoading("writing", !0), s("opt", { ...l.opt, type: b, text: t.text });
|
|
4639
4708
|
}
|
|
4640
|
-
return (b,
|
|
4641
|
-
var
|
|
4642
|
-
return h(),
|
|
4643
|
-
f("div",
|
|
4644
|
-
f("div",
|
|
4645
|
-
|
|
4709
|
+
return (b, A) => {
|
|
4710
|
+
var V, I;
|
|
4711
|
+
return h(), C("div", Ti, [
|
|
4712
|
+
f("div", Si, [
|
|
4713
|
+
f("div", Ei, [
|
|
4714
|
+
N(Wr, {
|
|
4646
4715
|
class: "my-2 lg:my-0 w-full flex-grow lg:min-h-[50vh]",
|
|
4647
|
-
text:
|
|
4716
|
+
text: k(t).text,
|
|
4648
4717
|
onChange: a,
|
|
4649
4718
|
onClear: i,
|
|
4650
4719
|
onImprove: d
|
|
4651
4720
|
}, null, 8, ["text"])
|
|
4652
4721
|
]),
|
|
4653
|
-
f("div",
|
|
4654
|
-
f("div",
|
|
4655
|
-
|
|
4722
|
+
f("div", $i, [
|
|
4723
|
+
f("div", Oi, [
|
|
4724
|
+
N(_i, {
|
|
4656
4725
|
class: "w-full",
|
|
4657
4726
|
modelValue: l.opt.type,
|
|
4658
4727
|
options: r,
|
|
4659
|
-
loading:
|
|
4660
|
-
isTextEmpty:
|
|
4661
|
-
hasResult: !!
|
|
4662
|
-
"onUpdate:modelValue":
|
|
4728
|
+
loading: k(o).isLoading("writing"),
|
|
4729
|
+
isTextEmpty: k(t).text && ((V = k(t).text) == null ? void 0 : V.length) < k(Le).IMPROVE_INPUT_MIN_LENGTH,
|
|
4730
|
+
hasResult: !!k(t).result,
|
|
4731
|
+
"onUpdate:modelValue": x,
|
|
4663
4732
|
onAction: d
|
|
4664
4733
|
}, null, 8, ["modelValue", "loading", "isTextEmpty", "hasResult"])
|
|
4665
4734
|
]),
|
|
4666
|
-
|
|
4735
|
+
N(Or, {
|
|
4667
4736
|
class: "ml-2 lg:m-2",
|
|
4668
|
-
disabled: ((
|
|
4669
|
-
onClick:
|
|
4737
|
+
disabled: ((I = k(t).text) == null ? void 0 : I.length) < 5 || !k(t).result,
|
|
4738
|
+
onClick: T
|
|
4670
4739
|
}, null, 8, ["disabled"])
|
|
4671
4740
|
]),
|
|
4672
|
-
f("div",
|
|
4673
|
-
|
|
4741
|
+
f("div", Li, [
|
|
4742
|
+
N(ni, {
|
|
4674
4743
|
class: "my-2 lg:my-0 w-full flex-grow lg:min-h-[50vh]",
|
|
4675
|
-
text:
|
|
4676
|
-
originalText:
|
|
4744
|
+
text: k(t).result,
|
|
4745
|
+
originalText: k(t).text,
|
|
4677
4746
|
type: l.opt.type,
|
|
4678
4747
|
onChange: u,
|
|
4679
4748
|
onClear: c,
|
|
4680
|
-
onCopy:
|
|
4681
|
-
var
|
|
4682
|
-
return s("copy", (
|
|
4683
|
-
})
|
|
4749
|
+
onCopy: A[0] || (A[0] = (_) => {
|
|
4750
|
+
var E;
|
|
4751
|
+
return s("copy", (E = k(t)) == null ? void 0 : E.result);
|
|
4752
|
+
}),
|
|
4753
|
+
onTranslate: A[1] || (A[1] = (_) => s("translate", _))
|
|
4684
4754
|
}, null, 8, ["text", "originalText", "type"])
|
|
4685
4755
|
])
|
|
4686
4756
|
])
|
|
@@ -4688,7 +4758,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4688
4758
|
};
|
|
4689
4759
|
}
|
|
4690
4760
|
}, ln = He("writing", () => {
|
|
4691
|
-
const e =
|
|
4761
|
+
const e = $(null), n = $(""), t = $(""), o = $([]), l = $(null), s = Oe(), r = O(() => s.getLabel(e.value));
|
|
4692
4762
|
function a(u) {
|
|
4693
4763
|
e.value = u.src, n.value = u.text, t.value = u.result, o.value = u.suggestions, l.value = u.action;
|
|
4694
4764
|
}
|
|
@@ -4705,17 +4775,17 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4705
4775
|
init: a,
|
|
4706
4776
|
reset: i
|
|
4707
4777
|
};
|
|
4708
|
-
}), Hn = (e) => (Et("data-v-
|
|
4778
|
+
}), Hn = (e) => (Et("data-v-848b8f0b"), e = e(), $t(), e), ki = ["data-theme"], Mi = { class: "flex-none py-2 pl-3 pr-2 shadow border border-base-300" }, Ai = { class: "flex-none" }, Vi = { class: "flex w-full border-b border-base-300 items-center" }, Di = {
|
|
4709
4779
|
key: 0,
|
|
4710
4780
|
class: "text-xs text-base-content/40 ml-1 italic"
|
|
4711
|
-
},
|
|
4712
|
-
|
|
4713
|
-
],
|
|
4781
|
+
}, Ri = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Pi = [
|
|
4782
|
+
Ri
|
|
4783
|
+
], Bi = {
|
|
4714
4784
|
key: 0,
|
|
4715
4785
|
class: "text-xs text-base-content/40 ml-1 italic"
|
|
4716
|
-
},
|
|
4717
|
-
|
|
4718
|
-
],
|
|
4786
|
+
}, Ni = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Fi = [
|
|
4787
|
+
Ni
|
|
4788
|
+
], ji = { class: "flex-1 min-h-0" }, Hi = { class: "h-full overflow-y-auto overflow-x-hidden custom-scrollbar" }, zi = {
|
|
4719
4789
|
__name: "Popup",
|
|
4720
4790
|
props: {
|
|
4721
4791
|
options: {
|
|
@@ -4765,17 +4835,25 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4765
4835
|
ve(t), bt(t), Oe(t), xe(t), ln(t);
|
|
4766
4836
|
const o = ve(), l = bt(), s = Oe(), r = xe(), a = ln();
|
|
4767
4837
|
ce("translationStore", o), ce("ttsStore", l), ce("languageStore", s), ce("loaderStore", r), ce("writingStore", a);
|
|
4768
|
-
const i = n, u = (
|
|
4769
|
-
i("nav", { action:
|
|
4770
|
-
}, c = (
|
|
4771
|
-
i("nav", { action: "themeChange", payload:
|
|
4772
|
-
}, d = (
|
|
4773
|
-
i("translate", { action:
|
|
4774
|
-
},
|
|
4775
|
-
i("write", { action:
|
|
4776
|
-
},
|
|
4777
|
-
i("common", { action:
|
|
4778
|
-
},
|
|
4838
|
+
const i = n, u = (y, w) => {
|
|
4839
|
+
i("nav", { action: y, payload: w });
|
|
4840
|
+
}, c = (y) => {
|
|
4841
|
+
i("nav", { action: "themeChange", payload: y });
|
|
4842
|
+
}, d = (y, w = {}) => {
|
|
4843
|
+
i("translate", { action: y, payload: w });
|
|
4844
|
+
}, T = (y, w = {}) => {
|
|
4845
|
+
i("write", { action: y, payload: w });
|
|
4846
|
+
}, g = (y, w = {}) => {
|
|
4847
|
+
i("common", { action: y, payload: w });
|
|
4848
|
+
}, x = $("");
|
|
4849
|
+
function b(y) {
|
|
4850
|
+
const w = y == null ? void 0 : y.trim();
|
|
4851
|
+
w && (x.value = w, u("activeTab", "translate"));
|
|
4852
|
+
}
|
|
4853
|
+
function A() {
|
|
4854
|
+
x.value = "";
|
|
4855
|
+
}
|
|
4856
|
+
const V = e, I = {
|
|
4779
4857
|
activeTab: "translate",
|
|
4780
4858
|
translateOpts: { src: "auto", target: "en" },
|
|
4781
4859
|
writeOpts: { type: "check" },
|
|
@@ -4791,96 +4869,99 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
|
|
|
4791
4869
|
isAIExplain: !1,
|
|
4792
4870
|
aiExplainMinLength: 5,
|
|
4793
4871
|
isTTS: !0
|
|
4794
|
-
},
|
|
4795
|
-
if (
|
|
4796
|
-
|
|
4797
|
-
const
|
|
4798
|
-
u("activeTab",
|
|
4872
|
+
}, _ = O(() => Object.assign({}, I, V.options)), E = (y) => {
|
|
4873
|
+
if (y.key === "Tab") {
|
|
4874
|
+
y.preventDefault();
|
|
4875
|
+
const m = _.value.activeTab === "translate" ? "write" : "translate";
|
|
4876
|
+
u("activeTab", m);
|
|
4799
4877
|
}
|
|
4800
4878
|
};
|
|
4801
4879
|
return se(() => {
|
|
4802
|
-
window.addEventListener("keydown",
|
|
4880
|
+
window.addEventListener("keydown", E);
|
|
4803
4881
|
}), Fe(() => {
|
|
4804
|
-
window.removeEventListener("keydown",
|
|
4805
|
-
}), (
|
|
4882
|
+
window.removeEventListener("keydown", E);
|
|
4883
|
+
}), (y, w) => (h(), C("div", {
|
|
4806
4884
|
"data-theme": e.theme,
|
|
4807
4885
|
class: "h-screen flex flex-col bg-base-100"
|
|
4808
4886
|
}, [
|
|
4809
|
-
f("div",
|
|
4810
|
-
|
|
4887
|
+
f("div", Mi, [
|
|
4888
|
+
N(wo, {
|
|
4811
4889
|
"header-settings": e.headerSettings,
|
|
4812
4890
|
"current-theme": e.theme,
|
|
4813
4891
|
"is-premium": e.isPremium,
|
|
4814
|
-
onReader:
|
|
4815
|
-
onLearn:
|
|
4816
|
-
onSettings:
|
|
4817
|
-
onFullScreen:
|
|
4818
|
-
onAccount:
|
|
4892
|
+
onReader: w[0] || (w[0] = (m) => u("reader")),
|
|
4893
|
+
onLearn: w[1] || (w[1] = (m) => u("learn")),
|
|
4894
|
+
onSettings: w[2] || (w[2] = (m) => u("settings")),
|
|
4895
|
+
onFullScreen: w[3] || (w[3] = (m) => u("fullscreen")),
|
|
4896
|
+
onAccount: w[4] || (w[4] = (m) => u("account")),
|
|
4819
4897
|
onThemeChange: c
|
|
4820
4898
|
}, null, 8, ["header-settings", "current-theme", "is-premium"])
|
|
4821
4899
|
]),
|
|
4822
|
-
f("div",
|
|
4823
|
-
f("div",
|
|
4900
|
+
f("div", Ai, [
|
|
4901
|
+
f("div", Vi, [
|
|
4824
4902
|
f("button", {
|
|
4825
4903
|
class: P([
|
|
4826
4904
|
"w-1/2 px-4 py-2 text-sm font-medium",
|
|
4827
|
-
|
|
4905
|
+
_.value.activeTab === "translate" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
|
|
4828
4906
|
]),
|
|
4829
|
-
onClick:
|
|
4907
|
+
onClick: w[5] || (w[5] = (m) => u("activeTab", "translate"))
|
|
4830
4908
|
}, [
|
|
4831
4909
|
Ee(" Translate "),
|
|
4832
|
-
!
|
|
4910
|
+
!k(vt) && _.value.activeTab !== "translate" ? (h(), C("span", Di, Pi)) : R("", !0)
|
|
4833
4911
|
], 2),
|
|
4834
4912
|
f("button", {
|
|
4835
4913
|
class: P([
|
|
4836
4914
|
"w-1/2 px-4 py-2 text-sm font-medium",
|
|
4837
|
-
|
|
4915
|
+
_.value.activeTab === "write" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
|
|
4838
4916
|
]),
|
|
4839
|
-
onClick:
|
|
4917
|
+
onClick: w[6] || (w[6] = (m) => u("activeTab", "write"))
|
|
4840
4918
|
}, [
|
|
4841
4919
|
Ee(" Write "),
|
|
4842
|
-
!
|
|
4920
|
+
!k(vt) && _.value.activeTab !== "write" ? (h(), C("span", Bi, Fi)) : R("", !0)
|
|
4843
4921
|
], 2)
|
|
4844
4922
|
])
|
|
4845
4923
|
]),
|
|
4846
|
-
f("div",
|
|
4847
|
-
f("div",
|
|
4848
|
-
|
|
4924
|
+
f("div", ji, [
|
|
4925
|
+
f("div", Hi, [
|
|
4926
|
+
_.value.activeTab === "translate" ? (h(), Z(Tr, {
|
|
4849
4927
|
key: 0,
|
|
4850
|
-
opt:
|
|
4851
|
-
languages:
|
|
4928
|
+
opt: _.value.translateOpts,
|
|
4929
|
+
languages: _.value.languages,
|
|
4852
4930
|
translation: e.data.translation,
|
|
4853
4931
|
explanation: e.data.explanation,
|
|
4854
4932
|
tts: e.data.tts,
|
|
4855
|
-
isTTS:
|
|
4856
|
-
isFavoriteFeatureEnabled:
|
|
4857
|
-
isAITranslateFeatureEnabled:
|
|
4858
|
-
isFavorite:
|
|
4859
|
-
isAITranslate:
|
|
4860
|
-
isAIExplain:
|
|
4861
|
-
aiExplainMinLength:
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4933
|
+
isTTS: _.value.isTTS,
|
|
4934
|
+
isFavoriteFeatureEnabled: _.value.isFavoriteFeatureEnabled,
|
|
4935
|
+
isAITranslateFeatureEnabled: _.value.isAITranslateFeatureEnabled,
|
|
4936
|
+
isFavorite: _.value.isFavorite,
|
|
4937
|
+
isAITranslate: _.value.isAITranslate,
|
|
4938
|
+
isAIExplain: _.value.isAIExplain,
|
|
4939
|
+
aiExplainMinLength: _.value.aiExplainMinLength,
|
|
4940
|
+
seedText: x.value,
|
|
4941
|
+
onOpt: w[7] || (w[7] = (m) => d("updateOpts", m)),
|
|
4942
|
+
onTranslate: w[8] || (w[8] = (m) => d("translate", m)),
|
|
4943
|
+
onLoadTTS: w[9] || (w[9] = (m) => d("loadTTS", m)),
|
|
4944
|
+
onFavorite: w[10] || (w[10] = (m) => d("favorite")),
|
|
4945
|
+
onAiTranslate: w[11] || (w[11] = (m) => d("aiTranslate", m)),
|
|
4946
|
+
onAiExplain: w[12] || (w[12] = (m) => d("aiExplain", m)),
|
|
4947
|
+
onCopy: w[13] || (w[13] = (m) => g("copy", m)),
|
|
4948
|
+
onSeeded: A
|
|
4949
|
+
}, null, 8, ["opt", "languages", "translation", "explanation", "tts", "isTTS", "isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isFavorite", "isAITranslate", "isAIExplain", "aiExplainMinLength", "seedText"])) : R("", !0),
|
|
4950
|
+
_.value.activeTab === "write" ? (h(), Z(Ii, {
|
|
4871
4951
|
key: 1,
|
|
4872
|
-
opt:
|
|
4873
|
-
languages:
|
|
4952
|
+
opt: _.value.writeOpts,
|
|
4953
|
+
languages: _.value.languages,
|
|
4874
4954
|
writing: e.data.writing,
|
|
4875
|
-
onOpt:
|
|
4876
|
-
onWrite:
|
|
4877
|
-
onCopy:
|
|
4955
|
+
onOpt: w[14] || (w[14] = (m) => T("updateOpts", m)),
|
|
4956
|
+
onWrite: w[15] || (w[15] = (m) => T("write", m)),
|
|
4957
|
+
onCopy: w[16] || (w[16] = (m) => g("copy", m)),
|
|
4958
|
+
onTranslate: b
|
|
4878
4959
|
}, null, 8, ["opt", "languages", "writing"])) : R("", !0)
|
|
4879
4960
|
])
|
|
4880
4961
|
])
|
|
4881
|
-
], 8,
|
|
4962
|
+
], 8, ki));
|
|
4882
4963
|
}
|
|
4883
|
-
},
|
|
4964
|
+
}, Wi = /* @__PURE__ */ he(zi, [["__scopeId", "data-v-848b8f0b"]]);
|
|
4884
4965
|
export {
|
|
4885
|
-
|
|
4966
|
+
Wi as default
|
|
4886
4967
|
};
|