vuefinder 1.3.2 → 1.3.3

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,52 +1,52 @@
1
- import { ref as k, watch as ve, inject as b, openBlock as n, createElementBlock as m, createElementVNode as e, unref as r, normalizeClass as U, createTextVNode as T, toDisplayString as v, createCommentVNode as F, withDirectives as q, vShow as ae, createVNode as P, TransitionGroup as ze, withCtx as N, Fragment as I, renderList as R, reactive as ce, onMounted as G, onUpdated as Ee, onBeforeUnmount as Ce, withModifiers as K, nextTick as pe, isRef as Me, vModelSelect as _e, createStaticVNode as Fe, customRef as Le, withKeys as se, vModelText as re, normalizeStyle as Se, provide as Q, computed as Ve, createBlock as H, resolveDynamicComponent as Ne, renderSlot as ke } from "vue";
2
- import Be from "mitt";
3
- import Ae from "dragselect";
4
- import He from "vanilla-lazyload";
1
+ import { ref as g, watch as le, inject as k, openBlock as r, createElementBlock as v, createElementVNode as e, unref as a, normalizeClass as T, createTextVNode as U, toDisplayString as u, createCommentVNode as V, createVNode as P, TransitionGroup as Ve, withCtx as E, Fragment as H, renderList as J, reactive as ve, onMounted as K, onUpdated as Be, onBeforeUnmount as Oe, withDirectives as R, vShow as ue, withModifiers as Z, nextTick as ge, isRef as re, vModelSelect as ye, createStaticVNode as Ae, customRef as Le, withKeys as se, vModelText as ae, normalizeStyle as ze, provide as Y, computed as Ne, createBlock as N, resolveDynamicComponent as Ue, renderSlot as pe, onUnmounted as Te, vModelCheckbox as $e } from "vue";
2
+ import He from "mitt";
3
+ import Ie from "dragselect";
4
+ import qe from "vanilla-lazyload";
5
5
  import "cropperjs/dist/cropper.css";
6
- import Te from "cropperjs";
7
- import Ue from "@uppy/core";
8
- import Ie from "@uppy/xhr-upload";
6
+ import Re from "cropperjs";
7
+ import Pe from "@uppy/core";
8
+ import Ge from "@uppy/xhr-upload";
9
9
  import "microtip/microtip.css";
