vuefinder 2.1.0 → 2.2.0

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/vuefinder.js CHANGED
@@ -1,18 +1,18 @@
1
1
  var Ce = Object.defineProperty;
2
2
  var Se = (p, e, s) => e in p ? Ce(p, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : p[e] = s;
3
3
  var fe = (p, e, s) => (Se(p, typeof e != "symbol" ? e + "" : e, s), s);
4
- import { reactive as le, watch as ie, ref as _, computed as ve, inject as F, openBlock as n, createElementBlock as v, unref as o, createCommentVNode as M, normalizeClass as U, createElementVNode as t, createTextVNode as N, toDisplayString as m, customRef as Me, withModifiers as Y, Fragment as H, renderList as I, withDirectives as q, withKeys as Q, isRef as _e, vModelText as Z, nextTick as de, createVNode as B, TransitionGroup as Ee, withCtx as j, onMounted as P, onUpdated as De, onBeforeUnmount as ke, vShow as ae, normalizeStyle as be, vModelSelect as pe, provide as je, Transition as Ae, createBlock as L, resolveDynamicComponent as Te, renderSlot as ne, onUnmounted as Le, vModelCheckbox as Fe } from "vue";
5
- import Ne from "mitt";
6
- import Ve from "dragselect";
7
- import ze from "vanilla-lazyload";
4
+ import { reactive as ie, watch as de, ref as b, computed as ee, inject as F, openBlock as n, createElementBlock as m, unref as a, createCommentVNode as S, normalizeClass as B, createElementVNode as t, createTextVNode as V, toDisplayString as v, customRef as Me, withModifiers as Y, Fragment as U, renderList as I, withDirectives as q, withKeys as Q, isRef as _e, vModelText as Z, nextTick as ce, createVNode as H, TransitionGroup as Ee, withCtx as j, onMounted as P, onUpdated as De, onBeforeUnmount as ke, vShow as re, normalizeStyle as be, vModelSelect as pe, provide as je, Transition as Ae, createBlock as T, resolveDynamicComponent as Le, renderSlot as le, onUnmounted as Te, vModelCheckbox as Fe } from "vue";
5
+ import Ve from "mitt";
6
+ import Oe from "dragselect";
7
+ import Ne from "vanilla-lazyload";
8
8
  import "cropperjs/dist/cropper.css";
9
- import Oe from "cropperjs";
10
- import Ue from "@uppy/core";
11
- import He from "@uppy/xhr-upload";
9
+ import ze from "cropperjs";
10
+ import Be from "@uppy/core";
11
+ import Ue from "@uppy/xhr-upload";
12
12
  import "microtip/microtip.css";
13
13
  var ge;
14
- const ue = (ge = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : ge.getAttribute("content");
15
- class Be {
14
+ const me = (ge = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : ge.getAttribute("content");
15
+ class He {
16
16
  /** @param {RequestConfig} config */
17
17
  constructor(e) {
18
18
  /** @type {RequestConfig} */
@@ -35,30 +35,30 @@ class Be {
35
35
  */
36
36
  transformRequestParams(e) {
37
37
  const s = this.config, r = {};
38
- ue != null && ue !== "" && (r[s.xsrfHeaderName] = ue);
39
- const a = Object.assign({}, s.headers, r, e.headers), d = Object.assign({}, s.params, e.params), u = e.body, i = s.baseUrl + e.url, l = e.method;
38
+ me != null && me !== "" && (r[s.xsrfHeaderName] = me);
39
+ const o = Object.assign({}, s.headers, r, e.headers), i = Object.assign({}, s.params, e.params), u = e.body, d = s.baseUrl + e.url, l = e.method;
40
40
  let c;
41
- l !== "get" && (u instanceof FormData ? (c = u, s.body != null && Object.entries(this.config.body).forEach(([k, $]) => {
42
- c.append(k, $);
41
+ l !== "get" && (u instanceof FormData ? (c = u, s.body != null && Object.entries(this.config.body).forEach(([_, $]) => {
42
+ c.append(_, $);
43
43
  })) : (c = { ...u }, s.body != null && Object.assign(c, this.config.body)));
44
- const w = {
45
- url: i,
44
+ const g = {
45
+ url: d,
46
46
  method: l,
47
- headers: a,
48
- params: d,
47
+ headers: o,
48
+ params: i,
49
49
  body: c
50
50
  };
51
51
  if (s.transformRequest != null) {
52
- const k = s.transformRequest({
53
- url: i,
52
+ const _ = s.transformRequest({
53
+ url: d,
54
54
  method: l,
55
- headers: a,
56
- params: d,
55
+ headers: o,
56
+ params: i,
57
57
  body: c
58
58
  });
59
- k.url != null && (w.url = k.url), k.method != null && (w.method = k.method), k.params != null && (w.params = k.params ?? {}), k.headers != null && (w.headers = k.headers ?? {}), k.body != null && (w.body = k.body);
59
+ _.url != null && (g.url = _.url), _.method != null && (g.method = _.method), _.params != null && (g.params = _.params ?? {}), _.headers != null && (g.headers = _.headers ?? {}), _.body != null && (g.body = _.body);
60
60
  }
61
- return w;
61
+ return g;
62
62
  }
63
63
  /**
64
64
  * Get download url
@@ -110,16 +110,16 @@ class Be {
110
110
  * @throws {Record<String,?String>|null} resp json error
111
111
  */
112
112
  async send(e) {
113
- const s = this.transformRequestParams(e), r = e.responseType || "json", a = {
113
+ const s = this.transformRequestParams(e), r = e.responseType || "json", o = {
114
114
  method: e.method,
115
115
  headers: s.headers,
116
116
  signal: e.abortSignal
117
- }, d = s.url + "?" + new URLSearchParams(s.params);
117
+ }, i = s.url + "?" + new URLSearchParams(s.params);
118
118
  if (s.method !== "get" && s.body != null) {
119
- let i;
120
- s.body instanceof FormData ? i = e.body : (i = JSON.stringify(s.body), a.headers["Content-Type"] = "application/json"), a.body = i;
119
+ let d;
120
+ s.body instanceof FormData ? d = e.body : (d = JSON.stringify(s.body), o.headers["Content-Type"] = "application/json"), o.body = d;
121
121
  }
122
- const u = await fetch(d, a);
122
+ const u = await fetch(i, o);
123
123
  if (u.ok)
124
124
  return await u[r]();
125
125
  throw await u.json();
@@ -133,46 +133,46 @@ function Re(p) {
133
133
  body: {},
134
134
  xsrfHeaderName: "X-CSRF-Token"
135
135
  };
136
- return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new Be(e);
136
+ return typeof p == "string" ? Object.assign(e, { baseUrl: p }) : Object.assign(e, p), new He(e);
137
137
  }
138
138
  function qe(p) {
139
139
  let e = localStorage.getItem(p + "_storage");
140
- const s = le(JSON.parse(e ?? "{}"));
141
- ie(s, r);
140
+ const s = ie(JSON.parse(e ?? "{}"));
141
+ de(s, r);
142
142
  function r() {
143
143
  Object.keys(s).length ? localStorage.setItem(p + "_storage", JSON.stringify(s)) : localStorage.removeItem(p + "_storage");
144
144
  }
145
- function a(l, c) {
145
+ function o(l, c) {
146
146
  s[l] = c;
147
147
  }
148
- function d(l) {
148
+ function i(l) {
149
149
  delete s[l];
150
150
  }
151
151
  function u() {
152
- Object.keys(s).map((l) => d(l));
152
+ Object.keys(s).map((l) => i(l));
153
153
  }
154
- return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore: a, removeStore: d, clearStore: u };
154
+ return { getStore: (l, c = null) => s.hasOwnProperty(l) ? s[l] : c, setStore: o, removeStore: i, clearStore: u };
155
155
  }
156
156
  async function Ie(p, e) {
157
- let s;
158
- return typeof e[p] == "function" ? s = (await e[p]()).default : s = e[p], s;
157
+ const s = e[p];
158
+ return typeof s == "function" ? (await s()).default : s;
159
159
  }
160
160
  function Pe(p, e, s, r) {
161
- const { getStore: a, setStore: d } = p, u = _({}), i = _(a("locale", e)), l = (k, $ = "en") => {
162
- Ie(k, r).then((y) => {
163
- u.value = y, d("locale", k), i.value = k, d("translations", y), s.emit("vf-toast-push", { label: "The language is set to " + k }), s.emit("vf-language-saved");
161
+ const { getStore: o, setStore: i } = p, u = b({}), d = b(o("locale", e)), l = (_, $ = e) => {
162
+ Ie(_, r).then((y) => {
163
+ u.value = y, i("locale", _), d.value = _, i("translations", y), Object.values(r).length > 1 && (s.emit("vf-toast-push", { label: "The language is set to " + _ }), s.emit("vf-language-saved"));
164
164
  }).catch((y) => {
165
165
  $ ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), l($, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
166
166
  });
167
167
  };
168
- a("locale") ? u.value = a("translations") : l(e);
169
- const c = (k, ...$) => $.length ? c(k = k.replace("%s", $.shift()), ...$) : k;
170
- function w(k, ...$) {
171
- return u.value.hasOwnProperty(k) ? c(u.value[k], ...$) : c(k, ...$);
168
+ !o("locale") && !r.length ? l(e) : u.value = o("translations");
169
+ const c = (_, ...$) => $.length ? c(_ = _.replace("%s", $.shift()), ...$) : _;
170
+ function g(_, ...$) {
171
+ return u.value && u.value.hasOwnProperty(_) ? c(u.value[_], ...$) : c(_, ...$);
172
172
  }
173
- return { t: w, changeLocale: l, locale: i };
173
+ return { t: g, changeLocale: l, locale: d };
174
174
  }
175
- const z = {
175
+ const N = {
176
176
  EDIT: "edit",
177
177
  NEW_FILE: "newfile",
178
178
  NEW_FOLDER: "newfolder",
@@ -183,14 +183,15 @@ const z = {
183
183
  RENAME: "rename",
184
184
  UPLOAD: "upload",
185
185
  DELETE: "delete",
186
+ FULL_SCREEN: "fullscreen",
186
187
  DOWNLOAD: "download",
187
188
  LANGUAGE: "language"
188
- }, Ge = Object.values(z), We = "2.0.1";
189
- function ye(p, e, s, r, a) {
190
- return (e = Math, s = e.log, r = 1024, a = s(p) / s(r) | 0, p / e.pow(r, a)).toFixed(0) + " " + (a ? "KMGTPEZY"[--a] + "iB" : "B");
189
+ }, We = Object.values(N), Ge = "2.2.0";
190
+ function ye(p, e, s, r, o) {
191
+ return (e = Math, s = e.log, r = 1024, o = s(p) / s(r) | 0, p / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "iB" : "B");
191
192
  }
192
- function xe(p, e, s, r, a) {
193
- return (e = Math, s = e.log, r = 1e3, a = s(p) / s(r) | 0, p / e.pow(r, a)).toFixed(0) + " " + (a ? "KMGTPEZY"[--a] + "B" : "B");
193
+ function xe(p, e, s, r, o) {
194
+ return (e = Math, s = e.log, r = 1e3, o = s(p) / s(r) | 0, p / e.pow(r, o)).toFixed(0) + " " + (o ? "KMGTPEZY"[--o] + "B" : "B");
194
195
  }
195
196
  function Ye(p) {
196
197
  const e = { k: 1, m: 2, g: 3, t: 4 }, r = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(p);
@@ -202,12 +203,12 @@ const J = {
202
203
  DARK: "dark"
203
204
  };
204
205
  function Ke(p, e) {
205
- const s = _(J.SYSTEM), r = _(J.LIGHT);
206
+ const s = b(J.SYSTEM), r = b(J.LIGHT);
206
207
  s.value = p.getStore("theme", e ?? J.SYSTEM);
207
- const a = window.matchMedia("(prefers-color-scheme: dark)"), d = (u) => {
208
+ const o = window.matchMedia("(prefers-color-scheme: dark)"), i = (u) => {
208
209
  s.value === J.DARK || s.value === J.SYSTEM && u.matches ? r.value = J.DARK : r.value = J.LIGHT;
209
210
  };
210
- return d(a), a.addEventListener("change", d), {
211
+ return i(o), o.addEventListener("change", i), {
211
212
  /**
212
213
  * @type {import('vue').Ref<Theme>}
213
214
  */
@@ -220,16 +221,15 @@ function Ke(p, e) {
220
221
  * @param {Theme} value
221
222
  */
222
223
  set(u) {
223
- s.value = u, u !== J.SYSTEM ? p.setStore("theme", u) : p.removeStore("theme"), d(a);
224
+ s.value = u, u !== J.SYSTEM ? p.setStore("theme", u) : p.removeStore("theme"), i(o);
224
225
  }
225
226
  };
226
227
  }
227
228
  const Je = (p, e) => {
228
- const s = qe(p.id), r = Ne(), a = s.getStore("metricUnits", !1), d = Ke(s, p.theme), u = ve(() => Pe(s, p.locale, r, e));
229
- let l = ((c) => Array.isArray(c) ? c : Ge)(p.features);
230
- return Object.values(e).length || (l = l.filter((c) => c !== z.LANGUAGE)), le({
229
+ const s = qe(p.id), r = Ve(), o = s.getStore("metricUnits", !1), i = Ke(s, p.theme), u = e.i18n, d = p.locale ?? e.locale, l = ee(() => Pe(s, d, r, u)), c = (_) => Array.isArray(_) ? _ : We, g = p.persist ? s.getStore("path", p.path) : p.path;
230
+ return ie({
231
231
  // app version
232
- version: We,
232
+ version: Ge,
233
233
  // root element
234
234
  root: null,
235
235
  // app id
@@ -237,25 +237,27 @@ const Je = (p, e) => {
237
237
  // Event Bus
238
238
  emitter: r,
239
239
  // active features
240
- features: l,
240
+ features: c(p.features),
241
241
  // http object
242
242
  requester: Re(p.request),
243
243
  // theme state
244
- theme: d,
244
+ theme: i,
245
245
  // view state
246
246
  view: s.getStore("viewport", "grid"),
247
247
  // fullscreen state
248
- fullscreen: s.getStore("full-screen", !1),
248
+ fullScreen: s.getStore("full-screen", p.fullScreen),
249
+ // selectButton state
250
+ selectButton: p.selectButton,
249
251
  // unit state - for example: GB or GiB
250
- metricUnits: a,
252
+ metricUnits: o,
251
253
  // human readable file sizes
252
- filesize: a ? xe : ye,
254
+ filesize: o ? xe : ye,
253
255
  // max file size
254
256
  maxFileSize: p.maxFileSize,
255
257
  // loading state
256
258
  loading: !1,
257
259
  // default locale
258
- i18n: u,
260
+ i18n: l,
259
261
  // modal state
260
262
  modal: {
261
263
  active: !1,
@@ -264,10 +266,16 @@ const Je = (p, e) => {
264
266
  },
265
267
  // main storage adapter
266
268
  adapter: s.getStore("adapter"),
269
+ // main storage adapter
270
+ path: g,
271
+ // persist state
272
+ persist: p.persist,
267
273
  // storage
268
274
  storage: s,
269
275
  // fetched items
270
- data: { adapter: s.getStore("adapter"), storages: [], dirname: ".", files: [] }
276
+ data: { adapter: s.getStore("adapter"), storages: [], dirname: g, files: [] },
277
+ // selected items
278
+ selectedItems: []
271
279
  });
272
280
  }, Xe = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Qe = {
273
281
  key: 0,
@@ -287,7 +295,7 @@ const Je = (p, e) => {
287
295
  })
288
296
  ], -1), tt = [
289
297
  et
290
- ], st = ["aria-label"], ot = /* @__PURE__ */ t("svg", {
298
+ ], st = ["aria-label"], at = /* @__PURE__ */ t("svg", {
291
299
  xmlns: "http://www.w3.org/2000/svg",
292
300
  class: "h-6 w-6 md:h-8 md:w-8 m-auto cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300",
293
301
  fill: "none",
@@ -300,8 +308,8 @@ const Je = (p, e) => {
300
308
  "stroke-linejoin": "round",
301
309
  d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
302
310
  })
303
- ], -1), at = [
304
- ot
311
+ ], -1), ot = [
312
+ at
305
313
  ], rt = ["aria-label"], nt = /* @__PURE__ */ t("path", {
306
314
  "stroke-linecap": "round",
307
315
  "stroke-linejoin": "round",
@@ -381,7 +389,7 @@ const Je = (p, e) => {
381
389
  "stroke-linecap": "round",
382
390
  "stroke-linejoin": "round",
383
391
  d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
384
- }, Tt = ["aria-label"], Lt = {
392
+ }, Lt = ["aria-label"], Tt = {
385
393
  key: 0,
386
394
  "stroke-linecap": "round",
387
395
  "stroke-linejoin": "round",
@@ -391,193 +399,194 @@ const Je = (p, e) => {
391
399
  "stroke-linecap": "round",
392
400
  "stroke-linejoin": "round",
393
401
  d: "M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"
394
- }, Nt = {
402
+ }, Vt = {
395
403
  name: "VFToolbar"
396
- }, Vt = /* @__PURE__ */ Object.assign(Nt, {
404
+ }, Ot = /* @__PURE__ */ Object.assign(Vt, {
397
405
  setup(p) {
398
- const e = F("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, a = _([]), d = _("");
406
+ const e = F("ServiceContainer"), { setStore: s } = e.storage, { t: r } = e.i18n, o = b([]), i = b("");
399
407
  e.emitter.on("vf-search-query", ({ newQuery: l }) => {
400
- d.value = l;
408
+ i.value = l;
401
409
  });
402
410
  const u = () => {
403
- e.fullscreen = !e.fullscreen, s("full-screen", e.fullscreen), e.emitter.emit("vf-fullscreen-toggle");
411
+ e.fullScreen = !e.fullScreen, s("full-screen", e.fullScreen), e.emitter.emit("vf-fullscreen-toggle");
404
412
  };
405
413
  e.emitter.on("vf-nodes-selected", (l) => {
406
- a.value = l;
414
+ o.value = l;
407
415
  });
408
- const i = () => {
416
+ const d = () => {
409
417
  e.view = e.view === "list" ? "grid" : "list", s("viewport", e.view);
410
418
  };
411
- return (l, c) => (n(), v("div", Xe, [
412
- d.value.length ? (n(), v("div", bt, [
419
+ return (l, c) => (n(), m("div", Xe, [
420
+ i.value.length ? (n(), m("div", bt, [
413
421
  t("div", yt, [
414
- N(m(o(r)("Search results for")) + " ", 1),
415
- t("span", xt, m(d.value), 1)
422
+ V(v(a(r)("Search results for")) + " ", 1),
423
+ t("span", xt, v(i.value), 1)
416
424
  ]),
417
- o(e).loading ? (n(), v("svg", wt, St)) : M("", !0)
418
- ])) : (n(), v("div", Qe, [
419
- o(e).features.includes(o(z).NEW_FOLDER) ? (n(), v("div", {
425
+ a(e).loading ? (n(), m("svg", wt, St)) : S("", !0)
426
+ ])) : (n(), m("div", Qe, [
427
+ a(e).features.includes(a(N).NEW_FOLDER) ? (n(), m("div", {
420
428
  key: 0,
421
429
  class: "mx-1.5",
422
- "aria-label": o(r)("New Folder"),
430
+ "aria-label": a(r)("New Folder"),
423
431
  "data-microtip-position": "bottom-right",
424
432
  role: "tooltip",
425
- onClick: c[0] || (c[0] = (w) => o(e).emitter.emit("vf-modal-show", { type: "new-folder", items: a.value }))
426
- }, tt, 8, Ze)) : M("", !0),
427
- o(e).features.includes(o(z).NEW_FILE) ? (n(), v("div", {
433
+ onClick: c[0] || (c[0] = (g) => a(e).emitter.emit("vf-modal-show", { type: "new-folder", items: o.value }))
434
+ }, tt, 8, Ze)) : S("", !0),
435
+ a(e).features.includes(a(N).NEW_FILE) ? (n(), m("div", {
428
436
  key: 1,
429
437
  class: "mx-1.5",
430
- "aria-label": o(r)("New File"),
438
+ "aria-label": a(r)("New File"),
431
439
  "data-microtip-position": "bottom",
432
440
  role: "tooltip",
433
- onClick: c[1] || (c[1] = (w) => o(e).emitter.emit("vf-modal-show", { type: "new-file", items: a.value }))
434
- }, at, 8, st)) : M("", !0),
435
- o(e).features.includes(o(z).RENAME) ? (n(), v("div", {
441
+ onClick: c[1] || (c[1] = (g) => a(e).emitter.emit("vf-modal-show", { type: "new-file", items: o.value }))
442
+ }, ot, 8, st)) : S("", !0),
443
+ a(e).features.includes(a(N).RENAME) ? (n(), m("div", {
436
444
  key: 2,
437
445
  class: "mx-1.5",
438
- "aria-label": o(r)("Rename"),
446
+ "aria-label": a(r)("Rename"),
439
447
  "data-microtip-position": "bottom",
440
448
  role: "tooltip",
441
- onClick: c[2] || (c[2] = (w) => a.value.length != 1 || o(e).emitter.emit("vf-modal-show", { type: "rename", items: a.value }))
449
+ onClick: c[2] || (c[2] = (g) => o.value.length != 1 || a(e).emitter.emit("vf-modal-show", { type: "rename", items: o.value }))
442
450
  }, [
443
- (n(), v("svg", {
451
+ (n(), m("svg", {
444
452
  xmlns: "http://www.w3.org/2000/svg",
445
- class: U([a.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
453
+ class: B([o.value.length == 1 ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
446
454
  fill: "none",
447
455
  viewBox: "0 0 24 24",
448
456
  stroke: "none",
449
457
  "stroke-width": "1.5"
450
458
  }, lt, 2))
451
- ], 8, rt)) : M("", !0),
452
- o(e).features.includes(o(z).DELETE) ? (n(), v("div", {
459
+ ], 8, rt)) : S("", !0),
460
+ a(e).features.includes(a(N).DELETE) ? (n(), m("div", {
453
461
  key: 3,
454
462
  class: "mx-1.5",
455
- "aria-label": o(r)("Delete"),
463
+ "aria-label": a(r)("Delete"),
456
464
  "data-microtip-position": "bottom",
457
465
  role: "tooltip",
458
- onClick: c[3] || (c[3] = (w) => !a.value.length || o(e).emitter.emit("vf-modal-show", { type: "delete", items: a.value }))
466
+ onClick: c[3] || (c[3] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "delete", items: o.value }))
459
467
  }, [
460
- (n(), v("svg", {
468
+ (n(), m("svg", {
461
469
  xmlns: "http://www.w3.org/2000/svg",
462
- class: U([a.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
470
+ class: B([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
463
471
  fill: "none",
464
472
  viewBox: "0 0 24 24",
465
473
  stroke: "none",
466
474
  "stroke-width": "1.5"
467
475
  }, ct, 2))
468
- ], 8, it)) : M("", !0),
469
- o(e).features.includes(o(z).UPLOAD) ? (n(), v("div", {
476
+ ], 8, it)) : S("", !0),
477
+ a(e).features.includes(a(N).UPLOAD) ? (n(), m("div", {
470
478
  key: 4,
471
479
  class: "mx-1.5",
472
- "aria-label": o(r)("Upload"),
480
+ "aria-label": a(r)("Upload"),
473
481
  "data-microtip-position": "bottom",
474
482
  role: "tooltip",
475
- onClick: c[4] || (c[4] = (w) => o(e).emitter.emit("vf-modal-show", { type: "upload", items: a.value }))
476
- }, vt, 8, ut)) : M("", !0),
477
- o(e).features.includes(o(z).UNARCHIVE) && a.value.length == 1 && a.value[0].mime_type == "application/zip" ? (n(), v("div", {
483
+ onClick: c[4] || (c[4] = (g) => a(e).emitter.emit("vf-modal-show", { type: "upload", items: o.value }))
484
+ }, vt, 8, ut)) : S("", !0),
485
+ a(e).features.includes(a(N).UNARCHIVE) && o.value.length == 1 && o.value[0].mime_type == "application/zip" ? (n(), m("div", {
478
486
  key: 5,
479
487
  class: "mx-1.5",
480
- "aria-label": o(r)("Unarchive"),
488
+ "aria-label": a(r)("Unarchive"),
481
489
  "data-microtip-position": "bottom",
482
490
  role: "tooltip",
483
- onClick: c[5] || (c[5] = (w) => !a.value.length || o(e).emitter.emit("vf-modal-show", { type: "unarchive", items: a.value }))
491
+ onClick: c[5] || (c[5] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "unarchive", items: o.value }))
484
492
  }, [
485
- (n(), v("svg", {
493
+ (n(), m("svg", {
486
494
  xmlns: "http://www.w3.org/2000/svg",
487
- class: U([a.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
495
+ class: B([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
488
496
  fill: "none",
489
497
  viewBox: "0 0 24 24",
490
498
  stroke: "none",
491
499
  "stroke-width": "1.5"
492
500
  }, ft, 2))
493
- ], 8, pt)) : M("", !0),
494
- o(e).features.includes(o(z).ARCHIVE) ? (n(), v("div", {
501
+ ], 8, pt)) : S("", !0),
502
+ a(e).features.includes(a(N).ARCHIVE) ? (n(), m("div", {
495
503
  key: 6,
496
504
  class: "mx-1.5",
497
- "aria-label": o(r)("Archive"),
505
+ "aria-label": a(r)("Archive"),
498
506
  "data-microtip-position": "bottom",
499
507
  role: "tooltip",
500
- onClick: c[6] || (c[6] = (w) => !a.value.length || o(e).emitter.emit("vf-modal-show", { type: "archive", items: a.value }))
508
+ onClick: c[6] || (c[6] = (g) => !o.value.length || a(e).emitter.emit("vf-modal-show", { type: "archive", items: o.value }))
501
509
  }, [
502
- (n(), v("svg", {
510
+ (n(), m("svg", {
503
511
  xmlns: "http://www.w3.org/2000/svg",
504
- class: U([a.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
512
+ class: B([o.value.length ? "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300" : "stroke-gray-200 dark:stroke-gray-700", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
505
513
  fill: "none",
506
514
  viewBox: "0 0 24 24",
507
515
  stroke: "none",
508
516
  "stroke-width": "1.5"
509
517
  }, kt, 2))
510
- ], 8, gt)) : M("", !0)
518
+ ], 8, gt)) : S("", !0)
511
519
  ])),
512
520
  t("div", Mt, [
513
- t("div", {
521
+ a(e).features.includes(a(N).FULL_SCREEN) ? (n(), m("div", {
522
+ key: 0,
514
523
  class: "mx-1.5",
515
- "aria-label": o(r)("Toggle Full Screen"),
524
+ "aria-label": a(r)("Toggle Full Screen"),
516
525
  "data-microtip-position": "bottom-left",
517
526
  role: "tooltip",
518
527
  onClick: u
519
528
  }, [
520
- (n(), v("svg", Dt, [
521
- o(e).fullscreen ? (n(), v("path", jt)) : (n(), v("path", At))
529
+ (n(), m("svg", Dt, [
530
+ a(e).fullScreen ? (n(), m("path", jt)) : (n(), m("path", At))
522
531
  ]))
523
- ], 8, Et),
532
+ ], 8, Et)) : S("", !0),
524
533
  t("div", {
525
534
  class: "mx-1.5",
526
- "aria-label": o(r)("Change View"),
535
+ "aria-label": a(r)("Change View"),
527
536
  "data-microtip-position": "bottom-left",
528
537
  role: "tooltip",
529
- onClick: c[7] || (c[7] = (w) => d.value.length || i())
538
+ onClick: c[7] || (c[7] = (g) => i.value.length || d())
530
539
  }, [
531
- (n(), v("svg", {
540
+ (n(), m("svg", {
532
541
  xmlns: "http://www.w3.org/2000/svg",
533
- class: U([d.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
542
+ class: B([i.value.length ? "stroke-gray-200 dark:stroke-gray-700" : "cursor-pointer stroke-gray-500 hover:stroke-cyan-700 dark:stroke-gray-400 dark:hover:stroke-gray-300", "h-6 w-6 md:h-8 md:w-8 m-auto"]),
534
543
  fill: "none",
535
544
  viewBox: "0 0 24 24",
536
545
  stroke: "none",
537
546
  "stroke-width": "1.5"
538
547
  }, [
539
- o(e).view === "grid" ? (n(), v("path", Lt)) : M("", !0),
540
- o(e).view === "list" ? (n(), v("path", Ft)) : M("", !0)
548
+ a(e).view === "grid" ? (n(), m("path", Tt)) : S("", !0),
549
+ a(e).view === "list" ? (n(), m("path", Ft)) : S("", !0)
541
550
  ], 2))
542
- ], 8, Tt)
551
+ ], 8, Lt)
543
552
  ])
544
553
  ]));
545
554
  }
546
- }), zt = (p, e = 0, s = !1) => {
555
+ }), Nt = (p, e = 0, s = !1) => {
547
556
  let r;
548
- return (...a) => {
549
- s && !r && p(...a), clearTimeout(r), r = setTimeout(() => {
550
- p(...a);
557
+ return (...o) => {
558
+ s && !r && p(...o), clearTimeout(r), r = setTimeout(() => {
559
+ p(...o);
551
560
  }, e);
552
561
  };
553
- }, Ot = (p, e, s) => {
554
- const r = _(p);
555
- return Me((a, d) => ({
562
+ }, zt = (p, e, s) => {
563
+ const r = b(p);
564
+ return Me((o, i) => ({
556
565
  get() {
557
- return a(), r.value;
566
+ return o(), r.value;
558
567
  },
559
- set: zt(
568
+ set: Nt(
560
569
  (u) => {
561
- r.value = u, d();
570
+ r.value = u, i();
562
571
  },
563
572
  e,
564
573
  s
565
574
  )
566
575
  }));
567
- }, Ut = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm" }, Ht = ["aria-label"], Bt = /* @__PURE__ */ t("path", {
576
+ }, Bt = { class: "flex p-1.5 bg-neutral-100 dark:bg-gray-800 border-t border-b border-neutral-300 dark:border-gray-700/50 items-center select-none text-sm" }, Ut = ["aria-label"], Ht = /* @__PURE__ */ t("path", {
568
577
  "fill-rule": "evenodd",
569
578
  d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",
570
579
  "clip-rule": "evenodd"
571
580
  }, null, -1), Rt = [
572
- Bt
581
+ Ht
573
582
  ], qt = ["aria-label"], It = /* @__PURE__ */ t("path", { d: "M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z" }, null, -1), Pt = [
574
583
  It
575
- ], Gt = ["aria-label"], Wt = /* @__PURE__ */ t("path", {
584
+ ], Wt = ["aria-label"], Gt = /* @__PURE__ */ t("path", {
576
585
  "stroke-linecap": "round",
577
586
  "stroke-linejoin": "round",
578
587
  d: "M6 18L18 6M6 6l12 12"
579
588
  }, null, -1), Yt = [
580
- Wt
589
+ Gt
581
590
  ], Kt = /* @__PURE__ */ t("path", { d: "M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z" }, null, -1), Jt = [
582
591
  Kt
583
592
  ], Xt = { class: "flex leading-6" }, Qt = /* @__PURE__ */ t("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), Zt = ["onDragover", "onDragleave", "onDrop", "title", "onClick"], es = {
@@ -597,10 +606,10 @@ const Je = (p, e) => {
597
606
  class: "opacity-75",
598
607
  fill: "currentColor",
599
608
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
600
- }, null, -1), os = [
609
+ }, null, -1), as = [
601
610
  ts,
602
611
  ss
603
- ], as = {
612
+ ], os = {
604
613
  key: 3,
605
614
  class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"
606
615
  }, rs = /* @__PURE__ */ t("div", null, [
@@ -626,76 +635,76 @@ const Je = (p, e) => {
626
635
  name: "VFBreadcrumb"
627
636
  }, cs = /* @__PURE__ */ Object.assign(ds, {
628
637
  setup(p) {
629
- const e = _(null), s = _([]), r = _(!1), a = _(null), d = F("ServiceContainer"), { t: u } = d.i18n;
630
- d.emitter.on("vf-explorer-update", () => {
631
- let E = [], g = [];
632
- e.value = d.data.dirname ?? d.adapter + "://", e.value.length == 0 && (s.value = []), e.value.replace(d.adapter + "://", "").split("/").forEach(function(f) {
633
- E.push(f), E.join("/") != "" && g.push({
638
+ const e = b(null), s = b([]), r = b(!1), o = b(null), i = F("ServiceContainer"), { t: u } = i.i18n;
639
+ i.emitter.on("vf-explorer-update", () => {
640
+ let C = [], k = [];
641
+ e.value = i.data.dirname ?? i.adapter + "://", e.value.length == 0 && (s.value = []), e.value.replace(i.adapter + "://", "").split("/").forEach(function(f) {
642
+ C.push(f), C.join("/") != "" && k.push({
634
643
  basename: f,
635
644
  name: f,
636
- path: d.adapter + "://" + E.join("/"),
645
+ path: i.adapter + "://" + C.join("/"),
637
646
  type: "dir"
638
647
  });
639
- }), g.length > 4 && (g = g.slice(-5), g[0].name = ".."), s.value = g;
648
+ }), k.length > 4 && (k = k.slice(-5), k[0].name = ".."), s.value = k;
640
649
  });
641
- const i = () => {
650
+ const d = () => {
642
651
  r.value = !1, c.value = "";
643
652
  };
644
- d.emitter.on("vf-search-exit", () => {
645
- i();
653
+ i.emitter.on("vf-search-exit", () => {
654
+ d();
646
655
  });
647
656
  const l = () => {
648
- d.features.includes(z.SEARCH) && (r.value = !0, de(() => a.value.focus()));
649
- }, c = Ot("", 400);
650
- ie(c, (E) => {
651
- d.emitter.emit("vf-toast-clear"), d.emitter.emit("vf-search-query", { newQuery: E });
657
+ i.features.includes(N.SEARCH) && (r.value = !0, ce(() => o.value.focus()));
658
+ }, c = zt("", 400);
659
+ de(c, (C) => {
660
+ i.emitter.emit("vf-toast-clear"), i.emitter.emit("vf-search-query", { newQuery: C });
652
661
  });
653
- const w = () => s.value.length && !r.value, k = (E, g = null) => {
654
- E.preventDefault(), y(E), g ?? (g = s.value.length - 2);
655
- let f = JSON.parse(E.dataTransfer.getData("items"));
656
- if (f.find((V) => V.storage !== d.adapter)) {
662
+ const g = () => s.value.length && !r.value, _ = (C, k = null) => {
663
+ C.preventDefault(), y(C), k ?? (k = s.value.length - 2);
664
+ let f = JSON.parse(C.dataTransfer.getData("items"));
665
+ if (f.find((O) => O.storage !== i.adapter)) {
657
666
  alert("Moving items between different storages is not supported yet.");
658
667
  return;
659
668
  }
660
- d.emitter.emit("vf-modal-show", {
669
+ i.emitter.emit("vf-modal-show", {
661
670
  type: "move",
662
- items: { from: f, to: s.value[g] ?? { path: d.adapter + "://" } }
671
+ items: { from: f, to: s.value[k] ?? { path: i.adapter + "://" } }
663
672
  });
664
- }, $ = (E) => {
665
- E.preventDefault(), w() ? (E.dataTransfer.dropEffect = "copy", E.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-500")) : (E.dataTransfer.dropEffect = "none", E.dataTransfer.effectAllowed = "none");
666
- }, y = (E) => {
667
- E.preventDefault(), E.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500"), w() && E.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500");
668
- }, C = () => {
669
- c.value == "" && i();
673
+ }, $ = (C) => {
674
+ C.preventDefault(), g() ? (C.dataTransfer.dropEffect = "copy", C.currentTarget.classList.add("bg-blue-200", "dark:bg-slate-500")) : (C.dataTransfer.dropEffect = "none", C.dataTransfer.effectAllowed = "none");
675
+ }, y = (C) => {
676
+ C.preventDefault(), C.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500"), g() && C.currentTarget.classList.remove("bg-blue-200", "dark:bg-slate-500");
677
+ }, M = () => {
678
+ c.value == "" && d();
670
679
  };
671
- return (E, g) => (n(), v("div", Ut, [
680
+ return (C, k) => (n(), m("div", Bt, [
672
681
  t("span", {
673
- "aria-label": o(u)("Go up a directory"),
682
+ "aria-label": a(u)("Go up a directory"),
674
683
  "data-microtip-position": "bottom-right",
675
684
  role: "tooltip"
676
685
  }, [
677
- (n(), v("svg", {
678
- onDragover: g[0] || (g[0] = (f) => $(f)),
679
- onDragleave: g[1] || (g[1] = (f) => y(f)),
680
- onDrop: g[2] || (g[2] = (f) => k(f)),
681
- onClick: g[3] || (g[3] = (f) => {
682
- var V;
683
- return !w() || o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter, path: ((V = s.value[s.value.length - 2]) == null ? void 0 : V.path) ?? o(d).adapter + "://" } });
686
+ (n(), m("svg", {
687
+ onDragover: k[0] || (k[0] = (f) => $(f)),
688
+ onDragleave: k[1] || (k[1] = (f) => y(f)),
689
+ onDrop: k[2] || (k[2] = (f) => _(f)),
690
+ onClick: k[3] || (k[3] = (f) => {
691
+ var O;
692
+ return !g() || a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: ((O = s.value[s.value.length - 2]) == null ? void 0 : O.path) ?? a(i).adapter + "://" } });
684
693
  }),
685
- class: U(["h-6 w-6 p-0.5 rounded", w() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]),
694
+ class: B(["h-6 w-6 p-0.5 rounded", g() ? "text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer" : "text-gray-400 dark:text-neutral-500"]),
686
695
  xmlns: "http://www.w3.org/2000/svg",
687
696
  viewBox: "0 0 20 20",
688
697
  fill: "currentColor"
689
698
  }, Rt, 34))
690
- ], 8, Ht),
691
- o(d).loading ? (n(), v("span", {
699
+ ], 8, Ut),
700
+ a(i).loading ? (n(), m("span", {
692
701
  key: 1,
693
- "aria-label": o(u)("Cancel"),
702
+ "aria-label": a(u)("Cancel"),
694
703
  "data-microtip-position": "bottom-right",
695
704
  role: "tooltip"
696
705
  }, [
697
- (n(), v("svg", {
698
- onClick: g[5] || (g[5] = (f) => o(d).emitter.emit("vf-fetch-abort")),
706
+ (n(), m("svg", {
707
+ onClick: k[5] || (k[5] = (f) => a(i).emitter.emit("vf-fetch-abort")),
699
708
  xmlns: "http://www.w3.org/2000/svg",
700
709
  fill: "none",
701
710
  viewBox: "0 0 24 24",
@@ -703,15 +712,15 @@ const Je = (p, e) => {
703
712
  stroke: "currentColor",
704
713
  class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer"
705
714
  }, Yt))
706
- ], 8, Gt)) : (n(), v("span", {
715
+ ], 8, Wt)) : (n(), m("span", {
707
716
  key: 0,
708
- "aria-label": o(u)("Refresh"),
717
+ "aria-label": a(u)("Refresh"),
709
718
  "data-microtip-position": "bottom-right",
710
719
  role: "tooltip"
711
720
  }, [
712
- (n(), v("svg", {
713
- onClick: g[4] || (g[4] = (f) => {
714
- o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter, path: o(d).data.dirname } });
721
+ (n(), m("svg", {
722
+ onClick: k[4] || (k[4] = (f) => {
723
+ a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: a(i).data.dirname } });
715
724
  }),
716
725
  class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-300 dark:text-neutral-200 dark:hover:bg-gray-700 cursor-pointer",
717
726
  xmlns: "http://www.w3.org/2000/svg",
@@ -719,58 +728,58 @@ const Je = (p, e) => {
719
728
  fill: "currentColor"
720
729
  }, Pt))
721
730
  ], 8, qt)),
722
- r.value ? (n(), v("div", as, [
731
+ r.value ? (n(), m("div", os, [
723
732
  rs,
724
733
  q(t("input", {
725
734
  ref_key: "searchInput",
726
- ref: a,
727
- onKeydown: Q(i, ["esc"]),
728
- onBlur: C,
729
- "onUpdate:modelValue": g[10] || (g[10] = (f) => _e(c) ? c.value = f : null),
730
- placeholder: o(u)("Search anything.."),
735
+ ref: o,
736
+ onKeydown: Q(d, ["esc"]),
737
+ onBlur: M,
738
+ "onUpdate:modelValue": k[10] || (k[10] = (f) => _e(c) ? c.value = f : null),
739
+ placeholder: a(u)("Search anything.."),
731
740
  class: "w-full pb-0 px-1 border-0 text-base ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",
732
741
  type: "text"
733
742
  }, null, 40, ns), [
734
- [Z, o(c)]
743
+ [Z, a(c)]
735
744
  ]),
736
- (n(), v("svg", {
745
+ (n(), m("svg", {
737
746
  class: "w-6 h-6 cursor-pointer",
738
- onClick: i,
747
+ onClick: d,
739
748
  xmlns: "http://www.w3.org/2000/svg",
740
749
  fill: "none",
741
750
  viewBox: "0 0 24 24",
742
751
  "stroke-width": "1.5",
743
752
  stroke: "currentColor"
744
753
  }, is))
745
- ])) : (n(), v("div", {
754
+ ])) : (n(), m("div", {
746
755
  key: 2,
747
756
  class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",
748
757
  onClick: Y(l, ["self"])
749
758
  }, [
750
- (n(), v("svg", {
751
- onDragover: g[6] || (g[6] = (f) => $(f)),
752
- onDragleave: g[7] || (g[7] = (f) => y(f)),
753
- onDrop: g[8] || (g[8] = (f) => k(f, -1)),
754
- onClick: g[9] || (g[9] = (f) => o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter } })),
759
+ (n(), m("svg", {
760
+ onDragover: k[6] || (k[6] = (f) => $(f)),
761
+ onDragleave: k[7] || (k[7] = (f) => y(f)),
762
+ onDrop: k[8] || (k[8] = (f) => _(f, -1)),
763
+ onClick: k[9] || (k[9] = (f) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter } })),
755
764
  class: "h-6 w-6 p-1 rounded text-slate-700 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-gray-800 cursor-pointer",
756
765
  xmlns: "http://www.w3.org/2000/svg",
757
766
  viewBox: "0 0 20 20",
758
767
  fill: "currentColor"
759
768
  }, Jt, 32)),
760
769
  t("div", Xt, [
761
- (n(!0), v(H, null, I(s.value, (f, V) => (n(), v("div", { key: V }, [
770
+ (n(!0), m(U, null, I(s.value, (f, O) => (n(), m("div", { key: O }, [
762
771
  Qt,
763
772
  t("span", {
764
- onDragover: (R) => V === s.value.length - 1 || $(R),
765
- onDragleave: (R) => V === s.value.length - 1 || y(R),
766
- onDrop: (R) => V === s.value.length - 1 || k(R, V),
773
+ onDragover: (R) => O === s.value.length - 1 || $(R),
774
+ onDragleave: (R) => O === s.value.length - 1 || y(R),
775
+ onDrop: (R) => O === s.value.length - 1 || _(R, O),
767
776
  class: "px-1.5 py-1 text-slate-700 dark:text-slate-200 hover:bg-neutral-100 dark:hover:bg-gray-800 rounded cursor-pointer",
768
777
  title: f.basename,
769
- onClick: (R) => o(d).emitter.emit("vf-fetch", { params: { q: "index", adapter: o(d).data.adapter, path: f.path } })
770
- }, m(f.name), 41, Zt)
778
+ onClick: (R) => a(i).emitter.emit("vf-fetch", { params: { q: "index", adapter: a(i).data.adapter, path: f.path } })
779
+ }, v(f.name), 41, Zt)
771
780
  ]))), 128))
772
781
  ]),
773
- o(d).loading ? (n(), v("svg", es, os)) : M("", !0)
782
+ a(i).loading ? (n(), m("svg", es, as)) : S("", !0)
774
783
  ]))
775
784
  ]));
776
785
  }
@@ -800,45 +809,45 @@ const Je = (p, e) => {
800
809
  hs
801
810
  ], gs = {
802
811
  name: "VFSortIcon"
803
- }, re = /* @__PURE__ */ Object.assign(gs, {
812
+ }, ne = /* @__PURE__ */ Object.assign(gs, {
804
813
  props: { direction: String },
805
814
  setup(p) {
806
- return (e, s) => (n(), v("div", null, [
807
- p.direction === "down" ? (n(), v("svg", us, vs)) : M("", !0),
808
- p.direction === "up" ? (n(), v("svg", ps, fs)) : M("", !0)
815
+ return (e, s) => (n(), m("div", null, [
816
+ p.direction === "down" ? (n(), m("svg", us, vs)) : S("", !0),
817
+ p.direction === "up" ? (n(), m("svg", ps, fs)) : S("", !0)
809
818
  ]));
810
819
  }
811
820
  }), _s = ["onClick"], ks = {
812
821
  name: "VFToast.vue"
813
822
  }, bs = /* @__PURE__ */ Object.assign(ks, {
814
823
  setup(p) {
815
- const e = F("ServiceContainer"), { getStore: s } = e.storage, r = _(s("full-screen", !1)), a = _([]), d = (l) => l === "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", u = (l) => {
816
- a.value.splice(l, 1);
817
- }, i = (l) => {
818
- let c = a.value.findIndex((w) => w.id === l);
824
+ const e = F("ServiceContainer"), { getStore: s } = e.storage, r = b(s("full-screen", !1)), o = b([]), i = (l) => l === "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", u = (l) => {
825
+ o.value.splice(l, 1);
826
+ }, d = (l) => {
827
+ let c = o.value.findIndex((g) => g.id === l);
819
828
  c !== -1 && u(c);
820
829
  };
821
830
  return e.emitter.on("vf-toast-clear", () => {
822
- a.value = [];
831
+ o.value = [];
823
832
  }), e.emitter.on("vf-toast-push", (l) => {
824
833
  let c = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
825
- l.id = c, a.value.push(l), setTimeout(() => {
826
- i(c);
834
+ l.id = c, o.value.push(l), setTimeout(() => {
835
+ d(c);
827
836
  }, 5e3);
828
- }), (l, c) => (n(), v("div", {
829
- class: U([r.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
837
+ }), (l, c) => (n(), m("div", {
838
+ class: B([r.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
830
839
  }, [
831
- B(Ee, {
840
+ H(Ee, {
832
841
  name: "vf-toast-item",
833
842
  "leave-active-class": "transition-all duration-1000",
834
843
  "leave-to-class": "opacity-0"
835
844
  }, {
836
845
  default: j(() => [
837
- (n(!0), v(H, null, I(a.value, (w, k) => (n(), v("div", {
838
- onClick: ($) => u(k),
839
- key: w,
840
- class: U([d(w.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])
841
- }, m(w.label), 11, _s))), 128))
846
+ (n(!0), m(U, null, I(o.value, (g, _) => (n(), m("div", {
847
+ onClick: ($) => u(_),
848
+ key: g,
849
+ class: B([i(g.type), "inline-block mx-auto my-0.5 py-0.5 px-2 min-w-max bg-gray-50 dark:bg-gray-600 border text-xs sm:text-sm rounded cursor-pointer"])
850
+ }, v(g.label), 11, _s))), 128))
842
851
  ]),
843
852
  _: 1
844
853
  })
@@ -846,7 +855,7 @@ const Je = (p, e) => {
846
855
  }
847
856
  });
848
857
  function he(p, e = 14) {
849
- let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{8,})([\\w\\W]{8,}))`;
858
+ let s = `((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e + 1},})([\\w\\W]{8,}))`;
850
859
  return p.replace(new RegExp(s), "$2..$4");
851
860
  }
852
861
  const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
@@ -879,7 +888,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
879
888
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
880
889
  }, null, -1), As = [
881
890
  js
882
- ], Ts = {
891
+ ], Ls = {
883
892
  key: 1,
884
893
  xmlns: "http://www.w3.org/2000/svg",
885
894
  class: "h-5 w-5 text-neutral-500",
@@ -887,13 +896,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
887
896
  viewBox: "0 0 24 24",
888
897
  stroke: "currentColor",
889
898
  "stroke-width": "1"
890
- }, Ls = /* @__PURE__ */ t("path", {
899
+ }, Ts = /* @__PURE__ */ t("path", {
891
900
  "stroke-linecap": "round",
892
901
  "stroke-linejoin": "round",
893
902
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
894
903
  }, null, -1), Fs = [
895
- Ls
896
- ], Ns = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Vs = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, zs = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Os = { class: "grid grid-cols-12 items-center" }, Us = { class: "flex col-span-7 items-center" }, Hs = {
904
+ Ts
905
+ ], Vs = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Os = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ns = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], zs = { class: "grid grid-cols-12 items-center" }, Bs = { class: "flex col-span-7 items-center" }, Us = {
897
906
  key: 0,
898
907
  xmlns: "http://www.w3.org/2000/svg",
899
908
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -901,12 +910,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
901
910
  viewBox: "0 0 24 24",
902
911
  stroke: "currentColor",
903
912
  "stroke-width": "1"
904
- }, Bs = /* @__PURE__ */ t("path", {
913
+ }, Hs = /* @__PURE__ */ t("path", {
905
914
  "stroke-linecap": "round",
906
915
  "stroke-linejoin": "round",
907
916
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
908
917
  }, null, -1), Rs = [
909
- Bs
918
+ Hs
910
919
  ], qs = {
911
920
  key: 1,
912
921
  xmlns: "http://www.w3.org/2000/svg",
@@ -921,7 +930,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
921
930
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
922
931
  }, null, -1), Ps = [
923
932
  Is
924
- ], Gs = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ws = { class: "col-span-2 text-center" }, Ys = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ks = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Js = { class: "relative" }, Xs = {
933
+ ], Ws = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, Gs = { class: "col-span-2 text-center" }, Ys = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, Ks = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], Js = { class: "relative" }, Xs = {
925
934
  key: 0,
926
935
  xmlns: "http://www.w3.org/2000/svg",
927
936
  class: "h-10 w-10 md:h-12 md:w-12 m-auto fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -935,7 +944,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
935
944
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
936
945
  }, null, -1), Zs = [
937
946
  Qs
938
- ], eo = ["data-src", "alt"], to = {
947
+ ], ea = ["data-src", "alt"], ta = {
939
948
  key: 2,
940
949
  xmlns: "http://www.w3.org/2000/svg",
941
950
  class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",
@@ -943,278 +952,278 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
943
952
  viewBox: "0 0 24 24",
944
953
  stroke: "currentColor",
945
954
  "stroke-width": "1"
946
- }, so = /* @__PURE__ */ t("path", {
955
+ }, sa = /* @__PURE__ */ t("path", {
947
956
  "stroke-linecap": "round",
948
957
  "stroke-linejoin": "round",
949
958
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
950
- }, null, -1), oo = [
951
- so
952
- ], ao = {
959
+ }, null, -1), aa = [
960
+ sa
961
+ ], oa = {
953
962
  key: 3,
954
963
  class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500"
955
- }, ro = { class: "break-all" }, no = {
964
+ }, ra = { class: "break-all" }, na = {
956
965
  name: "VFExplorer"
957
- }, lo = /* @__PURE__ */ Object.assign(no, {
966
+ }, la = /* @__PURE__ */ Object.assign(na, {
958
967
  setup(p) {
959
968
  const e = F("ServiceContainer"), { t: s } = e.i18n;
960
969
  e.storage;
961
- const r = (x) => x == null ? void 0 : x.substring(0, 3), a = _(null), d = _(null), u = _(0), i = _(null), l = Math.floor(Math.random() * 2 ** 32), c = _("");
962
- let w;
970
+ const r = (w) => w == null ? void 0 : w.substring(0, 3), o = b(null), i = b(null), u = b(0), d = b(null), l = Math.floor(Math.random() * 2 ** 32), c = b("");
971
+ let g;
963
972
  e.emitter.on("vf-fullscreen-toggle", () => {
964
- a.value.style.height = null;
965
- }), e.emitter.on("vf-search-query", ({ newQuery: x }) => {
966
- c.value = x, x ? e.emitter.emit("vf-fetch", {
973
+ o.value.style.height = null;
974
+ }), e.emitter.on("vf-search-query", ({ newQuery: w }) => {
975
+ c.value = w, w ? e.emitter.emit("vf-fetch", {
967
976
  params: {
968
977
  q: "search",
969
978
  adapter: e.data.adapter,
970
979
  path: e.data.dirname,
971
- filter: x
980
+ filter: w
972
981
  },
973
982
  onSuccess: (D) => {
974
983
  D.files.length || e.emitter.emit("vf-toast-push", { label: s("No search result found.") });
975
984
  }
976
985
  }) : e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
977
986
  });
978
- let k = null;
987
+ let _ = null;
979
988
  const $ = () => {
980
- k && clearTimeout(k);
981
- }, y = _(!0), C = (x) => {
982
- x.touches.length > 1 && (y.value ? (i.value.stop(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: off") })) : (i.value.start(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: on") }), e.emitter.emit("vf-explorer-update")), y.value = !y.value);
983
- }, E = (x) => {
984
- k = setTimeout(() => {
989
+ _ && clearTimeout(_);
990
+ }, y = b(!0), M = (w) => {
991
+ w.touches.length > 1 && (y.value ? (d.value.stop(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: off") })) : (d.value.start(), e.emitter.emit("vf-toast-push", { label: s("Drag&Drop: on") }), e.emitter.emit("vf-explorer-update")), y.value = !y.value);
992
+ }, C = (w) => {
993
+ _ = setTimeout(() => {
985
994
  const D = new MouseEvent("contextmenu", {
986
995
  bubbles: !0,
987
996
  cancelable: !1,
988
997
  view: window,
989
998
  button: 2,
990
999
  buttons: 0,
991
- clientX: x.target.getBoundingClientRect().x,
992
- clientY: x.target.getBoundingClientRect().y
1000
+ clientX: w.target.getBoundingClientRect().x,
1001
+ clientY: w.target.getBoundingClientRect().y
993
1002
  });
994
- x.target.dispatchEvent(D);
1003
+ w.target.dispatchEvent(D);
995
1004
  }, 500);
996
- }, g = (x) => {
997
- x.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: x.path } })) : e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: x });
998
- }, f = le({ active: !1, column: "", order: "" }), V = (x = !0) => {
1005
+ }, k = (w) => {
1006
+ w.type === "dir" ? (e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: w.path } })) : e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: w });
1007
+ }, f = ie({ active: !1, column: "", order: "" }), O = (w = !0) => {
999
1008
  let D = [...e.data.files], h = f.column, A = f.order == "asc" ? 1 : -1;
1000
- if (!x)
1009
+ if (!w)
1001
1010
  return D;
1002
- const b = (S, T) => typeof S == "string" && typeof T == "string" ? S.toLowerCase().localeCompare(T.toLowerCase()) : S < T ? -1 : S > T ? 1 : 0;
1003
- return f.active && (D = D.slice().sort((S, T) => b(S[h], T[h]) * A)), D;
1004
- }, R = (x) => {
1005
- f.active && f.column == x ? (f.active = f.order == "asc", f.column = x, f.order = "desc") : (f.active = !0, f.column = x, f.order = "asc");
1006
- }, K = () => i.value.getSelection().map((x) => JSON.parse(x.dataset.item)), ee = (x, D) => {
1007
- if (x.altKey || x.ctrlKey || x.metaKey)
1008
- return x.preventDefault(), !1;
1009
- x.dataTransfer.setDragImage(d.value, 0, 15), x.dataTransfer.effectAllowed = "all", x.dataTransfer.dropEffect = "copy", x.dataTransfer.setData("items", JSON.stringify(K()));
1010
- }, te = (x, D) => {
1011
- x.preventDefault();
1012
- let h = JSON.parse(x.dataTransfer.getData("items"));
1011
+ const x = (E, L) => typeof E == "string" && typeof L == "string" ? E.toLowerCase().localeCompare(L.toLowerCase()) : E < L ? -1 : E > L ? 1 : 0;
1012
+ return f.active && (D = D.slice().sort((E, L) => x(E[h], L[h]) * A)), D;
1013
+ }, R = (w) => {
1014
+ f.active && f.column == w ? (f.active = f.order == "asc", f.column = w, f.order = "desc") : (f.active = !0, f.column = w, f.order = "asc");
1015
+ }, K = () => d.value.getSelection().map((w) => JSON.parse(w.dataset.item)), te = (w, D) => {
1016
+ if (w.altKey || w.ctrlKey || w.metaKey)
1017
+ return w.preventDefault(), !1;
1018
+ w.dataTransfer.setDragImage(i.value, 0, 15), w.dataTransfer.effectAllowed = "all", w.dataTransfer.dropEffect = "copy", w.dataTransfer.setData("items", JSON.stringify(K()));
1019
+ }, se = (w, D) => {
1020
+ w.preventDefault();
1021
+ let h = JSON.parse(w.dataTransfer.getData("items"));
1013
1022
  if (h.find((A) => A.storage !== e.adapter)) {
1014
1023
  alert("Moving items between different storages is not supported yet.");
1015
1024
  return;
1016
1025
  }
1017
1026
  e.emitter.emit("vf-modal-show", { type: "move", items: { from: h, to: D } });
1018
- }, se = (x, D) => {
1019
- x.preventDefault(), !D || D.type !== "dir" || i.value.getSelection().find((h) => h == x.currentTarget) ? (x.dataTransfer.dropEffect = "none", x.dataTransfer.effectAllowed = "none") : x.dataTransfer.dropEffect = "copy";
1027
+ }, ae = (w, D) => {
1028
+ w.preventDefault(), !D || D.type !== "dir" || d.value.getSelection().find((h) => h == w.currentTarget) ? (w.dataTransfer.dropEffect = "none", w.dataTransfer.effectAllowed = "none") : w.dataTransfer.dropEffect = "copy";
1020
1029
  }, oe = () => {
1021
- i.value = new Ve({
1022
- area: a.value,
1030
+ d.value = new Oe({
1031
+ area: o.value,
1023
1032
  keyboardDrag: !1,
1024
1033
  selectedClass: "vf-explorer-selected",
1025
1034
  selectorClass: "vf-explorer-selector"
1026
- }), e.emitter.on("vf-explorer-update", () => de(() => {
1027
- i.value.clearSelection(), i.value.setSettings({
1035
+ }), e.emitter.on("vf-explorer-update", () => ce(() => {
1036
+ d.value.clearSelection(), d.value.setSettings({
1028
1037
  selectables: document.getElementsByClassName("vf-item-" + l)
1029
1038
  });
1030
- })), i.value.subscribe("predragstart", ({ event: x, isDragging: D }) => {
1039
+ })), d.value.subscribe("predragstart", ({ event: w, isDragging: D }) => {
1031
1040
  if (D)
1032
- u.value = i.value.getSelection().length, i.value.break();
1041
+ u.value = d.value.getSelection().length, d.value.break();
1033
1042
  else {
1034
- const h = x.target.offsetWidth - x.offsetX, A = x.target.offsetHeight - x.offsetY;
1035
- h < 15 && A < 15 && (i.value.clearSelection(), i.value.break());
1043
+ const h = w.target.offsetWidth - w.offsetX, A = w.target.offsetHeight - w.offsetY;
1044
+ h < 15 && A < 15 && (d.value.clearSelection(), d.value.break());
1036
1045
  }
1037
- }), i.value.subscribe("predragmove", ({ isDragging: x }) => {
1038
- x && i.value.break();
1039
- }), i.value.subscribe("callback", ({ items: x, event: D, isDragging: h }) => {
1040
- e.emitter.emit("vf-nodes-selected", K()), u.value = i.value.getSelection().length;
1046
+ }), d.value.subscribe("predragmove", ({ isDragging: w }) => {
1047
+ w && d.value.break();
1048
+ }), d.value.subscribe("callback", ({ items: w, event: D, isDragging: h }) => {
1049
+ e.emitter.emit("vf-nodes-selected", K()), u.value = d.value.getSelection().length;
1041
1050
  });
1042
1051
  };
1043
1052
  return P(() => {
1044
- w = new ze(a.value), oe();
1053
+ g = new Ne(o.value), oe();
1045
1054
  }), De(() => {
1046
- i.value.Area.reset(), i.value.SelectorArea.updatePos(), w.update();
1055
+ d.value.Area.reset(), d.value.SelectorArea.updatePos(), g.update();
1047
1056
  }), P(() => {
1048
- ie(() => e.view, () => e.emitter.emit("vf-explorer-update"));
1057
+ de(() => e.view, () => e.emitter.emit("vf-explorer-update"));
1049
1058
  }), ke(() => {
1050
- w.destroy();
1051
- }), (x, D) => (n(), v("div", ys, [
1052
- o(e).view == "list" || c.value.length ? (n(), v("div", xs, [
1059
+ g.destroy();
1060
+ }), (w, D) => (n(), m("div", ys, [
1061
+ a(e).view == "list" || c.value.length ? (n(), m("div", xs, [
1053
1062
  t("div", {
1054
1063
  onClick: D[0] || (D[0] = (h) => R("basename")),
1055
1064
  class: "col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"
1056
1065
  }, [
1057
- N(m(o(s)("Name")) + " ", 1),
1058
- q(B(re, {
1066
+ V(v(a(s)("Name")) + " ", 1),
1067
+ q(H(ne, {
1059
1068
  direction: f.order == "asc" ? "down" : "up"
1060
1069
  }, null, 8, ["direction"]), [
1061
- [ae, f.active && f.column == "basename"]
1070
+ [re, f.active && f.column == "basename"]
1062
1071
  ])
1063
1072
  ]),
1064
- c.value.length ? M("", !0) : (n(), v("div", {
1073
+ c.value.length ? S("", !0) : (n(), m("div", {
1065
1074
  key: 0,
1066
1075
  onClick: D[1] || (D[1] = (h) => R("file_size")),
1067
1076
  class: "col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"
1068
1077
  }, [
1069
- N(m(o(s)("Size")) + " ", 1),
1070
- q(B(re, {
1078
+ V(v(a(s)("Size")) + " ", 1),
1079
+ q(H(ne, {
1071
1080
  direction: f.order == "asc" ? "down" : "up"
1072
1081
  }, null, 8, ["direction"]), [
1073
- [ae, f.active && f.column == "file_size"]
1082
+ [re, f.active && f.column == "file_size"]
1074
1083
  ])
1075
1084
  ])),
1076
- c.value.length ? M("", !0) : (n(), v("div", {
1085
+ c.value.length ? S("", !0) : (n(), m("div", {
1077
1086
  key: 1,
1078
1087
  onClick: D[2] || (D[2] = (h) => R("last_modified")),
1079
1088
  class: "col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"
1080
1089
  }, [
1081
- N(m(o(s)("Date")) + " ", 1),
1082
- q(B(re, {
1090
+ V(v(a(s)("Date")) + " ", 1),
1091
+ q(H(ne, {
1083
1092
  direction: f.order == "asc" ? "down" : "up"
1084
1093
  }, null, 8, ["direction"]), [
1085
- [ae, f.active && f.column == "last_modified"]
1094
+ [re, f.active && f.column == "last_modified"]
1086
1095
  ])
1087
1096
  ])),
1088
- c.value.length ? (n(), v("div", {
1097
+ c.value.length ? (n(), m("div", {
1089
1098
  key: 2,
1090
1099
  onClick: D[3] || (D[3] = (h) => R("path")),
1091
1100
  class: "col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"
1092
1101
  }, [
1093
- N(m(o(s)("Filepath")) + " ", 1),
1094
- q(B(re, {
1102
+ V(v(a(s)("Filepath")) + " ", 1),
1103
+ q(H(ne, {
1095
1104
  direction: f.order == "asc" ? "down" : "up"
1096
1105
  }, null, 8, ["direction"]), [
1097
- [ae, f.active && f.column == "path"]
1106
+ [re, f.active && f.column == "path"]
1098
1107
  ])
1099
- ])) : M("", !0)
1100
- ])) : M("", !0),
1108
+ ])) : S("", !0)
1109
+ ])) : S("", !0),
1101
1110
  t("div", ws, [
1102
1111
  t("div", {
1103
1112
  ref_key: "dragImage",
1104
- ref: d,
1113
+ ref: i,
1105
1114
  class: "absolute -z-50 -top-96"
1106
1115
  }, [
1107
1116
  $s,
1108
- t("div", Cs, m(u.value), 1)
1117
+ t("div", Cs, v(u.value), 1)
1109
1118
  ], 512)
1110
1119
  ]),
1111
1120
  t("div", {
1112
- onTouchstart: C,
1113
- onContextmenu: D[10] || (D[10] = Y((h) => o(e).emitter.emit("vf-contextmenu-show", { event: h, area: a.value, items: K() }), ["self", "prevent"])),
1114
- class: U([o(e).fullscreen ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
1121
+ onTouchstart: M,
1122
+ onContextmenu: D[10] || (D[10] = Y((h) => a(e).emitter.emit("vf-contextmenu-show", { event: h, area: o.value, items: K() }), ["self", "prevent"])),
1123
+ class: B([a(e).fullScreen ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
1115
1124
  ref_key: "selectorArea",
1116
- ref: a
1125
+ ref: o
1117
1126
  }, [
1118
- c.value.length ? (n(!0), v(H, { key: 0 }, I(V(), (h, A) => (n(), v("div", {
1119
- onDblclick: (b) => g(h),
1120
- onTouchstart: D[4] || (D[4] = (b) => E(b)),
1121
- onTouchend: D[5] || (D[5] = (b) => $()),
1122
- onContextmenu: Y((b) => o(e).emitter.emit("vf-contextmenu-show", { event: b, area: a.value, items: K(), target: h }), ["prevent"]),
1123
- class: U(["vf-item-" + o(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1127
+ c.value.length ? (n(!0), m(U, { key: 0 }, I(O(), (h, A) => (n(), m("div", {
1128
+ onDblclick: (x) => k(h),
1129
+ onTouchstart: D[4] || (D[4] = (x) => C(x)),
1130
+ onTouchend: D[5] || (D[5] = (x) => $()),
1131
+ onContextmenu: Y((x) => a(e).emitter.emit("vf-contextmenu-show", { event: x, area: o.value, items: K(), target: h }), ["prevent"]),
1132
+ class: B(["vf-item-" + a(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1124
1133
  "data-type": h.type,
1125
1134
  "data-item": JSON.stringify(h),
1126
1135
  "data-index": A
1127
1136
  }, [
1128
1137
  t("div", Ms, [
1129
1138
  t("div", Es, [
1130
- h.type === "dir" ? (n(), v("svg", Ds, As)) : (n(), v("svg", Ts, Fs)),
1131
- t("span", Ns, m(h.basename), 1)
1139
+ h.type === "dir" ? (n(), m("svg", Ds, As)) : (n(), m("svg", Ls, Fs)),
1140
+ t("span", Vs, v(h.basename), 1)
1132
1141
  ]),
1133
- t("div", Vs, m(h.path), 1)
1142
+ t("div", Os, v(h.path), 1)
1134
1143
  ])
1135
- ], 42, Ss))), 256)) : M("", !0),
1136
- o(e).view === "list" && !c.value.length ? (n(!0), v(H, { key: 1 }, I(V(), (h, A) => (n(), v("div", {
1144
+ ], 42, Ss))), 256)) : S("", !0),
1145
+ a(e).view === "list" && !c.value.length ? (n(!0), m(U, { key: 1 }, I(O(), (h, A) => (n(), m("div", {
1137
1146
  draggable: "true",
1138
- onDblclick: (b) => g(h),
1139
- onTouchstart: D[6] || (D[6] = (b) => E(b)),
1140
- onTouchend: D[7] || (D[7] = (b) => $()),
1141
- onContextmenu: Y((b) => o(e).emitter.emit("vf-contextmenu-show", { event: b, area: a.value, items: K(), target: h }), ["prevent"]),
1142
- onDragstart: (b) => ee(b),
1143
- onDragover: (b) => se(b, h),
1144
- onDrop: (b) => te(b, h),
1145
- class: U(["vf-item-" + o(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1147
+ onDblclick: (x) => k(h),
1148
+ onTouchstart: D[6] || (D[6] = (x) => C(x)),
1149
+ onTouchend: D[7] || (D[7] = (x) => $()),
1150
+ onContextmenu: Y((x) => a(e).emitter.emit("vf-contextmenu-show", { event: x, area: o.value, items: K(), target: h }), ["prevent"]),
1151
+ onDragstart: (x) => te(x),
1152
+ onDragover: (x) => ae(x, h),
1153
+ onDrop: (x) => se(x, h),
1154
+ class: B(["vf-item-" + a(l), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
1146
1155
  "data-type": h.type,
1147
1156
  "data-item": JSON.stringify(h),
1148
1157
  "data-index": A
1149
1158
  }, [
1150
- t("div", Os, [
1151
- t("div", Us, [
1152
- h.type === "dir" ? (n(), v("svg", Hs, Rs)) : (n(), v("svg", qs, Ps)),
1153
- t("span", Gs, m(h.basename), 1)
1159
+ t("div", zs, [
1160
+ t("div", Bs, [
1161
+ h.type === "dir" ? (n(), m("svg", Us, Rs)) : (n(), m("svg", qs, Ps)),
1162
+ t("span", Ws, v(h.basename), 1)
1154
1163
  ]),
1155
- t("div", Ws, m(h.file_size ? o(e).filesize(h.file_size) : ""), 1),
1156
- t("div", Ys, m(o(we)(h.last_modified)), 1)
1164
+ t("div", Gs, v(h.file_size ? a(e).filesize(h.file_size) : ""), 1),
1165
+ t("div", Ys, v(a(we)(h.last_modified)), 1)
1157
1166
  ])
1158
- ], 42, zs))), 256)) : M("", !0),
1159
- o(e).view === "grid" && !c.value.length ? (n(!0), v(H, { key: 2 }, I(V(!1), (h, A) => (n(), v("div", {
1167
+ ], 42, Ns))), 256)) : S("", !0),
1168
+ a(e).view === "grid" && !c.value.length ? (n(!0), m(U, { key: 2 }, I(O(!1), (h, A) => (n(), m("div", {
1160
1169
  draggable: "true",
1161
- onDblclick: (b) => g(h),
1162
- onTouchstart: D[8] || (D[8] = (b) => E(b)),
1163
- onTouchend: D[9] || (D[9] = (b) => $()),
1164
- onContextmenu: Y((b) => o(e).emitter.emit("vf-contextmenu-show", { event: b, area: a.value, items: K(), target: h }), ["prevent"]),
1165
- onDragstart: (b) => ee(b),
1166
- onDragover: (b) => se(b, h),
1167
- onDrop: (b) => te(b, h),
1168
- class: U(["vf-item-" + o(l), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),
1170
+ onDblclick: (x) => k(h),
1171
+ onTouchstart: D[8] || (D[8] = (x) => C(x)),
1172
+ onTouchend: D[9] || (D[9] = (x) => $()),
1173
+ onContextmenu: Y((x) => a(e).emitter.emit("vf-contextmenu-show", { event: x, area: o.value, items: K(), target: h }), ["prevent"]),
1174
+ onDragstart: (x) => te(x),
1175
+ onDragover: (x) => ae(x, h),
1176
+ onDrop: (x) => se(x, h),
1177
+ class: B(["vf-item-" + a(l), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),
1169
1178
  "data-type": h.type,
1170
1179
  "data-item": JSON.stringify(h),
1171
1180
  "data-index": A
1172
1181
  }, [
1173
1182
  t("div", null, [
1174
1183
  t("div", Js, [
1175
- h.type === "dir" ? (n(), v("svg", Xs, Zs)) : (h.mime_type ?? "").startsWith("image") ? (n(), v("img", {
1184
+ h.type === "dir" ? (n(), m("svg", Xs, Zs)) : (h.mime_type ?? "").startsWith("image") ? (n(), m("img", {
1176
1185
  key: 1,
1177
1186
  class: "lazy h-10 md:h-12 m-auto",
1178
- "data-src": o(e).requester.getPreviewUrl(o(e).adapter, h),
1187
+ "data-src": a(e).requester.getPreviewUrl(a(e).adapter, h),
1179
1188
  alt: h.basename
1180
- }, null, 8, eo)) : (n(), v("svg", to, oo)),
1181
- !(h.mime_type ?? "").startsWith("image") && h.type != "dir" ? (n(), v("div", ao, m(r(h.extension)), 1)) : M("", !0)
1189
+ }, null, 8, ea)) : (n(), m("svg", ta, aa)),
1190
+ !(h.mime_type ?? "").startsWith("image") && h.type != "dir" ? (n(), m("div", oa, v(r(h.extension)), 1)) : S("", !0)
1182
1191
  ]),
1183
- t("span", ro, m(o(he)(h.basename)), 1)
1192
+ t("span", ra, v(a(he)(h.basename)), 1)
1184
1193
  ])
1185
- ], 42, Ks))), 256)) : M("", !0)
1194
+ ], 42, Ks))), 256)) : S("", !0)
1186
1195
  ], 34),
1187
- B(bs)
1196
+ H(bs)
1188
1197
  ]));
1189
1198
  }
1190
- }), io = ["onClick"], co = ["href", "download"], uo = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), mo = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), vo = {
1199
+ }), ia = ["onClick"], da = ["href", "download"], ca = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), ua = /* @__PURE__ */ t("span", { class: "px-1" }, null, -1), ma = {
1191
1200
  name: "VFContextMenu"
1192
- }, po = /* @__PURE__ */ Object.assign(vo, {
1201
+ }, va = /* @__PURE__ */ Object.assign(ma, {
1193
1202
  setup(p) {
1194
- const e = F("ServiceContainer"), { t: s } = e.i18n, r = _(null), a = _([]), d = _(""), u = le({
1203
+ const e = F("ServiceContainer"), { t: s } = e.i18n, r = b(null), o = b([]), i = b(""), u = ie({
1195
1204
  active: !1,
1196
1205
  items: [],
1197
1206
  positions: {
1198
1207
  left: 0,
1199
1208
  top: 0
1200
1209
  }
1201
- }), i = ve(() => u.items.filter((k) => k.key == null || e.features.includes(k.key)));
1202
- e.emitter.on("vf-context-selected", (k) => {
1203
- a.value = k;
1210
+ }), d = ee(() => u.items.filter((_) => _.key == null || e.features.includes(_.key)));
1211
+ e.emitter.on("vf-context-selected", (_) => {
1212
+ o.value = _;
1204
1213
  });
1205
1214
  const l = {
1206
1215
  newfolder: {
1207
- key: z.NEW_FOLDER,
1216
+ key: N.NEW_FOLDER,
1208
1217
  title: () => s("New Folder"),
1209
1218
  action: () => {
1210
1219
  e.emitter.emit("vf-modal-show", { type: "new-folder" });
1211
1220
  }
1212
1221
  },
1213
1222
  delete: {
1214
- key: z.DELETE,
1223
+ key: N.DELETE,
1215
1224
  title: () => s("Delete"),
1216
1225
  action: () => {
1217
- e.emitter.emit("vf-modal-show", { type: "delete", items: a });
1226
+ e.emitter.emit("vf-modal-show", { type: "delete", items: o });
1218
1227
  }
1219
1228
  },
1220
1229
  refresh: {
@@ -1224,109 +1233,109 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1224
1233
  }
1225
1234
  },
1226
1235
  preview: {
1227
- key: z.PREVIEW,
1236
+ key: N.PREVIEW,
1228
1237
  title: () => s("Preview"),
1229
1238
  action: () => {
1230
- e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: a.value[0] });
1239
+ e.emitter.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: o.value[0] });
1231
1240
  }
1232
1241
  },
1233
1242
  open: {
1234
1243
  title: () => s("Open"),
1235
1244
  action: () => {
1236
- e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: a.value[0].path } });
1245
+ e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: o.value[0].path } });
1237
1246
  }
1238
1247
  },
1239
1248
  openDir: {
1240
1249
  title: () => s("Open containing folder"),
1241
1250
  action: () => {
1242
- e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: a.value[0].dir } });
1251
+ e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: o.value[0].dir } });
1243
1252
  }
1244
1253
  },
1245
1254
  download: {
1246
- key: z.DOWNLOAD,
1247
- link: ve(() => e.requester.getDownloadUrl(e.data.adapter, a.value[0])),
1255
+ key: N.DOWNLOAD,
1256
+ link: ee(() => e.requester.getDownloadUrl(e.data.adapter, o.value[0])),
1248
1257
  title: () => s("Download"),
1249
1258
  action: () => {
1250
- const k = e.requester.getDownloadUrl(e.data.adapter, a.value[0]);
1251
- e.emitter.emit("vf-download", k);
1259
+ const _ = e.requester.getDownloadUrl(e.data.adapter, o.value[0]);
1260
+ e.emitter.emit("vf-download", _);
1252
1261
  }
1253
1262
  },
1254
1263
  archive: {
1255
- key: z.ARCHIVE,
1264
+ key: N.ARCHIVE,
1256
1265
  title: () => s("Archive"),
1257
1266
  action: () => {
1258
- e.emitter.emit("vf-modal-show", { type: "archive", items: a });
1267
+ e.emitter.emit("vf-modal-show", { type: "archive", items: o });
1259
1268
  }
1260
1269
  },
1261
1270
  unarchive: {
1262
- key: z.UNARCHIVE,
1271
+ key: N.UNARCHIVE,
1263
1272
  title: () => s("Unarchive"),
1264
1273
  action: () => {
1265
- e.emitter.emit("vf-modal-show", { type: "unarchive", items: a });
1274
+ e.emitter.emit("vf-modal-show", { type: "unarchive", items: o });
1266
1275
  }
1267
1276
  },
1268
1277
  rename: {
1269
- key: z.RENAME,
1278
+ key: N.RENAME,
1270
1279
  title: () => s("Rename"),
1271
1280
  action: () => {
1272
- e.emitter.emit("vf-modal-show", { type: "rename", items: a });
1281
+ e.emitter.emit("vf-modal-show", { type: "rename", items: o });
1273
1282
  }
1274
1283
  }
1275
- }, c = (k) => {
1276
- e.emitter.emit("vf-contextmenu-hide"), k.action();
1284
+ }, c = (_) => {
1285
+ e.emitter.emit("vf-contextmenu-hide"), _.action();
1277
1286
  };
1278
- e.emitter.on("vf-search-query", ({ newQuery: k }) => {
1279
- d.value = k;
1280
- }), e.emitter.on("vf-contextmenu-show", ({ event: k, area: $, items: y, target: C = null }) => {
1281
- if (u.items = [], d.value)
1282
- if (C)
1283
- u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [C]);
1287
+ e.emitter.on("vf-search-query", ({ newQuery: _ }) => {
1288
+ i.value = _;
1289
+ }), e.emitter.on("vf-contextmenu-show", ({ event: _, area: $, items: y, target: M = null }) => {
1290
+ if (u.items = [], i.value)
1291
+ if (M)
1292
+ u.items.push(l.openDir), e.emitter.emit("vf-context-selected", [M]);
1284
1293
  else
1285
1294
  return;
1286
1295
  else
1287
- !C && !d.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : y.length > 1 && y.some((E) => E.path === C.path) ? (u.items.push(l.refresh), u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", y)) : (C.type == "dir" ? u.items.push(l.open) : (u.items.push(l.preview), u.items.push(l.download)), u.items.push(l.rename), C.mime_type == "application/zip" ? u.items.push(l.unarchive) : u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", [C]));
1288
- w(k, $);
1296
+ !M && !i.value ? (u.items.push(l.refresh), u.items.push(l.newfolder), e.emitter.emit("vf-context-selected", [])) : y.length > 1 && y.some((C) => C.path === M.path) ? (u.items.push(l.refresh), u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", y)) : (M.type == "dir" ? u.items.push(l.open) : (u.items.push(l.preview), u.items.push(l.download)), u.items.push(l.rename), M.mime_type == "application/zip" ? u.items.push(l.unarchive) : u.items.push(l.archive), u.items.push(l.delete), e.emitter.emit("vf-context-selected", [M]));
1297
+ g(_, $);
1289
1298
  }), e.emitter.on("vf-contextmenu-hide", () => {
1290
1299
  u.active = !1;
1291
1300
  });
1292
- const w = (k, $) => {
1293
- u.active = !0, de(() => {
1294
- const y = e.root.getBoundingClientRect(), C = $.getBoundingClientRect();
1295
- let E = k.pageX - y.left, g = k.pageY - y.top, f = r.value.offsetHeight, V = r.value.offsetWidth;
1296
- E = C.right - k.pageX + window.scrollX < V ? E - V : E, g = C.bottom - k.pageY + window.scrollY < f ? g - f : g, u.positions = {
1297
- left: E + "px",
1298
- top: g + "px"
1301
+ const g = (_, $) => {
1302
+ u.active = !0, ce(() => {
1303
+ const y = e.root.getBoundingClientRect(), M = $.getBoundingClientRect();
1304
+ let C = _.pageX - y.left, k = _.pageY - y.top, f = r.value.offsetHeight, O = r.value.offsetWidth;
1305
+ C = M.right - _.pageX + window.scrollX < O ? C - O : C, k = M.bottom - _.pageY + window.scrollY < f ? k - f : k, u.positions = {
1306
+ left: C + "px",
1307
+ top: k + "px"
1299
1308
  };
1300
1309
  });
1301
1310
  };
1302
- return (k, $) => u.active ? (n(), v("ul", {
1311
+ return (_, $) => u.active ? (n(), m("ul", {
1303
1312
  key: 0,
1304
1313
  class: "z-30 absolute text-xs bg-neutral-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 border border-neutral-300 dark:border-gray-600 shadow rounded select-none",
1305
1314
  ref_key: "contextmenu",
1306
1315
  ref: r,
1307
1316
  style: be(u.positions)
1308
1317
  }, [
1309
- (n(!0), v(H, null, I(i.value, (y) => (n(), v("li", {
1318
+ (n(!0), m(U, null, I(d.value, (y) => (n(), m("li", {
1310
1319
  class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
1311
1320
  key: y.title,
1312
- onClick: (C) => c(y)
1321
+ onClick: (M) => c(y)
1313
1322
  }, [
1314
- y.link ? (n(), v("a", {
1323
+ y.link ? (n(), m("a", {
1315
1324
  key: 0,
1316
1325
  target: "_blank",
1317
1326
  href: y.link,
1318
1327
  download: y.link
1319
1328
  }, [
1320
- uo,
1321
- t("span", null, m(y.title()), 1)
1322
- ], 8, co)) : (n(), v(H, { key: 1 }, [
1323
- mo,
1324
- t("span", null, m(y.title()), 1)
1329
+ ca,
1330
+ t("span", null, v(y.title()), 1)
1331
+ ], 8, da)) : (n(), m(U, { key: 1 }, [
1332
+ ua,
1333
+ t("span", null, v(y.title()), 1)
1325
1334
  ], 64))
1326
- ], 8, io))), 128))
1327
- ], 4)) : M("", !0);
1335
+ ], 8, ia))), 128))
1336
+ ], 4)) : S("", !0);
1328
1337
  }
1329
- }), ho = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, fo = { class: "flex leading-5 items-center" }, go = ["aria-label"], _o = /* @__PURE__ */ t("svg", {
1338
+ }), pa = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, ha = { class: "flex leading-5 items-center" }, fa = ["aria-label"], ga = /* @__PURE__ */ t("svg", {
1330
1339
  xmlns: "http://www.w3.org/2000/svg",
1331
1340
  class: "h-5 w-5",
1332
1341
  fill: "none",
@@ -1339,9 +1348,9 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1339
1348
  "stroke-linejoin": "round",
1340
1349
  d: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
1341
1350
  })
1342
- ], -1), ko = [
1343
- _o
1344
- ], bo = ["value"], yo = { class: "ml-3" }, xo = { key: 0 }, wo = { class: "ml-1" }, $o = { class: "flex leading-5 items-center justify-end" }, Co = ["aria-label"], So = /* @__PURE__ */ t("svg", {
1351
+ ], -1), _a = [
1352
+ ga
1353
+ ], ka = ["value"], ba = { class: "ml-3" }, ya = { key: 0 }, xa = { class: "ml-1" }, wa = { class: "flex leading-5 items-center justify-end" }, $a = ["disabled"], Ca = ["aria-label"], Sa = /* @__PURE__ */ t("svg", {
1345
1354
  xmlns: "http://www.w3.org/2000/svg",
1346
1355
  class: "h-5 w-5 stroke-slate-500 cursor-pointer",
1347
1356
  fill: "none",
@@ -1354,57 +1363,68 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1354
1363
  "stroke-linejoin": "round",
1355
1364
  d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1356
1365
  })
1357
- ], -1), Mo = [
1358
- So
1359
- ], Eo = {
1366
+ ], -1), Ma = [
1367
+ Sa
1368
+ ], Ea = {
1360
1369
  name: "VFStatusbar"
1361
- }, Do = /* @__PURE__ */ Object.assign(Eo, {
1370
+ }, Da = /* @__PURE__ */ Object.assign(Ea, {
1362
1371
  setup(p) {
1363
- const e = F("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage, a = _(0), d = () => {
1372
+ const e = F("ServiceContainer"), { t: s } = e.i18n, { setStore: r } = e.storage, o = b(0), i = () => {
1364
1373
  e.emitter.emit("vf-search-exit"), e.emitter.emit("vf-fetch", { params: { q: "index", adapter: e.adapter } }), r("adapter", e.adapter);
1365
1374
  };
1366
- e.emitter.on("vf-nodes-selected", (i) => {
1367
- a.value = i.length;
1375
+ e.emitter.on("vf-nodes-selected", (l) => {
1376
+ o.value = l.length;
1377
+ });
1378
+ const u = b("");
1379
+ e.emitter.on("vf-search-query", ({ newQuery: l }) => {
1380
+ u.value = l;
1368
1381
  });
1369
- const u = _("");
1370
- return e.emitter.on("vf-search-query", ({ newQuery: i }) => {
1371
- u.value = i;
1372
- }), (i, l) => (n(), v("div", ho, [
1373
- t("div", fo, [
1382
+ const d = ee(() => {
1383
+ const l = e.selectButton.multiple ? e.selectedItems.length > 0 : e.selectedItems.length === 1;
1384
+ return e.selectButton.active && l;
1385
+ });
1386
+ return (l, c) => (n(), m("div", pa, [
1387
+ t("div", ha, [
1374
1388
  t("div", {
1375
1389
  class: "mx-2",
1376
- "aria-label": o(s)("Storage"),
1390
+ "aria-label": a(s)("Storage"),
1377
1391
  "data-microtip-position": "top-right",
1378
1392
  role: "tooltip"
1379
- }, ko, 8, go),
1393
+ }, _a, 8, fa),
1380
1394
  q(t("select", {
1381
- "onUpdate:modelValue": l[0] || (l[0] = (c) => o(e).adapter = c),
1382
- onChange: d,
1395
+ "onUpdate:modelValue": c[0] || (c[0] = (g) => a(e).adapter = g),
1396
+ onChange: i,
1383
1397
  class: "py-0.5 text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded pl-2 pr-8"
1384
1398
  }, [
1385
- (n(!0), v(H, null, I(o(e).data.storages, (c) => (n(), v("option", { value: c }, m(c), 9, bo))), 256))
1399
+ (n(!0), m(U, null, I(a(e).data.storages, (g) => (n(), m("option", { value: g }, v(g), 9, ka))), 256))
1386
1400
  ], 544), [
1387
- [pe, o(e).adapter]
1401
+ [pe, a(e).adapter]
1388
1402
  ]),
1389
- t("div", yo, [
1390
- u.value.length ? (n(), v("span", xo, m(o(e).data.files.length) + " items found. ", 1)) : M("", !0),
1391
- t("span", wo, m(a.value > 0 ? o(s)("%s item(s) selected.", a.value) : ""), 1)
1403
+ t("div", ba, [
1404
+ u.value.length ? (n(), m("span", ya, v(a(e).data.files.length) + " items found. ", 1)) : S("", !0),
1405
+ t("span", xa, v(o.value > 0 ? a(s)("%s item(s) selected.", o.value) : ""), 1)
1392
1406
  ])
1393
1407
  ]),
1394
- t("div", $o, [
1408
+ t("div", wa, [
1409
+ a(e).selectButton.active ? (n(), m("button", {
1410
+ key: 0,
1411
+ class: B(["vf-btn py-0 vf-btn-primary", { disabled: !d.value }]),
1412
+ disabled: !d.value,
1413
+ onClick: c[1] || (c[1] = (g) => a(e).selectButton.click(a(e).selectedItems, g))
1414
+ }, v(a(s)("Select")), 11, $a)) : S("", !0),
1395
1415
  t("span", {
1396
1416
  class: "mr-1",
1397
- "aria-label": o(s)("About"),
1417
+ "aria-label": a(s)("About"),
1398
1418
  "data-microtip-position": "top-left",
1399
1419
  role: "tooltip",
1400
- onClick: l[1] || (l[1] = (c) => o(e).emitter.emit("vf-modal-show", { type: "about" }))
1401
- }, Mo, 8, Co)
1420
+ onClick: c[2] || (c[2] = (g) => a(e).emitter.emit("vf-modal-show", { type: "about" }))
1421
+ }, Ma, 8, Ca)
1402
1422
  ])
1403
1423
  ]));
1404
1424
  }
1405
- }), jo = {
1425
+ }), ja = {
1406
1426
  name: "VueFinder"
1407
- }, Ao = /* @__PURE__ */ Object.assign(jo, {
1427
+ }, Aa = /* @__PURE__ */ Object.assign(ja, {
1408
1428
  props: {
1409
1429
  id: {
1410
1430
  type: String,
@@ -1414,6 +1434,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1414
1434
  type: [String, Object],
1415
1435
  required: !0
1416
1436
  },
1437
+ persist: {
1438
+ type: Boolean,
1439
+ default: !1
1440
+ },
1441
+ path: {
1442
+ type: String,
1443
+ default: "."
1444
+ },
1417
1445
  features: {
1418
1446
  type: [Array, Boolean],
1419
1447
  default: !0
@@ -1428,7 +1456,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1428
1456
  },
1429
1457
  locale: {
1430
1458
  type: String,
1431
- default: "en"
1459
+ default: null
1432
1460
  },
1433
1461
  maxHeight: {
1434
1462
  type: String,
@@ -1437,109 +1465,129 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1437
1465
  maxFileSize: {
1438
1466
  type: String,
1439
1467
  default: "10mb"
1468
+ },
1469
+ fullScreen: {
1470
+ type: Boolean,
1471
+ default: !1
1472
+ },
1473
+ selectButton: {
1474
+ type: Object,
1475
+ default(p) {
1476
+ return {
1477
+ active: !1,
1478
+ multiple: !1,
1479
+ click: (e) => {
1480
+ },
1481
+ ...p
1482
+ };
1483
+ }
1440
1484
  }
1441
1485
  },
1442
1486
  emits: ["select"],
1443
1487
  setup(p, { emit: e }) {
1444
- const s = e, a = Je(p, F("supportedLocales"));
1445
- je("ServiceContainer", a);
1446
- const d = _(null);
1447
- a.root = d, a.i18n, a.emitter.on("vf-modal-close", () => {
1448
- a.modal.active = !1;
1449
- }), a.emitter.on("vf-modal-show", (l) => {
1450
- a.modal.active = !0, a.modal.type = l.type, a.modal.data = l;
1488
+ const s = e, o = Je(p, F("VueFinderOptions"));
1489
+ je("ServiceContainer", o);
1490
+ const { setStore: i } = o.storage, u = b(null);
1491
+ o.root = u, o.i18n, o.emitter.on("vf-modal-close", () => {
1492
+ o.modal.active = !1;
1493
+ }), o.emitter.on("vf-modal-show", (c) => {
1494
+ o.modal.active = !0, o.modal.type = c.type, o.modal.data = c;
1451
1495
  });
1452
- const u = (l) => {
1453
- Object.assign(a.data, l), a.emitter.emit("vf-nodes-selected", {}), a.emitter.emit("vf-explorer-update");
1496
+ const d = (c) => {
1497
+ Object.assign(o.data, c), o.emitter.emit("vf-nodes-selected", {}), o.emitter.emit("vf-explorer-update");
1454
1498
  };
1455
- a.emitter.on("vf-nodes-selected", (l) => {
1456
- s("select", l);
1499
+ o.emitter.on("vf-nodes-selected", (c) => {
1500
+ o.selectedItems = c, s("select", c);
1457
1501
  });
1458
- let i;
1459
- return a.emitter.on("vf-fetch-abort", () => {
1460
- i.abort(), a.loading = !1;
1461
- }), a.emitter.on("vf-fetch", ({ params: l, body: c = null, onSuccess: w = null, onError: k = null, noCloseModal: $ = !1 }) => {
1462
- ["index", "search"].includes(l.q) && (i && i.abort(), a.loading = !0), i = new AbortController();
1463
- const y = i.signal;
1464
- a.requester.send({
1502
+ let l;
1503
+ return o.emitter.on("vf-fetch-abort", () => {
1504
+ l.abort(), o.loading = !1;
1505
+ }), o.emitter.on("vf-fetch", ({ params: c, body: g = null, onSuccess: _ = null, onError: $ = null, noCloseModal: y = !1 }) => {
1506
+ ["index", "search"].includes(c.q) && (l && l.abort(), o.loading = !0), l = new AbortController();
1507
+ const M = l.signal;
1508
+ o.requester.send({
1465
1509
  url: "",
1466
- method: l.m || "get",
1467
- params: l,
1468
- body: c,
1469
- abortSignal: y
1510
+ method: c.m || "get",
1511
+ params: c,
1512
+ body: g,
1513
+ abortSignal: M
1470
1514
  }).then((C) => {
1471
- a.adapter = C.adapter, ["index", "search"].includes(l.q) && (a.loading = !1), $ || a.emitter.emit("vf-modal-close"), u(C), w && w(C);
1515
+ o.adapter = C.adapter, o.persist && (o.path = C.dirname, i("path", o.path)), ["index", "search"].includes(c.q) && (o.loading = !1), y || o.emitter.emit("vf-modal-close"), d(C), _ && _(C);
1472
1516
  }).catch((C) => {
1473
- console.error(C), k && k(C);
1517
+ console.error(C), $ && $(C);
1474
1518
  });
1475
- }), a.emitter.on("vf-download", (l) => {
1476
- const c = document.createElement("a");
1477
- c.style.display = "none", c.target = "_blank", c.href = l, c.download = l, a.root.appendChild(c), c.click(), c.remove();
1519
+ }), o.emitter.on("vf-download", (c) => {
1520
+ const g = document.createElement("a");
1521
+ g.style.display = "none", g.target = "_blank", g.href = c, g.download = c, o.root.appendChild(g), g.click(), g.remove();
1478
1522
  }), P(() => {
1479
- a.emitter.emit("vf-fetch", { params: { q: "index", adapter: a.adapter } });
1480
- }), (l, c) => (n(), v("div", {
1523
+ let c = {};
1524
+ o.path.includes("://") && (c = {
1525
+ adapter: o.path.split("://")[0],
1526
+ path: o.path
1527
+ }), o.emitter.emit("vf-fetch", { params: { q: "index", adapter: o.adapter, ...c } });
1528
+ }), (c, g) => (n(), m("div", {
1481
1529
  class: "vuefinder",
1482
1530
  ref_key: "root",
1483
- ref: d
1531
+ ref: u
1484
1532
  }, [
1485
1533
  t("div", {
1486
- class: U(o(a).theme.actualValue === "dark" ? "dark" : "")
1534
+ class: B(a(o).theme.actualValue === "dark" ? "dark" : "")
1487
1535
  }, [
1488
1536
  t("div", {
1489
- class: U([o(a).fullscreen ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
1490
- style: be(o(a).fullscreen ? "" : "max-height: " + p.maxHeight),
1491
- onMousedown: c[0] || (c[0] = (w) => o(a).emitter.emit("vf-contextmenu-hide")),
1492
- onTouchstart: c[1] || (c[1] = (w) => o(a).emitter.emit("vf-contextmenu-hide"))
1537
+ class: B([a(o).fullScreen ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
1538
+ style: be(a(o).fullScreen ? "" : "max-height: " + p.maxHeight),
1539
+ onMousedown: g[0] || (g[0] = (_) => a(o).emitter.emit("vf-contextmenu-hide")),
1540
+ onTouchstart: g[1] || (g[1] = (_) => a(o).emitter.emit("vf-contextmenu-hide"))
1493
1541
  }, [
1494
- B(Vt),
1495
- B(cs),
1496
- B(lo),
1497
- B(Do)
1542
+ H(Ot),
1543
+ H(cs),
1544
+ H(la),
1545
+ H(Da)
1498
1546
  ], 38),
1499
- B(Ae, { name: "fade" }, {
1547
+ H(Ae, { name: "fade" }, {
1500
1548
  default: j(() => [
1501
- o(a).modal.active ? (n(), L(Te("v-f-modal-" + o(a).modal.type), { key: 0 })) : M("", !0)
1549
+ a(o).modal.active ? (n(), T(Le("v-f-modal-" + a(o).modal.type), { key: 0 })) : S("", !0)
1502
1550
  ]),
1503
1551
  _: 1
1504
1552
  }),
1505
- B(po)
1553
+ H(va)
1506
1554
  ], 2)
1507
1555
  ], 512));
1508
1556
  }
1509
- }), To = /* @__PURE__ */ t("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Lo = { class: "fixed z-10 inset-0 overflow-hidden" }, Fo = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, No = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Vo = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, G = {
1557
+ }), La = /* @__PURE__ */ t("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Ta = { class: "fixed z-10 inset-0 overflow-hidden" }, Fa = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl w-full" }, Va = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Oa = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, W = {
1510
1558
  __name: "ModalLayout",
1511
1559
  setup(p) {
1512
1560
  const e = F("ServiceContainer");
1513
1561
  return P(() => {
1514
1562
  const s = document.querySelector(".v-f-modal input");
1515
1563
  s && s.focus();
1516
- }), (s, r) => (n(), v("div", {
1564
+ }), (s, r) => (n(), m("div", {
1517
1565
  class: "v-f-modal relative z-30",
1518
1566
  "aria-labelledby": "modal-title",
1519
1567
  role: "dialog",
1520
1568
  "aria-modal": "true",
1521
- onKeyup: r[1] || (r[1] = Q((a) => o(e).emitter.emit("vf-modal-close"), ["esc"])),
1569
+ onKeyup: r[1] || (r[1] = Q((o) => a(e).emitter.emit("vf-modal-close"), ["esc"])),
1522
1570
  tabindex: "0"
1523
1571
  }, [
1524
- To,
1525
- t("div", Lo, [
1572
+ La,
1573
+ t("div", Ta, [
1526
1574
  t("div", {
1527
1575
  class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
1528
- onMousedown: r[0] || (r[0] = Y((a) => o(e).emitter.emit("vf-modal-close"), ["self"]))
1576
+ onMousedown: r[0] || (r[0] = Y((o) => a(e).emitter.emit("vf-modal-close"), ["self"]))
1529
1577
  }, [
1530
- t("div", Fo, [
1531
- t("div", No, [
1532
- ne(s.$slots, "default")
1578
+ t("div", Fa, [
1579
+ t("div", Va, [
1580
+ le(s.$slots, "default")
1533
1581
  ]),
1534
- t("div", Vo, [
1535
- ne(s.$slots, "buttons")
1582
+ t("div", Oa, [
1583
+ le(s.$slots, "buttons")
1536
1584
  ])
1537
1585
  ])
1538
1586
  ], 32)
1539
1587
  ])
1540
1588
  ], 32));
1541
1589
  }
1542
- }, zo = ["aria-label"], Oo = /* @__PURE__ */ t("svg", {
1590
+ }, Na = ["aria-label"], za = /* @__PURE__ */ t("svg", {
1543
1591
  xmlns: "http://www.w3.org/2000/svg",
1544
1592
  fill: "none",
1545
1593
  viewBox: "0 0 24 24",
@@ -1552,11 +1600,11 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1552
1600
  "stroke-linejoin": "round",
1553
1601
  d: "M6 18L18 6M6 6l12 12"
1554
1602
  })
1555
- ], -1), Uo = [
1556
- Oo
1557
- ], Ho = {
1603
+ ], -1), Ba = [
1604
+ za
1605
+ ], Ua = {
1558
1606
  name: "Message"
1559
- }, W = /* @__PURE__ */ Object.assign(Ho, {
1607
+ }, G = /* @__PURE__ */ Object.assign(Ua, {
1560
1608
  props: {
1561
1609
  error: {
1562
1610
  type: Boolean,
@@ -1566,30 +1614,30 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1566
1614
  emits: ["hidden"],
1567
1615
  setup(p, { emit: e }) {
1568
1616
  var c;
1569
- const s = e, r = F("ServiceContainer"), { t: a } = r.i18n, d = _(!1), u = _(null), i = _((c = u.value) == null ? void 0 : c.strMessage);
1570
- ie(i, () => d.value = !1);
1617
+ const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = b(!1), u = b(null), d = b((c = u.value) == null ? void 0 : c.strMessage);
1618
+ de(d, () => i.value = !1);
1571
1619
  const l = () => {
1572
- s("hidden"), d.value = !0;
1620
+ s("hidden"), i.value = !0;
1573
1621
  };
1574
- return (w, k) => (n(), v("div", null, [
1575
- d.value ? M("", !0) : (n(), v("div", {
1622
+ return (g, _) => (n(), m("div", null, [
1623
+ i.value ? S("", !0) : (n(), m("div", {
1576
1624
  key: 0,
1577
1625
  ref_key: "strMessage",
1578
1626
  ref: u,
1579
- class: U(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", p.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
1627
+ class: B(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", p.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
1580
1628
  }, [
1581
- ne(w.$slots, "default"),
1629
+ le(g.$slots, "default"),
1582
1630
  t("div", {
1583
1631
  class: "ml-auto cursor-pointer",
1584
1632
  onClick: l,
1585
- "aria-label": o(a)("Close"),
1633
+ "aria-label": a(o)("Close"),
1586
1634
  "data-microtip-position": "top-left",
1587
1635
  role: "tooltip"
1588
- }, Uo, 8, zo)
1636
+ }, Ba, 8, Na)
1589
1637
  ], 2))
1590
1638
  ]));
1591
1639
  }
1592
- }), Bo = { class: "sm:flex sm:items-start" }, Ro = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1640
+ }), Ha = { class: "sm:flex sm:items-start" }, Ra = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1593
1641
  /* @__PURE__ */ t("svg", {
1594
1642
  xmlns: "http://www.w3.org/2000/svg",
1595
1643
  class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
@@ -1604,13 +1652,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1604
1652
  d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
1605
1653
  })
1606
1654
  ])
1607
- ], -1), qo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Io = {
1655
+ ], -1), qa = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ia = {
1608
1656
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1609
1657
  id: "modal-title"
1610
- }, Po = { class: "mt-2" }, Go = { class: "text-sm text-gray-500" }, Wo = {
1658
+ }, Pa = { class: "mt-2" }, Wa = { class: "text-sm text-gray-500" }, Ga = {
1611
1659
  class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
1612
1660
  style: { "max-height": "200px" }
1613
- }, Yo = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Ko = {
1661
+ }, Ya = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Ka = {
1614
1662
  key: 0,
1615
1663
  xmlns: "http://www.w3.org/2000/svg",
1616
1664
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -1618,13 +1666,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1618
1666
  viewBox: "0 0 24 24",
1619
1667
  stroke: "currentColor",
1620
1668
  "stroke-width": "1"
1621
- }, Jo = /* @__PURE__ */ t("path", {
1669
+ }, Ja = /* @__PURE__ */ t("path", {
1622
1670
  "stroke-linecap": "round",
1623
1671
  "stroke-linejoin": "round",
1624
1672
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
1625
- }, null, -1), Xo = [
1626
- Jo
1627
- ], Qo = {
1673
+ }, null, -1), Xa = [
1674
+ Ja
1675
+ ], Qa = {
1628
1676
  key: 1,
1629
1677
  xmlns: "http://www.w3.org/2000/svg",
1630
1678
  class: "h-5 w-5 text-neutral-500",
@@ -1632,19 +1680,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1632
1680
  viewBox: "0 0 24 24",
1633
1681
  stroke: "currentColor",
1634
1682
  "stroke-width": "1"
1635
- }, Zo = /* @__PURE__ */ t("path", {
1683
+ }, Za = /* @__PURE__ */ t("path", {
1636
1684
  "stroke-linecap": "round",
1637
1685
  "stroke-linejoin": "round",
1638
1686
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
1639
- }, null, -1), ea = [
1640
- Zo
1641
- ], ta = { class: "ml-1.5" }, sa = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, oa = {
1687
+ }, null, -1), eo = [
1688
+ Za
1689
+ ], to = { class: "ml-1.5" }, so = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, ao = {
1642
1690
  name: "VFModalDelete"
1643
- }, aa = /* @__PURE__ */ Object.assign(oa, {
1691
+ }, oo = /* @__PURE__ */ Object.assign(ao, {
1644
1692
  setup(p) {
1645
1693
  const e = F("ServiceContainer");
1646
1694
  e.storage;
1647
- const { t: s } = e.i18n, r = _(e.modal.data.items), a = _(""), d = () => {
1695
+ const { t: s } = e.i18n, r = b(e.modal.data.items), o = b(""), i = () => {
1648
1696
  r.value.length && e.emitter.emit("vf-fetch", {
1649
1697
  params: {
1650
1698
  q: "delete",
@@ -1653,53 +1701,53 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1653
1701
  path: e.data.dirname
1654
1702
  },
1655
1703
  body: {
1656
- items: r.value.map(({ path: u, type: i }) => ({ path: u, type: i }))
1704
+ items: r.value.map(({ path: u, type: d }) => ({ path: u, type: d }))
1657
1705
  },
1658
1706
  onSuccess: () => {
1659
1707
  e.emitter.emit("vf-toast-push", { label: s("Files deleted.") });
1660
1708
  },
1661
1709
  onError: (u) => {
1662
- a.value = s(u.message);
1710
+ o.value = s(u.message);
1663
1711
  }
1664
1712
  });
1665
1713
  };
1666
- return (u, i) => (n(), L(G, null, {
1714
+ return (u, d) => (n(), T(W, null, {
1667
1715
  buttons: j(() => [
1668
1716
  t("button", {
1669
1717
  type: "button",
1670
- onClick: d,
1718
+ onClick: i,
1671
1719
  class: "vf-btn vf-btn-danger"
1672
- }, m(o(s)("Yes, Delete!")), 1),
1720
+ }, v(a(s)("Yes, Delete!")), 1),
1673
1721
  t("button", {
1674
1722
  type: "button",
1675
- onClick: i[1] || (i[1] = (l) => o(e).emitter.emit("vf-modal-close")),
1723
+ onClick: d[1] || (d[1] = (l) => a(e).emitter.emit("vf-modal-close")),
1676
1724
  class: "vf-btn vf-btn-secondary"
1677
- }, m(o(s)("Cancel")), 1),
1678
- t("div", sa, m(o(s)("This action cannot be undone.")), 1)
1725
+ }, v(a(s)("Cancel")), 1),
1726
+ t("div", so, v(a(s)("This action cannot be undone.")), 1)
1679
1727
  ]),
1680
1728
  default: j(() => [
1681
- t("div", Bo, [
1682
- Ro,
1683
- t("div", qo, [
1684
- t("h3", Io, m(o(s)("Delete files")), 1),
1685
- t("div", Po, [
1686
- t("p", Go, m(o(s)("Are you sure you want to delete these files?")), 1),
1687
- t("div", Wo, [
1688
- (n(!0), v(H, null, I(r.value, (l) => (n(), v("p", Yo, [
1689
- l.type === "dir" ? (n(), v("svg", Ko, Xo)) : (n(), v("svg", Qo, ea)),
1690
- t("span", ta, m(l.basename), 1)
1729
+ t("div", Ha, [
1730
+ Ra,
1731
+ t("div", qa, [
1732
+ t("h3", Ia, v(a(s)("Delete files")), 1),
1733
+ t("div", Pa, [
1734
+ t("p", Wa, v(a(s)("Are you sure you want to delete these files?")), 1),
1735
+ t("div", Ga, [
1736
+ (n(!0), m(U, null, I(r.value, (l) => (n(), m("p", Ya, [
1737
+ l.type === "dir" ? (n(), m("svg", Ka, Xa)) : (n(), m("svg", Qa, eo)),
1738
+ t("span", to, v(l.basename), 1)
1691
1739
  ]))), 256))
1692
1740
  ]),
1693
- a.value.length ? (n(), L(W, {
1741
+ o.value.length ? (n(), T(G, {
1694
1742
  key: 0,
1695
- onHidden: i[0] || (i[0] = (l) => a.value = ""),
1743
+ onHidden: d[0] || (d[0] = (l) => o.value = ""),
1696
1744
  error: ""
1697
1745
  }, {
1698
1746
  default: j(() => [
1699
- N(m(a.value), 1)
1747
+ V(v(o.value), 1)
1700
1748
  ]),
1701
1749
  _: 1
1702
- })) : M("", !0)
1750
+ })) : S("", !0)
1703
1751
  ])
1704
1752
  ])
1705
1753
  ])
@@ -1707,7 +1755,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1707
1755
  _: 1
1708
1756
  }));
1709
1757
  }
1710
- }), ra = { class: "sm:flex sm:items-start" }, na = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1758
+ }), ro = { class: "sm:flex sm:items-start" }, no = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1711
1759
  /* @__PURE__ */ t("svg", {
1712
1760
  xmlns: "http://www.w3.org/2000/svg",
1713
1761
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1722,31 +1770,31 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1722
1770
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1723
1771
  })
1724
1772
  ])
1725
- ], -1), la = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ia = {
1773
+ ], -1), lo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, io = {
1726
1774
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1727
1775
  id: "modal-title"
1728
- }, da = { class: "mt-2" }, ca = { class: "text-sm text-gray-500" }, ua = {
1776
+ }, co = { class: "mt-2" }, uo = { class: "text-sm text-gray-500" }, mo = {
1729
1777
  name: "VFModalMessage"
1730
- }, ma = /* @__PURE__ */ Object.assign(ua, {
1778
+ }, vo = /* @__PURE__ */ Object.assign(mo, {
1731
1779
  setup(p) {
1732
1780
  const e = F("ServiceContainer"), { t: s } = e.i18n;
1733
- return (r, a) => (n(), L(G, null, {
1781
+ return (r, o) => (n(), T(W, null, {
1734
1782
  buttons: j(() => [
1735
1783
  t("button", {
1736
1784
  type: "button",
1737
- onClick: a[0] || (a[0] = (d) => o(e).emitter.emit("vf-modal-close")),
1785
+ onClick: o[0] || (o[0] = (i) => a(e).emitter.emit("vf-modal-close")),
1738
1786
  class: "vf-btn vf-btn-secondary"
1739
- }, m(o(s)("Close")), 1)
1787
+ }, v(a(s)("Close")), 1)
1740
1788
  ]),
1741
1789
  default: j(() => {
1742
- var d, u;
1790
+ var i, u;
1743
1791
  return [
1744
- t("div", ra, [
1745
- na,
1746
- t("div", la, [
1747
- t("h3", ia, m(((d = o(e).modal.data) == null ? void 0 : d.title) ?? "Title"), 1),
1748
- t("div", da, [
1749
- t("p", ca, m(((u = o(e).modal.data) == null ? void 0 : u.message) ?? "Message"), 1)
1792
+ t("div", ro, [
1793
+ no,
1794
+ t("div", lo, [
1795
+ t("h3", io, v(((i = a(e).modal.data) == null ? void 0 : i.title) ?? "Title"), 1),
1796
+ t("div", co, [
1797
+ t("p", uo, v(((u = a(e).modal.data) == null ? void 0 : u.message) ?? "Message"), 1)
1750
1798
  ])
1751
1799
  ])
1752
1800
  ])
@@ -1755,7 +1803,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1755
1803
  _: 1
1756
1804
  }));
1757
1805
  }
1758
- }), va = { class: "sm:flex sm:items-start" }, pa = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1806
+ }), po = { class: "sm:flex sm:items-start" }, ho = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1759
1807
  /* @__PURE__ */ t("svg", {
1760
1808
  xmlns: "http://www.w3.org/2000/svg",
1761
1809
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1770,16 +1818,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1770
1818
  d: "M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"
1771
1819
  })
1772
1820
  ])
1773
- ], -1), ha = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, fa = {
1821
+ ], -1), fo = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, go = {
1774
1822
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1775
1823
  id: "modal-title"
1776
- }, ga = { class: "mt-2" }, _a = { class: "text-sm text-gray-500" }, ka = ["placeholder"], ba = {
1824
+ }, _o = { class: "mt-2" }, ko = { class: "text-sm text-gray-500" }, bo = ["placeholder"], yo = {
1777
1825
  name: "VFModalNewFolder"
1778
- }, ya = /* @__PURE__ */ Object.assign(ba, {
1826
+ }, xo = /* @__PURE__ */ Object.assign(yo, {
1779
1827
  setup(p) {
1780
1828
  const e = F("ServiceContainer");
1781
1829
  e.storage;
1782
- const { t: s } = e.i18n, r = _(""), a = _(""), d = () => {
1830
+ const { t: s } = e.i18n, r = b(""), o = b(""), i = () => {
1783
1831
  r.value != "" && e.emitter.emit("vf-fetch", {
1784
1832
  params: {
1785
1833
  q: "newfolder",
@@ -1794,49 +1842,49 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1794
1842
  e.emitter.emit("vf-toast-push", { label: s("%s is created.", r.value) });
1795
1843
  },
1796
1844
  onError: (u) => {
1797
- a.value = s(u.message);
1845
+ o.value = s(u.message);
1798
1846
  }
1799
1847
  });
1800
1848
  };
1801
- return (u, i) => (n(), L(G, null, {
1849
+ return (u, d) => (n(), T(W, null, {
1802
1850
  buttons: j(() => [
1803
1851
  t("button", {
1804
1852
  type: "button",
1805
- onClick: d,
1853
+ onClick: i,
1806
1854
  class: "vf-btn vf-btn-primary"
1807
- }, m(o(s)("Create")), 1),
1855
+ }, v(a(s)("Create")), 1),
1808
1856
  t("button", {
1809
1857
  type: "button",
1810
- onClick: i[2] || (i[2] = (l) => o(e).emitter.emit("vf-modal-close")),
1858
+ onClick: d[2] || (d[2] = (l) => a(e).emitter.emit("vf-modal-close")),
1811
1859
  class: "vf-btn vf-btn-secondary"
1812
- }, m(o(s)("Cancel")), 1)
1860
+ }, v(a(s)("Cancel")), 1)
1813
1861
  ]),
1814
1862
  default: j(() => [
1815
- t("div", va, [
1816
- pa,
1817
- t("div", ha, [
1818
- t("h3", fa, m(o(s)("New Folder")), 1),
1819
- t("div", ga, [
1820
- t("p", _a, m(o(s)("Create a new folder")), 1),
1863
+ t("div", po, [
1864
+ ho,
1865
+ t("div", fo, [
1866
+ t("h3", go, v(a(s)("New Folder")), 1),
1867
+ t("div", _o, [
1868
+ t("p", ko, v(a(s)("Create a new folder")), 1),
1821
1869
  q(t("input", {
1822
- "onUpdate:modelValue": i[0] || (i[0] = (l) => r.value = l),
1823
- onKeyup: Q(d, ["enter"]),
1870
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
1871
+ onKeyup: Q(i, ["enter"]),
1824
1872
  class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
1825
- placeholder: o(s)("Folder Name"),
1873
+ placeholder: a(s)("Folder Name"),
1826
1874
  type: "text"
1827
- }, null, 40, ka), [
1875
+ }, null, 40, bo), [
1828
1876
  [Z, r.value]
1829
1877
  ]),
1830
- a.value.length ? (n(), L(W, {
1878
+ o.value.length ? (n(), T(G, {
1831
1879
  key: 0,
1832
- onHidden: i[1] || (i[1] = (l) => a.value = ""),
1880
+ onHidden: d[1] || (d[1] = (l) => o.value = ""),
1833
1881
  error: ""
1834
1882
  }, {
1835
1883
  default: j(() => [
1836
- N(m(a.value), 1)
1884
+ V(v(o.value), 1)
1837
1885
  ]),
1838
1886
  _: 1
1839
- })) : M("", !0)
1887
+ })) : S("", !0)
1840
1888
  ])
1841
1889
  ])
1842
1890
  ])
@@ -1844,7 +1892,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1844
1892
  _: 1
1845
1893
  }));
1846
1894
  }
1847
- }), xa = { class: "sm:flex sm:items-start" }, wa = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1895
+ }), wo = { class: "sm:flex sm:items-start" }, $o = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
1848
1896
  /* @__PURE__ */ t("svg", {
1849
1897
  xmlns: "http://www.w3.org/2000/svg",
1850
1898
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1859,16 +1907,16 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1859
1907
  d: "M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
1860
1908
  })
1861
1909
  ])
1862
- ], -1), $a = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ca = {
1910
+ ], -1), Co = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, So = {
1863
1911
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1864
1912
  id: "modal-title"
1865
- }, Sa = { class: "mt-2" }, Ma = { class: "text-sm text-gray-500" }, Ea = ["placeholder"], Da = {
1913
+ }, Mo = { class: "mt-2" }, Eo = { class: "text-sm text-gray-500" }, Do = ["placeholder"], jo = {
1866
1914
  name: "VFModalNewFile"
1867
- }, ja = /* @__PURE__ */ Object.assign(Da, {
1915
+ }, Ao = /* @__PURE__ */ Object.assign(jo, {
1868
1916
  setup(p) {
1869
1917
  const e = F("ServiceContainer");
1870
1918
  e.storage;
1871
- const { t: s } = e.i18n, r = _(""), a = _(""), d = () => {
1919
+ const { t: s } = e.i18n, r = b(""), o = b(""), i = () => {
1872
1920
  r.value != "" && e.emitter.emit("vf-fetch", {
1873
1921
  params: {
1874
1922
  q: "newfile",
@@ -1883,49 +1931,49 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1883
1931
  e.emitter.emit("vf-toast-push", { label: s("%s is created.", r.value) });
1884
1932
  },
1885
1933
  onError: (u) => {
1886
- a.value = s(u.message);
1934
+ o.value = s(u.message);
1887
1935
  }
1888
1936
  });
1889
1937
  };
1890
- return (u, i) => (n(), L(G, null, {
1938
+ return (u, d) => (n(), T(W, null, {
1891
1939
  buttons: j(() => [
1892
1940
  t("button", {
1893
1941
  type: "button",
1894
- onClick: d,
1942
+ onClick: i,
1895
1943
  class: "vf-btn vf-btn-primary"
1896
- }, m(o(s)("Create")), 1),
1944
+ }, v(a(s)("Create")), 1),
1897
1945
  t("button", {
1898
1946
  type: "button",
1899
- onClick: i[2] || (i[2] = (l) => o(e).emitter.emit("vf-modal-close")),
1947
+ onClick: d[2] || (d[2] = (l) => a(e).emitter.emit("vf-modal-close")),
1900
1948
  class: "vf-btn vf-btn-secondary"
1901
- }, m(o(s)("Cancel")), 1)
1949
+ }, v(a(s)("Cancel")), 1)
1902
1950
  ]),
1903
1951
  default: j(() => [
1904
- t("div", xa, [
1905
- wa,
1906
- t("div", $a, [
1907
- t("h3", Ca, m(o(s)("New File")), 1),
1908
- t("div", Sa, [
1909
- t("p", Ma, m(o(s)("Create a new file")), 1),
1952
+ t("div", wo, [
1953
+ $o,
1954
+ t("div", Co, [
1955
+ t("h3", So, v(a(s)("New File")), 1),
1956
+ t("div", Mo, [
1957
+ t("p", Eo, v(a(s)("Create a new file")), 1),
1910
1958
  q(t("input", {
1911
- "onUpdate:modelValue": i[0] || (i[0] = (l) => r.value = l),
1912
- onKeyup: Q(d, ["enter"]),
1959
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => r.value = l),
1960
+ onKeyup: Q(i, ["enter"]),
1913
1961
  class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
1914
- placeholder: o(s)("File Name"),
1962
+ placeholder: a(s)("File Name"),
1915
1963
  type: "text"
1916
- }, null, 40, Ea), [
1964
+ }, null, 40, Do), [
1917
1965
  [Z, r.value]
1918
1966
  ]),
1919
- a.value.length ? (n(), L(W, {
1967
+ o.value.length ? (n(), T(G, {
1920
1968
  key: 0,
1921
- onHidden: i[1] || (i[1] = (l) => a.value = ""),
1969
+ onHidden: d[1] || (d[1] = (l) => o.value = ""),
1922
1970
  error: ""
1923
1971
  }, {
1924
1972
  default: j(() => [
1925
- N(m(a.value), 1)
1973
+ V(v(o.value), 1)
1926
1974
  ]),
1927
1975
  _: 1
1928
- })) : M("", !0)
1976
+ })) : S("", !0)
1929
1977
  ])
1930
1978
  ])
1931
1979
  ])
@@ -1933,14 +1981,14 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1933
1981
  _: 1
1934
1982
  }));
1935
1983
  }
1936
- }), Aa = { class: "flex" }, Ta = ["aria-label"], La = { class: "ml-auto mb-2" }, Fa = {
1984
+ }), Lo = { class: "flex" }, To = ["aria-label"], Fo = { class: "ml-auto mb-2" }, Vo = {
1937
1985
  key: 0,
1938
1986
  class: "p-2 border font-normal whitespace-pre-wrap border-gray-200 dark:border-gray-700/50 dark:text-gray-200 rounded min-h-[200px] max-h-[60vh] text-xs overflow-auto"
1939
- }, Na = { key: 1 }, Va = {
1987
+ }, Oo = { key: 1 }, No = {
1940
1988
  __name: "Text",
1941
1989
  emits: ["success"],
1942
1990
  setup(p, { emit: e }) {
1943
- const s = e, r = _(""), a = _(""), d = _(null), u = _(!1), i = _(""), l = _(!1), c = F("ServiceContainer"), { t: w } = c.i18n;
1991
+ const s = e, r = b(""), o = b(""), i = b(null), u = b(!1), d = b(""), l = b(!1), c = F("ServiceContainer"), { t: g } = c.i18n;
1944
1992
  P(() => {
1945
1993
  c.requester.send({
1946
1994
  url: "",
@@ -1951,12 +1999,12 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1951
1999
  r.value = y, s("success");
1952
2000
  });
1953
2001
  });
1954
- const k = () => {
1955
- u.value = !u.value, a.value = r.value, u.value == !0 && de(() => {
1956
- d.value.focus();
2002
+ const _ = () => {
2003
+ u.value = !u.value, o.value = r.value, u.value == !0 && ce(() => {
2004
+ i.value.focus();
1957
2005
  });
1958
2006
  }, $ = () => {
1959
- i.value = "", l.value = !1, c.requester.send({
2007
+ d.value = "", l.value = !1, c.requester.send({
1960
2008
  url: "",
1961
2009
  method: "post",
1962
2010
  params: {
@@ -1965,75 +2013,75 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
1965
2013
  path: c.modal.data.item.path
1966
2014
  },
1967
2015
  body: {
1968
- content: a.value
2016
+ content: o.value
1969
2017
  },
1970
2018
  responseType: "text"
1971
2019
  }).then((y) => {
1972
- i.value = w("Updated."), r.value = y, s("success"), u.value = !u.value;
2020
+ d.value = g("Updated."), r.value = y, s("success"), u.value = !u.value;
1973
2021
  }).catch((y) => {
1974
- i.value = w(y.message), l.value = !0;
2022
+ d.value = g(y.message), l.value = !0;
1975
2023
  });
1976
2024
  };
1977
- return (y, C) => (n(), v(H, null, [
1978
- t("div", Aa, [
2025
+ return (y, M) => (n(), m(U, null, [
2026
+ t("div", Lo, [
1979
2027
  t("div", {
1980
2028
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1981
2029
  id: "modal-title",
1982
- "aria-label": o(c).modal.data.item.path,
2030
+ "aria-label": a(c).modal.data.item.path,
1983
2031
  "data-microtip-position": "bottom-right",
1984
2032
  role: "tooltip"
1985
- }, m(o(c).modal.data.item.basename), 9, Ta),
1986
- t("div", La, [
1987
- u.value ? (n(), v("button", {
2033
+ }, v(a(c).modal.data.item.basename), 9, To),
2034
+ t("div", Fo, [
2035
+ u.value ? (n(), m("button", {
1988
2036
  key: 0,
1989
2037
  onClick: $,
1990
2038
  class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
1991
- }, m(o(w)("Save")), 1)) : M("", !0),
1992
- o(c).features.includes(o(z).EDIT) ? (n(), v("button", {
2039
+ }, v(a(g)("Save")), 1)) : S("", !0),
2040
+ a(c).features.includes(a(N).EDIT) ? (n(), m("button", {
1993
2041
  key: 1,
1994
2042
  class: "ml-1 px-2 py-1 text-blue-500",
1995
- onClick: C[0] || (C[0] = (E) => k())
1996
- }, m(u.value ? o(w)("Cancel") : o(w)("Edit")), 1)) : M("", !0)
2043
+ onClick: M[0] || (M[0] = (C) => _())
2044
+ }, v(u.value ? a(g)("Cancel") : a(g)("Edit")), 1)) : S("", !0)
1997
2045
  ])
1998
2046
  ]),
1999
2047
  t("div", null, [
2000
- u.value ? (n(), v("div", Na, [
2048
+ u.value ? (n(), m("div", Oo, [
2001
2049
  q(t("textarea", {
2002
2050
  ref_key: "editInput",
2003
- ref: d,
2004
- "onUpdate:modelValue": C[1] || (C[1] = (E) => a.value = E),
2051
+ ref: i,
2052
+ "onUpdate:modelValue": M[1] || (M[1] = (C) => o.value = C),
2005
2053
  class: "w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs",
2006
2054
  name: "text",
2007
2055
  id: "",
2008
2056
  cols: "30",
2009
2057
  rows: "10"
2010
2058
  }, null, 512), [
2011
- [Z, a.value]
2059
+ [Z, o.value]
2012
2060
  ])
2013
- ])) : (n(), v("pre", Fa, m(r.value), 1)),
2014
- i.value.length ? (n(), L(W, {
2061
+ ])) : (n(), m("pre", Vo, v(r.value), 1)),
2062
+ d.value.length ? (n(), T(G, {
2015
2063
  key: 2,
2016
- onHidden: C[2] || (C[2] = (E) => i.value = ""),
2064
+ onHidden: M[2] || (M[2] = (C) => d.value = ""),
2017
2065
  error: l.value
2018
2066
  }, {
2019
2067
  default: j(() => [
2020
- N(m(i.value), 1)
2068
+ V(v(d.value), 1)
2021
2069
  ]),
2022
2070
  _: 1
2023
- }, 8, ["error"])) : M("", !0)
2071
+ }, 8, ["error"])) : S("", !0)
2024
2072
  ])
2025
2073
  ], 64));
2026
2074
  }
2027
- }, za = { class: "flex" }, Oa = ["aria-label"], Ua = { class: "ml-auto mb-2" }, Ha = { class: "w-full flex justify-center" }, Ba = ["src"], Ra = {
2075
+ }, zo = { class: "flex" }, Bo = ["aria-label"], Uo = { class: "ml-auto mb-2" }, Ho = { class: "w-full flex justify-center" }, Ro = ["src"], qo = {
2028
2076
  __name: "Image",
2029
2077
  emits: ["success"],
2030
2078
  setup(p, { emit: e }) {
2031
- const s = e, r = F("ServiceContainer"), { t: a } = r.i18n, d = _(null), u = _(null), i = _(!1), l = _(""), c = _(!1), w = () => {
2032
- i.value = !i.value, i.value ? u.value = new Oe(d.value, {
2079
+ const s = e, r = F("ServiceContainer"), { t: o } = r.i18n, i = b(null), u = b(null), d = b(!1), l = b(""), c = b(!1), g = () => {
2080
+ d.value = !d.value, d.value ? u.value = new ze(i.value, {
2033
2081
  crop($) {
2034
2082
  }
2035
2083
  }) : u.value.destroy();
2036
- }, k = () => {
2084
+ }, _ = () => {
2037
2085
  u.value.getCroppedCanvas({
2038
2086
  width: 795,
2039
2087
  height: 341
@@ -2050,181 +2098,181 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2050
2098
  path: r.modal.data.item.path
2051
2099
  },
2052
2100
  body: y
2053
- }).then((C) => {
2054
- l.value = a("Updated."), d.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), w(), s("success");
2055
- }).catch((C) => {
2056
- l.value = a(C.message), c.value = !0;
2101
+ }).then((M) => {
2102
+ l.value = o("Updated."), i.value.src = r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item), g(), s("success");
2103
+ }).catch((M) => {
2104
+ l.value = o(M.message), c.value = !0;
2057
2105
  });
2058
2106
  }
2059
2107
  );
2060
2108
  };
2061
2109
  return P(() => {
2062
2110
  s("success");
2063
- }), ($, y) => (n(), v(H, null, [
2064
- t("div", za, [
2111
+ }), ($, y) => (n(), m(U, null, [
2112
+ t("div", zo, [
2065
2113
  t("h3", {
2066
2114
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2067
2115
  id: "modal-title",
2068
- "aria-label": o(r).modal.data.item.path,
2116
+ "aria-label": a(r).modal.data.item.path,
2069
2117
  "data-microtip-position": "bottom-right",
2070
2118
  role: "tooltip"
2071
- }, m(o(r).modal.data.item.basename), 9, Oa),
2072
- t("div", Ua, [
2073
- i.value ? (n(), v("button", {
2119
+ }, v(a(r).modal.data.item.basename), 9, Bo),
2120
+ t("div", Uo, [
2121
+ d.value ? (n(), m("button", {
2074
2122
  key: 0,
2075
- onClick: k,
2123
+ onClick: _,
2076
2124
  class: "ml-1 px-2 py-1 rounded border border-transparent shadow-sm bg-blue-700/75 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-700/50 text-base font-medium text-white sm:ml-3 sm:w-auto sm:text-sm"
2077
- }, m(o(a)("Crop")), 1)) : M("", !0),
2078
- o(r).features.includes(o(z).EDIT) ? (n(), v("button", {
2125
+ }, v(a(o)("Crop")), 1)) : S("", !0),
2126
+ a(r).features.includes(a(N).EDIT) ? (n(), m("button", {
2079
2127
  key: 1,
2080
2128
  class: "ml-1 px-2 py-1 text-blue-500",
2081
- onClick: y[0] || (y[0] = (C) => w())
2082
- }, m(i.value ? o(a)("Cancel") : o(a)("Edit")), 1)) : M("", !0)
2129
+ onClick: y[0] || (y[0] = (M) => g())
2130
+ }, v(d.value ? a(o)("Cancel") : a(o)("Edit")), 1)) : S("", !0)
2083
2131
  ])
2084
2132
  ]),
2085
- t("div", Ha, [
2133
+ t("div", Ho, [
2086
2134
  t("img", {
2087
2135
  ref_key: "image",
2088
- ref: d,
2136
+ ref: i,
2089
2137
  class: "max-w-[50vh] max-h-[50vh]",
2090
- src: o(r).requester.getPreviewUrl(o(r).modal.data.adapter, o(r).modal.data.item),
2138
+ src: a(r).requester.getPreviewUrl(a(r).modal.data.adapter, a(r).modal.data.item),
2091
2139
  alt: ""
2092
- }, null, 8, Ba)
2140
+ }, null, 8, Ro)
2093
2141
  ]),
2094
- l.value.length ? (n(), L(W, {
2142
+ l.value.length ? (n(), T(G, {
2095
2143
  key: 0,
2096
- onHidden: y[1] || (y[1] = (C) => l.value = ""),
2144
+ onHidden: y[1] || (y[1] = (M) => l.value = ""),
2097
2145
  error: c.value
2098
2146
  }, {
2099
2147
  default: j(() => [
2100
- N(m(l.value), 1)
2148
+ V(v(l.value), 1)
2101
2149
  ]),
2102
2150
  _: 1
2103
- }, 8, ["error"])) : M("", !0)
2151
+ }, 8, ["error"])) : S("", !0)
2104
2152
  ], 64));
2105
2153
  }
2106
- }, qa = { class: "flex" }, Ia = ["aria-label"], Pa = /* @__PURE__ */ t("div", null, null, -1), Ga = {
2154
+ }, Io = { class: "flex" }, Po = ["aria-label"], Wo = /* @__PURE__ */ t("div", null, null, -1), Go = {
2107
2155
  __name: "Default",
2108
2156
  emits: ["success"],
2109
2157
  setup(p, { emit: e }) {
2110
2158
  const s = F("ServiceContainer"), r = e;
2111
2159
  return P(() => {
2112
2160
  r("success");
2113
- }), (a, d) => (n(), v(H, null, [
2114
- t("div", qa, [
2161
+ }), (o, i) => (n(), m(U, null, [
2162
+ t("div", Io, [
2115
2163
  t("h3", {
2116
2164
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2117
2165
  id: "modal-title",
2118
- "aria-label": o(s).modal.data.item.path,
2166
+ "aria-label": a(s).modal.data.item.path,
2119
2167
  "data-microtip-position": "bottom-right",
2120
2168
  role: "tooltip"
2121
- }, m(o(s).modal.data.item.basename), 9, Ia)
2169
+ }, v(a(s).modal.data.item.basename), 9, Po)
2122
2170
  ]),
2123
- Pa
2171
+ Wo
2124
2172
  ], 64));
2125
2173
  }
2126
- }, Wa = ["aria-label"], Ya = {
2174
+ }, Yo = ["aria-label"], Ko = {
2127
2175
  class: "w-full",
2128
2176
  preload: "",
2129
2177
  controls: ""
2130
- }, Ka = ["src"], Ja = {
2178
+ }, Jo = ["src"], Xo = {
2131
2179
  __name: "Video",
2132
2180
  emits: ["success"],
2133
2181
  setup(p, { emit: e }) {
2134
- const s = F("ServiceContainer"), r = e, a = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2182
+ const s = F("ServiceContainer"), r = e, o = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2135
2183
  return P(() => {
2136
2184
  r("success");
2137
- }), (d, u) => (n(), v("div", null, [
2185
+ }), (i, u) => (n(), m("div", null, [
2138
2186
  t("h3", {
2139
2187
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2140
2188
  id: "modal-title",
2141
- "aria-label": o(s).modal.data.item.path,
2189
+ "aria-label": a(s).modal.data.item.path,
2142
2190
  "data-microtip-position": "bottom-right",
2143
2191
  role: "tooltip"
2144
- }, m(o(s).modal.data.item.basename), 9, Wa),
2192
+ }, v(a(s).modal.data.item.basename), 9, Yo),
2145
2193
  t("div", null, [
2146
- t("video", Ya, [
2194
+ t("video", Ko, [
2147
2195
  t("source", {
2148
- src: a(),
2196
+ src: o(),
2149
2197
  type: "video/mp4"
2150
- }, null, 8, Ka),
2151
- N(" Your browser does not support the video tag. ")
2198
+ }, null, 8, Jo),
2199
+ V(" Your browser does not support the video tag. ")
2152
2200
  ])
2153
2201
  ])
2154
2202
  ]));
2155
2203
  }
2156
- }, Xa = ["aria-label"], Qa = {
2204
+ }, Qo = ["aria-label"], Zo = {
2157
2205
  class: "w-full",
2158
2206
  controls: ""
2159
- }, Za = ["src"], er = {
2207
+ }, er = ["src"], tr = {
2160
2208
  __name: "Audio",
2161
2209
  emits: ["success"],
2162
2210
  setup(p, { emit: e }) {
2163
- const s = e, r = F("ServiceContainer"), a = () => r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item);
2211
+ const s = e, r = F("ServiceContainer"), o = () => r.requester.getPreviewUrl(r.modal.data.adapter, r.modal.data.item);
2164
2212
  return P(() => {
2165
2213
  s("success");
2166
- }), (d, u) => (n(), v(H, null, [
2214
+ }), (i, u) => (n(), m(U, null, [
2167
2215
  t("h3", {
2168
2216
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2169
2217
  id: "modal-title",
2170
- "aria-label": o(r).modal.data.item.path,
2218
+ "aria-label": a(r).modal.data.item.path,
2171
2219
  "data-microtip-position": "bottom-right",
2172
2220
  role: "tooltip"
2173
- }, m(o(r).modal.data.item.basename), 9, Xa),
2221
+ }, v(a(r).modal.data.item.basename), 9, Qo),
2174
2222
  t("div", null, [
2175
- t("audio", Qa, [
2223
+ t("audio", Zo, [
2176
2224
  t("source", {
2177
- src: a(),
2225
+ src: o(),
2178
2226
  type: "audio/mpeg"
2179
- }, null, 8, Za),
2180
- N(" Your browser does not support the audio element. ")
2227
+ }, null, 8, er),
2228
+ V(" Your browser does not support the audio element. ")
2181
2229
  ])
2182
2230
  ])
2183
2231
  ], 64));
2184
2232
  }
2185
- }, tr = ["aria-label"], sr = ["data"], or = ["src"], ar = /* @__PURE__ */ t("p", null, [
2186
- /* @__PURE__ */ N(" Your browser does not support PDFs. "),
2233
+ }, sr = ["aria-label"], ar = ["data"], or = ["src"], rr = /* @__PURE__ */ t("p", null, [
2234
+ /* @__PURE__ */ V(" Your browser does not support PDFs. "),
2187
2235
  /* @__PURE__ */ t("a", { href: "https://example.com/test.pdf" }, "Download the PDF"),
2188
- /* @__PURE__ */ N(" . ")
2189
- ], -1), rr = [
2190
- ar
2191
- ], nr = {
2236
+ /* @__PURE__ */ V(" . ")
2237
+ ], -1), nr = [
2238
+ rr
2239
+ ], lr = {
2192
2240
  __name: "Pdf",
2193
2241
  emits: ["success"],
2194
2242
  setup(p, { emit: e }) {
2195
- const s = F("ServiceContainer"), r = e, a = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2243
+ const s = F("ServiceContainer"), r = e, o = () => s.requester.getPreviewUrl(s.modal.data.adapter, s.modal.data.item);
2196
2244
  return P(() => {
2197
2245
  r("success");
2198
- }), (d, u) => (n(), v(H, null, [
2246
+ }), (i, u) => (n(), m(U, null, [
2199
2247
  t("h3", {
2200
2248
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2201
2249
  id: "modal-title",
2202
- "aria-label": o(s).modal.data.item.path,
2250
+ "aria-label": a(s).modal.data.item.path,
2203
2251
  "data-microtip-position": "bottom-right",
2204
2252
  role: "tooltip"
2205
- }, m(o(s).modal.data.item.basename), 9, tr),
2253
+ }, v(a(s).modal.data.item.basename), 9, sr),
2206
2254
  t("div", null, [
2207
2255
  t("object", {
2208
2256
  class: "h-[60vh]",
2209
- data: a(),
2257
+ data: o(),
2210
2258
  type: "application/pdf",
2211
2259
  width: "100%",
2212
2260
  height: "100%"
2213
2261
  }, [
2214
2262
  t("iframe", {
2215
2263
  class: "border-0",
2216
- src: a(),
2264
+ src: o(),
2217
2265
  width: "100%",
2218
2266
  height: "100%"
2219
- }, rr, 8, or)
2220
- ], 8, sr)
2267
+ }, nr, 8, or)
2268
+ ], 8, ar)
2221
2269
  ])
2222
2270
  ], 64));
2223
2271
  }
2224
- }, lr = { class: "sm:flex sm:items-start" }, ir = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, dr = { key: 0 }, cr = { class: "text-gray-700 dark:text-gray-200 text-sm" }, ur = {
2272
+ }, ir = { class: "sm:flex sm:items-start" }, dr = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, cr = { key: 0 }, ur = { class: "text-gray-700 dark:text-gray-200 text-sm" }, mr = {
2225
2273
  key: 0,
2226
2274
  class: "flex leading-5"
2227
- }, mr = /* @__PURE__ */ t("svg", {
2275
+ }, vr = /* @__PURE__ */ t("svg", {
2228
2276
  class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white",
2229
2277
  xmlns: "http://www.w3.org/2000/svg",
2230
2278
  fill: "none",
@@ -2243,79 +2291,79 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2243
2291
  fill: "currentColor",
2244
2292
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
2245
2293
  })
2246
- ], -1), vr = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, pr = { class: "font-bold" }, hr = { class: "font-bold pl-2" }, fr = {
2294
+ ], -1), pr = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, hr = { class: "font-bold" }, fr = { class: "font-bold pl-2" }, gr = {
2247
2295
  key: 0,
2248
- class: "text-xs"
2249
- }, gr = ["download", "href"], _r = {
2296
+ class: "text-xs text-gray-600 dark:text-gray-400"
2297
+ }, _r = ["download", "href"], kr = {
2250
2298
  name: "VFModalPreview"
2251
- }, kr = /* @__PURE__ */ Object.assign(_r, {
2299
+ }, br = /* @__PURE__ */ Object.assign(kr, {
2252
2300
  setup(p) {
2253
- const e = F("ServiceContainer"), { t: s } = e.i18n, r = _(!1), a = (u) => (e.modal.data.item.mime_type ?? "").startsWith(u), d = e.features.includes(z.PREVIEW);
2254
- return d || (r.value = !0), (u, i) => (n(), L(G, null, {
2301
+ const e = F("ServiceContainer"), { t: s } = e.i18n, r = b(!1), o = (u) => (e.modal.data.item.mime_type ?? "").startsWith(u), i = e.features.includes(N.PREVIEW);
2302
+ return i || (r.value = !0), (u, d) => (n(), T(W, null, {
2255
2303
  buttons: j(() => [
2256
2304
  t("button", {
2257
2305
  type: "button",
2258
- onClick: i[6] || (i[6] = (l) => o(e).emitter.emit("vf-modal-close")),
2306
+ onClick: d[6] || (d[6] = (l) => a(e).emitter.emit("vf-modal-close")),
2259
2307
  class: "vf-btn vf-btn-secondary"
2260
- }, m(o(s)("Close")), 1),
2261
- o(e).features.includes(o(z).DOWNLOAD) ? (n(), v("a", {
2308
+ }, v(a(s)("Close")), 1),
2309
+ a(e).features.includes(a(N).DOWNLOAD) ? (n(), m("a", {
2262
2310
  key: 0,
2263
2311
  target: "_blank",
2264
2312
  class: "vf-btn vf-btn-primary",
2265
- download: o(e).requester.getDownloadUrl(o(e).modal.data.adapter, o(e).modal.data.item),
2266
- href: o(e).requester.getDownloadUrl(o(e).modal.data.adapter, o(e).modal.data.item)
2267
- }, m(o(s)("Download")), 9, gr)) : M("", !0)
2313
+ download: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item),
2314
+ href: a(e).requester.getDownloadUrl(a(e).modal.data.adapter, a(e).modal.data.item)
2315
+ }, v(a(s)("Download")), 9, _r)) : S("", !0)
2268
2316
  ]),
2269
2317
  default: j(() => [
2270
- t("div", lr, [
2271
- t("div", ir, [
2272
- o(d) ? (n(), v("div", dr, [
2273
- a("text") ? (n(), L(Va, {
2318
+ t("div", ir, [
2319
+ t("div", dr, [
2320
+ a(i) ? (n(), m("div", cr, [
2321
+ o("text") ? (n(), T(No, {
2274
2322
  key: 0,
2275
- onSuccess: i[0] || (i[0] = (l) => r.value = !0)
2276
- })) : a("image") ? (n(), L(Ra, {
2323
+ onSuccess: d[0] || (d[0] = (l) => r.value = !0)
2324
+ })) : o("image") ? (n(), T(qo, {
2277
2325
  key: 1,
2278
- onSuccess: i[1] || (i[1] = (l) => r.value = !0)
2279
- })) : a("video") ? (n(), L(Ja, {
2326
+ onSuccess: d[1] || (d[1] = (l) => r.value = !0)
2327
+ })) : o("video") ? (n(), T(Xo, {
2280
2328
  key: 2,
2281
- onSuccess: i[2] || (i[2] = (l) => r.value = !0)
2282
- })) : a("audio") ? (n(), L(er, {
2329
+ onSuccess: d[2] || (d[2] = (l) => r.value = !0)
2330
+ })) : o("audio") ? (n(), T(tr, {
2283
2331
  key: 3,
2284
- onSuccess: i[3] || (i[3] = (l) => r.value = !0)
2285
- })) : a("application/pdf") ? (n(), L(nr, {
2332
+ onSuccess: d[3] || (d[3] = (l) => r.value = !0)
2333
+ })) : o("application/pdf") ? (n(), T(lr, {
2286
2334
  key: 4,
2287
- onSuccess: i[4] || (i[4] = (l) => r.value = !0)
2288
- })) : (n(), L(Ga, {
2335
+ onSuccess: d[4] || (d[4] = (l) => r.value = !0)
2336
+ })) : (n(), T(Go, {
2289
2337
  key: 5,
2290
- onSuccess: i[5] || (i[5] = (l) => r.value = !0)
2338
+ onSuccess: d[5] || (d[5] = (l) => r.value = !0)
2291
2339
  }))
2292
- ])) : M("", !0),
2293
- t("div", cr, [
2294
- r.value === !1 ? (n(), v("div", ur, [
2295
- mr,
2296
- t("span", null, m(o(s)("Loading")), 1)
2297
- ])) : M("", !0)
2340
+ ])) : S("", !0),
2341
+ t("div", ur, [
2342
+ r.value === !1 ? (n(), m("div", mr, [
2343
+ vr,
2344
+ t("span", null, v(a(s)("Loading")), 1)
2345
+ ])) : S("", !0)
2298
2346
  ])
2299
2347
  ])
2300
2348
  ]),
2301
- t("div", vr, [
2349
+ t("div", pr, [
2302
2350
  t("div", null, [
2303
- t("span", pr, m(o(s)("File Size")) + ": ", 1),
2304
- N(m(o(e).filesize(o(e).modal.data.item.file_size)), 1)
2351
+ t("span", hr, v(a(s)("File Size")) + ": ", 1),
2352
+ V(v(a(e).filesize(a(e).modal.data.item.file_size)), 1)
2305
2353
  ]),
2306
2354
  t("div", null, [
2307
- t("span", hr, m(o(s)("Last Modified")) + ": ", 1),
2308
- N(" " + m(o(we)(o(e).modal.data.item.last_modified)), 1)
2355
+ t("span", fr, v(a(s)("Last Modified")) + ": ", 1),
2356
+ V(" " + v(a(we)(a(e).modal.data.item.last_modified)), 1)
2309
2357
  ])
2310
2358
  ]),
2311
- o(e).features.includes(o(z).DOWNLOAD) ? (n(), v("div", fr, [
2312
- t("span", null, m(o(s)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1)
2313
- ])) : M("", !0)
2359
+ a(e).features.includes(a(N).DOWNLOAD) ? (n(), m("div", gr, [
2360
+ t("span", null, v(a(s)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)), 1)
2361
+ ])) : S("", !0)
2314
2362
  ]),
2315
2363
  _: 1
2316
2364
  }));
2317
2365
  }
2318
- }), br = { class: "sm:flex sm:items-start" }, yr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2366
+ }), yr = { class: "sm:flex sm:items-start" }, xr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2319
2367
  /* @__PURE__ */ t("svg", {
2320
2368
  xmlns: "http://www.w3.org/2000/svg",
2321
2369
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2330,10 +2378,10 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2330
2378
  d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
2331
2379
  })
2332
2380
  ])
2333
- ], -1), xr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, wr = {
2381
+ ], -1), wr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = {
2334
2382
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2335
2383
  id: "modal-title"
2336
- }, $r = { class: "mt-2" }, Cr = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Sr = {
2384
+ }, Cr = { class: "mt-2" }, Sr = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Mr = {
2337
2385
  key: 0,
2338
2386
  xmlns: "http://www.w3.org/2000/svg",
2339
2387
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2341,13 +2389,13 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2341
2389
  viewBox: "0 0 24 24",
2342
2390
  stroke: "currentColor",
2343
2391
  "stroke-width": "1"
2344
- }, Mr = /* @__PURE__ */ t("path", {
2392
+ }, Er = /* @__PURE__ */ t("path", {
2345
2393
  "stroke-linecap": "round",
2346
2394
  "stroke-linejoin": "round",
2347
2395
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2348
- }, null, -1), Er = [
2349
- Mr
2350
- ], Dr = {
2396
+ }, null, -1), Dr = [
2397
+ Er
2398
+ ], jr = {
2351
2399
  key: 1,
2352
2400
  xmlns: "http://www.w3.org/2000/svg",
2353
2401
  class: "h-5 w-5 text-neutral-500",
@@ -2355,20 +2403,20 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2355
2403
  viewBox: "0 0 24 24",
2356
2404
  stroke: "currentColor",
2357
2405
  "stroke-width": "1"
2358
- }, jr = /* @__PURE__ */ t("path", {
2406
+ }, Ar = /* @__PURE__ */ t("path", {
2359
2407
  "stroke-linecap": "round",
2360
2408
  "stroke-linejoin": "round",
2361
2409
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
2362
- }, null, -1), Ar = [
2363
- jr
2364
- ], Tr = { class: "ml-1.5" }, Lr = {
2410
+ }, null, -1), Lr = [
2411
+ Ar
2412
+ ], Tr = { class: "ml-1.5" }, Fr = {
2365
2413
  name: "VFModalRename"
2366
- }, Fr = /* @__PURE__ */ Object.assign(Lr, {
2414
+ }, Vr = /* @__PURE__ */ Object.assign(Fr, {
2367
2415
  setup(p) {
2368
2416
  const e = F("ServiceContainer");
2369
2417
  e.storage;
2370
- const { t: s } = e.i18n, r = _(e.modal.data.items[0]), a = _(e.modal.data.items[0].basename), d = _(""), u = () => {
2371
- a.value != "" && e.emitter.emit("vf-fetch", {
2418
+ const { t: s } = e.i18n, r = b(e.modal.data.items[0]), o = b(e.modal.data.items[0].basename), i = b(""), u = () => {
2419
+ o.value != "" && e.emitter.emit("vf-fetch", {
2372
2420
  params: {
2373
2421
  q: "rename",
2374
2422
  m: "post",
@@ -2377,58 +2425,58 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2377
2425
  },
2378
2426
  body: {
2379
2427
  item: r.value.path,
2380
- name: a.value
2428
+ name: o.value
2381
2429
  },
2382
2430
  onSuccess: () => {
2383
- e.emitter.emit("vf-toast-push", { label: s("%s is renamed.", a.value) });
2431
+ e.emitter.emit("vf-toast-push", { label: s("%s is renamed.", o.value) });
2384
2432
  },
2385
- onError: (i) => {
2386
- d.value = s(i.message);
2433
+ onError: (d) => {
2434
+ i.value = s(d.message);
2387
2435
  }
2388
2436
  });
2389
2437
  };
2390
- return (i, l) => (n(), L(G, null, {
2438
+ return (d, l) => (n(), T(W, null, {
2391
2439
  buttons: j(() => [
2392
2440
  t("button", {
2393
2441
  type: "button",
2394
2442
  onClick: u,
2395
2443
  class: "vf-btn vf-btn-primary"
2396
- }, m(o(s)("Rename")), 1),
2444
+ }, v(a(s)("Rename")), 1),
2397
2445
  t("button", {
2398
2446
  type: "button",
2399
- onClick: l[2] || (l[2] = (c) => o(e).emitter.emit("vf-modal-close")),
2447
+ onClick: l[2] || (l[2] = (c) => a(e).emitter.emit("vf-modal-close")),
2400
2448
  class: "vf-btn vf-btn-secondary"
2401
- }, m(o(s)("Cancel")), 1)
2449
+ }, v(a(s)("Cancel")), 1)
2402
2450
  ]),
2403
2451
  default: j(() => [
2404
- t("div", br, [
2405
- yr,
2406
- t("div", xr, [
2407
- t("h3", wr, m(o(s)("Rename")), 1),
2408
- t("div", $r, [
2409
- t("p", Cr, [
2410
- r.value.type === "dir" ? (n(), v("svg", Sr, Er)) : (n(), v("svg", Dr, Ar)),
2411
- t("span", Tr, m(r.value.basename), 1)
2452
+ t("div", yr, [
2453
+ xr,
2454
+ t("div", wr, [
2455
+ t("h3", $r, v(a(s)("Rename")), 1),
2456
+ t("div", Cr, [
2457
+ t("p", Sr, [
2458
+ r.value.type === "dir" ? (n(), m("svg", Mr, Dr)) : (n(), m("svg", jr, Lr)),
2459
+ t("span", Tr, v(r.value.basename), 1)
2412
2460
  ]),
2413
2461
  q(t("input", {
2414
- "onUpdate:modelValue": l[0] || (l[0] = (c) => a.value = c),
2462
+ "onUpdate:modelValue": l[0] || (l[0] = (c) => o.value = c),
2415
2463
  onKeyup: Q(u, ["enter"]),
2416
2464
  class: "px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
2417
2465
  placeholder: "Name",
2418
2466
  type: "text"
2419
2467
  }, null, 544), [
2420
- [Z, a.value]
2468
+ [Z, o.value]
2421
2469
  ]),
2422
- d.value.length ? (n(), L(W, {
2470
+ i.value.length ? (n(), T(G, {
2423
2471
  key: 0,
2424
- onHidden: l[1] || (l[1] = (c) => d.value = ""),
2472
+ onHidden: l[1] || (l[1] = (c) => i.value = ""),
2425
2473
  error: ""
2426
2474
  }, {
2427
2475
  default: j(() => [
2428
- N(m(d.value), 1)
2476
+ V(v(i.value), 1)
2429
2477
  ]),
2430
2478
  _: 1
2431
- })) : M("", !0)
2479
+ })) : S("", !0)
2432
2480
  ])
2433
2481
  ])
2434
2482
  ])
@@ -2436,7 +2484,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2436
2484
  _: 1
2437
2485
  }));
2438
2486
  }
2439
- }), Nr = { class: "sm:flex sm:items-start" }, Vr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2487
+ }), Or = { class: "sm:flex sm:items-start" }, Nr = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2440
2488
  /* @__PURE__ */ t("svg", {
2441
2489
  xmlns: "http://www.w3.org/2000/svg",
2442
2490
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2451,19 +2499,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2451
2499
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
2452
2500
  })
2453
2501
  ])
2454
- ], -1), zr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Or = {
2502
+ ], -1), zr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Br = {
2455
2503
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2456
2504
  id: "modal-title"
2457
2505
  }, Ur = { class: "mt-2" }, Hr = {
2458
2506
  key: 0,
2459
2507
  class: "pointer-events-none"
2460
- }, Br = {
2508
+ }, Rr = {
2461
2509
  key: 1,
2462
2510
  class: "pointer-events-none"
2463
- }, Rr = ["disabled"], qr = ["disabled"], Ir = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Pr = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gr = ["textContent"], Wr = { class: "ml-1 w-full h-fit" }, Yr = { class: "text-left hidden md:block" }, Kr = { class: "text-left md:hidden" }, Jr = {
2511
+ }, qr = ["disabled"], Ir = ["disabled"], Pr = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Wr = { class: "rounded flex flex-shrink-0 w-6 h-6 border bg-gray-50 text-xs cursor-default dark:border-gray-700 dark:bg-gray-800 dark:text-gray-50" }, Gr = ["textContent"], Yr = { class: "ml-1 w-full h-fit" }, Kr = { class: "text-left hidden md:block" }, Jr = { class: "text-left md:hidden" }, Xr = {
2464
2512
  key: 0,
2465
2513
  class: "ml-auto"
2466
- }, Xr = ["title", "disabled", "onClick"], Qr = /* @__PURE__ */ t("svg", {
2514
+ }, Qr = ["title", "disabled", "onClick"], Zr = /* @__PURE__ */ t("svg", {
2467
2515
  xmlns: "http://www.w3.org/2000/svg",
2468
2516
  fill: "none",
2469
2517
  viewBox: "0 0 24 24",
@@ -2476,28 +2524,28 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2476
2524
  "stroke-linejoin": "round",
2477
2525
  d: "M6 18L18 6M6 6l12 12"
2478
2526
  })
2479
- ], -1), Zr = [
2480
- Qr
2481
- ], en = {
2527
+ ], -1), en = [
2528
+ Zr
2529
+ ], tn = {
2482
2530
  key: 0,
2483
2531
  class: "py-2"
2484
- }, tn = ["disabled"], sn = {
2532
+ }, sn = ["disabled"], an = {
2485
2533
  name: "VFModalUpload"
2486
- }, on = /* @__PURE__ */ Object.assign(sn, {
2534
+ }, on = /* @__PURE__ */ Object.assign(an, {
2487
2535
  setup(p) {
2488
- const e = F("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"), a = {
2536
+ const e = F("ServiceContainer"), { t: s } = e.i18n, r = s("uppy"), o = {
2489
2537
  PENDING: 0,
2490
2538
  CANCELED: 1,
2491
2539
  UPLOADING: 2,
2492
2540
  ERROR: 3,
2493
2541
  DONE: 10
2494
- }, d = _({ QUEUE_ENTRY_STATUS: a }), u = _(null), i = _(null), l = _(null), c = _(null), w = _(null), k = _(null), $ = _([]), y = _(""), C = _(!1), E = _(!1);
2495
- let g;
2542
+ }, i = b({ QUEUE_ENTRY_STATUS: o }), u = b(null), d = b(null), l = b(null), c = b(null), g = b(null), _ = b(null), $ = b([]), y = b(""), M = b(!1), C = b(!1);
2543
+ let k;
2496
2544
  function f(h) {
2497
2545
  return $.value.findIndex((A) => A.id === h);
2498
2546
  }
2499
- function V(h, A = null) {
2500
- A = A ?? (h.webkitRelativePath || h.name), g.addFile({
2547
+ function O(h, A = null) {
2548
+ A = A ?? (h.webkitRelativePath || h.name), k.addFile({
2501
2549
  name: A,
2502
2550
  type: h.type,
2503
2551
  data: h,
@@ -2506,57 +2554,57 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2506
2554
  }
2507
2555
  function R(h) {
2508
2556
  switch (h.status) {
2509
- case a.DONE:
2557
+ case o.DONE:
2510
2558
  return "text-green-600";
2511
- case a.ERROR:
2559
+ case o.ERROR:
2512
2560
  return "text-red-600";
2513
- case a.CANCELED:
2561
+ case o.CANCELED:
2514
2562
  return "text-red-600";
2515
- case a.PENDING:
2563
+ case o.PENDING:
2516
2564
  default:
2517
2565
  return "";
2518
2566
  }
2519
2567
  }
2520
2568
  const K = (h) => {
2521
2569
  switch (h.status) {
2522
- case a.DONE:
2570
+ case o.DONE:
2523
2571
  return "✓";
2524
- case a.ERROR:
2525
- case a.CANCELED:
2572
+ case o.ERROR:
2573
+ case o.CANCELED:
2526
2574
  return "!";
2527
- case a.PENDING:
2575
+ case o.PENDING:
2528
2576
  default:
2529
2577
  return "...";
2530
2578
  }
2531
2579
  };
2532
- function ee() {
2580
+ function te() {
2533
2581
  c.value.click();
2534
2582
  }
2535
- function te() {
2536
- if (!C.value) {
2537
- if (!$.value.filter((h) => h.status !== a.DONE).length) {
2583
+ function se() {
2584
+ if (!M.value) {
2585
+ if (!$.value.filter((h) => h.status !== o.DONE).length) {
2538
2586
  y.value = s("Please select file to upload first.");
2539
2587
  return;
2540
2588
  }
2541
- y.value = "", g.retryAll(), g.upload();
2589
+ y.value = "", k.retryAll(), k.upload();
2542
2590
  }
2543
2591
  }
2544
- function se() {
2545
- g.cancelAll({ reason: "user" }), $.value.forEach((h) => {
2546
- h.status !== a.DONE && (h.status = a.CANCELED, h.statusName = s("Canceled"));
2547
- }), C.value = !1;
2592
+ function ae() {
2593
+ k.cancelAll({ reason: "user" }), $.value.forEach((h) => {
2594
+ h.status !== o.DONE && (h.status = o.CANCELED, h.statusName = s("Canceled"));
2595
+ }), M.value = !1;
2548
2596
  }
2549
2597
  function oe(h) {
2550
- C.value || (g.removeFile(h.id, "removed-by-user"), $.value.splice(f(h.id), 1));
2598
+ M.value || (k.removeFile(h.id, "removed-by-user"), $.value.splice(f(h.id), 1));
2551
2599
  }
2552
- function x(h) {
2553
- if (!C.value) {
2554
- if (g.cancelAll({ reason: "user" }), h) {
2600
+ function w(h) {
2601
+ if (!M.value) {
2602
+ if (k.cancelAll({ reason: "user" }), h) {
2555
2603
  const A = [];
2556
- $.value.forEach((b) => {
2557
- b.status !== a.DONE && A.push(b);
2558
- }), $.value = [], A.forEach((b) => {
2559
- V(b.originalFile, b.name);
2604
+ $.value.forEach((x) => {
2605
+ x.status !== o.DONE && A.push(x);
2606
+ }), $.value = [], A.forEach((x) => {
2607
+ O(x.originalFile, x.name);
2560
2608
  });
2561
2609
  return;
2562
2610
  }
@@ -2567,7 +2615,7 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2567
2615
  e.emitter.emit("vf-modal-close");
2568
2616
  }
2569
2617
  return P(async () => {
2570
- g = new Ue({
2618
+ k = new Be({
2571
2619
  debug: e.debug,
2572
2620
  restrictions: {
2573
2621
  maxFileSize: Ye(e.maxFileSize)
@@ -2575,19 +2623,19 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2575
2623
  //allowedFileTypes
2576
2624
  },
2577
2625
  locale: r,
2578
- onBeforeFileAdded(S, T) {
2579
- if (T[S.id] != null) {
2580
- const X = f(S.id);
2581
- $.value[X].status === a.PENDING && (y.value = g.i18n("noDuplicates", { fileName: S.name })), $.value = $.value.filter((ce) => ce.id !== S.id);
2626
+ onBeforeFileAdded(E, L) {
2627
+ if (L[E.id] != null) {
2628
+ const X = f(E.id);
2629
+ $.value[X].status === o.PENDING && (y.value = k.i18n("noDuplicates", { fileName: E.name })), $.value = $.value.filter((ue) => ue.id !== E.id);
2582
2630
  }
2583
2631
  return $.value.push({
2584
- id: S.id,
2585
- name: S.name,
2586
- size: e.filesize(S.size),
2587
- status: a.PENDING,
2632
+ id: E.id,
2633
+ name: E.name,
2634
+ size: e.filesize(E.size),
2635
+ status: o.PENDING,
2588
2636
  statusName: s("Pending upload"),
2589
2637
  percent: null,
2590
- originalFile: S.data
2638
+ originalFile: E.data
2591
2639
  }), !0;
2592
2640
  }
2593
2641
  });
@@ -2597,115 +2645,115 @@ const ys = { class: "relative flex-auto flex flex-col overflow-hidden" }, xs = {
2597
2645
  params: { q: "upload", adapter: e.data.adapter, path: e.data.dirname }
2598
2646
  });
2599
2647
  e.debug && h.body != null && (h.body instanceof FormData || Object.keys(h.body).length > 0) && console.warn(`Cannot set body on upload, make sure request.transformRequest didn't set body when upload.
2600
- Will ignore for now.`), g.use(He, {
2648
+ Will ignore for now.`), k.use(Ue, {
2601
2649
  method: h.method,
2602
2650
  endpoint: h.url + "?" + new URLSearchParams(h.params),
2603
2651
  headers: h.headers,
2604
2652
  limit: 5,
2605
2653
  timeout: 0,
2606
- getResponseError(S, T) {
2607
- let O;
2654
+ getResponseError(E, L) {
2655
+ let z;
2608
2656
  try {
2609
- O = JSON.parse(S).message;
2657
+ z = JSON.parse(E).message;
2610
2658
  } catch {
2611
- O = s("Cannot parse server response.");
2659
+ z = s("Cannot parse server response.");
2612
2660
  }
2613
- return new Error(O);
2661
+ return new Error(z);
2614
2662
  }
2615
- }), g.on("restriction-failed", (S, T) => {
2616
- const O = $.value[f(S.id)];
2617
- oe(O), y.value = T.message;
2618
- }), g.on("upload", () => {
2619
- C.value = !0, $.value.forEach((S) => {
2620
- S.status !== a.DONE && (S.percent = null, S.status = a.UPLOADING, S.statusName = s("Pending upload"));
2663
+ }), k.on("restriction-failed", (E, L) => {
2664
+ const z = $.value[f(E.id)];
2665
+ oe(z), y.value = L.message;
2666
+ }), k.on("upload", () => {
2667
+ M.value = !0, $.value.forEach((E) => {
2668
+ E.status !== o.DONE && (E.percent = null, E.status = o.UPLOADING, E.statusName = s("Pending upload"));
2621
2669
  });
2622
- }), g.on("upload-progress", (S, T) => {
2623
- const O = Math.floor(T.bytesUploaded / T.bytesTotal * 100);
2624
- $.value[f(S.id)].percent = `${O}%`;
2625
- }), g.on("upload-success", (S) => {
2626
- const T = $.value[f(S.id)];
2627
- T.status = a.DONE, T.statusName = s("Done");
2628
- }), g.on("upload-error", (S, T) => {
2629
- const O = $.value[f(S.id)];
2630
- O.percent = null, O.status = a.ERROR, T.isNetworkError ? O.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : O.statusName = T ? T.message : s("Unknown Error");
2631
- }), g.on("error", (S) => {
2632
- y.value = S.message, C.value = !1, e.emitter.emit("vf-fetch", {
2670
+ }), k.on("upload-progress", (E, L) => {
2671
+ const z = Math.floor(L.bytesUploaded / L.bytesTotal * 100);
2672
+ $.value[f(E.id)].percent = `${z}%`;
2673
+ }), k.on("upload-success", (E) => {
2674
+ const L = $.value[f(E.id)];
2675
+ L.status = o.DONE, L.statusName = s("Done");
2676
+ }), k.on("upload-error", (E, L) => {
2677
+ const z = $.value[f(E.id)];
2678
+ z.percent = null, z.status = o.ERROR, L.isNetworkError ? z.statusName = s("Network Error, Unable establish connection to the server or interrupted.") : z.statusName = L ? L.message : s("Unknown Error");
2679
+ }), k.on("error", (E) => {
2680
+ y.value = E.message, M.value = !1, e.emitter.emit("vf-fetch", {
2633
2681
  params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
2634
2682
  noCloseModal: !0
2635
2683
  });
2636
- }), g.on("complete", () => {
2637
- C.value = !1, e.emitter.emit("vf-fetch", {
2684
+ }), k.on("complete", () => {
2685
+ M.value = !1, e.emitter.emit("vf-fetch", {
2638
2686
  params: { q: "index", adapter: e.data.adapter, path: e.data.dirname },
2639
2687
  noCloseModal: !0
2640
2688
  });
2641
2689
  }), c.value.addEventListener("click", () => {
2642
- i.value.click();
2643
- }), w.value.addEventListener("click", () => {
2690
+ d.value.click();
2691
+ }), g.value.addEventListener("click", () => {
2644
2692
  l.value.click();
2645
- }), k.value.addEventListener("dragover", (S) => {
2646
- S.preventDefault(), E.value = !0;
2647
- }), k.value.addEventListener("dragleave", (S) => {
2648
- S.preventDefault(), E.value = !1;
2693
+ }), _.value.addEventListener("dragover", (E) => {
2694
+ E.preventDefault(), C.value = !0;
2695
+ }), _.value.addEventListener("dragleave", (E) => {
2696
+ E.preventDefault(), C.value = !1;
2649
2697
  });
2650
- function A(S, T) {
2651
- T.isFile && T.file((O) => S(T, O)), T.isDirectory && T.createReader().readEntries((O) => {
2652
- O.forEach((X) => {
2653
- A(S, X);
2698
+ function A(E, L) {
2699
+ L.isFile && L.file((z) => E(L, z)), L.isDirectory && L.createReader().readEntries((z) => {
2700
+ z.forEach((X) => {
2701
+ A(E, X);
2654
2702
  });
2655
2703
  });
2656
2704
  }
2657
- k.value.addEventListener("drop", (S) => {
2658
- S.preventDefault(), E.value = !1;
2659
- const T = /^[/\\](.+)/;
2660
- [...S.dataTransfer.items].forEach((O) => {
2661
- O.kind === "file" && A((X, ce) => {
2662
- const $e = T.exec(X.fullPath);
2663
- V(ce, $e[1]);
2664
- }, O.webkitGetAsEntry());
2705
+ _.value.addEventListener("drop", (E) => {
2706
+ E.preventDefault(), C.value = !1;
2707
+ const L = /^[/\\](.+)/;
2708
+ [...E.dataTransfer.items].forEach((z) => {
2709
+ z.kind === "file" && A((X, ue) => {
2710
+ const $e = L.exec(X.fullPath);
2711
+ O(ue, $e[1]);
2712
+ }, z.webkitGetAsEntry());
2665
2713
  });
2666
2714
  });
2667
- const b = ({ target: S }) => {
2668
- const T = S.files;
2669
- for (const O of T)
2670
- V(O);
2671
- S.value = "";
2715
+ const x = ({ target: E }) => {
2716
+ const L = E.files;
2717
+ for (const z of L)
2718
+ O(z);
2719
+ E.value = "";
2672
2720
  };
2673
- i.value.addEventListener("change", b), l.value.addEventListener("change", b);
2721
+ d.value.addEventListener("change", x), l.value.addEventListener("change", x);
2674
2722
  }), ke(() => {
2675
- g == null || g.close({ reason: "unmount" });
2676
- }), (h, A) => (n(), L(G, null, {
2723
+ k == null || k.close({ reason: "unmount" });
2724
+ }), (h, A) => (n(), T(W, null, {
2677
2725
  buttons: j(() => [
2678
2726
  t("button", {
2679
2727
  type: "button",
2680
- class: U(["vf-btn vf-btn-primary", C.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),
2681
- disabled: C.value,
2682
- onClick: Y(te, ["prevent"])
2683
- }, m(o(s)("Upload")), 11, tn),
2684
- C.value ? (n(), v("button", {
2728
+ class: B(["vf-btn vf-btn-primary", M.value ? "bg-blue-200 hover:bg-blue-200 dark:bg-gray-700/50 dark:hover:bg-gray-700/50 dark:text-gray-500" : "bg-blue-600 hover:bg-blue-700 dark:bg-gray-700 dark:hover:bg-gray-500"]),
2729
+ disabled: M.value,
2730
+ onClick: Y(se, ["prevent"])
2731
+ }, v(a(s)("Upload")), 11, sn),
2732
+ M.value ? (n(), m("button", {
2685
2733
  key: 0,
2686
2734
  type: "button",
2687
2735
  class: "vf-btn vf-btn-secondary",
2688
- onClick: Y(se, ["prevent"])
2689
- }, m(o(s)("Cancel")), 1)) : (n(), v("button", {
2736
+ onClick: Y(ae, ["prevent"])
2737
+ }, v(a(s)("Cancel")), 1)) : (n(), m("button", {
2690
2738
  key: 1,
2691
2739
  type: "button",
2692
2740
  class: "vf-btn vf-btn-secondary",
2693
2741
  onClick: Y(D, ["prevent"])
2694
- }, m(o(s)("Close")), 1))
2742
+ }, v(a(s)("Close")), 1))
2695
2743
  ]),
2696
2744
  default: j(() => [
2697
- t("div", Nr, [
2698
- Vr,
2745
+ t("div", Or, [
2746
+ Nr,
2699
2747
  t("div", zr, [
2700
- t("h3", Or, m(o(s)("Upload Files")), 1),
2748
+ t("h3", Br, v(a(s)("Upload Files")), 1),
2701
2749
  t("div", Ur, [
2702
2750
  t("div", {
2703
2751
  ref_key: "dropArea",
2704
- ref: k,
2752
+ ref: _,
2705
2753
  class: "flex items-center justify-center text-lg mb-4 text-gray-500 border-2 border-gray-300 rounded border-dashed select-none cursor-pointer dark:border-gray-600 h-[120px]",
2706
- onClick: ee
2754
+ onClick: te
2707
2755
  }, [
2708
- E.value ? (n(), v("div", Hr, m(o(s)("Release to drop these files.")), 1)) : (n(), v("div", Br, m(o(s)("Drag and drop the files/folders to here or click here.")), 1))
2756
+ C.value ? (n(), m("div", Hr, v(a(s)("Release to drop these files.")), 1)) : (n(), m("div", Rr, v(a(s)("Drag and drop the files/folders to here or click here.")), 1))
2709
2757
  ], 512),
2710
2758
  t("div", {
2711
2759
  ref_key: "container",
@@ -2717,73 +2765,73 @@ Will ignore for now.`), g.use(He, {
2717
2765
  ref: c,
2718
2766
  type: "button",
2719
2767
  class: "vf-btn vf-btn-secondary"
2720
- }, m(o(s)("Select Files")), 513),
2768
+ }, v(a(s)("Select Files")), 513),
2721
2769
  t("button", {
2722
2770
  ref_key: "pickFolders",
2723
- ref: w,
2771
+ ref: g,
2724
2772
  type: "button",
2725
2773
  class: "vf-btn vf-btn-secondary"
2726
- }, m(o(s)("Select Folders")), 513),
2774
+ }, v(a(s)("Select Folders")), 513),
2727
2775
  t("button", {
2728
2776
  type: "button",
2729
2777
  class: "vf-btn vf-btn-secondary",
2730
- disabled: C.value,
2731
- onClick: A[0] || (A[0] = (b) => x(!1))
2732
- }, m(o(s)("Clear all")), 9, Rr),
2778
+ disabled: M.value,
2779
+ onClick: A[0] || (A[0] = (x) => w(!1))
2780
+ }, v(a(s)("Clear all")), 9, qr),
2733
2781
  t("button", {
2734
2782
  type: "button",
2735
2783
  class: "vf-btn vf-btn-secondary",
2736
- disabled: C.value,
2737
- onClick: A[1] || (A[1] = (b) => x(!0))
2738
- }, m(o(s)("Clear only successful")), 9, qr)
2784
+ disabled: M.value,
2785
+ onClick: A[1] || (A[1] = (x) => w(!0))
2786
+ }, v(a(s)("Clear only successful")), 9, Ir)
2739
2787
  ], 512),
2740
- t("div", Ir, [
2741
- (n(!0), v(H, null, I($.value, (b) => (n(), v("div", {
2788
+ t("div", Pr, [
2789
+ (n(!0), m(U, null, I($.value, (x) => (n(), m("div", {
2742
2790
  class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",
2743
- key: b.id
2791
+ key: x.id
2744
2792
  }, [
2745
- t("span", Pr, [
2793
+ t("span", Wr, [
2746
2794
  t("span", {
2747
- class: U(["text-base m-auto", R(b)]),
2748
- textContent: m(K(b))
2795
+ class: B(["text-base m-auto", R(x)]),
2796
+ textContent: v(K(x))
2749
2797
  }, null, 10, Gr)
2750
2798
  ]),
2751
- t("div", Wr, [
2752
- t("div", Yr, m(o(he)(b.name, 40)) + " (" + m(b.size) + ")", 1),
2753
- t("div", Kr, m(o(he)(b.name, 16)) + " (" + m(b.size) + ")", 1),
2799
+ t("div", Yr, [
2800
+ t("div", Kr, v(a(he)(x.name, 40)) + " (" + v(x.size) + ")", 1),
2801
+ t("div", Jr, v(a(he)(x.name, 16)) + " (" + v(x.size) + ")", 1),
2754
2802
  t("div", {
2755
- class: U(["flex break-all text-left", R(b)])
2803
+ class: B(["flex break-all text-left", R(x)])
2756
2804
  }, [
2757
- N(m(b.statusName) + " ", 1),
2758
- b.status === d.value.QUEUE_ENTRY_STATUS.UPLOADING ? (n(), v("b", Jr, m(b.percent), 1)) : M("", !0)
2805
+ V(v(x.statusName) + " ", 1),
2806
+ x.status === i.value.QUEUE_ENTRY_STATUS.UPLOADING ? (n(), m("b", Xr, v(x.percent), 1)) : S("", !0)
2759
2807
  ], 2)
2760
2808
  ]),
2761
2809
  t("button", {
2762
2810
  type: "button",
2763
- class: U(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", C.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]),
2764
- title: o(s)("Delete"),
2765
- disabled: C.value,
2766
- onClick: (S) => oe(b)
2767
- }, Zr, 10, Xr)
2811
+ class: B(["rounded w-5 h-5 border-1 text-base leading-none font-medium focus:outline-none dark:border-gray-200 dark:text-gray-400 dark:hover:text-gray-200 dark:bg-gray-600 ml-auto sm:text-xs hover:text-red-600", M.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]),
2812
+ title: a(s)("Delete"),
2813
+ disabled: M.value,
2814
+ onClick: (E) => oe(x)
2815
+ }, en, 10, Qr)
2768
2816
  ]))), 128)),
2769
- $.value.length ? M("", !0) : (n(), v("div", en, m(o(s)("No files selected!")), 1))
2817
+ $.value.length ? S("", !0) : (n(), m("div", tn, v(a(s)("No files selected!")), 1))
2770
2818
  ]),
2771
- y.value.length ? (n(), L(W, {
2819
+ y.value.length ? (n(), T(G, {
2772
2820
  key: 0,
2773
- onHidden: A[2] || (A[2] = (b) => y.value = ""),
2821
+ onHidden: A[2] || (A[2] = (x) => y.value = ""),
2774
2822
  error: ""
2775
2823
  }, {
2776
2824
  default: j(() => [
2777
- N(m(y.value), 1)
2825
+ V(v(y.value), 1)
2778
2826
  ]),
2779
2827
  _: 1
2780
- })) : M("", !0)
2828
+ })) : S("", !0)
2781
2829
  ])
2782
2830
  ])
2783
2831
  ]),
2784
2832
  t("input", {
2785
2833
  ref_key: "internalFileInput",
2786
- ref: i,
2834
+ ref: d,
2787
2835
  type: "file",
2788
2836
  multiple: "",
2789
2837
  class: "hidden"
@@ -2800,7 +2848,7 @@ Will ignore for now.`), g.use(He, {
2800
2848
  _: 1
2801
2849
  }));
2802
2850
  }
2803
- }), an = { class: "sm:flex sm:items-start" }, rn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2851
+ }), rn = { class: "sm:flex sm:items-start" }, nn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2804
2852
  /* @__PURE__ */ t("svg", {
2805
2853
  xmlns: "http://www.w3.org/2000/svg",
2806
2854
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2815,13 +2863,13 @@ Will ignore for now.`), g.use(He, {
2815
2863
  d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
2816
2864
  })
2817
2865
  ])
2818
- ], -1), nn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ln = {
2866
+ ], -1), ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, dn = {
2819
2867
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2820
2868
  id: "modal-title"
2821
- }, dn = { class: "mt-2" }, cn = {
2869
+ }, cn = { class: "mt-2" }, un = {
2822
2870
  class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
2823
2871
  style: { "max-height": "200px" }
2824
- }, un = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, mn = {
2872
+ }, mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, vn = {
2825
2873
  key: 0,
2826
2874
  xmlns: "http://www.w3.org/2000/svg",
2827
2875
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2829,13 +2877,13 @@ Will ignore for now.`), g.use(He, {
2829
2877
  viewBox: "0 0 24 24",
2830
2878
  stroke: "currentColor",
2831
2879
  "stroke-width": "1"
2832
- }, vn = /* @__PURE__ */ t("path", {
2880
+ }, pn = /* @__PURE__ */ t("path", {
2833
2881
  "stroke-linecap": "round",
2834
2882
  "stroke-linejoin": "round",
2835
2883
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2836
- }, null, -1), pn = [
2837
- vn
2838
- ], hn = {
2884
+ }, null, -1), hn = [
2885
+ pn
2886
+ ], fn = {
2839
2887
  key: 1,
2840
2888
  xmlns: "http://www.w3.org/2000/svg",
2841
2889
  class: "h-5 w-5 text-neutral-500",
@@ -2843,20 +2891,20 @@ Will ignore for now.`), g.use(He, {
2843
2891
  viewBox: "0 0 24 24",
2844
2892
  stroke: "currentColor",
2845
2893
  "stroke-width": "1"
2846
- }, fn = /* @__PURE__ */ t("path", {
2894
+ }, gn = /* @__PURE__ */ t("path", {
2847
2895
  "stroke-linecap": "round",
2848
2896
  "stroke-linejoin": "round",
2849
2897
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
2850
- }, null, -1), gn = [
2851
- fn
2852
- ], _n = { class: "ml-1.5" }, kn = ["placeholder"], bn = {
2898
+ }, null, -1), _n = [
2899
+ gn
2900
+ ], kn = { class: "ml-1.5" }, bn = ["placeholder"], yn = {
2853
2901
  name: "VFModalArchive"
2854
- }, yn = /* @__PURE__ */ Object.assign(bn, {
2902
+ }, xn = /* @__PURE__ */ Object.assign(yn, {
2855
2903
  setup(p) {
2856
2904
  const e = F("ServiceContainer");
2857
2905
  e.storage;
2858
- const { t: s } = e.i18n, r = _(""), a = _(""), d = _(e.modal.data.items), u = () => {
2859
- d.value.length && e.emitter.emit("vf-fetch", {
2906
+ const { t: s } = e.i18n, r = b(""), o = b(""), i = b(e.modal.data.items), u = () => {
2907
+ i.value.length && e.emitter.emit("vf-fetch", {
2860
2908
  params: {
2861
2909
  q: "archive",
2862
2910
  m: "post",
@@ -2864,61 +2912,61 @@ Will ignore for now.`), g.use(He, {
2864
2912
  path: e.data.dirname
2865
2913
  },
2866
2914
  body: {
2867
- items: d.value.map(({ path: i, type: l }) => ({ path: i, type: l })),
2915
+ items: i.value.map(({ path: d, type: l }) => ({ path: d, type: l })),
2868
2916
  name: r.value
2869
2917
  },
2870
2918
  onSuccess: () => {
2871
2919
  e.emitter.emit("vf-toast-push", { label: s("The file(s) archived.") });
2872
2920
  },
2873
- onError: (i) => {
2874
- a.value = s(i.message);
2921
+ onError: (d) => {
2922
+ o.value = s(d.message);
2875
2923
  }
2876
2924
  });
2877
2925
  };
2878
- return (i, l) => (n(), L(G, null, {
2926
+ return (d, l) => (n(), T(W, null, {
2879
2927
  buttons: j(() => [
2880
2928
  t("button", {
2881
2929
  type: "button",
2882
2930
  onClick: u,
2883
2931
  class: "vf-btn vf-btn-primary"
2884
- }, m(o(s)("Archive")), 1),
2932
+ }, v(a(s)("Archive")), 1),
2885
2933
  t("button", {
2886
2934
  type: "button",
2887
- onClick: l[2] || (l[2] = (c) => o(e).emitter.emit("vf-modal-close")),
2935
+ onClick: l[2] || (l[2] = (c) => a(e).emitter.emit("vf-modal-close")),
2888
2936
  class: "vf-btn vf-btn-secondary"
2889
- }, m(o(s)("Cancel")), 1)
2937
+ }, v(a(s)("Cancel")), 1)
2890
2938
  ]),
2891
2939
  default: j(() => [
2892
- t("div", an, [
2893
- rn,
2894
- t("div", nn, [
2895
- t("h3", ln, m(o(s)("Archive the files")), 1),
2896
- t("div", dn, [
2897
- t("div", cn, [
2898
- (n(!0), v(H, null, I(d.value, (c) => (n(), v("p", un, [
2899
- c.type === "dir" ? (n(), v("svg", mn, pn)) : (n(), v("svg", hn, gn)),
2900
- t("span", _n, m(c.basename), 1)
2940
+ t("div", rn, [
2941
+ nn,
2942
+ t("div", ln, [
2943
+ t("h3", dn, v(a(s)("Archive the files")), 1),
2944
+ t("div", cn, [
2945
+ t("div", un, [
2946
+ (n(!0), m(U, null, I(i.value, (c) => (n(), m("p", mn, [
2947
+ c.type === "dir" ? (n(), m("svg", vn, hn)) : (n(), m("svg", fn, _n)),
2948
+ t("span", kn, v(c.basename), 1)
2901
2949
  ]))), 256))
2902
2950
  ]),
2903
2951
  q(t("input", {
2904
2952
  "onUpdate:modelValue": l[0] || (l[0] = (c) => r.value = c),
2905
2953
  onKeyup: Q(u, ["enter"]),
2906
2954
  class: "my-1 px-2 py-1 border rounded dark:bg-gray-700/25 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:text-gray-100 w-full",
2907
- placeholder: o(s)("Archive name. (.zip file will be created)"),
2955
+ placeholder: a(s)("Archive name. (.zip file will be created)"),
2908
2956
  type: "text"
2909
- }, null, 40, kn), [
2957
+ }, null, 40, bn), [
2910
2958
  [Z, r.value]
2911
2959
  ]),
2912
- a.value.length ? (n(), L(W, {
2960
+ o.value.length ? (n(), T(G, {
2913
2961
  key: 0,
2914
- onHidden: l[1] || (l[1] = (c) => a.value = ""),
2962
+ onHidden: l[1] || (l[1] = (c) => o.value = ""),
2915
2963
  error: ""
2916
2964
  }, {
2917
2965
  default: j(() => [
2918
- N(m(a.value), 1)
2966
+ V(v(o.value), 1)
2919
2967
  ]),
2920
2968
  _: 1
2921
- })) : M("", !0)
2969
+ })) : S("", !0)
2922
2970
  ])
2923
2971
  ])
2924
2972
  ])
@@ -2926,7 +2974,7 @@ Will ignore for now.`), g.use(He, {
2926
2974
  _: 1
2927
2975
  }));
2928
2976
  }
2929
- }), xn = { class: "sm:flex sm:items-start" }, wn = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2977
+ }), wn = { class: "sm:flex sm:items-start" }, $n = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2930
2978
  /* @__PURE__ */ t("svg", {
2931
2979
  xmlns: "http://www.w3.org/2000/svg",
2932
2980
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2941,10 +2989,10 @@ Will ignore for now.`), g.use(He, {
2941
2989
  d: "M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m6 4.125l2.25 2.25m0 0l2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
2942
2990
  })
2943
2991
  ])
2944
- ], -1), $n = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Cn = {
2992
+ ], -1), Cn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Sn = {
2945
2993
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2946
2994
  id: "modal-title"
2947
- }, Sn = { class: "mt-2" }, Mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, En = {
2995
+ }, Mn = { class: "mt-2" }, En = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Dn = {
2948
2996
  key: 0,
2949
2997
  xmlns: "http://www.w3.org/2000/svg",
2950
2998
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2952,13 +3000,13 @@ Will ignore for now.`), g.use(He, {
2952
3000
  viewBox: "0 0 24 24",
2953
3001
  stroke: "currentColor",
2954
3002
  "stroke-width": "1"
2955
- }, Dn = /* @__PURE__ */ t("path", {
3003
+ }, jn = /* @__PURE__ */ t("path", {
2956
3004
  "stroke-linecap": "round",
2957
3005
  "stroke-linejoin": "round",
2958
3006
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2959
- }, null, -1), jn = [
2960
- Dn
2961
- ], An = {
3007
+ }, null, -1), An = [
3008
+ jn
3009
+ ], Ln = {
2962
3010
  key: 1,
2963
3011
  xmlns: "http://www.w3.org/2000/svg",
2964
3012
  class: "h-5 w-5 text-neutral-500",
@@ -2970,17 +3018,17 @@ Will ignore for now.`), g.use(He, {
2970
3018
  "stroke-linecap": "round",
2971
3019
  "stroke-linejoin": "round",
2972
3020
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
2973
- }, null, -1), Ln = [
3021
+ }, null, -1), Fn = [
2974
3022
  Tn
2975
- ], Fn = { class: "ml-1.5" }, Nn = { class: "my-1 text-sm text-gray-500" }, Vn = {
3023
+ ], Vn = { class: "ml-1.5" }, On = { class: "my-1 text-sm text-gray-500" }, Nn = {
2976
3024
  name: "VFModalUnarchive"
2977
- }, zn = /* @__PURE__ */ Object.assign(Vn, {
3025
+ }, zn = /* @__PURE__ */ Object.assign(Nn, {
2978
3026
  setup(p) {
2979
3027
  const e = F("ServiceContainer");
2980
3028
  e.storage;
2981
3029
  const { t: s } = e.i18n;
2982
- _("");
2983
- const r = _(e.modal.data.items[0]), a = _(""), d = _([]), u = () => {
3030
+ b("");
3031
+ const r = b(e.modal.data.items[0]), o = b(""), i = b([]), u = () => {
2984
3032
  e.emitter.emit("vf-fetch", {
2985
3033
  params: {
2986
3034
  q: "unarchive",
@@ -2994,45 +3042,45 @@ Will ignore for now.`), g.use(He, {
2994
3042
  onSuccess: () => {
2995
3043
  e.emitter.emit("vf-toast-push", { label: s("The file unarchived.") });
2996
3044
  },
2997
- onError: (i) => {
2998
- a.value = s(i.message);
3045
+ onError: (d) => {
3046
+ o.value = s(d.message);
2999
3047
  }
3000
3048
  });
3001
3049
  };
3002
- return (i, l) => (n(), L(G, null, {
3050
+ return (d, l) => (n(), T(W, null, {
3003
3051
  buttons: j(() => [
3004
3052
  t("button", {
3005
3053
  type: "button",
3006
3054
  onClick: u,
3007
3055
  class: "vf-btn vf-btn-primary"
3008
- }, m(o(s)("Unarchive")), 1),
3056
+ }, v(a(s)("Unarchive")), 1),
3009
3057
  t("button", {
3010
3058
  type: "button",
3011
- onClick: l[1] || (l[1] = (c) => o(e).emitter.emit("vf-modal-close")),
3059
+ onClick: l[1] || (l[1] = (c) => a(e).emitter.emit("vf-modal-close")),
3012
3060
  class: "vf-btn vf-btn-secondary"
3013
- }, m(o(s)("Cancel")), 1)
3061
+ }, v(a(s)("Cancel")), 1)
3014
3062
  ]),
3015
3063
  default: j(() => [
3016
- t("div", xn, [
3017
- wn,
3018
- t("div", $n, [
3019
- t("h3", Cn, m(o(s)("Unarchive")), 1),
3020
- t("div", Sn, [
3021
- (n(!0), v(H, null, I(d.value, (c) => (n(), v("p", Mn, [
3022
- c.type === "dir" ? (n(), v("svg", En, jn)) : (n(), v("svg", An, Ln)),
3023
- t("span", Fn, m(c.basename), 1)
3064
+ t("div", wn, [
3065
+ $n,
3066
+ t("div", Cn, [
3067
+ t("h3", Sn, v(a(s)("Unarchive")), 1),
3068
+ t("div", Mn, [
3069
+ (n(!0), m(U, null, I(i.value, (c) => (n(), m("p", En, [
3070
+ c.type === "dir" ? (n(), m("svg", Dn, An)) : (n(), m("svg", Ln, Fn)),
3071
+ t("span", Vn, v(c.basename), 1)
3024
3072
  ]))), 256)),
3025
- t("p", Nn, m(o(s)("The archive will be unarchived at")) + " (" + m(i.current.dirname) + ")", 1),
3026
- a.value.length ? (n(), L(W, {
3073
+ t("p", On, v(a(s)("The archive will be unarchived at")) + " (" + v(d.current.dirname) + ")", 1),
3074
+ o.value.length ? (n(), T(G, {
3027
3075
  key: 0,
3028
- onHidden: l[0] || (l[0] = (c) => a.value = ""),
3076
+ onHidden: l[0] || (l[0] = (c) => o.value = ""),
3029
3077
  error: ""
3030
3078
  }, {
3031
3079
  default: j(() => [
3032
- N(m(a.value), 1)
3080
+ V(v(o.value), 1)
3033
3081
  ]),
3034
3082
  _: 1
3035
- })) : M("", !0)
3083
+ })) : S("", !0)
3036
3084
  ])
3037
3085
  ])
3038
3086
  ])
@@ -3040,7 +3088,7 @@ Will ignore for now.`), g.use(He, {
3040
3088
  _: 1
3041
3089
  }));
3042
3090
  }
3043
- }), On = { class: "sm:flex sm:items-start" }, Un = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3091
+ }), Bn = { class: "sm:flex sm:items-start" }, Un = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3044
3092
  /* @__PURE__ */ t("svg", {
3045
3093
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
3046
3094
  xmlns: "http://www.w3.org/2000/svg",
@@ -3056,10 +3104,10 @@ Will ignore for now.`), g.use(He, {
3056
3104
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
3057
3105
  })
3058
3106
  ])
3059
- ], -1), Hn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Bn = {
3107
+ ], -1), Hn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Rn = {
3060
3108
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
3061
3109
  id: "modal-title"
3062
- }, Rn = { class: "text-sm text-gray-500 pb-1" }, qn = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, In = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Pn = {
3110
+ }, qn = { class: "text-sm text-gray-500 pb-1" }, In = { class: "max-h-[200px] overflow-y-auto vf-scrollbar text-left" }, Pn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Wn = {
3063
3111
  key: 0,
3064
3112
  xmlns: "http://www.w3.org/2000/svg",
3065
3113
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -3071,9 +3119,9 @@ Will ignore for now.`), g.use(He, {
3071
3119
  "stroke-linecap": "round",
3072
3120
  "stroke-linejoin": "round",
3073
3121
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
3074
- }, null, -1), Wn = [
3122
+ }, null, -1), Yn = [
3075
3123
  Gn
3076
- ], Yn = {
3124
+ ], Kn = {
3077
3125
  key: 1,
3078
3126
  xmlns: "http://www.w3.org/2000/svg",
3079
3127
  class: "h-5 w-5 text-neutral-500",
@@ -3081,13 +3129,13 @@ Will ignore for now.`), g.use(He, {
3081
3129
  viewBox: "0 0 24 24",
3082
3130
  stroke: "currentColor",
3083
3131
  "stroke-width": "1"
3084
- }, Kn = /* @__PURE__ */ t("path", {
3132
+ }, Jn = /* @__PURE__ */ t("path", {
3085
3133
  "stroke-linecap": "round",
3086
3134
  "stroke-linejoin": "round",
3087
3135
  d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
3088
- }, null, -1), Jn = [
3089
- Kn
3090
- ], Xn = { class: "ml-1.5" }, Qn = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, Zn = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, el = /* @__PURE__ */ t("svg", {
3136
+ }, null, -1), Xn = [
3137
+ Jn
3138
+ ], Qn = { class: "ml-1.5" }, Zn = { class: "font-bold text-xs text-gray-700 dark:text-gray-500 mt-3 tracking-wider" }, el = { class: "flex text-sm text-gray-800 dark:text-gray-400 border dark:border-gray-700 p-1 rounded" }, tl = /* @__PURE__ */ t("svg", {
3091
3139
  xmlns: "http://www.w3.org/2000/svg",
3092
3140
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
3093
3141
  fill: "none",
@@ -3100,13 +3148,13 @@ Will ignore for now.`), g.use(He, {
3100
3148
  "stroke-linejoin": "round",
3101
3149
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
3102
3150
  })
3103
- ], -1), tl = { class: "ml-1.5 overflow-auto" }, sl = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, ol = {
3151
+ ], -1), sl = { class: "ml-1.5 overflow-auto" }, al = { class: "m-1 mr-auto font-bold text-gray-500 text-sm dark:text-gray-200 self-center" }, ol = {
3104
3152
  name: "VFModalMove"
3105
- }, al = /* @__PURE__ */ Object.assign(ol, {
3153
+ }, rl = /* @__PURE__ */ Object.assign(ol, {
3106
3154
  setup(p) {
3107
3155
  const e = F("ServiceContainer"), { t: s } = e.i18n;
3108
3156
  e.storage;
3109
- const r = _(e.modal.data.items.from), a = _(""), d = () => {
3157
+ const r = b(e.modal.data.items.from), o = b(""), i = () => {
3110
3158
  r.value.length && e.emitter.emit("vf-fetch", {
3111
3159
  params: {
3112
3160
  q: "move",
@@ -3115,101 +3163,101 @@ Will ignore for now.`), g.use(He, {
3115
3163
  path: e.data.dirname
3116
3164
  },
3117
3165
  body: {
3118
- items: r.value.map(({ path: u, type: i }) => ({ path: u, type: i })),
3166
+ items: r.value.map(({ path: u, type: d }) => ({ path: u, type: d })),
3119
3167
  item: e.modal.data.items.to.path
3120
3168
  },
3121
3169
  onSuccess: () => {
3122
3170
  e.emitter.emit("vf-toast-push", { label: s("Files moved.", e.modal.data.items.to.name) });
3123
3171
  },
3124
3172
  onError: (u) => {
3125
- a.value = s(u.message);
3173
+ o.value = s(u.message);
3126
3174
  }
3127
3175
  });
3128
3176
  };
3129
- return (u, i) => (n(), L(G, null, {
3177
+ return (u, d) => (n(), T(W, null, {
3130
3178
  buttons: j(() => [
3131
3179
  t("button", {
3132
3180
  type: "button",
3133
- onClick: d,
3181
+ onClick: i,
3134
3182
  class: "vf-btn vf-btn-primary"
3135
- }, m(o(s)("Yes, Move!")), 1),
3183
+ }, v(a(s)("Yes, Move!")), 1),
3136
3184
  t("button", {
3137
3185
  type: "button",
3138
- onClick: i[1] || (i[1] = (l) => o(e).emitter.emit("vf-modal-close")),
3186
+ onClick: d[1] || (d[1] = (l) => a(e).emitter.emit("vf-modal-close")),
3139
3187
  class: "vf-btn vf-btn-secondary"
3140
- }, m(o(s)("Cancel")), 1),
3141
- t("div", sl, m(o(s)("%s item(s) selected.", r.value.length)), 1)
3188
+ }, v(a(s)("Cancel")), 1),
3189
+ t("div", al, v(a(s)("%s item(s) selected.", r.value.length)), 1)
3142
3190
  ]),
3143
3191
  default: j(() => [
3144
- t("div", On, [
3192
+ t("div", Bn, [
3145
3193
  Un,
3146
3194
  t("div", Hn, [
3147
- t("h3", Bn, m(o(s)("Move files")), 1),
3148
- t("p", Rn, m(o(s)("Are you sure you want to move these files?")), 1),
3149
- t("div", qn, [
3150
- (n(!0), v(H, null, I(r.value, (l) => (n(), v("div", In, [
3195
+ t("h3", Rn, v(a(s)("Move files")), 1),
3196
+ t("p", qn, v(a(s)("Are you sure you want to move these files?")), 1),
3197
+ t("div", In, [
3198
+ (n(!0), m(U, null, I(r.value, (l) => (n(), m("div", Pn, [
3151
3199
  t("div", null, [
3152
- l.type === "dir" ? (n(), v("svg", Pn, Wn)) : (n(), v("svg", Yn, Jn))
3200
+ l.type === "dir" ? (n(), m("svg", Wn, Yn)) : (n(), m("svg", Kn, Xn))
3153
3201
  ]),
3154
- t("div", Xn, m(l.path), 1)
3202
+ t("div", Qn, v(l.path), 1)
3155
3203
  ]))), 256))
3156
3204
  ]),
3157
- t("h4", Qn, m(o(s)("Target Directory")), 1),
3158
- t("p", Zn, [
3159
- el,
3160
- t("span", tl, m(o(e).modal.data.items.to.path), 1)
3205
+ t("h4", Zn, v(a(s)("Target Directory")), 1),
3206
+ t("p", el, [
3207
+ tl,
3208
+ t("span", sl, v(a(e).modal.data.items.to.path), 1)
3161
3209
  ]),
3162
- a.value.length ? (n(), L(W, {
3210
+ o.value.length ? (n(), T(G, {
3163
3211
  key: 0,
3164
- onHidden: i[0] || (i[0] = (l) => a.value = ""),
3212
+ onHidden: d[0] || (d[0] = (l) => o.value = ""),
3165
3213
  error: ""
3166
3214
  }, {
3167
3215
  default: j(() => [
3168
- N(m(a.value), 1)
3216
+ V(v(o.value), 1)
3169
3217
  ]),
3170
3218
  _: 1
3171
- })) : M("", !0)
3219
+ })) : S("", !0)
3172
3220
  ])
3173
3221
  ])
3174
3222
  ]),
3175
3223
  _: 1
3176
3224
  }));
3177
3225
  }
3178
- }), rl = (p, e) => {
3226
+ }), nl = (p, e) => {
3179
3227
  const s = p.__vccOpts || p;
3180
- for (const [r, a] of e)
3181
- s[r] = a;
3228
+ for (const [r, o] of e)
3229
+ s[r] = o;
3182
3230
  return s;
3183
- }, nl = {
3231
+ }, ll = {
3184
3232
  props: {
3185
3233
  on: { type: String, required: !0 }
3186
3234
  },
3187
3235
  setup(p, { emit: e, slots: s }) {
3188
- const r = F("ServiceContainer"), a = _(!1), { t: d } = r.i18n;
3236
+ const r = F("ServiceContainer"), o = b(!1), { t: i } = r.i18n;
3189
3237
  let u = null;
3190
- const i = () => {
3191
- clearTimeout(u), a.value = !0, u = setTimeout(() => {
3192
- a.value = !1;
3238
+ const d = () => {
3239
+ clearTimeout(u), o.value = !0, u = setTimeout(() => {
3240
+ o.value = !1;
3193
3241
  }, 2e3);
3194
3242
  };
3195
3243
  return P(() => {
3196
- r.emitter.on(p.on, i);
3197
- }), Le(() => {
3244
+ r.emitter.on(p.on, d);
3245
+ }), Te(() => {
3198
3246
  clearTimeout(u);
3199
3247
  }), {
3200
- shown: a,
3201
- t: d
3248
+ shown: o,
3249
+ t: i
3202
3250
  };
3203
3251
  }
3204
- }, ll = { key: 1 };
3205
- function il(p, e, s, r, a, d) {
3206
- return n(), v("div", {
3207
- class: U(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !r.shown }]])
3252
+ }, il = { key: 1 };
3253
+ function dl(p, e, s, r, o, i) {
3254
+ return n(), m("div", {
3255
+ class: B(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !r.shown }]])
3208
3256
  }, [
3209
- p.$slots.default ? ne(p.$slots, "default", { key: 0 }) : (n(), v("span", ll, m(r.t("Saved.")), 1))
3257
+ p.$slots.default ? le(p.$slots, "default", { key: 0 }) : (n(), m("span", il, v(r.t("Saved.")), 1))
3210
3258
  ], 2);
3211
3259
  }
3212
- const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:items-start" }, cl = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3260
+ const ve = /* @__PURE__ */ nl(ll, [["render", dl]]), cl = { class: "sm:flex sm:items-start" }, ul = /* @__PURE__ */ t("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-50 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
3213
3261
  /* @__PURE__ */ t("svg", {
3214
3262
  xmlns: "http://www.w3.org/2000/svg",
3215
3263
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -3229,34 +3277,34 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3229
3277
  d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
3230
3278
  })
3231
3279
  ])
3232
- ], -1), ul = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ml = {
3280
+ ], -1), ml = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, vl = {
3233
3281
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
3234
3282
  id: "modal-title"
3235
- }, vl = { class: "mt-2" }, pl = { class: "text-sm text-gray-500" }, hl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, fl = { class: "mt-3 text-left" }, gl = { class: "space-y-2" }, _l = { class: "flex relative gap-x-3" }, kl = { class: "h-6 items-center" }, bl = { class: "flex-1 block text-sm" }, yl = {
3283
+ }, pl = { class: "mt-2" }, hl = { class: "text-sm text-gray-500" }, fl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, gl = { class: "mt-3 text-left" }, _l = { class: "space-y-2" }, kl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, yl = { class: "flex-1 block text-sm" }, xl = {
3236
3284
  for: "metric_unit",
3237
3285
  class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
3238
- }, xl = { class: "flex relative gap-x-3" }, wl = { class: "h-6 items-center" }, $l = {
3286
+ }, wl = { class: "flex relative gap-x-3" }, $l = { class: "h-6 items-center" }, Cl = {
3239
3287
  for: "theme",
3240
3288
  class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"
3241
- }, Cl = { class: "flex text-sm" }, Sl = ["label"], Ml = ["value"], El = {
3289
+ }, Sl = { class: "flex text-sm" }, Ml = ["label"], El = ["value"], Dl = {
3242
3290
  key: 0,
3243
3291
  class: "flex relative gap-x-3"
3244
- }, Dl = { class: "h-6 items-center" }, jl = {
3292
+ }, jl = { class: "h-6 items-center" }, Al = {
3245
3293
  for: "language",
3246
- class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm"
3247
- }, Al = { class: "flex text-sm" }, Tl = ["label"], Ll = ["value"], Fl = {
3294
+ class: "flex w-full font-medium text-gray-900 dark:text-gray-400 text-sm text-nowrap"
3295
+ }, Ll = { class: "flex text-sm" }, Tl = ["label"], Fl = ["value"], Vl = {
3248
3296
  name: "VFModalAbout"
3249
- }, Nl = /* @__PURE__ */ Object.assign(Fl, {
3297
+ }, Ol = /* @__PURE__ */ Object.assign(Vl, {
3250
3298
  setup(p) {
3251
- const e = F("ServiceContainer"), { getStore: s, setStore: r, clearStore: a } = e.storage, { t: d, changeLocale: u, locale: i } = e.i18n;
3252
- _(""), _("");
3299
+ const e = F("ServiceContainer"), { getStore: s, setStore: r, clearStore: o } = e.storage, { t: i, changeLocale: u, locale: d } = e.i18n;
3300
+ b(""), b("");
3253
3301
  const l = async () => {
3254
- a(), location.reload();
3255
- }, c = (E) => {
3256
- e.theme.set(E), e.emitter.emit("vf-theme-saved");
3257
- }, w = () => {
3302
+ o(), location.reload();
3303
+ }, c = (C) => {
3304
+ e.theme.set(C), e.emitter.emit("vf-theme-saved");
3305
+ }, g = () => {
3258
3306
  e.metricUnits = !e.metricUnits, e.filesize = e.metricUnits ? xe : ye, r("metricUnits", e.metricUnits), e.emitter.emit("vf-metric-units-saved");
3259
- }, k = F("supportedLocales"), y = Object.fromEntries(
3307
+ }, { i18n: _ } = F("VueFinderOptions"), y = Object.fromEntries(
3260
3308
  Object.entries({
3261
3309
  en: "English",
3262
3310
  fr: "French (Français)",
@@ -3269,126 +3317,126 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3269
3317
  tr: "Turkish (Türkçe)",
3270
3318
  zhCN: "Simplified Chinese (简体中文)",
3271
3319
  zhTW: "Traditional Chinese (繁體中文)"
3272
- }).filter(([E]) => Object.keys(k).includes(E))
3273
- ), C = {
3274
- system: d("System"),
3275
- light: d("Light"),
3276
- dark: d("Dark")
3277
- };
3278
- return (E, g) => (n(), L(G, null, {
3320
+ }).filter(([C]) => Object.keys(_).includes(C))
3321
+ ), M = ee(() => ({
3322
+ system: i("System"),
3323
+ light: i("Light"),
3324
+ dark: i("Dark")
3325
+ }));
3326
+ return (C, k) => (n(), T(W, null, {
3279
3327
  buttons: j(() => [
3280
3328
  t("button", {
3281
3329
  type: "button",
3282
- onClick: g[5] || (g[5] = (f) => o(e).emitter.emit("vf-modal-close")),
3330
+ onClick: k[5] || (k[5] = (f) => a(e).emitter.emit("vf-modal-close")),
3283
3331
  class: "vf-btn vf-btn-secondary"
3284
- }, m(o(d)("Close")), 1)
3332
+ }, v(a(i)("Close")), 1)
3285
3333
  ]),
3286
3334
  default: j(() => [
3287
- t("div", dl, [
3288
- cl,
3289
- t("div", ul, [
3290
- t("h3", ml, m(o(d)("About %s", "Vuefinder " + o(e).version)), 1),
3291
- t("div", vl, [
3292
- t("p", pl, m(o(d)("Vuefinder is a file manager component for vue 3.")), 1),
3335
+ t("div", cl, [
3336
+ ul,
3337
+ t("div", ml, [
3338
+ t("h3", vl, v(a(i)("About %s", "Vuefinder " + a(e).version)), 1),
3339
+ t("div", pl, [
3340
+ t("p", hl, v(a(i)("Vuefinder is a file manager component for vue 3.")), 1),
3293
3341
  t("div", null, [
3294
- t("h3", hl, m(o(d)("Settings")), 1)
3342
+ t("h3", fl, v(a(i)("Settings")), 1)
3295
3343
  ]),
3296
- t("div", fl, [
3344
+ t("div", gl, [
3297
3345
  t("fieldset", null, [
3298
- t("div", gl, [
3299
- t("div", _l, [
3300
- t("div", kl, [
3346
+ t("div", _l, [
3347
+ t("div", kl, [
3348
+ t("div", bl, [
3301
3349
  q(t("input", {
3302
3350
  id: "metric_unit",
3303
3351
  name: "metric_unit",
3304
3352
  type: "checkbox",
3305
- "onUpdate:modelValue": g[0] || (g[0] = (f) => o(e).metricUnits = f),
3306
- onClick: w,
3353
+ "onUpdate:modelValue": k[0] || (k[0] = (f) => a(e).metricUnits = f),
3354
+ onClick: g,
3307
3355
  class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
3308
3356
  }, null, 512), [
3309
- [Fe, o(e).metricUnits]
3357
+ [Fe, a(e).metricUnits]
3310
3358
  ])
3311
3359
  ]),
3312
- t("div", bl, [
3313
- t("label", yl, [
3314
- N(m(o(d)("Use Metric Units")) + " ", 1),
3315
- B(me, {
3360
+ t("div", yl, [
3361
+ t("label", xl, [
3362
+ V(v(a(i)("Use Metric Units")) + " ", 1),
3363
+ H(ve, {
3316
3364
  class: "ms-3",
3317
3365
  on: "vf-metric-units-saved"
3318
3366
  }, {
3319
3367
  default: j(() => [
3320
- N(m(o(d)("Saved.")), 1)
3368
+ V(v(a(i)("Saved.")), 1)
3321
3369
  ]),
3322
3370
  _: 1
3323
3371
  })
3324
3372
  ])
3325
3373
  ])
3326
3374
  ]),
3327
- t("div", xl, [
3328
- t("div", wl, [
3329
- t("label", $l, m(o(d)("Theme")), 1)
3375
+ t("div", wl, [
3376
+ t("div", $l, [
3377
+ t("label", Cl, v(a(i)("Theme")), 1)
3330
3378
  ]),
3331
- t("div", Cl, [
3379
+ t("div", Sl, [
3332
3380
  q(t("select", {
3333
3381
  id: "theme",
3334
- "onUpdate:modelValue": g[1] || (g[1] = (f) => o(e).theme.value = f),
3335
- onChange: g[2] || (g[2] = (f) => c(f.target.value)),
3382
+ "onUpdate:modelValue": k[1] || (k[1] = (f) => a(e).theme.value = f),
3383
+ onChange: k[2] || (k[2] = (f) => c(f.target.value)),
3336
3384
  class: "flex-shrink-0 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
3337
3385
  }, [
3338
3386
  t("optgroup", {
3339
- label: o(d)("Theme")
3387
+ label: a(i)("Theme")
3340
3388
  }, [
3341
- (n(), v(H, null, I(C, (f, V) => t("option", { value: V }, m(f), 9, Ml)), 64))
3342
- ], 8, Sl)
3389
+ (n(!0), m(U, null, I(M.value, (f, O) => (n(), m("option", { value: O }, v(f), 9, El))), 256))
3390
+ ], 8, Ml)
3343
3391
  ], 544), [
3344
- [pe, o(e).theme.value]
3392
+ [pe, a(e).theme.value]
3345
3393
  ]),
3346
- B(me, {
3394
+ H(ve, {
3347
3395
  class: "ms-3 flex-shrink-0 flex-grow basis-full",
3348
3396
  on: "vf-theme-saved"
3349
3397
  }, {
3350
3398
  default: j(() => [
3351
- N(m(o(d)("Saved.")), 1)
3399
+ V(v(a(i)("Saved.")), 1)
3352
3400
  ]),
3353
3401
  _: 1
3354
3402
  })
3355
3403
  ])
3356
3404
  ]),
3357
- o(e).features.includes(o(z).LANGUAGE) ? (n(), v("div", El, [
3358
- t("div", Dl, [
3359
- t("label", jl, m(o(d)("Language")), 1)
3405
+ a(e).features.includes(a(N).LANGUAGE) && Object.keys(a(y)).length > 1 ? (n(), m("div", Dl, [
3406
+ t("div", jl, [
3407
+ t("label", Al, v(a(i)("Language")), 1)
3360
3408
  ]),
3361
- t("div", Al, [
3409
+ t("div", Ll, [
3362
3410
  q(t("select", {
3363
3411
  id: "language",
3364
- "onUpdate:modelValue": g[3] || (g[3] = (f) => _e(i) ? i.value = f : null),
3365
- onChange: g[4] || (g[4] = (f) => o(u)(f.target.value)),
3366
- class: "flex-shrink-0 w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
3412
+ "onUpdate:modelValue": k[3] || (k[3] = (f) => _e(d) ? d.value = f : null),
3413
+ onChange: k[4] || (k[4] = (f) => a(u)(f.target.value)),
3414
+ class: "flex-shrink-0 w-1/2 sm:w-full text-sm text-slate-500 border dark:border-gray-600 dark:text-neutral-50 dark:bg-gray-700 rounded"
3367
3415
  }, [
3368
3416
  t("optgroup", {
3369
- label: o(d)("Language")
3417
+ label: a(i)("Language")
3370
3418
  }, [
3371
- (n(!0), v(H, null, I(o(y), (f, V) => (n(), v("option", { value: V }, m(f), 9, Ll))), 256))
3419
+ (n(!0), m(U, null, I(a(y), (f, O) => (n(), m("option", { value: O }, v(f), 9, Fl))), 256))
3372
3420
  ], 8, Tl)
3373
3421
  ], 544), [
3374
- [pe, o(i)]
3422
+ [pe, a(d)]
3375
3423
  ]),
3376
- B(me, {
3424
+ H(ve, {
3377
3425
  class: "ms-3 flex-shrink-0 flex-grow basis-full",
3378
3426
  on: "vf-language-saved"
3379
3427
  }, {
3380
3428
  default: j(() => [
3381
- N(m(o(d)("Saved.")), 1)
3429
+ V(v(a(i)("Saved.")), 1)
3382
3430
  ]),
3383
3431
  _: 1
3384
3432
  })
3385
3433
  ])
3386
- ])) : M("", !0),
3434
+ ])) : S("", !0),
3387
3435
  t("button", {
3388
3436
  onClick: l,
3389
3437
  type: "button",
3390
3438
  class: "vf-btn vf-btn-secondary"
3391
- }, m(o(d)("Reset Settings")), 1)
3439
+ }, v(a(i)("Reset Settings")), 1)
3392
3440
  ])
3393
3441
  ])
3394
3442
  ])
@@ -3399,30 +3447,32 @@ const me = /* @__PURE__ */ rl(nl, [["render", il]]), dl = { class: "sm:flex sm:i
3399
3447
  _: 1
3400
3448
  }));
3401
3449
  }
3402
- }), Vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3450
+ }), Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3403
3451
  __proto__: null,
3404
- ModalAbout: Nl,
3405
- ModalArchive: yn,
3406
- ModalDelete: aa,
3407
- ModalMessage: ma,
3408
- ModalMove: al,
3409
- ModalNewFile: ja,
3410
- ModalNewFolder: ya,
3411
- ModalPreview: kr,
3412
- ModalRename: Fr,
3452
+ ModalAbout: Ol,
3453
+ ModalArchive: xn,
3454
+ ModalDelete: oo,
3455
+ ModalMessage: vo,
3456
+ ModalMove: rl,
3457
+ ModalNewFile: Ao,
3458
+ ModalNewFolder: xo,
3459
+ ModalPreview: br,
3460
+ ModalRename: Vr,
3413
3461
  ModalUnarchive: zn,
3414
3462
  ModalUpload: on
3415
- }, Symbol.toStringTag, { value: "Module" })), Wl = {
3463
+ }, Symbol.toStringTag, { value: "Module" })), Yl = {
3416
3464
  /** @param {import('vue').App} app
3417
3465
  * @param options
3418
3466
  */
3419
3467
  install(p, e = {}) {
3420
- p.component("VueFinder", Ao);
3421
- for (const s of Object.values(Vl))
3422
- p.component(s.name, s);
3423
- p.provide("supportedLocales", e.i18n ?? {});
3468
+ p.component("VueFinder", Aa);
3469
+ for (const r of Object.values(Nl))
3470
+ p.component(r.name, r);
3471
+ e.i18n = e.i18n ?? {};
3472
+ let [s] = Object.keys(e.i18n);
3473
+ e.locale = e.locale ?? s ?? "en", p.provide("VueFinderOptions", e);
3424
3474
  }
3425
3475
  };
3426
3476
  export {
3427
- Wl as default
3477
+ Yl as default
3428
3478
  };