@ddict/popup 1.0.11 → 1.0.13
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 +1219 -1257
- package/dist/popup.umd.js +9 -27
- package/package.json +1 -2
- package/dist/howler-DJIW9wc6.js +0 -1226
package/dist/popup.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as y, createElementBlock as O, createElementVNode as g, computed as w, unref as M, shallowRef as cn, watch as H, triggerRef as rt, onScopeDispose as Xe, ref as S, onUnmounted as wt, inject as Le, watchEffect as re, onMounted as xe, cloneVNode as Et, h as Se, Fragment as Z, defineComponent as ae, provide as et, reactive as St, nextTick as Q, toRaw as K, mergeModels as dn, useModel as fn, createBlock as ee, withCtx as Ve, createVNode as B, renderList as le, normalizeClass as Ce, toDisplayString as te, effectScope as Ot, markRaw as de, hasInjectionContext as pn, getCurrentInstance as $t, isRef as _e, isReactive as tt, toRef as Ze, getCurrentScope as It, toRefs as at, createCommentVNode as X, withModifiers as vn, createTextVNode as hn, withDirectives as Lt, vModelText as Tt, pushScopeId as mn, popScopeId as gn } from "vue";
|
|
2
2
|
const bn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e", Cn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e", _n = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e", xn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e", yn = { class: "flex justify-between" }, wn = /* @__PURE__ */ g("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ g("img", {
|
|
4
4
|
src: bn,
|
|
@@ -28,44 +28,44 @@ const bn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
28
28
|
emits: ["settings", "fullScreen", "reader"],
|
|
29
29
|
setup(e, { emit: o }) {
|
|
30
30
|
const t = o;
|
|
31
|
-
return (n,
|
|
31
|
+
return (n, s) => (y(), O("div", yn, [
|
|
32
32
|
wn,
|
|
33
33
|
g("div", En, [
|
|
34
34
|
g("button", {
|
|
35
35
|
class: "btn btn-ghost btn-circle",
|
|
36
|
-
onClick:
|
|
36
|
+
onClick: s[0] || (s[0] = (i) => t("reader"))
|
|
37
37
|
}, On),
|
|
38
38
|
g("button", {
|
|
39
|
-
class: "btn btn-ghost btn-circle",
|
|
40
|
-
onClick:
|
|
39
|
+
class: "btn btn-ghost btn-circle md:hidden",
|
|
40
|
+
onClick: s[1] || (s[1] = (i) => t("fullScreen"))
|
|
41
41
|
}, In),
|
|
42
42
|
g("button", {
|
|
43
43
|
class: "btn btn-ghost btn-circle",
|
|
44
|
-
onClick:
|
|
44
|
+
onClick: s[2] || (s[2] = (i) => t("settings"))
|
|
45
45
|
}, Tn)
|
|
46
46
|
])
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
function ye(e, o, t) {
|
|
51
|
-
let n = t.initialDeps ?? [],
|
|
51
|
+
let n = t.initialDeps ?? [], s;
|
|
52
52
|
return () => {
|
|
53
|
-
var
|
|
53
|
+
var i, r, l, a;
|
|
54
54
|
let u;
|
|
55
|
-
t.key && ((
|
|
56
|
-
const
|
|
57
|
-
if (!(
|
|
58
|
-
return
|
|
59
|
-
n =
|
|
60
|
-
let
|
|
61
|
-
if (t.key && ((
|
|
62
|
-
const
|
|
63
|
-
for (
|
|
64
|
-
|
|
65
|
-
return
|
|
55
|
+
t.key && ((i = t.debug) != null && i.call(t)) && (u = Date.now());
|
|
56
|
+
const p = e();
|
|
57
|
+
if (!(p.length !== n.length || p.some((h, m) => n[m] !== h)))
|
|
58
|
+
return s;
|
|
59
|
+
n = p;
|
|
60
|
+
let v;
|
|
61
|
+
if (t.key && ((r = t.debug) != null && r.call(t)) && (v = Date.now()), s = o(...p), t.key && ((l = t.debug) != null && l.call(t))) {
|
|
62
|
+
const h = Math.round((Date.now() - u) * 100) / 100, m = Math.round((Date.now() - v) * 100) / 100, $ = m / 16, N = (R, I) => {
|
|
63
|
+
for (R = String(R); R.length < I; )
|
|
64
|
+
R = " " + R;
|
|
65
|
+
return R;
|
|
66
66
|
};
|
|
67
67
|
console.info(
|
|
68
|
-
`%c⏱ ${N(
|
|
68
|
+
`%c⏱ ${N(m, 5)} /${N(h, 5)} ms`,
|
|
69
69
|
`
|
|
70
70
|
font-size: .6rem;
|
|
71
71
|
font-weight: bold;
|
|
@@ -76,7 +76,7 @@ function ye(e, o, t) {
|
|
|
76
76
|
t == null ? void 0 : t.key
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
return (a = t == null ? void 0 : t.onChange) == null || a.call(t,
|
|
79
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, s), s;
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
function We(e, o) {
|
|
@@ -86,13 +86,13 @@ function We(e, o) {
|
|
|
86
86
|
}
|
|
87
87
|
const Pn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
88
88
|
let n;
|
|
89
|
-
return function(...
|
|
90
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
89
|
+
return function(...s) {
|
|
90
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, s), t);
|
|
91
91
|
};
|
|
92
92
|
}, kn = (e) => e, Rn = (e) => {
|
|
93
93
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
94
|
-
for (let
|
|
95
|
-
n.push(
|
|
94
|
+
for (let s = o; s <= t; s++)
|
|
95
|
+
n.push(s);
|
|
96
96
|
return n;
|
|
97
97
|
}, Nn = (e, o) => {
|
|
98
98
|
const t = e.scrollElement;
|
|
@@ -101,49 +101,49 @@ const Pn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
|
101
101
|
const n = e.targetWindow;
|
|
102
102
|
if (!n)
|
|
103
103
|
return;
|
|
104
|
-
const
|
|
105
|
-
const { width:
|
|
106
|
-
o({ width: Math.round(
|
|
104
|
+
const s = (r) => {
|
|
105
|
+
const { width: l, height: a } = r;
|
|
106
|
+
o({ width: Math.round(l), height: Math.round(a) });
|
|
107
107
|
};
|
|
108
|
-
if (
|
|
108
|
+
if (s(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
109
109
|
return () => {
|
|
110
110
|
};
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
const a =
|
|
111
|
+
const i = new n.ResizeObserver((r) => {
|
|
112
|
+
const l = r[0];
|
|
113
|
+
if (l != null && l.borderBoxSize) {
|
|
114
|
+
const a = l.borderBoxSize[0];
|
|
115
115
|
if (a) {
|
|
116
|
-
|
|
116
|
+
s({ width: a.inlineSize, height: a.blockSize });
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
s(t.getBoundingClientRect());
|
|
121
121
|
});
|
|
122
|
-
return
|
|
123
|
-
|
|
122
|
+
return i.observe(t, { box: "border-box" }), () => {
|
|
123
|
+
i.unobserve(t);
|
|
124
124
|
};
|
|
125
125
|
}, ut = {
|
|
126
126
|
passive: !0
|
|
127
|
-
},
|
|
127
|
+
}, An = typeof window > "u" ? !0 : "onscrollend" in window, Dn = (e, o) => {
|
|
128
128
|
const t = e.scrollElement;
|
|
129
129
|
if (!t)
|
|
130
130
|
return;
|
|
131
131
|
const n = e.targetWindow;
|
|
132
132
|
if (!n)
|
|
133
133
|
return;
|
|
134
|
-
let
|
|
135
|
-
const
|
|
134
|
+
let s = 0;
|
|
135
|
+
const i = An ? () => {
|
|
136
136
|
} : Mn(
|
|
137
137
|
n,
|
|
138
138
|
() => {
|
|
139
|
-
o(
|
|
139
|
+
o(s, !1);
|
|
140
140
|
},
|
|
141
141
|
e.options.isScrollingResetDelay
|
|
142
|
-
),
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
return a(), t.addEventListener("scroll",
|
|
146
|
-
t.removeEventListener("scroll",
|
|
142
|
+
), r = (u) => () => {
|
|
143
|
+
s = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], i(), o(s, u);
|
|
144
|
+
}, l = r(!0), a = r(!1);
|
|
145
|
+
return a(), t.addEventListener("scroll", l, ut), t.addEventListener("scrollend", a, ut), () => {
|
|
146
|
+
t.removeEventListener("scroll", l), t.removeEventListener("scrollend", a);
|
|
147
147
|
};
|
|
148
148
|
}, Fn = (e, o, t) => {
|
|
149
149
|
if (o != null && o.borderBoxSize) {
|
|
@@ -160,10 +160,10 @@ const Pn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
|
160
160
|
adjustments: o = 0,
|
|
161
161
|
behavior: t
|
|
162
162
|
}, n) => {
|
|
163
|
-
var
|
|
164
|
-
const
|
|
165
|
-
(
|
|
166
|
-
[n.options.horizontal ? "left" : "top"]:
|
|
163
|
+
var s, i;
|
|
164
|
+
const r = e + o;
|
|
165
|
+
(i = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || i.call(s, {
|
|
166
|
+
[n.options.horizontal ? "left" : "top"]: r,
|
|
167
167
|
behavior: t
|
|
168
168
|
});
|
|
169
169
|
};
|
|
@@ -171,28 +171,28 @@ class Bn {
|
|
|
171
171
|
constructor(o) {
|
|
172
172
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
173
173
|
let t = null;
|
|
174
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
175
|
-
|
|
176
|
-
this._measureElement(
|
|
174
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
|
|
175
|
+
s.forEach((i) => {
|
|
176
|
+
this._measureElement(i.target, i);
|
|
177
177
|
});
|
|
178
178
|
}));
|
|
179
179
|
return {
|
|
180
180
|
disconnect: () => {
|
|
181
|
-
var
|
|
182
|
-
return (
|
|
181
|
+
var s;
|
|
182
|
+
return (s = n()) == null ? void 0 : s.disconnect();
|
|
183
183
|
},
|
|
184
|
-
observe: (
|
|
185
|
-
var
|
|
186
|
-
return (
|
|
184
|
+
observe: (s) => {
|
|
185
|
+
var i;
|
|
186
|
+
return (i = n()) == null ? void 0 : i.observe(s, { box: "border-box" });
|
|
187
187
|
},
|
|
188
|
-
unobserve: (
|
|
189
|
-
var
|
|
190
|
-
return (
|
|
188
|
+
unobserve: (s) => {
|
|
189
|
+
var i;
|
|
190
|
+
return (i = n()) == null ? void 0 : i.unobserve(s);
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
})(), this.range = null, this.setOptions = (t) => {
|
|
194
|
-
Object.entries(t).forEach(([n,
|
|
195
|
-
typeof
|
|
194
|
+
Object.entries(t).forEach(([n, s]) => {
|
|
195
|
+
typeof s > "u" && delete t[n];
|
|
196
196
|
}), this.options = {
|
|
197
197
|
debug: !1,
|
|
198
198
|
initialOffset: 0,
|
|
@@ -218,12 +218,12 @@ class Bn {
|
|
|
218
218
|
...t
|
|
219
219
|
};
|
|
220
220
|
}, this.notify = (t, n) => {
|
|
221
|
-
var
|
|
222
|
-
const { startIndex:
|
|
221
|
+
var s, i;
|
|
222
|
+
const { startIndex: r, endIndex: l } = this.range ?? {
|
|
223
223
|
startIndex: void 0,
|
|
224
224
|
endIndex: void 0
|
|
225
225
|
}, a = this.calculateRange();
|
|
226
|
-
(t ||
|
|
226
|
+
(t || r !== (a == null ? void 0 : a.startIndex) || l !== (a == null ? void 0 : a.endIndex)) && ((i = (s = this.options).onChange) == null || i.call(s, this, n));
|
|
227
227
|
}, this.cleanup = () => {
|
|
228
228
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
229
229
|
}, this._didMount = () => () => {
|
|
@@ -240,30 +240,30 @@ class Bn {
|
|
|
240
240
|
adjustments: void 0,
|
|
241
241
|
behavior: void 0
|
|
242
242
|
}), this.unsubs.push(
|
|
243
|
-
this.options.observeElementRect(this, (
|
|
244
|
-
this.scrollRect =
|
|
243
|
+
this.options.observeElementRect(this, (s) => {
|
|
244
|
+
this.scrollRect = s, this.notify(!1, !1);
|
|
245
245
|
})
|
|
246
246
|
), this.unsubs.push(
|
|
247
|
-
this.options.observeElementOffset(this, (
|
|
248
|
-
this.scrollAdjustments = 0, this.scrollDirection =
|
|
249
|
-
const
|
|
250
|
-
this.isScrolling =
|
|
247
|
+
this.options.observeElementOffset(this, (s, i) => {
|
|
248
|
+
this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s;
|
|
249
|
+
const r = this.isScrolling;
|
|
250
|
+
this.isScrolling = i, this.notify(r !== i, i);
|
|
251
251
|
})
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
}, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
|
|
255
|
-
const
|
|
256
|
-
for (let
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
255
|
+
const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
256
|
+
for (let r = n - 1; r >= 0; r--) {
|
|
257
|
+
const l = t[r];
|
|
258
|
+
if (s.has(l.lane))
|
|
259
259
|
continue;
|
|
260
|
-
const a =
|
|
261
|
-
|
|
260
|
+
const a = i.get(
|
|
261
|
+
l.lane
|
|
262
262
|
);
|
|
263
|
-
if (a == null ||
|
|
263
|
+
if (a == null || l.end > a.end ? i.set(l.lane, l) : l.end < a.end && s.set(l.lane, !0), s.size === this.options.lanes)
|
|
264
264
|
break;
|
|
265
265
|
}
|
|
266
|
-
return
|
|
266
|
+
return i.size === this.options.lanes ? Array.from(i.values()).sort((r, l) => r.end === l.end ? r.index - l.index : r.end - l.end)[0] : void 0;
|
|
267
267
|
}, this.getMeasurementOptions = ye(
|
|
268
268
|
() => [
|
|
269
269
|
this.options.count,
|
|
@@ -272,53 +272,53 @@ class Bn {
|
|
|
272
272
|
this.options.getItemKey,
|
|
273
273
|
this.options.enabled
|
|
274
274
|
],
|
|
275
|
-
(t, n,
|
|
275
|
+
(t, n, s, i, r) => (this.pendingMeasuredCacheIndexes = [], {
|
|
276
276
|
count: t,
|
|
277
277
|
paddingStart: n,
|
|
278
|
-
scrollMargin:
|
|
279
|
-
getItemKey:
|
|
280
|
-
enabled:
|
|
278
|
+
scrollMargin: s,
|
|
279
|
+
getItemKey: i,
|
|
280
|
+
enabled: r
|
|
281
281
|
}),
|
|
282
282
|
{
|
|
283
283
|
key: !1
|
|
284
284
|
}
|
|
285
285
|
), this.getMeasurements = ye(
|
|
286
286
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
287
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
287
|
+
({ count: t, paddingStart: n, scrollMargin: s, getItemKey: i, enabled: r }, l) => {
|
|
288
288
|
var a;
|
|
289
|
-
if (!
|
|
289
|
+
if (!r)
|
|
290
290
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
291
|
-
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((
|
|
292
|
-
this.itemSizeCache.set(
|
|
291
|
+
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((f) => {
|
|
292
|
+
this.itemSizeCache.set(f.key, f.size);
|
|
293
293
|
}));
|
|
294
294
|
const u = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
295
295
|
this.pendingMeasuredCacheIndexes = [];
|
|
296
|
-
const
|
|
297
|
-
for (let
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
const _ =
|
|
301
|
-
if (!
|
|
302
|
-
|
|
296
|
+
const p = this.measurementsCache.slice(0, u);
|
|
297
|
+
for (let f = u; f < t; f++) {
|
|
298
|
+
let v = (a = this.measurementsCache[f]) == null ? void 0 : a.measureElement;
|
|
299
|
+
v || (v = (D) => {
|
|
300
|
+
const _ = i(f), T = this.elementsCache.get(_);
|
|
301
|
+
if (!D) {
|
|
302
|
+
T && (this.observer.unobserve(T), this.elementsCache.delete(_));
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
this.options.measureElement(
|
|
305
|
+
T !== D && (T && this.observer.unobserve(T), this.observer.observe(D), this.elementsCache.set(_, D)), D.isConnected && this.resizeItem(
|
|
306
|
+
f,
|
|
307
|
+
this.options.measureElement(D, void 0, this)
|
|
308
308
|
);
|
|
309
309
|
});
|
|
310
|
-
const
|
|
311
|
-
|
|
312
|
-
index:
|
|
310
|
+
const h = i(f), m = this.options.lanes === 1 ? p[f - 1] : this.getFurthestMeasurement(p, f), $ = m ? m.end + this.options.gap : n + s, N = l.get(h), R = typeof N == "number" ? N : this.options.estimateSize(f), I = $ + R, k = m ? m.lane : f % this.options.lanes;
|
|
311
|
+
p[f] = {
|
|
312
|
+
index: f,
|
|
313
313
|
start: $,
|
|
314
|
-
size:
|
|
314
|
+
size: R,
|
|
315
315
|
end: I,
|
|
316
|
-
key:
|
|
317
|
-
lane:
|
|
318
|
-
measureElement:
|
|
316
|
+
key: h,
|
|
317
|
+
lane: k,
|
|
318
|
+
measureElement: v
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
-
return this.measurementsCache =
|
|
321
|
+
return this.measurementsCache = p, p;
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
@@ -326,10 +326,10 @@ class Bn {
|
|
|
326
326
|
}
|
|
327
327
|
), this.calculateRange = ye(
|
|
328
328
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
329
|
-
(t, n,
|
|
329
|
+
(t, n, s) => this.range = t.length > 0 && n > 0 ? Hn({
|
|
330
330
|
measurements: t,
|
|
331
331
|
outerSize: n,
|
|
332
|
-
scrollOffset:
|
|
332
|
+
scrollOffset: s
|
|
333
333
|
}) : null,
|
|
334
334
|
{
|
|
335
335
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
@@ -342,51 +342,51 @@ class Bn {
|
|
|
342
342
|
this.options.overscan,
|
|
343
343
|
this.options.count
|
|
344
344
|
],
|
|
345
|
-
(t, n,
|
|
345
|
+
(t, n, s, i) => n === null ? [] : t({
|
|
346
346
|
startIndex: n.startIndex,
|
|
347
347
|
endIndex: n.endIndex,
|
|
348
|
-
overscan:
|
|
349
|
-
count:
|
|
348
|
+
overscan: s,
|
|
349
|
+
count: i
|
|
350
350
|
}),
|
|
351
351
|
{
|
|
352
352
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
353
353
|
debug: () => this.options.debug
|
|
354
354
|
}
|
|
355
355
|
), this.indexFromElement = (t) => {
|
|
356
|
-
const n = this.options.indexAttribute,
|
|
357
|
-
return
|
|
356
|
+
const n = this.options.indexAttribute, s = t.getAttribute(n);
|
|
357
|
+
return s ? parseInt(s, 10) : (console.warn(
|
|
358
358
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
359
359
|
), -1);
|
|
360
360
|
}, this._measureElement = (t, n) => {
|
|
361
|
-
const
|
|
362
|
-
if (!
|
|
363
|
-
this.elementsCache.forEach((
|
|
364
|
-
|
|
361
|
+
const s = this.indexFromElement(t), i = this.getMeasurements()[s];
|
|
362
|
+
if (!i || !t.isConnected) {
|
|
363
|
+
this.elementsCache.forEach((l, a) => {
|
|
364
|
+
l === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
365
365
|
});
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
const
|
|
369
|
-
|
|
368
|
+
const r = this.elementsCache.get(i.key);
|
|
369
|
+
r !== t && (r && this.observer.unobserve(r), this.observer.observe(t), this.elementsCache.set(i.key, t)), this.resizeItem(s, this.options.measureElement(t, n, this));
|
|
370
370
|
}, this.resizeItem = (t, n) => {
|
|
371
|
-
const
|
|
372
|
-
if (!
|
|
371
|
+
const s = this.getMeasurements()[t];
|
|
372
|
+
if (!s)
|
|
373
373
|
return;
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
adjustments: this.scrollAdjustments +=
|
|
374
|
+
const i = this.itemSizeCache.get(s.key) ?? s.size, r = n - i;
|
|
375
|
+
r !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, r, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
|
|
376
|
+
adjustments: this.scrollAdjustments += r,
|
|
377
377
|
behavior: void 0
|
|
378
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
378
|
+
})), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!0, !1));
|
|
379
379
|
}, this.measureElement = (t) => {
|
|
380
380
|
t && this._measureElement(t, void 0);
|
|
381
381
|
}, this.getVirtualItems = ye(
|
|
382
382
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
383
383
|
(t, n) => {
|
|
384
|
-
const
|
|
385
|
-
for (let
|
|
386
|
-
const
|
|
387
|
-
|
|
384
|
+
const s = [];
|
|
385
|
+
for (let i = 0, r = t.length; i < r; i++) {
|
|
386
|
+
const l = t[i], a = n[l];
|
|
387
|
+
s.push(a);
|
|
388
388
|
}
|
|
389
|
-
return
|
|
389
|
+
return s;
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -399,56 +399,56 @@ class Bn {
|
|
|
399
399
|
n[Vt(
|
|
400
400
|
0,
|
|
401
401
|
n.length - 1,
|
|
402
|
-
(
|
|
402
|
+
(s) => We(n[s]).start,
|
|
403
403
|
t
|
|
404
404
|
)]
|
|
405
405
|
);
|
|
406
406
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
407
|
-
const
|
|
408
|
-
n === "auto" && (t <=
|
|
409
|
-
const
|
|
407
|
+
const s = this.getSize(), i = this.getScrollOffset();
|
|
408
|
+
n === "auto" && (t <= i ? n = "start" : t >= i + s ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - s : n === "center" && (t = t - s / 2);
|
|
409
|
+
const r = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[r] : this.scrollElement[r] : 0) - s;
|
|
410
410
|
return Math.max(Math.min(a, t), 0);
|
|
411
411
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
412
412
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
413
|
-
const
|
|
414
|
-
if (!
|
|
413
|
+
const s = this.getMeasurements()[t];
|
|
414
|
+
if (!s)
|
|
415
415
|
return;
|
|
416
|
-
const
|
|
416
|
+
const i = this.getSize(), r = this.getScrollOffset();
|
|
417
417
|
if (n === "auto")
|
|
418
|
-
if (
|
|
418
|
+
if (s.end >= r + i - this.options.scrollPaddingEnd)
|
|
419
419
|
n = "end";
|
|
420
|
-
else if (
|
|
420
|
+
else if (s.start <= r + this.options.scrollPaddingStart)
|
|
421
421
|
n = "start";
|
|
422
422
|
else
|
|
423
|
-
return [
|
|
424
|
-
const
|
|
425
|
-
return [this.getOffsetForAlignment(
|
|
423
|
+
return [r, n];
|
|
424
|
+
const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
|
|
425
|
+
return [this.getOffsetForAlignment(l, n), n];
|
|
426
426
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
427
427
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
428
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
429
|
-
this.cancelScrollToIndex(),
|
|
428
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: s } = {}) => {
|
|
429
|
+
this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
|
|
430
430
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
431
431
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
432
432
|
adjustments: void 0,
|
|
433
|
-
behavior:
|
|
433
|
+
behavior: s
|
|
434
434
|
});
|
|
435
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
436
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
435
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: s } = {}) => {
|
|
436
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
|
|
437
437
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
438
438
|
);
|
|
439
|
-
const
|
|
440
|
-
if (!
|
|
441
|
-
const [
|
|
442
|
-
this._scrollToOffset(
|
|
439
|
+
const i = this.getOffsetForIndex(t, n);
|
|
440
|
+
if (!i) return;
|
|
441
|
+
const [r, l] = i;
|
|
442
|
+
this._scrollToOffset(r, { adjustments: void 0, behavior: s }), s !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
443
443
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
444
444
|
this.options.getItemKey(t)
|
|
445
445
|
)) {
|
|
446
446
|
const [u] = We(
|
|
447
|
-
this.getOffsetForIndex(t,
|
|
447
|
+
this.getOffsetForIndex(t, l)
|
|
448
448
|
);
|
|
449
|
-
Pn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align:
|
|
449
|
+
Pn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: s });
|
|
450
450
|
} else
|
|
451
|
-
this.scrollToIndex(t, { align:
|
|
451
|
+
this.scrollToIndex(t, { align: l, behavior: s });
|
|
452
452
|
}));
|
|
453
453
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
454
454
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -460,15 +460,15 @@ class Bn {
|
|
|
460
460
|
}, this.getTotalSize = () => {
|
|
461
461
|
var t;
|
|
462
462
|
const n = this.getMeasurements();
|
|
463
|
-
let
|
|
464
|
-
return n.length === 0 ?
|
|
465
|
-
...n.slice(-this.options.lanes).map((
|
|
466
|
-
),
|
|
463
|
+
let s;
|
|
464
|
+
return n.length === 0 ? s = this.options.paddingStart : s = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
465
|
+
...n.slice(-this.options.lanes).map((i) => i.end)
|
|
466
|
+
), s - this.options.scrollMargin + this.options.paddingEnd;
|
|
467
467
|
}, this._scrollToOffset = (t, {
|
|
468
468
|
adjustments: n,
|
|
469
|
-
behavior:
|
|
469
|
+
behavior: s
|
|
470
470
|
}) => {
|
|
471
|
-
this.options.scrollToFn(t, { behavior:
|
|
471
|
+
this.options.scrollToFn(t, { behavior: s, adjustments: n }, this);
|
|
472
472
|
}, this.measure = () => {
|
|
473
473
|
var t, n;
|
|
474
474
|
this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
|
|
@@ -477,13 +477,13 @@ class Bn {
|
|
|
477
477
|
}
|
|
478
478
|
const Vt = (e, o, t, n) => {
|
|
479
479
|
for (; e <= o; ) {
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
e =
|
|
483
|
-
else if (
|
|
484
|
-
o =
|
|
480
|
+
const s = (e + o) / 2 | 0, i = t(s);
|
|
481
|
+
if (i < n)
|
|
482
|
+
e = s + 1;
|
|
483
|
+
else if (i > n)
|
|
484
|
+
o = s - 1;
|
|
485
485
|
else
|
|
486
|
-
return
|
|
486
|
+
return s;
|
|
487
487
|
}
|
|
488
488
|
return e > 0 ? e - 1 : 0;
|
|
489
489
|
};
|
|
@@ -492,32 +492,32 @@ function Hn({
|
|
|
492
492
|
outerSize: o,
|
|
493
493
|
scrollOffset: t
|
|
494
494
|
}) {
|
|
495
|
-
const n = e.length - 1,
|
|
496
|
-
let
|
|
497
|
-
for (;
|
|
498
|
-
|
|
499
|
-
return { startIndex:
|
|
495
|
+
const n = e.length - 1, i = Vt(0, n, (l) => e[l].start, t);
|
|
496
|
+
let r = i;
|
|
497
|
+
for (; r < n && e[r].end < t + o; )
|
|
498
|
+
r++;
|
|
499
|
+
return { startIndex: i, endIndex: r };
|
|
500
500
|
}
|
|
501
501
|
function zn(e) {
|
|
502
|
-
const o = new Bn(
|
|
503
|
-
return
|
|
504
|
-
() =>
|
|
505
|
-
(
|
|
506
|
-
|
|
502
|
+
const o = new Bn(M(e)), t = cn(o), n = o._didMount();
|
|
503
|
+
return H(
|
|
504
|
+
() => M(e).getScrollElement(),
|
|
505
|
+
(s) => {
|
|
506
|
+
s && o._willUpdate();
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
immediate: !0
|
|
510
510
|
}
|
|
511
|
-
),
|
|
512
|
-
() =>
|
|
513
|
-
(
|
|
511
|
+
), H(
|
|
512
|
+
() => M(e),
|
|
513
|
+
(s) => {
|
|
514
514
|
o.setOptions({
|
|
515
|
-
...
|
|
516
|
-
onChange: (
|
|
517
|
-
var
|
|
518
|
-
|
|
515
|
+
...s,
|
|
516
|
+
onChange: (i, r) => {
|
|
517
|
+
var l;
|
|
518
|
+
rt(t), (l = s.onChange) == null || l.call(s, i, r);
|
|
519
519
|
}
|
|
520
|
-
}), o._willUpdate(),
|
|
520
|
+
}), o._willUpdate(), rt(t);
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
immediate: !0
|
|
@@ -526,18 +526,18 @@ function zn(e) {
|
|
|
526
526
|
}
|
|
527
527
|
function Un(e) {
|
|
528
528
|
return zn(
|
|
529
|
-
|
|
529
|
+
w(() => ({
|
|
530
530
|
observeElementRect: Nn,
|
|
531
|
-
observeElementOffset:
|
|
531
|
+
observeElementOffset: Dn,
|
|
532
532
|
scrollToFn: jn,
|
|
533
|
-
...
|
|
533
|
+
...M(e)
|
|
534
534
|
}))
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
537
|
function Zn(e, o, t) {
|
|
538
|
-
let n =
|
|
539
|
-
return [
|
|
540
|
-
return
|
|
538
|
+
let n = S(t == null ? void 0 : t.value), s = w(() => e.value !== void 0);
|
|
539
|
+
return [w(() => s.value ? e.value : n.value), function(i) {
|
|
540
|
+
return s.value || (n.value = i), o == null ? void 0 : o(i);
|
|
541
541
|
}];
|
|
542
542
|
}
|
|
543
543
|
function Wn(e) {
|
|
@@ -545,9 +545,9 @@ function Wn(e) {
|
|
|
545
545
|
throw o;
|
|
546
546
|
}));
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
let e = [], o = { addEventListener(t, n,
|
|
550
|
-
return t.addEventListener(n,
|
|
548
|
+
function Ae() {
|
|
549
|
+
let e = [], o = { addEventListener(t, n, s, i) {
|
|
550
|
+
return t.addEventListener(n, s, i), o.add(() => t.removeEventListener(n, s, i));
|
|
551
551
|
}, requestAnimationFrame(...t) {
|
|
552
552
|
let n = requestAnimationFrame(...t);
|
|
553
553
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -565,18 +565,18 @@ function De() {
|
|
|
565
565
|
}), o.add(() => {
|
|
566
566
|
n.current = !1;
|
|
567
567
|
});
|
|
568
|
-
}, style(t, n,
|
|
569
|
-
let
|
|
570
|
-
return Object.assign(t.style, { [n]:
|
|
571
|
-
Object.assign(t.style, { [n]:
|
|
568
|
+
}, style(t, n, s) {
|
|
569
|
+
let i = t.style.getPropertyValue(n);
|
|
570
|
+
return Object.assign(t.style, { [n]: s }), this.add(() => {
|
|
571
|
+
Object.assign(t.style, { [n]: i });
|
|
572
572
|
});
|
|
573
573
|
}, group(t) {
|
|
574
|
-
let n =
|
|
574
|
+
let n = Ae();
|
|
575
575
|
return t(n), this.add(() => n.dispose());
|
|
576
576
|
}, add(t) {
|
|
577
577
|
return e.push(t), () => {
|
|
578
578
|
let n = e.indexOf(t);
|
|
579
|
-
if (n >= 0) for (let
|
|
579
|
+
if (n >= 0) for (let s of e.splice(n, 1)) s();
|
|
580
580
|
};
|
|
581
581
|
}, dispose() {
|
|
582
582
|
for (let t of e.splice(0)) t();
|
|
@@ -584,7 +584,7 @@ function De() {
|
|
|
584
584
|
return o;
|
|
585
585
|
}
|
|
586
586
|
function Gn() {
|
|
587
|
-
let e =
|
|
587
|
+
let e = Ae();
|
|
588
588
|
return wt(() => e.dispose()), e;
|
|
589
589
|
}
|
|
590
590
|
function qn() {
|
|
@@ -597,19 +597,19 @@ let Jn = Symbol("headlessui.useid"), Kn = 0;
|
|
|
597
597
|
function Te() {
|
|
598
598
|
return Le(Jn, () => `${++Kn}`)();
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function V(e) {
|
|
601
601
|
var o;
|
|
602
602
|
if (e == null || e.value == null) return null;
|
|
603
603
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
604
604
|
return t instanceof Node ? t : null;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function se(e, o, ...t) {
|
|
607
607
|
if (e in o) {
|
|
608
|
-
let
|
|
609
|
-
return typeof
|
|
608
|
+
let s = o[e];
|
|
609
|
+
return typeof s == "function" ? s(...t) : s;
|
|
610
610
|
}
|
|
611
|
-
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((
|
|
612
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
611
|
+
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((s) => `"${s}"`).join(", ")}.`);
|
|
612
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, se), n;
|
|
613
613
|
}
|
|
614
614
|
var Yn = Object.defineProperty, Qn = (e, o, t) => o in e ? Yn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, ct = (e, o, t) => (Qn(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
615
615
|
let Xn = class {
|
|
@@ -639,7 +639,7 @@ function ot(e) {
|
|
|
639
639
|
if (nt.isServer) return null;
|
|
640
640
|
if (e instanceof Node) return e.ownerDocument;
|
|
641
641
|
if (e != null && e.hasOwnProperty("value")) {
|
|
642
|
-
let o =
|
|
642
|
+
let o = V(e);
|
|
643
643
|
if (o) return o.ownerDocument;
|
|
644
644
|
}
|
|
645
645
|
return document;
|
|
@@ -648,7 +648,7 @@ let dt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "butt
|
|
|
648
648
|
var eo = ((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))(eo || {}), to = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(to || {}), no = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(no || {}), Pt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Pt || {});
|
|
649
649
|
function oo(e, o = 0) {
|
|
650
650
|
var t;
|
|
651
|
-
return e === ((t = ot(e)) == null ? void 0 : t.body) ? !1 :
|
|
651
|
+
return e === ((t = ot(e)) == null ? void 0 : t.body) ? !1 : se(o, { 0() {
|
|
652
652
|
return e.matches(dt);
|
|
653
653
|
}, 1() {
|
|
654
654
|
let n = e;
|
|
@@ -659,64 +659,64 @@ function oo(e, o = 0) {
|
|
|
659
659
|
return !1;
|
|
660
660
|
} });
|
|
661
661
|
}
|
|
662
|
-
var
|
|
662
|
+
var so = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(so || {});
|
|
663
663
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
664
664
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
665
665
|
}, !0), document.addEventListener("click", (e) => {
|
|
666
666
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
667
667
|
}, !0));
|
|
668
|
-
function
|
|
668
|
+
function lo(e, o = (t) => t) {
|
|
669
669
|
return e.slice().sort((t, n) => {
|
|
670
|
-
let
|
|
671
|
-
if (
|
|
672
|
-
let
|
|
673
|
-
return
|
|
670
|
+
let s = o(t), i = o(n);
|
|
671
|
+
if (s === null || i === null) return 0;
|
|
672
|
+
let r = s.compareDocumentPosition(i);
|
|
673
|
+
return r & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : r & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function io() {
|
|
677
677
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ro() {
|
|
680
680
|
return /Android/gi.test(window.navigator.userAgent);
|
|
681
681
|
}
|
|
682
682
|
function Mt() {
|
|
683
|
-
return
|
|
683
|
+
return io() || ro();
|
|
684
684
|
}
|
|
685
685
|
function Pe(e, o, t) {
|
|
686
|
-
nt.isServer ||
|
|
686
|
+
nt.isServer || re((n) => {
|
|
687
687
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
function ao(e, o, t) {
|
|
691
|
-
nt.isServer ||
|
|
691
|
+
nt.isServer || re((n) => {
|
|
692
692
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
function uo(e, o, t =
|
|
696
|
-
function n(
|
|
697
|
-
if (!t.value ||
|
|
698
|
-
let
|
|
699
|
-
if (
|
|
700
|
-
let a = function u(
|
|
701
|
-
return typeof
|
|
695
|
+
function uo(e, o, t = w(() => !0)) {
|
|
696
|
+
function n(i, r) {
|
|
697
|
+
if (!t.value || i.defaultPrevented) return;
|
|
698
|
+
let l = r(i);
|
|
699
|
+
if (l === null || !l.getRootNode().contains(l)) return;
|
|
700
|
+
let a = function u(p) {
|
|
701
|
+
return typeof p == "function" ? u(p()) : Array.isArray(p) || p instanceof Set ? p : [p];
|
|
702
702
|
}(e);
|
|
703
703
|
for (let u of a) {
|
|
704
704
|
if (u === null) continue;
|
|
705
|
-
let
|
|
706
|
-
if (
|
|
705
|
+
let p = u instanceof HTMLElement ? u : V(u);
|
|
706
|
+
if (p != null && p.contains(l) || i.composed && i.composedPath().includes(p)) return;
|
|
707
707
|
}
|
|
708
|
-
return !oo(
|
|
709
|
-
}
|
|
710
|
-
let
|
|
711
|
-
Pe("pointerdown", (
|
|
712
|
-
var
|
|
713
|
-
t.value && (
|
|
714
|
-
}, !0), Pe("mousedown", (
|
|
715
|
-
var
|
|
716
|
-
t.value && (
|
|
717
|
-
}, !0), Pe("click", (
|
|
718
|
-
Mt() ||
|
|
719
|
-
}, !0), Pe("touchend", (
|
|
708
|
+
return !oo(l, Pt.Loose) && l.tabIndex !== -1 && i.preventDefault(), o(i, l);
|
|
709
|
+
}
|
|
710
|
+
let s = S(null);
|
|
711
|
+
Pe("pointerdown", (i) => {
|
|
712
|
+
var r, l;
|
|
713
|
+
t.value && (s.value = ((l = (r = i.composedPath) == null ? void 0 : r.call(i)) == null ? void 0 : l[0]) || i.target);
|
|
714
|
+
}, !0), Pe("mousedown", (i) => {
|
|
715
|
+
var r, l;
|
|
716
|
+
t.value && (s.value = ((l = (r = i.composedPath) == null ? void 0 : r.call(i)) == null ? void 0 : l[0]) || i.target);
|
|
717
|
+
}, !0), Pe("click", (i) => {
|
|
718
|
+
Mt() || s.value && (n(i, () => s.value), s.value = null);
|
|
719
|
+
}, !0), Pe("touchend", (i) => n(i, () => i.target instanceof HTMLElement ? i.target : null), !0), ao("blur", (i) => n(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
720
720
|
}
|
|
721
721
|
function ft(e, o) {
|
|
722
722
|
if (e) return e;
|
|
@@ -724,88 +724,88 @@ function ft(e, o) {
|
|
|
724
724
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
725
725
|
}
|
|
726
726
|
function co(e, o) {
|
|
727
|
-
let t =
|
|
728
|
-
return
|
|
727
|
+
let t = S(ft(e.value.type, e.value.as));
|
|
728
|
+
return xe(() => {
|
|
729
729
|
t.value = ft(e.value.type, e.value.as);
|
|
730
|
-
}),
|
|
730
|
+
}), re(() => {
|
|
731
731
|
var n;
|
|
732
|
-
t.value ||
|
|
732
|
+
t.value || V(o) && V(o) instanceof HTMLButtonElement && !((n = V(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
733
733
|
}), t;
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function pt(e) {
|
|
736
736
|
return [e.screenX, e.screenY];
|
|
737
737
|
}
|
|
738
738
|
function fo() {
|
|
739
|
-
let e =
|
|
739
|
+
let e = S([-1, -1]);
|
|
740
740
|
return { wasMoved(o) {
|
|
741
|
-
let t =
|
|
741
|
+
let t = pt(o);
|
|
742
742
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
743
743
|
}, update(o) {
|
|
744
|
-
e.value =
|
|
744
|
+
e.value = pt(o);
|
|
745
745
|
} };
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
|
|
749
|
-
let
|
|
750
|
-
if (!
|
|
751
|
-
let
|
|
752
|
-
if (!
|
|
753
|
-
let
|
|
754
|
-
for (;
|
|
747
|
+
function po({ container: e, accept: o, walk: t, enabled: n }) {
|
|
748
|
+
re(() => {
|
|
749
|
+
let s = e.value;
|
|
750
|
+
if (!s || n !== void 0 && !n.value) return;
|
|
751
|
+
let i = ot(e);
|
|
752
|
+
if (!i) return;
|
|
753
|
+
let r = Object.assign((a) => o(a), { acceptNode: o }), l = i.createTreeWalker(s, NodeFilter.SHOW_ELEMENT, r, !1);
|
|
754
|
+
for (; l.nextNode(); ) t(l.currentNode);
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
758
|
-
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...
|
|
759
|
-
var
|
|
760
|
-
let
|
|
761
|
-
if (e || o & 2 &&
|
|
757
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), vo = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(vo || {});
|
|
758
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...s }) {
|
|
759
|
+
var i;
|
|
760
|
+
let r = Rt(n, t), l = Object.assign(s, { props: r });
|
|
761
|
+
if (e || o & 2 && r.static) return Ge(l);
|
|
762
762
|
if (o & 1) {
|
|
763
|
-
let a = (
|
|
764
|
-
return
|
|
763
|
+
let a = (i = r.unmount) == null || i ? 0 : 1;
|
|
764
|
+
return se(a, { 0() {
|
|
765
765
|
return null;
|
|
766
766
|
}, 1() {
|
|
767
|
-
return Ge({ ...
|
|
767
|
+
return Ge({ ...s, props: { ...r, hidden: !0, style: { display: "none" } } });
|
|
768
768
|
} });
|
|
769
769
|
}
|
|
770
|
-
return Ge(
|
|
770
|
+
return Ge(l);
|
|
771
771
|
}
|
|
772
|
-
function Ge({ props: e, attrs: o, slots: t, slot: n, name:
|
|
773
|
-
var
|
|
774
|
-
let { as:
|
|
772
|
+
function Ge({ props: e, attrs: o, slots: t, slot: n, name: s }) {
|
|
773
|
+
var i, r;
|
|
774
|
+
let { as: l, ...a } = je(e, ["unmount", "static"]), u = (i = t.default) == null ? void 0 : i.call(t, n), p = {};
|
|
775
775
|
if (n) {
|
|
776
|
-
let
|
|
777
|
-
for (let [
|
|
778
|
-
|
|
776
|
+
let f = !1, v = [];
|
|
777
|
+
for (let [h, m] of Object.entries(n)) typeof m == "boolean" && (f = !0), m === !0 && v.push(h);
|
|
778
|
+
f && (p["data-headlessui-state"] = v.join(" "));
|
|
779
779
|
}
|
|
780
|
-
if (
|
|
780
|
+
if (l === "template") {
|
|
781
781
|
if (u = kt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
782
|
-
let [
|
|
783
|
-
if (!mo(
|
|
782
|
+
let [f, ...v] = u ?? [];
|
|
783
|
+
if (!mo(f) || v.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${s} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map(($) => $.trim()).filter(($, N, R) => R.indexOf($) === N).sort(($, N) => $.localeCompare(N)).map(($) => ` - ${$}`).join(`
|
|
784
784
|
`), "", "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(($) => ` - ${$}`).join(`
|
|
785
785
|
`)].join(`
|
|
786
786
|
`));
|
|
787
|
-
let
|
|
788
|
-
for (let $ in
|
|
789
|
-
return
|
|
787
|
+
let h = Rt((r = f.props) != null ? r : {}, a, p), m = Et(f, h, !0);
|
|
788
|
+
for (let $ in h) $.startsWith("on") && (m.props || (m.props = {}), m.props[$] = h[$]);
|
|
789
|
+
return m;
|
|
790
790
|
}
|
|
791
791
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
792
792
|
}
|
|
793
|
-
return Se(
|
|
793
|
+
return Se(l, Object.assign({}, a, p), { default: () => u });
|
|
794
794
|
}
|
|
795
795
|
function kt(e) {
|
|
796
|
-
return e.flatMap((o) => o.type ===
|
|
796
|
+
return e.flatMap((o) => o.type === Z ? kt(o.children) : [o]);
|
|
797
797
|
}
|
|
798
798
|
function Rt(...e) {
|
|
799
799
|
if (e.length === 0) return {};
|
|
800
800
|
if (e.length === 1) return e[0];
|
|
801
801
|
let o = {}, t = {};
|
|
802
|
-
for (let n of e) for (let
|
|
802
|
+
for (let n of e) for (let s in n) s.startsWith("on") && typeof n[s] == "function" ? (t[s] != null || (t[s] = []), t[s].push(n[s])) : o[s] = n[s];
|
|
803
803
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
804
|
-
for (let n in t) Object.assign(o, { [n](
|
|
805
|
-
let
|
|
806
|
-
for (let
|
|
807
|
-
if (
|
|
808
|
-
s
|
|
804
|
+
for (let n in t) Object.assign(o, { [n](s, ...i) {
|
|
805
|
+
let r = t[n];
|
|
806
|
+
for (let l of r) {
|
|
807
|
+
if (s instanceof Event && s.defaultPrevented) return;
|
|
808
|
+
l(s, ...i);
|
|
809
809
|
}
|
|
810
810
|
} });
|
|
811
811
|
return o;
|
|
@@ -827,18 +827,18 @@ var Nt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.
|
|
|
827
827
|
let go = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
828
828
|
return () => {
|
|
829
829
|
var n;
|
|
830
|
-
let { features:
|
|
831
|
-
return pe({ ourProps:
|
|
830
|
+
let { features: s, ...i } = e, r = { "aria-hidden": (s & 2) === 2 ? !0 : (n = i["aria-hidden"]) != null ? n : void 0, hidden: (s & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(s & 4) === 4 && (s & 2) !== 2 && { display: "none" } } };
|
|
831
|
+
return pe({ ourProps: r, theirProps: i, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
832
832
|
};
|
|
833
|
-
} }),
|
|
833
|
+
} }), At = Symbol("Context");
|
|
834
834
|
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
835
835
|
function bo() {
|
|
836
|
-
return Le(
|
|
836
|
+
return Le(At, null);
|
|
837
837
|
}
|
|
838
838
|
function Co(e) {
|
|
839
|
-
et(
|
|
839
|
+
et(At, e);
|
|
840
840
|
}
|
|
841
|
-
var
|
|
841
|
+
var W = ((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))(W || {}), Dt = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Dt || {});
|
|
842
842
|
function _o(e) {
|
|
843
843
|
function o() {
|
|
844
844
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
@@ -856,30 +856,30 @@ function xo(e) {
|
|
|
856
856
|
throw new Error("Unexpected object: " + e);
|
|
857
857
|
}
|
|
858
858
|
var z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(z || {});
|
|
859
|
-
function
|
|
859
|
+
function vt(e, o) {
|
|
860
860
|
let t = o.resolveItems();
|
|
861
861
|
if (t.length <= 0) return null;
|
|
862
|
-
let n = o.resolveActiveIndex(),
|
|
862
|
+
let n = o.resolveActiveIndex(), s = n ?? -1;
|
|
863
863
|
switch (e.focus) {
|
|
864
864
|
case 0: {
|
|
865
|
-
for (let
|
|
865
|
+
for (let i = 0; i < t.length; ++i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
866
866
|
return n;
|
|
867
867
|
}
|
|
868
868
|
case 1: {
|
|
869
|
-
|
|
870
|
-
for (let
|
|
869
|
+
s === -1 && (s = t.length);
|
|
870
|
+
for (let i = s - 1; i >= 0; --i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
871
871
|
return n;
|
|
872
872
|
}
|
|
873
873
|
case 2: {
|
|
874
|
-
for (let
|
|
874
|
+
for (let i = s + 1; i < t.length; ++i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
875
875
|
return n;
|
|
876
876
|
}
|
|
877
877
|
case 3: {
|
|
878
|
-
for (let
|
|
878
|
+
for (let i = t.length - 1; i >= 0; --i) if (!o.resolveDisabled(t[i], i, t)) return i;
|
|
879
879
|
return n;
|
|
880
880
|
}
|
|
881
881
|
case 4: {
|
|
882
|
-
for (let
|
|
882
|
+
for (let i = 0; i < t.length; ++i) if (o.resolveId(t[i], i, t) === e.id) return i;
|
|
883
883
|
return n;
|
|
884
884
|
}
|
|
885
885
|
case 5:
|
|
@@ -889,14 +889,14 @@ function pt(e, o) {
|
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
891
|
function Ft(e = {}, o = null, t = []) {
|
|
892
|
-
for (let [n,
|
|
892
|
+
for (let [n, s] of Object.entries(e)) Bt(t, jt(o, n), s);
|
|
893
893
|
return t;
|
|
894
894
|
}
|
|
895
895
|
function jt(e, o) {
|
|
896
896
|
return e ? e + "[" + o + "]" : o;
|
|
897
897
|
}
|
|
898
898
|
function Bt(e, o, t) {
|
|
899
|
-
if (Array.isArray(t)) for (let [n,
|
|
899
|
+
if (Array.isArray(t)) for (let [n, s] of t.entries()) Bt(e, jt(o, n.toString()), s);
|
|
900
900
|
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : Ft(t, o, e);
|
|
901
901
|
}
|
|
902
902
|
function yo(e, o) {
|
|
@@ -904,274 +904,274 @@ function yo(e, o) {
|
|
|
904
904
|
}
|
|
905
905
|
var wo = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(wo || {}), Eo = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Eo || {}), So = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(So || {});
|
|
906
906
|
let Ht = Symbol("ComboboxContext");
|
|
907
|
-
function
|
|
907
|
+
function ve(e) {
|
|
908
908
|
let o = Le(Ht, null);
|
|
909
909
|
if (o === null) {
|
|
910
910
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
911
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t,
|
|
911
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, ve), t;
|
|
912
912
|
}
|
|
913
913
|
return o;
|
|
914
914
|
}
|
|
915
915
|
let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
916
|
-
let t =
|
|
917
|
-
let
|
|
918
|
-
if (!
|
|
919
|
-
let a = window.getComputedStyle(
|
|
916
|
+
let t = ve("VirtualProvider"), n = w(() => {
|
|
917
|
+
let l = V(t.optionsRef);
|
|
918
|
+
if (!l) return { start: 0, end: 0 };
|
|
919
|
+
let a = window.getComputedStyle(l);
|
|
920
920
|
return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
|
|
921
|
-
}),
|
|
921
|
+
}), s = Un(w(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
922
922
|
return 40;
|
|
923
923
|
}, getScrollElement() {
|
|
924
|
-
return
|
|
925
|
-
}, overscan: 12 }))),
|
|
926
|
-
var
|
|
927
|
-
return (
|
|
928
|
-
}),
|
|
929
|
-
return
|
|
930
|
-
|
|
931
|
-
}), et(zt, t.virtual.value ?
|
|
932
|
-
if (
|
|
924
|
+
return V(t.optionsRef);
|
|
925
|
+
}, overscan: 12 }))), i = w(() => {
|
|
926
|
+
var l;
|
|
927
|
+
return (l = t.virtual.value) == null ? void 0 : l.options;
|
|
928
|
+
}), r = S(0);
|
|
929
|
+
return H([i], () => {
|
|
930
|
+
r.value += 1;
|
|
931
|
+
}), et(zt, t.virtual.value ? s : null), () => [Se("div", { style: { position: "relative", width: "100%", height: `${s.value.getTotalSize()}px` }, ref: (l) => {
|
|
932
|
+
if (l) {
|
|
933
933
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
934
|
-
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value &&
|
|
934
|
+
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && s.value.scrollToIndex(t.activeOptionIndex.value);
|
|
935
935
|
}
|
|
936
|
-
} },
|
|
936
|
+
} }, s.value.getVirtualItems().map((l) => Et(o.default({ option: t.virtual.value.options[l.index], open: t.comboboxState.value === 0 })[0], { key: `${r.value}-${l.index}`, "data-index": l.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": l.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${l.start}px)`, overflowAnchor: "none" } })))];
|
|
937
937
|
} }), $o = ae({ 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: o, attrs: t, emit: n }) {
|
|
938
|
-
let
|
|
939
|
-
function
|
|
940
|
-
let
|
|
941
|
-
return
|
|
942
|
-
}
|
|
943
|
-
let $ =
|
|
944
|
-
function
|
|
945
|
-
return
|
|
946
|
-
return I == null ? void 0 : I(
|
|
938
|
+
let s = S(1), i = S(null), r = S(null), l = S(null), a = S(null), u = S({ static: !1, hold: !1 }), p = S([]), f = S(null), v = S(2), h = S(!1);
|
|
939
|
+
function m(c = (d) => d) {
|
|
940
|
+
let d = f.value !== null ? p.value[f.value] : null, x = c(p.value.slice()), E = x.length > 0 && x[0].dataRef.order.value !== null ? x.sort((A, G) => A.dataRef.order.value - G.dataRef.order.value) : lo(x, (A) => V(A.dataRef.domRef)), P = d ? E.indexOf(d) : null;
|
|
941
|
+
return P === -1 && (P = null), { options: E, activeOptionIndex: P };
|
|
942
|
+
}
|
|
943
|
+
let $ = w(() => e.multiple ? 1 : 0), N = w(() => e.nullable), [R, I] = Zn(w(() => e.modelValue), (c) => n("update:modelValue", c), w(() => e.defaultValue)), k = w(() => R.value === void 0 ? se($.value, { 1: [], 0: void 0 }) : R.value), D = null, _ = null;
|
|
944
|
+
function T(c) {
|
|
945
|
+
return se($.value, { 0() {
|
|
946
|
+
return I == null ? void 0 : I(c);
|
|
947
947
|
}, 1: () => {
|
|
948
|
-
let
|
|
949
|
-
return
|
|
948
|
+
let d = K(b.value.value).slice(), x = K(c), E = d.findIndex((P) => b.compare(x, K(P)));
|
|
949
|
+
return E === -1 ? d.push(x) : d.splice(E, 1), I == null ? void 0 : I(d);
|
|
950
950
|
} });
|
|
951
951
|
}
|
|
952
|
-
let C =
|
|
952
|
+
let C = w(() => {
|
|
953
953
|
});
|
|
954
|
-
|
|
955
|
-
if (b.virtual.value &&
|
|
956
|
-
let x =
|
|
957
|
-
x !== -1 ?
|
|
954
|
+
H([C], ([c], [d]) => {
|
|
955
|
+
if (b.virtual.value && c && d && f.value !== null) {
|
|
956
|
+
let x = c.indexOf(d[f.value]);
|
|
957
|
+
x !== -1 ? f.value = x : f.value = null;
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
|
-
let b = { comboboxState:
|
|
960
|
+
let b = { comboboxState: s, value: k, mode: $, compare(c, d) {
|
|
961
961
|
if (typeof e.by == "string") {
|
|
962
962
|
let x = e.by;
|
|
963
|
-
return (
|
|
963
|
+
return (c == null ? void 0 : c[x]) === (d == null ? void 0 : d[x]);
|
|
964
964
|
}
|
|
965
|
-
return e.by === null ? yo(
|
|
966
|
-
}, calculateIndex(
|
|
967
|
-
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(
|
|
968
|
-
}, defaultValue:
|
|
969
|
-
I(
|
|
970
|
-
}, activeOptionIndex:
|
|
971
|
-
if (
|
|
965
|
+
return e.by === null ? yo(c, d) : e.by(c, d);
|
|
966
|
+
}, calculateIndex(c) {
|
|
967
|
+
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(c) : b.virtual.value.options.findIndex((d) => b.compare(d, c)) : p.value.findIndex((d) => b.compare(d.dataRef.value, c));
|
|
968
|
+
}, defaultValue: w(() => e.defaultValue), nullable: N, immediate: w(() => !1), virtual: w(() => null), inputRef: r, labelRef: i, buttonRef: l, optionsRef: a, disabled: w(() => e.disabled), options: p, change(c) {
|
|
969
|
+
I(c);
|
|
970
|
+
}, activeOptionIndex: w(() => {
|
|
971
|
+
if (h.value && f.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 : p.value.length > 0)) {
|
|
972
972
|
if (b.virtual.value) {
|
|
973
|
-
let
|
|
974
|
-
var
|
|
975
|
-
return !((
|
|
973
|
+
let d = b.virtual.value.options.findIndex((x) => {
|
|
974
|
+
var E;
|
|
975
|
+
return !((E = b.virtual.value) != null && E.disabled(x));
|
|
976
976
|
});
|
|
977
|
-
if (
|
|
977
|
+
if (d !== -1) return d;
|
|
978
978
|
}
|
|
979
|
-
let
|
|
980
|
-
if (
|
|
979
|
+
let c = p.value.findIndex((d) => !d.dataRef.disabled);
|
|
980
|
+
if (c !== -1) return c;
|
|
981
981
|
}
|
|
982
|
-
return
|
|
983
|
-
}), activationTrigger:
|
|
984
|
-
|
|
982
|
+
return f.value;
|
|
983
|
+
}), activationTrigger: v, optionsPropsRef: u, closeCombobox() {
|
|
984
|
+
h.value = !1, !e.disabled && s.value !== 1 && (s.value = 1, f.value = null);
|
|
985
985
|
}, openCombobox() {
|
|
986
|
-
if (
|
|
986
|
+
if (h.value = !0, !e.disabled && s.value !== 0) {
|
|
987
987
|
if (b.value.value) {
|
|
988
|
-
let
|
|
989
|
-
|
|
988
|
+
let c = b.calculateIndex(b.value.value);
|
|
989
|
+
c !== -1 && (f.value = c);
|
|
990
990
|
}
|
|
991
|
-
|
|
991
|
+
s.value = 0;
|
|
992
992
|
}
|
|
993
|
-
}, setActivationTrigger(
|
|
994
|
-
|
|
995
|
-
}, goToOption(
|
|
996
|
-
|
|
997
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
993
|
+
}, setActivationTrigger(c) {
|
|
994
|
+
v.value = c;
|
|
995
|
+
}, goToOption(c, d, x) {
|
|
996
|
+
h.value = !1, D !== null && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
997
|
+
if (e.disabled || a.value && !u.value.static && s.value === 1) return;
|
|
998
998
|
if (b.virtual.value) {
|
|
999
|
-
|
|
1000
|
-
var
|
|
1001
|
-
return (G = (
|
|
1002
|
-
var
|
|
1003
|
-
return !((
|
|
999
|
+
f.value = c === z.Specific ? d : vt({ focus: c }, { resolveItems: () => b.virtual.value.options, resolveActiveIndex: () => {
|
|
1000
|
+
var A, G;
|
|
1001
|
+
return (G = (A = b.activeOptionIndex.value) != null ? A : b.virtual.value.options.findIndex((q) => {
|
|
1002
|
+
var F;
|
|
1003
|
+
return !((F = b.virtual.value) != null && F.disabled(q));
|
|
1004
1004
|
})) != null ? G : null;
|
|
1005
|
-
}, resolveDisabled: (
|
|
1005
|
+
}, resolveDisabled: (A) => b.virtual.value.disabled(A), resolveId() {
|
|
1006
1006
|
throw new Error("Function not implemented.");
|
|
1007
|
-
} }),
|
|
1007
|
+
} }), v.value = x ?? 2;
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
|
-
let
|
|
1011
|
-
if (
|
|
1012
|
-
let
|
|
1013
|
-
|
|
1010
|
+
let E = m();
|
|
1011
|
+
if (E.activeOptionIndex === null) {
|
|
1012
|
+
let A = E.options.findIndex((G) => !G.dataRef.disabled);
|
|
1013
|
+
A !== -1 && (E.activeOptionIndex = A);
|
|
1014
1014
|
}
|
|
1015
|
-
let
|
|
1016
|
-
|
|
1015
|
+
let P = c === z.Specific ? d : vt({ focus: c }, { resolveItems: () => E.options, resolveActiveIndex: () => E.activeOptionIndex, resolveId: (A) => A.id, resolveDisabled: (A) => A.dataRef.disabled });
|
|
1016
|
+
f.value = P, v.value = x ?? 2, p.value = E.options;
|
|
1017
1017
|
});
|
|
1018
|
-
}, selectOption(
|
|
1019
|
-
let
|
|
1020
|
-
if (!
|
|
1021
|
-
let { dataRef: x } =
|
|
1022
|
-
|
|
1018
|
+
}, selectOption(c) {
|
|
1019
|
+
let d = p.value.find((E) => E.id === c);
|
|
1020
|
+
if (!d) return;
|
|
1021
|
+
let { dataRef: x } = d;
|
|
1022
|
+
T(x.value);
|
|
1023
1023
|
}, selectActiveOption() {
|
|
1024
1024
|
if (b.activeOptionIndex.value !== null) {
|
|
1025
|
-
if (b.virtual.value)
|
|
1025
|
+
if (b.virtual.value) T(b.virtual.value.options[b.activeOptionIndex.value]);
|
|
1026
1026
|
else {
|
|
1027
|
-
let { dataRef:
|
|
1028
|
-
|
|
1027
|
+
let { dataRef: c } = p.value[b.activeOptionIndex.value];
|
|
1028
|
+
T(c.value);
|
|
1029
1029
|
}
|
|
1030
1030
|
b.goToOption(z.Specific, b.activeOptionIndex.value);
|
|
1031
1031
|
}
|
|
1032
|
-
}, registerOption(
|
|
1033
|
-
let x = St({ id:
|
|
1032
|
+
}, registerOption(c, d) {
|
|
1033
|
+
let x = St({ id: c, dataRef: d });
|
|
1034
1034
|
if (b.virtual.value) {
|
|
1035
|
-
|
|
1035
|
+
p.value.push(x);
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
1038
|
_ && cancelAnimationFrame(_);
|
|
1039
|
-
let
|
|
1040
|
-
|
|
1041
|
-
let
|
|
1042
|
-
|
|
1039
|
+
let E = m((P) => (P.push(x), P));
|
|
1040
|
+
f.value === null && b.isSelected(d.value.value) && (E.activeOptionIndex = E.options.indexOf(x)), p.value = E.options, f.value = E.activeOptionIndex, v.value = 2, E.options.some((P) => !V(P.dataRef.domRef)) && (_ = requestAnimationFrame(() => {
|
|
1041
|
+
let P = m();
|
|
1042
|
+
p.value = P.options, f.value = P.activeOptionIndex;
|
|
1043
1043
|
}));
|
|
1044
|
-
}, unregisterOption(
|
|
1045
|
-
if (
|
|
1046
|
-
|
|
1044
|
+
}, unregisterOption(c, d) {
|
|
1045
|
+
if (D !== null && cancelAnimationFrame(D), d && (h.value = !0), b.virtual.value) {
|
|
1046
|
+
p.value = p.value.filter((E) => E.id !== c);
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
let x =
|
|
1050
|
-
let
|
|
1051
|
-
return
|
|
1049
|
+
let x = m((E) => {
|
|
1050
|
+
let P = E.findIndex((A) => A.id === c);
|
|
1051
|
+
return P !== -1 && E.splice(P, 1), E;
|
|
1052
1052
|
});
|
|
1053
|
-
|
|
1054
|
-
}, isSelected(
|
|
1055
|
-
return
|
|
1056
|
-
}, isActive(
|
|
1057
|
-
return
|
|
1053
|
+
p.value = x.options, f.value = x.activeOptionIndex, v.value = 2;
|
|
1054
|
+
}, isSelected(c) {
|
|
1055
|
+
return se($.value, { 0: () => b.compare(K(b.value.value), K(c)), 1: () => K(b.value.value).some((d) => b.compare(K(d), K(c))) });
|
|
1056
|
+
}, isActive(c) {
|
|
1057
|
+
return f.value === b.calculateIndex(c);
|
|
1058
1058
|
} };
|
|
1059
|
-
uo([
|
|
1060
|
-
let
|
|
1061
|
-
var
|
|
1062
|
-
return (
|
|
1059
|
+
uo([r, l, a], () => b.closeCombobox(), w(() => s.value === 0)), et(Ht, b), Co(w(() => se(s.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1060
|
+
let L = w(() => {
|
|
1061
|
+
var c;
|
|
1062
|
+
return (c = V(r)) == null ? void 0 : c.closest("form");
|
|
1063
1063
|
});
|
|
1064
|
-
return
|
|
1065
|
-
|
|
1066
|
-
if (!
|
|
1067
|
-
function
|
|
1064
|
+
return xe(() => {
|
|
1065
|
+
H([L], () => {
|
|
1066
|
+
if (!L.value || e.defaultValue === void 0) return;
|
|
1067
|
+
function c() {
|
|
1068
1068
|
b.change(e.defaultValue);
|
|
1069
1069
|
}
|
|
1070
|
-
return
|
|
1071
|
-
var
|
|
1072
|
-
(
|
|
1070
|
+
return L.value.addEventListener("reset", c), () => {
|
|
1071
|
+
var d;
|
|
1072
|
+
(d = L.value) == null || d.removeEventListener("reset", c);
|
|
1073
1073
|
};
|
|
1074
1074
|
}, { immediate: !0 });
|
|
1075
1075
|
}), () => {
|
|
1076
|
-
var
|
|
1077
|
-
let { name:
|
|
1078
|
-
return Se(
|
|
1076
|
+
var c, d, x;
|
|
1077
|
+
let { name: E, disabled: P, form: A, ...G } = e, q = { open: s.value === 0, disabled: P, activeIndex: b.activeOptionIndex.value, activeOption: b.activeOptionIndex.value === null ? null : b.virtual.value ? b.virtual.value.options[(c = b.activeOptionIndex.value) != null ? c : 0] : (x = (d = b.options.value[b.activeOptionIndex.value]) == null ? void 0 : d.dataRef.value) != null ? x : null, value: k.value };
|
|
1078
|
+
return Se(Z, [...E != null && k.value != null ? Ft({ [E]: k.value }).map(([F, un]) => Se(go, ho({ features: Nt.Hidden, key: F, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: A, disabled: P, name: F, value: un }))) : [], pe({ theirProps: { ...t, ...je(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1079
1079
|
};
|
|
1080
1080
|
} });
|
|
1081
1081
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1082
1082
|
var n;
|
|
1083
|
-
let
|
|
1084
|
-
function
|
|
1085
|
-
var
|
|
1086
|
-
(
|
|
1083
|
+
let s = (n = e.id) != null ? n : `headlessui-combobox-label-${Te()}`, i = ve("ComboboxLabel");
|
|
1084
|
+
function r() {
|
|
1085
|
+
var l;
|
|
1086
|
+
(l = V(i.inputRef)) == null || l.focus({ preventScroll: !0 });
|
|
1087
1087
|
}
|
|
1088
1088
|
return () => {
|
|
1089
|
-
let
|
|
1090
|
-
return pe({ ourProps: u, theirProps: a, slot:
|
|
1089
|
+
let l = { open: i.comboboxState.value === 0, disabled: i.disabled.value }, { ...a } = e, u = { id: s, ref: i.labelRef, onClick: r };
|
|
1090
|
+
return pe({ ourProps: u, theirProps: a, slot: l, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1091
1091
|
};
|
|
1092
1092
|
} });
|
|
1093
1093
|
let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1094
|
-
var
|
|
1095
|
-
let
|
|
1096
|
-
n({ el:
|
|
1097
|
-
function
|
|
1098
|
-
|
|
1099
|
-
var
|
|
1100
|
-
return (
|
|
1094
|
+
var s;
|
|
1095
|
+
let i = (s = e.id) != null ? s : `headlessui-combobox-button-${Te()}`, r = ve("ComboboxButton");
|
|
1096
|
+
n({ el: r.buttonRef, $el: r.buttonRef });
|
|
1097
|
+
function l(p) {
|
|
1098
|
+
r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (p.preventDefault(), r.openCombobox()), Q(() => {
|
|
1099
|
+
var f;
|
|
1100
|
+
return (f = V(r.inputRef)) == null ? void 0 : f.focus({ preventScroll: !0 });
|
|
1101
1101
|
}));
|
|
1102
1102
|
}
|
|
1103
|
-
function a(
|
|
1104
|
-
switch (
|
|
1105
|
-
case
|
|
1106
|
-
|
|
1107
|
-
var
|
|
1108
|
-
return (
|
|
1103
|
+
function a(p) {
|
|
1104
|
+
switch (p.key) {
|
|
1105
|
+
case W.ArrowDown:
|
|
1106
|
+
p.preventDefault(), p.stopPropagation(), r.comboboxState.value === 1 && r.openCombobox(), Q(() => {
|
|
1107
|
+
var f;
|
|
1108
|
+
return (f = r.inputRef.value) == null ? void 0 : f.focus({ preventScroll: !0 });
|
|
1109
1109
|
});
|
|
1110
1110
|
return;
|
|
1111
|
-
case
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
})),
|
|
1115
|
-
var
|
|
1116
|
-
return (
|
|
1111
|
+
case W.ArrowUp:
|
|
1112
|
+
p.preventDefault(), p.stopPropagation(), r.comboboxState.value === 1 && (r.openCombobox(), Q(() => {
|
|
1113
|
+
r.value.value || r.goToOption(z.Last);
|
|
1114
|
+
})), Q(() => {
|
|
1115
|
+
var f;
|
|
1116
|
+
return (f = r.inputRef.value) == null ? void 0 : f.focus({ preventScroll: !0 });
|
|
1117
1117
|
});
|
|
1118
1118
|
return;
|
|
1119
|
-
case
|
|
1120
|
-
if (
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1123
|
-
return (
|
|
1119
|
+
case W.Escape:
|
|
1120
|
+
if (r.comboboxState.value !== 0) return;
|
|
1121
|
+
p.preventDefault(), r.optionsRef.value && !r.optionsPropsRef.value.static && p.stopPropagation(), r.closeCombobox(), Q(() => {
|
|
1122
|
+
var f;
|
|
1123
|
+
return (f = r.inputRef.value) == null ? void 0 : f.focus({ preventScroll: !0 });
|
|
1124
1124
|
});
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
let u = co(
|
|
1128
|
+
let u = co(w(() => ({ as: e.as, type: o.type })), r.buttonRef);
|
|
1129
1129
|
return () => {
|
|
1130
|
-
var
|
|
1131
|
-
let
|
|
1132
|
-
return pe({ ourProps:
|
|
1130
|
+
var p, f;
|
|
1131
|
+
let v = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...h } = e, m = { ref: r.buttonRef, id: i, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (p = V(r.optionsRef)) == null ? void 0 : p.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(f = V(r.labelRef)) == null ? void 0 : f.id, i].join(" ") : void 0, disabled: r.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: l };
|
|
1132
|
+
return pe({ ourProps: m, theirProps: h, slot: v, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1133
1133
|
};
|
|
1134
|
-
} }), Lo = ae({ 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: o, attrs: t, slots: n, expose:
|
|
1135
|
-
var
|
|
1136
|
-
let
|
|
1137
|
-
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
let _ =
|
|
1141
|
-
_ && (_.scrollTop = 0),
|
|
1142
|
-
}
|
|
1143
|
-
let
|
|
1134
|
+
} }), Lo = ae({ 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: o, attrs: t, slots: n, expose: s }) {
|
|
1135
|
+
var i;
|
|
1136
|
+
let r = (i = e.id) != null ? i : `headlessui-combobox-input-${Te()}`, l = ve("ComboboxInput"), a = w(() => ot(V(l.inputRef))), u = { value: !1 };
|
|
1137
|
+
s({ el: l.inputRef, $el: l.inputRef });
|
|
1138
|
+
function p() {
|
|
1139
|
+
l.change(null);
|
|
1140
|
+
let _ = V(l.optionsRef);
|
|
1141
|
+
_ && (_.scrollTop = 0), l.goToOption(z.Nothing);
|
|
1142
|
+
}
|
|
1143
|
+
let f = w(() => {
|
|
1144
1144
|
var _;
|
|
1145
|
-
let
|
|
1146
|
-
return
|
|
1145
|
+
let T = l.value.value;
|
|
1146
|
+
return V(l.inputRef) ? typeof e.displayValue < "u" && T !== void 0 ? (_ = e.displayValue(T)) != null ? _ : "" : typeof T == "string" ? T : "" : "";
|
|
1147
1147
|
});
|
|
1148
|
-
|
|
1149
|
-
|
|
1148
|
+
xe(() => {
|
|
1149
|
+
H([f, l.comboboxState, a], ([_, T], [C, b]) => {
|
|
1150
1150
|
if (u.value) return;
|
|
1151
|
-
let
|
|
1152
|
-
|
|
1153
|
-
var
|
|
1154
|
-
if (u.value || !
|
|
1155
|
-
let { selectionStart:
|
|
1156
|
-
Math.abs((x ?? 0) - (
|
|
1151
|
+
let L = V(l.inputRef);
|
|
1152
|
+
L && ((b === 0 && T === 1 || _ !== C) && (L.value = _), requestAnimationFrame(() => {
|
|
1153
|
+
var c;
|
|
1154
|
+
if (u.value || !L || ((c = a.value) == null ? void 0 : c.activeElement) !== L) return;
|
|
1155
|
+
let { selectionStart: d, selectionEnd: x } = L;
|
|
1156
|
+
Math.abs((x ?? 0) - (d ?? 0)) === 0 && d === 0 && L.setSelectionRange(L.value.length, L.value.length);
|
|
1157
1157
|
}));
|
|
1158
|
-
}, { immediate: !0 }),
|
|
1159
|
-
if (_ === 0 &&
|
|
1158
|
+
}, { immediate: !0 }), H([l.comboboxState], ([_], [T]) => {
|
|
1159
|
+
if (_ === 0 && T === 1) {
|
|
1160
1160
|
if (u.value) return;
|
|
1161
|
-
let C =
|
|
1161
|
+
let C = V(l.inputRef);
|
|
1162
1162
|
if (!C) return;
|
|
1163
|
-
let b = C.value, { selectionStart:
|
|
1164
|
-
C.value = "", C.value = b,
|
|
1163
|
+
let b = C.value, { selectionStart: L, selectionEnd: c, selectionDirection: d } = C;
|
|
1164
|
+
C.value = "", C.value = b, d !== null ? C.setSelectionRange(L, c, d) : C.setSelectionRange(L, c);
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
1167
|
});
|
|
1168
|
-
let
|
|
1169
|
-
function m() {
|
|
1170
|
-
p.value = !0;
|
|
1171
|
-
}
|
|
1168
|
+
let v = S(!1);
|
|
1172
1169
|
function h() {
|
|
1173
|
-
|
|
1174
|
-
|
|
1170
|
+
v.value = !0;
|
|
1171
|
+
}
|
|
1172
|
+
function m() {
|
|
1173
|
+
Ae().nextFrame(() => {
|
|
1174
|
+
v.value = !1;
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
1177
|
let $ = qn();
|
|
@@ -1179,75 +1179,75 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1179
1179
|
switch (u.value = !0, $(() => {
|
|
1180
1180
|
u.value = !1;
|
|
1181
1181
|
}), _.key) {
|
|
1182
|
-
case
|
|
1183
|
-
if (u.value = !1,
|
|
1184
|
-
if (_.preventDefault(), _.stopPropagation(),
|
|
1185
|
-
|
|
1182
|
+
case W.Enter:
|
|
1183
|
+
if (u.value = !1, l.comboboxState.value !== 0 || v.value) return;
|
|
1184
|
+
if (_.preventDefault(), _.stopPropagation(), l.activeOptionIndex.value === null) {
|
|
1185
|
+
l.closeCombobox();
|
|
1186
1186
|
return;
|
|
1187
1187
|
}
|
|
1188
|
-
|
|
1188
|
+
l.selectActiveOption(), l.mode.value === 0 && l.closeCombobox();
|
|
1189
1189
|
break;
|
|
1190
|
-
case
|
|
1191
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1192
|
-
case
|
|
1193
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1194
|
-
|
|
1195
|
-
|
|
1190
|
+
case W.ArrowDown:
|
|
1191
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), se(l.comboboxState.value, { 0: () => l.goToOption(z.Next), 1: () => l.openCombobox() });
|
|
1192
|
+
case W.ArrowUp:
|
|
1193
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), se(l.comboboxState.value, { 0: () => l.goToOption(z.Previous), 1: () => {
|
|
1194
|
+
l.openCombobox(), Q(() => {
|
|
1195
|
+
l.value.value || l.goToOption(z.Last);
|
|
1196
1196
|
});
|
|
1197
1197
|
} });
|
|
1198
|
-
case
|
|
1198
|
+
case W.Home:
|
|
1199
1199
|
if (_.shiftKey) break;
|
|
1200
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1201
|
-
case
|
|
1202
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1203
|
-
case
|
|
1200
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), l.goToOption(z.First);
|
|
1201
|
+
case W.PageUp:
|
|
1202
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), l.goToOption(z.First);
|
|
1203
|
+
case W.End:
|
|
1204
1204
|
if (_.shiftKey) break;
|
|
1205
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1206
|
-
case
|
|
1207
|
-
return u.value = !1, _.preventDefault(), _.stopPropagation(),
|
|
1208
|
-
case
|
|
1209
|
-
if (u.value = !1,
|
|
1210
|
-
_.preventDefault(),
|
|
1205
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), l.goToOption(z.Last);
|
|
1206
|
+
case W.PageDown:
|
|
1207
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), l.goToOption(z.Last);
|
|
1208
|
+
case W.Escape:
|
|
1209
|
+
if (u.value = !1, l.comboboxState.value !== 0) return;
|
|
1210
|
+
_.preventDefault(), l.optionsRef.value && !l.optionsPropsRef.value.static && _.stopPropagation(), l.nullable.value && l.mode.value === 0 && l.value.value === null && p(), l.closeCombobox();
|
|
1211
1211
|
break;
|
|
1212
|
-
case
|
|
1213
|
-
if (u.value = !1,
|
|
1214
|
-
|
|
1212
|
+
case W.Tab:
|
|
1213
|
+
if (u.value = !1, l.comboboxState.value !== 0) return;
|
|
1214
|
+
l.mode.value === 0 && l.activationTrigger.value !== 1 && l.selectActiveOption(), l.closeCombobox();
|
|
1215
1215
|
break;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1219
|
-
o("change", _),
|
|
1218
|
+
function R(_) {
|
|
1219
|
+
o("change", _), l.nullable.value && l.mode.value === 0 && _.target.value === "" && p(), l.openCombobox();
|
|
1220
1220
|
}
|
|
1221
1221
|
function I(_) {
|
|
1222
|
-
var
|
|
1223
|
-
let
|
|
1224
|
-
if (u.value = !1, !((C =
|
|
1225
|
-
}
|
|
1226
|
-
function
|
|
1227
|
-
var
|
|
1228
|
-
let
|
|
1229
|
-
(C =
|
|
1230
|
-
|
|
1222
|
+
var T, C, b;
|
|
1223
|
+
let L = (T = _.relatedTarget) != null ? T : ce.find((c) => c !== _.currentTarget);
|
|
1224
|
+
if (u.value = !1, !((C = V(l.optionsRef)) != null && C.contains(L)) && !((b = V(l.buttonRef)) != null && b.contains(L)) && l.comboboxState.value === 0) return _.preventDefault(), l.mode.value === 0 && (l.nullable.value && l.value.value === null ? p() : l.activationTrigger.value !== 1 && l.selectActiveOption()), l.closeCombobox();
|
|
1225
|
+
}
|
|
1226
|
+
function k(_) {
|
|
1227
|
+
var T, C, b;
|
|
1228
|
+
let L = (T = _.relatedTarget) != null ? T : ce.find((c) => c !== _.currentTarget);
|
|
1229
|
+
(C = V(l.buttonRef)) != null && C.contains(L) || (b = V(l.optionsRef)) != null && b.contains(L) || l.disabled.value || l.immediate.value && l.comboboxState.value !== 0 && (l.openCombobox(), Ae().nextFrame(() => {
|
|
1230
|
+
l.setActivationTrigger(1);
|
|
1231
1231
|
}));
|
|
1232
1232
|
}
|
|
1233
|
-
let
|
|
1234
|
-
var _,
|
|
1235
|
-
return (b = (C = (
|
|
1233
|
+
let D = w(() => {
|
|
1234
|
+
var _, T, C, b;
|
|
1235
|
+
return (b = (C = (T = e.defaultValue) != null ? T : l.defaultValue.value !== void 0 ? (_ = e.displayValue) == null ? void 0 : _.call(e, l.defaultValue.value) : null) != null ? C : l.defaultValue.value) != null ? b : "";
|
|
1236
1236
|
});
|
|
1237
1237
|
return () => {
|
|
1238
|
-
var _,
|
|
1239
|
-
let x = { open:
|
|
1240
|
-
return pe({ ourProps: G, theirProps:
|
|
1238
|
+
var _, T, C, b, L, c, d;
|
|
1239
|
+
let x = { open: l.comboboxState.value === 0 }, { displayValue: E, onChange: P, ...A } = e, G = { "aria-controls": (_ = l.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": l.comboboxState.value === 0, "aria-activedescendant": l.activeOptionIndex.value === null ? void 0 : l.virtual.value ? (T = l.options.value.find((q) => !l.virtual.value.disabled(q.dataRef.value) && l.compare(q.dataRef.value, l.virtual.value.options[l.activeOptionIndex.value]))) == null ? void 0 : T.id : (C = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (c = (b = V(l.labelRef)) == null ? void 0 : b.id) != null ? c : (L = V(l.buttonRef)) == null ? void 0 : L.id, "aria-autocomplete": "list", id: r, onCompositionstart: h, onCompositionend: m, onKeydown: N, onInput: R, onFocus: k, onBlur: I, role: "combobox", type: (d = t.type) != null ? d : "text", tabIndex: 0, ref: l.inputRef, defaultValue: D.value, disabled: l.disabled.value === !0 ? !0 : void 0 };
|
|
1240
|
+
return pe({ ourProps: G, theirProps: A, slot: x, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1241
1241
|
};
|
|
1242
1242
|
} }), To = ae({ 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: o, slots: t, expose: n }) {
|
|
1243
|
-
let
|
|
1244
|
-
n({ el:
|
|
1245
|
-
|
|
1246
|
-
}),
|
|
1247
|
-
|
|
1243
|
+
let s = ve("ComboboxOptions"), i = `headlessui-combobox-options-${Te()}`;
|
|
1244
|
+
n({ el: s.optionsRef, $el: s.optionsRef }), re(() => {
|
|
1245
|
+
s.optionsPropsRef.value.static = e.static;
|
|
1246
|
+
}), re(() => {
|
|
1247
|
+
s.optionsPropsRef.value.hold = e.hold;
|
|
1248
1248
|
});
|
|
1249
|
-
let
|
|
1250
|
-
|
|
1249
|
+
let r = bo(), l = w(() => r !== null ? (r.value & $e.Open) === $e.Open : s.comboboxState.value === 0);
|
|
1250
|
+
po({ container: w(() => V(s.optionsRef)), enabled: w(() => s.comboboxState.value === 0), accept(u) {
|
|
1251
1251
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1252
1252
|
}, walk(u) {
|
|
1253
1253
|
u.setAttribute("role", "none");
|
|
@@ -1256,59 +1256,59 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1256
1256
|
u.preventDefault();
|
|
1257
1257
|
}
|
|
1258
1258
|
return () => {
|
|
1259
|
-
var u,
|
|
1260
|
-
let
|
|
1261
|
-
return pe({ ourProps:
|
|
1259
|
+
var u, p, f;
|
|
1260
|
+
let v = { open: s.comboboxState.value === 0 }, h = { "aria-labelledby": (f = (u = V(s.labelRef)) == null ? void 0 : u.id) != null ? f : (p = V(s.buttonRef)) == null ? void 0 : p.id, id: i, ref: s.optionsRef, role: "listbox", "aria-multiselectable": s.mode.value === 1 ? !0 : void 0, onMousedown: a }, m = je(e, ["hold"]);
|
|
1261
|
+
return pe({ ourProps: h, theirProps: m, slot: v, attrs: o, slots: s.virtual.value && s.comboboxState.value === 0 ? { ...t, default: () => [Se(Oo, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: l.value, name: "ComboboxOptions" });
|
|
1262
1262
|
};
|
|
1263
1263
|
} }), Vo = ae({ 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: o, attrs: t, expose: n }) {
|
|
1264
|
-
let
|
|
1265
|
-
n({ el:
|
|
1266
|
-
let a =
|
|
1264
|
+
let s = ve("ComboboxOption"), i = `headlessui-combobox-option-${Te()}`, r = S(null), l = w(() => e.disabled);
|
|
1265
|
+
n({ el: r, $el: r });
|
|
1266
|
+
let a = w(() => {
|
|
1267
1267
|
var I;
|
|
1268
|
-
return
|
|
1269
|
-
}), u =
|
|
1270
|
-
|
|
1271
|
-
let I =
|
|
1272
|
-
I && (
|
|
1273
|
-
}),
|
|
1274
|
-
|
|
1275
|
-
var I,
|
|
1276
|
-
return (
|
|
1268
|
+
return s.virtual.value ? s.activeOptionIndex.value === s.calculateIndex(e.value) : s.activeOptionIndex.value === null ? !1 : ((I = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : I.id) === i;
|
|
1269
|
+
}), u = w(() => s.isSelected(e.value)), p = Le(zt, null), f = w(() => ({ disabled: e.disabled, value: e.value, domRef: r, order: w(() => e.order) }));
|
|
1270
|
+
xe(() => s.registerOption(i, f)), wt(() => s.unregisterOption(i, a.value)), re(() => {
|
|
1271
|
+
let I = V(r);
|
|
1272
|
+
I && (p == null || p.value.measureElement(I));
|
|
1273
|
+
}), re(() => {
|
|
1274
|
+
s.comboboxState.value === 0 && a.value && (s.virtual.value || s.activationTrigger.value !== 0 && Q(() => {
|
|
1275
|
+
var I, k;
|
|
1276
|
+
return (k = (I = V(r)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : k.call(I, { block: "nearest" });
|
|
1277
1277
|
}));
|
|
1278
1278
|
});
|
|
1279
|
-
function
|
|
1280
|
-
I.preventDefault(), I.button ===
|
|
1281
|
-
var
|
|
1282
|
-
return (
|
|
1283
|
-
}),
|
|
1279
|
+
function v(I) {
|
|
1280
|
+
I.preventDefault(), I.button === Dt.Left && (l.value || (s.selectOption(i), Mt() || requestAnimationFrame(() => {
|
|
1281
|
+
var k;
|
|
1282
|
+
return (k = V(s.inputRef)) == null ? void 0 : k.focus({ preventScroll: !0 });
|
|
1283
|
+
}), s.mode.value === 0 && s.closeCombobox()));
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function h() {
|
|
1286
1286
|
var I;
|
|
1287
|
-
if (e.disabled || (I =
|
|
1288
|
-
let
|
|
1289
|
-
|
|
1287
|
+
if (e.disabled || (I = s.virtual.value) != null && I.disabled(e.value)) return s.goToOption(z.Nothing);
|
|
1288
|
+
let k = s.calculateIndex(e.value);
|
|
1289
|
+
s.goToOption(z.Specific, k);
|
|
1290
1290
|
}
|
|
1291
|
-
let
|
|
1291
|
+
let m = fo();
|
|
1292
1292
|
function $(I) {
|
|
1293
|
-
|
|
1293
|
+
m.update(I);
|
|
1294
1294
|
}
|
|
1295
1295
|
function N(I) {
|
|
1296
|
-
var
|
|
1297
|
-
if (!
|
|
1298
|
-
let
|
|
1299
|
-
|
|
1296
|
+
var k;
|
|
1297
|
+
if (!m.wasMoved(I) || e.disabled || (k = s.virtual.value) != null && k.disabled(e.value) || a.value) return;
|
|
1298
|
+
let D = s.calculateIndex(e.value);
|
|
1299
|
+
s.goToOption(z.Specific, D, 0);
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1301
|
+
function R(I) {
|
|
1302
|
+
var k;
|
|
1303
|
+
m.wasMoved(I) && (e.disabled || (k = s.virtual.value) != null && k.disabled(e.value) || a.value && (s.optionsPropsRef.value.hold || s.goToOption(z.Nothing)));
|
|
1304
1304
|
}
|
|
1305
1305
|
return () => {
|
|
1306
|
-
let { disabled: I } = e,
|
|
1307
|
-
return pe({ ourProps:
|
|
1306
|
+
let { disabled: I } = e, k = { active: a.value, selected: u.value, disabled: I }, D = { id: i, 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: v, onFocus: h, onPointerenter: $, onMouseenter: $, onPointermove: N, onMousemove: N, onPointerleave: R, onMouseleave: R }, _ = je(e, ["order", "value"]);
|
|
1307
|
+
return pe({ ourProps: D, theirProps: _, slot: k, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1308
1308
|
};
|
|
1309
1309
|
} });
|
|
1310
1310
|
function Po(e, o) {
|
|
1311
|
-
return
|
|
1311
|
+
return y(), O("svg", {
|
|
1312
1312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1313
1313
|
viewBox: "0 0 20 20",
|
|
1314
1314
|
fill: "currentColor",
|
|
@@ -1323,7 +1323,7 @@ function Po(e, o) {
|
|
|
1323
1323
|
]);
|
|
1324
1324
|
}
|
|
1325
1325
|
function Mo(e, o) {
|
|
1326
|
-
return
|
|
1326
|
+
return y(), O("svg", {
|
|
1327
1327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1328
1328
|
viewBox: "0 0 20 20",
|
|
1329
1329
|
fill: "currentColor",
|
|
@@ -1338,7 +1338,7 @@ function Mo(e, o) {
|
|
|
1338
1338
|
]);
|
|
1339
1339
|
}
|
|
1340
1340
|
function ko(e, o) {
|
|
1341
|
-
return
|
|
1341
|
+
return y(), O("svg", {
|
|
1342
1342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1343
|
viewBox: "0 0 20 20",
|
|
1344
1344
|
fill: "currentColor",
|
|
@@ -1365,54 +1365,54 @@ const ht = {
|
|
|
1365
1365
|
}),
|
|
1366
1366
|
emits: ["update:modelValue"],
|
|
1367
1367
|
setup(e) {
|
|
1368
|
-
const o = e, t = fn(e, "modelValue"), n =
|
|
1369
|
-
([,
|
|
1370
|
-
)),
|
|
1371
|
-
|
|
1368
|
+
const o = e, t = fn(e, "modelValue"), n = S(""), s = S(null), i = w(() => Object.entries(o.languages).filter(
|
|
1369
|
+
([, l]) => l.toLowerCase().includes(n.value.toLowerCase())
|
|
1370
|
+
)), r = (l) => {
|
|
1371
|
+
l.target.value = "", n.value = "", s.value && s.value.$el.click();
|
|
1372
1372
|
};
|
|
1373
|
-
return (
|
|
1373
|
+
return (l, a) => (y(), ee(M($o), {
|
|
1374
1374
|
modelValue: t.value,
|
|
1375
1375
|
"onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
|
|
1376
1376
|
as: "div",
|
|
1377
1377
|
class: "relative mt-1"
|
|
1378
1378
|
}, {
|
|
1379
1379
|
default: Ve(() => [
|
|
1380
|
-
|
|
1380
|
+
B(M(Lo), {
|
|
1381
1381
|
class: "w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",
|
|
1382
1382
|
onChange: a[0] || (a[0] = (u) => n.value = u.target.value),
|
|
1383
1383
|
displayValue: (u) => e.languages[u],
|
|
1384
|
-
onFocus: a[1] || (a[1] = (u) =>
|
|
1384
|
+
onFocus: a[1] || (a[1] = (u) => r(u))
|
|
1385
1385
|
}, null, 8, ["displayValue"]),
|
|
1386
|
-
|
|
1386
|
+
B(M(Io), {
|
|
1387
1387
|
ref_key: "btnSelect",
|
|
1388
|
-
ref:
|
|
1388
|
+
ref: s,
|
|
1389
1389
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
1390
1390
|
}, {
|
|
1391
1391
|
default: Ve(() => [
|
|
1392
|
-
|
|
1392
|
+
B(M(Mo), {
|
|
1393
1393
|
class: "h-5 w-5 text-gray-400",
|
|
1394
1394
|
"aria-hidden": "true",
|
|
1395
|
-
onClick: a[2] || (a[2] = (u) =>
|
|
1395
|
+
onClick: a[2] || (a[2] = (u) => r(u))
|
|
1396
1396
|
})
|
|
1397
1397
|
]),
|
|
1398
1398
|
_: 1
|
|
1399
1399
|
}, 512),
|
|
1400
|
-
|
|
1400
|
+
B(M(To), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50" }, {
|
|
1401
1401
|
default: Ve(() => [
|
|
1402
|
-
(
|
|
1402
|
+
(y(!0), O(Z, null, le(i.value, ([u, p]) => (y(), ee(M(Vo), {
|
|
1403
1403
|
key: u,
|
|
1404
1404
|
value: u
|
|
1405
1405
|
}, {
|
|
1406
|
-
default: Ve(({ active:
|
|
1406
|
+
default: Ve(({ active: f, selected: v }) => [
|
|
1407
1407
|
g("li", {
|
|
1408
|
-
class:
|
|
1408
|
+
class: Ce([
|
|
1409
1409
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
1410
|
-
|
|
1410
|
+
f ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
1411
1411
|
])
|
|
1412
1412
|
}, [
|
|
1413
1413
|
g("span", {
|
|
1414
|
-
class:
|
|
1415
|
-
},
|
|
1414
|
+
class: Ce(["block truncate", v && "font-semibold"])
|
|
1415
|
+
}, te(p), 3)
|
|
1416
1416
|
], 2)
|
|
1417
1417
|
]),
|
|
1418
1418
|
_: 2
|
|
@@ -1428,14 +1428,14 @@ const ht = {
|
|
|
1428
1428
|
src: Ut,
|
|
1429
1429
|
alt: "swap",
|
|
1430
1430
|
class: "w-4"
|
|
1431
|
-
}, null, -1),
|
|
1431
|
+
}, null, -1), Ao = [
|
|
1432
1432
|
No
|
|
1433
|
-
],
|
|
1433
|
+
], Do = /* @__PURE__ */ g("img", {
|
|
1434
1434
|
src: Ut,
|
|
1435
1435
|
alt: "swap",
|
|
1436
1436
|
class: "w-4"
|
|
1437
1437
|
}, null, -1), Fo = [
|
|
1438
|
-
|
|
1438
|
+
Do
|
|
1439
1439
|
], jo = {
|
|
1440
1440
|
__name: "SwapBtn",
|
|
1441
1441
|
props: {
|
|
@@ -1447,10 +1447,10 @@ const ht = {
|
|
|
1447
1447
|
emits: ["swap"],
|
|
1448
1448
|
setup(e, { emit: o }) {
|
|
1449
1449
|
const t = o;
|
|
1450
|
-
return (n,
|
|
1450
|
+
return (n, s) => e.isBidirect ? (y(), O("button", {
|
|
1451
1451
|
key: 1,
|
|
1452
|
-
onClick:
|
|
1453
|
-
}, Fo)) : (
|
|
1452
|
+
onClick: s[0] || (s[0] = (i) => t("swap"))
|
|
1453
|
+
}, Fo)) : (y(), O("button", Ro, Ao));
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
1456
1456
|
var Zt = !1;
|
|
@@ -1471,10 +1471,10 @@ function Wt() {
|
|
|
1471
1471
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1472
1472
|
}
|
|
1473
1473
|
const Ho = typeof Proxy == "function", zo = "devtools-plugin:setup", Uo = "plugin:settings:set";
|
|
1474
|
-
let
|
|
1474
|
+
let me, Je;
|
|
1475
1475
|
function Zo() {
|
|
1476
1476
|
var e;
|
|
1477
|
-
return
|
|
1477
|
+
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0, Je = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (me = !0, Je = globalThis.perf_hooks.performance) : me = !1), me;
|
|
1478
1478
|
}
|
|
1479
1479
|
function Wo() {
|
|
1480
1480
|
return Zo() ? Je.now() : Date.now();
|
|
@@ -1484,49 +1484,49 @@ class Go {
|
|
|
1484
1484
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1485
1485
|
const n = {};
|
|
1486
1486
|
if (o.settings)
|
|
1487
|
-
for (const
|
|
1488
|
-
const
|
|
1489
|
-
n[
|
|
1487
|
+
for (const r in o.settings) {
|
|
1488
|
+
const l = o.settings[r];
|
|
1489
|
+
n[r] = l.defaultValue;
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1492
|
-
let
|
|
1491
|
+
const s = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1492
|
+
let i = Object.assign({}, n);
|
|
1493
1493
|
try {
|
|
1494
|
-
const
|
|
1495
|
-
Object.assign(
|
|
1494
|
+
const r = localStorage.getItem(s), l = JSON.parse(r);
|
|
1495
|
+
Object.assign(i, l);
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
1498
|
this.fallbacks = {
|
|
1499
1499
|
getSettings() {
|
|
1500
|
-
return
|
|
1500
|
+
return i;
|
|
1501
1501
|
},
|
|
1502
|
-
setSettings(
|
|
1502
|
+
setSettings(r) {
|
|
1503
1503
|
try {
|
|
1504
|
-
localStorage.setItem(
|
|
1504
|
+
localStorage.setItem(s, JSON.stringify(r));
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
|
-
|
|
1507
|
+
i = r;
|
|
1508
1508
|
},
|
|
1509
1509
|
now() {
|
|
1510
1510
|
return Wo();
|
|
1511
1511
|
}
|
|
1512
|
-
}, t && t.on(Uo, (
|
|
1513
|
-
|
|
1512
|
+
}, t && t.on(Uo, (r, l) => {
|
|
1513
|
+
r === this.plugin.id && this.fallbacks.setSettings(l);
|
|
1514
1514
|
}), this.proxiedOn = new Proxy({}, {
|
|
1515
|
-
get: (
|
|
1515
|
+
get: (r, l) => this.target ? this.target.on[l] : (...a) => {
|
|
1516
1516
|
this.onQueue.push({
|
|
1517
|
-
method:
|
|
1517
|
+
method: l,
|
|
1518
1518
|
args: a
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1522
|
-
get: (
|
|
1523
|
-
method:
|
|
1522
|
+
get: (r, l) => this.target ? this.target[l] : l === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(l) ? (...a) => (this.targetQueue.push({
|
|
1523
|
+
method: l,
|
|
1524
1524
|
args: a,
|
|
1525
1525
|
resolve: () => {
|
|
1526
1526
|
}
|
|
1527
|
-
}), this.fallbacks[
|
|
1527
|
+
}), this.fallbacks[l](...a)) : (...a) => new Promise((u) => {
|
|
1528
1528
|
this.targetQueue.push({
|
|
1529
|
-
method:
|
|
1529
|
+
method: l,
|
|
1530
1530
|
args: a,
|
|
1531
1531
|
resolve: u
|
|
1532
1532
|
});
|
|
@@ -1542,16 +1542,16 @@ class Go {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
function Gt(e, o) {
|
|
1545
|
-
const t = e, n = Wt(),
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
1545
|
+
const t = e, n = Wt(), s = Bo(), i = Ho && t.enableEarlyProxy;
|
|
1546
|
+
if (s && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
1547
|
+
s.emit(zo, e, o);
|
|
1548
1548
|
else {
|
|
1549
|
-
const
|
|
1549
|
+
const r = i ? new Go(t, s) : null;
|
|
1550
1550
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1551
1551
|
pluginDescriptor: t,
|
|
1552
1552
|
setupFn: o,
|
|
1553
|
-
proxy:
|
|
1554
|
-
}),
|
|
1553
|
+
proxy: r
|
|
1554
|
+
}), r && o(r.proxiedTarget);
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
/*!
|
|
@@ -1575,7 +1575,7 @@ const Be = typeof window < "u", Ee = (process.env.NODE_ENV !== "production" || !
|
|
|
1575
1575
|
function qo(e, { autoBom: o = !1 } = {}) {
|
|
1576
1576
|
return o && /^\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;
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function st(e, o, t) {
|
|
1579
1579
|
const n = new XMLHttpRequest();
|
|
1580
1580
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1581
1581
|
Yt(n.response, o, t);
|
|
@@ -1613,7 +1613,7 @@ const Re = typeof navigator == "object" ? navigator : { userAgent: "" }, Kt = /M
|
|
|
1613
1613
|
};
|
|
1614
1614
|
function Jo(e, o = "download", t) {
|
|
1615
1615
|
const n = document.createElement("a");
|
|
1616
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Jt(n.href) ?
|
|
1616
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Jt(n.href) ? st(e, o, t) : (n.target = "_blank", ke(n)) : ke(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1617
1617
|
URL.revokeObjectURL(n.href);
|
|
1618
1618
|
}, 4e4), setTimeout(function() {
|
|
1619
1619
|
ke(n);
|
|
@@ -1622,7 +1622,7 @@ function Jo(e, o = "download", t) {
|
|
|
1622
1622
|
function Ko(e, o = "download", t) {
|
|
1623
1623
|
if (typeof e == "string")
|
|
1624
1624
|
if (Jt(e))
|
|
1625
|
-
|
|
1625
|
+
st(e, o, t);
|
|
1626
1626
|
else {
|
|
1627
1627
|
const n = document.createElement("a");
|
|
1628
1628
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
@@ -1634,55 +1634,55 @@ function Ko(e, o = "download", t) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
function Yo(e, o, t, n) {
|
|
1636
1636
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1637
|
-
return
|
|
1638
|
-
const
|
|
1639
|
-
if ((
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1642
|
-
let a =
|
|
1637
|
+
return st(e, o, t);
|
|
1638
|
+
const s = e.type === "application/octet-stream", i = /constructor/i.test(String(mt.HTMLElement)) || "safari" in mt, r = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1639
|
+
if ((r || s && i || Kt) && typeof FileReader < "u") {
|
|
1640
|
+
const l = new FileReader();
|
|
1641
|
+
l.onloadend = function() {
|
|
1642
|
+
let a = l.result;
|
|
1643
1643
|
if (typeof a != "string")
|
|
1644
1644
|
throw n = null, new Error("Wrong reader.result type");
|
|
1645
|
-
a =
|
|
1646
|
-
},
|
|
1645
|
+
a = r ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1646
|
+
}, l.readAsDataURL(e);
|
|
1647
1647
|
} else {
|
|
1648
|
-
const
|
|
1649
|
-
n ? n.location.assign(
|
|
1650
|
-
URL.revokeObjectURL(
|
|
1648
|
+
const l = URL.createObjectURL(e);
|
|
1649
|
+
n ? n.location.assign(l) : location.href = l, n = null, setTimeout(function() {
|
|
1650
|
+
URL.revokeObjectURL(l);
|
|
1651
1651
|
}, 4e4);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function j(e, o) {
|
|
1655
1655
|
const t = "🍍 " + e;
|
|
1656
1656
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function lt(e) {
|
|
1659
1659
|
return "_a" in e && "install" in e;
|
|
1660
1660
|
}
|
|
1661
1661
|
function Qt() {
|
|
1662
1662
|
if (!("clipboard" in navigator))
|
|
1663
|
-
return
|
|
1663
|
+
return j("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1664
1664
|
}
|
|
1665
1665
|
function Xt(e) {
|
|
1666
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1666
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (j('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1667
1667
|
}
|
|
1668
1668
|
async function Qo(e) {
|
|
1669
1669
|
if (!Qt())
|
|
1670
1670
|
try {
|
|
1671
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
1671
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), j("Global state copied to clipboard.");
|
|
1672
1672
|
} catch (o) {
|
|
1673
1673
|
if (Xt(o))
|
|
1674
1674
|
return;
|
|
1675
|
-
|
|
1675
|
+
j("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
async function Xo(e) {
|
|
1679
1679
|
if (!Qt())
|
|
1680
1680
|
try {
|
|
1681
|
-
en(e, JSON.parse(await navigator.clipboard.readText())),
|
|
1681
|
+
en(e, JSON.parse(await navigator.clipboard.readText())), j("Global state pasted from clipboard.");
|
|
1682
1682
|
} catch (o) {
|
|
1683
1683
|
if (Xt(o))
|
|
1684
1684
|
return;
|
|
1685
|
-
|
|
1685
|
+
j("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
async function e2(e) {
|
|
@@ -1691,7 +1691,7 @@ async function e2(e) {
|
|
|
1691
1691
|
type: "text/plain;charset=utf-8"
|
|
1692
1692
|
}), "pinia-state.json");
|
|
1693
1693
|
} catch (o) {
|
|
1694
|
-
|
|
1694
|
+
j("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
let oe;
|
|
@@ -1703,8 +1703,8 @@ function t2() {
|
|
|
1703
1703
|
const n = oe.files;
|
|
1704
1704
|
if (!n)
|
|
1705
1705
|
return o(null);
|
|
1706
|
-
const
|
|
1707
|
-
return o(
|
|
1706
|
+
const s = n.item(0);
|
|
1707
|
+
return o(s ? { text: await s.text(), file: s } : null);
|
|
1708
1708
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
@@ -1715,10 +1715,10 @@ async function n2(e) {
|
|
|
1715
1715
|
const t = await t2()();
|
|
1716
1716
|
if (!t)
|
|
1717
1717
|
return;
|
|
1718
|
-
const { text: n, file:
|
|
1719
|
-
en(e, JSON.parse(n)),
|
|
1718
|
+
const { text: n, file: s } = t;
|
|
1719
|
+
en(e, JSON.parse(n)), j(`Global state imported from "${s.name}".`);
|
|
1720
1720
|
} catch (o) {
|
|
1721
|
-
|
|
1721
|
+
j("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
1724
|
function en(e, o) {
|
|
@@ -1736,7 +1736,7 @@ function Y(e) {
|
|
|
1736
1736
|
}
|
|
1737
1737
|
const tn = "🍍 Pinia (root)", Ke = "_root";
|
|
1738
1738
|
function o2(e) {
|
|
1739
|
-
return
|
|
1739
|
+
return lt(e) ? {
|
|
1740
1740
|
id: Ke,
|
|
1741
1741
|
label: tn
|
|
1742
1742
|
} : {
|
|
@@ -1744,21 +1744,21 @@ function o2(e) {
|
|
|
1744
1744
|
label: e.$id
|
|
1745
1745
|
};
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1748
|
-
if (
|
|
1747
|
+
function s2(e) {
|
|
1748
|
+
if (lt(e)) {
|
|
1749
1749
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1750
1750
|
return {
|
|
1751
|
-
state: t.map((
|
|
1751
|
+
state: t.map((i) => ({
|
|
1752
1752
|
editable: !0,
|
|
1753
|
-
key:
|
|
1754
|
-
value: e.state.value[
|
|
1753
|
+
key: i,
|
|
1754
|
+
value: e.state.value[i]
|
|
1755
1755
|
})),
|
|
1756
|
-
getters: t.filter((
|
|
1757
|
-
const
|
|
1756
|
+
getters: t.filter((i) => n.get(i)._getters).map((i) => {
|
|
1757
|
+
const r = n.get(i);
|
|
1758
1758
|
return {
|
|
1759
1759
|
editable: !1,
|
|
1760
|
-
key:
|
|
1761
|
-
value:
|
|
1760
|
+
key: i,
|
|
1761
|
+
value: r._getters.reduce((l, a) => (l[a] = r[a], l), {})
|
|
1762
1762
|
};
|
|
1763
1763
|
})
|
|
1764
1764
|
};
|
|
@@ -1780,7 +1780,7 @@ function l2(e) {
|
|
|
1780
1780
|
value: e[t]
|
|
1781
1781
|
}))), o;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function l2(e) {
|
|
1784
1784
|
return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
|
|
1785
1785
|
oldValue: {},
|
|
1786
1786
|
keys: [],
|
|
@@ -1793,7 +1793,7 @@ function s2(e) {
|
|
|
1793
1793
|
newValue: e.newValue
|
|
1794
1794
|
} : {};
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function i2(e) {
|
|
1797
1797
|
switch (e) {
|
|
1798
1798
|
case ne.direct:
|
|
1799
1799
|
return "mutation";
|
|
@@ -1805,8 +1805,8 @@ function r2(e) {
|
|
|
1805
1805
|
return "unknown";
|
|
1806
1806
|
}
|
|
1807
1807
|
}
|
|
1808
|
-
let
|
|
1809
|
-
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign:
|
|
1808
|
+
let be = !0;
|
|
1809
|
+
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign: r2 } = Object, De = (e) => "🍍 " + e;
|
|
1810
1810
|
function a2(e, o) {
|
|
1811
1811
|
Gt({
|
|
1812
1812
|
id: "dev.esm.pinia",
|
|
@@ -1817,7 +1817,7 @@ function a2(e, o) {
|
|
|
1817
1817
|
componentStateTypes: Ne,
|
|
1818
1818
|
app: e
|
|
1819
1819
|
}, (t) => {
|
|
1820
|
-
typeof t.now != "function" &&
|
|
1820
|
+
typeof t.now != "function" && j("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({
|
|
1821
1821
|
id: ue,
|
|
1822
1822
|
label: "Pinia 🍍",
|
|
1823
1823
|
color: 15064968
|
|
@@ -1861,44 +1861,44 @@ function a2(e, o) {
|
|
|
1861
1861
|
icon: "restore",
|
|
1862
1862
|
tooltip: 'Reset the state (with "$reset")',
|
|
1863
1863
|
action: (n) => {
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1864
|
+
const s = o._s.get(n);
|
|
1865
|
+
s ? typeof s.$reset != "function" ? j(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (s.$reset(), j(`Store "${n}" reset.`)) : j(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
]
|
|
1869
|
-
}), t.on.inspectComponent((n,
|
|
1870
|
-
const
|
|
1871
|
-
if (
|
|
1872
|
-
const
|
|
1873
|
-
Object.values(
|
|
1869
|
+
}), t.on.inspectComponent((n, s) => {
|
|
1870
|
+
const i = n.componentInstance && n.componentInstance.proxy;
|
|
1871
|
+
if (i && i._pStores) {
|
|
1872
|
+
const r = n.componentInstance.proxy._pStores;
|
|
1873
|
+
Object.values(r).forEach((l) => {
|
|
1874
1874
|
n.instanceData.state.push({
|
|
1875
|
-
type:
|
|
1875
|
+
type: De(l.$id),
|
|
1876
1876
|
key: "state",
|
|
1877
1877
|
editable: !0,
|
|
1878
|
-
value:
|
|
1878
|
+
value: l._isOptionsAPI ? {
|
|
1879
1879
|
_custom: {
|
|
1880
|
-
value: K(
|
|
1880
|
+
value: K(l.$state),
|
|
1881
1881
|
actions: [
|
|
1882
1882
|
{
|
|
1883
1883
|
icon: "restore",
|
|
1884
1884
|
tooltip: "Reset the state of this store",
|
|
1885
|
-
action: () =>
|
|
1885
|
+
action: () => l.$reset()
|
|
1886
1886
|
}
|
|
1887
1887
|
]
|
|
1888
1888
|
}
|
|
1889
1889
|
} : (
|
|
1890
1890
|
// NOTE: workaround to unwrap transferred refs
|
|
1891
|
-
Object.keys(
|
|
1891
|
+
Object.keys(l.$state).reduce((a, u) => (a[u] = l.$state[u], a), {})
|
|
1892
1892
|
)
|
|
1893
|
-
}),
|
|
1894
|
-
type:
|
|
1893
|
+
}), l._getters && l._getters.length && n.instanceData.state.push({
|
|
1894
|
+
type: De(l.$id),
|
|
1895
1895
|
key: "getters",
|
|
1896
1896
|
editable: !1,
|
|
1897
|
-
value:
|
|
1897
|
+
value: l._getters.reduce((a, u) => {
|
|
1898
1898
|
try {
|
|
1899
|
-
a[u] =
|
|
1900
|
-
} catch (
|
|
1901
|
-
a[u] =
|
|
1899
|
+
a[u] = l[u];
|
|
1900
|
+
} catch (p) {
|
|
1901
|
+
a[u] = p;
|
|
1902
1902
|
}
|
|
1903
1903
|
return a;
|
|
1904
1904
|
}, {})
|
|
@@ -1907,41 +1907,41 @@ function a2(e, o) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
}), t.on.getInspectorTree((n) => {
|
|
1909
1909
|
if (n.app === e && n.inspectorId === U) {
|
|
1910
|
-
let
|
|
1911
|
-
|
|
1910
|
+
let s = [o];
|
|
1911
|
+
s = s.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? s.filter((i) => "$id" in i ? i.$id.toLowerCase().includes(n.filter.toLowerCase()) : tn.toLowerCase().includes(n.filter.toLowerCase())) : s).map(o2);
|
|
1912
1912
|
}
|
|
1913
1913
|
}), t.on.getInspectorState((n) => {
|
|
1914
1914
|
if (n.app === e && n.inspectorId === U) {
|
|
1915
|
-
const
|
|
1916
|
-
if (!
|
|
1915
|
+
const s = n.nodeId === Ke ? o : o._s.get(n.nodeId);
|
|
1916
|
+
if (!s)
|
|
1917
1917
|
return;
|
|
1918
|
-
|
|
1918
|
+
s && (n.state = s2(s));
|
|
1919
1919
|
}
|
|
1920
|
-
}), t.on.editInspectorState((n,
|
|
1920
|
+
}), t.on.editInspectorState((n, s) => {
|
|
1921
1921
|
if (n.app === e && n.inspectorId === U) {
|
|
1922
|
-
const
|
|
1923
|
-
if (!
|
|
1924
|
-
return
|
|
1925
|
-
const { path:
|
|
1926
|
-
|
|
1922
|
+
const i = n.nodeId === Ke ? o : o._s.get(n.nodeId);
|
|
1923
|
+
if (!i)
|
|
1924
|
+
return j(`store "${n.nodeId}" not found`, "error");
|
|
1925
|
+
const { path: r } = n;
|
|
1926
|
+
lt(i) ? r.unshift("state") : (r.length !== 1 || !i._customProperties.has(r[0]) || r[0] in i.$state) && r.unshift("$state"), be = !1, n.set(i, r, n.state.value), be = !0;
|
|
1927
1927
|
}
|
|
1928
1928
|
}), t.on.editComponentState((n) => {
|
|
1929
1929
|
if (n.type.startsWith("🍍")) {
|
|
1930
|
-
const
|
|
1931
|
-
if (!
|
|
1932
|
-
return
|
|
1933
|
-
const { path:
|
|
1934
|
-
if (
|
|
1935
|
-
return
|
|
1936
|
-
${
|
|
1930
|
+
const s = n.type.replace(/^🍍\s*/, ""), i = o._s.get(s);
|
|
1931
|
+
if (!i)
|
|
1932
|
+
return j(`store "${s}" not found`, "error");
|
|
1933
|
+
const { path: r } = n;
|
|
1934
|
+
if (r[0] !== "state")
|
|
1935
|
+
return j(`Invalid path for store "${s}":
|
|
1936
|
+
${r}
|
|
1937
1937
|
Only state can be modified.`);
|
|
1938
|
-
|
|
1938
|
+
r[0] = "$state", be = !1, n.set(i, r, n.state.value), be = !0;
|
|
1939
1939
|
}
|
|
1940
1940
|
});
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
1943
|
function u2(e, o) {
|
|
1944
|
-
Ne.includes(
|
|
1944
|
+
Ne.includes(De(o.$id)) || Ne.push(De(o.$id)), Gt({
|
|
1945
1945
|
id: "dev.esm.pinia",
|
|
1946
1946
|
label: "Pinia 🍍",
|
|
1947
1947
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
@@ -1963,8 +1963,8 @@ function u2(e, o) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
}, (t) => {
|
|
1965
1965
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1966
|
-
o.$onAction(({ after:
|
|
1967
|
-
const
|
|
1966
|
+
o.$onAction(({ after: r, onError: l, name: a, args: u }) => {
|
|
1967
|
+
const p = nn++;
|
|
1968
1968
|
t.addTimelineEvent({
|
|
1969
1969
|
layerId: ue,
|
|
1970
1970
|
event: {
|
|
@@ -1976,10 +1976,10 @@ function u2(e, o) {
|
|
|
1976
1976
|
action: Y(a),
|
|
1977
1977
|
args: u
|
|
1978
1978
|
},
|
|
1979
|
-
groupId:
|
|
1979
|
+
groupId: p
|
|
1980
1980
|
}
|
|
1981
|
-
}),
|
|
1982
|
-
|
|
1981
|
+
}), r((f) => {
|
|
1982
|
+
ie = void 0, t.addTimelineEvent({
|
|
1983
1983
|
layerId: ue,
|
|
1984
1984
|
event: {
|
|
1985
1985
|
time: n(),
|
|
@@ -1989,13 +1989,13 @@ function u2(e, o) {
|
|
|
1989
1989
|
store: Y(o.$id),
|
|
1990
1990
|
action: Y(a),
|
|
1991
1991
|
args: u,
|
|
1992
|
-
result:
|
|
1992
|
+
result: f
|
|
1993
1993
|
},
|
|
1994
|
-
groupId:
|
|
1994
|
+
groupId: p
|
|
1995
1995
|
}
|
|
1996
1996
|
});
|
|
1997
|
-
}),
|
|
1998
|
-
|
|
1997
|
+
}), l((f) => {
|
|
1998
|
+
ie = void 0, t.addTimelineEvent({
|
|
1999
1999
|
layerId: ue,
|
|
2000
2000
|
event: {
|
|
2001
2001
|
time: n(),
|
|
@@ -2006,52 +2006,52 @@ function u2(e, o) {
|
|
|
2006
2006
|
store: Y(o.$id),
|
|
2007
2007
|
action: Y(a),
|
|
2008
2008
|
args: u,
|
|
2009
|
-
error:
|
|
2009
|
+
error: f
|
|
2010
2010
|
},
|
|
2011
|
-
groupId:
|
|
2011
|
+
groupId: p
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
});
|
|
2015
|
-
}, !0), o._customProperties.forEach((
|
|
2016
|
-
|
|
2017
|
-
t.notifyComponentUpdate(), t.sendInspectorState(U),
|
|
2015
|
+
}, !0), o._customProperties.forEach((r) => {
|
|
2016
|
+
H(() => M(o[r]), (l, a) => {
|
|
2017
|
+
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
2018
2018
|
layerId: ue,
|
|
2019
2019
|
event: {
|
|
2020
2020
|
time: n(),
|
|
2021
2021
|
title: "Change",
|
|
2022
|
-
subtitle:
|
|
2022
|
+
subtitle: r,
|
|
2023
2023
|
data: {
|
|
2024
|
-
newValue:
|
|
2024
|
+
newValue: l,
|
|
2025
2025
|
oldValue: a
|
|
2026
2026
|
},
|
|
2027
|
-
groupId:
|
|
2027
|
+
groupId: ie
|
|
2028
2028
|
}
|
|
2029
2029
|
});
|
|
2030
2030
|
}, { deep: !0 });
|
|
2031
|
-
}), o.$subscribe(({ events:
|
|
2032
|
-
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !
|
|
2031
|
+
}), o.$subscribe(({ events: r, type: l }, a) => {
|
|
2032
|
+
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
2033
2033
|
return;
|
|
2034
2034
|
const u = {
|
|
2035
2035
|
time: n(),
|
|
2036
|
-
title:
|
|
2037
|
-
data:
|
|
2038
|
-
groupId:
|
|
2036
|
+
title: i2(l),
|
|
2037
|
+
data: r2({ store: Y(o.$id) }, l2(r)),
|
|
2038
|
+
groupId: ie
|
|
2039
2039
|
};
|
|
2040
|
-
|
|
2040
|
+
l === ne.patchFunction ? u.subtitle = "⤵️" : l === ne.patchObject ? u.subtitle = "🧩" : r && !Array.isArray(r) && (u.subtitle = r.type), r && (u.data["rawEvent(s)"] = {
|
|
2041
2041
|
_custom: {
|
|
2042
2042
|
display: "DebuggerEvent",
|
|
2043
2043
|
type: "object",
|
|
2044
2044
|
tooltip: "raw DebuggerEvent[]",
|
|
2045
|
-
value:
|
|
2045
|
+
value: r
|
|
2046
2046
|
}
|
|
2047
2047
|
}), t.addTimelineEvent({
|
|
2048
2048
|
layerId: ue,
|
|
2049
2049
|
event: u
|
|
2050
2050
|
});
|
|
2051
2051
|
}, { detached: !0, flush: "sync" });
|
|
2052
|
-
const
|
|
2053
|
-
o._hotUpdate = de((
|
|
2054
|
-
|
|
2052
|
+
const s = o._hotUpdate;
|
|
2053
|
+
o._hotUpdate = de((r) => {
|
|
2054
|
+
s(r), t.addTimelineEvent({
|
|
2055
2055
|
layerId: ue,
|
|
2056
2056
|
event: {
|
|
2057
2057
|
time: n(),
|
|
@@ -2064,28 +2064,28 @@ function u2(e, o) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
}), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
2066
2066
|
});
|
|
2067
|
-
const { $dispose:
|
|
2067
|
+
const { $dispose: i } = o;
|
|
2068
2068
|
o.$dispose = () => {
|
|
2069
|
-
|
|
2070
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges &&
|
|
2069
|
+
i(), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && j(`Disposed "${o.$id}" store 🗑`);
|
|
2070
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && j(`"${o.$id}" store installed 🆕`);
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
|
-
let nn = 0,
|
|
2073
|
+
let nn = 0, ie;
|
|
2074
2074
|
function gt(e, o, t) {
|
|
2075
|
-
const n = o.reduce((
|
|
2076
|
-
for (const
|
|
2077
|
-
e[
|
|
2078
|
-
const
|
|
2075
|
+
const n = o.reduce((s, i) => (s[i] = K(e)[i], s), {});
|
|
2076
|
+
for (const s in n)
|
|
2077
|
+
e[s] = function() {
|
|
2078
|
+
const i = nn, r = t ? new Proxy(e, {
|
|
2079
2079
|
get(...a) {
|
|
2080
|
-
return
|
|
2080
|
+
return ie = i, Reflect.get(...a);
|
|
2081
2081
|
},
|
|
2082
2082
|
set(...a) {
|
|
2083
|
-
return
|
|
2083
|
+
return ie = i, Reflect.set(...a);
|
|
2084
2084
|
}
|
|
2085
2085
|
}) : e;
|
|
2086
|
-
|
|
2087
|
-
const
|
|
2088
|
-
return
|
|
2086
|
+
ie = i;
|
|
2087
|
+
const l = n[s].apply(r, arguments);
|
|
2088
|
+
return ie = void 0, l;
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
2091
|
function c2({ app: e, store: o, options: t }) {
|
|
@@ -2093,8 +2093,8 @@ function c2({ app: e, store: o, options: t }) {
|
|
|
2093
2093
|
return;
|
|
2094
2094
|
o._isOptionsAPI = !!t.state, gt(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2095
2095
|
const n = o._hotUpdate;
|
|
2096
|
-
K(o)._hotUpdate = function(
|
|
2097
|
-
n.apply(this, arguments), gt(o, Object.keys(
|
|
2096
|
+
K(o)._hotUpdate = function(s) {
|
|
2097
|
+
n.apply(this, arguments), gt(o, Object.keys(s._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2098
2098
|
}, u2(
|
|
2099
2099
|
e,
|
|
2100
2100
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
@@ -2102,14 +2102,14 @@ function c2({ app: e, store: o, options: t }) {
|
|
|
2102
2102
|
);
|
|
2103
2103
|
}
|
|
2104
2104
|
function d2() {
|
|
2105
|
-
const e = Ot(!0), o = e.run(() =>
|
|
2105
|
+
const e = Ot(!0), o = e.run(() => S({}));
|
|
2106
2106
|
let t = [], n = [];
|
|
2107
|
-
const
|
|
2108
|
-
install(
|
|
2109
|
-
Ie(
|
|
2107
|
+
const s = de({
|
|
2108
|
+
install(i) {
|
|
2109
|
+
Ie(s), s._a = i, i.provide(qt, s), i.config.globalProperties.$pinia = s, Ee && a2(i, s), n.forEach((r) => t.push(r)), n = [];
|
|
2110
2110
|
},
|
|
2111
|
-
use(
|
|
2112
|
-
return !this._a && !Zt ? n.push(
|
|
2111
|
+
use(i) {
|
|
2112
|
+
return !this._a && !Zt ? n.push(i) : t.push(i), this;
|
|
2113
2113
|
},
|
|
2114
2114
|
_p: t,
|
|
2115
2115
|
// it's actually undefined here
|
|
@@ -2119,29 +2119,29 @@ function d2() {
|
|
|
2119
2119
|
_s: /* @__PURE__ */ new Map(),
|
|
2120
2120
|
state: o
|
|
2121
2121
|
});
|
|
2122
|
-
return Ee && typeof Proxy < "u" &&
|
|
2122
|
+
return Ee && typeof Proxy < "u" && s.use(c2), s;
|
|
2123
2123
|
}
|
|
2124
2124
|
function on(e, o) {
|
|
2125
2125
|
for (const t in o) {
|
|
2126
2126
|
const n = o[t];
|
|
2127
2127
|
if (!(t in e))
|
|
2128
2128
|
continue;
|
|
2129
|
-
const
|
|
2130
|
-
fe(
|
|
2129
|
+
const s = e[t];
|
|
2130
|
+
fe(s) && fe(n) && !_e(n) && !tt(n) ? e[t] = on(s, n) : e[t] = n;
|
|
2131
2131
|
}
|
|
2132
2132
|
return e;
|
|
2133
2133
|
}
|
|
2134
|
-
const
|
|
2134
|
+
const sn = () => {
|
|
2135
2135
|
};
|
|
2136
|
-
function bt(e, o, t, n =
|
|
2136
|
+
function bt(e, o, t, n = sn) {
|
|
2137
2137
|
e.push(o);
|
|
2138
|
-
const
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2138
|
+
const s = () => {
|
|
2139
|
+
const i = e.indexOf(o);
|
|
2140
|
+
i > -1 && (e.splice(i, 1), n());
|
|
2141
2141
|
};
|
|
2142
|
-
return !t && It() && Xe(
|
|
2142
|
+
return !t && It() && Xe(s), s;
|
|
2143
2143
|
}
|
|
2144
|
-
function
|
|
2144
|
+
function ge(e, ...o) {
|
|
2145
2145
|
e.slice().forEach((t) => {
|
|
2146
2146
|
t(...o);
|
|
2147
2147
|
});
|
|
@@ -2152,111 +2152,111 @@ function Ye(e, o) {
|
|
|
2152
2152
|
for (const t in o) {
|
|
2153
2153
|
if (!o.hasOwnProperty(t))
|
|
2154
2154
|
continue;
|
|
2155
|
-
const n = o[t],
|
|
2156
|
-
fe(
|
|
2155
|
+
const n = o[t], s = e[t];
|
|
2156
|
+
fe(s) && fe(n) && e.hasOwnProperty(t) && !_e(n) && !tt(n) ? e[t] = Ye(s, n) : e[t] = n;
|
|
2157
2157
|
}
|
|
2158
2158
|
return e;
|
|
2159
2159
|
}
|
|
2160
|
-
const
|
|
2160
|
+
const p2 = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2161
2161
|
/* istanbul ignore next */
|
|
2162
2162
|
Symbol()
|
|
2163
2163
|
);
|
|
2164
|
-
function
|
|
2165
|
-
return !fe(e) || !e.hasOwnProperty(
|
|
2164
|
+
function v2(e) {
|
|
2165
|
+
return !fe(e) || !e.hasOwnProperty(p2);
|
|
2166
2166
|
}
|
|
2167
2167
|
const { assign: J } = Object;
|
|
2168
2168
|
function Ct(e) {
|
|
2169
|
-
return !!(
|
|
2169
|
+
return !!(_e(e) && e.effect);
|
|
2170
2170
|
}
|
|
2171
2171
|
function _t(e, o, t, n) {
|
|
2172
|
-
const { state:
|
|
2172
|
+
const { state: s, actions: i, getters: r } = o, l = t.state.value[e];
|
|
2173
2173
|
let a;
|
|
2174
2174
|
function u() {
|
|
2175
|
-
!
|
|
2176
|
-
const
|
|
2175
|
+
!l && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = s ? s() : {});
|
|
2176
|
+
const p = process.env.NODE_ENV !== "production" && n ? (
|
|
2177
2177
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2178
|
-
at(
|
|
2178
|
+
at(S(s ? s() : {}).value)
|
|
2179
2179
|
) : at(t.state.value[e]);
|
|
2180
|
-
return J(
|
|
2180
|
+
return J(p, i, Object.keys(r || {}).reduce((f, v) => (process.env.NODE_ENV !== "production" && v in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${v}" in store "${e}".`), f[v] = de(w(() => {
|
|
2181
2181
|
Ie(t);
|
|
2182
|
-
const
|
|
2183
|
-
return
|
|
2184
|
-
})),
|
|
2182
|
+
const h = t._s.get(e);
|
|
2183
|
+
return r[v].call(h, h);
|
|
2184
|
+
})), f), {}));
|
|
2185
2185
|
}
|
|
2186
2186
|
return a = Qe(e, u, o, t, n, !0), a;
|
|
2187
2187
|
}
|
|
2188
|
-
function Qe(e, o, t = {}, n,
|
|
2189
|
-
let
|
|
2190
|
-
const
|
|
2188
|
+
function Qe(e, o, t = {}, n, s, i) {
|
|
2189
|
+
let r;
|
|
2190
|
+
const l = J({ actions: {} }, t);
|
|
2191
2191
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2192
2192
|
throw new Error("Pinia destroyed");
|
|
2193
2193
|
const a = {
|
|
2194
2194
|
deep: !0
|
|
2195
2195
|
// flush: 'post',
|
|
2196
2196
|
};
|
|
2197
|
-
process.env.NODE_ENV !== "production" && !Zt && (a.onTrigger = (
|
|
2198
|
-
u ?
|
|
2197
|
+
process.env.NODE_ENV !== "production" && !Zt && (a.onTrigger = (c) => {
|
|
2198
|
+
u ? h = c : u == !1 && !C._hotUpdating && (Array.isArray(h) ? h.push(c) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2199
2199
|
});
|
|
2200
|
-
let u,
|
|
2201
|
-
const
|
|
2202
|
-
!
|
|
2203
|
-
const $ =
|
|
2200
|
+
let u, p, f = [], v = [], h;
|
|
2201
|
+
const m = n.state.value[e];
|
|
2202
|
+
!i && !m && (process.env.NODE_ENV === "production" || !s) && (n.state.value[e] = {});
|
|
2203
|
+
const $ = S({});
|
|
2204
2204
|
let N;
|
|
2205
|
-
function
|
|
2206
|
-
let
|
|
2207
|
-
u =
|
|
2205
|
+
function R(c) {
|
|
2206
|
+
let d;
|
|
2207
|
+
u = p = !1, process.env.NODE_ENV !== "production" && (h = []), typeof c == "function" ? (c(n.state.value[e]), d = {
|
|
2208
2208
|
type: ne.patchFunction,
|
|
2209
2209
|
storeId: e,
|
|
2210
|
-
events:
|
|
2211
|
-
}) : (Ye(n.state.value[e],
|
|
2210
|
+
events: h
|
|
2211
|
+
}) : (Ye(n.state.value[e], c), d = {
|
|
2212
2212
|
type: ne.patchObject,
|
|
2213
|
-
payload:
|
|
2213
|
+
payload: c,
|
|
2214
2214
|
storeId: e,
|
|
2215
|
-
events:
|
|
2215
|
+
events: h
|
|
2216
2216
|
});
|
|
2217
2217
|
const x = N = Symbol();
|
|
2218
|
-
|
|
2218
|
+
Q().then(() => {
|
|
2219
2219
|
N === x && (u = !0);
|
|
2220
|
-
}),
|
|
2220
|
+
}), p = !0, ge(f, d, n.state.value[e]);
|
|
2221
2221
|
}
|
|
2222
|
-
const I =
|
|
2223
|
-
const { state:
|
|
2224
|
-
this.$patch((
|
|
2225
|
-
J(
|
|
2222
|
+
const I = i ? function() {
|
|
2223
|
+
const { state: d } = t, x = d ? d() : {};
|
|
2224
|
+
this.$patch((E) => {
|
|
2225
|
+
J(E, x);
|
|
2226
2226
|
});
|
|
2227
2227
|
} : (
|
|
2228
2228
|
/* istanbul ignore next */
|
|
2229
2229
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2230
2230
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2231
|
-
} :
|
|
2231
|
+
} : sn
|
|
2232
2232
|
);
|
|
2233
|
-
function
|
|
2234
|
-
|
|
2233
|
+
function k() {
|
|
2234
|
+
r.stop(), f = [], v = [], n._s.delete(e);
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function D(c, d) {
|
|
2237
2237
|
return function() {
|
|
2238
2238
|
Ie(n);
|
|
2239
|
-
const x = Array.from(arguments),
|
|
2240
|
-
function
|
|
2241
|
-
|
|
2239
|
+
const x = Array.from(arguments), E = [], P = [];
|
|
2240
|
+
function A(F) {
|
|
2241
|
+
E.push(F);
|
|
2242
2242
|
}
|
|
2243
|
-
function G(
|
|
2244
|
-
|
|
2243
|
+
function G(F) {
|
|
2244
|
+
P.push(F);
|
|
2245
2245
|
}
|
|
2246
|
-
|
|
2246
|
+
ge(v, {
|
|
2247
2247
|
args: x,
|
|
2248
|
-
name:
|
|
2248
|
+
name: c,
|
|
2249
2249
|
store: C,
|
|
2250
|
-
after:
|
|
2250
|
+
after: A,
|
|
2251
2251
|
onError: G
|
|
2252
2252
|
});
|
|
2253
2253
|
let q;
|
|
2254
2254
|
try {
|
|
2255
|
-
q =
|
|
2256
|
-
} catch (
|
|
2257
|
-
throw
|
|
2255
|
+
q = d.apply(this && this.$id === e ? this : C, x);
|
|
2256
|
+
} catch (F) {
|
|
2257
|
+
throw ge(P, F), F;
|
|
2258
2258
|
}
|
|
2259
|
-
return q instanceof Promise ? q.then((
|
|
2259
|
+
return q instanceof Promise ? q.then((F) => (ge(E, F), F)).catch((F) => (ge(P, F), Promise.reject(F))) : (ge(E, q), q);
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
2262
|
const _ = /* @__PURE__ */ de({
|
|
@@ -2264,167 +2264,167 @@ function Qe(e, o, t = {}, n, l, r) {
|
|
|
2264
2264
|
getters: {},
|
|
2265
2265
|
state: [],
|
|
2266
2266
|
hotState: $
|
|
2267
|
-
}),
|
|
2267
|
+
}), T = {
|
|
2268
2268
|
_p: n,
|
|
2269
2269
|
// _s: scope,
|
|
2270
2270
|
$id: e,
|
|
2271
|
-
$onAction: bt.bind(null,
|
|
2272
|
-
$patch:
|
|
2271
|
+
$onAction: bt.bind(null, v),
|
|
2272
|
+
$patch: R,
|
|
2273
2273
|
$reset: I,
|
|
2274
|
-
$subscribe(
|
|
2275
|
-
const x = bt(c, d
|
|
2276
|
-
(
|
|
2274
|
+
$subscribe(c, d = {}) {
|
|
2275
|
+
const x = bt(f, c, d.detached, () => E()), E = r.run(() => H(() => n.state.value[e], (P) => {
|
|
2276
|
+
(d.flush === "sync" ? p : u) && c({
|
|
2277
2277
|
storeId: e,
|
|
2278
2278
|
type: ne.direct,
|
|
2279
|
-
events:
|
|
2280
|
-
},
|
|
2281
|
-
}, J({}, a,
|
|
2279
|
+
events: h
|
|
2280
|
+
}, P);
|
|
2281
|
+
}, J({}, a, d)));
|
|
2282
2282
|
return x;
|
|
2283
2283
|
},
|
|
2284
|
-
$dispose:
|
|
2284
|
+
$dispose: k
|
|
2285
2285
|
}, C = St(process.env.NODE_ENV !== "production" || Ee ? J(
|
|
2286
2286
|
{
|
|
2287
2287
|
_hmrPayload: _,
|
|
2288
2288
|
_customProperties: de(/* @__PURE__ */ new Set())
|
|
2289
2289
|
// devtools custom properties
|
|
2290
2290
|
},
|
|
2291
|
-
|
|
2291
|
+
T
|
|
2292
2292
|
// must be added later
|
|
2293
2293
|
// setupStore
|
|
2294
|
-
) :
|
|
2294
|
+
) : T);
|
|
2295
2295
|
n._s.set(e, C);
|
|
2296
|
-
const
|
|
2297
|
-
for (const
|
|
2298
|
-
const
|
|
2299
|
-
if (
|
|
2300
|
-
process.env.NODE_ENV !== "production" &&
|
|
2301
|
-
else if (typeof
|
|
2302
|
-
const x = process.env.NODE_ENV !== "production" &&
|
|
2303
|
-
|
|
2304
|
-
} else process.env.NODE_ENV !== "production" && Ct(
|
|
2296
|
+
const L = (n._a && n._a.runWithContext || f2)(() => n._e.run(() => (r = Ot()).run(o)));
|
|
2297
|
+
for (const c in L) {
|
|
2298
|
+
const d = L[c];
|
|
2299
|
+
if (_e(d) && !Ct(d) || tt(d))
|
|
2300
|
+
process.env.NODE_ENV !== "production" && s ? Me($.value, c, Ze(L, c)) : i || (m && v2(d) && (_e(d) ? d.value = m[c] : Ye(d, m[c])), n.state.value[e][c] = d), process.env.NODE_ENV !== "production" && _.state.push(c);
|
|
2301
|
+
else if (typeof d == "function") {
|
|
2302
|
+
const x = process.env.NODE_ENV !== "production" && s ? d : D(c, d);
|
|
2303
|
+
L[c] = x, process.env.NODE_ENV !== "production" && (_.actions[c] = d), l.actions[c] = d;
|
|
2304
|
+
} else process.env.NODE_ENV !== "production" && Ct(d) && (_.getters[c] = i ? (
|
|
2305
2305
|
// @ts-expect-error
|
|
2306
|
-
t.getters[
|
|
2307
|
-
) :
|
|
2308
|
-
(
|
|
2309
|
-
}
|
|
2310
|
-
if (J(C,
|
|
2311
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2312
|
-
set: (
|
|
2313
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2306
|
+
t.getters[c]
|
|
2307
|
+
) : d, Be && (L._getters || // @ts-expect-error: same
|
|
2308
|
+
(L._getters = de([]))).push(c));
|
|
2309
|
+
}
|
|
2310
|
+
if (J(C, L), J(K(C), L), Object.defineProperty(C, "$state", {
|
|
2311
|
+
get: () => process.env.NODE_ENV !== "production" && s ? $.value : n.state.value[e],
|
|
2312
|
+
set: (c) => {
|
|
2313
|
+
if (process.env.NODE_ENV !== "production" && s)
|
|
2314
2314
|
throw new Error("cannot set hotState");
|
|
2315
|
-
|
|
2316
|
-
J(
|
|
2315
|
+
R((d) => {
|
|
2316
|
+
J(d, c);
|
|
2317
2317
|
});
|
|
2318
2318
|
}
|
|
2319
|
-
}), process.env.NODE_ENV !== "production" && (C._hotUpdate = de((
|
|
2320
|
-
C._hotUpdating = !0,
|
|
2321
|
-
if (
|
|
2322
|
-
const x =
|
|
2323
|
-
typeof x == "object" && fe(x) && fe(
|
|
2319
|
+
}), process.env.NODE_ENV !== "production" && (C._hotUpdate = de((c) => {
|
|
2320
|
+
C._hotUpdating = !0, c._hmrPayload.state.forEach((d) => {
|
|
2321
|
+
if (d in C.$state) {
|
|
2322
|
+
const x = c.$state[d], E = C.$state[d];
|
|
2323
|
+
typeof x == "object" && fe(x) && fe(E) ? on(x, E) : c.$state[d] = E;
|
|
2324
2324
|
}
|
|
2325
|
-
Me(C,
|
|
2326
|
-
}), Object.keys(C.$state).forEach((
|
|
2327
|
-
|
|
2328
|
-
}), u = !1,
|
|
2325
|
+
Me(C, d, Ze(c.$state, d));
|
|
2326
|
+
}), Object.keys(C.$state).forEach((d) => {
|
|
2327
|
+
d in c.$state || qe(C, d);
|
|
2328
|
+
}), u = !1, p = !1, n.state.value[e] = Ze(c._hmrPayload, "hotState"), p = !0, Q().then(() => {
|
|
2329
2329
|
u = !0;
|
|
2330
2330
|
});
|
|
2331
|
-
for (const
|
|
2332
|
-
const x = d
|
|
2333
|
-
Me(C,
|
|
2331
|
+
for (const d in c._hmrPayload.actions) {
|
|
2332
|
+
const x = c[d];
|
|
2333
|
+
Me(C, d, D(d, x));
|
|
2334
2334
|
}
|
|
2335
|
-
for (const
|
|
2336
|
-
const x =
|
|
2335
|
+
for (const d in c._hmrPayload.getters) {
|
|
2336
|
+
const x = c._hmrPayload.getters[d], E = i ? (
|
|
2337
2337
|
// special handling of options api
|
|
2338
|
-
|
|
2338
|
+
w(() => (Ie(n), x.call(C, C)))
|
|
2339
2339
|
) : x;
|
|
2340
|
-
Me(C,
|
|
2340
|
+
Me(C, d, E);
|
|
2341
2341
|
}
|
|
2342
|
-
Object.keys(C._hmrPayload.getters).forEach((
|
|
2343
|
-
|
|
2344
|
-
}), Object.keys(C._hmrPayload.actions).forEach((
|
|
2345
|
-
|
|
2346
|
-
}), C._hmrPayload =
|
|
2342
|
+
Object.keys(C._hmrPayload.getters).forEach((d) => {
|
|
2343
|
+
d in c._hmrPayload.getters || qe(C, d);
|
|
2344
|
+
}), Object.keys(C._hmrPayload.actions).forEach((d) => {
|
|
2345
|
+
d in c._hmrPayload.actions || qe(C, d);
|
|
2346
|
+
}), C._hmrPayload = c._hmrPayload, C._getters = c._getters, C._hotUpdating = !1;
|
|
2347
2347
|
})), Ee) {
|
|
2348
|
-
const
|
|
2348
|
+
const c = {
|
|
2349
2349
|
writable: !0,
|
|
2350
2350
|
configurable: !0,
|
|
2351
2351
|
// avoid warning on devtools trying to display this property
|
|
2352
2352
|
enumerable: !1
|
|
2353
2353
|
};
|
|
2354
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((
|
|
2355
|
-
Object.defineProperty(C,
|
|
2354
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((d) => {
|
|
2355
|
+
Object.defineProperty(C, d, J({ value: C[d] }, c));
|
|
2356
2356
|
});
|
|
2357
2357
|
}
|
|
2358
|
-
return n._p.forEach((
|
|
2358
|
+
return n._p.forEach((c) => {
|
|
2359
2359
|
if (Ee) {
|
|
2360
|
-
const
|
|
2360
|
+
const d = r.run(() => c({
|
|
2361
2361
|
store: C,
|
|
2362
2362
|
app: n._a,
|
|
2363
2363
|
pinia: n,
|
|
2364
|
-
options:
|
|
2364
|
+
options: l
|
|
2365
2365
|
}));
|
|
2366
|
-
Object.keys(
|
|
2366
|
+
Object.keys(d || {}).forEach((x) => C._customProperties.add(x)), J(C, d);
|
|
2367
2367
|
} else
|
|
2368
|
-
J(C,
|
|
2368
|
+
J(C, r.run(() => c({
|
|
2369
2369
|
store: C,
|
|
2370
2370
|
app: n._a,
|
|
2371
2371
|
pinia: n,
|
|
2372
|
-
options:
|
|
2372
|
+
options: l
|
|
2373
2373
|
})));
|
|
2374
2374
|
}), process.env.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2375
2375
|
state: () => new MyClass()
|
|
2376
|
-
Found in store "${C.$id}".`),
|
|
2376
|
+
Found in store "${C.$id}".`), m && i && t.hydrate && t.hydrate(C.$state, m), u = !0, p = !0, C;
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2379
|
-
let n,
|
|
2380
|
-
const
|
|
2378
|
+
function it(e, o, t) {
|
|
2379
|
+
let n, s;
|
|
2380
|
+
const i = typeof o == "function";
|
|
2381
2381
|
if (typeof e == "string")
|
|
2382
|
-
n = e,
|
|
2383
|
-
else if (
|
|
2382
|
+
n = e, s = i ? t : o;
|
|
2383
|
+
else if (s = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2384
2384
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2385
|
-
function
|
|
2386
|
-
const u =
|
|
2387
|
-
if (
|
|
2385
|
+
function r(l, a) {
|
|
2386
|
+
const u = pn();
|
|
2387
|
+
if (l = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2388
2388
|
// pinia instance with getActivePinia()
|
|
2389
|
-
(process.env.NODE_ENV === "test" && we && we._testing ? null :
|
|
2389
|
+
(process.env.NODE_ENV === "test" && we && we._testing ? null : l) || (u ? Le(qt, null) : null), l && Ie(l), process.env.NODE_ENV !== "production" && !we)
|
|
2390
2390
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2391
2391
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2392
2392
|
This will fail in production.`);
|
|
2393
|
-
|
|
2394
|
-
const
|
|
2393
|
+
l = we, l._s.has(n) || (i ? Qe(n, o, s, l) : _t(n, s, l), process.env.NODE_ENV !== "production" && (r._pinia = l));
|
|
2394
|
+
const p = l._s.get(n);
|
|
2395
2395
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2396
|
-
const
|
|
2397
|
-
a._hotUpdate(
|
|
2396
|
+
const f = "__hot:" + n, v = i ? Qe(f, o, s, l, !0) : _t(f, J({}, s), l, !0);
|
|
2397
|
+
a._hotUpdate(v), delete l.state.value[f], l._s.delete(f);
|
|
2398
2398
|
}
|
|
2399
2399
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
2400
|
-
const
|
|
2401
|
-
if (
|
|
2400
|
+
const f = $t();
|
|
2401
|
+
if (f && f.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2402
2402
|
!a) {
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2403
|
+
const v = f.proxy, h = "_pStores" in v ? v._pStores : v._pStores = {};
|
|
2404
|
+
h[n] = p;
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
|
-
return
|
|
2407
|
+
return p;
|
|
2408
2408
|
}
|
|
2409
|
-
return
|
|
2409
|
+
return r.$id = n, r;
|
|
2410
2410
|
}
|
|
2411
|
-
const He =
|
|
2412
|
-
const e =
|
|
2411
|
+
const He = it("language", () => {
|
|
2412
|
+
const e = S("auto"), o = S("en"), t = S({
|
|
2413
2413
|
src: [],
|
|
2414
2414
|
target: []
|
|
2415
|
-
}), n =
|
|
2416
|
-
function
|
|
2415
|
+
}), n = w(() => t.value.src[e.value]), s = w(() => t.value.target[o.value]);
|
|
2416
|
+
function i(a, u) {
|
|
2417
2417
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function r() {
|
|
2420
2420
|
if (!t.value.src[o.value] || !t.value.target[e.value]) return;
|
|
2421
2421
|
const a = e.value;
|
|
2422
2422
|
e.value = o.value, o.value = a;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function l(a) {
|
|
2425
2425
|
return t.value.src[a] || t.value.target[a];
|
|
2426
2426
|
}
|
|
2427
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2427
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: s, init: i, swap: r, getLabel: l };
|
|
2428
2428
|
}), h2 = {
|
|
2429
2429
|
key: 0,
|
|
2430
2430
|
class: "flex"
|
|
@@ -2435,96 +2435,47 @@ const He = rt("language", () => {
|
|
|
2435
2435
|
function t() {
|
|
2436
2436
|
o.swap();
|
|
2437
2437
|
}
|
|
2438
|
-
return (n,
|
|
2439
|
-
|
|
2440
|
-
modelValue:
|
|
2441
|
-
"onUpdate:modelValue":
|
|
2442
|
-
languages:
|
|
2438
|
+
return (n, s) => M(o).languages ? (y(), O("div", h2, [
|
|
2439
|
+
B(ht, {
|
|
2440
|
+
modelValue: M(o).src,
|
|
2441
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => M(o).src = i),
|
|
2442
|
+
languages: M(o).languages.src,
|
|
2443
2443
|
class: "grow"
|
|
2444
2444
|
}, null, 8, ["modelValue", "languages"]),
|
|
2445
|
-
|
|
2446
|
-
isBidirect:
|
|
2445
|
+
B(jo, {
|
|
2446
|
+
isBidirect: M(o).src !== "auto",
|
|
2447
2447
|
class: "grow-0 mx-3",
|
|
2448
2448
|
onSwap: t
|
|
2449
2449
|
}, null, 8, ["isBidirect"]),
|
|
2450
|
-
|
|
2451
|
-
modelValue:
|
|
2452
|
-
"onUpdate:modelValue":
|
|
2453
|
-
languages:
|
|
2450
|
+
B(ht, {
|
|
2451
|
+
modelValue: M(o).target,
|
|
2452
|
+
"onUpdate:modelValue": s[1] || (s[1] = (i) => M(o).target = i),
|
|
2453
|
+
languages: M(o).languages.target,
|
|
2454
2454
|
class: "grow"
|
|
2455
2455
|
}, null, 8, ["modelValue", "languages"])
|
|
2456
|
-
])) :
|
|
2456
|
+
])) : X("", !0);
|
|
2457
2457
|
}
|
|
2458
2458
|
}, g2 = {
|
|
2459
2459
|
INPUT_MAX_LENGTH: 5e3,
|
|
2460
2460
|
INPUT_DEBOUNCE: 500
|
|
2461
2461
|
}, ze = (e, o) => {
|
|
2462
2462
|
const t = e.__vccOpts || e;
|
|
2463
|
-
for (const [n,
|
|
2464
|
-
t[n] =
|
|
2463
|
+
for (const [n, s] of o)
|
|
2464
|
+
t[n] = s;
|
|
2465
2465
|
return t;
|
|
2466
2466
|
}, b2 = {}, C2 = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2467
2467
|
function _2(e, o) {
|
|
2468
|
-
return
|
|
2469
|
-
}
|
|
2470
|
-
const x2 = /* @__PURE__ */ ze(b2, [["render", _2]]), y2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e", w2 = "data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e";
|
|
2471
|
-
function E2(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, interrupt: l = !1, autoplay: r = !1, onload: i, ...s } = {}) {
|
|
2472
|
-
const a = E(null), u = E(!1), v = E(null), c = E(null);
|
|
2473
|
-
function p() {
|
|
2474
|
-
var L;
|
|
2475
|
-
typeof i == "function" && i.call(this), v.value = (v.value || ((L = c.value) == null ? void 0 : L.duration()) || 0) * 1e3, r === !0 && (u.value = !0);
|
|
2476
|
-
}
|
|
2477
|
-
return ve(async () => {
|
|
2478
|
-
const L = await import("./howler-DJIW9wc6.js").then((I) => I.h);
|
|
2479
|
-
a.value = L.default.Howl, c.value = new a.value({
|
|
2480
|
-
src: T(e),
|
|
2481
|
-
volume: T(o),
|
|
2482
|
-
rate: T(t),
|
|
2483
|
-
onload: p,
|
|
2484
|
-
...s
|
|
2485
|
-
});
|
|
2486
|
-
}), F(
|
|
2487
|
-
() => [e],
|
|
2488
|
-
() => {
|
|
2489
|
-
a.value && a.value && c && c.value && (c.value = new a.value({
|
|
2490
|
-
src: T(e),
|
|
2491
|
-
volume: T(o),
|
|
2492
|
-
rate: T(t),
|
|
2493
|
-
onload: p,
|
|
2494
|
-
...s
|
|
2495
|
-
}));
|
|
2496
|
-
}
|
|
2497
|
-
), F(
|
|
2498
|
-
() => [T(o), T(t)],
|
|
2499
|
-
() => {
|
|
2500
|
-
c.value && (c.value.volume(T(o)), c.value.rate(T(t)));
|
|
2501
|
-
}
|
|
2502
|
-
), {
|
|
2503
|
-
play: (L) => {
|
|
2504
|
-
typeof L > "u" && (L = {}), !(!c.value || !n && !L.forceSoundEnabled) && (l && c.value.stop(), L.playbackRate && c.value.rate(L.playbackRate), c.value.play(L.id), c.value.once("end", () => {
|
|
2505
|
-
c.value && c.value && !c.value.playing() && (u.value = !1);
|
|
2506
|
-
}), u.value = !0);
|
|
2507
|
-
},
|
|
2508
|
-
sound: c,
|
|
2509
|
-
isPlaying: u,
|
|
2510
|
-
duration: v,
|
|
2511
|
-
pause: (L) => {
|
|
2512
|
-
c.value && (c.value.pause(typeof L == "number" ? L : void 0), u.value = !1);
|
|
2513
|
-
},
|
|
2514
|
-
stop: (L) => {
|
|
2515
|
-
c.value && (c.value.stop(typeof L == "number" ? L : void 0), u.value = !1);
|
|
2516
|
-
}
|
|
2517
|
-
};
|
|
2468
|
+
return y(), O("span", C2);
|
|
2518
2469
|
}
|
|
2519
|
-
const
|
|
2470
|
+
const x2 = /* @__PURE__ */ ze(b2, [["render", _2]]), y2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e", w2 = "data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e", E2 = {
|
|
2520
2471
|
key: 0,
|
|
2521
2472
|
src: y2,
|
|
2522
2473
|
alt: "Play"
|
|
2523
|
-
},
|
|
2474
|
+
}, S2 = {
|
|
2524
2475
|
key: 1,
|
|
2525
2476
|
src: w2,
|
|
2526
2477
|
alt: "Stop"
|
|
2527
|
-
},
|
|
2478
|
+
}, O2 = {
|
|
2528
2479
|
__name: "SpeakBtn",
|
|
2529
2480
|
props: {
|
|
2530
2481
|
url: {
|
|
@@ -2533,62 +2484,61 @@ const S2 = {
|
|
|
2533
2484
|
}
|
|
2534
2485
|
},
|
|
2535
2486
|
setup(e) {
|
|
2536
|
-
const o = e,
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
(
|
|
2540
|
-
|
|
2487
|
+
const o = e, t = S(!1);
|
|
2488
|
+
let n = new Audio(o.url);
|
|
2489
|
+
H(
|
|
2490
|
+
() => o.url,
|
|
2491
|
+
(i) => {
|
|
2492
|
+
n = new Audio(i);
|
|
2541
2493
|
}
|
|
2542
2494
|
);
|
|
2543
|
-
function
|
|
2544
|
-
|
|
2545
|
-
n();
|
|
2546
|
-
return;
|
|
2547
|
-
}
|
|
2548
|
-
t();
|
|
2495
|
+
function s() {
|
|
2496
|
+
t.value ? (n.pause(), n.currentTime = 0, t.value = !1) : (n.play(), t.value = !0);
|
|
2549
2497
|
}
|
|
2550
|
-
return
|
|
2498
|
+
return n.onended = () => {
|
|
2499
|
+
t.value = !1;
|
|
2500
|
+
}, (i, r) => (y(), O("button", {
|
|
2551
2501
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2552
|
-
onClick:
|
|
2502
|
+
onClick: vn(s, ["prevent"])
|
|
2553
2503
|
}, [
|
|
2554
|
-
|
|
2504
|
+
t.value ? (y(), O("img", S2)) : (y(), O("img", E2))
|
|
2555
2505
|
]));
|
|
2556
2506
|
}
|
|
2557
|
-
},
|
|
2558
|
-
src:
|
|
2507
|
+
}, $2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", I2 = {}, L2 = { class: "btn btn-xs btn-circle btn-ghost" }, T2 = /* @__PURE__ */ g("img", {
|
|
2508
|
+
src: $2,
|
|
2559
2509
|
alt: "Clear",
|
|
2560
2510
|
class: "w-4"
|
|
2561
|
-
}, null, -1),
|
|
2562
|
-
|
|
2511
|
+
}, null, -1), V2 = [
|
|
2512
|
+
T2
|
|
2563
2513
|
];
|
|
2564
|
-
function
|
|
2565
|
-
return
|
|
2514
|
+
function P2(e, o) {
|
|
2515
|
+
return y(), O("button", L2, V2);
|
|
2566
2516
|
}
|
|
2567
|
-
const
|
|
2517
|
+
const M2 = /* @__PURE__ */ ze(I2, [["render", P2]]), k2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e", R2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", N2 = { class: "btn btn-xs btn-circle btn-ghost" }, A2 = {
|
|
2568
2518
|
key: 0,
|
|
2569
|
-
src:
|
|
2519
|
+
src: k2,
|
|
2570
2520
|
alt: "Clear",
|
|
2571
2521
|
class: "w-4"
|
|
2572
|
-
},
|
|
2522
|
+
}, D2 = {
|
|
2573
2523
|
key: 1,
|
|
2574
|
-
src:
|
|
2524
|
+
src: R2,
|
|
2575
2525
|
alt: "Clear",
|
|
2576
2526
|
class: "w-4"
|
|
2577
|
-
},
|
|
2527
|
+
}, F2 = {
|
|
2578
2528
|
__name: "FavoriteBtn",
|
|
2579
2529
|
props: {
|
|
2580
2530
|
isFilled: Boolean
|
|
2581
2531
|
},
|
|
2582
2532
|
setup(e) {
|
|
2583
2533
|
const o = e;
|
|
2584
|
-
return (t, n) => (
|
|
2585
|
-
o.isFilled ? (
|
|
2534
|
+
return (t, n) => (y(), O("button", N2, [
|
|
2535
|
+
o.isFilled ? (y(), O("img", A2)) : (y(), O("img", D2))
|
|
2586
2536
|
]));
|
|
2587
2537
|
}
|
|
2588
|
-
},
|
|
2538
|
+
}, j2 = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, B2 = { class: "text-sm text-gray-600" }, H2 = {
|
|
2589
2539
|
key: 0,
|
|
2590
2540
|
class: "italic"
|
|
2591
|
-
},
|
|
2541
|
+
}, z2 = /* @__PURE__ */ g("div", { class: "flex-grow" }, null, -1), ln = {
|
|
2592
2542
|
__name: "TranslationBtnGroup",
|
|
2593
2543
|
props: {
|
|
2594
2544
|
loading: {
|
|
@@ -2632,101 +2582,101 @@ const k2 = /* @__PURE__ */ ze(L2, [["render", M2]]), R2 = "data:image/svg+xml,%3
|
|
|
2632
2582
|
emits: ["clear", "favorite"],
|
|
2633
2583
|
setup(e, { emit: o }) {
|
|
2634
2584
|
const t = e, n = o;
|
|
2635
|
-
return (
|
|
2636
|
-
t.tts ? (
|
|
2585
|
+
return (s, i) => (y(), O("div", j2, [
|
|
2586
|
+
t.tts ? (y(), ee(O2, {
|
|
2637
2587
|
key: 0,
|
|
2638
2588
|
url: t.tts
|
|
2639
|
-
}, null, 8, ["url"])) :
|
|
2640
|
-
g("div",
|
|
2641
|
-
hn(
|
|
2642
|
-
e.phonetic ? (
|
|
2589
|
+
}, null, 8, ["url"])) : X("", !0),
|
|
2590
|
+
g("div", B2, [
|
|
2591
|
+
hn(te(e.srcLabel) + " ", 1),
|
|
2592
|
+
e.phonetic ? (y(), O("span", H2, "- [" + te(t.phonetic) + "]", 1)) : X("", !0)
|
|
2643
2593
|
]),
|
|
2644
|
-
|
|
2645
|
-
t.loading ? (
|
|
2646
|
-
t.src && t.isClearBtn ? (
|
|
2594
|
+
z2,
|
|
2595
|
+
t.loading ? (y(), ee(x2, { key: 1 })) : X("", !0),
|
|
2596
|
+
t.src && t.isClearBtn ? (y(), ee(M2, {
|
|
2647
2597
|
key: 2,
|
|
2648
|
-
onClick:
|
|
2649
|
-
})) :
|
|
2650
|
-
t.src && t.isFavoriteBtn ? (
|
|
2598
|
+
onClick: i[0] || (i[0] = (r) => n("clear"))
|
|
2599
|
+
})) : X("", !0),
|
|
2600
|
+
t.src && t.isFavoriteBtn ? (y(), ee(F2, {
|
|
2651
2601
|
key: 3,
|
|
2652
2602
|
isFilled: t.isFavorite,
|
|
2653
|
-
onClick:
|
|
2654
|
-
}, null, 8, ["isFilled"])) :
|
|
2603
|
+
onClick: i[1] || (i[1] = (r) => n("favorite"))
|
|
2604
|
+
}, null, 8, ["isFilled"])) : X("", !0)
|
|
2655
2605
|
]));
|
|
2656
2606
|
}
|
|
2657
|
-
},
|
|
2658
|
-
const e =
|
|
2607
|
+
}, he = it("translation", () => {
|
|
2608
|
+
const e = S(null), o = S(null), t = S({
|
|
2659
2609
|
src: null,
|
|
2660
2610
|
target: null
|
|
2661
|
-
}), n =
|
|
2611
|
+
}), n = S(null), s = S([]), i = S([]), r = S([]), l = S([]), a = S({
|
|
2662
2612
|
src: null,
|
|
2663
2613
|
target: null
|
|
2664
|
-
}), u = He(),
|
|
2665
|
-
function
|
|
2666
|
-
e.value =
|
|
2614
|
+
}), u = He(), p = w(() => u.getLabel(e.value)), f = w(() => u.getLabel(o.value));
|
|
2615
|
+
function v(m) {
|
|
2616
|
+
e.value = m.src, o.value = m.target, t.value = m.phonetic, n.value = m.result, s.value = m.dictionary, i.value = m.definitions, r.value = m.synonyms, l.value = m.examples, a.value = m.tts;
|
|
2667
2617
|
}
|
|
2668
|
-
function
|
|
2618
|
+
function h() {
|
|
2669
2619
|
e.value = null, o.value = null, t.value = {
|
|
2670
2620
|
src: null,
|
|
2671
2621
|
target: null
|
|
2672
|
-
}, n.value = null,
|
|
2622
|
+
}, n.value = null, s.value = [], i.value = [], r.value = [], l.value = [], a.value = {
|
|
2673
2623
|
src: null,
|
|
2674
2624
|
target: null
|
|
2675
2625
|
};
|
|
2676
2626
|
}
|
|
2677
2627
|
return {
|
|
2678
2628
|
src: e,
|
|
2679
|
-
srcLabel:
|
|
2629
|
+
srcLabel: p,
|
|
2680
2630
|
target: o,
|
|
2681
|
-
targetLabel:
|
|
2631
|
+
targetLabel: f,
|
|
2682
2632
|
phonetic: t,
|
|
2683
2633
|
result: n,
|
|
2684
|
-
dictionary:
|
|
2685
|
-
definitions:
|
|
2686
|
-
synonyms:
|
|
2687
|
-
examples:
|
|
2634
|
+
dictionary: s,
|
|
2635
|
+
definitions: i,
|
|
2636
|
+
synonyms: r,
|
|
2637
|
+
examples: l,
|
|
2688
2638
|
tts: a,
|
|
2689
|
-
init:
|
|
2690
|
-
reset:
|
|
2639
|
+
init: v,
|
|
2640
|
+
reset: h
|
|
2691
2641
|
};
|
|
2692
2642
|
});
|
|
2693
|
-
function
|
|
2643
|
+
function U2(e) {
|
|
2694
2644
|
return It() ? (Xe(e), !0) : !1;
|
|
2695
2645
|
}
|
|
2696
2646
|
function Fe(e) {
|
|
2697
|
-
return typeof e == "function" ? e() :
|
|
2647
|
+
return typeof e == "function" ? e() : M(e);
|
|
2698
2648
|
}
|
|
2699
|
-
const
|
|
2649
|
+
const Z2 = typeof window < "u" && typeof document < "u";
|
|
2700
2650
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2701
2651
|
const xt = () => {
|
|
2702
2652
|
};
|
|
2703
|
-
function
|
|
2653
|
+
function W2(e, o) {
|
|
2704
2654
|
function t(...n) {
|
|
2705
|
-
return new Promise((
|
|
2706
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(
|
|
2655
|
+
return new Promise((s, i) => {
|
|
2656
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(s).catch(i);
|
|
2707
2657
|
});
|
|
2708
2658
|
}
|
|
2709
2659
|
return t;
|
|
2710
2660
|
}
|
|
2711
|
-
function
|
|
2712
|
-
let t, n,
|
|
2713
|
-
const
|
|
2714
|
-
clearTimeout(
|
|
2661
|
+
function G2(e, o = {}) {
|
|
2662
|
+
let t, n, s = xt;
|
|
2663
|
+
const i = (l) => {
|
|
2664
|
+
clearTimeout(l), s(), s = xt;
|
|
2715
2665
|
};
|
|
2716
|
-
return (
|
|
2666
|
+
return (l) => {
|
|
2717
2667
|
const a = Fe(e), u = Fe(o.maxWait);
|
|
2718
|
-
return t &&
|
|
2719
|
-
|
|
2720
|
-
t &&
|
|
2668
|
+
return t && i(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (i(n), n = null), Promise.resolve(l())) : new Promise((p, f) => {
|
|
2669
|
+
s = o.rejectOnCancel ? f : p, u && !n && (n = setTimeout(() => {
|
|
2670
|
+
t && i(t), n = null, p(l());
|
|
2721
2671
|
}, u)), t = setTimeout(() => {
|
|
2722
|
-
n &&
|
|
2672
|
+
n && i(n), n = null, p(l());
|
|
2723
2673
|
}, a);
|
|
2724
2674
|
});
|
|
2725
2675
|
};
|
|
2726
2676
|
}
|
|
2727
|
-
function
|
|
2728
|
-
return
|
|
2729
|
-
|
|
2677
|
+
function q2(e, o = 200, t = {}) {
|
|
2678
|
+
return W2(
|
|
2679
|
+
G2(o, t),
|
|
2730
2680
|
e
|
|
2731
2681
|
);
|
|
2732
2682
|
}
|
|
@@ -2735,60 +2685,60 @@ function yt(e) {
|
|
|
2735
2685
|
const t = Fe(e);
|
|
2736
2686
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2737
2687
|
}
|
|
2738
|
-
const
|
|
2739
|
-
function
|
|
2740
|
-
const e =
|
|
2741
|
-
return o &&
|
|
2688
|
+
const J2 = Z2 ? window : void 0;
|
|
2689
|
+
function K2() {
|
|
2690
|
+
const e = S(!1), o = $t();
|
|
2691
|
+
return o && xe(() => {
|
|
2742
2692
|
e.value = !0;
|
|
2743
2693
|
}, o), e;
|
|
2744
2694
|
}
|
|
2745
|
-
function
|
|
2746
|
-
const o =
|
|
2747
|
-
return
|
|
2695
|
+
function Y2(e) {
|
|
2696
|
+
const o = K2();
|
|
2697
|
+
return w(() => (o.value, !!e()));
|
|
2748
2698
|
}
|
|
2749
|
-
function
|
|
2750
|
-
const { window: n =
|
|
2751
|
-
let
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2754
|
-
}, a =
|
|
2699
|
+
function Q2(e, o, t = {}) {
|
|
2700
|
+
const { window: n = J2, ...s } = t;
|
|
2701
|
+
let i;
|
|
2702
|
+
const r = Y2(() => n && "ResizeObserver" in n), l = () => {
|
|
2703
|
+
i && (i.disconnect(), i = void 0);
|
|
2704
|
+
}, a = w(() => Array.isArray(e) ? e.map((f) => yt(f)) : [yt(e)]), u = H(
|
|
2755
2705
|
a,
|
|
2756
|
-
(
|
|
2757
|
-
if (
|
|
2758
|
-
|
|
2759
|
-
for (const
|
|
2760
|
-
|
|
2706
|
+
(f) => {
|
|
2707
|
+
if (l(), r.value && n) {
|
|
2708
|
+
i = new ResizeObserver(o);
|
|
2709
|
+
for (const v of f)
|
|
2710
|
+
v && i.observe(v, s);
|
|
2761
2711
|
}
|
|
2762
2712
|
},
|
|
2763
2713
|
{ immediate: !0, flush: "post" }
|
|
2764
|
-
),
|
|
2765
|
-
|
|
2714
|
+
), p = () => {
|
|
2715
|
+
l(), u();
|
|
2766
2716
|
};
|
|
2767
|
-
return
|
|
2768
|
-
isSupported:
|
|
2769
|
-
stop:
|
|
2717
|
+
return U2(p), {
|
|
2718
|
+
isSupported: r,
|
|
2719
|
+
stop: p
|
|
2770
2720
|
};
|
|
2771
2721
|
}
|
|
2772
2722
|
function rn(e) {
|
|
2773
2723
|
var o;
|
|
2774
|
-
const t =
|
|
2775
|
-
function
|
|
2776
|
-
var
|
|
2724
|
+
const t = S(e == null ? void 0 : e.element), n = S(e == null ? void 0 : e.input), s = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", i = S(1);
|
|
2725
|
+
function r() {
|
|
2726
|
+
var l;
|
|
2777
2727
|
if (!t.value)
|
|
2778
2728
|
return;
|
|
2779
2729
|
let a = "";
|
|
2780
|
-
t.value.style[
|
|
2730
|
+
t.value.style[s] = "1px", i.value = (l = t.value) == null ? void 0 : l.scrollHeight, e != null && e.styleTarget ? Fe(e.styleTarget).style[s] = `${i.value}px` : a = `${i.value}px`, t.value.style[s] = a;
|
|
2781
2731
|
}
|
|
2782
|
-
return
|
|
2783
|
-
var
|
|
2784
|
-
return (
|
|
2785
|
-
}),
|
|
2732
|
+
return H([n, t], () => Q(r), { immediate: !0 }), H(i, () => {
|
|
2733
|
+
var l;
|
|
2734
|
+
return (l = e == null ? void 0 : e.onResize) == null ? void 0 : l.call(e);
|
|
2735
|
+
}), Q2(t, () => r()), e != null && e.watch && H(e.watch, r, { immediate: !0, deep: !0 }), {
|
|
2786
2736
|
textarea: t,
|
|
2787
2737
|
input: n,
|
|
2788
|
-
triggerResize:
|
|
2738
|
+
triggerResize: r
|
|
2789
2739
|
};
|
|
2790
2740
|
}
|
|
2791
|
-
const
|
|
2741
|
+
const X2 = {
|
|
2792
2742
|
__name: "TranslationInput",
|
|
2793
2743
|
props: {
|
|
2794
2744
|
text: {
|
|
@@ -2798,158 +2748,161 @@ const el = {
|
|
|
2798
2748
|
},
|
|
2799
2749
|
emits: ["change", "clear"],
|
|
2800
2750
|
setup(e, { emit: o }) {
|
|
2801
|
-
const t =
|
|
2802
|
-
var
|
|
2803
|
-
return (
|
|
2804
|
-
}), a =
|
|
2805
|
-
var
|
|
2806
|
-
return (
|
|
2807
|
-
}), { textarea: u } = rn({ input:
|
|
2808
|
-
|
|
2751
|
+
const t = he(), n = e, s = S(""), i = w(() => t.src), r = w(() => t.srcLabel), l = w(() => {
|
|
2752
|
+
var $;
|
|
2753
|
+
return ($ = t.phonetic) == null ? void 0 : $.src;
|
|
2754
|
+
}), a = w(() => {
|
|
2755
|
+
var $;
|
|
2756
|
+
return ($ = t.tts) == null ? void 0 : $.src;
|
|
2757
|
+
}), { textarea: u } = rn({ input: s, styleProp: "minHeight" }), p = o, f = q2(() => {
|
|
2758
|
+
p("change", s.value);
|
|
2809
2759
|
}, g2.INPUT_DEBOUNCE);
|
|
2810
|
-
function
|
|
2811
|
-
if (!
|
|
2812
|
-
|
|
2760
|
+
function v() {
|
|
2761
|
+
if (!s.value) {
|
|
2762
|
+
h();
|
|
2813
2763
|
return;
|
|
2814
2764
|
}
|
|
2815
|
-
|
|
2765
|
+
f();
|
|
2766
|
+
}
|
|
2767
|
+
function h() {
|
|
2768
|
+
p("clear"), s.value = "", u.value.focus();
|
|
2816
2769
|
}
|
|
2817
|
-
function m() {
|
|
2818
|
-
|
|
2770
|
+
async function m() {
|
|
2771
|
+
await Q(), u.value.select();
|
|
2819
2772
|
}
|
|
2820
|
-
return
|
|
2773
|
+
return H(
|
|
2821
2774
|
() => n.text,
|
|
2822
|
-
(
|
|
2823
|
-
|
|
2775
|
+
($) => {
|
|
2776
|
+
s.value !== $ && m(), s.value = $;
|
|
2824
2777
|
}
|
|
2825
|
-
), (
|
|
2826
|
-
|
|
2827
|
-
src:
|
|
2828
|
-
srcLabel:
|
|
2778
|
+
), ($, N) => (y(), O(Z, null, [
|
|
2779
|
+
B(ln, {
|
|
2780
|
+
src: i.value,
|
|
2781
|
+
srcLabel: r.value,
|
|
2829
2782
|
tts: a.value,
|
|
2830
|
-
phonetic:
|
|
2783
|
+
phonetic: l.value,
|
|
2831
2784
|
isClearBtn: !0,
|
|
2832
|
-
onClear:
|
|
2785
|
+
onClear: h
|
|
2833
2786
|
}, null, 8, ["src", "srcLabel", "tts", "phonetic"]),
|
|
2834
2787
|
Lt(g("textarea", {
|
|
2835
2788
|
ref_key: "textarea",
|
|
2836
2789
|
ref: u,
|
|
2837
|
-
"onUpdate:modelValue":
|
|
2838
|
-
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
|
|
2790
|
+
"onUpdate:modelValue": N[0] || (N[0] = (R) => s.value = R),
|
|
2791
|
+
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
2839
2792
|
autofocus: "",
|
|
2840
2793
|
rows: "2",
|
|
2841
|
-
onInput:
|
|
2842
|
-
onFocus:
|
|
2794
|
+
onInput: v,
|
|
2795
|
+
onFocus: m
|
|
2843
2796
|
}, null, 544), [
|
|
2844
2797
|
[
|
|
2845
2798
|
Tt,
|
|
2846
|
-
|
|
2799
|
+
s.value,
|
|
2847
2800
|
void 0,
|
|
2848
2801
|
{ trim: !0 }
|
|
2849
2802
|
]
|
|
2850
2803
|
])
|
|
2851
2804
|
], 64));
|
|
2852
2805
|
}
|
|
2853
|
-
},
|
|
2806
|
+
}, es = /* @__PURE__ */ ze(X2, [["__scopeId", "data-v-bfa5aec3"]]), ts = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.2018%204.409H8.2373L7.46364%202H2.79867C2.35907%202%202%202.3595%202%202.7995V10.937C2%2011.376%202.36008%2011.7355%202.79867%2011.7355H7.79971L8.53636%2014H13.2013C13.6404%2014%2014%2013.6465%2014%2013.214V5.195C14%204.7625%2013.6404%204.409%2013.2018%204.409ZM5.3702%208.749C4.33499%208.749%203.49481%207.909%203.49481%206.874C3.49481%205.839%204.33499%204.999%205.3702%204.999C5.87631%204.999%206.3004%205.1865%206.62646%205.487L6.13136%205.963C5.9244%205.77181%205.65196%205.66729%205.3702%205.671C4.71757%205.671%204.18846%206.211%204.18846%206.8755C4.18846%207.54%204.71757%208.08%205.3697%208.08C6.12336%208.08%206.43492%207.54%206.46493%207.176L5.3707%207.175V6.533H7.12607C7.15107%206.648%207.17108%206.7615%207.17108%206.915C7.17108%207.9885%206.45393%208.7495%205.3697%208.7495L5.3702%208.749ZM13.7504%2013.214C13.7504%2013.509%2013.5044%2013.75%2013.2018%2013.75H8.76341L10.5883%2011.735H10.5908L10.2207%2010.584L10.2237%2010.5815C10.2237%2010.5815%2010.5078%2010.3375%2010.8623%209.9615C11.2184%2010.347%2011.6775%2010.811%2012.2716%2011.364L12.6572%2010.978C12.0211%2010.401%2011.555%209.943%2011.2119%209.5755C11.6715%209.032%2012.1381%208.348%2012.2366%207.722H13.2538V7.723H13.2548V7.253H10.9884V6.493H10.2527V7.253H9.15049L8.31432%204.648L8.31732%204.659H13.2018C13.5044%204.659%2013.7504%204.899%2013.7504%205.195V13.214ZM10.5078%209.5585C10.2397%209.8325%2010.0362%209.995%2010.0362%209.995L10.0322%209.997L9.30202%207.723H11.6845C11.531%208.265%2011.1904%208.777%2010.8588%209.175C10.2707%208.479%2010.2687%208.253%2010.2687%208.253H9.6576C9.6576%208.253%209.6826%208.5925%2010.5078%209.5585Z'%20fill='%237E7E7E'/%3e%3c/svg%3e", an = it("loader", () => ({ loading: S(!1) })), ns = (e) => (mn("data-v-6aeed8dd"), e = e(), gn(), e), os = { class: "flex flex-col" }, ss = /* @__PURE__ */ ns(() => /* @__PURE__ */ g("div", { class: "w-full flex align-item-center justify-end" }, [
|
|
2854
2807
|
/* @__PURE__ */ g("span", { class: "text-sm" }, "Powered by Google Translate"),
|
|
2855
2808
|
/* @__PURE__ */ g("img", {
|
|
2856
|
-
src:
|
|
2809
|
+
src: ts,
|
|
2857
2810
|
alt: "Google",
|
|
2858
2811
|
class: "h-5 ml-2"
|
|
2859
2812
|
})
|
|
2860
|
-
], -1)),
|
|
2813
|
+
], -1)), ls = {
|
|
2861
2814
|
__name: "TranslationResult",
|
|
2862
2815
|
props: {
|
|
2863
2816
|
isFavoriteFeatureEnabled: Boolean
|
|
2864
2817
|
},
|
|
2865
2818
|
setup(e) {
|
|
2866
|
-
const o =
|
|
2867
|
-
var
|
|
2868
|
-
return (
|
|
2869
|
-
}),
|
|
2870
|
-
var
|
|
2871
|
-
return (
|
|
2872
|
-
}), a = e, u = an(), { textarea:
|
|
2873
|
-
return (
|
|
2874
|
-
|
|
2875
|
-
loading:
|
|
2876
|
-
src:
|
|
2877
|
-
srcLabel:
|
|
2878
|
-
tts:
|
|
2819
|
+
const o = he(), t = S(!1), n = w(() => o.result), s = w(() => o.target), i = w(() => o.targetLabel), r = w(() => {
|
|
2820
|
+
var v;
|
|
2821
|
+
return (v = o.phonetic) == null ? void 0 : v.target;
|
|
2822
|
+
}), l = w(() => {
|
|
2823
|
+
var v;
|
|
2824
|
+
return (v = o.tts) == null ? void 0 : v.target;
|
|
2825
|
+
}), a = e, u = an(), { textarea: p, input: f } = rn({ input: n, styleProp: "minHeight" });
|
|
2826
|
+
return (v, h) => (y(), O(Z, null, [
|
|
2827
|
+
B(ln, {
|
|
2828
|
+
loading: M(u).loading,
|
|
2829
|
+
src: s.value,
|
|
2830
|
+
srcLabel: i.value,
|
|
2831
|
+
tts: l.value,
|
|
2879
2832
|
isFavoriteBtn: a.isFavoriteFeatureEnabled,
|
|
2880
2833
|
isFavorite: t.value,
|
|
2881
|
-
phonetic:
|
|
2882
|
-
onFavorite:
|
|
2834
|
+
phonetic: r.value,
|
|
2835
|
+
onFavorite: h[0] || (h[0] = (m) => t.value = !t.value)
|
|
2883
2836
|
}, null, 8, ["loading", "src", "srcLabel", "tts", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2884
|
-
g("div",
|
|
2837
|
+
g("div", os, [
|
|
2885
2838
|
Lt(g("textarea", {
|
|
2886
2839
|
ref_key: "textarea",
|
|
2887
|
-
ref:
|
|
2888
|
-
"onUpdate:modelValue":
|
|
2889
|
-
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
|
|
2840
|
+
ref: p,
|
|
2841
|
+
"onUpdate:modelValue": h[1] || (h[1] = (m) => _e(f) ? f.value = m : null),
|
|
2842
|
+
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
2890
2843
|
readonly: "",
|
|
2891
2844
|
rows: "2",
|
|
2892
2845
|
spellcheck: "false"
|
|
2893
2846
|
}, null, 512), [
|
|
2894
|
-
[Tt,
|
|
2847
|
+
[Tt, M(f)]
|
|
2895
2848
|
]),
|
|
2896
|
-
|
|
2849
|
+
ss
|
|
2897
2850
|
])
|
|
2898
2851
|
], 64));
|
|
2899
2852
|
}
|
|
2900
|
-
},
|
|
2853
|
+
}, is = /* @__PURE__ */ ze(ls, [["__scopeId", "data-v-6aeed8dd"]]), rs = { class: "btn btn-sm btn-circle btn-ghost" }, Ue = {
|
|
2901
2854
|
__name: "ToggleBtn",
|
|
2902
2855
|
props: {
|
|
2903
2856
|
isExpanded: Boolean
|
|
2904
2857
|
},
|
|
2905
2858
|
setup(e) {
|
|
2906
2859
|
const o = e;
|
|
2907
|
-
return (t, n) => (
|
|
2908
|
-
o.isExpanded ? (
|
|
2860
|
+
return (t, n) => (y(), O("button", rs, [
|
|
2861
|
+
o.isExpanded ? (y(), ee(M(ko), {
|
|
2909
2862
|
key: 0,
|
|
2910
2863
|
class: "w-7 text-gray-400"
|
|
2911
|
-
})) : (
|
|
2864
|
+
})) : (y(), ee(M(Po), {
|
|
2912
2865
|
key: 1,
|
|
2913
2866
|
class: "w-7 text-gray-400"
|
|
2914
2867
|
}))
|
|
2915
2868
|
]));
|
|
2916
2869
|
}
|
|
2917
|
-
},
|
|
2870
|
+
}, as = { class: "card border bg-white rounded-lg" }, us = { class: "card-body px-4 py-2 gap-0" }, cs = { class: "flex justify-between items-center" }, ds = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), fs = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, ps = { class: "list-none list-inside" }, vs = ["onClick"], hs = { class: "text-base font-normal text-gray-800 leading-4" }, ms = {
|
|
2918
2871
|
__name: "Dictionary",
|
|
2919
2872
|
emits: ["translate"],
|
|
2920
2873
|
setup(e, { emit: o }) {
|
|
2921
|
-
const t =
|
|
2874
|
+
const t = S(!0), n = he(), s = He(), i = w(() => n.dictionary), r = o, l = () => {
|
|
2922
2875
|
t.value = !t.value;
|
|
2923
2876
|
}, a = (u) => {
|
|
2924
|
-
|
|
2877
|
+
r("translate", u, n.target, n.src), s.src = n.target, s.target = n.src;
|
|
2925
2878
|
};
|
|
2926
|
-
return (u,
|
|
2927
|
-
g("div",
|
|
2928
|
-
g("div",
|
|
2929
|
-
|
|
2930
|
-
|
|
2879
|
+
return (u, p) => (y(), O("div", as, [
|
|
2880
|
+
g("div", us, [
|
|
2881
|
+
g("div", cs, [
|
|
2882
|
+
ds,
|
|
2883
|
+
B(Ue, {
|
|
2931
2884
|
isExpanded: t.value,
|
|
2932
|
-
onClick:
|
|
2885
|
+
onClick: l
|
|
2933
2886
|
}, null, 8, ["isExpanded"])
|
|
2934
2887
|
]),
|
|
2935
2888
|
g("div", {
|
|
2936
|
-
class:
|
|
2889
|
+
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2937
2890
|
}, [
|
|
2938
2891
|
g("ul", null, [
|
|
2939
|
-
(
|
|
2940
|
-
key: `${
|
|
2892
|
+
(y(!0), O(Z, null, le(i.value, (f, v) => (y(), O("li", {
|
|
2893
|
+
key: `${f.pos}-${v}`,
|
|
2941
2894
|
class: "mb-2"
|
|
2942
2895
|
}, [
|
|
2943
|
-
g("h5",
|
|
2944
|
-
g("ul",
|
|
2945
|
-
(
|
|
2946
|
-
key: `${
|
|
2896
|
+
g("h5", fs, te(f.pos), 1),
|
|
2897
|
+
g("ul", ps, [
|
|
2898
|
+
(y(!0), O(Z, null, le(f.items, (h, m) => (y(), O("li", {
|
|
2899
|
+
key: `${h.word}-${m}`
|
|
2947
2900
|
}, [
|
|
2948
2901
|
g("span", {
|
|
2949
2902
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2950
|
-
onClick: ($) => a(
|
|
2951
|
-
},
|
|
2952
|
-
g("small",
|
|
2903
|
+
onClick: ($) => a(h.word)
|
|
2904
|
+
}, te(h.word), 9, vs),
|
|
2905
|
+
g("small", hs, " - " + te(h.reverse_translation.join(", ")), 1)
|
|
2953
2906
|
]))), 128))
|
|
2954
2907
|
])
|
|
2955
2908
|
]))), 128))
|
|
@@ -2958,41 +2911,41 @@ const el = {
|
|
|
2958
2911
|
])
|
|
2959
2912
|
]));
|
|
2960
2913
|
}
|
|
2961
|
-
},
|
|
2914
|
+
}, gs = { class: "card border bg-white rounded-lg" }, bs = { class: "card-body px-4 py-2 gap-0" }, Cs = { class: "flex justify-between items-center" }, _s = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), xs = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, ys = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, ws = /* @__PURE__ */ g("br", null, null, -1), Es = {
|
|
2962
2915
|
key: 0,
|
|
2963
2916
|
class: "italic"
|
|
2964
|
-
},
|
|
2917
|
+
}, Ss = {
|
|
2965
2918
|
__name: "Definition",
|
|
2966
2919
|
setup(e) {
|
|
2967
|
-
const o =
|
|
2920
|
+
const o = S(!0), t = he(), n = w(() => t.definitions), s = () => {
|
|
2968
2921
|
o.value = !o.value;
|
|
2969
2922
|
};
|
|
2970
|
-
return (
|
|
2971
|
-
g("div",
|
|
2972
|
-
g("div",
|
|
2973
|
-
|
|
2974
|
-
|
|
2923
|
+
return (i, r) => (y(), O("div", gs, [
|
|
2924
|
+
g("div", bs, [
|
|
2925
|
+
g("div", Cs, [
|
|
2926
|
+
_s,
|
|
2927
|
+
B(Ue, {
|
|
2975
2928
|
isExpanded: o.value,
|
|
2976
|
-
onClick:
|
|
2929
|
+
onClick: s
|
|
2977
2930
|
}, null, 8, ["isExpanded"])
|
|
2978
2931
|
]),
|
|
2979
2932
|
g("div", {
|
|
2980
|
-
class:
|
|
2933
|
+
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2981
2934
|
}, [
|
|
2982
2935
|
g("ul", null, [
|
|
2983
|
-
(
|
|
2984
|
-
key: `${
|
|
2936
|
+
(y(!0), O(Z, null, le(n.value, (l, a) => (y(), O("li", {
|
|
2937
|
+
key: `${l.pos}-${a}`,
|
|
2985
2938
|
class: "mb-2"
|
|
2986
2939
|
}, [
|
|
2987
|
-
g("h5",
|
|
2988
|
-
g("ul",
|
|
2989
|
-
(
|
|
2990
|
-
key: `${u.gloss}-${
|
|
2940
|
+
g("h5", xs, te(l.pos), 1),
|
|
2941
|
+
g("ul", ys, [
|
|
2942
|
+
(y(!0), O(Z, null, le(l.items, (u, p) => (y(), O("li", {
|
|
2943
|
+
key: `${u.gloss}-${p}`,
|
|
2991
2944
|
class: "mb-1"
|
|
2992
2945
|
}, [
|
|
2993
|
-
g("span", null,
|
|
2994
|
-
|
|
2995
|
-
u.example ? (
|
|
2946
|
+
g("span", null, te(u.gloss), 1),
|
|
2947
|
+
ws,
|
|
2948
|
+
u.example ? (y(), O("small", Es, '"' + te(u.example) + '"', 1)) : X("", !0)
|
|
2996
2949
|
]))), 128))
|
|
2997
2950
|
])
|
|
2998
2951
|
]))), 128))
|
|
@@ -3001,72 +2954,72 @@ const el = {
|
|
|
3001
2954
|
])
|
|
3002
2955
|
]));
|
|
3003
2956
|
}
|
|
3004
|
-
},
|
|
2957
|
+
}, Os = { class: "card border bg-white rounded-lg" }, $s = { class: "card-body px-4 py-2 gap-0" }, Is = { class: "flex justify-between items-center" }, Ls = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), Ts = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, Vs = ["innerHTML"], Ps = {
|
|
3005
2958
|
__name: "Example",
|
|
3006
2959
|
setup(e) {
|
|
3007
|
-
const o =
|
|
2960
|
+
const o = S(!0), t = he(), n = w(() => t.examples), s = () => {
|
|
3008
2961
|
o.value = !o.value;
|
|
3009
2962
|
};
|
|
3010
|
-
return (
|
|
3011
|
-
g("div",
|
|
3012
|
-
g("div",
|
|
3013
|
-
|
|
3014
|
-
|
|
2963
|
+
return (i, r) => (y(), O("div", Os, [
|
|
2964
|
+
g("div", $s, [
|
|
2965
|
+
g("div", Is, [
|
|
2966
|
+
Ls,
|
|
2967
|
+
B(Ue, {
|
|
3015
2968
|
isExpanded: o.value,
|
|
3016
|
-
onClick:
|
|
2969
|
+
onClick: s
|
|
3017
2970
|
}, null, 8, ["isExpanded"])
|
|
3018
2971
|
]),
|
|
3019
2972
|
g("div", {
|
|
3020
|
-
class:
|
|
2973
|
+
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3021
2974
|
}, [
|
|
3022
|
-
g("ul",
|
|
3023
|
-
(
|
|
3024
|
-
key: `${
|
|
3025
|
-
innerHTML:
|
|
3026
|
-
}, null, 8,
|
|
2975
|
+
g("ul", Ts, [
|
|
2976
|
+
(y(!0), O(Z, null, le(n.value, (l, a) => (y(), O("li", {
|
|
2977
|
+
key: `${l.definition_id}-${a}`,
|
|
2978
|
+
innerHTML: l
|
|
2979
|
+
}, null, 8, Vs))), 128))
|
|
3027
2980
|
])
|
|
3028
2981
|
], 2)
|
|
3029
2982
|
])
|
|
3030
2983
|
]));
|
|
3031
2984
|
}
|
|
3032
|
-
},
|
|
2985
|
+
}, Ms = { class: "card border bg-white rounded-lg" }, ks = { class: "card-body px-4 py-2 gap-0" }, Rs = { class: "flex justify-between items-center" }, Ns = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), As = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Ds = { class: "list-none list-inside" }, Fs = { class: "flex flex-wrap" }, js = ["onClick"], Bs = {
|
|
3033
2986
|
__name: "Synonyms",
|
|
3034
2987
|
emits: ["translate"],
|
|
3035
2988
|
setup(e, { emit: o }) {
|
|
3036
|
-
const t =
|
|
2989
|
+
const t = S(!0), n = he(), s = w(() => n.synonyms), i = o, r = () => {
|
|
3037
2990
|
t.value = !t.value;
|
|
3038
|
-
},
|
|
3039
|
-
|
|
2991
|
+
}, l = (a) => {
|
|
2992
|
+
i("translate", a);
|
|
3040
2993
|
};
|
|
3041
|
-
return (a, u) => (
|
|
3042
|
-
g("div",
|
|
3043
|
-
g("div",
|
|
3044
|
-
|
|
3045
|
-
|
|
2994
|
+
return (a, u) => (y(), O("div", Ms, [
|
|
2995
|
+
g("div", ks, [
|
|
2996
|
+
g("div", Rs, [
|
|
2997
|
+
Ns,
|
|
2998
|
+
B(Ue, {
|
|
3046
2999
|
isExpanded: t.value,
|
|
3047
|
-
onClick:
|
|
3000
|
+
onClick: r
|
|
3048
3001
|
}, null, 8, ["isExpanded"])
|
|
3049
3002
|
]),
|
|
3050
3003
|
g("div", {
|
|
3051
|
-
class:
|
|
3004
|
+
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3052
3005
|
}, [
|
|
3053
3006
|
g("ul", null, [
|
|
3054
|
-
(
|
|
3055
|
-
key: `${
|
|
3007
|
+
(y(!0), O(Z, null, le(s.value, (p, f) => (y(), O("li", {
|
|
3008
|
+
key: `${p.pos}-${f}`,
|
|
3056
3009
|
class: "mb-2"
|
|
3057
3010
|
}, [
|
|
3058
|
-
g("h5",
|
|
3059
|
-
g("ul",
|
|
3060
|
-
(
|
|
3061
|
-
key: `${
|
|
3011
|
+
g("h5", As, te(p.pos), 1),
|
|
3012
|
+
g("ul", Ds, [
|
|
3013
|
+
(y(!0), O(Z, null, le(p.items, (v, h) => (y(), O("li", {
|
|
3014
|
+
key: `${v.word}-${h}`,
|
|
3062
3015
|
class: "mb-2"
|
|
3063
3016
|
}, [
|
|
3064
|
-
g("div",
|
|
3065
|
-
(
|
|
3066
|
-
key: `${
|
|
3017
|
+
g("div", Fs, [
|
|
3018
|
+
(y(!0), O(Z, null, le(v.synonym, (m, $) => (y(), O("span", {
|
|
3019
|
+
key: `${m}-${$}`,
|
|
3067
3020
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3068
|
-
onClick: (N) =>
|
|
3069
|
-
},
|
|
3021
|
+
onClick: (N) => l(m)
|
|
3022
|
+
}, te(m), 9, js))), 128))
|
|
3070
3023
|
])
|
|
3071
3024
|
]))), 128))
|
|
3072
3025
|
])
|
|
@@ -3076,13 +3029,16 @@ const el = {
|
|
|
3076
3029
|
])
|
|
3077
3030
|
]));
|
|
3078
3031
|
}
|
|
3079
|
-
},
|
|
3032
|
+
}, Hs = { class: "bg-white min-h-screen flex flex-col" }, zs = { class: "py-2 px-5 shadow-lg" }, Us = { class: "px-5 flex-grow" }, Zs = { class: "flex flex-col lg:flex-row lg:gap-2" }, Ws = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Gs = /* @__PURE__ */ g("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), qs = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Js = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Ks = {
|
|
3080
3033
|
key: 0,
|
|
3081
3034
|
class: "w-full my-4"
|
|
3082
|
-
},
|
|
3035
|
+
}, Ys = {
|
|
3036
|
+
key: 1,
|
|
3037
|
+
class: "text-textCustom italic font-medium"
|
|
3038
|
+
}, Qs = /* @__PURE__ */ g("div", { class: "mt-auto py-5 px-5" }, [
|
|
3083
3039
|
/* @__PURE__ */ g("span", { class: "block text-center text-gray-700" }, " The site is not affiliated with Google Translate "),
|
|
3084
3040
|
/* @__PURE__ */ g("span", { class: "block text-center text-gray-700" }, "Since 2011")
|
|
3085
|
-
], -1),
|
|
3041
|
+
], -1), tl = {
|
|
3086
3042
|
__name: "Popup",
|
|
3087
3043
|
props: {
|
|
3088
3044
|
opt: {
|
|
@@ -3104,75 +3060,81 @@ const el = {
|
|
|
3104
3060
|
},
|
|
3105
3061
|
emits: ["opt", "translate", "reader", "settings", "fullscreen"],
|
|
3106
3062
|
setup(e, { emit: o }) {
|
|
3107
|
-
const t = d2(), n =
|
|
3108
|
-
|
|
3109
|
-
() =>
|
|
3110
|
-
(
|
|
3111
|
-
|
|
3063
|
+
const t = d2(), n = he(t), s = He(t), i = an(t), r = e, l = o, a = S("");
|
|
3064
|
+
H(
|
|
3065
|
+
() => r.translation,
|
|
3066
|
+
(v) => {
|
|
3067
|
+
try {
|
|
3068
|
+
i.loading = !1, a.value = v.text, n.init(v);
|
|
3069
|
+
} catch (h) {
|
|
3070
|
+
console.error(h);
|
|
3071
|
+
}
|
|
3112
3072
|
},
|
|
3113
3073
|
{ immediate: !0 }
|
|
3114
|
-
),
|
|
3115
|
-
|
|
3116
|
-
}),
|
|
3117
|
-
|
|
3118
|
-
}),
|
|
3119
|
-
|
|
3074
|
+
), H([() => r.opt, () => r.languages], ([v, h]) => {
|
|
3075
|
+
s.init(v, h), f(a.value);
|
|
3076
|
+
}), H([() => s.src, () => s.target], ([v, h]) => {
|
|
3077
|
+
l("opt", { src: v, target: h }), f(a.value);
|
|
3078
|
+
}), xe(() => {
|
|
3079
|
+
s.init(r.opt, r.languages);
|
|
3120
3080
|
});
|
|
3121
3081
|
function u() {
|
|
3122
3082
|
a.value = "", n.reset();
|
|
3123
3083
|
}
|
|
3124
|
-
function v
|
|
3125
|
-
|
|
3084
|
+
function p(v) {
|
|
3085
|
+
f(v);
|
|
3126
3086
|
}
|
|
3127
|
-
function
|
|
3128
|
-
a.value =
|
|
3129
|
-
src:
|
|
3130
|
-
target:
|
|
3131
|
-
text:
|
|
3132
|
-
});
|
|
3087
|
+
function f(v, h = s.src, m = s.target) {
|
|
3088
|
+
v && (a.value = v, i.loading = !0, l("translate", {
|
|
3089
|
+
src: h,
|
|
3090
|
+
target: m,
|
|
3091
|
+
text: v
|
|
3092
|
+
}));
|
|
3133
3093
|
}
|
|
3134
|
-
return (
|
|
3135
|
-
g("div",
|
|
3136
|
-
|
|
3137
|
-
onReader:
|
|
3138
|
-
onSettings:
|
|
3139
|
-
onFullScreen:
|
|
3094
|
+
return (v, h) => (y(), O("div", Hs, [
|
|
3095
|
+
g("div", zs, [
|
|
3096
|
+
B(Vn, {
|
|
3097
|
+
onReader: h[0] || (h[0] = (m) => l("reader")),
|
|
3098
|
+
onSettings: h[1] || (h[1] = (m) => l("settings")),
|
|
3099
|
+
onFullScreen: h[2] || (h[2] = (m) => l("fullscreen"))
|
|
3140
3100
|
})
|
|
3141
3101
|
]),
|
|
3142
|
-
g("div",
|
|
3143
|
-
|
|
3144
|
-
g("div",
|
|
3145
|
-
g("div",
|
|
3146
|
-
|
|
3102
|
+
g("div", Us, [
|
|
3103
|
+
B(m2, { class: "my-4" }),
|
|
3104
|
+
g("div", Zs, [
|
|
3105
|
+
g("div", Ws, [
|
|
3106
|
+
B(es, {
|
|
3147
3107
|
text: a.value,
|
|
3148
|
-
onChange:
|
|
3108
|
+
onChange: p,
|
|
3149
3109
|
onClear: u
|
|
3150
3110
|
}, null, 8, ["text"])
|
|
3151
3111
|
]),
|
|
3152
|
-
|
|
3153
|
-
g("div",
|
|
3154
|
-
|
|
3112
|
+
Gs,
|
|
3113
|
+
g("div", qs, [
|
|
3114
|
+
B(is, { isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled }, null, 8, ["isFavoriteFeatureEnabled"])
|
|
3155
3115
|
])
|
|
3156
3116
|
]),
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3117
|
+
r.translation ? (y(), O(Z, { key: 0 }, [
|
|
3118
|
+
g("div", Js, [
|
|
3119
|
+
M(n).dictionary.length ? (y(), ee(ms, {
|
|
3120
|
+
key: 0,
|
|
3121
|
+
onTranslate: f
|
|
3122
|
+
})) : X("", !0),
|
|
3123
|
+
M(n).definitions.length ? (y(), ee(Ss, { key: 1 })) : X("", !0),
|
|
3124
|
+
M(n).synonyms.length ? (y(), ee(Bs, {
|
|
3125
|
+
key: 2,
|
|
3126
|
+
onTranslate: f
|
|
3127
|
+
})) : X("", !0)
|
|
3128
|
+
]),
|
|
3129
|
+
M(n).examples.length ? (y(), O("div", Ks, [
|
|
3130
|
+
B(Ps)
|
|
3131
|
+
])) : X("", !0)
|
|
3132
|
+
], 64)) : (y(), O("span", Ys, "Service unavailable"))
|
|
3171
3133
|
]),
|
|
3172
|
-
|
|
3134
|
+
Qs
|
|
3173
3135
|
]));
|
|
3174
3136
|
}
|
|
3175
3137
|
};
|
|
3176
3138
|
export {
|
|
3177
|
-
|
|
3139
|
+
tl as default
|
|
3178
3140
|
};
|