10
- var je;
11
- const ue = (je = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : je.getAttribute("content"), me = (i, { method: t = "get", params: s = {}, json: o = !0, signal: p = null }) => {
12
- const a = { method: t };
13
- if (a.signal = p, t == "get")
14
- i += "?" + new URLSearchParams(s);
10
+ var De;
11
+ const he = (De = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : De.getAttribute("content"), fe = (l, { method: t = "get", params: s = {}, json: o = !0, signal: i = null }) => {
12
+ const m = { method: t };
13
+ if (m.signal = i, t == "get")
14
+ l += "?" + new URLSearchParams(s);
15
15
  else {
16
- a.headers = {}, ue && (a.headers["X-CSRF-Token"] = ue);
17
- let c = new FormData();
18
- for (const [u, f] of Object.entries(s))
19
- c.append(u, f);
20
- a.body = c;
16
+ m.headers = {}, he && (m.headers["X-CSRF-Token"] = he);
17
+ let n = new FormData();
18
+ for (const [h, p] of Object.entries(s))
19
+ n.append(h, p);
20
+ m.body = n;
21
21
  }
22
- return fetch(i, a).then((c) => c.ok ? o ? c.json() : c.text() : c.json().then(Promise.reject.bind(Promise)));
22
+ return fetch(l, m).then((n) => n.ok ? o ? n.json() : n.text() : n.json().then(Promise.reject.bind(Promise)));
23
23
  };
24
- function xe(i) {
25
- let t = localStorage.getItem(i + "_storage");
26
- const s = k(JSON.parse(t));
27
- ve(s, o);
24
+ function xe(l) {
25
+ let t = localStorage.getItem(l + "_storage");
26
+ const s = g(JSON.parse(t));
27
+ le(s, o);
28
28
  function o() {
29
- s.value === null || s.value === "" ? localStorage.removeItem(i + "_storage") : localStorage.setItem(i + "_storage", JSON.stringify(s.value));
29
+ s.value === null || s.value === "" ? localStorage.removeItem(l + "_storage") : localStorage.setItem(l + "_storage", JSON.stringify(s.value));
30
30
  }
31
- function p(u, f) {
32
- s.value = Object.assign({ ...s.value }, { [u]: f });
31
+ function i(h, p) {
32
+ s.value = Object.assign({ ...s.value }, { [h]: p });
33
33
  }
34
- function a() {
34
+ function m() {
35
35
  s.value = null;
36
36
  }
37
- return { getStore: (u, f = null) => s.value === null || s.value === "" ? f : s.value.hasOwnProperty(u) ? s.value[u] : f, setStore: p, clearStore: a };
37
+ return { getStore: (h, p = null) => s.value === null || s.value === "" ? p : s.value.hasOwnProperty(h) ? s.value[h] : p, setStore: i, clearStore: m };
38
38
  }
39
- const $e = k("");
40
- function Y() {
41
- function i(t) {
42
- $e.value = t;
39
+ const Ce = g("");
40
+ function X() {
41
+ function l(t) {
42
+ Ce.value = t;
43
43
  }
44
- return { apiUrl: $e, setApiUrl: i };
44
+ return { apiUrl: Ce, setApiUrl: l };
45
45
  }
46
- const qe = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Re = {
46
+ const Ye = { class: "border-neutral-300 flex justify-between items-center py-1 text-sm" }, Je = {
47
47
  key: 0,
48
48
  class: "flex text-center"
49
- }, Pe = ["aria-label"], Ge = /* @__PURE__ */ e("svg", {
49
+ }, Ke = ["aria-label"], We = /* @__PURE__ */ e("svg", {
50
50
  xmlns: "http://www.w3.org/2000/svg",
51
51
  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",
52
52
  fill: "none",
@@ -59,9 +59,9 @@ const qe = { class: "border-neutral-300 flex justify-between items-center py-1 t
59
59
  "stroke-linejoin": "round",
60
60
  d: "M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"
61
61
  })
62
- ], -1), Ye = [
63
- Ge
64
- ], Je = ["aria-label"], Ke = /* @__PURE__ */ e("svg", {
62
+ ], -1), Xe = [
63
+ We
64
+ ], Qe = ["aria-label"], Ze = /* @__PURE__ */ e("svg", {
65
65
  xmlns: "http://www.w3.org/2000/svg",
66
66
  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",
67
67
  fill: "none",
@@ -74,21 +74,21 @@ const qe = { class: "border-neutral-300 flex justify-between items-center py-1 t
74
74
  "stroke-linejoin": "round",
75
75
  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"
76
76
  })
77
- ], -1), We = [
78
- Ke
79
- ], Xe = ["aria-label"], Qe = /* @__PURE__ */ e("path", {
77
+ ], -1), et = [
78
+ Ze
79
+ ], tt = ["aria-label"], ot = /* @__PURE__ */ e("path", {
80
80
  "stroke-linecap": "round",
81
81
  "stroke-linejoin": "round",
82
82
  d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
83
- }, null, -1), Ze = [
84
- Qe
85
- ], et = ["aria-label"], tt = /* @__PURE__ */ e("path", {
83
+ }, null, -1), st = [
84
+ ot
85
+ ], at = ["aria-label"], nt = /* @__PURE__ */ e("path", {
86
86
  "stroke-linecap": "round",
87
87
  "stroke-linejoin": "round",
88
88
  d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
89
- }, null, -1), ot = [
90
- tt
91
- ], st = ["aria-label"], rt = /* @__PURE__ */ e("svg", {
89
+ }, null, -1), rt = [
90
+ nt
91
+ ], lt = ["aria-label"], it = /* @__PURE__ */ e("svg", {
92
92
  xmlns: "http://www.w3.org/2000/svg",
93
93
  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",
94
94
  fill: "none",
@@ -101,322 +101,293 @@ const qe = { class: "border-neutral-300 flex justify-between items-center py-1 t
101
101
  "stroke-linejoin": "round",
102
102
  d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"
103
103
  })
104
- ], -1), at = [
105
- rt
106
- ], nt = ["aria-label"], lt = /* @__PURE__ */ e("path", {
104
+ ], -1), dt = [
105
+ it
106
+ ], ct = ["aria-label"], ut = /* @__PURE__ */ e("path", {
107
107
  "stroke-linecap": "round",
108
108
  "stroke-linejoin": "round",
109
109
  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"
110
- }, null, -1), it = [
111
- lt
112
- ], dt = ["aria-label"], ct = /* @__PURE__ */ e("path", {
110
+ }, null, -1), mt = [
111
+ ut
112
+ ], vt = ["aria-label"], pt = /* @__PURE__ */ e("path", {
113
113
  "stroke-linecap": "round",
114
114
  "stroke-linejoin": "round",
115
115
  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"
116
- }, null, -1), ut = [
117
- ct
118
- ], mt = {
116
+ }, null, -1), ht = [
117
+ pt
118
+ ], ft = {
119
119
  key: 1,
120
120
  class: "flex text-center"
121
- }, vt = { class: "pl-2" }, pt = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, ft = {
121
+ }, gt = { class: "pl-2" }, kt = { class: "dark:bg-gray-700 bg-gray-200 text-xs px-2 py-1 rounded" }, _t = {
122
122
  key: 0,
123
123
  class: "animate-spin p-0.5 h-5 w-5 text-white ml-auto",
124
124
  xmlns: "http://www.w3.org/2000/svg",
125
125
  fill: "none",
126
126
  viewBox: "0 0 24 24"
127
- }, gt = /* @__PURE__ */ e("circle", {
127
+ }, xt = /* @__PURE__ */ e("circle", {
128
128
  class: "opacity-25 stroke-blue-900 dark:stroke-blue-100",
129
129
  cx: "12",
130
130
  cy: "12",
131
131
  r: "10",
132
132
  stroke: "currentColor",
133
133
  "stroke-width": "4"
134
- }, null, -1), ht = /* @__PURE__ */ e("path", {
134
+ }, null, -1), bt = /* @__PURE__ */ e("path", {
135
135
  class: "opacity-75",
136
136
  fill: "currentColor",
137
137
  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"
138
- }, null, -1), kt = [
139
- gt,
140
- ht
141
- ], xt = { class: "flex text-center items-center justify-end" }, bt = ["aria-label"], wt = /* @__PURE__ */ e("path", {
142
- "stroke-linecap": "round",
143
- "stroke-linejoin": "round",
144
- d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"
145
- }, null, -1), yt = [
146
- wt
147
- ], _t = ["aria-label"], $t = {
138
+ }, null, -1), wt = [
139
+ xt,
140
+ bt
141
+ ], yt = { class: "flex text-center items-center justify-end" }, $t = ["aria-label"], Ct = {
148
142
  xmlns: "http://www.w3.org/2000/svg",
149
143
  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",
150
144
  fill: "none",
151
145
  viewBox: "0 0 24 24",
152
146
  stroke: "none",
153
147
  "stroke-width": "1.5"
154
- }, jt = {
148
+ }, Mt = {
155
149
  key: 0,
156
150
  "stroke-linecap": "round",
157
151
  "stroke-linejoin": "round",
158
152
  d: "M9 9V4.5M9 9H4.5M9 9L3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5l5.25 5.25"
159
- }, Ct = {
153
+ }, jt = {
160
154
  key: 1,
161
155
  "stroke-linecap": "round",
162
156
  "stroke-linejoin": "round",
163
157
  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"
164
- }, Mt = ["aria-label"], St = {
158
+ }, St = ["aria-label"], Dt = {
165
159
  key: 0,
166
160
  "stroke-linecap": "round",
167
161
  "stroke-linejoin": "round",
168
162
  d: "M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"
169
- }, Dt = {
163
+ }, Ot = {
170
164
  key: 1,
171
165
  "stroke-linecap": "round",
172
166
  "stroke-linejoin": "round",
173
167
  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"
174
- }, Ot = {
168
+ }, zt = {
175
169
  name: "VFToolbar"
176
- }, zt = /* @__PURE__ */ Object.assign(Ot, {
170
+ }, Et = /* @__PURE__ */ Object.assign(zt, {
177
171
  props: {
178
172
  data: Object
179
173
  },
180
- setup(i) {
181
- const t = b("emitter"), s = b("usePropDarkMode"), { getStore: o, setStore: p } = b("storage"), { t: a } = b("i18n"), c = k(o("viewport", "grid")), u = k([]), f = k(o("full-screen", !1)), d = k("");
182
- t.on("vf-search-query", ({ newQuery: C }) => {
183
- d.value = C;
174
+ setup(l) {
175
+ const t = k("emitter");
176
+ k("usePropDarkMode");
177
+ const { getStore: s, setStore: o } = k("storage"), { t: i } = k("i18n"), m = g(s("viewport", "grid")), n = g([]), h = g(s("full-screen", !1)), p = g("");
178
+ t.on("vf-search-query", ({ newQuery: y }) => {
179
+ p.value = y;
184
180
  });
185
- const l = b("loadingState"), x = () => l.value, w = () => {
186
- f.value = !f.value, t.emit("vf-fullscreen-toggle");
181
+ const c = k("loadingState"), d = () => c.value, f = () => {
182
+ h.value = !h.value, t.emit("vf-fullscreen-toggle");
187
183
  };
188
- return t.on("vf-nodes-selected", (C) => {
189
- u.value = C;
190
- }), t.on("vf-view-toggle", (C) => {
191
- p("viewport", C), c.value = C;
192
- }), (C, y) => (n(), m("div", qe, [
193
- d.value.length ? (n(), m("div", mt, [
194
- e("div", vt, [
195
- T(v(r(a)("Search results for")) + " ", 1),
196
- e("span", pt, v(d.value), 1)
184
+ return t.on("vf-nodes-selected", (y) => {
185
+ n.value = y;
186
+ }), t.on("vf-view-toggle", (y) => {
187
+ o("viewport", y), m.value = y;
188
+ }), (y, w) => (r(), v("div", Ye, [
189
+ p.value.length ? (r(), v("div", ft, [
190
+ e("div", gt, [
191
+ U(u(a(i)("Search results for")) + " ", 1),
192
+ e("span", kt, u(p.value), 1)
197
193
  ]),
198
- x() ? (n(), m("svg", ft, kt)) : F("", !0)
199
- ])) : (n(), m("div", Re, [
194
+ d() ? (r(), v("svg", _t, wt)) : V("", !0)
195
+ ])) : (r(), v("div", Je, [
200
196
  e("div", {
201
197
  class: "mx-1.5",
202
- "aria-label": r(a)("New Folder"),
198
+ "aria-label": a(i)("New Folder"),
203
199
  "data-microtip-position": "bottom-right",
204
200
  role: "tooltip",
205
- onClick: y[0] || (y[0] = ($) => r(t).emit("vf-modal-show", { type: "new-folder", items: u.value }))
206
- }, Ye, 8, Pe),
201
+ onClick: w[0] || (w[0] = (B) => a(t).emit("vf-modal-show", { type: "new-folder", items: n.value }))
202
+ }, Xe, 8, Ke),
207
203
  e("div", {
208
204
  class: "mx-1.5",
209
- "aria-label": r(a)("New File"),
205
+ "aria-label": a(i)("New File"),
210
206
  "data-microtip-position": "bottom",
211
207
  role: "tooltip",
212
- onClick: y[1] || (y[1] = ($) => r(t).emit("vf-modal-show", { type: "new-file", items: u.value }))
213
- }, We, 8, Je),
208
+ onClick: w[1] || (w[1] = (B) => a(t).emit("vf-modal-show", { type: "new-file", items: n.value }))
209
+ }, et, 8, Qe),
214
210
  e("div", {
215
211
  class: "mx-1.5",
216
- "aria-label": r(a)("Rename"),
212
+ "aria-label": a(i)("Rename"),
217
213
  "data-microtip-position": "bottom",
218
214
  role: "tooltip",
219
- onClick: y[2] || (y[2] = ($) => u.value.length != 1 || r(t).emit("vf-modal-show", { type: "rename", items: u.value }))
215
+ onClick: w[2] || (w[2] = (B) => n.value.length != 1 || a(t).emit("vf-modal-show", { type: "rename", items: n.value }))
220
216
  }, [
221
- (n(), m("svg", {
217
+ (r(), v("svg", {
222
218
  xmlns: "http://www.w3.org/2000/svg",
223
- class: U([u.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"]),
219
+ class: T([n.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"]),
224
220
  fill: "none",
225
221
  viewBox: "0 0 24 24",
226
222
  stroke: "none",
227
223
  "stroke-width": "1.5"
228
- }, Ze, 2))
229
- ], 8, Xe),
224
+ }, st, 2))
225
+ ], 8, tt),
230
226
  e("div", {
231
227
  class: "mx-1.5",
232
- "aria-label": r(a)("Delete"),
228
+ "aria-label": a(i)("Delete"),
233
229
  "data-microtip-position": "bottom",
234
230
  role: "tooltip",
235
- onClick: y[3] || (y[3] = ($) => !u.value.length || r(t).emit("vf-modal-show", { type: "delete", items: u.value }))
231
+ onClick: w[3] || (w[3] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "delete", items: n.value }))
236
232
  }, [
237
- (n(), m("svg", {
233
+ (r(), v("svg", {
238
234
  xmlns: "http://www.w3.org/2000/svg",
239
- class: U([u.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"]),
235
+ class: T([n.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"]),
240
236
  fill: "none",
241
237
  viewBox: "0 0 24 24",
242
238
  stroke: "none",
243
239
  "stroke-width": "1.5"
244
- }, ot, 2))
245
- ], 8, et),
240
+ }, rt, 2))
241
+ ], 8, at),
246
242
  e("div", {
247
243
  class: "mx-1.5",
248
- "aria-label": r(a)("Upload"),
244
+ "aria-label": a(i)("Upload"),
249
245
  "data-microtip-position": "bottom",
250
246
  role: "tooltip",
251
- onClick: y[4] || (y[4] = ($) => r(t).emit("vf-modal-show", { type: "upload", items: u.value }))
252
- }, at, 8, st),
253
- u.value.length == 1 && u.value[0].mime_type == "application/zip" ? (n(), m("div", {
247
+ onClick: w[4] || (w[4] = (B) => a(t).emit("vf-modal-show", { type: "upload", items: n.value }))
248
+ }, dt, 8, lt),
249
+ n.value.length == 1 && n.value[0].mime_type == "application/zip" ? (r(), v("div", {
254
250
  key: 0,
255
251
  class: "mx-1.5",
256
- "aria-label": r(a)("Unarchive"),
252
+ "aria-label": a(i)("Unarchive"),
257
253
  "data-microtip-position": "bottom",
258
254
  role: "tooltip",
259
- onClick: y[5] || (y[5] = ($) => !u.value.length || r(t).emit("vf-modal-show", { type: "unarchive", items: u.value }))
255
+ onClick: w[5] || (w[5] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "unarchive", items: n.value }))
260
256
  }, [
261
- (n(), m("svg", {
257
+ (r(), v("svg", {
262
258
  xmlns: "http://www.w3.org/2000/svg",
263
- class: U([u.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"]),
259
+ class: T([n.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"]),
264
260
  fill: "none",
265
261
  viewBox: "0 0 24 24",
266
262
  stroke: "none",
267
263
  "stroke-width": "1.5"
268
- }, it, 2))
269
- ], 8, nt)) : (n(), m("div", {
264
+ }, mt, 2))
265
+ ], 8, ct)) : (r(), v("div", {
270
266
  key: 1,
271
267
  class: "mx-1.5",
272
- "aria-label": r(a)("Archive"),
268
+ "aria-label": a(i)("Archive"),
273
269
  "data-microtip-position": "bottom",
274
270
  role: "tooltip",
275
- onClick: y[6] || (y[6] = ($) => !u.value.length || r(t).emit("vf-modal-show", { type: "archive", items: u.value }))
271
+ onClick: w[6] || (w[6] = (B) => !n.value.length || a(t).emit("vf-modal-show", { type: "archive", items: n.value }))
276
272
  }, [
277
- (n(), m("svg", {
273
+ (r(), v("svg", {
278
274
  xmlns: "http://www.w3.org/2000/svg",
279
- class: U([u.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"]),
275
+ class: T([n.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"]),
280
276
  fill: "none",
281
277
  viewBox: "0 0 24 24",
282
278
  stroke: "none",
283
279
  "stroke-width": "1.5"
284
- }, ut, 2))
285
- ], 8, dt))
280
+ }, ht, 2))
281
+ ], 8, vt))
286
282
  ])),
287
- e("div", xt, [
288
- q(e("div", {
289
- class: "mx-1.5",
290
- "aria-label": r(a)("Dark Mode"),
291
- "data-microtip-position": "bottom",
292
- role: "tooltip"
293
- }, [
294
- (n(), m("svg", {
295
- onClick: y[7] || (y[7] = ($) => r(t).emit("vf-darkMode-toggle")),
296
- viewBox: "0 0 24 24",
297
- "stroke-width": "2",
298
- "stroke-linecap": "round",
299
- "stroke-linejoin": "round",
300
- class: "h-6 w-6 m-auto cursor-pointer stroke-sky-500 fill-sky-100 hover:stroke-sky-600 dark:stroke-gray-400 dark:fill-gray-400/20 dark:hover:stroke-gray-300"
301
- }, yt))
302
- ], 8, bt), [
303
- [ae, !r(s)]
304
- ]),
283
+ e("div", yt, [
305
284
  e("div", {
306
285
  class: "mx-1.5",
307
- "aria-label": r(a)("Toggle Full Screen"),
286
+ "aria-label": a(i)("Toggle Full Screen"),
308
287
  "data-microtip-position": "bottom-left",
309
288
  role: "tooltip",
310
- onClick: w
289
+ onClick: f
311
290
  }, [
312
- (n(), m("svg", $t, [
313
- f.value ? (n(), m("path", jt)) : (n(), m("path", Ct))
291
+ (r(), v("svg", Ct, [
292
+ h.value ? (r(), v("path", Mt)) : (r(), v("path", jt))
314
293
  ]))
315
- ], 8, _t),
294
+ ], 8, $t),
316
295
  e("div", {
317
296
  class: "mx-1.5",
318
- "aria-label": r(a)("Change View"),
297
+ "aria-label": a(i)("Change View"),
319
298
  "data-microtip-position": "bottom-left",
320
299
  role: "tooltip",
321
- onClick: y[8] || (y[8] = ($) => d.value.length || r(t).emit("vf-view-toggle", c.value == "list" ? "grid" : "list"))
300
+ onClick: w[7] || (w[7] = (B) => p.value.length || a(t).emit("vf-view-toggle", m.value == "list" ? "grid" : "list"))
322
301
  }, [
323
- (n(), m("svg", {
302
+ (r(), v("svg", {
324
303
  xmlns: "http://www.w3.org/2000/svg",
325
- 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"]),
304
+ class: T([p.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"]),
326
305
  fill: "none",
327
306
  viewBox: "0 0 24 24",
328
307
  stroke: "none",
329
308
  "stroke-width": "1.5"
330
309
  }, [
331
- c.value == "grid" ? (n(), m("path", St)) : F("", !0),
332
- c.value == "list" ? (n(), m("path", Dt)) : F("", !0)
310
+ m.value == "grid" ? (r(), v("path", Dt)) : V("", !0),
311
+ m.value == "list" ? (r(), v("path", Ot)) : V("", !0)
333
312
  ], 2))
334
- ], 8, Mt)
313
+ ], 8, St)
335
314
  ])
336
315
  ]));
337
316
  }
338
- });
339
- function ye(i, t, s, o, p) {
340
- return (t = Math, s = t.log, o = 1024, p = s(i) / s(o) | 0, i / t.pow(o, p)).toFixed(0) + " " + (p ? "KMGTPEZY"[--p] + "iB" : "B");
341
- }
342
- function Et(i) {
343
- const t = { k: 1, m: 2, g: 3, t: 4 }, o = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(i);
344
- return o[1] * Math.pow(1024, t[o[2].toLowerCase()]);
345
- }
346
- const De = (i, t = null) => new Date(i * 1e3).toLocaleString(t ?? navigator.language ?? "en-US"), Ft = {
317
+ }), Ee = (l, t = null) => new Date(l * 1e3).toLocaleString(t ?? navigator.language ?? "en-US"), Ft = {
347
318
  key: 0,
348
319
  xmlns: "http://www.w3.org/2000/svg",
349
320
  class: "h-5 w-5",
350
321
  viewBox: "0 0 20 20",
351
322
  fill: "currentColor"
352
- }, Lt = /* @__PURE__ */ e("path", {
323
+ }, Vt = /* @__PURE__ */ e("path", {
353
324
  "fill-rule": "evenodd",
354
325
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
355
326
  "clip-rule": "evenodd"
356
- }, null, -1), Vt = [
357
- Lt
358
- ], Nt = {
327
+ }, null, -1), Bt = [
328
+ Vt
329
+ ], At = {
359
330
  key: 1,
360
331
  xmlns: "http://www.w3.org/2000/svg",
361
332
  class: "h-5 w-5",
362
333
  viewBox: "0 0 20 20",
363
334
  fill: "currentColor"
364
- }, Bt = /* @__PURE__ */ e("path", {
335
+ }, Lt = /* @__PURE__ */ e("path", {
365
336
  "fill-rule": "evenodd",
366
337
  d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
367
338
  "clip-rule": "evenodd"
368
- }, null, -1), At = [
369
- Bt
370
- ], Ht = {
339
+ }, null, -1), Nt = [
340
+ Lt
341
+ ], Ut = {
371
342
  name: "VFSortIcon"
372
- }, de = /* @__PURE__ */ Object.assign(Ht, {
343
+ }, me = /* @__PURE__ */ Object.assign(Ut, {
373
344
  props: { direction: String },
374
- setup(i) {
375
- return (t, s) => (n(), m("div", null, [
376
- i.direction == "down" ? (n(), m("svg", Ft, Vt)) : F("", !0),
377
- i.direction == "up" ? (n(), m("svg", Nt, At)) : F("", !0)
345
+ setup(l) {
346
+ return (t, s) => (r(), v("div", null, [
347
+ l.direction == "down" ? (r(), v("svg", Ft, Bt)) : V("", !0),
348
+ l.direction == "up" ? (r(), v("svg", At, Nt)) : V("", !0)
378
349
  ]));
379
350
  }
380
- }), Tt = ["onClick"], Ut = {
351
+ }), Tt = ["onClick"], Ht = {
381
352
  name: "VFToast.vue"
382
- }, It = /* @__PURE__ */ Object.assign(Ut, {
383
- setup(i) {
384
- const t = b("emitter"), { getStore: s } = b("storage"), o = k(s("full-screen", !1)), p = (f) => f == "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", a = k([]), c = (f) => {
385
- a.value.splice(f, 1);
386
- }, u = (f) => {
387
- let d = a.value.findIndex((l) => l.id === f);
388
- d !== -1 && c(d);
353
+ }, It = /* @__PURE__ */ Object.assign(Ht, {
354
+ setup(l) {
355
+ const t = k("emitter"), { getStore: s } = k("storage"), o = g(s("full-screen", !1)), i = (p) => p == "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", m = g([]), n = (p) => {
356
+ m.value.splice(p, 1);
357
+ }, h = (p) => {
358
+ let c = m.value.findIndex((d) => d.id === p);
359
+ c !== -1 && n(c);
389
360
  };
390
361
  return t.on("vf-toast-clear", () => {
391
- a.value = [];
392
- }), t.on("vf-toast-push", (f) => {
393
- let d = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
394
- f.id = d, a.value.push(f), setTimeout(() => {
395
- u(d);
362
+ m.value = [];
363
+ }), t.on("vf-toast-push", (p) => {
364
+ let c = (/* @__PURE__ */ new Date()).getTime().toString(36).concat(performance.now().toString(), Math.random().toString()).replace(/\./g, "");
365
+ p.id = c, m.value.push(p), setTimeout(() => {
366
+ h(c);
396
367
  }, 5e3);
397
- }), (f, d) => (n(), m("div", {
398
- class: U([o.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
368
+ }), (p, c) => (r(), v("div", {
369
+ class: T([o.value.value ? "fixed" : "absolute", "bottom-0 max-w-fit flex flex-col bottom-0 left-1/2 -translate-x-1/2"])
399
370
  }, [
400
- P(ze, {
371
+ P(Ve, {
401
372
  name: "vf-toast-item",
402
373
  "leave-active-class": "transition-all duration-1000",
403
374
  "leave-to-class": "opacity-0"
404
375
  }, {
405
- default: N(() => [
406
- (n(!0), m(I, null, R(a.value, (l, x) => (n(), m("div", {
407
- onClick: (w) => c(x),
408
- key: l,
409
- class: U([p(l.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"])
410
- }, v(l.label), 11, Tt))), 128))
376
+ default: E(() => [
377
+ (r(!0), v(H, null, J(m.value, (d, f) => (r(), v("div", {
378
+ onClick: (y) => n(f),
379
+ key: d,
380
+ class: T([i(d.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"])
381
+ }, u(d.label), 11, Tt))), 128))
411
382
  ]),
412
383
  _: 1
413
384
  })
414
385
  ], 2));
415
386
  }
416
- }), oe = (i) => Object.entries(i).map((t) => t.map(encodeURIComponent).join("=")).join("&"), { apiUrl: qt } = Y(), be = (i, t) => qt.value + "?" + oe({ q: "preview", adapter: i, path: t });
417
- function we(i, t = 14) {
387
+ }), oe = (l) => Object.entries(l).map((t) => t.map(encodeURIComponent).join("=")).join("&"), { apiUrl: qt } = X(), be = (l, t) => qt.value + "?" + oe({ q: "preview", adapter: l, path: t });
388
+ function we(l, t = 14) {
418
389
  let s = `((?=([\\w\\W]{0,${t}}))([\\w\\W]{8,})([\\w\\W]{8,}))`;
419
- return i.replace(new RegExp(s), "$2..$4");
390
+ return l.replace(new RegExp(s), "$2..$4");
420
391
  }
421
392
  const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
422
393
  key: 0,
@@ -462,7 +433,7 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
462
433
  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"
463
434
  }, null, -1), so = [
464
435
  oo
465
- ], ro = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, ao = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, no = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], lo = { class: "grid grid-cols-12 items-center" }, io = { class: "flex col-span-7 items-center" }, co = {
436
+ ], ao = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, no = { class: "col-span-5 overflow-ellipsis overflow-hidden whitespace-nowrap" }, ro = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], lo = { class: "grid grid-cols-12 items-center" }, io = { class: "flex col-span-7 items-center" }, co = {
466
437
  key: 0,
467
438
  xmlns: "http://www.w3.org/2000/svg",
468
439
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -488,9 +459,9 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
488
459
  "stroke-linecap": "round",
489
460
  "stroke-linejoin": "round",
490
461
  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"
491
- }, null, -1), fo = [
462
+ }, null, -1), ho = [
492
463
  po
493
- ], go = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, ho = { class: "col-span-2 text-center" }, ko = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, xo = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], bo = { class: "relative" }, wo = {
464
+ ], fo = { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" }, go = { class: "col-span-2 text-center" }, ko = { class: "col-span-3 overflow-ellipsis overflow-hidden whitespace-nowrap" }, _o = ["onDblclick", "onContextmenu", "onDragstart", "onDragover", "onDrop", "data-type", "data-item", "data-index"], xo = { class: "relative" }, bo = {
494
465
  key: 0,
495
466
  xmlns: "http://www.w3.org/2000/svg",
496
467
  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",
@@ -498,13 +469,13 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
498
469
  viewBox: "0 0 24 24",
499
470
  stroke: "currentColor",
500
471
  "stroke-width": "1"
501
- }, yo = /* @__PURE__ */ e("path", {
472
+ }, wo = /* @__PURE__ */ e("path", {
502
473
  "stroke-linecap": "round",
503
474
  "stroke-linejoin": "round",
504
475
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
505
- }, null, -1), _o = [
506
- yo
507
- ], $o = ["data-src", "alt"], jo = {
476
+ }, null, -1), yo = [
477
+ wo
478
+ ], $o = ["data-src", "alt"], Co = {
508
479
  key: 2,
509
480
  xmlns: "http://www.w3.org/2000/svg",
510
481
  class: "h-10 w-10 md:h-12 md:w-12 m-auto text-neutral-500",
@@ -512,12 +483,12 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
512
483
  viewBox: "0 0 24 24",
513
484
  stroke: "currentColor",
514
485
  "stroke-width": "1"
515
- }, Co = /* @__PURE__ */ e("path", {
486
+ }, Mo = /* @__PURE__ */ e("path", {
516
487
  "stroke-linecap": "round",
517
488
  "stroke-linejoin": "round",
518
489
  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"
519
- }, null, -1), Mo = [
520
- Co
490
+ }, null, -1), jo = [
491
+ Mo
521
492
  ], So = {
522
493
  key: 3,
523
494
  class: "absolute hidden md:block top-1/2 w-full text-center text-neutral-500"
@@ -529,239 +500,239 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
529
500
  data: Object,
530
501
  search: Object
531
502
  },
532
- setup(i) {
533
- const t = i, s = b("emitter"), { setStore: o, getStore: p } = b("storage"), a = b("adapter"), c = (_) => _ == null ? void 0 : _.substring(0, 3), u = k(null), f = k(null), d = k(0), l = k(null), { t: x } = b("i18n"), w = Math.floor(Math.random() * 2 ** 32), C = k(p("full-screen", !1));
534
- let y;
503
+ setup(l) {
504
+ const t = l, s = k("emitter"), { setStore: o, getStore: i } = k("storage"), m = k("adapter"), n = (C) => C == null ? void 0 : C.substring(0, 3), h = g(null), p = g(null), c = g(0), d = g(null), { t: f } = k("i18n"), y = Math.floor(Math.random() * 2 ** 32), w = g(i("full-screen", !1)), B = k("filesize");
505
+ let O;
535
506
  s.on("vf-fullscreen-toggle", () => {
536
- u.value.style.height = null, C.value = !C.value, o("full-screen", C.value);
507
+ h.value.style.height = null, w.value = !w.value, o("full-screen", w.value);
537
508
  });
538
- const $ = k("");
539
- s.on("vf-search-query", ({ newQuery: _ }) => {
540
- $.value = _, _ ? s.emit("vf-fetch", {
509
+ const D = g("");
510
+ s.on("vf-search-query", ({ newQuery: C }) => {
511
+ D.value = C, C ? s.emit("vf-fetch", {
541
512
  params: {
542
513
  q: "search",
543
514
  adapter: t.data.adapter,
544
515
  path: t.data.dirname,
545
- filter: _
516
+ filter: C
546
517
  },
547
- onSuccess: (S) => {
548
- S.files.length || s.emit("vf-toast-push", { label: x("No search result found.") });
518
+ onSuccess: (b) => {
519
+ b.files.length || s.emit("vf-toast-push", { label: f("No search result found.") });
549
520
  }
550
521
  }) : s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: t.data.dirname } });
551
522
  });
552
- let z = null;
553
- const M = () => {
554
- z && clearTimeout(z);
555
- }, O = k(!0), j = (_) => {
556
- _.touches.length > 1 && (O.value ? (l.value.stop(), s.emit("vf-toast-push", { label: x("Drag&Drop: off") })) : (l.value.start(), s.emit("vf-toast-push", { label: x("Drag&Drop: on") }), s.emit("vf-explorer-update")), O.value = !O.value);
557
- }, L = (_) => {
558
- z = setTimeout(() => {
559
- const S = new MouseEvent("contextmenu", {
523
+ let S = null;
524
+ const F = () => {
525
+ S && clearTimeout(S);
526
+ }, M = g(!0), j = (C) => {
527
+ C.touches.length > 1 && (M.value ? (d.value.stop(), s.emit("vf-toast-push", { label: f("Drag&Drop: off") })) : (d.value.start(), s.emit("vf-toast-push", { label: f("Drag&Drop: on") }), s.emit("vf-explorer-update")), M.value = !M.value);
528
+ }, z = (C) => {
529
+ S = setTimeout(() => {
530
+ const b = new MouseEvent("contextmenu", {
560
531
  bubbles: !0,
561
532
  cancelable: !1,
562
533
  view: window,
563
534
  button: 2,
564
535
  buttons: 0,
565
- clientX: _.target.getBoundingClientRect().x,
566
- clientY: _.target.getBoundingClientRect().y
536
+ clientX: C.target.getBoundingClientRect().x,
537
+ clientY: C.target.getBoundingClientRect().y
567
538
  });
568
- _.target.dispatchEvent(S);
539
+ C.target.dispatchEvent(b);
569
540
  }, 500);
570
- }, V = (_) => {
571
- _.type == "dir" ? (s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: _.path } })) : s.emit("vf-modal-show", { type: "preview", adapter: t.data.adapter, item: _ });
572
- }, D = ce({ active: !1, column: "", order: "" }), Z = (_ = !0) => {
573
- let S = [...t.data.files], h = D.column, B = D.order == "asc" ? 1 : -1;
574
- if (!_)
575
- return S;
576
- const g = (E, A) => typeof E == "string" && typeof A == "string" ? E.toLowerCase().localeCompare(A.toLowerCase()) : E < A ? -1 : E > A ? 1 : 0;
577
- return D.active && (S = S.slice().sort((E, A) => g(E[h], A[h]) * B)), S;
578
- }, ee = (_) => {
579
- D.active && D.column == _ ? (D.active = D.order == "asc", D.column = _, D.order = "desc") : (D.active = !0, D.column = _, D.order = "asc");
580
- }, X = () => l.value.getSelection().map((_) => JSON.parse(_.dataset.item)), ne = (_, S) => {
581
- if (_.altKey || _.ctrlKey || _.metaKey)
582
- return _.preventDefault(), !1;
583
- _.dataTransfer.setDragImage(f.value, 0, 15), _.dataTransfer.effectAllowed = "all", _.dataTransfer.dropEffect = "copy", _.dataTransfer.setData("items", JSON.stringify(X()));
584
- }, le = (_, S) => {
585
- _.preventDefault();
586
- let h = JSON.parse(_.dataTransfer.getData("items"));
587
- if (h.find((B) => B.storage != a.value)) {
541
+ }, I = (C) => {
542
+ C.type == "dir" ? (s.emit("vf-search-exit"), s.emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: C.path } })) : s.emit("vf-modal-show", { type: "preview", adapter: t.data.adapter, item: C });
543
+ }, A = ve({ active: !1, column: "", order: "" }), ee = (C = !0) => {
544
+ let b = [...t.data.files], _ = A.column, x = A.order == "asc" ? 1 : -1;
545
+ if (!C)
546
+ return b;
547
+ const $ = (L, q) => typeof L == "string" && typeof q == "string" ? L.toLowerCase().localeCompare(q.toLowerCase()) : L < q ? -1 : L > q ? 1 : 0;
548
+ return A.active && (b = b.slice().sort((L, q) => $(L[_], q[_]) * x)), b;
549
+ }, G = (C) => {
550
+ A.active && A.column == C ? (A.active = A.order == "asc", A.column = C, A.order = "desc") : (A.active = !0, A.column = C, A.order = "asc");
551
+ }, te = () => d.value.getSelection().map((C) => JSON.parse(C.dataset.item)), ie = (C, b) => {
552
+ if (C.altKey || C.ctrlKey || C.metaKey)
553
+ return C.preventDefault(), !1;
554
+ C.dataTransfer.setDragImage(p.value, 0, 15), C.dataTransfer.effectAllowed = "all", C.dataTransfer.dropEffect = "copy", C.dataTransfer.setData("items", JSON.stringify(te()));
555
+ }, de = (C, b) => {
556
+ C.preventDefault();
557
+ let _ = JSON.parse(C.dataTransfer.getData("items"));
558
+ if (_.find((x) => x.storage != m.value)) {
588
559
  alert("Moving items between different storages is not supported yet.");
589
560
  return;
590
561
  }
591
- s.emit("vf-modal-show", { type: "move", items: { from: h, to: S } });
592
- }, ie = (_, S) => {
593
- _.preventDefault(), !S || S.type !== "dir" || l.value.getSelection().find((h) => h == _.currentTarget) ? (_.dataTransfer.dropEffect = "none", _.dataTransfer.effectAllowed = "none") : _.dataTransfer.dropEffect = "copy";
594
- }, fe = () => {
595
- l.value = new Ae({
596
- area: u.value,
562
+ s.emit("vf-modal-show", { type: "move", items: { from: _, to: b } });
563
+ }, ne = (C, b) => {
564
+ C.preventDefault(), !b || b.type !== "dir" || d.value.getSelection().find((_) => _ == C.currentTarget) ? (C.dataTransfer.dropEffect = "none", C.dataTransfer.effectAllowed = "none") : C.dataTransfer.dropEffect = "copy";
565
+ }, ce = () => {
566
+ d.value = new Ie({
567
+ area: h.value,
597
568
  keyboardDrag: !1,
598
569
  selectedClass: "vf-explorer-selected",
599
570
  selectorClass: "vf-explorer-selector"
600
- }), s.on("vf-explorer-update", () => pe(() => {
601
- l.value.clearSelection(), l.value.setSettings({
602
- selectables: document.getElementsByClassName("vf-item-" + w)
571
+ }), s.on("vf-explorer-update", () => ge(() => {
572
+ d.value.clearSelection(), d.value.setSettings({
573
+ selectables: document.getElementsByClassName("vf-item-" + y)
603
574
  });
604
- })), l.value.subscribe("predragstart", ({ event: _, isDragging: S }) => {
605
- if (S)
606
- d.value = l.value.getSelection().length, l.value.break();
575
+ })), d.value.subscribe("predragstart", ({ event: C, isDragging: b }) => {
576
+ if (b)
577
+ c.value = d.value.getSelection().length, d.value.break();
607
578
  else {
608
- const h = _.target.offsetWidth - _.offsetX, B = _.target.offsetHeight - _.offsetY;
609
- h < 15 && B < 15 && (l.value.clearSelection(), l.value.break());
579
+ const _ = C.target.offsetWidth - C.offsetX, x = C.target.offsetHeight - C.offsetY;
580
+ _ < 15 && x < 15 && (d.value.clearSelection(), d.value.break());
610
581
  }
611
- }), l.value.subscribe("predragmove", ({ isDragging: _ }) => {
612
- _ && l.value.break();
613
- }), l.value.subscribe("callback", ({ items: _, event: S, isDragging: h }) => {
614
- s.emit("vf-nodes-selected", X()), d.value = l.value.getSelection().length;
582
+ }), d.value.subscribe("predragmove", ({ isDragging: C }) => {
583
+ C && d.value.break();
584
+ }), d.value.subscribe("callback", ({ items: C, event: b, isDragging: _ }) => {
585
+ s.emit("vf-nodes-selected", te()), c.value = d.value.getSelection().length;
615
586
  });
616
587
  };
617
- return G(() => {
618
- y = new He(u.value), fe();
619
- }), Ee(() => {
620
- l.value.Area.reset(), l.value.SelectorArea.updatePos(), y.update();
621
- }), G(() => {
622
- ve(() => t.view, () => s.emit("vf-explorer-update"));
623
- }), Ce(() => {
624
- y.destroy();
625
- }), (_, S) => (n(), m("div", Rt, [
626
- i.view == "list" || $.value.length ? (n(), m("div", Pt, [
588
+ return K(() => {
589
+ O = new qe(h.value), ce();
590
+ }), Be(() => {
591
+ d.value.Area.reset(), d.value.SelectorArea.updatePos(), O.update();
592
+ }), K(() => {
593
+ le(() => t.view, () => s.emit("vf-explorer-update"));
594
+ }), Oe(() => {
595
+ O.destroy();
596
+ }), (C, b) => (r(), v("div", Rt, [
597
+ l.view == "list" || D.value.length ? (r(), v("div", Pt, [
627
598
  e("div", {
628
- onClick: S[0] || (S[0] = (h) => ee("basename")),
599
+ onClick: b[0] || (b[0] = (_) => G("basename")),
629
600
  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"
630
601
  }, [
631
- T(v(r(x)("Name")) + " ", 1),
632
- q(P(de, {
633
- direction: D.order == "asc" ? "down" : "up"
602
+ U(u(a(f)("Name")) + " ", 1),
603
+ R(P(me, {
604
+ direction: A.order == "asc" ? "down" : "up"
634
605
  }, null, 8, ["direction"]), [
635
- [ae, D.active && D.column == "basename"]
606
+ [ue, A.active && A.column == "basename"]
636
607
  ])
637
608
  ]),
638
- $.value.length ? F("", !0) : (n(), m("div", {
609
+ D.value.length ? V("", !0) : (r(), v("div", {
639
610
  key: 0,
640
- onClick: S[1] || (S[1] = (h) => ee("file_size")),
611
+ onClick: b[1] || (b[1] = (_) => G("file_size")),
641
612
  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"
642
613
  }, [
643
- T(v(r(x)("Size")) + " ", 1),
644
- q(P(de, {
645
- direction: D.order == "asc" ? "down" : "up"
614
+ U(u(a(f)("Size")) + " ", 1),
615
+ R(P(me, {
616
+ direction: A.order == "asc" ? "down" : "up"
646
617
  }, null, 8, ["direction"]), [
647
- [ae, D.active && D.column == "file_size"]
618
+ [ue, A.active && A.column == "file_size"]
648
619
  ])
649
620
  ])),
650
- $.value.length ? F("", !0) : (n(), m("div", {
621
+ D.value.length ? V("", !0) : (r(), v("div", {
651
622
  key: 1,
652
- onClick: S[2] || (S[2] = (h) => ee("last_modified")),
623
+ onClick: b[2] || (b[2] = (_) => G("last_modified")),
653
624
  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"
654
625
  }, [
655
- T(v(r(x)("Date")) + " ", 1),
656
- q(P(de, {
657
- direction: D.order == "asc" ? "down" : "up"
626
+ U(u(a(f)("Date")) + " ", 1),
627
+ R(P(me, {
628
+ direction: A.order == "asc" ? "down" : "up"
658
629
  }, null, 8, ["direction"]), [
659
- [ae, D.active && D.column == "last_modified"]
630
+ [ue, A.active && A.column == "last_modified"]
660
631
  ])
661
632
  ])),
662
- $.value.length ? (n(), m("div", {
633
+ D.value.length ? (r(), v("div", {
663
634
  key: 2,
664
- onClick: S[3] || (S[3] = (h) => ee("path")),
635
+ onClick: b[3] || (b[3] = (_) => G("path")),
665
636
  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"
666
637
  }, [
667
- T(v(r(x)("Filepath")) + " ", 1),
668
- q(P(de, {
669
- direction: D.order == "asc" ? "down" : "up"
638
+ U(u(a(f)("Filepath")) + " ", 1),
639
+ R(P(me, {
640
+ direction: A.order == "asc" ? "down" : "up"
670
641
  }, null, 8, ["direction"]), [
671
- [ae, D.active && D.column == "path"]
642
+ [ue, A.active && A.column == "path"]
672
643
  ])
673
- ])) : F("", !0)
674
- ])) : F("", !0),
644
+ ])) : V("", !0)
645
+ ])) : V("", !0),
675
646
  e("div", Gt, [
676
647
  e("div", {
677
648
  ref_key: "dragImage",
678
- ref: f,
649
+ ref: p,
679
650
  class: "absolute -z-50 -top-96"
680
651
  }, [
681
652
  Yt,
682
- e("div", Jt, v(d.value), 1)
653
+ e("div", Jt, u(c.value), 1)
683
654
  ], 512)
684
655
  ]),
685
656
  e("div", {
686
657
  onTouchstart: j,
687
- onContextmenu: S[10] || (S[10] = K((h) => r(s).emit("vf-contextmenu-show", { event: h, area: u.value, items: X() }), ["self", "prevent"])),
688
- class: U([C.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
658
+ onContextmenu: b[10] || (b[10] = Z((_) => a(s).emit("vf-contextmenu-show", { event: _, area: h.value, items: te() }), ["self", "prevent"])),
659
+ class: T([w.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area vf-scrollbar min-h-[150px] overflow-auto p-1 z-0"]),
689
660
  ref_key: "selectorArea",
690
- ref: u
661
+ ref: h
691
662
  }, [
692
- $.value.length ? (n(!0), m(I, { key: 0 }, R(Z(), (h, B) => (n(), m("div", {
693
- onDblclick: (g) => V(h),
694
- onTouchstart: S[4] || (S[4] = (g) => L(g)),
695
- onTouchend: S[5] || (S[5] = (g) => M()),
696
- onContextmenu: K((g) => r(s).emit("vf-contextmenu-show", { event: g, area: u.value, items: X(), target: h }), ["prevent"]),
697
- class: U(["vf-item-" + r(w), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
698
- "data-type": h.type,
699
- "data-item": JSON.stringify(h),
700
- "data-index": B
663
+ D.value.length ? (r(!0), v(H, { key: 0 }, J(ee(), (_, x) => (r(), v("div", {
664
+ onDblclick: ($) => I(_),
665
+ onTouchstart: b[4] || (b[4] = ($) => z($)),
666
+ onTouchend: b[5] || (b[5] = ($) => F()),
667
+ onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]),
668
+ class: T(["vf-item-" + a(y), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
669
+ "data-type": _.type,
670
+ "data-item": JSON.stringify(_),
671
+ "data-index": x
701
672
  }, [
702
673
  e("div", Wt, [
703
674
  e("div", Xt, [
704
- h.type == "dir" ? (n(), m("svg", Qt, eo)) : (n(), m("svg", to, so)),
705
- e("span", ro, v(h.basename), 1)
675
+ _.type == "dir" ? (r(), v("svg", Qt, eo)) : (r(), v("svg", to, so)),
676
+ e("span", ao, u(_.basename), 1)
706
677
  ]),
707
- e("div", ao, v(h.path), 1)
678
+ e("div", no, u(_.path), 1)
708
679
  ])
709
- ], 42, Kt))), 256)) : F("", !0),
710
- i.view == "list" && !$.value.length ? (n(!0), m(I, { key: 1 }, R(Z(), (h, B) => (n(), m("div", {
680
+ ], 42, Kt))), 256)) : V("", !0),
681
+ l.view == "list" && !D.value.length ? (r(!0), v(H, { key: 1 }, J(ee(), (_, x) => (r(), v("div", {
711
682
  draggable: "true",
712
- onDblclick: (g) => V(h),
713
- onTouchstart: S[6] || (S[6] = (g) => L(g)),
714
- onTouchend: S[7] || (S[7] = (g) => M()),
715
- onContextmenu: K((g) => r(s).emit("vf-contextmenu-show", { event: g, area: u.value, items: X(), target: h }), ["prevent"]),
716
- onDragstart: (g) => ne(g),
717
- onDragover: (g) => ie(g, h),
718
- onDrop: (g) => le(g, h),
719
- class: U(["vf-item-" + r(w), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
720
- "data-type": h.type,
721
- "data-item": JSON.stringify(h),
722
- "data-index": B
683
+ onDblclick: ($) => I(_),
684
+ onTouchstart: b[6] || (b[6] = ($) => z($)),
685
+ onTouchend: b[7] || (b[7] = ($) => F()),
686
+ onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]),
687
+ onDragstart: ($) => ie($),
688
+ onDragover: ($) => ne($, _),
689
+ onDrop: ($) => de($, _),
690
+ class: T(["vf-item-" + a(y), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
691
+ "data-type": _.type,
692
+ "data-item": JSON.stringify(_),
693
+ "data-index": x
723
694
  }, [
724
695
  e("div", lo, [
725
696
  e("div", io, [
726
- h.type == "dir" ? (n(), m("svg", co, mo)) : (n(), m("svg", vo, fo)),
727
- e("span", go, v(h.basename), 1)
697
+ _.type == "dir" ? (r(), v("svg", co, mo)) : (r(), v("svg", vo, ho)),
698
+ e("span", fo, u(_.basename), 1)
728
699
  ]),
729
- e("div", ho, v(h.file_size ? r(ye)(h.file_size) : ""), 1),
730
- e("div", ko, v(r(De)(h.last_modified)), 1)
700
+ e("div", go, u(_.file_size ? a(B)(_.file_size) : ""), 1),
701
+ e("div", ko, u(a(Ee)(_.last_modified)), 1)
731
702
  ])
732
- ], 42, no))), 256)) : F("", !0),
733
- i.view == "grid" && !$.value.length ? (n(!0), m(I, { key: 2 }, R(Z(!1), (h, B) => (n(), m("div", {
703
+ ], 42, ro))), 256)) : V("", !0),
704
+ l.view == "grid" && !D.value.length ? (r(!0), v(H, { key: 2 }, J(ee(!1), (_, x) => (r(), v("div", {
734
705
  draggable: "true",
735
- onDblclick: (g) => V(h),
736
- onTouchstart: S[8] || (S[8] = (g) => L(g)),
737
- onTouchend: S[9] || (S[9] = (g) => M()),
738
- onContextmenu: K((g) => r(s).emit("vf-contextmenu-show", { event: g, area: u.value, items: X(), target: h }), ["prevent"]),
739
- onDragstart: (g) => ne(g),
740
- onDragover: (g) => ie(g, h),
741
- onDrop: (g) => le(g, h),
742
- class: U(["vf-item-" + r(w), "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"]),
743
- "data-type": h.type,
744
- "data-item": JSON.stringify(h),
745
- "data-index": B
706
+ onDblclick: ($) => I(_),
707
+ onTouchstart: b[8] || (b[8] = ($) => z($)),
708
+ onTouchend: b[9] || (b[9] = ($) => F()),
709
+ onContextmenu: Z(($) => a(s).emit("vf-contextmenu-show", { event: $, area: h.value, items: te(), target: _ }), ["prevent"]),
710
+ onDragstart: ($) => ie($),
711
+ onDragover: ($) => ne($, _),
712
+ onDrop: ($) => de($, _),
713
+ class: T(["vf-item-" + a(y), "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"]),
714
+ "data-type": _.type,
715
+ "data-item": JSON.stringify(_),
716
+ "data-index": x
746
717
  }, [
747
718
  e("div", null, [
748
- e("div", bo, [
749
- h.type == "dir" ? (n(), m("svg", wo, _o)) : (h.mime_type ?? "").startsWith("image") ? (n(), m("img", {
719
+ e("div", xo, [
720
+ _.type == "dir" ? (r(), v("svg", bo, yo)) : (_.mime_type ?? "").startsWith("image") ? (r(), v("img", {
750
721
  key: 1,
751
722
  class: "lazy h-10 md:h-12 m-auto",
752
- "data-src": r(be)(r(a).value, h.path),
753
- alt: h.basename
754
- }, null, 8, $o)) : (n(), m("svg", jo, Mo)),
755
- !(h.mime_type ?? "").startsWith("image") && h.type != "dir" ? (n(), m("div", So, v(c(h.extension)), 1)) : F("", !0)
723
+ "data-src": a(be)(a(m).value, _.path),
724
+ alt: _.basename
725
+ }, null, 8, $o)) : (r(), v("svg", Co, jo)),
726
+ !(_.mime_type ?? "").startsWith("image") && _.type != "dir" ? (r(), v("div", So, u(n(_.extension)), 1)) : V("", !0)
756
727
  ]),
757
- e("span", Do, v(r(we)(h.basename)), 1)
728
+ e("span", Do, u(a(we)(_.basename)), 1)
758
729
  ])
759
- ], 42, xo))), 256)) : F("", !0)
730
+ ], 42, _o))), 256)) : V("", !0)
760
731
  ], 34),
761
732
  P(It)
762
733
  ]));
763
734
  }
764
- }), Eo = "1.2.8", Fo = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Lo = { class: "flex leading-5 items-center" }, Vo = ["aria-label"], No = /* @__PURE__ */ e("svg", {
735
+ }), Eo = { 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" }, Vo = ["aria-label"], Bo = /* @__PURE__ */ e("svg", {
765
736
  xmlns: "http://www.w3.org/2000/svg",
766
737
  class: "h-5 w-5",
767
738
  fill: "none",
@@ -774,12 +745,12 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
774
745
  "stroke-linejoin": "round",
775
746
  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"
776
747
  })
777
- ], -1), Bo = [
778
- No
779
- ], Ao = ["value"], Ho = { class: "ml-3" }, To = { key: 0 }, Uo = { class: "ml-1" }, Io = { class: "flex leading-5 items-center justify-end" }, qo = {
748
+ ], -1), Ao = [
749
+ Bo
750
+ ], Lo = ["value"], No = { class: "ml-3" }, Uo = { key: 0 }, To = { class: "ml-1" }, Ho = { class: "flex leading-5 items-center justify-end" }, Io = {
780
751
  value: "",
781
752
  disabled: ""
782
- }, Ro = /* @__PURE__ */ Fe('<option value="en">English</option><option value="fr">French (Français)</option><option value="de">German (Deutsch)</option><option value="he">Hebrew (עִברִית)</option><option value="hi">Hindi (हिंदी)</option><option value="fa">Persian (فارسی)</option><option value="ru">Russian (Pусский)</option><option value="sv">Swedish (Svenska)</option><option value="tr">Turkish (Türkçe)</option><option value="zhCN">Simplified Chinese (简体中文)</option><option value="zhTW">Traditional Chinese (繁體中文)</option>', 11), Po = ["aria-label"], Go = /* @__PURE__ */ e("svg", {
753
+ }, qo = /* @__PURE__ */ Ae('<option value="en">English</option><option value="fr">French (Français)</option><option value="de">German (Deutsch)</option><option value="he">Hebrew (עִברִית)</option><option value="hi">Hindi (हिंदी)</option><option value="fa">Persian (فارسی)</option><option value="ru">Russian (Pусский)</option><option value="sv">Swedish (Svenska)</option><option value="tr">Turkish (Türkçe)</option><option value="zhCN">Simplified Chinese (简体中文)</option><option value="zhTW">Traditional Chinese (繁體中文)</option>', 11), Ro = ["aria-label"], Po = /* @__PURE__ */ e("svg", {
783
754
  xmlns: "http://www.w3.org/2000/svg",
784
755
  class: "h-5 w-5 stroke-slate-500 cursor-pointer",
785
756
  fill: "none",
@@ -792,128 +763,128 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
792
763
  "stroke-linejoin": "round",
793
764
  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"
794
765
  })
795
- ], -1), Yo = [
796
- Go
797
- ], Jo = {
766
+ ], -1), Go = [
767
+ Po
768
+ ], Yo = {
798
769
  name: "VFStatusbar"
799
- }, Ko = /* @__PURE__ */ Object.assign(Jo, {
770
+ }, Jo = /* @__PURE__ */ Object.assign(Yo, {
800
771
  props: {
801
772
  data: Object
802
773
  },
803
- setup(i) {
804
- const t = b("emitter"), { getStore: s, setStore: o } = b("storage"), p = k(0), a = b("adapter"), { t: c, changeLocale: u } = b("i18n"), f = k(s("locale", "")), d = () => {
805
- t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: a.value } }), o("adapter", a.value);
774
+ setup(l) {
775
+ const t = k("emitter"), { getStore: s, setStore: o } = k("storage"), i = g(0), m = k("adapter"), { t: n, changeLocale: h, locale: p } = k("i18n"), c = () => {
776
+ t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.value } }), o("adapter", m.value);
806
777
  };
807
- t.on("vf-nodes-selected", (x) => {
808
- p.value = x.length;
778
+ t.on("vf-nodes-selected", (f) => {
779
+ i.value = f.length;
809
780
  });
810
- const l = k("");
811
- return t.on("vf-search-query", ({ newQuery: x }) => {
812
- l.value = x;
813
- }), (x, w) => (n(), m("div", Fo, [
814
- e("div", Lo, [
781
+ const d = g("");
782
+ return t.on("vf-search-query", ({ newQuery: f }) => {
783
+ d.value = f;
784
+ }), (f, y) => (r(), v("div", Eo, [
785
+ e("div", Fo, [
815
786
  e("div", {
816
787
  class: "mx-2",
817
- "aria-label": r(c)("Storage"),
788
+ "aria-label": a(n)("Storage"),
818
789
  "data-microtip-position": "top-right",
819
790
  role: "tooltip"
820
- }, Bo, 8, Vo),
821
- q(e("select", {
822
- "onUpdate:modelValue": w[0] || (w[0] = (C) => Me(a) ? a.value = C : null),
823
- onChange: d,
791
+ }, Ao, 8, Vo),
792
+ R(e("select", {
793
+ "onUpdate:modelValue": y[0] || (y[0] = (w) => re(m) ? m.value = w : null),
794
+ onChange: c,
824
795
  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"
825
796
  }, [
826
- (n(!0), m(I, null, R(i.data.storages, (C) => (n(), m("option", { value: C }, v(C), 9, Ao))), 256))
797
+ (r(!0), v(H, null, J(l.data.storages, (w) => (r(), v("option", { value: w }, u(w), 9, Lo))), 256))
827
798
  ], 544), [
828
- [_e, r(a)]
799
+ [ye, a(m)]
829
800
  ]),
830
- e("div", Ho, [
831
- l.value.length ? (n(), m("span", To, v(i.data.files.length) + " items found. ", 1)) : F("", !0),
832
- e("span", Uo, v(p.value > 0 ? p.value + " " + r(c)("item(s) selected.") : ""), 1)
801
+ e("div", No, [
802
+ d.value.length ? (r(), v("span", Uo, u(l.data.files.length) + " items found. ", 1)) : V("", !0),
803
+ e("span", To, u(i.value > 0 ? i.value + " " + a(n)("item(s) selected.") : ""), 1)
833
804
  ])
834
805
  ]),
835
- e("div", Io, [
836
- q(e("select", {
837
- "onUpdate:modelValue": w[1] || (w[1] = (C) => f.value = C),
838
- onChange: w[2] || (w[2] = (C) => r(u)(C.target.value)),
806
+ e("div", Ho, [
807
+ R(e("select", {
808
+ "onUpdate:modelValue": y[1] || (y[1] = (w) => re(p) ? p.value = w : null),
809
+ onChange: y[2] || (y[2] = (w) => a(h)(w.target.value)),
839
810
  class: "w-[120px] delay-200 duration-300 hover:w-full transition-[width] 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 mr-3"
840
811
  }, [
841
- e("option", qo, v(r(c)("Language")), 1),
842
- Ro
812
+ e("option", Io, u(a(n)("Language")), 1),
813
+ qo
843
814
  ], 544), [
844
- [_e, f.value]
815
+ [ye, a(p)]
845
816
  ]),
846
817
  e("span", {
847
818
  class: "mr-1",
848
- "aria-label": r(c)("About"),
819
+ "aria-label": a(n)("About"),
849
820
  "data-microtip-position": "top-left",
850
821
  role: "tooltip",
851
- onClick: w[3] || (w[3] = (C) => r(t).emit("vf-modal-show", { type: "message", title: "Vuefinder " + r(Eo), message: r(c)("Vuefinder is a file manager component for vue 3.") }))
852
- }, Yo, 8, Po)
822
+ onClick: y[3] || (y[3] = (w) => a(t).emit("vf-modal-show", { type: "about" }))
823
+ }, Go, 8, Ro)
853
824
  ])
854
825
  ]));
855
826
  }
856
- }), Wo = (i, t = 0, s = !1) => {
827
+ }), Ko = (l, t = 0, s = !1) => {
857
828
  let o;
858
- return (...p) => {
859
- s && !o && i(...p), clearTimeout(o), o = setTimeout(() => {
860
- i(...p);
829
+ return (...i) => {
830
+ s && !o && l(...i), clearTimeout(o), o = setTimeout(() => {
831
+ l(...i);
861
832
  }, t);
862
833
  };
863
- }, Xo = (i, t, s) => {
864
- const o = k(i);
865
- return Le((a, c) => ({
834
+ }, Wo = (l, t, s) => {
835
+ const o = g(l);
836
+ return Le((m, n) => ({
866
837
  get() {
867
- return a(), o.value;
838
+ return m(), o.value;
868
839
  },
869
- set: Wo(
870
- (u) => {
871
- o.value = u, c();
840
+ set: Ko(
841
+ (h) => {
842
+ o.value = h, n();
872
843
  },
873
844
  t,
874
845
  s
875
846
  )
876
847
  }));
877
- }, Qo = { 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-xs" }, Zo = ["aria-label"], es = /* @__PURE__ */ e("path", {
848
+ }, Xo = { 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-xs" }, Qo = ["aria-label"], Zo = /* @__PURE__ */ e("path", {
878
849
  "fill-rule": "evenodd",
879
850
  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",
880
851
  "clip-rule": "evenodd"
881
- }, null, -1), ts = [
882
- es
883
- ], os = ["aria-label"], ss = /* @__PURE__ */ e("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), rs = [
884
- ss
852
+ }, null, -1), es = [
853
+ Zo
854
+ ], ts = ["aria-label"], os = /* @__PURE__ */ e("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), ss = [
855
+ os
885
856
  ], as = ["aria-label"], ns = /* @__PURE__ */ e("path", {
886
857
  "stroke-linecap": "round",
887
858
  "stroke-linejoin": "round",
888
859
  d: "M6 18L18 6M6 6l12 12"
889
- }, null, -1), ls = [
860
+ }, null, -1), rs = [
890
861
  ns
891
- ], is = /* @__PURE__ */ e("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), ds = [
892
- is
893
- ], cs = { class: "flex leading-5" }, us = /* @__PURE__ */ e("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), ms = ["title", "onClick"], vs = {
862
+ ], ls = /* @__PURE__ */ e("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), is = [
863
+ ls
864
+ ], ds = { class: "flex leading-5" }, cs = /* @__PURE__ */ e("span", { class: "text-neutral-300 dark:text-gray-600 mx-0.5" }, "/", -1), us = ["title", "onClick"], ms = {
894
865
  key: 0,
895
866
  class: "animate-spin p-1 h-6 w-6 text-white ml-auto",
896
867
  xmlns: "http://www.w3.org/2000/svg",
897
868
  fill: "none",
898
869
  viewBox: "0 0 24 24"
899
- }, ps = /* @__PURE__ */ e("circle", {
870
+ }, vs = /* @__PURE__ */ e("circle", {
900
871
  class: "opacity-25 stroke-blue-900 dark:stroke-blue-100",
901
872
  cx: "12",
902
873
  cy: "12",
903
874
  r: "10",
904
875
  stroke: "currentColor",
905
876
  "stroke-width": "4"
906
- }, null, -1), fs = /* @__PURE__ */ e("path", {
877
+ }, null, -1), ps = /* @__PURE__ */ e("path", {
907
878
  class: "opacity-75",
908
879
  fill: "currentColor",
909
880
  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"
910
- }, null, -1), gs = [
911
- ps,
912
- fs
913
- ], hs = {
881
+ }, null, -1), hs = [
882
+ vs,
883
+ ps
884
+ ], fs = {
914
885
  key: 3,
915
886
  class: "relative flex bg-white dark:bg-gray-700 justify-between items-center rounded p-1 ml-2 w-full"
916
- }, ks = /* @__PURE__ */ e("div", null, [
887
+ }, gs = /* @__PURE__ */ e("div", null, [
917
888
  /* @__PURE__ */ e("svg", {
918
889
  class: "h-6 w-6 p-1 m-auto stroke-gray-400 fill-gray-100 dark:stroke-gray-400 dark:fill-gray-400/20",
919
890
  xmlns: "http://www.w3.org/2000/svg",
@@ -926,316 +897,324 @@ const Rt = { class: "relative flex-auto flex flex-col overflow-hidden" }, Pt = {
926
897
  d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
927
898
  })
928
899
  ])
929
- ], -1), xs = ["placeholder"], bs = /* @__PURE__ */ e("path", {
900
+ ], -1), ks = ["placeholder"], _s = /* @__PURE__ */ e("path", {
930
901
  "stroke-linecap": "round",
931
902
  "stroke-linejoin": "round",
932
903
  d: "M6 18L18 6M6 6l12 12"
933
- }, null, -1), ws = [
934
- bs
935
- ], ys = {
904
+ }, null, -1), xs = [
905
+ _s
906
+ ], bs = {
936
907
  name: "VFBreadcrumb"
937
- }, _s = /* @__PURE__ */ Object.assign(ys, {
908
+ }, ws = /* @__PURE__ */ Object.assign(bs, {
938
909
  props: {
939
910
  data: Object
940
911
  },
941
- setup(i) {
942
- const t = b("emitter");
943
- b("storage");
944
- const s = b("adapter"), o = k(null), p = k([]), a = k(!1), c = k(null), u = i, { t: f } = b("i18n"), d = b("loadingState");
912
+ setup(l) {
913
+ const t = k("emitter");
914
+ k("storage");
915
+ const s = k("adapter"), o = g(null), i = g([]), m = g(!1), n = g(null), h = l, { t: p } = k("i18n"), c = k("loadingState");
945
916
  t.on("vf-explorer-update", () => {
946
- let O = [], j = [];
947
- o.value = u.data.dirname ?? s.value + "://", o.value.length == 0 && (p.value = []), o.value.replace(s.value + "://", "").split("/").forEach(function(L) {
948
- O.push(L), O.join("/") != "" && j.push({
949
- basename: L,
950
- name: L,
951
- path: s.value + "://" + O.join("/"),
917
+ let F = [], M = [];
918
+ o.value = h.data.dirname ?? s.value + "://", o.value.length == 0 && (i.value = []), o.value.replace(s.value + "://", "").split("/").forEach(function(j) {
919
+ F.push(j), F.join("/") != "" && M.push({
920
+ basename: j,
921
+ name: j,
922
+ path: s.value + "://" + F.join("/"),
952
923
  type: "dir"
953
924
  });
954
- }), j.length > 4 && (j = j.slice(-5), j[0].name = ".."), p.value = j;
925
+ }), M.length > 4 && (M = M.slice(-5), M[0].name = ".."), i.value = M;
955
926
  });
956
- const l = () => {
957
- a.value = !1, w.value = "";
927
+ const d = () => {
928
+ m.value = !1, y.value = "";
958
929
  };
959
930
  t.on("vf-search-exit", () => {
960
- l();
931
+ d();
961
932
  });
962
- const x = () => {
963
- a.value = !0, pe(() => c.value.focus());
964
- }, w = Xo("", 400), C = () => d.value;
965
- ve(w, (O) => {
966
- t.emit("vf-toast-clear"), t.emit("vf-search-query", { newQuery: O });
933
+ const f = () => {
934
+ m.value = !0, ge(() => n.value.focus());
935
+ }, y = Wo("", 400), w = () => c.value;
936
+ le(y, (F) => {
937
+ t.emit("vf-toast-clear"), t.emit("vf-search-query", { newQuery: F });
967
938
  });
968
- const y = () => p.value.length && !a.value, $ = (O) => {
969
- O.preventDefault();
970
- let j = JSON.parse(O.dataTransfer.getData("items"));
971
- if (j.find((L) => L.storage != s.value)) {
939
+ const B = () => i.value.length && !m.value, O = (F) => {
940
+ F.preventDefault();
941
+ let M = JSON.parse(F.dataTransfer.getData("items"));
942
+ if (M.find((j) => j.storage != s.value)) {
972
943
  alert("Moving items between different storages is not supported yet.");
973
944
  return;
974
945
  }
975
946
  t.emit("vf-modal-show", {
976
947
  type: "move",
977
- items: { from: j, to: p.value[p.value.length - 2] ?? { path: s.value + "://" } }
948
+ items: { from: M, to: i.value[i.value.length - 2] ?? { path: s.value + "://" } }
978
949
  });
979
- }, z = (O) => {
980
- O.preventDefault(), y() ? O.dataTransfer.dropEffect = "copy" : (O.dataTransfer.dropEffect = "none", O.dataTransfer.effectAllowed = "none");
981
- }, M = () => {
982
- w.value == "" && l();
950
+ }, D = (F) => {
951
+ F.preventDefault(), B() ? F.dataTransfer.dropEffect = "copy" : (F.dataTransfer.dropEffect = "none", F.dataTransfer.effectAllowed = "none");
952
+ }, S = () => {
953
+ y.value == "" && d();
983
954
  };
984
- return (O, j) => (n(), m("div", Qo, [
955
+ return (F, M) => (r(), v("div", Xo, [
985
956
  e("span", {
986
- "aria-label": r(f)("Go up a directory"),
957
+ "aria-label": a(p)("Go up a directory"),
987
958
  "data-microtip-position": "bottom-right",
988
959
  role: "tooltip"
989
960
  }, [
990
- (n(), m("svg", {
991
- onDragover: j[0] || (j[0] = (L) => z(L)),
992
- onDrop: j[1] || (j[1] = (L) => $(L)),
993
- onClick: j[2] || (j[2] = (L) => {
994
- var V;
995
- return !y() || r(t).emit("vf-fetch", { params: { q: "index", adapter: i.data.adapter, path: ((V = p.value[p.value.length - 2]) == null ? void 0 : V.path) ?? r(s) + "://" } });
961
+ (r(), v("svg", {
962
+ onDragover: M[0] || (M[0] = (j) => D(j)),
963
+ onDrop: M[1] || (M[1] = (j) => O(j)),
964
+ onClick: M[2] || (M[2] = (j) => {
965
+ var z;
966
+ return !B() || a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: ((z = i.value[i.value.length - 2]) == null ? void 0 : z.path) ?? a(s) + "://" } });
996
967
  }),
997
- class: U(["h-6 w-6 p-0.5 rounded", y() ? "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"]),
968
+ class: T(["h-6 w-6 p-0.5 rounded", B() ? "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"]),
998
969
  xmlns: "http://www.w3.org/2000/svg",
999
970
  viewBox: "0 0 20 20",
1000
971
  fill: "currentColor"
1001
- }, ts, 34))
1002
- ], 8, Zo),
1003
- C() ? (n(), m("span", {
972
+ }, es, 34))
973
+ ], 8, Qo),
974
+ w() ? (r(), v("span", {
1004
975
  key: 1,
1005
- "aria-label": r(f)("Cancel"),
976
+ "aria-label": a(p)("Cancel"),
1006
977
  "data-microtip-position": "bottom-right",
1007
978
  role: "tooltip"
1008
979
  }, [
1009
- (n(), m("svg", {
1010
- onClick: j[4] || (j[4] = (L) => r(t).emit("vf-fetch-abort")),
980
+ (r(), v("svg", {
981
+ onClick: M[4] || (M[4] = (j) => a(t).emit("vf-fetch-abort")),
1011
982
  xmlns: "http://www.w3.org/2000/svg",
1012
983
  fill: "none",
1013
984
  viewBox: "0 0 24 24",
1014
985
  "stroke-width": "1.5",
1015
986
  stroke: "currentColor",
1016
987
  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"
1017
- }, ls))
1018
- ], 8, as)) : (n(), m("span", {
988
+ }, rs))
989
+ ], 8, as)) : (r(), v("span", {
1019
990
  key: 0,
1020
- "aria-label": r(f)("Refresh"),
991
+ "aria-label": a(p)("Refresh"),
1021
992
  "data-microtip-position": "bottom-right",
1022
993
  role: "tooltip"
1023
994
  }, [
1024
- (n(), m("svg", {
1025
- onClick: j[3] || (j[3] = (L) => {
1026
- r(t).emit("vf-fetch", { params: { q: "index", adapter: i.data.adapter, path: i.data.dirname } });
995
+ (r(), v("svg", {
996
+ onClick: M[3] || (M[3] = (j) => {
997
+ a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: l.data.dirname } });
1027
998
  }),
1028
999
  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",
1029
1000
  xmlns: "http://www.w3.org/2000/svg",
1030
1001
  viewBox: "-40 -40 580 580",
1031
1002
  fill: "currentColor"
1032
- }, rs))
1033
- ], 8, os)),
1034
- a.value ? (n(), m("div", hs, [
1035
- ks,
1036
- q(e("input", {
1003
+ }, ss))
1004
+ ], 8, ts)),
1005
+ m.value ? (r(), v("div", fs, [
1006
+ gs,
1007
+ R(e("input", {
1037
1008
  ref_key: "searchInput",
1038
- ref: c,
1039
- onKeydown: se(l, ["esc"]),
1040
- onBlur: M,
1041
- "onUpdate:modelValue": j[6] || (j[6] = (L) => Me(w) ? w.value = L : null),
1042
- placeholder: r(f)("Search anything.."),
1009
+ ref: n,
1010
+ onKeydown: se(d, ["esc"]),
1011
+ onBlur: S,
1012
+ "onUpdate:modelValue": M[6] || (M[6] = (j) => re(y) ? y.value = j : null),
1013
+ placeholder: a(p)("Search anything.."),
1043
1014
  class: "w-full pt-1 pb-0 px-2 border-0 text-sm 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",
1044
1015
  type: "text"
1045
- }, null, 40, xs), [
1046
- [re, r(w)]
1016
+ }, null, 40, ks), [
1017
+ [ae, a(y)]
1047
1018
  ]),
1048
- (n(), m("svg", {
1019
+ (r(), v("svg", {
1049
1020
  class: "w-6 h-6 cursor-pointer",
1050
- onClick: l,
1021
+ onClick: d,
1051
1022
  xmlns: "http://www.w3.org/2000/svg",
1052
1023
  fill: "none",
1053
1024
  viewBox: "0 0 24 24",
1054
1025
  "stroke-width": "1.5",
1055
1026
  stroke: "currentColor"
1056
- }, ws))
1057
- ])) : (n(), m("div", {
1027
+ }, xs))
1028
+ ])) : (r(), v("div", {
1058
1029
  key: 2,
1059
1030
  class: "group flex bg-white dark:bg-gray-700 items-center rounded p-1 ml-2 w-full",
1060
- onClick: K(x, ["self"])
1031
+ onClick: Z(f, ["self"])
1061
1032
  }, [
1062
- (n(), m("svg", {
1063
- onClick: j[5] || (j[5] = (L) => r(t).emit("vf-fetch", { params: { q: "index", adapter: i.data.adapter } })),
1033
+ (r(), v("svg", {
1034
+ onClick: M[5] || (M[5] = (j) => a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter } })),
1064
1035
  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",
1065
1036
  xmlns: "http://www.w3.org/2000/svg",
1066
1037
  viewBox: "0 0 20 20",
1067
1038
  fill: "currentColor"
1068
- }, ds)),
1069
- e("div", cs, [
1070
- (n(!0), m(I, null, R(p.value, (L, V) => (n(), m("div", { key: V }, [
1071
- us,
1039
+ }, is)),
1040
+ e("div", ds, [
1041
+ (r(!0), v(H, null, J(i.value, (j, z) => (r(), v("div", { key: z }, [
1042
+ cs,
1072
1043
  e("span", {
1073
1044
  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",
1074
- title: L.basename,
1075
- onClick: (D) => r(t).emit("vf-fetch", { params: { q: "index", adapter: i.data.adapter, path: L.path } })
1076
- }, v(L.name), 9, ms)
1045
+ title: j.basename,
1046
+ onClick: (I) => a(t).emit("vf-fetch", { params: { q: "index", adapter: l.data.adapter, path: j.path } })
1047
+ }, u(j.name), 9, us)
1077
1048
  ]))), 128))
1078
1049
  ]),
1079
- C() ? (n(), m("svg", vs, gs)) : F("", !0)
1050
+ w() ? (r(), v("svg", ms, hs)) : V("", !0)
1080
1051
  ]))
1081
1052
  ]));
1082
1053
  }
1083
- }), $s = ["onClick"], js = /* @__PURE__ */ e("span", { class: "px-1" }, null, -1), Cs = {
1054
+ }), ys = ["onClick"], $s = /* @__PURE__ */ e("span", { class: "px-1" }, null, -1), Cs = {
1084
1055
  name: "VFContextMenu"
1085
1056
  }, Ms = /* @__PURE__ */ Object.assign(Cs, {
1086
1057
  props: {
1087
1058
  current: Object
1088
1059
  },
1089
- setup(i) {
1090
- const t = b("emitter"), s = k(null), { apiUrl: o } = Y(), p = i, a = ce({
1060
+ setup(l) {
1061
+ const t = k("emitter"), s = g(null), { apiUrl: o } = X(), i = k("root"), m = l, n = ve({
1091
1062
  active: !1,
1092
1063
  items: [],
1093
1064
  positions: {
1094
1065
  left: 0,
1095
1066
  top: 0
1096
1067
  }
1097
- }), c = k([]);
1068
+ }), h = g([]);
1098
1069
  t.on("vf-context-selected", (w) => {
1099
- c.value = w;
1070
+ h.value = w;
1100
1071
  });
1101
- const { t: u } = b("i18n"), f = {
1072
+ const { t: p } = k("i18n"), c = {
1102
1073
  newfolder: {
1103
- title: () => u("New Folder"),
1074
+ title: () => p("New Folder"),
1104
1075
  action: () => {
1105
1076
  t.emit("vf-modal-show", { type: "new-folder" });
1106
1077
  }
1107
1078
  },
1108
1079
  delete: {
1109
- title: () => u("Delete"),
1080
+ title: () => p("Delete"),
1110
1081
  action: () => {
1111
- t.emit("vf-modal-show", { type: "delete", items: c });
1082
+ t.emit("vf-modal-show", { type: "delete", items: h });
1112
1083
  }
1113
1084
  },
1114
1085
  refresh: {
1115
- title: () => u("Refresh"),
1086
+ title: () => p("Refresh"),
1116
1087
  action: () => {
1117
- t.emit("vf-fetch", { params: { q: "index", adapter: p.current.adapter, path: p.current.dirname } });
1088
+ t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: m.current.dirname } });
1118
1089
  }
1119
1090
  },
1120
1091
  preview: {
1121
- title: () => u("Preview"),
1092
+ title: () => p("Preview"),
1122
1093
  action: () => {
1123
- t.emit("vf-modal-show", { type: "preview", adapter: p.current.adapter, item: c.value[0] });
1094
+ t.emit("vf-modal-show", { type: "preview", adapter: m.current.adapter, item: h.value[0] });
1124
1095
  }
1125
1096
  },
1126
1097
  open: {
1127
- title: () => u("Open"),
1098
+ title: () => p("Open"),
1128
1099
  action: () => {
1129
- t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: p.current.adapter, path: c.value[0].path } });
1100
+ t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: h.value[0].path } });
1130
1101
  }
1131
1102
  },
1132
1103
  openDir: {
1133
- title: () => u("Open containing folder"),
1104
+ title: () => p("Open containing folder"),
1134
1105
  action: () => {
1135
- t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: p.current.adapter, path: c.value[0].dir } });
1106
+ t.emit("vf-search-exit"), t.emit("vf-fetch", { params: { q: "index", adapter: m.current.adapter, path: h.value[0].dir } });
1136
1107
  }
1137
1108
  },
1138
1109
  download: {
1139
- title: () => u("Download"),
1110
+ title: () => p("Download"),
1140
1111
  action: () => {
1141
- const w = o.value + "?" + oe({ q: "download", adapter: p.current.adapter, path: c.value[0].path });
1112
+ const w = o.value + "?" + oe({ q: "download", adapter: m.current.adapter, path: h.value[0].path });
1142
1113
  t.emit("vf-download", w);
1143
1114
  }
1144
1115
  },
1145
1116
  archive: {
1146
- title: () => u("Archive"),
1117
+ title: () => p("Archive"),
1147
1118
  action: () => {
1148
- t.emit("vf-modal-show", { type: "archive", items: c });
1119
+ t.emit("vf-modal-show", { type: "archive", items: h });
1149
1120
  }
1150
1121
  },
1151
1122
  unarchive: {
1152
- title: () => u("Unarchive"),
1123
+ title: () => p("Unarchive"),
1153
1124
  action: () => {
1154
- t.emit("vf-modal-show", { type: "unarchive", items: c });
1125
+ t.emit("vf-modal-show", { type: "unarchive", items: h });
1155
1126
  }
1156
1127
  },
1157
1128
  rename: {
1158
- title: () => u("Rename"),
1129
+ title: () => p("Rename"),
1159
1130
  action: () => {
1160
- t.emit("vf-modal-show", { type: "rename", items: c });
1131
+ t.emit("vf-modal-show", { type: "rename", items: h });
1161
1132
  }
1162
1133
  }
1163
1134
  }, d = (w) => {
1164
1135
  t.emit("vf-contextmenu-hide"), w.action();
1165
- }, l = k("");
1136
+ }, f = g("");
1166
1137
  t.on("vf-search-query", ({ newQuery: w }) => {
1167
- l.value = w;
1168
- }), t.on("vf-contextmenu-show", ({ event: w, area: C, items: y, target: $ = null }) => {
1169
- if (a.items = [], l.value)
1170
- if ($)
1171
- a.items.push(f.openDir), t.emit("vf-context-selected", [$]);
1138
+ f.value = w;
1139
+ }), t.on("vf-contextmenu-show", ({ event: w, area: B, items: O, target: D = null }) => {
1140
+ if (n.items = [], f.value)
1141
+ if (D)
1142
+ n.items.push(c.openDir), t.emit("vf-context-selected", [D]);
1172
1143
  else
1173
1144
  return;
1174
1145
  else
1175
- !$ && !l.value ? (a.items.push(f.refresh), a.items.push(f.newfolder), t.emit("vf-context-selected", [])) : y.length > 1 && y.some((z) => z.path === $.path) ? (a.items.push(f.refresh), a.items.push(f.archive), a.items.push(f.delete), t.emit("vf-context-selected", y)) : ($.type == "dir" ? a.items.push(f.open) : (a.items.push(f.preview), a.items.push(f.download)), a.items.push(f.rename), $.mime_type == "application/zip" ? a.items.push(f.unarchive) : a.items.push(f.archive), a.items.push(f.delete), t.emit("vf-context-selected", [$]));
1176
- x(w, C);
1146
+ !D && !f.value ? (n.items.push(c.refresh), n.items.push(c.newfolder), t.emit("vf-context-selected", [])) : O.length > 1 && O.some((S) => S.path === D.path) ? (n.items.push(c.refresh), n.items.push(c.archive), n.items.push(c.delete), t.emit("vf-context-selected", O)) : (D.type == "dir" ? n.items.push(c.open) : (n.items.push(c.preview), n.items.push(c.download)), n.items.push(c.rename), D.mime_type == "application/zip" ? n.items.push(c.unarchive) : n.items.push(c.archive), n.items.push(c.delete), t.emit("vf-context-selected", [D]));
1147
+ y(w, B);
1177
1148
  }), t.on("vf-contextmenu-hide", () => {
1178
- a.active = !1;
1149
+ n.active = !1;
1179
1150
  });
1180
- const x = (w, C) => {
1181
- a.active = !0, pe(() => {
1182
- let y = C.getBoundingClientRect(), $ = w.pageX, z = w.pageY, M = s.value.offsetHeight, O = s.value.offsetWidth;
1183
- $ = y.right - w.pageX + window.scrollX < O ? $ - O : $, z = y.bottom - w.pageY + window.scrollY < M ? z - M : z, a.positions = {
1184
- left: $ + "px",
1185
- top: z + "px"
1151
+ const y = (w, B) => {
1152
+ n.active = !0, ge(() => {
1153
+ const O = i.value.getBoundingClientRect(), D = B.getBoundingClientRect();
1154
+ let S = w.pageX - O.left, F = w.pageY - O.top, M = s.value.offsetHeight, j = s.value.offsetWidth;
1155
+ S = D.right - w.pageX + window.scrollX < j ? S - j : S, F = D.bottom - w.pageY + window.scrollY < M ? F - M : F, n.positions = {
1156
+ left: S + "px",
1157
+ top: F + "px"
1186
1158
  };
1187
1159
  });
1188
1160
  };
1189
- return (w, C) => a.active ? (n(), m("ul", {
1161
+ return (w, B) => n.active ? (r(), v("ul", {
1190
1162
  key: 0,
1191
1163
  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",
1192
1164
  ref_key: "contextmenu",
1193
1165
  ref: s,
1194
- style: Se(a.positions)
1166
+ style: ze(n.positions)
1195
1167
  }, [
1196
- (n(!0), m(I, null, R(a.items, (y) => (n(), m("li", {
1168
+ (r(!0), v(H, null, J(n.items, (O) => (r(), v("li", {
1197
1169
  class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
1198
- key: y.title,
1199
- onClick: ($) => d(y)
1170
+ key: O.title,
1171
+ onClick: (D) => d(O)
1200
1172
  }, [
1201
- js,
1202
- e("span", null, v(y.title()), 1)
1203
- ], 8, $s))), 128))
1204
- ], 4)) : F("", !0);
1173
+ $s,
1174
+ e("span", null, u(O.title()), 1)
1175
+ ], 8, ys))), 128))
1176
+ ], 4)) : V("", !0);
1205
1177
  }
1206
- }), Ss = (i, t) => {
1207
- const s = i[t];
1208
- return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, p) => {
1209
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(p.bind(null, new Error("Unknown variable dynamic import: " + t)));
1178
+ }), js = (l, t) => {
1179
+ const s = l[t];
1180
+ return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, i) => {
1181
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(i.bind(null, new Error("Unknown variable dynamic import: " + t)));
1210
1182
  });
1211
1183
  };
1212
- async function Ds(i) {
1213
- return (await Ss(/* @__PURE__ */ Object.assign({ "../locales/de.js": () => import("./de-bb2cbcd2.js"), "../locales/en.js": () => import("./en-36ebc9b3.js"), "../locales/fa.js": () => import("./fa-38a6b855.js"), "../locales/he.js": () => import("./he-ed562a13.js"), "../locales/hi.js": () => import("./hi-6bb62179.js"), "../locales/ru.js": () => import("./ru-02b5dcbe.js"), "../locales/sv.js": () => import("./sv-0c0f15f4.js"), "../locales/tr.js": () => import("./tr-410a966d.js"), "../locales/zhCN.js": () => import("./zhCN-f37edc4d.js"), "../locales/zhTW.js": () => import("./zhTW-0fd6dd31.js") }), `../locales/${i}.js`)).default;
1184
+ async function Ss(l) {
1185
+ return (await js(/* @__PURE__ */ Object.assign({ "../locales/de.js": () => import("./de-3f6147f5.js"), "../locales/en.js": () => import("./en-ffed8966.js"), "../locales/fa.js": () => import("./fa-7534f880.js"), "../locales/he.js": () => import("./he-1978fb6e.js"), "../locales/hi.js": () => import("./hi-ffd5a2ba.js"), "../locales/ru.js": () => import("./ru-9f317caf.js"), "../locales/sv.js": () => import("./sv-07e3c393.js"), "../locales/tr.js": () => import("./tr-ce32e2ae.js"), "../locales/zhCN.js": () => import("./zhCN-9b524820.js"), "../locales/zhTW.js": () => import("./zhTW-a803434e.js") }), `../locales/${l}.js`)).default;
1214
1186
  }
1215
- function Os(i, t, s) {
1216
- const { getStore: o, setStore: p } = xe(i), a = k({}), c = (l, x = "en") => {
1217
- Ds(l).then((w) => {
1218
- a.value = w, p("locale", l), p("translations", w), s.emit("vf-toast-push", { label: "The language is set to " + l });
1219
- }).catch((w) => {
1220
- x ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), c(x, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
1187
+ function Ds(l, t, s) {
1188
+ const { getStore: o, setStore: i } = xe(l), m = g({}), n = g(o("locale", t)), h = (d, f = "en") => {
1189
+ Ss(d).then((y) => {
1190
+ m.value = y, i("locale", d), n.value = d, i("translations", y), s.emit("vf-toast-push", { label: "The language is set to " + d });
1191
+ }).catch((y) => {
1192
+ f ? (s.emit("vf-toast-push", { label: "The selected locale is not yet supported!", type: "error" }), h(f, null)) : s.emit("vf-toast-push", { label: "Locale cannot be loaded!", type: "error" });
1221
1193
  });
1222
1194
  };
1223
- o("locale") ? a.value = o("translations") : c(t);
1224
- const u = (l, ...x) => x.length ? u(l = l.replace("%s", x.shift()), ...x) : l;
1225
- function f(l, ...x) {
1226
- return a.value.hasOwnProperty(l) ? u(a.value[l], ...x) : u(l, ...x);
1195
+ o("locale") ? m.value = o("translations") : h(t);
1196
+ const p = (d, ...f) => f.length ? p(d = d.replace("%s", f.shift()), ...f) : d;
1197
+ function c(d, ...f) {
1198
+ return m.value.hasOwnProperty(d) ? p(m.value[d], ...f) : p(d, ...f);
1227
1199
  }
1228
- function d() {
1229
- return o("locale");
1230
- }
1231
- return { t: f, changeLocale: c, getLocale: d };
1200
+ return { t: c, changeLocale: h, locale: n };
1201
+ }
1202
+ function Me(l, t, s, o, i) {
1203
+ return (t = Math, s = t.log, o = 1024, i = s(l) / s(o) | 0, l / t.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "iB" : "B");
1204
+ }
1205
+ function je(l, t, s, o, i) {
1206
+ return (t = Math, s = t.log, o = 1e3, i = s(l) / s(o) | 0, l / t.pow(o, i)).toFixed(0) + " " + (i ? "KMGTPEZY"[--i] + "B" : "B");
1207
+ }
1208
+ function Os(l) {
1209
+ const t = { k: 1, m: 2, g: 3, t: 4 }, o = /(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(l);
1210
+ return o[1] * Math.pow(1024, t[o[2].toLowerCase()]);
1232
1211
  }
1233
- const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1212
+ const zs = /* @__PURE__ */ e("iframe", {
1234
1213
  id: "download_frame",
1235
1214
  style: { display: "none" }
1236
- }, null, -1), Fs = {
1215
+ }, null, -1), Es = {
1237
1216
  name: "VueFinder"
1238
- }, Ls = /* @__PURE__ */ Object.assign(Fs, {
1217
+ }, Fs = /* @__PURE__ */ Object.assign(Es, {
1239
1218
  props: {
1240
1219
  url: {
1241
1220
  type: [String]
@@ -1269,116 +1248,128 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1269
1248
  default: {}
1270
1249
  }
1271
1250
  },
1272
- setup(i) {
1273
- const t = i, s = Be(), { setStore: o, getStore: p } = xe(t.id), a = k(p("adapter"));
1274
- Q("emitter", s), Q("storage", xe(t.id)), Q("postData", t.postData), Q("adapter", a), Q("maxFileSize", t.maxFileSize), Q("usePropDarkMode", t.usePropDarkMode);
1275
- const c = Os(t.id, t.locale, s);
1276
- Q("i18n", c);
1277
- const { apiUrl: u, setApiUrl: f } = Y();
1278
- f(t.url);
1279
- const d = ce({ adapter: a.value, storages: [], dirname: ".", files: [] }), l = k(p("viewport", "grid")), x = t.usePropDarkMode ? Ve(() => t.dark) : k(p("darkMode", t.dark));
1280
- s.on("vf-darkMode-toggle", () => {
1281
- x.value = !x.value, o("darkMode", x.value);
1251
+ setup(l) {
1252
+ const t = l, s = He(), { setStore: o, getStore: i } = xe(t.id), m = g(i("adapter")), n = g(null);
1253
+ Y("root", n), Y("emitter", s), Y("storage", xe(t.id)), Y("postData", t.postData), Y("adapter", m), Y("maxFileSize", t.maxFileSize), Y("usePropDarkMode", t.usePropDarkMode);
1254
+ const h = Ds(t.id, t.locale, s);
1255
+ Y("i18n", h);
1256
+ const { apiUrl: p, setApiUrl: c } = X();
1257
+ c(t.url);
1258
+ const d = ve({ adapter: m.value, storages: [], dirname: ".", files: [] }), f = g(i("viewport", "grid")), y = t.usePropDarkMode ? Ne(() => t.dark) : g(i("darkMode", t.dark));
1259
+ Y("darkMode", y), s.on("vf-darkMode-toggle", () => {
1260
+ y.value = !y.value, o("darkMode", y.value);
1282
1261
  });
1283
- const w = k(!1);
1284
- Q("loadingState", w);
1285
- const C = k(p("full-screen", !1));
1262
+ const w = g(i("metricUnits", !1));
1263
+ Y("metricUnits", w);
1264
+ const B = g(w.value ? je : Me);
1265
+ le(w, (j) => {
1266
+ B.value = j ? je : Me;
1267
+ }), Y("filesize", B), s.on("vf-metric-units-saved", (j) => {
1268
+ w.value = j, o("metricUnits", j);
1269
+ });
1270
+ const O = g(!1);
1271
+ Y("loadingState", O);
1272
+ const D = g(i("full-screen", !1));
1286
1273
  s.on("vf-fullscreen-toggle", () => {
1287
- C.value = !C.value, o("full-screen", C.value);
1288
- }), s.on("vf-view-toggle", (M) => {
1289
- l.value = M;
1274
+ D.value = !D.value, o("full-screen", D.value);
1275
+ }), s.on("vf-view-toggle", (j) => {
1276
+ f.value = j;
1290
1277
  });
1291
- const y = ce({
1278
+ const S = ve({
1292
1279
  active: !1,
1293
1280
  type: "delete",
1294
1281
  data: {}
1295
1282
  });
1296
1283
  s.on("vf-modal-close", () => {
1297
- y.active = !1;
1298
- }), s.on("vf-modal-show", (M) => {
1299
- y.active = !0, y.type = M.type, y.data = M;
1284
+ S.active = !1;
1285
+ }), s.on("vf-modal-show", (j) => {
1286
+ S.active = !0, S.type = j.type, S.data = j;
1300
1287
  });
1301
- const $ = (M) => {
1302
- Object.assign(d, M), s.emit("vf-nodes-selected", {}), s.emit("vf-explorer-update");
1288
+ const F = (j) => {
1289
+ Object.assign(d, j), s.emit("vf-nodes-selected", {}), s.emit("vf-explorer-update");
1303
1290
  };
1304
- let z;
1291
+ let M;
1305
1292
  return s.on("vf-fetch-abort", () => {
1306
- z.abort(), w.value = !1;
1307
- }), s.on("vf-fetch", ({ params: M, onSuccess: O = null, onError: j = null, noCloseModal: L = !1 }) => {
1308
- ["index", "search"].includes(M.q) && (z && z.abort(), w.value = !0), z = new AbortController();
1309
- const V = z.signal;
1310
- me(u.value, { params: M, signal: V }).then((D) => {
1311
- a.value = D.adapter, ["index", "search"].includes(M.q) && (w.value = !1), L || s.emit("vf-modal-close"), $(D), O(D);
1312
- }).catch((D) => {
1313
- j && j(D);
1293
+ M.abort(), O.value = !1;
1294
+ }), s.on("vf-fetch", ({ params: j, onSuccess: z = null, onError: I = null, noCloseModal: A = !1 }) => {
1295
+ ["index", "search"].includes(j.q) && (M && M.abort(), O.value = !0), M = new AbortController();
1296
+ const ee = M.signal;
1297
+ fe(p.value, { params: j, signal: ee }).then((G) => {
1298
+ m.value = G.adapter, ["index", "search"].includes(j.q) && (O.value = !1), A || s.emit("vf-modal-close"), F(G), z(G);
1299
+ }).catch((G) => {
1300
+ I && I(G);
1314
1301
  }).finally(() => {
1315
1302
  });
1316
- }), s.on("vf-download", (M) => {
1317
- document.getElementById("download_frame").src = M, s.emit("vf-modal-close");
1318
- }), G(() => {
1319
- s.emit("vf-fetch", { params: { q: "index", adapter: a.value } });
1320
- }), (M, O) => (n(), m("div", zs, [
1303
+ }), s.on("vf-download", (j) => {
1304
+ document.getElementById("download_frame").src = j, s.emit("vf-modal-close");
1305
+ }), K(() => {
1306
+ s.emit("vf-fetch", { params: { q: "index", adapter: m.value } });
1307
+ }), (j, z) => (r(), v("div", {
1308
+ class: "vuefinder",
1309
+ ref_key: "root",
1310
+ ref: n
1311
+ }, [
1321
1312
  e("div", {
1322
- class: U(r(x) ? "dark" : "")
1313
+ class: T(a(y) ? "dark" : "")
1323
1314
  }, [
1324
1315
  e("div", {
1325
- class: U([C.value ? "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"]),
1326
- style: Se(C.value ? "" : "max-height: " + i.maxHeight),
1327
- onMousedown: O[0] || (O[0] = (j) => r(s).emit("vf-contextmenu-hide")),
1328
- onTouchstart: O[1] || (O[1] = (j) => r(s).emit("vf-contextmenu-hide"))
1316
+ class: T([D.value ? "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"]),
1317
+ style: ze(D.value ? "" : "max-height: " + l.maxHeight),
1318
+ onMousedown: z[0] || (z[0] = (I) => a(s).emit("vf-contextmenu-hide")),
1319
+ onTouchstart: z[1] || (z[1] = (I) => a(s).emit("vf-contextmenu-hide"))
1329
1320
  }, [
1330
- P(zt, { data: d }, null, 8, ["data"]),
1331
- P(_s, { data: d }, null, 8, ["data"]),
1321
+ P(Et, { data: d }, null, 8, ["data"]),
1322
+ P(ws, { data: d }, null, 8, ["data"]),
1332
1323
  P(zo, {
1333
- view: l.value,
1324
+ view: f.value,
1334
1325
  data: d
1335
1326
  }, null, 8, ["view", "data"]),
1336
- P(Ko, { data: d }, null, 8, ["data"])
1327
+ P(Jo, { data: d }, null, 8, ["data"])
1337
1328
  ], 38),
1338
- y.active ? (n(), H(Ne("v-f-modal-" + y.type), {
1329
+ S.active ? (r(), N(Ue("v-f-modal-" + S.type), {
1339
1330
  key: 0,
1340
- selection: y.data,
1331
+ selection: S.data,
1341
1332
  current: d
1342
- }, null, 8, ["selection", "current"])) : F("", !0),
1333
+ }, null, 8, ["selection", "current"])) : V("", !0),
1343
1334
  P(Ms, { current: d }, null, 8, ["current"]),
1344
- Es
1335
+ zs
1345
1336
  ], 2)
1346
- ]));
1337
+ ], 512));
1347
1338
  }
1348
- }), Vs = /* @__PURE__ */ e("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Ns = { class: "fixed z-10 inset-0 overflow-hidden" }, Bs = { 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" }, As = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Hs = { 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" }, J = {
1339
+ }), Vs = /* @__PURE__ */ e("div", { class: "fixed inset-0 bg-gray-500 dark:bg-gray-600 dark:bg-opacity-75 bg-opacity-75 transition-opacity" }, null, -1), Bs = { class: "fixed z-10 inset-0 overflow-hidden" }, As = { 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" }, Ls = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Ns = { 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 = {
1349
1340
  __name: "ModalLayout",
1350
- setup(i) {
1351
- const t = b("emitter");
1352
- return G(() => {
1341
+ setup(l) {
1342
+ const t = k("emitter");
1343
+ return K(() => {
1353
1344
  const s = document.querySelector(".v-f-modal input");
1354
1345
  s && s.focus();
1355
- }), (s, o) => (n(), m("div", {
1346
+ }), (s, o) => (r(), v("div", {
1356
1347
  class: "v-f-modal relative z-30",
1357
1348
  "aria-labelledby": "modal-title",
1358
1349
  role: "dialog",
1359
1350
  "aria-modal": "true",
1360
- onKeyup: o[1] || (o[1] = se((p) => r(t).emit("vf-modal-close"), ["esc"])),
1351
+ onKeyup: o[1] || (o[1] = se((i) => a(t).emit("vf-modal-close"), ["esc"])),
1361
1352
  tabindex: "0"
1362
1353
  }, [
1363
1354
  Vs,
1364
- e("div", Ns, [
1355
+ e("div", Bs, [
1365
1356
  e("div", {
1366
1357
  class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
1367
- onMousedown: o[0] || (o[0] = K((p) => r(t).emit("vf-modal-close"), ["self"]))
1358
+ onMousedown: o[0] || (o[0] = Z((i) => a(t).emit("vf-modal-close"), ["self"]))
1368
1359
  }, [
1369
- e("div", Bs, [
1370
- e("div", As, [
1371
- ke(s.$slots, "default")
1360
+ e("div", As, [
1361
+ e("div", Ls, [
1362
+ pe(s.$slots, "default")
1372
1363
  ]),
1373
- e("div", Hs, [
1374
- ke(s.$slots, "buttons")
1364
+ e("div", Ns, [
1365
+ pe(s.$slots, "buttons")
1375
1366
  ])
1376
1367
  ])
1377
1368
  ], 32)
1378
1369
  ])
1379
1370
  ], 32));
1380
1371
  }
1381
- }, Ts = ["aria-label"], Us = /* @__PURE__ */ e("svg", {
1372
+ }, Us = ["aria-label"], Ts = /* @__PURE__ */ e("svg", {
1382
1373
  xmlns: "http://www.w3.org/2000/svg",
1383
1374
  fill: "none",
1384
1375
  viewBox: "0 0 24 24",
@@ -1391,11 +1382,11 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1391
1382
  "stroke-linejoin": "round",
1392
1383
  d: "M6 18L18 6M6 6l12 12"
1393
1384
  })
1394
- ], -1), Is = [
1395
- Us
1396
- ], qs = {
1385
+ ], -1), Hs = [
1386
+ Ts
1387
+ ], Is = {
1397
1388
  name: "Message"
1398
- }, W = /* @__PURE__ */ Object.assign(qs, {
1389
+ }, Q = /* @__PURE__ */ Object.assign(Is, {
1399
1390
  props: {
1400
1391
  error: {
1401
1392
  type: Boolean,
@@ -1403,32 +1394,32 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1403
1394
  }
1404
1395
  },
1405
1396
  emits: ["hidden"],
1406
- setup(i, { emit: t }) {
1407
- var f;
1408
- const { t: s } = b("i18n"), o = k(!1), p = k(null), a = k((f = p.value) == null ? void 0 : f.strMessage), c = t;
1409
- ve(a, () => o.value = !1);
1410
- const u = () => {
1411
- c("hidden"), o.value = !0;
1397
+ setup(l, { emit: t }) {
1398
+ var p;
1399
+ const { t: s } = k("i18n"), o = g(!1), i = g(null), m = g((p = i.value) == null ? void 0 : p.strMessage), n = t;
1400
+ le(m, () => o.value = !1);
1401
+ const h = () => {
1402
+ n("hidden"), o.value = !0;
1412
1403
  };
1413
- return (d, l) => (n(), m("div", null, [
1414
- o.value ? F("", !0) : (n(), m("div", {
1404
+ return (c, d) => (r(), v("div", null, [
1405
+ o.value ? V("", !0) : (r(), v("div", {
1415
1406
  key: 0,
1416
1407
  ref_key: "strMessage",
1417
- ref: p,
1418
- class: U(["flex mt-2 p-1 px-2 rounded text-sm break-all", i.error ? "bg-red-100 text-red-600 dark:bg-red-950" : "bg-emerald-100 text-emerald-600 dark:bg-emerald-950"])
1408
+ ref: i,
1409
+ class: T(["flex mt-2 p-1 px-2 rounded text-sm break-all dark:opacity-75", l.error ? "bg-red-100 text-red-600 " : "bg-emerald-100 text-emerald-600"])
1419
1410
  }, [
1420
- ke(d.$slots, "default"),
1411
+ pe(c.$slots, "default"),
1421
1412
  e("div", {
1422
1413
  class: "ml-auto cursor-pointer",
1423
- onClick: u,
1424
- "aria-label": r(s)("Close"),
1414
+ onClick: h,
1415
+ "aria-label": a(s)("Close"),
1425
1416
  "data-microtip-position": "top-left",
1426
1417
  role: "tooltip"
1427
- }, Is, 8, Ts)
1418
+ }, Hs, 8, Us)
1428
1419
  ], 2))
1429
1420
  ]));
1430
1421
  }
1431
- }), Rs = { class: "sm:flex sm:items-start" }, Ps = /* @__PURE__ */ e("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" }, [
1422
+ }), qs = { class: "sm:flex sm:items-start" }, Rs = /* @__PURE__ */ e("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" }, [
1432
1423
  /* @__PURE__ */ e("svg", {
1433
1424
  xmlns: "http://www.w3.org/2000/svg",
1434
1425
  class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
@@ -1443,13 +1434,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1443
1434
  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"
1444
1435
  })
1445
1436
  ])
1446
- ], -1), Gs = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Ys = {
1437
+ ], -1), Ps = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Gs = {
1447
1438
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1448
1439
  id: "modal-title"
1449
- }, Js = { class: "mt-2" }, Ks = { class: "text-sm text-gray-500" }, Ws = {
1450
- class: "text-gray-500 text-sm mb-1 overflow-auto",
1440
+ }, Ys = { class: "mt-2" }, Js = { class: "text-sm text-gray-500" }, Ks = {
1441
+ class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
1451
1442
  style: { "max-height": "200px" }
1452
- }, Xs = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Qs = {
1443
+ }, Ws = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Xs = {
1453
1444
  key: 0,
1454
1445
  xmlns: "http://www.w3.org/2000/svg",
1455
1446
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -1457,13 +1448,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1457
1448
  viewBox: "0 0 24 24",
1458
1449
  stroke: "currentColor",
1459
1450
  "stroke-width": "1"
1460
- }, Zs = /* @__PURE__ */ e("path", {
1451
+ }, Qs = /* @__PURE__ */ e("path", {
1461
1452
  "stroke-linecap": "round",
1462
1453
  "stroke-linejoin": "round",
1463
1454
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
1464
- }, null, -1), er = [
1465
- Zs
1466
- ], tr = {
1455
+ }, null, -1), Zs = [
1456
+ Qs
1457
+ ], ea = {
1467
1458
  key: 1,
1468
1459
  xmlns: "http://www.w3.org/2000/svg",
1469
1460
  class: "h-5 w-5 text-neutral-500",
@@ -1471,75 +1462,75 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1471
1462
  viewBox: "0 0 24 24",
1472
1463
  stroke: "currentColor",
1473
1464
  "stroke-width": "1"
1474
- }, or = /* @__PURE__ */ e("path", {
1465
+ }, ta = /* @__PURE__ */ e("path", {
1475
1466
  "stroke-linecap": "round",
1476
1467
  "stroke-linejoin": "round",
1477
1468
  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"
1478
- }, null, -1), sr = [
1479
- or
1480
- ], rr = { class: "ml-1.5" }, ar = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, nr = {
1469
+ }, null, -1), oa = [
1470
+ ta
1471
+ ], sa = { class: "ml-1.5" }, aa = { class: "m-auto font-bold text-red-500 text-sm dark:text-red-200 text-center" }, na = {
1481
1472
  name: "VFModalDelete"
1482
- }, lr = /* @__PURE__ */ Object.assign(nr, {
1473
+ }, ra = /* @__PURE__ */ Object.assign(na, {
1483
1474
  props: {
1484
1475
  selection: Object,
1485
1476
  current: Object
1486
1477
  },
1487
- setup(i) {
1488
- const t = b("emitter");
1489
- b("storage");
1490
- const s = b("adapter"), { t: o } = b("i18n"), p = i, a = k(p.selection.items), c = k(""), u = () => {
1491
- a.value.length && t.emit("vf-fetch", {
1478
+ setup(l) {
1479
+ const t = k("emitter");
1480
+ k("storage");
1481
+ const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(i.selection.items), n = g(""), h = () => {
1482
+ m.value.length && t.emit("vf-fetch", {
1492
1483
  params: {
1493
1484
  q: "delete",
1494
1485
  adapter: s.value,
1495
- path: p.current.dirname,
1496
- items: JSON.stringify(a.value.map(({ path: f, type: d }) => ({ path: f, type: d })))
1486
+ path: i.current.dirname,
1487
+ items: JSON.stringify(m.value.map(({ path: p, type: c }) => ({ path: p, type: c })))
1497
1488
  },
1498
1489
  onSuccess: () => {
1499
1490
  t.emit("vf-toast-push", { label: o("Files deleted.") });
1500
1491
  },
1501
- onError: (f) => {
1502
- c.value = o(f.message);
1492
+ onError: (p) => {
1493
+ n.value = o(p.message);
1503
1494
  }
1504
1495
  });
1505
1496
  };
1506
- return (f, d) => (n(), H(J, null, {
1507
- buttons: N(() => [
1497
+ return (p, c) => (r(), N(W, null, {
1498
+ buttons: E(() => [
1508
1499
  e("button", {
1509
1500
  type: "button",
1510
- onClick: u,
1511
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
1512
- }, v(r(o)("Yes, Delete!")), 1),
1501
+ onClick: h,
1502
+ class: "vf-btn vf-btn-danger"
1503
+ }, u(a(o)("Yes, Delete!")), 1),
1513
1504
  e("button", {
1514
1505
  type: "button",
1515
- onClick: d[1] || (d[1] = (l) => r(t).emit("vf-modal-close")),
1516
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
1517
- }, v(r(o)("Cancel")), 1),
1518
- e("div", ar, v(r(o)("This action cannot be undone.")), 1)
1506
+ onClick: c[1] || (c[1] = (d) => a(t).emit("vf-modal-close")),
1507
+ class: "vf-btn vf-btn-secondary"
1508
+ }, u(a(o)("Cancel")), 1),
1509
+ e("div", aa, u(a(o)("This action cannot be undone.")), 1)
1519
1510
  ]),
1520
- default: N(() => [
1521
- e("div", Rs, [
1522
- Ps,
1523
- e("div", Gs, [
1524
- e("h3", Ys, v(r(o)("Delete files")), 1),
1525
- e("div", Js, [
1526
- e("p", Ks, v(r(o)("Are you sure you want to delete these files?")), 1),
1527
- e("div", Ws, [
1528
- (n(!0), m(I, null, R(a.value, (l) => (n(), m("p", Xs, [
1529
- l.type === "dir" ? (n(), m("svg", Qs, er)) : (n(), m("svg", tr, sr)),
1530
- e("span", rr, v(l.basename), 1)
1511
+ default: E(() => [
1512
+ e("div", qs, [
1513
+ Rs,
1514
+ e("div", Ps, [
1515
+ e("h3", Gs, u(a(o)("Delete files")), 1),
1516
+ e("div", Ys, [
1517
+ e("p", Js, u(a(o)("Are you sure you want to delete these files?")), 1),
1518
+ e("div", Ks, [
1519
+ (r(!0), v(H, null, J(m.value, (d) => (r(), v("p", Ws, [
1520
+ d.type === "dir" ? (r(), v("svg", Xs, Zs)) : (r(), v("svg", ea, oa)),
1521
+ e("span", sa, u(d.basename), 1)
1531
1522
  ]))), 256))
1532
1523
  ]),
1533
- c.value.length ? (n(), H(W, {
1524
+ n.value.length ? (r(), N(Q, {
1534
1525
  key: 0,
1535
- onHidden: d[0] || (d[0] = (l) => c.value = ""),
1526
+ onHidden: c[0] || (c[0] = (d) => n.value = ""),
1536
1527
  error: ""
1537
1528
  }, {
1538
- default: N(() => [
1539
- T(v(c.value), 1)
1529
+ default: E(() => [
1530
+ U(u(n.value), 1)
1540
1531
  ]),
1541
1532
  _: 1
1542
- })) : F("", !0)
1533
+ })) : V("", !0)
1543
1534
  ])
1544
1535
  ])
1545
1536
  ])
@@ -1547,7 +1538,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1547
1538
  _: 1
1548
1539
  }));
1549
1540
  }
1550
- }), ir = { class: "sm:flex sm:items-start" }, dr = /* @__PURE__ */ e("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" }, [
1541
+ }), la = { class: "sm:flex sm:items-start" }, ia = /* @__PURE__ */ e("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" }, [
1551
1542
  /* @__PURE__ */ e("svg", {
1552
1543
  xmlns: "http://www.w3.org/2000/svg",
1553
1544
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1562,34 +1553,34 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1562
1553
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1563
1554
  })
1564
1555
  ])
1565
- ], -1), cr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ur = {
1556
+ ], -1), da = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ca = {
1566
1557
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1567
1558
  id: "modal-title"
1568
- }, mr = { class: "mt-2" }, vr = { class: "text-sm text-gray-500" }, pr = {
1559
+ }, ua = { class: "mt-2" }, ma = { class: "text-sm text-gray-500" }, va = {
1569
1560
  name: "VFModalMessage"
1570
- }, fr = /* @__PURE__ */ Object.assign(pr, {
1561
+ }, pa = /* @__PURE__ */ Object.assign(va, {
1571
1562
  props: {
1572
1563
  selection: Object
1573
1564
  },
1574
- setup(i) {
1575
- const t = b("emitter"), { t: s } = b("i18n");
1576
- return (o, p) => (n(), H(J, null, {
1577
- buttons: N(() => [
1565
+ setup(l) {
1566
+ const t = k("emitter"), { t: s } = k("i18n");
1567
+ return (o, i) => (r(), N(W, null, {
1568
+ buttons: E(() => [
1578
1569
  e("button", {
1579
1570
  type: "button",
1580
- onClick: p[0] || (p[0] = (a) => r(t).emit("vf-modal-close")),
1581
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
1582
- }, v(r(s)("Close")), 1)
1571
+ onClick: i[0] || (i[0] = (m) => a(t).emit("vf-modal-close")),
1572
+ class: "vf-btn vf-btn-secondary"
1573
+ }, u(a(s)("Close")), 1)
1583
1574
  ]),
1584
- default: N(() => {
1585
- var a, c;
1575
+ default: E(() => {
1576
+ var m, n;
1586
1577
  return [
1587
- e("div", ir, [
1588
- dr,
1589
- e("div", cr, [
1590
- e("h3", ur, v(((a = i.selection) == null ? void 0 : a.title) ?? "Title"), 1),
1591
- e("div", mr, [
1592
- e("p", vr, v(((c = i.selection) == null ? void 0 : c.message) ?? "Message"), 1)
1578
+ e("div", la, [
1579
+ ia,
1580
+ e("div", da, [
1581
+ e("h3", ca, u(((m = l.selection) == null ? void 0 : m.title) ?? "Title"), 1),
1582
+ e("div", ua, [
1583
+ e("p", ma, u(((n = l.selection) == null ? void 0 : n.message) ?? "Message"), 1)
1593
1584
  ])
1594
1585
  ])
1595
1586
  ])
@@ -1598,7 +1589,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1598
1589
  _: 1
1599
1590
  }));
1600
1591
  }
1601
- }), gr = { class: "sm:flex sm:items-start" }, hr = /* @__PURE__ */ e("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" }, [
1592
+ }), ha = { class: "sm:flex sm:items-start" }, fa = /* @__PURE__ */ e("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" }, [
1602
1593
  /* @__PURE__ */ e("svg", {
1603
1594
  xmlns: "http://www.w3.org/2000/svg",
1604
1595
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1613,74 +1604,74 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1613
1604
  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"
1614
1605
  })
1615
1606
  ])
1616
- ], -1), kr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, xr = {
1607
+ ], -1), ga = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ka = {
1617
1608
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1618
1609
  id: "modal-title"
1619
- }, br = { class: "mt-2" }, wr = { class: "text-sm text-gray-500" }, yr = ["placeholder"], _r = {
1610
+ }, _a = { class: "mt-2" }, xa = { class: "text-sm text-gray-500" }, ba = ["placeholder"], wa = {
1620
1611
  name: "VFModalNewFolder"
1621
- }, $r = /* @__PURE__ */ Object.assign(_r, {
1612
+ }, ya = /* @__PURE__ */ Object.assign(wa, {
1622
1613
  props: {
1623
1614
  selection: Object,
1624
1615
  current: Object
1625
1616
  },
1626
- setup(i) {
1627
- const t = b("emitter");
1628
- b("storage");
1629
- const s = b("adapter"), { t: o } = b("i18n"), p = i, a = k(""), c = k(""), u = () => {
1630
- a.value != "" && t.emit("vf-fetch", {
1617
+ setup(l) {
1618
+ const t = k("emitter");
1619
+ k("storage");
1620
+ const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = () => {
1621
+ m.value != "" && t.emit("vf-fetch", {
1631
1622
  params: {
1632
1623
  q: "newfolder",
1633
1624
  adapter: s.value,
1634
- path: p.current.dirname,
1635
- name: a.value
1625
+ path: i.current.dirname,
1626
+ name: m.value
1636
1627
  },
1637
1628
  onSuccess: () => {
1638
- t.emit("vf-toast-push", { label: o("%s is created.", a.value) });
1629
+ t.emit("vf-toast-push", { label: o("%s is created.", m.value) });
1639
1630
  },
1640
- onError: (f) => {
1641
- c.value = o(f.message);
1631
+ onError: (p) => {
1632
+ n.value = o(p.message);
1642
1633
  }
1643
1634
  });
1644
1635
  };
1645
- return (f, d) => (n(), H(J, null, {
1646
- buttons: N(() => [
1636
+ return (p, c) => (r(), N(W, null, {
1637
+ buttons: E(() => [
1647
1638
  e("button", {
1648
1639
  type: "button",
1649
- onClick: u,
1650
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
1651
- }, v(r(o)("Create")), 1),
1640
+ onClick: h,
1641
+ class: "vf-btn vf-btn-primary"
1642
+ }, u(a(o)("Create")), 1),
1652
1643
  e("button", {
1653
1644
  type: "button",
1654
- onClick: d[2] || (d[2] = (l) => r(t).emit("vf-modal-close")),
1655
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
1656
- }, v(r(o)("Cancel")), 1)
1645
+ onClick: c[2] || (c[2] = (d) => a(t).emit("vf-modal-close")),
1646
+ class: "vf-btn vf-btn-secondary"
1647
+ }, u(a(o)("Cancel")), 1)
1657
1648
  ]),
1658
- default: N(() => [
1659
- e("div", gr, [
1660
- hr,
1661
- e("div", kr, [
1662
- e("h3", xr, v(r(o)("New Folder")), 1),
1663
- e("div", br, [
1664
- e("p", wr, v(r(o)("Create a new folder")), 1),
1665
- q(e("input", {
1666
- "onUpdate:modelValue": d[0] || (d[0] = (l) => a.value = l),
1667
- onKeyup: se(u, ["enter"]),
1649
+ default: E(() => [
1650
+ e("div", ha, [
1651
+ fa,
1652
+ e("div", ga, [
1653
+ e("h3", ka, u(a(o)("New Folder")), 1),
1654
+ e("div", _a, [
1655
+ e("p", xa, u(a(o)("Create a new folder")), 1),
1656
+ R(e("input", {
1657
+ "onUpdate:modelValue": c[0] || (c[0] = (d) => m.value = d),
1658
+ onKeyup: se(h, ["enter"]),
1668
1659
  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",
1669
- placeholder: r(o)("Folder Name"),
1660
+ placeholder: a(o)("Folder Name"),
1670
1661
  type: "text"
1671
- }, null, 40, yr), [
1672
- [re, a.value]
1662
+ }, null, 40, ba), [
1663
+ [ae, m.value]
1673
1664
  ]),
1674
- c.value.length ? (n(), H(W, {
1665
+ n.value.length ? (r(), N(Q, {
1675
1666
  key: 0,
1676
- onHidden: d[1] || (d[1] = (l) => c.value = ""),
1667
+ onHidden: c[1] || (c[1] = (d) => n.value = ""),
1677
1668
  error: ""
1678
1669
  }, {
1679
- default: N(() => [
1680
- T(v(c.value), 1)
1670
+ default: E(() => [
1671
+ U(u(n.value), 1)
1681
1672
  ]),
1682
1673
  _: 1
1683
- })) : F("", !0)
1674
+ })) : V("", !0)
1684
1675
  ])
1685
1676
  ])
1686
1677
  ])
@@ -1688,7 +1679,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1688
1679
  _: 1
1689
1680
  }));
1690
1681
  }
1691
- }), jr = { class: "sm:flex sm:items-start" }, Cr = /* @__PURE__ */ e("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" }, [
1682
+ }), $a = { class: "sm:flex sm:items-start" }, Ca = /* @__PURE__ */ e("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" }, [
1692
1683
  /* @__PURE__ */ e("svg", {
1693
1684
  xmlns: "http://www.w3.org/2000/svg",
1694
1685
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -1703,74 +1694,74 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1703
1694
  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"
1704
1695
  })
1705
1696
  ])
1706
- ], -1), Mr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Sr = {
1697
+ ], -1), Ma = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ja = {
1707
1698
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1708
1699
  id: "modal-title"
1709
- }, Dr = { class: "mt-2" }, Or = { class: "text-sm text-gray-500" }, zr = ["placeholder"], Er = {
1700
+ }, Sa = { class: "mt-2" }, Da = { class: "text-sm text-gray-500" }, Oa = ["placeholder"], za = {
1710
1701
  name: "VFModalNewFile"
1711
- }, Fr = /* @__PURE__ */ Object.assign(Er, {
1702
+ }, Ea = /* @__PURE__ */ Object.assign(za, {
1712
1703
  props: {
1713
1704
  selection: Object,
1714
1705
  current: Object
1715
1706
  },
1716
- setup(i) {
1717
- const t = b("emitter");
1718
- b("storage");
1719
- const s = b("adapter"), { t: o } = b("i18n"), p = i, a = k(""), c = k(""), u = () => {
1720
- a.value != "" && t.emit("vf-fetch", {
1707
+ setup(l) {
1708
+ const t = k("emitter");
1709
+ k("storage");
1710
+ const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = () => {
1711
+ m.value != "" && t.emit("vf-fetch", {
1721
1712
  params: {
1722
1713
  q: "newfile",
1723
1714
  adapter: s.value,
1724
- path: p.current.dirname,
1725
- name: a.value
1715
+ path: i.current.dirname,
1716
+ name: m.value
1726
1717
  },
1727
1718
  onSuccess: () => {
1728
- t.emit("vf-toast-push", { label: o("%s is created.", a.value) });
1719
+ t.emit("vf-toast-push", { label: o("%s is created.", m.value) });
1729
1720
  },
1730
- onError: (f) => {
1731
- c.value = o(f.message);
1721
+ onError: (p) => {
1722
+ n.value = o(p.message);
1732
1723
  }
1733
1724
  });
1734
1725
  };
1735
- return (f, d) => (n(), H(J, null, {
1736
- buttons: N(() => [
1726
+ return (p, c) => (r(), N(W, null, {
1727
+ buttons: E(() => [
1737
1728
  e("button", {
1738
1729
  type: "button",
1739
- onClick: u,
1740
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
1741
- }, v(r(o)("Create")), 1),
1730
+ onClick: h,
1731
+ class: "vf-btn vf-btn-primary"
1732
+ }, u(a(o)("Create")), 1),
1742
1733
  e("button", {
1743
1734
  type: "button",
1744
- onClick: d[2] || (d[2] = (l) => r(t).emit("vf-modal-close")),
1745
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
1746
- }, v(r(o)("Cancel")), 1)
1735
+ onClick: c[2] || (c[2] = (d) => a(t).emit("vf-modal-close")),
1736
+ class: "vf-btn vf-btn-secondary"
1737
+ }, u(a(o)("Cancel")), 1)
1747
1738
  ]),
1748
- default: N(() => [
1749
- e("div", jr, [
1750
- Cr,
1751
- e("div", Mr, [
1752
- e("h3", Sr, v(r(o)("New File")), 1),
1753
- e("div", Dr, [
1754
- e("p", Or, v(r(o)("Create a new file")), 1),
1755
- q(e("input", {
1756
- "onUpdate:modelValue": d[0] || (d[0] = (l) => a.value = l),
1757
- onKeyup: se(u, ["enter"]),
1739
+ default: E(() => [
1740
+ e("div", $a, [
1741
+ Ca,
1742
+ e("div", Ma, [
1743
+ e("h3", ja, u(a(o)("New File")), 1),
1744
+ e("div", Sa, [
1745
+ e("p", Da, u(a(o)("Create a new file")), 1),
1746
+ R(e("input", {
1747
+ "onUpdate:modelValue": c[0] || (c[0] = (d) => m.value = d),
1748
+ onKeyup: se(h, ["enter"]),
1758
1749
  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",
1759
- placeholder: r(o)("File Name"),
1750
+ placeholder: a(o)("File Name"),
1760
1751
  type: "text"
1761
- }, null, 40, zr), [
1762
- [re, a.value]
1752
+ }, null, 40, Oa), [
1753
+ [ae, m.value]
1763
1754
  ]),
1764
- c.value.length ? (n(), H(W, {
1755
+ n.value.length ? (r(), N(Q, {
1765
1756
  key: 0,
1766
- onHidden: d[1] || (d[1] = (l) => c.value = ""),
1757
+ onHidden: c[1] || (c[1] = (d) => n.value = ""),
1767
1758
  error: ""
1768
1759
  }, {
1769
- default: N(() => [
1770
- T(v(c.value), 1)
1760
+ default: E(() => [
1761
+ U(u(n.value), 1)
1771
1762
  ]),
1772
1763
  _: 1
1773
- })) : F("", !0)
1764
+ })) : V("", !0)
1774
1765
  ])
1775
1766
  ])
1776
1767
  ])
@@ -1778,308 +1769,308 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
1778
1769
  _: 1
1779
1770
  }));
1780
1771
  }
1781
- }), Lr = { class: "flex" }, Vr = ["aria-label"], Nr = { class: "ml-auto mb-2" }, Br = {
1772
+ }), Fa = { class: "flex" }, Va = ["aria-label"], Ba = { class: "ml-auto mb-2" }, Aa = {
1782
1773
  key: 0,
1783
1774
  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"
1784
- }, Ar = { key: 1 }, Hr = {
1775
+ }, La = { key: 1 }, Na = {
1785
1776
  __name: "Text",
1786
1777
  props: {
1787
1778
  selection: Object
1788
1779
  },
1789
1780
  emits: ["load"],
1790
- setup(i, { emit: t }) {
1791
- const s = t, o = k(""), p = k(""), a = k(null), c = k(!1), { apiUrl: u } = Y(), f = i, d = k(""), l = k(!1), { t: x } = b("i18n");
1792
- G(() => {
1793
- me(u.value, {
1794
- params: { q: "preview", adapter: f.selection.adapter, path: f.selection.item.path },
1781
+ setup(l, { emit: t }) {
1782
+ const s = t, o = g(""), i = g(""), m = g(null), n = g(!1), { apiUrl: h } = X(), p = l, c = g(""), d = g(!1), { t: f } = k("i18n");
1783
+ K(() => {
1784
+ fe(h.value, {
1785
+ params: { q: "preview", adapter: p.selection.adapter, path: p.selection.item.path },
1795
1786
  json: !1
1796
- }).then(($) => {
1797
- o.value = $, s("load");
1787
+ }).then((O) => {
1788
+ o.value = O, s("load");
1798
1789
  });
1799
1790
  });
1800
- const w = () => {
1801
- c.value = !c.value, p.value = o.value, c.value == !0 && pe(() => {
1802
- a.value.focus();
1791
+ const y = () => {
1792
+ n.value = !n.value, i.value = o.value, n.value == !0 && ge(() => {
1793
+ m.value.focus();
1803
1794
  });
1804
- }, C = b("postData"), y = () => {
1805
- d.value = "", l.value = !1, me(u.value, {
1795
+ }, w = k("postData"), B = () => {
1796
+ c.value = "", d.value = !1, fe(h.value, {
1806
1797
  method: "POST",
1807
- params: Object.assign(C, {
1798
+ params: Object.assign(w, {
1808
1799
  q: "save",
1809
- adapter: f.selection.adapter,
1810
- path: f.selection.item.path,
1811
- content: p.value
1800
+ adapter: p.selection.adapter,
1801
+ path: p.selection.item.path,
1802
+ content: i.value
1812
1803
  }),
1813
1804
  json: !1
1814
- }).then(($) => {
1815
- d.value = x("Updated."), o.value = $, s("load"), c.value = !c.value;
1816
- }).catch(($) => {
1817
- d.value = x($.message), l.value = !0;
1805
+ }).then((O) => {
1806
+ c.value = f("Updated."), o.value = O, s("load"), n.value = !n.value;
1807
+ }).catch((O) => {
1808
+ c.value = f(O.message), d.value = !0;
1818
1809
  });
1819
1810
  };
1820
- return ($, z) => (n(), m(I, null, [
1821
- e("div", Lr, [
1811
+ return (O, D) => (r(), v(H, null, [
1812
+ e("div", Fa, [
1822
1813
  e("div", {
1823
1814
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1824
1815
  id: "modal-title",
1825
- "aria-label": i.selection.item.path,
1816
+ "aria-label": l.selection.item.path,
1826
1817
  "data-microtip-position": "bottom-right",
1827
1818
  role: "tooltip"
1828
- }, v(i.selection.item.basename), 9, Vr),
1829
- e("div", Nr, [
1830
- c.value ? (n(), m("button", {
1819
+ }, u(l.selection.item.basename), 9, Va),
1820
+ e("div", Ba, [
1821
+ n.value ? (r(), v("button", {
1831
1822
  key: 0,
1832
- onClick: y,
1823
+ onClick: B,
1833
1824
  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"
1834
- }, v(r(x)("Save")), 1)) : F("", !0),
1825
+ }, u(a(f)("Save")), 1)) : V("", !0),
1835
1826
  e("button", {
1836
1827
  class: "ml-1 px-2 py-1 text-blue-500",
1837
- onClick: z[0] || (z[0] = (M) => w())
1838
- }, v(c.value ? r(x)("Cancel") : r(x)("Edit")), 1)
1828
+ onClick: D[0] || (D[0] = (S) => y())
1829
+ }, u(n.value ? a(f)("Cancel") : a(f)("Edit")), 1)
1839
1830
  ])
1840
1831
  ]),
1841
1832
  e("div", null, [
1842
- c.value ? (n(), m("div", Ar, [
1843
- q(e("textarea", {
1833
+ n.value ? (r(), v("div", La, [
1834
+ R(e("textarea", {
1844
1835
  ref_key: "editInput",
1845
- ref: a,
1846
- "onUpdate:modelValue": z[1] || (z[1] = (M) => p.value = M),
1836
+ ref: m,
1837
+ "onUpdate:modelValue": D[1] || (D[1] = (S) => i.value = S),
1847
1838
  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",
1848
1839
  name: "text",
1849
1840
  id: "",
1850
1841
  cols: "30",
1851
1842
  rows: "10"
1852
1843
  }, null, 512), [
1853
- [re, p.value]
1844
+ [ae, i.value]
1854
1845
  ])
1855
- ])) : (n(), m("pre", Br, v(o.value), 1)),
1856
- d.value.length ? (n(), H(W, {
1846
+ ])) : (r(), v("pre", Aa, u(o.value), 1)),
1847
+ c.value.length ? (r(), N(Q, {
1857
1848
  key: 2,
1858
- onHidden: z[2] || (z[2] = (M) => d.value = ""),
1859
- error: l.value
1849
+ onHidden: D[2] || (D[2] = (S) => c.value = ""),
1850
+ error: d.value
1860
1851
  }, {
1861
- default: N(() => [
1862
- T(v(d.value), 1)
1852
+ default: E(() => [
1853
+ U(u(c.value), 1)
1863
1854
  ]),
1864
1855
  _: 1
1865
- }, 8, ["error"])) : F("", !0)
1856
+ }, 8, ["error"])) : V("", !0)
1866
1857
  ])
1867
1858
  ], 64));
1868
1859
  }
1869
- }, Tr = { class: "flex" }, Ur = ["aria-label"], Ir = { class: "ml-auto mb-2" }, qr = { class: "w-full flex justify-center" }, Rr = ["src"], Pr = {
1860
+ }, Ua = { class: "flex" }, Ta = ["aria-label"], Ha = { class: "ml-auto mb-2" }, Ia = { class: "w-full flex justify-center" }, qa = ["src"], Ra = {
1870
1861
  __name: "Image",
1871
1862
  props: {
1872
1863
  selection: Object
1873
1864
  },
1874
1865
  emits: ["load"],
1875
- setup(i, { emit: t }) {
1876
- const s = t, o = i, { t: p } = b("i18n"), { apiUrl: a } = Y(), c = k(null), u = k(null), f = k(!1), d = k(""), l = k(!1), x = () => {
1877
- f.value = !f.value, f.value ? u.value = new Te(c.value, {
1878
- crop(y) {
1866
+ setup(l, { emit: t }) {
1867
+ const s = t, o = l, { t: i } = k("i18n"), { apiUrl: m } = X(), n = g(null), h = g(null), p = g(!1), c = g(""), d = g(!1), f = () => {
1868
+ p.value = !p.value, p.value ? h.value = new Re(n.value, {
1869
+ crop(B) {
1879
1870
  }
1880
- }) : u.value.destroy();
1881
- }, w = b("postData"), C = () => {
1882
- u.value.getCroppedCanvas({
1871
+ }) : h.value.destroy();
1872
+ }, y = k("postData"), w = () => {
1873
+ h.value.getCroppedCanvas({
1883
1874
  width: 795,
1884
1875
  height: 341
1885
1876
  }).toBlob(
1886
- (y) => {
1887
- d.value = "", l.value = !1, me(a.value, {
1877
+ (B) => {
1878
+ c.value = "", d.value = !1, fe(m.value, {
1888
1879
  method: "POST",
1889
- params: Object.assign(w, {
1880
+ params: Object.assign(y, {
1890
1881
  q: "upload",
1891
1882
  adapter: o.selection.adapter,
1892
1883
  path: o.selection.item.path,
1893
- file: y
1884
+ file: B
1894
1885
  }),
1895
1886
  name: o.selection.item.basename,
1896
1887
  json: !1
1897
- }).then(($) => {
1898
- d.value = p("Updated."), c.value.src = be(o.selection.adapter, o.selection.item.path), x(), s("load");
1899
- }).catch(($) => {
1900
- d.value = p($.message), l.value = !0;
1888
+ }).then((O) => {
1889
+ c.value = i("Updated."), n.value.src = be(o.selection.adapter, o.selection.item.path), f(), s("load");
1890
+ }).catch((O) => {
1891
+ c.value = i(O.message), d.value = !0;
1901
1892
  });
1902
1893
  }
1903
1894
  );
1904
1895
  };
1905
- return G(() => {
1896
+ return K(() => {
1906
1897
  s("load");
1907
- }), (y, $) => (n(), m(I, null, [
1908
- e("div", Tr, [
1898
+ }), (B, O) => (r(), v(H, null, [
1899
+ e("div", Ua, [
1909
1900
  e("h3", {
1910
1901
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1911
1902
  id: "modal-title",
1912
- "aria-label": i.selection.item.path,
1903
+ "aria-label": l.selection.item.path,
1913
1904
  "data-microtip-position": "bottom-right",
1914
1905
  role: "tooltip"
1915
- }, v(i.selection.item.basename), 9, Ur),
1916
- e("div", Ir, [
1917
- f.value ? (n(), m("button", {
1906
+ }, u(l.selection.item.basename), 9, Ta),
1907
+ e("div", Ha, [
1908
+ p.value ? (r(), v("button", {
1918
1909
  key: 0,
1919
- onClick: C,
1910
+ onClick: w,
1920
1911
  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"
1921
- }, v(r(p)("Crop")), 1)) : F("", !0),
1912
+ }, u(a(i)("Crop")), 1)) : V("", !0),
1922
1913
  e("button", {
1923
1914
  class: "ml-1 px-2 py-1 text-blue-500",
1924
- onClick: $[0] || ($[0] = (z) => x())
1925
- }, v(f.value ? r(p)("Cancel") : r(p)("Edit")), 1)
1915
+ onClick: O[0] || (O[0] = (D) => f())
1916
+ }, u(p.value ? a(i)("Cancel") : a(i)("Edit")), 1)
1926
1917
  ])
1927
1918
  ]),
1928
- e("div", qr, [
1919
+ e("div", Ia, [
1929
1920
  e("img", {
1930
1921
  ref_key: "image",
1931
- ref: c,
1922
+ ref: n,
1932
1923
  class: "max-w-[50vh] max-h-[50vh]",
1933
- src: r(be)(o.selection.adapter, o.selection.item.path),
1924
+ src: a(be)(o.selection.adapter, o.selection.item.path),
1934
1925
  alt: ""
1935
- }, null, 8, Rr)
1926
+ }, null, 8, qa)
1936
1927
  ]),
1937
- d.value.length ? (n(), H(W, {
1928
+ c.value.length ? (r(), N(Q, {
1938
1929
  key: 0,
1939
- onHidden: $[1] || ($[1] = (z) => d.value = ""),
1940
- error: l.value
1930
+ onHidden: O[1] || (O[1] = (D) => c.value = ""),
1931
+ error: d.value
1941
1932
  }, {
1942
- default: N(() => [
1943
- T(v(d.value), 1)
1933
+ default: E(() => [
1934
+ U(u(c.value), 1)
1944
1935
  ]),
1945
1936
  _: 1
1946
- }, 8, ["error"])) : F("", !0)
1937
+ }, 8, ["error"])) : V("", !0)
1947
1938
  ], 64));
1948
1939
  }
1949
- }, Gr = { class: "flex" }, Yr = ["aria-label"], Jr = /* @__PURE__ */ e("div", null, null, -1), Kr = {
1940
+ }, Pa = { class: "flex" }, Ga = ["aria-label"], Ya = /* @__PURE__ */ e("div", null, null, -1), Ja = {
1950
1941
  __name: "Default",
1951
1942
  props: {
1952
1943
  selection: Object
1953
1944
  },
1954
1945
  emits: ["load"],
1955
- setup(i, { emit: t }) {
1946
+ setup(l, { emit: t }) {
1956
1947
  const s = t;
1957
- return G(() => {
1948
+ return K(() => {
1958
1949
  s("load");
1959
- }), (o, p) => (n(), m(I, null, [
1960
- e("div", Gr, [
1950
+ }), (o, i) => (r(), v(H, null, [
1951
+ e("div", Pa, [
1961
1952
  e("h3", {
1962
1953
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1963
1954
  id: "modal-title",
1964
- "aria-label": i.selection.item.path,
1955
+ "aria-label": l.selection.item.path,
1965
1956
  "data-microtip-position": "bottom-right",
1966
1957
  role: "tooltip"
1967
- }, v(i.selection.item.basename), 9, Yr)
1958
+ }, u(l.selection.item.basename), 9, Ga)
1968
1959
  ]),
1969
- Jr
1960
+ Ya
1970
1961
  ], 64));
1971
1962
  }
1972
- }, Wr = ["aria-label"], Xr = {
1963
+ }, Ka = ["aria-label"], Wa = {
1973
1964
  class: "w-full",
1974
1965
  preload: "",
1975
1966
  controls: ""
1976
- }, Qr = ["src"], Zr = {
1967
+ }, Xa = ["src"], Qa = {
1977
1968
  __name: "Video",
1978
1969
  props: {
1979
1970
  selection: Object
1980
1971
  },
1981
1972
  emits: ["load"],
1982
- setup(i, { emit: t }) {
1983
- const { apiUrl: s } = Y(), o = i, p = t, a = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
1984
- return G(() => {
1985
- p("load");
1986
- }), (c, u) => (n(), m(I, null, [
1973
+ setup(l, { emit: t }) {
1974
+ const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
1975
+ return K(() => {
1976
+ i("load");
1977
+ }), (n, h) => (r(), v(H, null, [
1987
1978
  e("h3", {
1988
1979
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
1989
1980
  id: "modal-title",
1990
- "aria-label": i.selection.item.path,
1981
+ "aria-label": l.selection.item.path,
1991
1982
  "data-microtip-position": "bottom-right",
1992
1983
  role: "tooltip"
1993
- }, v(i.selection.item.basename), 9, Wr),
1984
+ }, u(l.selection.item.basename), 9, Ka),
1994
1985
  e("div", null, [
1995
- e("video", Xr, [
1986
+ e("video", Wa, [
1996
1987
  e("source", {
1997
- src: a(),
1988
+ src: m(),
1998
1989
  type: "video/mp4"
1999
- }, null, 8, Qr),
2000
- T(" Your browser does not support the video tag. ")
1990
+ }, null, 8, Xa),
1991
+ U(" Your browser does not support the video tag. ")
2001
1992
  ])
2002
1993
  ])
2003
1994
  ], 64));
2004
1995
  }
2005
- }, ea = ["aria-label"], ta = {
1996
+ }, Za = ["aria-label"], en = {
2006
1997
  class: "w-full",
2007
1998
  controls: ""
2008
- }, oa = ["src"], sa = {
1999
+ }, tn = ["src"], on = {
2009
2000
  __name: "Audio",
2010
2001
  props: {
2011
2002
  selection: Object
2012
2003
  },
2013
2004
  emits: ["load"],
2014
- setup(i, { emit: t }) {
2015
- const { apiUrl: s } = Y(), o = i, p = t, a = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
2016
- return G(() => {
2017
- p("load");
2018
- }), (c, u) => (n(), m(I, null, [
2005
+ setup(l, { emit: t }) {
2006
+ const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
2007
+ return K(() => {
2008
+ i("load");
2009
+ }), (n, h) => (r(), v(H, null, [
2019
2010
  e("h3", {
2020
2011
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2021
2012
  id: "modal-title",
2022
- "aria-label": i.selection.item.path,
2013
+ "aria-label": l.selection.item.path,
2023
2014
  "data-microtip-position": "bottom-right",
2024
2015
  role: "tooltip"
2025
- }, v(i.selection.item.basename), 9, ea),
2016
+ }, u(l.selection.item.basename), 9, Za),
2026
2017
  e("div", null, [
2027
- e("audio", ta, [
2018
+ e("audio", en, [
2028
2019
  e("source", {
2029
- src: a(),
2020
+ src: m(),
2030
2021
  type: "audio/mpeg"
2031
- }, null, 8, oa),
2032
- T(" Your browser does not support the audio element. ")
2022
+ }, null, 8, tn),
2023
+ U(" Your browser does not support the audio element. ")
2033
2024
  ])
2034
2025
  ])
2035
2026
  ], 64));
2036
2027
  }
2037
- }, ra = ["aria-label"], aa = ["data"], na = ["src"], la = /* @__PURE__ */ e("p", null, [
2038
- /* @__PURE__ */ T(" Your browser does not support PDFs. "),
2028
+ }, sn = ["aria-label"], an = ["data"], nn = ["src"], rn = /* @__PURE__ */ e("p", null, [
2029
+ /* @__PURE__ */ U(" Your browser does not support PDFs. "),
2039
2030
  /* @__PURE__ */ e("a", { href: "https://example.com/test.pdf" }, "Download the PDF"),
2040
- /* @__PURE__ */ T(" . ")
2041
- ], -1), ia = [
2042
- la
2043
- ], da = {
2031
+ /* @__PURE__ */ U(" . ")
2032
+ ], -1), ln = [
2033
+ rn
2034
+ ], dn = {
2044
2035
  __name: "Pdf",
2045
2036
  props: {
2046
2037
  selection: Object
2047
2038
  },
2048
2039
  emits: ["load"],
2049
- setup(i, { emit: t }) {
2050
- const { apiUrl: s } = Y(), o = i, p = t, a = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
2051
- return G(() => {
2052
- p("load");
2053
- }), (c, u) => (n(), m(I, null, [
2040
+ setup(l, { emit: t }) {
2041
+ const { apiUrl: s } = X(), o = l, i = t, m = () => s.value + "?" + oe({ q: "preview", adapter: o.selection.adapter, path: o.selection.item.path });
2042
+ return K(() => {
2043
+ i("load");
2044
+ }), (n, h) => (r(), v(H, null, [
2054
2045
  e("h3", {
2055
2046
  class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2056
2047
  id: "modal-title",
2057
- "aria-label": i.selection.item.path,
2048
+ "aria-label": l.selection.item.path,
2058
2049
  "data-microtip-position": "bottom-right",
2059
2050
  role: "tooltip"
2060
- }, v(i.selection.item.basename), 9, ra),
2051
+ }, u(l.selection.item.basename), 9, sn),
2061
2052
  e("div", null, [
2062
2053
  e("object", {
2063
2054
  class: "h-[60vh]",
2064
- data: a(),
2055
+ data: m(),
2065
2056
  type: "application/pdf",
2066
2057
  width: "100%",
2067
2058
  height: "100%"
2068
2059
  }, [
2069
2060
  e("iframe", {
2070
2061
  class: "border-0",
2071
- src: a(),
2062
+ src: m(),
2072
2063
  width: "100%",
2073
2064
  height: "100%"
2074
- }, ia, 8, na)
2075
- ], 8, aa)
2065
+ }, ln, 8, nn)
2066
+ ], 8, an)
2076
2067
  ])
2077
2068
  ], 64));
2078
2069
  }
2079
- }, ca = { class: "sm:flex sm:items-start" }, ua = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, ma = { class: "text-gray-700 dark:text-gray-200 text-sm" }, va = {
2070
+ }, cn = { class: "sm:flex sm:items-start" }, un = { class: "mt-3 text-center sm:mt-0 sm:text-left w-full" }, mn = { class: "text-gray-700 dark:text-gray-200 text-sm" }, vn = {
2080
2071
  key: 0,
2081
2072
  class: "flex leading-5"
2082
- }, pa = /* @__PURE__ */ e("svg", {
2073
+ }, pn = /* @__PURE__ */ e("svg", {
2083
2074
  class: "animate-spin -ml-1 mr-3 h-5 w-5 text-white",
2084
2075
  xmlns: "http://www.w3.org/2000/svg",
2085
2076
  fill: "none",
@@ -2098,83 +2089,83 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2098
2089
  fill: "currentColor",
2099
2090
  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"
2100
2091
  })
2101
- ], -1), fa = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, ga = { class: "font-bold pl-2" }, ha = { class: "font-bold pl-2" }, ka = {
2092
+ ], -1), hn = { class: "py-2 flex font-normal break-all dark:text-gray-200 rounded text-xs" }, fn = { class: "font-bold pl-2" }, gn = { class: "font-bold pl-2" }, kn = {
2102
2093
  name: "VFModalPreview"
2103
- }, xa = /* @__PURE__ */ Object.assign(ka, {
2094
+ }, _n = /* @__PURE__ */ Object.assign(kn, {
2104
2095
  props: {
2105
2096
  selection: Object
2106
2097
  },
2107
- setup(i) {
2108
- const { apiUrl: t } = Y(), s = b("emitter"), { t: o } = b("i18n"), p = k(!1), a = (d) => p.value = d, c = i, u = (d) => (c.selection.item.mime_type ?? "").startsWith(d), f = () => {
2109
- const d = t.value + "?" + oe({ q: "download", adapter: c.selection.adapter, path: c.selection.item.path });
2098
+ setup(l) {
2099
+ const { apiUrl: t } = X(), s = k("emitter"), { t: o } = k("i18n"), i = g(!1), m = k("filesize"), n = (d) => i.value = d, h = l, p = (d) => (h.selection.item.mime_type ?? "").startsWith(d), c = () => {
2100
+ const d = t.value + "?" + oe({ q: "download", adapter: h.selection.adapter, path: h.selection.item.path });
2110
2101
  s.emit("vf-download", d);
2111
2102
  };
2112
- return (d, l) => (n(), H(J, null, {
2113
- buttons: N(() => [
2103
+ return (d, f) => (r(), N(W, null, {
2104
+ buttons: E(() => [
2114
2105
  e("button", {
2115
2106
  type: "button",
2116
- onClick: l[6] || (l[6] = (x) => r(s).emit("vf-modal-close")),
2117
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2118
- }, v(r(o)("Close")), 1),
2107
+ onClick: f[6] || (f[6] = (y) => a(s).emit("vf-modal-close")),
2108
+ class: "vf-btn vf-btn-secondary"
2109
+ }, u(a(o)("Close")), 1),
2119
2110
  e("button", {
2120
2111
  type: "button",
2121
- onClick: l[7] || (l[7] = (x) => f()),
2122
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-gray-400 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2123
- }, v(r(o)("Download")), 1)
2112
+ onClick: f[7] || (f[7] = (y) => c()),
2113
+ class: "vf-btn vf-btn-primary"
2114
+ }, u(a(o)("Download")), 1)
2124
2115
  ]),
2125
- default: N(() => [
2126
- e("div", ca, [
2127
- e("div", ua, [
2116
+ default: E(() => [
2117
+ e("div", cn, [
2118
+ e("div", un, [
2128
2119
  e("div", null, [
2129
- u("text") ? (n(), H(Hr, {
2120
+ p("text") ? (r(), N(Na, {
2130
2121
  key: 0,
2131
- selection: i.selection,
2132
- onLoad: l[0] || (l[0] = (x) => a(!0))
2133
- }, null, 8, ["selection"])) : u("image") ? (n(), H(Pr, {
2122
+ selection: l.selection,
2123
+ onLoad: f[0] || (f[0] = (y) => n(!0))
2124
+ }, null, 8, ["selection"])) : p("image") ? (r(), N(Ra, {
2134
2125
  key: 1,
2135
- selection: i.selection,
2136
- onLoad: l[1] || (l[1] = (x) => a(!0))
2137
- }, null, 8, ["selection"])) : u("video") ? (n(), H(Zr, {
2126
+ selection: l.selection,
2127
+ onLoad: f[1] || (f[1] = (y) => n(!0))
2128
+ }, null, 8, ["selection"])) : p("video") ? (r(), N(Qa, {
2138
2129
  key: 2,
2139
- selection: i.selection,
2140
- onLoad: l[2] || (l[2] = (x) => a(!0))
2141
- }, null, 8, ["selection"])) : u("audio") ? (n(), H(sa, {
2130
+ selection: l.selection,
2131
+ onLoad: f[2] || (f[2] = (y) => n(!0))
2132
+ }, null, 8, ["selection"])) : p("audio") ? (r(), N(on, {
2142
2133
  key: 3,
2143
- selection: i.selection,
2144
- onLoad: l[3] || (l[3] = (x) => a(!0))
2145
- }, null, 8, ["selection"])) : u("application/pdf") ? (n(), H(da, {
2134
+ selection: l.selection,
2135
+ onLoad: f[3] || (f[3] = (y) => n(!0))
2136
+ }, null, 8, ["selection"])) : p("application/pdf") ? (r(), N(dn, {
2146
2137
  key: 4,
2147
- selection: i.selection,
2148
- onLoad: l[4] || (l[4] = (x) => a(!0))
2149
- }, null, 8, ["selection"])) : (n(), H(Kr, {
2138
+ selection: l.selection,
2139
+ onLoad: f[4] || (f[4] = (y) => n(!0))
2140
+ }, null, 8, ["selection"])) : (r(), N(Ja, {
2150
2141
  key: 5,
2151
- selection: i.selection,
2152
- onLoad: l[5] || (l[5] = (x) => a(!0))
2142
+ selection: l.selection,
2143
+ onLoad: f[5] || (f[5] = (y) => n(!0))
2153
2144
  }, null, 8, ["selection"]))
2154
2145
  ]),
2155
- e("div", ma, [
2156
- p.value == !1 ? (n(), m("div", va, [
2157
- pa,
2158
- e("span", null, v(r(o)("Loading")), 1)
2159
- ])) : F("", !0)
2146
+ e("div", mn, [
2147
+ i.value == !1 ? (r(), v("div", vn, [
2148
+ pn,
2149
+ e("span", null, u(a(o)("Loading")), 1)
2150
+ ])) : V("", !0)
2160
2151
  ])
2161
2152
  ])
2162
2153
  ]),
2163
- e("div", fa, [
2154
+ e("div", hn, [
2164
2155
  e("div", null, [
2165
- e("span", ga, v(r(o)("File Size")) + ": ", 1),
2166
- T(v(r(ye)(i.selection.item.file_size)), 1)
2156
+ e("span", fn, u(a(o)("File Size")) + ": ", 1),
2157
+ U(u(a(m)(l.selection.item.file_size)), 1)
2167
2158
  ]),
2168
2159
  e("div", null, [
2169
- e("span", ha, v(r(o)("Last Modified")) + ": ", 1),
2170
- T(" " + v(r(De)(i.selection.item.last_modified)), 1)
2160
+ e("span", gn, u(a(o)("Last Modified")) + ": ", 1),
2161
+ U(" " + u(a(Ee)(l.selection.item.last_modified)), 1)
2171
2162
  ])
2172
2163
  ])
2173
2164
  ]),
2174
2165
  _: 1
2175
2166
  }));
2176
2167
  }
2177
- }), ba = { class: "sm:flex sm:items-start" }, wa = /* @__PURE__ */ e("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" }, [
2168
+ }), xn = { class: "sm:flex sm:items-start" }, bn = /* @__PURE__ */ e("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" }, [
2178
2169
  /* @__PURE__ */ e("svg", {
2179
2170
  xmlns: "http://www.w3.org/2000/svg",
2180
2171
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2189,10 +2180,10 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2189
2180
  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"
2190
2181
  })
2191
2182
  ])
2192
- ], -1), ya = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, _a = {
2183
+ ], -1), wn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, yn = {
2193
2184
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2194
2185
  id: "modal-title"
2195
- }, $a = { class: "mt-2" }, ja = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Ca = {
2186
+ }, $n = { class: "mt-2" }, Cn = { class: "flex text-sm text-gray-800 dark:text-gray-400 py-2" }, Mn = {
2196
2187
  key: 0,
2197
2188
  xmlns: "http://www.w3.org/2000/svg",
2198
2189
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2200,13 +2191,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2200
2191
  viewBox: "0 0 24 24",
2201
2192
  stroke: "currentColor",
2202
2193
  "stroke-width": "1"
2203
- }, Ma = /* @__PURE__ */ e("path", {
2194
+ }, jn = /* @__PURE__ */ e("path", {
2204
2195
  "stroke-linecap": "round",
2205
2196
  "stroke-linejoin": "round",
2206
2197
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2207
- }, null, -1), Sa = [
2208
- Ma
2209
- ], Da = {
2198
+ }, null, -1), Sn = [
2199
+ jn
2200
+ ], Dn = {
2210
2201
  key: 1,
2211
2202
  xmlns: "http://www.w3.org/2000/svg",
2212
2203
  class: "h-5 w-5 text-neutral-500",
@@ -2214,81 +2205,81 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2214
2205
  viewBox: "0 0 24 24",
2215
2206
  stroke: "currentColor",
2216
2207
  "stroke-width": "1"
2217
- }, Oa = /* @__PURE__ */ e("path", {
2208
+ }, On = /* @__PURE__ */ e("path", {
2218
2209
  "stroke-linecap": "round",
2219
2210
  "stroke-linejoin": "round",
2220
2211
  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"
2221
- }, null, -1), za = [
2222
- Oa
2223
- ], Ea = { class: "ml-1.5" }, Fa = {
2212
+ }, null, -1), zn = [
2213
+ On
2214
+ ], En = { class: "ml-1.5" }, Fn = {
2224
2215
  name: "VFModalRename"
2225
- }, La = /* @__PURE__ */ Object.assign(Fa, {
2216
+ }, Vn = /* @__PURE__ */ Object.assign(Fn, {
2226
2217
  props: {
2227
2218
  selection: Object,
2228
2219
  current: Object
2229
2220
  },
2230
- setup(i) {
2231
- const t = b("emitter");
2232
- b("storage");
2233
- const s = b("adapter"), { t: o } = b("i18n"), p = i, a = k(p.selection.items[0]), c = k(p.selection.items[0].basename), u = k(""), f = () => {
2234
- c.value != "" && t.emit("vf-fetch", {
2221
+ setup(l) {
2222
+ const t = k("emitter");
2223
+ k("storage");
2224
+ const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(i.selection.items[0]), n = g(i.selection.items[0].basename), h = g(""), p = () => {
2225
+ n.value != "" && t.emit("vf-fetch", {
2235
2226
  params: {
2236
2227
  q: "rename",
2237
2228
  adapter: s.value,
2238
- path: p.current.dirname,
2239
- item: a.value.path,
2240
- name: c.value
2229
+ path: i.current.dirname,
2230
+ item: m.value.path,
2231
+ name: n.value
2241
2232
  },
2242
2233
  onSuccess: () => {
2243
- t.emit("vf-toast-push", { label: o("%s is renamed.", c.value) });
2234
+ t.emit("vf-toast-push", { label: o("%s is renamed.", n.value) });
2244
2235
  },
2245
- onError: (d) => {
2246
- u.value = o(d.message);
2236
+ onError: (c) => {
2237
+ h.value = o(c.message);
2247
2238
  }
2248
2239
  });
2249
2240
  };
2250
- return (d, l) => (n(), H(J, null, {
2251
- buttons: N(() => [
2241
+ return (c, d) => (r(), N(W, null, {
2242
+ buttons: E(() => [
2252
2243
  e("button", {
2253
2244
  type: "button",
2254
- onClick: f,
2255
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
2256
- }, v(r(o)("Rename")), 1),
2245
+ onClick: p,
2246
+ class: "vf-btn vf-btn-primary"
2247
+ }, u(a(o)("Rename")), 1),
2257
2248
  e("button", {
2258
2249
  type: "button",
2259
- onClick: l[2] || (l[2] = (x) => r(t).emit("vf-modal-close")),
2260
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2261
- }, v(r(o)("Cancel")), 1)
2250
+ onClick: d[2] || (d[2] = (f) => a(t).emit("vf-modal-close")),
2251
+ class: "vf-btn vf-btn-secondary"
2252
+ }, u(a(o)("Cancel")), 1)
2262
2253
  ]),
2263
- default: N(() => [
2264
- e("div", ba, [
2265
- wa,
2266
- e("div", ya, [
2267
- e("h3", _a, v(r(o)("Rename")), 1),
2268
- e("div", $a, [
2269
- e("p", ja, [
2270
- a.value.type == "dir" ? (n(), m("svg", Ca, Sa)) : (n(), m("svg", Da, za)),
2271
- e("span", Ea, v(a.value.basename), 1)
2254
+ default: E(() => [
2255
+ e("div", xn, [
2256
+ bn,
2257
+ e("div", wn, [
2258
+ e("h3", yn, u(a(o)("Rename")), 1),
2259
+ e("div", $n, [
2260
+ e("p", Cn, [
2261
+ m.value.type == "dir" ? (r(), v("svg", Mn, Sn)) : (r(), v("svg", Dn, zn)),
2262
+ e("span", En, u(m.value.basename), 1)
2272
2263
  ]),
2273
- q(e("input", {
2274
- "onUpdate:modelValue": l[0] || (l[0] = (x) => c.value = x),
2275
- onKeyup: se(f, ["enter"]),
2264
+ R(e("input", {
2265
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f),
2266
+ onKeyup: se(p, ["enter"]),
2276
2267
  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",
2277
2268
  placeholder: "Name",
2278
2269
  type: "text"
2279
2270
  }, null, 544), [
2280
- [re, c.value]
2271
+ [ae, n.value]
2281
2272
  ]),
2282
- u.value.length ? (n(), H(W, {
2273
+ h.value.length ? (r(), N(Q, {
2283
2274
  key: 0,
2284
- onHidden: l[1] || (l[1] = (x) => u.value = ""),
2275
+ onHidden: d[1] || (d[1] = (f) => h.value = ""),
2285
2276
  error: ""
2286
2277
  }, {
2287
- default: N(() => [
2288
- T(v(u.value), 1)
2278
+ default: E(() => [
2279
+ U(u(h.value), 1)
2289
2280
  ]),
2290
2281
  _: 1
2291
- })) : F("", !0)
2282
+ })) : V("", !0)
2292
2283
  ])
2293
2284
  ])
2294
2285
  ])
@@ -2296,7 +2287,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2296
2287
  _: 1
2297
2288
  }));
2298
2289
  }
2299
- }), Va = { class: "sm:flex sm:items-start" }, Na = /* @__PURE__ */ e("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" }, [
2290
+ }), Bn = { class: "sm:flex sm:items-start" }, An = /* @__PURE__ */ e("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" }, [
2300
2291
  /* @__PURE__ */ e("svg", {
2301
2292
  xmlns: "http://www.w3.org/2000/svg",
2302
2293
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2311,19 +2302,19 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2311
2302
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
2312
2303
  })
2313
2304
  ])
2314
- ], -1), Ba = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Aa = {
2305
+ ], -1), Ln = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Nn = {
2315
2306
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2316
2307
  id: "modal-title"
2317
- }, Ha = { class: "mt-2" }, Ta = {
2308
+ }, Un = { class: "mt-2" }, Tn = {
2318
2309
  key: 0,
2319
2310
  class: "pointer-events-none"
2320
- }, Ua = {
2311
+ }, Hn = {
2321
2312
  key: 1,
2322
2313
  class: "pointer-events-none"
2323
- }, Ia = ["disabled"], qa = ["disabled"], Ra = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Pa = { 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" }, Ga = ["textContent"], Ya = { class: "ml-1 w-full h-fit" }, Ja = { class: "text-left hidden md:block" }, Ka = { class: "text-left md:hidden" }, Wa = {
2314
+ }, In = ["disabled"], qn = ["disabled"], Rn = { class: "text-gray-500 text-sm mb-1 pr-1 max-h-[200px] overflow-y-auto vf-scrollbar" }, Pn = { 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" }, Gn = ["textContent"], Yn = { class: "ml-1 w-full h-fit" }, Jn = { class: "text-left hidden md:block" }, Kn = { class: "text-left md:hidden" }, Wn = {
2324
2315
  key: 0,
2325
2316
  class: "ml-auto"
2326
- }, Xa = ["title", "disabled", "onClick"], Qa = /* @__PURE__ */ e("svg", {
2317
+ }, Xn = ["title", "disabled", "onClick"], Qn = /* @__PURE__ */ e("svg", {
2327
2318
  xmlns: "http://www.w3.org/2000/svg",
2328
2319
  fill: "none",
2329
2320
  viewBox: "0 0 24 24",
@@ -2336,307 +2327,318 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2336
2327
  "stroke-linejoin": "round",
2337
2328
  d: "M6 18L18 6M6 6l12 12"
2338
2329
  })
2339
- ], -1), Za = [
2340
- Qa
2341
- ], en = {
2330
+ ], -1), Zn = [
2331
+ Qn
2332
+ ], er = {
2342
2333
  key: 0,
2343
2334
  class: "py-2"
2344
- }, tn = ["disabled"], on = {
2335
+ }, tr = ["disabled"], or = {
2345
2336
  name: "VFModalUpload"
2346
- }, sn = /* @__PURE__ */ Object.assign(on, {
2337
+ }, sr = /* @__PURE__ */ Object.assign(or, {
2347
2338
  props: {
2348
2339
  current: Object
2349
2340
  },
2350
- setup(i) {
2351
- const { apiUrl: t } = Y(), s = b("emitter"), { t: o, getLocale: p } = b("i18n"), a = b("maxFileSize"), c = b("postData"), u = i, f = o("uppy"), d = {
2341
+ setup(l) {
2342
+ const { apiUrl: t } = X(), s = k("emitter"), { t: o } = k("i18n"), i = k("maxFileSize"), m = k("postData"), n = k("filesize"), h = l, p = o("uppy"), c = {
2352
2343
  PENDING: 0,
2353
2344
  CANCELED: 1,
2354
2345
  UPLOADING: 2,
2355
2346
  ERROR: 3,
2356
2347
  DONE: 10
2357
- }, l = k({ QUEUE_ENTRY_STATUS: d }), x = k(null), w = k(null), C = k(null), y = k(null), $ = k(null), z = k(null), M = k([]), O = k(""), j = k(!1), L = k(!1);
2358
- let V;
2359
- function D(h) {
2360
- return M.value.findIndex((B) => B.id === h);
2348
+ }, d = g({ QUEUE_ENTRY_STATUS: c }), f = g(null), y = g(null), w = g(null), B = g(null), O = g(null), D = g(null), S = g([]), F = g(""), M = g(!1), j = g(!1);
2349
+ let z;
2350
+ function I(b) {
2351
+ return S.value.findIndex((_) => _.id === b);
2361
2352
  }
2362
- function Z(h, B = null) {
2363
- B = B ?? (h.webkitRelativePath || h.name), V.addFile({
2364
- name: B,
2365
- type: h.type,
2366
- data: h,
2353
+ function A(b, _ = null) {
2354
+ _ = _ ?? (b.webkitRelativePath || b.name), z.addFile({
2355
+ name: _,
2356
+ type: b.type,
2357
+ data: b,
2367
2358
  source: "Local"
2368
2359
  });
2369
2360
  }
2370
- function ee(h) {
2371
- switch (h.status) {
2372
- case d.DONE:
2361
+ function ee(b) {
2362
+ switch (b.status) {
2363
+ case c.DONE:
2373
2364
  return "text-green-600";
2374
- case d.ERROR:
2365
+ case c.ERROR:
2375
2366
  return "text-red-600";
2376
- case d.CANCELED:
2367
+ case c.CANCELED:
2377
2368
  return "text-red-600";
2378
- case d.PENDING:
2369
+ case c.PENDING:
2379
2370
  default:
2380
2371
  return "";
2381
2372
  }
2382
2373
  }
2383
- const X = (h) => {
2384
- switch (h.status) {
2385
- case d.DONE:
2374
+ const G = (b) => {
2375
+ switch (b.status) {
2376
+ case c.DONE:
2386
2377
  return "✓";
2387
- case d.ERROR:
2388
- case d.CANCELED:
2378
+ case c.ERROR:
2379
+ case c.CANCELED:
2389
2380
  return "!";
2390
- case d.PENDING:
2381
+ case c.PENDING:
2391
2382
  default:
2392
2383
  return "...";
2393
2384
  }
2394
2385
  };
2395
- function ne() {
2396
- y.value.click();
2386
+ function te() {
2387
+ B.value.click();
2397
2388
  }
2398
- function le() {
2399
- if (!j.value) {
2400
- if (!M.value.filter((h) => h.status !== d.DONE).length) {
2401
- O.value = o("Please select file to upload first.");
2389
+ function ie() {
2390
+ if (!M.value) {
2391
+ if (!S.value.filter((b) => b.status !== c.DONE).length) {
2392
+ F.value = o("Please select file to upload first.");
2402
2393
  return;
2403
2394
  }
2404
- O.value = "", V.retryAll(), V.upload();
2395
+ F.value = "", z.retryAll(), z.upload();
2405
2396
  }
2406
2397
  }
2407
- function ie() {
2408
- V.cancelAll({ reason: "user" }), M.value.forEach((h) => {
2409
- h.status !== d.DONE && (h.status = d.CANCELED, h.statusName = o("Canceled"));
2410
- }), j.value = !1;
2398
+ function de() {
2399
+ z.cancelAll({ reason: "user" }), S.value.forEach((b) => {
2400
+ b.status !== c.DONE && (b.status = c.CANCELED, b.statusName = o("Canceled"));
2401
+ }), M.value = !1;
2411
2402
  }
2412
- function fe(h) {
2413
- j.value || (V.removeFile(h.id, "removed-by-user"), M.value.splice(D(h.id), 1));
2403
+ function ne(b) {
2404
+ M.value || (z.removeFile(b.id, "removed-by-user"), S.value.splice(I(b.id), 1));
2414
2405
  }
2415
- function _(h) {
2416
- if (!j.value) {
2417
- if (V.cancelAll({ reason: "user" }), h) {
2418
- const B = [];
2419
- M.value.forEach((g) => {
2420
- g.status !== d.DONE && B.push(g);
2421
- }), M.value = [], B.forEach((g) => {
2422
- Z(g.originalFile, g.name);
2406
+ function ce(b) {
2407
+ if (!M.value) {
2408
+ if (z.cancelAll({ reason: "user" }), b) {
2409
+ const _ = [];
2410
+ S.value.forEach((x) => {
2411
+ x.status !== c.DONE && _.push(x);
2412
+ }), S.value = [], _.forEach((x) => {
2413
+ A(x.originalFile, x.name);
2423
2414
  });
2424
2415
  return;
2425
2416
  }
2426
- M.value.splice(0);
2417
+ S.value.splice(0);
2427
2418
  }
2428
2419
  }
2429
- function S() {
2420
+ function C() {
2430
2421
  s.emit("vf-modal-close");
2431
2422
  }
2432
- return G(async () => {
2433
- V = new Ue({
2423
+ return K(async () => {
2424
+ z = new Pe({
2434
2425
  debug: process.env.NODE_ENV === "development",
2435
2426
  restrictions: {
2436
- maxFileSize: Et(a)
2427
+ maxFileSize: Os(i)
2437
2428
  //maxNumberOfFiles
2438
2429
  //allowedFileTypes
2439
2430
  },
2440
- locale: f,
2441
- onBeforeFileAdded(g, E) {
2442
- if (E[g.id] != null) {
2443
- const te = D(g.id);
2444
- M.value[te].status === d.PENDING && (O.value = V.i18n("noDuplicates", { fileName: g.name })), M.value = M.value.filter((ge) => ge.id !== g.id);
2431
+ locale: p,
2432
+ onBeforeFileAdded(x, $) {
2433
+ if ($[x.id] != null) {
2434
+ const q = I(x.id);
2435
+ S.value[q].status === c.PENDING && (F.value = z.i18n("noDuplicates", { fileName: x.name })), S.value = S.value.filter((ke) => ke.id !== x.id);
2445
2436
  }
2446
- return M.value.push({
2447
- id: g.id,
2448
- name: g.name,
2449
- size: ye(g.size),
2450
- status: d.PENDING,
2437
+ return S.value.push({
2438
+ id: x.id,
2439
+ name: x.name,
2440
+ size: n.value(x.size),
2441
+ status: c.PENDING,
2451
2442
  statusName: o("Pending upload"),
2452
2443
  percent: null,
2453
- originalFile: g.data
2444
+ originalFile: x.data
2454
2445
  }), !0;
2455
2446
  }
2456
- }), V.use(Ie, {
2447
+ }), z.use(Ge, {
2457
2448
  method: "post",
2458
- endpoint: t.value + "?" + oe(Object.assign(c, { q: "upload", adapter: u.current.adapter, path: u.current.dirname })),
2449
+ endpoint: t.value + "?" + oe(Object.assign(m, { q: "upload", adapter: h.current.adapter, path: h.current.dirname })),
2459
2450
  headers: {
2460
- ...ue && { "X-CSRF-Token": ue }
2451
+ ...he && { "X-CSRF-Token": he }
2461
2452
  },
2462
2453
  limit: 5,
2463
2454
  timeout: 0,
2464
- getResponseError(g, E) {
2465
- let A;
2455
+ getResponseError(x, $) {
2456
+ let L;
2466
2457
  try {
2467
- A = JSON.parse(g).message;
2458
+ L = JSON.parse(x).message;
2468
2459
  } catch {
2469
- A = o("Cannot parse server response.");
2460
+ L = o("Cannot parse server response.");
2470
2461
  }
2471
- return new Error(A);
2462
+ return new Error(L);
2472
2463
  }
2473
- }), V.on("restriction-failed", (g, E) => {
2474
- O.value = E.message;
2475
- }), V.on("upload", () => {
2476
- j.value = !0, M.value.forEach((g) => {
2477
- g.status !== d.DONE && (g.percent = null, g.status = d.UPLOADING, g.statusName = o("Pending upload"));
2464
+ }), z.on("restriction-failed", (x, $) => {
2465
+ const L = S.value[I(x.id)];
2466
+ ne(L), F.value = $.message;
2467
+ }), z.on("upload", () => {
2468
+ M.value = !0, S.value.forEach((x) => {
2469
+ x.status !== c.DONE && (x.percent = null, x.status = c.UPLOADING, x.statusName = o("Pending upload"));
2478
2470
  });
2479
- }), V.on("upload-progress", (g, E) => {
2480
- const A = Math.floor(E.bytesUploaded / E.bytesTotal * 100);
2481
- M.value[D(g.id)].percent = `${A}%`;
2482
- }), V.on("upload-success", (g) => {
2483
- const E = M.value[D(g.id)];
2484
- E.status = d.DONE, E.statusName = o("Done");
2485
- }), V.on("upload-error", (g, E) => {
2486
- const A = M.value[D(g.id)];
2487
- A.percent = null, A.status = d.ERROR, E.isNetworkError ? A.statusName = o("Network Error, Unable establish connection to the server or interrupted.") : A.statusName = E ? E.message : o("Unknown Error");
2488
- }), V.on("error", (g) => {
2489
- O.value = g.message, j.value = !1, s.emit("vf-fetch", {
2490
- params: { q: "index", adapter: u.current.adapter, path: u.current.dirname },
2471
+ }), z.on("upload-progress", (x, $) => {
2472
+ const L = Math.floor($.bytesUploaded / $.bytesTotal * 100);
2473
+ S.value[I(x.id)].percent = `${L}%`;
2474
+ }), z.on("upload-success", (x) => {
2475
+ const $ = S.value[I(x.id)];
2476
+ $.status = c.DONE, $.statusName = o("Done");
2477
+ }), z.on("upload-error", (x, $) => {
2478
+ const L = S.value[I(x.id)];
2479
+ L.percent = null, L.status = c.ERROR, $.isNetworkError ? L.statusName = o("Network Error, Unable establish connection to the server or interrupted.") : L.statusName = $ ? $.message : o("Unknown Error");
2480
+ }), z.on("error", (x) => {
2481
+ F.value = x.message, M.value = !1, s.emit("vf-fetch", {
2482
+ params: { q: "index", adapter: h.current.adapter, path: h.current.dirname },
2491
2483
  noCloseModal: !0
2492
2484
  });
2493
- }), V.on("complete", () => {
2494
- j.value = !1, s.emit("vf-fetch", {
2495
- params: { q: "index", adapter: u.current.adapter, path: u.current.dirname },
2485
+ }), z.on("complete", () => {
2486
+ M.value = !1, s.emit("vf-fetch", {
2487
+ params: { q: "index", adapter: h.current.adapter, path: h.current.dirname },
2496
2488
  noCloseModal: !0
2497
2489
  });
2498
- }), y.value.addEventListener("click", () => {
2490
+ }), B.value.addEventListener("click", () => {
2491
+ y.value.click();
2492
+ }), O.value.addEventListener("click", () => {
2499
2493
  w.value.click();
2500
- }), $.value.addEventListener("click", () => {
2501
- C.value.click();
2502
- }), z.value.addEventListener("dragover", (g) => {
2503
- g.preventDefault(), L.value = !0;
2504
- }), z.value.addEventListener("dragleave", (g) => {
2505
- g.preventDefault(), L.value = !1;
2494
+ }), D.value.addEventListener("dragover", (x) => {
2495
+ x.preventDefault(), j.value = !0;
2496
+ }), D.value.addEventListener("dragleave", (x) => {
2497
+ x.preventDefault(), j.value = !1;
2506
2498
  });
2507
- function h(g, E) {
2508
- E.isFile && E.file((A) => g(E, A)), E.isDirectory && E.createReader().readEntries((A) => {
2509
- A.forEach((te) => {
2510
- h(g, te);
2499
+ function b(x, $) {
2500
+ $.isFile && $.file((L) => x($, L)), $.isDirectory && $.createReader().readEntries((L) => {
2501
+ L.forEach((q) => {
2502
+ b(x, q);
2511
2503
  });
2512
2504
  });
2513
2505
  }
2514
- z.value.addEventListener("drop", (g) => {
2515
- g.preventDefault(), L.value = !1;
2516
- const E = /^[/\\](.+)/;
2517
- [...g.dataTransfer.items].forEach((A) => {
2518
- A.kind === "file" && h((te, ge) => {
2519
- const Oe = E.exec(te.fullPath);
2520
- Z(ge, Oe[1]);
2521
- }, A.webkitGetAsEntry());
2506
+ D.value.addEventListener("drop", (x) => {
2507
+ x.preventDefault(), j.value = !1;
2508
+ const $ = /^[/\\](.+)/;
2509
+ [...x.dataTransfer.items].forEach((L) => {
2510
+ L.kind === "file" && b((q, ke) => {
2511
+ const Fe = $.exec(q.fullPath);
2512
+ A(ke, Fe[1]);
2513
+ }, L.webkitGetAsEntry());
2522
2514
  });
2523
2515
  });
2524
- const B = ({ target: g }) => {
2525
- const E = g.files;
2526
- for (const A of E)
2527
- Z(A);
2516
+ const _ = ({ target: x }) => {
2517
+ const $ = x.files;
2518
+ for (const L of $)
2519
+ A(L);
2528
2520
  };
2529
- w.value.addEventListener("change", B), C.value.addEventListener("change", B);
2530
- }), Ce(() => {
2531
- V == null || V.close({ reason: "unmount" });
2532
- }), (h, B) => (n(), H(J, null, {
2533
- buttons: N(() => [
2521
+ y.value.addEventListener("change", _), w.value.addEventListener("change", _);
2522
+ }), Oe(() => {
2523
+ z == null || z.close({ reason: "unmount" });
2524
+ }), (b, _) => (r(), N(W, null, {
2525
+ buttons: E(() => [
2534
2526
  e("button", {
2535
2527
  type: "button",
2536
- class: U(["w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 dark:text-gray-50 sm:ml-3 sm:w-auto sm:text-sm", j.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"]),
2537
- disabled: j.value,
2538
- onClick: K(le, ["prevent"])
2539
- }, v(r(o)("Upload")), 11, tn),
2540
- j.value ? (n(), m("button", {
2528
+ class: T(["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"]),
2529
+ disabled: M.value,
2530
+ onClick: Z(ie, ["prevent"])
2531
+ }, u(a(o)("Upload")), 11, tr),
2532
+ M.value ? (r(), v("button", {
2541
2533
  key: 0,
2542
2534
  type: "button",
2543
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",
2544
- onClick: K(ie, ["prevent"])
2545
- }, v(r(o)("Cancel")), 1)) : (n(), m("button", {
2535
+ class: "vf-btn vf-btn-secondary",
2536
+ onClick: Z(de, ["prevent"])
2537
+ }, u(a(o)("Cancel")), 1)) : (r(), v("button", {
2546
2538
  key: 1,
2547
2539
  type: "button",
2548
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",
2549
- onClick: K(S, ["prevent"])
2550
- }, v(r(o)("Close")), 1))
2540
+ class: "vf-btn vf-btn-secondary",
2541
+ onClick: Z(C, ["prevent"])
2542
+ }, u(a(o)("Close")), 1))
2551
2543
  ]),
2552
- default: N(() => [
2553
- e("div", Va, [
2554
- Na,
2555
- e("div", Ba, [
2556
- e("h3", Aa, v(r(o)("Upload Files")), 1),
2557
- e("div", Ha, [
2544
+ default: E(() => [
2545
+ e("div", Bn, [
2546
+ An,
2547
+ e("div", Ln, [
2548
+ e("h3", Nn, u(a(o)("Upload Files")), 1),
2549
+ e("div", Un, [
2558
2550
  e("div", {
2559
2551
  ref_key: "dropArea",
2560
- ref: z,
2552
+ ref: D,
2561
2553
  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]",
2562
- onClick: ne
2554
+ onClick: te
2563
2555
  }, [
2564
- L.value ? (n(), m("div", Ta, v(r(o)("Release to drop these files.")), 1)) : (n(), m("div", Ua, v(r(o)("Drag and drop the files/folders to here or click here.")), 1))
2556
+ j.value ? (r(), v("div", Tn, u(a(o)("Release to drop these files.")), 1)) : (r(), v("div", Hn, u(a(o)("Drag and drop the files/folders to here or click here.")), 1))
2565
2557
  ], 512),
2566
2558
  e("div", {
2567
2559
  ref_key: "container",
2568
- ref: x,
2560
+ ref: f,
2569
2561
  class: "text-gray-500 mb-1"
2570
2562
  }, [
2571
2563
  e("button", {
2572
2564
  ref_key: "pickFiles",
2573
- ref: y,
2565
+ ref: B,
2574
2566
  type: "button",
2575
- class: "w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 sm:mt-0 sm:w-auto sm:text-sm"
2576
- }, v(r(o)("Select Files")), 513),
2567
+ class: "vf-btn vf-btn-secondary"
2568
+ }, u(a(o)("Select Files")), 513),
2577
2569
  e("button", {
2578
2570
  ref_key: "pickFolders",
2579
- ref: $,
2571
+ ref: O,
2580
2572
  type: "button",
2581
- class: "w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2582
- }, v(r(o)("Select Folders")), 513),
2573
+ class: "vf-btn vf-btn-secondary"
2574
+ }, u(a(o)("Select Folders")), 513),
2583
2575
  e("button", {
2584
2576
  type: "button",
2585
- class: "w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",
2586
- disabled: j.value,
2587
- onClick: B[0] || (B[0] = (g) => _(!1))
2588
- }, v(r(o)("Clear all")), 9, Ia),
2577
+ class: "vf-btn vf-btn-secondary",
2578
+ disabled: M.value,
2579
+ onClick: _[0] || (_[0] = (x) => ce(!1))
2580
+ }, u(a(o)("Clear all")), 9, In),
2589
2581
  e("button", {
2590
2582
  type: "button",
2591
- class: "w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 disabled:cursor-not-allowed sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",
2592
- disabled: j.value,
2593
- onClick: B[1] || (B[1] = (g) => _(!0))
2594
- }, v(r(o)("Clear only successful")), 9, qa)
2583
+ class: "vf-btn vf-btn-secondary",
2584
+ disabled: M.value,
2585
+ onClick: _[1] || (_[1] = (x) => ce(!0))
2586
+ }, u(a(o)("Clear only successful")), 9, qn)
2595
2587
  ], 512),
2596
- e("div", Ra, [
2597
- (n(!0), m(I, null, R(M.value, (g) => (n(), m("div", {
2588
+ e("div", Rn, [
2589
+ (r(!0), v(H, null, J(S.value, (x) => (r(), v("div", {
2598
2590
  class: "flex hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300",
2599
- key: g.id
2591
+ key: x.id
2600
2592
  }, [
2601
- e("span", Pa, [
2593
+ e("span", Pn, [
2602
2594
  e("span", {
2603
- class: U(["text-base m-auto", ee(g)]),
2604
- textContent: v(X(g))
2605
- }, null, 10, Ga)
2595
+ class: T(["text-base m-auto", ee(x)]),
2596
+ textContent: u(G(x))
2597
+ }, null, 10, Gn)
2606
2598
  ]),
2607
- e("div", Ya, [
2608
- e("div", Ja, v(r(we)(g.name, 40)) + " (" + v(g.size) + ")", 1),
2609
- e("div", Ka, v(r(we)(g.name, 16)) + " (" + v(g.size) + ")", 1),
2599
+ e("div", Yn, [
2600
+ e("div", Jn, u(a(we)(x.name, 40)) + " (" + u(x.size) + ")", 1),
2601
+ e("div", Kn, u(a(we)(x.name, 16)) + " (" + u(x.size) + ")", 1),
2610
2602
  e("div", {
2611
- class: U(["flex break-all text-left", ee(g)])
2603
+ class: T(["flex break-all text-left", ee(x)])
2612
2604
  }, [
2613
- T(v(g.statusName) + " ", 1),
2614
- g.status === l.value.QUEUE_ENTRY_STATUS.UPLOADING ? (n(), m("b", Wa, v(g.percent), 1)) : F("", !0)
2605
+ U(u(x.statusName) + " ", 1),
2606
+ x.status === d.value.QUEUE_ENTRY_STATUS.UPLOADING ? (r(), v("b", Wn, u(x.percent), 1)) : V("", !0)
2615
2607
  ], 2)
2616
2608
  ]),
2617
2609
  e("button", {
2618
2610
  type: "button",
2619
- 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", j.value ? "disabled:bg-gray-100 text-white text-opacity-50" : "bg-gray-100"]),
2620
- title: r(o)("Delete"),
2621
- disabled: j.value,
2622
- onClick: (E) => fe(g)
2623
- }, Za, 10, Xa)
2611
+ class: T(["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"]),
2612
+ title: a(o)("Delete"),
2613
+ disabled: M.value,
2614
+ onClick: ($) => ne(x)
2615
+ }, Zn, 10, Xn)
2624
2616
  ]))), 128)),
2625
- M.value.length ? F("", !0) : (n(), m("div", en, v(r(o)("No files selected!")), 1))
2626
- ])
2617
+ S.value.length ? V("", !0) : (r(), v("div", er, u(a(o)("No files selected!")), 1))
2618
+ ]),
2619
+ F.value.length ? (r(), N(Q, {
2620
+ key: 0,
2621
+ onHidden: _[2] || (_[2] = (x) => F.value = ""),
2622
+ error: ""
2623
+ }, {
2624
+ default: E(() => [
2625
+ U(u(F.value), 1)
2626
+ ]),
2627
+ _: 1
2628
+ })) : V("", !0)
2627
2629
  ])
2628
2630
  ])
2629
2631
  ]),
2630
2632
  e("input", {
2631
2633
  ref_key: "internalFileInput",
2632
- ref: w,
2634
+ ref: y,
2633
2635
  type: "file",
2634
2636
  multiple: "",
2635
2637
  class: "hidden"
2636
2638
  }, null, 512),
2637
2639
  e("input", {
2638
2640
  ref_key: "internalFolderInput",
2639
- ref: C,
2641
+ ref: w,
2640
2642
  type: "file",
2641
2643
  multiple: "",
2642
2644
  webkitdirectory: "",
@@ -2646,7 +2648,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2646
2648
  _: 1
2647
2649
  }));
2648
2650
  }
2649
- }), rn = { class: "sm:flex sm:items-start" }, an = /* @__PURE__ */ e("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" }, [
2651
+ }), ar = { class: "sm:flex sm:items-start" }, nr = /* @__PURE__ */ e("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" }, [
2650
2652
  /* @__PURE__ */ e("svg", {
2651
2653
  xmlns: "http://www.w3.org/2000/svg",
2652
2654
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2661,13 +2663,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2661
2663
  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"
2662
2664
  })
2663
2665
  ])
2664
- ], -1), nn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, ln = {
2666
+ ], -1), rr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, lr = {
2665
2667
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2666
2668
  id: "modal-title"
2667
- }, dn = { class: "mt-2" }, cn = {
2668
- class: "text-gray-500 text-sm mb-1 overflow-auto",
2669
+ }, ir = { class: "mt-2" }, dr = {
2670
+ class: "text-gray-500 text-sm mb-1 overflow-auto vf-scrollbar",
2669
2671
  style: { "max-height": "200px" }
2670
- }, un = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, mn = {
2672
+ }, cr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, ur = {
2671
2673
  key: 0,
2672
2674
  xmlns: "http://www.w3.org/2000/svg",
2673
2675
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2675,13 +2677,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2675
2677
  viewBox: "0 0 24 24",
2676
2678
  stroke: "currentColor",
2677
2679
  "stroke-width": "1"
2678
- }, vn = /* @__PURE__ */ e("path", {
2680
+ }, mr = /* @__PURE__ */ e("path", {
2679
2681
  "stroke-linecap": "round",
2680
2682
  "stroke-linejoin": "round",
2681
2683
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2682
- }, null, -1), pn = [
2683
- vn
2684
- ], fn = {
2684
+ }, null, -1), vr = [
2685
+ mr
2686
+ ], pr = {
2685
2687
  key: 1,
2686
2688
  xmlns: "http://www.w3.org/2000/svg",
2687
2689
  class: "h-5 w-5 text-neutral-500",
@@ -2689,83 +2691,83 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2689
2691
  viewBox: "0 0 24 24",
2690
2692
  stroke: "currentColor",
2691
2693
  "stroke-width": "1"
2692
- }, gn = /* @__PURE__ */ e("path", {
2694
+ }, hr = /* @__PURE__ */ e("path", {
2693
2695
  "stroke-linecap": "round",
2694
2696
  "stroke-linejoin": "round",
2695
2697
  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"
2696
- }, null, -1), hn = [
2697
- gn
2698
- ], kn = { class: "ml-1.5" }, xn = ["placeholder"], bn = {
2698
+ }, null, -1), fr = [
2699
+ hr
2700
+ ], gr = { class: "ml-1.5" }, kr = ["placeholder"], _r = {
2699
2701
  name: "VFModalArchive"
2700
- }, wn = /* @__PURE__ */ Object.assign(bn, {
2702
+ }, xr = /* @__PURE__ */ Object.assign(_r, {
2701
2703
  props: {
2702
2704
  selection: Object,
2703
2705
  current: Object
2704
2706
  },
2705
- setup(i) {
2706
- const t = b("emitter");
2707
- b("storage");
2708
- const s = b("adapter"), { t: o } = b("i18n"), p = i, a = k(""), c = k(""), u = k(p.selection.items), f = () => {
2709
- u.value.length && t.emit("vf-fetch", {
2707
+ setup(l) {
2708
+ const t = k("emitter");
2709
+ k("storage");
2710
+ const s = k("adapter"), { t: o } = k("i18n"), i = l, m = g(""), n = g(""), h = g(i.selection.items), p = () => {
2711
+ h.value.length && t.emit("vf-fetch", {
2710
2712
  params: {
2711
2713
  q: "archive",
2712
2714
  adapter: s.value,
2713
- path: p.current.dirname,
2714
- items: JSON.stringify(u.value.map(({ path: d, type: l }) => ({ path: d, type: l }))),
2715
- name: a.value
2715
+ path: i.current.dirname,
2716
+ items: JSON.stringify(h.value.map(({ path: c, type: d }) => ({ path: c, type: d }))),
2717
+ name: m.value
2716
2718
  },
2717
2719
  onSuccess: () => {
2718
2720
  t.emit("vf-toast-push", { label: o("The file(s) archived.") });
2719
2721
  },
2720
- onError: (d) => {
2721
- c.value = o(d.message);
2722
+ onError: (c) => {
2723
+ n.value = o(c.message);
2722
2724
  }
2723
2725
  });
2724
2726
  };
2725
- return (d, l) => (n(), H(J, null, {
2726
- buttons: N(() => [
2727
+ return (c, d) => (r(), N(W, null, {
2728
+ buttons: E(() => [
2727
2729
  e("button", {
2728
2730
  type: "button",
2729
- onClick: f,
2730
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
2731
- }, v(r(o)("Archive")), 1),
2731
+ onClick: p,
2732
+ class: "vf-btn vf-btn-primary"
2733
+ }, u(a(o)("Archive")), 1),
2732
2734
  e("button", {
2733
2735
  type: "button",
2734
- onClick: l[2] || (l[2] = (x) => r(t).emit("vf-modal-close")),
2735
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2736
- }, v(r(o)("Cancel")), 1)
2736
+ onClick: d[2] || (d[2] = (f) => a(t).emit("vf-modal-close")),
2737
+ class: "vf-btn vf-btn-secondary"
2738
+ }, u(a(o)("Cancel")), 1)
2737
2739
  ]),
2738
- default: N(() => [
2739
- e("div", rn, [
2740
- an,
2741
- e("div", nn, [
2742
- e("h3", ln, v(r(o)("Archive the files")), 1),
2743
- e("div", dn, [
2744
- e("div", cn, [
2745
- (n(!0), m(I, null, R(u.value, (x) => (n(), m("p", un, [
2746
- x.type == "dir" ? (n(), m("svg", mn, pn)) : (n(), m("svg", fn, hn)),
2747
- e("span", kn, v(x.basename), 1)
2740
+ default: E(() => [
2741
+ e("div", ar, [
2742
+ nr,
2743
+ e("div", rr, [
2744
+ e("h3", lr, u(a(o)("Archive the files")), 1),
2745
+ e("div", ir, [
2746
+ e("div", dr, [
2747
+ (r(!0), v(H, null, J(h.value, (f) => (r(), v("p", cr, [
2748
+ f.type == "dir" ? (r(), v("svg", ur, vr)) : (r(), v("svg", pr, fr)),
2749
+ e("span", gr, u(f.basename), 1)
2748
2750
  ]))), 256))
2749
2751
  ]),
2750
- q(e("input", {
2751
- "onUpdate:modelValue": l[0] || (l[0] = (x) => a.value = x),
2752
- onKeyup: se(f, ["enter"]),
2752
+ R(e("input", {
2753
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => m.value = f),
2754
+ onKeyup: se(p, ["enter"]),
2753
2755
  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",
2754
- placeholder: r(o)("Archive name. (.zip file will be created)"),
2756
+ placeholder: a(o)("Archive name. (.zip file will be created)"),
2755
2757
  type: "text"
2756
- }, null, 40, xn), [
2757
- [re, a.value]
2758
+ }, null, 40, kr), [
2759
+ [ae, m.value]
2758
2760
  ]),
2759
- c.value.length ? (n(), H(W, {
2761
+ n.value.length ? (r(), N(Q, {
2760
2762
  key: 0,
2761
- onHidden: l[1] || (l[1] = (x) => c.value = ""),
2763
+ onHidden: d[1] || (d[1] = (f) => n.value = ""),
2762
2764
  error: ""
2763
2765
  }, {
2764
- default: N(() => [
2765
- T(v(c.value), 1)
2766
+ default: E(() => [
2767
+ U(u(n.value), 1)
2766
2768
  ]),
2767
2769
  _: 1
2768
- })) : F("", !0)
2770
+ })) : V("", !0)
2769
2771
  ])
2770
2772
  ])
2771
2773
  ])
@@ -2773,7 +2775,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2773
2775
  _: 1
2774
2776
  }));
2775
2777
  }
2776
- }), yn = { class: "sm:flex sm:items-start" }, _n = /* @__PURE__ */ e("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" }, [
2778
+ }), br = { class: "sm:flex sm:items-start" }, wr = /* @__PURE__ */ e("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" }, [
2777
2779
  /* @__PURE__ */ e("svg", {
2778
2780
  xmlns: "http://www.w3.org/2000/svg",
2779
2781
  class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
@@ -2788,10 +2790,10 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2788
2790
  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"
2789
2791
  })
2790
2792
  ])
2791
- ], -1), $n = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, jn = {
2793
+ ], -1), yr = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, $r = {
2792
2794
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2793
2795
  id: "modal-title"
2794
- }, Cn = { class: "mt-2" }, Mn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Sn = {
2796
+ }, Cr = { class: "mt-2" }, Mr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, jr = {
2795
2797
  key: 0,
2796
2798
  xmlns: "http://www.w3.org/2000/svg",
2797
2799
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2799,13 +2801,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2799
2801
  viewBox: "0 0 24 24",
2800
2802
  stroke: "currentColor",
2801
2803
  "stroke-width": "1"
2802
- }, Dn = /* @__PURE__ */ e("path", {
2804
+ }, Sr = /* @__PURE__ */ e("path", {
2803
2805
  "stroke-linecap": "round",
2804
2806
  "stroke-linejoin": "round",
2805
2807
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2806
- }, null, -1), On = [
2807
- Dn
2808
- ], zn = {
2808
+ }, null, -1), Dr = [
2809
+ Sr
2810
+ ], Or = {
2809
2811
  key: 1,
2810
2812
  xmlns: "http://www.w3.org/2000/svg",
2811
2813
  class: "h-5 w-5 text-neutral-500",
@@ -2813,74 +2815,74 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2813
2815
  viewBox: "0 0 24 24",
2814
2816
  stroke: "currentColor",
2815
2817
  "stroke-width": "1"
2816
- }, En = /* @__PURE__ */ e("path", {
2818
+ }, zr = /* @__PURE__ */ e("path", {
2817
2819
  "stroke-linecap": "round",
2818
2820
  "stroke-linejoin": "round",
2819
2821
  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"
2820
- }, null, -1), Fn = [
2821
- En
2822
- ], Ln = { class: "ml-1.5" }, Vn = { class: "my-1 text-sm text-gray-500" }, Nn = {
2822
+ }, null, -1), Er = [
2823
+ zr
2824
+ ], Fr = { class: "ml-1.5" }, Vr = { class: "my-1 text-sm text-gray-500" }, Br = {
2823
2825
  name: "VFModalUnarchive"
2824
- }, Bn = /* @__PURE__ */ Object.assign(Nn, {
2826
+ }, Ar = /* @__PURE__ */ Object.assign(Br, {
2825
2827
  props: {
2826
2828
  selection: Object,
2827
2829
  current: Object
2828
2830
  },
2829
- setup(i) {
2830
- const t = b("emitter");
2831
- b("storage");
2832
- const s = b("adapter"), { t: o } = b("i18n"), p = i;
2833
- k("");
2834
- const a = k(p.selection.items[0]), c = k(""), u = k([]), f = () => {
2831
+ setup(l) {
2832
+ const t = k("emitter");
2833
+ k("storage");
2834
+ const s = k("adapter"), { t: o } = k("i18n"), i = l;
2835
+ g("");
2836
+ const m = g(i.selection.items[0]), n = g(""), h = g([]), p = () => {
2835
2837
  t.emit("vf-fetch", {
2836
2838
  params: {
2837
2839
  q: "unarchive",
2838
2840
  adapter: s.value,
2839
- path: p.current.dirname,
2840
- item: a.value.path
2841
+ path: i.current.dirname,
2842
+ item: m.value.path
2841
2843
  },
2842
2844
  onSuccess: () => {
2843
2845
  t.emit("vf-toast-push", { label: o("The file unarchived.") });
2844
2846
  },
2845
- onError: (d) => {
2846
- c.value = o(d.message);
2847
+ onError: (c) => {
2848
+ n.value = o(c.message);
2847
2849
  }
2848
2850
  });
2849
2851
  };
2850
- return (d, l) => (n(), H(J, null, {
2851
- buttons: N(() => [
2852
+ return (c, d) => (r(), N(W, null, {
2853
+ buttons: E(() => [
2852
2854
  e("button", {
2853
2855
  type: "button",
2854
- onClick: f,
2855
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
2856
- }, v(r(o)("Unarchive")), 1),
2856
+ onClick: p,
2857
+ class: "vf-btn vf-btn-primary"
2858
+ }, u(a(o)("Unarchive")), 1),
2857
2859
  e("button", {
2858
2860
  type: "button",
2859
- onClick: l[1] || (l[1] = (x) => r(t).emit("vf-modal-close")),
2860
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2861
- }, v(r(o)("Cancel")), 1)
2861
+ onClick: d[1] || (d[1] = (f) => a(t).emit("vf-modal-close")),
2862
+ class: "vf-btn vf-btn-secondary"
2863
+ }, u(a(o)("Cancel")), 1)
2862
2864
  ]),
2863
- default: N(() => [
2864
- e("div", yn, [
2865
- _n,
2866
- e("div", $n, [
2867
- e("h3", jn, v(r(o)("Unarchive")), 1),
2868
- e("div", Cn, [
2869
- (n(!0), m(I, null, R(u.value, (x) => (n(), m("p", Mn, [
2870
- x.type == "dir" ? (n(), m("svg", Sn, On)) : (n(), m("svg", zn, Fn)),
2871
- e("span", Ln, v(x.basename), 1)
2865
+ default: E(() => [
2866
+ e("div", br, [
2867
+ wr,
2868
+ e("div", yr, [
2869
+ e("h3", $r, u(a(o)("Unarchive")), 1),
2870
+ e("div", Cr, [
2871
+ (r(!0), v(H, null, J(h.value, (f) => (r(), v("p", Mr, [
2872
+ f.type == "dir" ? (r(), v("svg", jr, Dr)) : (r(), v("svg", Or, Er)),
2873
+ e("span", Fr, u(f.basename), 1)
2872
2874
  ]))), 256)),
2873
- e("p", Vn, v(r(o)("The archive will be unarchived at")) + " (" + v(i.current.dirname) + ")", 1),
2874
- c.value.length ? (n(), H(W, {
2875
+ e("p", Vr, u(a(o)("The archive will be unarchived at")) + " (" + u(l.current.dirname) + ")", 1),
2876
+ n.value.length ? (r(), N(Q, {
2875
2877
  key: 0,
2876
- onHidden: l[0] || (l[0] = (x) => c.value = ""),
2878
+ onHidden: d[0] || (d[0] = (f) => n.value = ""),
2877
2879
  error: ""
2878
2880
  }, {
2879
- default: N(() => [
2880
- T(v(c.value), 1)
2881
+ default: E(() => [
2882
+ U(u(n.value), 1)
2881
2883
  ]),
2882
2884
  _: 1
2883
- })) : F("", !0)
2885
+ })) : V("", !0)
2884
2886
  ])
2885
2887
  ])
2886
2888
  ])
@@ -2888,7 +2890,7 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2888
2890
  _: 1
2889
2891
  }));
2890
2892
  }
2891
- }), An = { class: "sm:flex sm:items-start" }, Hn = /* @__PURE__ */ e("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" }, [
2893
+ }), Lr = { class: "sm:flex sm:items-start" }, Nr = /* @__PURE__ */ e("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" }, [
2892
2894
  /* @__PURE__ */ e("svg", {
2893
2895
  class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
2894
2896
  xmlns: "http://www.w3.org/2000/svg",
@@ -2904,10 +2906,10 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2904
2906
  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"
2905
2907
  })
2906
2908
  ])
2907
- ], -1), Tn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Un = {
2909
+ ], -1), Ur = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, Tr = {
2908
2910
  class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
2909
2911
  id: "modal-title"
2910
- }, In = { class: "mt-2" }, qn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Rn = {
2912
+ }, Hr = { class: "mt-2" }, Ir = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, qr = {
2911
2913
  key: 0,
2912
2914
  xmlns: "http://www.w3.org/2000/svg",
2913
2915
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
@@ -2915,13 +2917,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2915
2917
  viewBox: "0 0 24 24",
2916
2918
  stroke: "currentColor",
2917
2919
  "stroke-width": "1"
2918
- }, Pn = /* @__PURE__ */ e("path", {
2920
+ }, Rr = /* @__PURE__ */ e("path", {
2919
2921
  "stroke-linecap": "round",
2920
2922
  "stroke-linejoin": "round",
2921
2923
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2922
- }, null, -1), Gn = [
2923
- Pn
2924
- ], Yn = {
2924
+ }, null, -1), Pr = [
2925
+ Rr
2926
+ ], Gr = {
2925
2927
  key: 1,
2926
2928
  xmlns: "http://www.w3.org/2000/svg",
2927
2929
  class: "h-5 w-5 text-neutral-500",
@@ -2929,13 +2931,13 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2929
2931
  viewBox: "0 0 24 24",
2930
2932
  stroke: "currentColor",
2931
2933
  "stroke-width": "1"
2932
- }, Jn = /* @__PURE__ */ e("path", {
2934
+ }, Yr = /* @__PURE__ */ e("path", {
2933
2935
  "stroke-linecap": "round",
2934
2936
  "stroke-linejoin": "round",
2935
2937
  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"
2936
- }, null, -1), Kn = [
2937
- Jn
2938
- ], Wn = { class: "ml-1.5" }, Xn = { class: "text-sm text-gray-500 pb-1 pt-3" }, Qn = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Zn = /* @__PURE__ */ e("svg", {
2938
+ }, null, -1), Jr = [
2939
+ Yr
2940
+ ], Kr = { class: "ml-1.5" }, Wr = { class: "text-sm text-gray-500 pb-1 pt-3" }, Xr = { class: "flex text-sm text-gray-800 dark:text-gray-400" }, Qr = /* @__PURE__ */ e("svg", {
2939
2941
  xmlns: "http://www.w3.org/2000/svg",
2940
2942
  class: "h-5 w-5 text-neutral-500 fill-sky-500 stroke-sky-500 dark:fill-slate-500 dark:stroke-slate-500",
2941
2943
  fill: "none",
@@ -2948,71 +2950,244 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
2948
2950
  "stroke-linejoin": "round",
2949
2951
  d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
2950
2952
  })
2951
- ], -1), el = { class: "ml-1.5 overflow-auto" }, tl = {
2953
+ ], -1), Zr = { class: "ml-1.5 overflow-auto" }, el = {
2952
2954
  name: "VFModalMove"
2953
- }, ol = /* @__PURE__ */ Object.assign(tl, {
2955
+ }, tl = /* @__PURE__ */ Object.assign(el, {
2954
2956
  props: {
2955
2957
  selection: Object,
2956
2958
  current: Object
2957
2959
  },
2958
- setup(i) {
2959
- const t = b("emitter"), { t: s } = b("i18n");
2960
- b("storage");
2961
- const o = b("adapter"), p = i, a = k(p.selection.items.from), c = k(""), u = () => {
2962
- a.value.length && t.emit("vf-fetch", {
2960
+ setup(l) {
2961
+ const t = k("emitter"), { t: s } = k("i18n");
2962
+ k("storage");
2963
+ const o = k("adapter"), i = l, m = g(i.selection.items.from), n = g(""), h = () => {
2964
+ m.value.length && t.emit("vf-fetch", {
2963
2965
  params: {
2964
2966
  q: "move",
2965
2967
  adapter: o.value,
2966
- path: p.current.dirname,
2967
- items: JSON.stringify(a.value.map(({ path: f, type: d }) => ({ path: f, type: d }))),
2968
- item: p.selection.items.to.path
2968
+ path: i.current.dirname,
2969
+ items: JSON.stringify(m.value.map(({ path: p, type: c }) => ({ path: p, type: c }))),
2970
+ item: i.selection.items.to.path
2969
2971
  },
2970
2972
  onSuccess: () => {
2971
- t.emit("vf-toast-push", { label: s("Files moved.", p.selection.items.to.name) });
2973
+ t.emit("vf-toast-push", { label: s("Files moved.", i.selection.items.to.name) });
2972
2974
  },
2973
- onError: (f) => {
2974
- c.value = s(f.message);
2975
+ onError: (p) => {
2976
+ n.value = s(p.message);
2975
2977
  }
2976
2978
  });
2977
2979
  };
2978
- return (f, d) => (n(), H(J, null, {
2979
- buttons: N(() => [
2980
+ return (p, c) => (r(), N(W, null, {
2981
+ buttons: E(() => [
2980
2982
  e("button", {
2981
2983
  type: "button",
2982
- onClick: u,
2983
- class: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 dark:bg-gray-700 dark:hover:bg-gray-600/75 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
2984
- }, v(r(s)("Yes, Move!")), 1),
2984
+ onClick: h,
2985
+ class: "vf-btn vf-btn-primary"
2986
+ }, u(a(s)("Yes, Move!")), 1),
2985
2987
  e("button", {
2986
2988
  type: "button",
2987
- onClick: d[1] || (d[1] = (l) => r(t).emit("vf-modal-close")),
2988
- class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
2989
- }, v(r(s)("Cancel")), 1)
2989
+ onClick: c[1] || (c[1] = (d) => a(t).emit("vf-modal-close")),
2990
+ class: "vf-btn vf-btn-secondary"
2991
+ }, u(a(s)("Cancel")), 1)
2990
2992
  ]),
2991
- default: N(() => [
2992
- e("div", An, [
2993
- Hn,
2994
- e("div", Tn, [
2995
- e("h3", Un, v(r(s)("Move files")), 1),
2996
- e("div", In, [
2997
- (n(!0), m(I, null, R(a.value, (l) => (n(), m("p", qn, [
2998
- l.type == "dir" ? (n(), m("svg", Rn, Gn)) : (n(), m("svg", Yn, Kn)),
2999
- e("span", Wn, v(l.path), 1)
2993
+ default: E(() => [
2994
+ e("div", Lr, [
2995
+ Nr,
2996
+ e("div", Ur, [
2997
+ e("h3", Tr, u(a(s)("Move files")), 1),
2998
+ e("div", Hr, [
2999
+ (r(!0), v(H, null, J(m.value, (d) => (r(), v("p", Ir, [
3000
+ d.type == "dir" ? (r(), v("svg", qr, Pr)) : (r(), v("svg", Gr, Jr)),
3001
+ e("span", Kr, u(d.path), 1)
3000
3002
  ]))), 256)),
3001
- e("p", Xn, v(r(s)("Are you sure you want to move these files?")), 1),
3002
- e("p", Qn, [
3003
- Zn,
3004
- e("span", el, v(i.selection.items.to.path), 1)
3003
+ e("p", Wr, u(a(s)("Are you sure you want to move these files?")), 1),
3004
+ e("p", Xr, [
3005
+ Qr,
3006
+ e("span", Zr, u(l.selection.items.to.path), 1)
3005
3007
  ]),
3006
- c.value.length ? (n(), H(W, {
3008
+ n.value.length ? (r(), N(Q, {
3007
3009
  key: 0,
3008
- onHidden: d[0] || (d[0] = (l) => c.value = ""),
3010
+ onHidden: c[0] || (c[0] = (d) => n.value = ""),
3009
3011
  error: ""
3010
3012
  }, {
3011
- default: N(() => [
3012
- T(v(c.value), 1)
3013
+ default: E(() => [
3014
+ U(u(n.value), 1)
3013
3015
  ]),
3014
3016
  _: 1
3015
- })) : F("", !0)
3017
+ })) : V("", !0)
3018
+ ])
3019
+ ])
3020
+ ])
3021
+ ]),
3022
+ _: 1
3023
+ }));
3024
+ }
3025
+ }), ol = (l, t) => {
3026
+ const s = l.__vccOpts || l;
3027
+ for (const [o, i] of t)
3028
+ s[o] = i;
3029
+ return s;
3030
+ }, sl = {
3031
+ props: {
3032
+ on: { type: String, required: !0 }
3033
+ },
3034
+ setup(l, { emit: t, slots: s }) {
3035
+ const o = k("emitter"), i = g(!1);
3036
+ let m = null;
3037
+ const n = () => {
3038
+ clearTimeout(m), i.value = !0, m = setTimeout(() => {
3039
+ i.value = !1;
3040
+ }, 2e3);
3041
+ };
3042
+ return K(() => {
3043
+ o.on(l.on, n);
3044
+ }), Te(() => {
3045
+ clearTimeout(m);
3046
+ }), {
3047
+ shown: i
3048
+ };
3049
+ }
3050
+ }, al = { key: 1 };
3051
+ function nl(l, t, s, o, i, m) {
3052
+ return r(), v("div", {
3053
+ class: T(["text-sm text-green-600 dark:text-green-600 transition-opacity duration-500 ease-out", [{ "opacity-0": !o.shown }]])
3054
+ }, [
3055
+ l.$slots.default ? pe(l.$slots, "default", { key: 0 }) : (r(), v("span", al, "Saved."))
3056
+ ], 2);
3057
+ }
3058
+ const Se = /* @__PURE__ */ ol(sl, [["render", nl]]), rl = "1.3.3", ll = { class: "sm:flex sm:items-start" }, il = /* @__PURE__ */ e("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" }, [
3059
+ /* @__PURE__ */ e("svg", {
3060
+ xmlns: "http://www.w3.org/2000/svg",
3061
+ class: "h-6 w-6 stroke-blue-600 dark:stroke-blue-100",
3062
+ fill: "none",
3063
+ viewBox: "0 0 24 24",
3064
+ "stroke-width": "1.5",
3065
+ stroke: "currentColor"
3066
+ }, [
3067
+ /* @__PURE__ */ e("path", {
3068
+ "stroke-linecap": "round",
3069
+ "stroke-linejoin": "round",
3070
+ d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"
3071
+ }),
3072
+ /* @__PURE__ */ e("path", {
3073
+ "stroke-linecap": "round",
3074
+ "stroke-linejoin": "round",
3075
+ d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
3076
+ })
3077
+ ])
3078
+ ], -1), dl = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full" }, cl = {
3079
+ class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
3080
+ id: "modal-title"
3081
+ }, ul = { class: "mt-2" }, ml = { class: "text-sm text-gray-500" }, vl = { class: "text-sm font-semibold mt-5 text-gray-900 dark:text-gray-400 tracking-wider" }, pl = { class: "mt-3 text-left" }, hl = { class: "space-y-2" }, fl = { class: "flex relative gap-x-3" }, gl = { class: "h-6 items-center" }, kl = { class: "flex-1 block text-sm" }, _l = {
3082
+ for: "dark_mode",
3083
+ class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
3084
+ }, xl = { class: "flex relative gap-x-3" }, bl = { class: "h-6 items-center" }, wl = { class: "flex-1 block text-sm" }, yl = {
3085
+ for: "metric_unit",
3086
+ class: "flex w-full font-medium text-gray-900 dark:text-gray-400"
3087
+ }, $l = {
3088
+ name: "VFModalAbout"
3089
+ }, Cl = /* @__PURE__ */ Object.assign($l, {
3090
+ props: {
3091
+ selection: Object,
3092
+ current: Object
3093
+ },
3094
+ setup(l) {
3095
+ const t = k("emitter"), { getStore: s, clearStore: o } = k("storage");
3096
+ k("adapter");
3097
+ const { t: i } = k("i18n");
3098
+ g(""), g("");
3099
+ const m = k("darkMode"), n = async () => {
3100
+ o(), location.reload();
3101
+ }, h = () => {
3102
+ t.emit("vf-darkMode-toggle"), t.emit("vf-darkMode-saved");
3103
+ }, p = k("metricUnits"), c = () => {
3104
+ t.emit("vf-metric-units-saved", !p.value);
3105
+ };
3106
+ return (d, f) => (r(), N(W, null, {
3107
+ buttons: E(() => [
3108
+ e("button", {
3109
+ type: "button",
3110
+ onClick: f[2] || (f[2] = (y) => a(t).emit("vf-modal-close")),
3111
+ class: "vf-btn vf-btn-secondary"
3112
+ }, u(a(i)("Close")), 1)
3113
+ ]),
3114
+ default: E(() => [
3115
+ e("div", ll, [
3116
+ il,
3117
+ e("div", dl, [
3118
+ e("h3", cl, u(a(i)("About %s", "Vuefinder " + a(rl))), 1),
3119
+ e("div", ul, [
3120
+ e("p", ml, u(a(i)("Vuefinder is a file manager component for vue 3.")), 1),
3121
+ e("div", null, [
3122
+ e("h3", vl, u(a(i)("Settings")), 1)
3123
+ ]),
3124
+ e("div", pl, [
3125
+ e("fieldset", null, [
3126
+ e("div", hl, [
3127
+ e("div", fl, [
3128
+ e("div", gl, [
3129
+ R(e("input", {
3130
+ id: "dark_mode",
3131
+ name: "dark_mode",
3132
+ "onUpdate:modelValue": f[0] || (f[0] = (y) => re(m) ? m.value = y : null),
3133
+ type: "checkbox",
3134
+ onClick: h,
3135
+ class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
3136
+ }, null, 512), [
3137
+ [$e, a(m)]
3138
+ ])
3139
+ ]),
3140
+ e("div", kl, [
3141
+ e("label", _l, [
3142
+ U(u(a(i)("Dark Mode")) + " ", 1),
3143
+ P(Se, {
3144
+ class: "ms-3",
3145
+ on: "vf-darkMode-saved"
3146
+ }, {
3147
+ default: E(() => [
3148
+ U(u(a(i)("Saved.")), 1)
3149
+ ]),
3150
+ _: 1
3151
+ })
3152
+ ])
3153
+ ])
3154
+ ]),
3155
+ e("div", xl, [
3156
+ e("div", bl, [
3157
+ R(e("input", {
3158
+ id: "metric_unit",
3159
+ name: "metric_unit",
3160
+ type: "checkbox",
3161
+ "onUpdate:modelValue": f[1] || (f[1] = (y) => re(p) ? p.value = y : null),
3162
+ onClick: c,
3163
+ class: "h-4 w-4 rounded border-gray-300 text-indigo-600 dark:accent-slate-400 focus:ring-indigo-600"
3164
+ }, null, 512), [
3165
+ [$e, a(p)]
3166
+ ])
3167
+ ]),
3168
+ e("div", wl, [
3169
+ e("label", yl, [
3170
+ U(u(a(i)("Use Metric Units")) + " ", 1),
3171
+ P(Se, {
3172
+ class: "ms-3",
3173
+ on: "vf-metric-units-saved"
3174
+ }, {
3175
+ default: E(() => [
3176
+ U(u(a(i)("Saved.")), 1)
3177
+ ]),
3178
+ _: 1
3179
+ })
3180
+ ])
3181
+ ])
3182
+ ]),
3183
+ e("button", {
3184
+ onClick: n,
3185
+ type: "button",
3186
+ class: "vf-btn vf-btn-secondary"
3187
+ }, u(a(i)("Clear Local Storage")), 1)
3188
+ ])
3189
+ ])
3190
+ ])
3016
3191
  ])
3017
3192
  ])
3018
3193
  ])
@@ -3020,31 +3195,32 @@ const zs = { class: "vuefinder" }, Es = /* @__PURE__ */ e("iframe", {
3020
3195
  _: 1
3021
3196
  }));
3022
3197
  }
3023
- }), sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3198
+ }), Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3024
3199
  __proto__: null,
3025
- ModalArchive: wn,
3026
- ModalDelete: lr,
3027
- ModalMessage: fr,
3028
- ModalMove: ol,
3029
- ModalNewFile: Fr,
3030
- ModalNewFolder: $r,
3031
- ModalPreview: xa,
3032
- ModalRename: La,
3033
- ModalUnarchive: Bn,
3034
- ModalUpload: sn
3035
- }, Symbol.toStringTag, { value: "Module" })), he = {
3036
- VueFinder: Ls,
3037
- ...sl
3200
+ ModalAbout: Cl,
3201
+ ModalArchive: xr,
3202
+ ModalDelete: ra,
3203
+ ModalMessage: pa,
3204
+ ModalMove: tl,
3205
+ ModalNewFile: Ea,
3206
+ ModalNewFolder: ya,
3207
+ ModalPreview: _n,
3208
+ ModalRename: Vn,
3209
+ ModalUnarchive: Ar,
3210
+ ModalUpload: sr
3211
+ }, Symbol.toStringTag, { value: "Module" })), _e = {
3212
+ VueFinder: Fs,
3213
+ ...Ml
3038
3214
  };
3039
- const vl = {
3040
- install(i) {
3041
- for (const t in he)
3042
- if (he.hasOwnProperty(t)) {
3043
- const s = he[t];
3044
- i.component(s.name, s);
3215
+ const Al = {
3216
+ install(l) {
3217
+ for (const t in _e)
3218
+ if (_e.hasOwnProperty(t)) {
3219
+ const s = _e[t];
3220
+ l.component(s.name, s);
3045
3221
  }
3046
3222
  }
3047
3223
  };
3048
3224
  export {
3049
- vl as default
3225
+ Al as default
3050
3226
  };