@synopackageland/sdk 0.23.2 → 0.24.1

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/vue.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { appRefusal as ca, appDenial as Be, delegateCopy as Re, appLifecycle as Se, lifecycleRetryDelay as va, uiLocale as fa, lifecycleCopy as Le, shellCopy as ua, isFullPage as Ea, format as We, nasCopy as ze, nasErrorCopy as Ta, saveCopy as pa, saveError as Qe, createNasProvider as za, labelSeparator as ma, identityCopy as Wa, backgroundCopy as Ja, createBackgroundPickerProvider as Ya, backgroundErrorCopy as Qa, requestKey as ha, lifecycleRefusal as Za, errorCopy as ja, scopedPicker as et, authorizationCopy as at } from "./index.js";
2
2
  import { DEFAULT_REQUEST_TIMEOUT as qs, FILE_STATION_APP as Os, LIFECYCLE_RETRY_MAX_MS as Ms, LIFECYCLE_STARTING_RETRY_MAX_MS as Ks, MAX_LAUNCH_ROUTE as Hs, activePage as Xs, authorizationCatalogs as Gs, backgroundCatalogs as Ws, bridgeCatalogs as Js, bridgeErrorCopy as Ys, catalogs as Qs, clientTimeout as Zs, createBackgroundSaveFacade as js, createClient as eo, createDsmSession as ao, createFileTransfers as to, createPortalAccess as lo, createSharedFolderAccess as no, createSharedFolderPermission as so, createStandaloneContext as oo, createStandaloneHost as io, decodeResponse as uo, delegateCatalogs as ro, dsmLaunchURL as co, encodeRequest as vo, fileStationPath as fo, followLaunchRoute as po, identityCatalogs as mo, launchRoute as yo, mergeCatalogs as bo, nasCatalogs as go, openFileInFileStation as ho, openFolderInFileStation as ko, portalCatalogs as _o, portalMessages as wo, protocolCodes as xo, protocolOps as Co, protocolSchemas as $o, saveCatalogs as So, sharedFolderAccessFor as Po, sharedFolderCatalogs as Eo, sharedFolderMessages as To, sharedFolderPermissionMessage as zo, shellCatalogs as Ao, shellPages as Ro, uiLocales as Io } from "./index.js";
3
- import { inject as Te, ref as g, computed as w, onBeforeUnmount as _e, Comment as tt, Text as lt, Fragment as Q, watch as qe, onMounted as xe, defineComponent as ce, openBlock as l, createElementBlock as k, createElementVNode as S, toDisplayString as o, createCommentVNode as m, renderList as fe, normalizeClass as De, createVNode as f, unref as e, createTextVNode as h, createBlock as y, renderSlot as he, withCtx as s, resolveDynamicComponent as Ge, normalizeProps as Ze, mergeProps as ya, withModifiers as Oe, isRef as je, provide as Fe, useTemplateRef as Xe, useSlots as Aa, watchEffect as ka, guardReactiveProps as _a, createSlots as ta, Teleport as Ra, markRaw as nt, h as st, shallowRef as ot, onUnmounted as Ia, nextTick as it } from "vue";
4
- import { SettingsSection as ke, Callout as W, Button as N, SettingsRow as we, Skeleton as Ne, Badge as Je, PathDisplay as Ve, Form as Me, FormItem as Pe, Select as ba, Input as Ae, Dialog as Ke, ensureDeviceViewport as ut, AppRoot as rt, ConfigProvider as dt, PageContent as wa, PageHeader as xa, AppLayout as ct, LoadingArea as Ua, AppSidebar as vt, AppSidebarUser as ft, InfoTip as pt, FileTypeIcon as sa, IconButton as oa, Breadcrumb as mt, FilePicker as yt, TreeView as bt, DataGrid as gt, Link as ra, FormActions as la, Card as Ca, Checkbox as ht, ListItem as $a } from "@synopackageland/ui";
5
- import { Timer as kt, Info as _t, ShieldCheck as Da, ChevronRight as Na, ChevronLeft as wt, RotateCw as xt } from "@lucide/vue";
6
- const Ye = /* @__PURE__ */ Symbol("executor-setup"), Va = /* @__PURE__ */ Symbol("executor-preload");
3
+ import { inject as Te, ref as b, computed as _, onBeforeUnmount as _e, Comment as tt, Text as lt, Fragment as Q, watch as qe, onMounted as xe, defineComponent as ce, openBlock as l, createElementBlock as k, createElementVNode as C, toDisplayString as o, createCommentVNode as m, renderList as fe, normalizeClass as De, createVNode as p, unref as e, createTextVNode as h, createBlock as y, renderSlot as he, withCtx as s, resolveDynamicComponent as Ge, normalizeProps as Ze, mergeProps as ya, withModifiers as Oe, isRef as je, provide as Fe, useTemplateRef as Xe, useSlots as Aa, watchEffect as ka, guardReactiveProps as _a, createSlots as ta, Teleport as Ra, markRaw as nt, h as st, shallowRef as ot, onUnmounted as Ia, nextTick as it } from "vue";
4
+ import { SettingsSection as ke, Callout as J, Button as N, SettingsRow as we, Skeleton as Ve, Badge as Je, PathDisplay as Ne, Form as Me, FormItem as Pe, Select as ba, Input as Ae, Dialog as Ke, ensureDeviceViewport as ut, AppRoot as rt, ConfigProvider as dt, PageContent as wa, PageHeader as xa, AppLayout as ct, LoadingArea as Ua, AppSidebar as vt, AppSidebarUser as ft, InfoTip as pt, FileTypeIcon as sa, IconButton as oa, Breadcrumb as mt, FilePicker as yt, TreeView as bt, DataGrid as gt, Link as ra, FormActions as la, Card as Ca, Checkbox as ht, ListItem as $a } from "@synopackageland/ui";
5
+ import { Timer as kt, Info as _t, ShieldCheck as Da, ChevronRight as Va, ChevronLeft as wt, RotateCw as xt } from "@lucide/vue";
6
+ const Ye = /* @__PURE__ */ Symbol("executor-setup"), Na = /* @__PURE__ */ Symbol("executor-preload");
7
7
  function Ct() {
8
- return Te(Va, g(!1));
8
+ return Te(Na, b(!1));
9
9
  }
10
10
  function La() {
11
11
  return Te(Ye, {
@@ -32,125 +32,125 @@ function St(t) {
32
32
  return /: the executor status request failed\.$/.test(t ?? "");
33
33
  }
34
34
  function Cs(t) {
35
- const v = g(), n = w(() => v.value ? { code: v.value, ...ca({ code: v.value }, t.locale, t.displayName) } : void 0), a = g(!1), i = g(!1), u = g(), r = g("");
36
- let c = !1, b = 0, d, p;
37
- function P() {
38
- clearTimeout(d), clearTimeout(p);
35
+ const v = b(), n = _(() => v.value ? { code: v.value, ...ca({ code: v.value }, t.locale, t.displayName) } : void 0), a = b(!1), r = b(!1), i = b(), u = b("");
36
+ let c = !1, g = 0, d, f;
37
+ function S() {
38
+ clearTimeout(d), clearTimeout(f);
39
39
  }
40
- function E(q = "") {
41
- b++, P(), u.value = void 0, r.value = q;
40
+ function z(F = "") {
41
+ g++, S(), i.value = void 0, u.value = F;
42
42
  }
43
- function x(q) {
44
- const M = Be(q);
45
- return c || !M ? !1 : (E(), v.value = M, !0);
43
+ function w(F) {
44
+ const M = Be(F);
45
+ return c || !M ? !1 : (z(), v.value = M, !0);
46
46
  }
47
- async function $(q, M) {
48
- const D = b;
47
+ async function $(F, M) {
48
+ const V = g;
49
49
  try {
50
- return await t.call(q, M);
51
- } catch (C) {
52
- throw D === b && x(C), C;
50
+ return await t.call(F, M);
51
+ } catch (P) {
52
+ throw V === g && w(P), P;
53
53
  }
54
54
  }
55
- function T(q) {
55
+ function T(F) {
56
56
  if (c) return;
57
- const M = Date.parse(q.expiresAt) - Date.now();
57
+ const M = Date.parse(F.expiresAt) - Date.now();
58
58
  if (!Number.isFinite(M) || M <= 0) {
59
- E("expired");
59
+ z("expired");
60
60
  return;
61
61
  }
62
- P(), v.value = void 0, u.value = q, r.value = "", d = setTimeout(() => E("expired"), M);
63
- const D = b;
64
- p = setTimeout(async () => {
62
+ S(), v.value = void 0, i.value = F, u.value = "", d = setTimeout(() => z("expired"), M);
63
+ const V = g;
64
+ f = setTimeout(async () => {
65
65
  try {
66
- const C = await $("identity.session");
67
- !c && b === D && T(C);
68
- } catch (C) {
69
- !c && b === D && !x(C) && E("expired");
66
+ const P = await $("identity.session");
67
+ !c && g === V && T(P);
68
+ } catch (P) {
69
+ !c && g === V && !w(P) && z("expired");
70
70
  }
71
71
  }, Math.min(6e4, M));
72
72
  }
73
- async function _() {
73
+ async function x() {
74
74
  try {
75
- const q = await $("identity.status");
75
+ const F = await $("identity.status");
76
76
  if (c) return;
77
- if (v.value = void 0, a.value = q.enabled === !0, a.value)
77
+ if (v.value = void 0, a.value = F.enabled === !0, a.value)
78
78
  try {
79
79
  T(await $("identity.session", { bootstrap: !0 }));
80
80
  } catch (M) {
81
- !c && !Be(M) && E();
81
+ !c && !Be(M) && z();
82
82
  }
83
- } catch (q) {
83
+ } catch (F) {
84
84
  if (c) return;
85
- const M = q?.code;
86
- a.value = !Be(q) && !["unknown_method", "session_required"].includes(M || ""), a.value && (r.value = "unavailable");
85
+ const M = F?.code;
86
+ a.value = !Be(F) && !["unknown_method", "session_required"].includes(M || ""), a.value && (u.value = "unavailable");
87
87
  } finally {
88
- c || (i.value = !0);
88
+ c || (r.value = !0);
89
89
  }
90
90
  }
91
- async function z(q, M) {
92
- const D = b;
91
+ async function E(F, M) {
92
+ const V = g;
93
93
  try {
94
- const C = await t.call(q, M);
95
- if (c || a.value && D !== b) throw { code: "session_required" };
96
- return C;
97
- } catch (C) {
98
- D === b && x(C);
99
- const L = C?.code;
100
- throw !c && D === b && a.value && ["session_required", "session_revalidation_required"].includes(L || "") && E(L === "session_revalidation_required" ? "revalidate" : "expired"), C;
94
+ const P = await t.call(F, M);
95
+ if (c || a.value && V !== g) throw { code: "session_required" };
96
+ return P;
97
+ } catch (P) {
98
+ V === g && w(P);
99
+ const R = P?.code;
100
+ throw !c && V === g && a.value && ["session_required", "session_revalidation_required"].includes(R || "") && z(R === "session_revalidation_required" ? "revalidate" : "expired"), P;
101
101
  }
102
102
  }
103
- async function A(q, M) {
103
+ async function A(F, M) {
104
104
  if (!t.batch) throw { code: "unsupported", message: "batch client unavailable" };
105
- const D = b;
105
+ const V = g;
106
106
  try {
107
- const C = await t.batch(q, M);
108
- if (c || a.value && D !== b) throw { code: "session_required" };
109
- for (const L of C) L.success || (D === b && x(L.error), D === b && a.value && ["session_required", "session_revalidation_required"].includes(L.error.code) && E(L.error.code === "session_revalidation_required" ? "revalidate" : "expired"));
110
- return C;
111
- } catch (C) {
112
- throw D === b && x(C), C;
107
+ const P = await t.batch(F, M);
108
+ if (c || a.value && V !== g) throw { code: "session_required" };
109
+ for (const R of P) R.success || (V === g && w(R.error), V === g && a.value && ["session_required", "session_revalidation_required"].includes(R.error.code) && z(R.error.code === "session_revalidation_required" ? "revalidate" : "expired"));
110
+ return P;
111
+ } catch (P) {
112
+ throw V === g && w(P), P;
113
113
  }
114
114
  }
115
- async function j(q, M, D) {
116
- const C = await $("identity.login", { account: q, password: M, otp: D });
117
- c || (b++, T(C));
115
+ async function Z(F, M, V) {
116
+ const P = await $("identity.login", { account: F, password: M, otp: V });
117
+ c || (g++, T(P));
118
118
  }
119
- async function I() {
120
- const q = await $("identity.session", { bootstrap: !0 });
121
- c || (b++, T(q));
119
+ async function U() {
120
+ const F = await $("identity.session", { bootstrap: !0 });
121
+ c || (g++, T(F));
122
122
  }
123
- async function ee() {
124
- await $("identity.logout"), c || E();
123
+ async function te() {
124
+ await $("identity.logout"), c || z();
125
125
  }
126
126
  function H() {
127
- c = !0, E();
127
+ c = !0, z();
128
128
  }
129
- return { enabled: a, ready: i, subject: u, notice: r, denied: n, start: _, call: z, batch: A, login: j, bootstrap: I, logout: ee, dispose: H };
129
+ return { enabled: a, ready: r, subject: i, notice: u, denied: n, start: x, call: E, batch: A, login: Z, bootstrap: U, logout: te, dispose: H };
130
130
  }
131
131
  function Pt() {
132
- const t = g(!1), v = g();
133
- let n = !1, a = 0, i;
134
- function u() {
135
- a++, i?.abort(), i = void 0, t.value = !1, v.value = void 0;
132
+ const t = b(!1), v = b();
133
+ let n = !1, a = 0, r;
134
+ function i() {
135
+ a++, r?.abort(), r = void 0, t.value = !1, v.value = void 0;
136
136
  }
137
- async function r(c) {
137
+ async function u(c) {
138
138
  if (n || t.value) return;
139
- const b = ++a, d = new AbortController();
140
- i = d, t.value = !0, v.value = void 0;
139
+ const g = ++a, d = new AbortController();
140
+ r = d, t.value = !0, v.value = void 0;
141
141
  try {
142
- const p = await c(d.signal);
143
- return !n && b === a ? p : void 0;
144
- } catch (p) {
145
- !n && b === a && (v.value = p);
142
+ const f = await c(d.signal);
143
+ return !n && g === a ? f : void 0;
144
+ } catch (f) {
145
+ !n && g === a && (v.value = f);
146
146
  return;
147
147
  } finally {
148
- !n && b === a && (t.value = !1, i = void 0);
148
+ !n && g === a && (t.value = !1, r = void 0);
149
149
  }
150
150
  }
151
151
  return _e(() => {
152
- n = !0, u();
153
- }), { busy: t, error: v, run: r, cancel: u };
152
+ n = !0, i();
153
+ }), { busy: t, error: v, run: u, cancel: i };
154
154
  }
155
155
  const Sa = ".sds-standalone-main-window";
156
156
  function Et(t) {
@@ -158,15 +158,15 @@ function Et(t) {
158
158
  try {
159
159
  const n = t.closest(Sa);
160
160
  if (!t.isConnected || !n || n.classList.contains("sds-standalone-main-window--no-banner")) return v;
161
- const a = (i) => Array.from(n.querySelectorAll(i)).some((u) => {
162
- if (t.contains(u) || u.closest(Sa) !== n || !u.textContent?.trim()) return !1;
163
- const r = u.ownerDocument.defaultView;
164
- if (!r) return !1;
165
- for (let b = u; b; b = b.parentElement) {
166
- const d = r.getComputedStyle(b);
167
- if (b.hidden || d.display === "none" || d.visibility === "hidden" || d.visibility === "collapse" || d.opacity === "0") return !1;
161
+ const a = (r) => Array.from(n.querySelectorAll(r)).some((i) => {
162
+ if (t.contains(i) || i.closest(Sa) !== n || !i.textContent?.trim()) return !1;
163
+ const u = i.ownerDocument.defaultView;
164
+ if (!u) return !1;
165
+ for (let g = i; g; g = g.parentElement) {
166
+ const d = u.getComputedStyle(g);
167
+ if (g.hidden || d.display === "none" || d.visibility === "hidden" || d.visibility === "collapse" || d.opacity === "0") return !1;
168
168
  }
169
- const c = u.getBoundingClientRect();
169
+ const c = i.getBoundingClientRect();
170
170
  return c.width > 0 && c.height > 0;
171
171
  });
172
172
  return {
@@ -194,165 +194,165 @@ function Rt(t) {
194
194
  const v = /* @__PURE__ */ new Map(), n = { items: [] };
195
195
  for (const a of t) {
196
196
  if (a.hidden) continue;
197
- let i = a.placement === "bottom" ? n : v.get(a.group);
198
- i || v.set(a.group, i = a.group === void 0 ? { items: [] } : { label: a.group, items: [] }), i.items.push({ key: a.id, label: a.title, icon: a.icon, badge: a.badge });
197
+ let r = a.placement === "bottom" ? n : v.get(a.group);
198
+ r || v.set(a.group, r = a.group === void 0 ? { items: [] } : { label: a.group, items: [] }), r.items.push({ key: a.id, label: a.title, icon: a.icon, badge: a.badge });
199
199
  }
200
200
  return n.items.length ? [...v.values(), n] : [...v.values()];
201
201
  }
202
202
  const It = { password_rejected: "passwordRejected", password_required: "passwordRequired", password_confirm_failed: "passwordConfirmFailed" }, Ut = 6e4, Dt = 1e3;
203
203
  function Fa(t, v) {
204
- const n = La(), a = w(() => Re(t.locale)), i = g(), u = g(""), r = g(!1), c = g(!1), b = g(!1), d = g(), p = g(!1), P = w(() => p.value ? a.value.passwordRequired : d.value && "confirm" in d.value ? a.value[It[d.value.confirm]] : "");
205
- qe(u, () => {
206
- p.value = !1;
204
+ const n = La(), a = _(() => Re(t.locale)), r = b(), i = b(""), u = b(!1), c = b(!1), g = b(!1), d = b(), f = b(!1), S = _(() => f.value ? a.value.passwordRequired : d.value && "confirm" in d.value ? a.value[It[d.value.confirm]] : "");
205
+ qe(i, () => {
206
+ f.value = !1;
207
207
  });
208
- const E = g(), x = g(""), $ = g([]), T = w(() => E.value?.scope_mode === "install-selected"), _ = w(() => !!E.value?.scope_mode), z = w(() => [{ label: a.value.homeScope, value: "home" }, ...$.value]), A = w(() => !T.value || !!x.value && z.value.some((O) => O.value === x.value)), j = w(() => T.value && !E.value?.selection);
209
- let I = !1;
210
- async function ee(O) {
211
- const ae = O ?? await n.status();
212
- if (I || (i.value = ae, !t.ctx || Se(ae))) return;
208
+ const z = b(), w = b(""), $ = b([]), T = _(() => z.value?.scope_mode === "install-selected"), x = _(() => !!z.value?.scope_mode), E = _(() => [{ label: a.value.homeScope, value: "home" }, ...$.value]), A = _(() => !T.value || !!w.value && E.value.some((q) => q.value === w.value)), Z = _(() => T.value && !z.value?.selection);
209
+ let U = !1;
210
+ async function te(q) {
211
+ const le = q ?? await n.status();
212
+ if (U || (r.value = le, !t.ctx || Se(le))) return;
213
213
  const K = await t.ctx.call("delegate.status");
214
- if (I || (E.value = K, K.scope_mode !== "install-selected")) return;
215
- const le = [];
214
+ if (U || (z.value = K, K.scope_mode !== "install-selected")) return;
215
+ const ee = [];
216
216
  let se = 0;
217
- for (let ie = 0; ie < 128; ie++) {
218
- const re = await t.ctx.call("bg.browse", { offset: se });
219
- if (I) return;
220
- if (!Array.isArray(re.shares) || !Number.isSafeInteger(re.total) || re.total < 0 || !re.shares.length && se < re.total) throw { code: "EXECUTOR_PROTOCOL" };
221
- for (const J of re.shares)
222
- J.isdir && J.path === "/" + J.name && !["home", "homes"].includes(J.name.toLowerCase()) && le.push({ label: J.name, value: "shared:" + J.name });
223
- if (se += re.shares.length, se >= re.total) break;
224
- if (ie === 127) throw { code: "EXECUTOR_PROTOCOL" };
225
- }
226
- $.value = le, x.value = K.selection?.scope ?? K.preselection ?? "";
217
+ for (let re = 0; re < 128; re++) {
218
+ const oe = await t.ctx.call("bg.browse", { offset: se });
219
+ if (U) return;
220
+ if (!Array.isArray(oe.shares) || !Number.isSafeInteger(oe.total) || oe.total < 0 || !oe.shares.length && se < oe.total) throw { code: "EXECUTOR_PROTOCOL" };
221
+ for (const G of oe.shares)
222
+ G.isdir && G.path === "/" + G.name && !["home", "homes"].includes(G.name.toLowerCase()) && ee.push({ label: G.name, value: "shared:" + G.name });
223
+ if (se += oe.shares.length, se >= oe.total) break;
224
+ if (re === 127) throw { code: "EXECUTOR_PROTOCOL" };
225
+ }
226
+ $.value = ee, w.value = K.selection?.scope ?? K.preselection ?? "";
227
227
  }
228
- async function H(O) {
229
- if (!(!t.admin || r.value)) {
230
- r.value = !0, b.value = !1, d.value = void 0;
228
+ async function H(q) {
229
+ if (!(!t.admin || u.value)) {
230
+ u.value = !0, g.value = !1, d.value = void 0;
231
231
  try {
232
- await ee(O);
232
+ await te(q);
233
233
  } catch {
234
- I || (b.value = !0);
234
+ U || (g.value = !0);
235
235
  } finally {
236
- I || (r.value = !1);
236
+ U || (u.value = !1);
237
237
  }
238
238
  }
239
239
  }
240
- const q = () => H();
240
+ const F = () => H();
241
241
  async function M() {
242
- if (!t.admin || r.value || !u.value || !A.value || b.value) return;
243
- r.value = !0, b.value = !1, d.value = void 0;
244
- const O = u.value, ae = x.value;
245
- u.value = "", c.value = !0;
242
+ if (!t.admin || u.value || !i.value || !A.value || g.value) return;
243
+ u.value = !0, g.value = !1, d.value = void 0;
244
+ const q = i.value, le = w.value;
245
+ i.value = "", c.value = !0;
246
246
  try {
247
- let K = T.value ? await n.authorize(O, x.value) : await n.authorize(O);
248
- const le = ea(K);
249
- if (le) {
250
- I || (d.value = { confirm: le }, u.value = O);
247
+ let K = T.value ? await n.authorize(q, w.value) : await n.authorize(q);
248
+ const ee = ea(K);
249
+ if (ee) {
250
+ U || (d.value = { confirm: ee }, i.value = q);
251
251
  return;
252
252
  }
253
- if (await ee(K), !I && T.value && K.state === "ready" && j.value && (K = await n.authorize(O, x.value), await ee(K)), K.state !== "ready" && K.requested && await C(K.requested) && (K = await n.status(), await ee(K)), K.state === "ready" && T.value && E.value?.selection?.scope !== ae) {
254
- I || (d.value = { reason: "", code: "selection_failed" });
253
+ if (await te(K), !U && T.value && K.state === "ready" && Z.value && (K = await n.authorize(q, w.value), await te(K)), K.state !== "ready" && K.requested && await P(K.requested) && (K = await n.status(), await te(K)), K.state === "ready" && T.value && z.value?.selection?.scope !== le) {
254
+ U || (d.value = { reason: "", code: "selection_failed" });
255
255
  return;
256
256
  }
257
257
  if (K.state !== "ready") {
258
- I || (d.value = { reason: K.reason ?? "", code: K.code });
258
+ U || (d.value = { reason: K.reason ?? "", code: K.code });
259
259
  return;
260
260
  }
261
- I || await v();
261
+ U || await v();
262
262
  } catch {
263
- I || (b.value = !0);
263
+ U || (g.value = !0);
264
264
  } finally {
265
- I || (r.value = !1, c.value = !1);
265
+ U || (u.value = !1, c.value = !1);
266
266
  }
267
267
  }
268
- function D() {
269
- return !u.value && !r.value ? (p.value = !0, Promise.resolve()) : M();
268
+ function V() {
269
+ return !i.value && !u.value ? (f.value = !0, Promise.resolve()) : M();
270
270
  }
271
- async function C(O) {
272
- for (const ae = Date.now() + Ut; !I; await new Promise((K) => setTimeout(K, Dt))) {
271
+ async function P(q) {
272
+ for (const le = Date.now() + Ut; !U; await new Promise((K) => setTimeout(K, Dt))) {
273
273
  const K = (await t.ctx?.call("delegate.status").catch(() => {
274
274
  }))?.selection;
275
- if (K?.scope === O.scope && K.generation > O.generation) return !0;
276
- if (Date.now() >= ae) return !1;
275
+ if (K?.scope === q.scope && K.generation > q.generation) return !0;
276
+ if (Date.now() >= le) return !1;
277
277
  }
278
278
  return !1;
279
279
  }
280
- const L = (O) => O?.code === "executor_starting" ? a.value.statusStarting : St(O?.reason) ? a.value.statusUnreachable : void 0;
280
+ const R = (q) => q?.code === "executor_starting" ? a.value.statusStarting : St(q?.reason) ? a.value.statusUnreachable : void 0;
281
281
  return xe(() => {
282
- n.subscribe?.((O) => {
283
- !I && !ea(O) && (i.value = O);
282
+ n.subscribe?.((q) => {
283
+ !U && !ea(q) && (r.value = q);
284
284
  }), H(t.initial);
285
285
  }), _e(() => {
286
- I = !0, u.value = "";
287
- }), { status: i, password: u, busy: r, confirming: c, error: b, failure: d, passwordError: P, scope: E, chosen: x, options: z, dynamic: T, files: _, webapiProfiles: n.webapiProfiles, canConfirm: A, needsScope: j, refresh: q, authorize: M, submit: D, explain: L };
286
+ U = !0, i.value = "";
287
+ }), { status: r, password: i, busy: u, confirming: c, error: g, failure: d, passwordError: S, scope: z, chosen: w, options: E, dynamic: T, files: x, webapiProfiles: n.webapiProfiles, canConfirm: A, needsScope: Z, refresh: F, authorize: M, submit: V, explain: R };
288
288
  }
289
289
  function He(t, v) {
290
- let n = !1, a, i = 0;
291
- function u() {
290
+ let n = !1, a, r = 0;
291
+ function i() {
292
292
  clearTimeout(a), a = setTimeout(() => {
293
293
  v().then(() => {
294
- !n && t() && u();
294
+ !n && t() && i();
295
295
  });
296
- }, va(i++, t()));
296
+ }, va(r++, t()));
297
297
  }
298
- qe(t, (r) => {
299
- clearTimeout(a), i = 0, r && !n && u();
298
+ qe(t, (u) => {
299
+ clearTimeout(a), r = 0, u && !n && i();
300
300
  }), _e(() => {
301
301
  n = !0, clearTimeout(a);
302
302
  });
303
303
  }
304
- const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key: 0 }, Bt = { key: 1 }, Ft = { key: 2 }, qt = { key: 3 }, Ot = { key: 1 }, Mt = /* @__PURE__ */ ce({
304
+ const Vt = ["aria-label"], Nt = { class: "executor-upgrade-title" }, Lt = { key: 0 }, Bt = { key: 1 }, Ft = { key: 2 }, qt = { key: 3 }, Ot = { key: 1 }, Mt = /* @__PURE__ */ ce({
305
305
  __name: "ExecutorUpgrade",
306
306
  props: {
307
307
  status: {},
308
308
  locale: {}
309
309
  },
310
310
  setup(t) {
311
- const v = t, n = w(() => Re(v.locale)), a = w(() => v.status?.approval), i = w(() => v.status?.state === "needs-admin-approval" && (v.status.code === "task_outdated" || !!a.value)), u = w(() => a.value?.permissions === "unchanged" ? n.value.upgradeUnchanged : a.value?.permissions === "expanded" ? n.value.upgradeExpanded : n.value.upgradeReview), r = (c) => c?.slice(0, 12) ?? "—";
312
- return (c, b) => i.value ? (l(), k("section", {
311
+ const v = t, n = _(() => Re(v.locale)), a = _(() => v.status?.approval), r = _(() => v.status?.state === "needs-admin-approval" && (v.status.code === "task_outdated" || !!a.value)), i = _(() => a.value?.permissions === "unchanged" ? n.value.upgradeUnchanged : a.value?.permissions === "expanded" ? n.value.upgradeExpanded : n.value.upgradeReview), u = (c) => c?.slice(0, 12) ?? "—";
312
+ return (c, g) => r.value ? (l(), k("section", {
313
313
  key: 0,
314
314
  class: "executor-upgrade",
315
315
  "data-approval-diff": "",
316
316
  "aria-label": n.value.upgradeTitle
317
317
  }, [
318
- S("p", Vt, o(n.value.upgradeTitle), 1),
318
+ C("p", Nt, o(n.value.upgradeTitle), 1),
319
319
  a.value ? (l(), k(Q, { key: 0 }, [
320
320
  a.value.root_programs.length ? (l(), k("p", Lt, o(n.value.upgradePrograms), 1)) : m("", !0),
321
321
  a.value.task_template_changed ? (l(), k("p", Bt, o(n.value.upgradeTasks), 1)) : m("", !0),
322
322
  a.value.old_policy_digest !== a.value.new_policy_digest && !a.value.root_programs.length ? (l(), k("p", Ft, o(n.value.upgradePolicy), 1)) : m("", !0),
323
- S("p", null, o(u.value), 1),
324
- S("dl", null, [
323
+ C("p", null, o(i.value), 1),
324
+ C("dl", null, [
325
325
  (l(!0), k(Q, null, fe(a.value.root_programs, (d) => (l(), k(Q, {
326
326
  key: d.name
327
327
  }, [
328
- S("dt", null, o(d.name), 1),
329
- S("dd", null, [
330
- S("code", null, o(r(d.old)) + " → " + o(r(d.new)), 1)
328
+ C("dt", null, o(d.name), 1),
329
+ C("dd", null, [
330
+ C("code", null, o(u(d.old)) + " → " + o(u(d.new)), 1)
331
331
  ])
332
332
  ], 64))), 128)),
333
- S("dt", null, o(n.value.upgradePolicyLabel), 1),
334
- S("dd", null, [
335
- S("code", null, o(r(a.value.old_policy_digest)) + " → " + o(r(a.value.new_policy_digest)), 1)
333
+ C("dt", null, o(n.value.upgradePolicyLabel), 1),
334
+ C("dd", null, [
335
+ C("code", null, o(u(a.value.old_policy_digest)) + " → " + o(u(a.value.new_policy_digest)), 1)
336
336
  ])
337
337
  ]),
338
338
  a.value.policy_changes.length ? (l(), k("details", qt, [
339
- S("summary", null, o(n.value.upgradeChanges), 1),
340
- S("ul", null, [
339
+ C("summary", null, o(n.value.upgradeChanges), 1),
340
+ C("ul", null, [
341
341
  (l(!0), k(Q, null, fe(a.value.policy_changes, (d) => (l(), k("li", {
342
342
  key: d.path
343
343
  }, [
344
- S("code", null, o(d.path), 1),
345
- S("pre", null, o(JSON.stringify(d.old)) + " → " + o(JSON.stringify(d.new)), 1)
344
+ C("code", null, o(d.path), 1),
345
+ C("pre", null, o(JSON.stringify(d.old)) + " → " + o(JSON.stringify(d.new)), 1)
346
346
  ]))), 128))
347
347
  ])
348
348
  ])) : m("", !0)
349
349
  ], 64)) : (l(), k("p", Ot, o(n.value.upgradeUnknown), 1))
350
- ], 8, Nt)) : m("", !0);
350
+ ], 8, Vt)) : m("", !0);
351
351
  }
352
352
  }), pe = (t, v) => {
353
353
  const n = t.__vccOpts || t;
354
- for (const [a, i] of v)
355
- n[a] = i;
354
+ for (const [a, r] of v)
355
+ n[a] = r;
356
356
  return n;
357
357
  }, Kt = /* @__PURE__ */ pe(Mt, [["__scopeId", "data-v-aa18745e"]]), Ht = ["data-audience"], Xt = {
358
358
  class: "executor-consent-icon",
@@ -389,32 +389,32 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
389
389
  webapiProfiles: {}
390
390
  },
391
391
  setup(t) {
392
- const v = t, n = w(() => v.status?.code === "task_outdated" || !!v.status?.approval), a = w(() => Re(v.locale)), i = w(() => ["zh-TW", "zh-CN", "ja"].includes(fa(v.locale ?? "en")) ? "" : " "), u = w(() => [a.value.consentWhy, v.purpose || (v.files ? a.value.consentPurposeFiles : a.value.consentPurpose)].join(i.value)), r = w(() => [a.value.pointPassword, a.value.pointLimited, a.value.pointUpdate, a.value.pointRevoke]);
393
- return (c, b) => (l(), k("div", {
392
+ const v = t, n = _(() => v.status?.code === "task_outdated" || !!v.status?.approval), a = _(() => Re(v.locale)), r = _(() => ["zh-TW", "zh-CN", "ja"].includes(fa(v.locale ?? "en")) ? "" : " "), i = _(() => [a.value.consentWhy, v.purpose || (v.files ? a.value.consentPurposeFiles : a.value.consentPurpose)].join(r.value)), u = _(() => [a.value.pointPassword, a.value.pointLimited, a.value.pointUpdate, a.value.pointRevoke]);
393
+ return (c, g) => (l(), k("div", {
394
394
  class: De(["executor-consent", `executor-consent-${t.layout ?? "inline"}`]),
395
395
  "data-executor-consent": "",
396
396
  "data-audience": t.admin ? "admin" : "user"
397
397
  }, [
398
- S("span", Xt, [
399
- f(e(Da), {
398
+ C("span", Xt, [
399
+ p(e(Da), {
400
400
  size: t.layout === "page" ? 24 : 18
401
401
  }, null, 8, ["size"])
402
402
  ]),
403
- S("div", Gt, [
404
- S("div", Wt, [
405
- S("p", Jt, o(t.admin ? n.value ? a.value.upgradeConsentTitle : a.value.consentTitle : a.value.consentTitleUser), 1),
406
- S("p", Yt, o(u.value), 1),
403
+ C("div", Gt, [
404
+ C("div", Wt, [
405
+ C("p", Jt, o(t.admin ? n.value ? a.value.upgradeConsentTitle : a.value.consentTitle : a.value.consentTitleUser), 1),
406
+ C("p", Yt, o(i.value), 1),
407
407
  t.admin ? m("", !0) : (l(), k("p", Qt, o(a.value.consentAsk), 1))
408
408
  ]),
409
409
  t.webapiProfiles && Object.keys(t.webapiProfiles).length ? (l(), k("ul", Zt, [
410
- (l(!0), k(Q, null, fe(t.webapiProfiles, (d, p) => (l(), k("li", { key: p }, [
411
- S("strong", null, o(p), 1),
410
+ (l(!0), k(Q, null, fe(t.webapiProfiles, (d, f) => (l(), k("li", { key: f }, [
411
+ C("strong", null, o(f), 1),
412
412
  h(": " + o(d.purpose) + " ", 1),
413
- S("details", null, [
414
- S("summary", null, o(a.value.details), 1),
415
- (l(!0), k(Q, null, fe(d.apis, (P, E) => (l(), k("div", { key: E }, [
416
- S("code", null, o(E), 1),
417
- (l(!0), k(Q, null, fe(P, (x, $) => (l(), k("div", { key: $ }, o($) + " (" + o(x.join(", ")) + ")", 1))), 128))
413
+ C("details", null, [
414
+ C("summary", null, o(a.value.details), 1),
415
+ (l(!0), k(Q, null, fe(d.apis, (S, z) => (l(), k("div", { key: z }, [
416
+ C("code", null, o(z), 1),
417
+ (l(!0), k(Q, null, fe(S, (w, $) => (l(), k("div", { key: $ }, o($) + " (" + o(w.join(", ")) + ")", 1))), 128))
418
418
  ]))), 128)),
419
419
  d.raw_max_bytes ? (l(), k("code", jt, o(a.value.rawLimit) + ": " + o(d.raw_max_bytes), 1)) : m("", !0)
420
420
  ])
@@ -427,16 +427,16 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
427
427
  }, null, 8, ["status", "locale"])) : m("", !0),
428
428
  he(c.$slots, "default", {}, void 0, !0),
429
429
  t.admin ? (l(), k("details", el, [
430
- S("summary", null, [
431
- f(e(Na), {
430
+ C("summary", null, [
431
+ p(e(Va), {
432
432
  class: "executor-consent-chevron",
433
433
  size: 14,
434
434
  "aria-hidden": "true"
435
435
  }),
436
436
  h(o(a.value.consentDetails), 1)
437
437
  ]),
438
- S("ul", null, [
439
- (l(!0), k(Q, null, fe(r.value, (d) => (l(), k("li", { key: d }, o(d), 1))), 128))
438
+ C("ul", null, [
439
+ (l(!0), k(Q, null, fe(u.value, (d) => (l(), k("li", { key: d }, o(d), 1))), 128))
440
440
  ])
441
441
  ])) : m("", !0)
442
442
  ])
@@ -464,67 +464,67 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
464
464
  },
465
465
  emits: ["confirmed"],
466
466
  setup(t, { expose: v, emit: n }) {
467
- const a = t, i = n, u = w(() => Re(a.locale)), { status: r, password: c, busy: b, confirming: d, error: p, failure: P, passwordError: E, scope: x, chosen: $, options: T, dynamic: _, files: z, webapiProfiles: A, canConfirm: j, needsScope: I, refresh: ee, submit: H, explain: q } = Fa(a, () => i("confirmed")), M = w(() => d.value ? "confirming" : r.value ? r.value.state === "ready" ? "ready" : "blocked" : void 0), D = w(() => ({ ready: { tone: "success", text: u.value.statusReady }, blocked: { tone: "danger", text: u.value.statusBlocked }, confirming: { tone: "info", text: u.value.statusConfirming } })[M.value ?? "confirming"]), C = w(() => d.value ? void 0 : Se(r.value));
468
- He(() => C.value, ee);
469
- const L = w(() => !C.value && (r.value?.state === "needs-admin-approval" || I.value)), O = w(() => L.value || !!r.value?.retry);
470
- return v({ refresh: ee }), (ae, K) => t.admin ? (l(), y(e(ke), {
467
+ const a = t, r = n, i = _(() => Re(a.locale)), { status: u, password: c, busy: g, confirming: d, error: f, failure: S, passwordError: z, scope: w, chosen: $, options: T, dynamic: x, files: E, webapiProfiles: A, canConfirm: Z, needsScope: U, refresh: te, submit: H, explain: F } = Fa(a, () => r("confirmed")), M = _(() => d.value ? "confirming" : u.value ? u.value.state === "ready" ? "ready" : "blocked" : void 0), V = _(() => ({ ready: { tone: "success", text: i.value.statusReady }, blocked: { tone: "danger", text: i.value.statusBlocked }, confirming: { tone: "info", text: i.value.statusConfirming } })[M.value ?? "confirming"]), P = _(() => d.value ? void 0 : Se(u.value));
468
+ He(() => P.value, te);
469
+ const R = _(() => !P.value && (u.value?.state === "needs-admin-approval" || U.value)), q = _(() => R.value || !!u.value?.retry);
470
+ return v({ refresh: te }), (le, K) => t.admin ? (l(), y(e(ke), {
471
471
  key: 0,
472
- title: t.title ?? u.value.setupTitle,
473
- description: L.value ? void 0 : e(z) ? u.value.setupHelpFiles : u.value.setupHelp,
472
+ title: t.title ?? i.value.setupTitle,
473
+ description: R.value ? void 0 : e(E) ? i.value.setupHelpFiles : i.value.setupHelp,
474
474
  collapsible: !1,
475
- "aria-busy": e(b) || !e(r) && !e(d) && !e(p)
475
+ "aria-busy": e(g) || !e(u) && !e(d) && !e(f)
476
476
  }, {
477
477
  default: s(() => [
478
- e(p) ? (l(), y(e(W), {
478
+ e(f) ? (l(), y(e(J), {
479
479
  key: 0,
480
480
  tone: "danger",
481
481
  role: "alert"
482
482
  }, {
483
483
  default: s(() => [
484
- S("span", tl, [
485
- S("span", null, o(u.value.setupError), 1),
486
- f(e(N), {
484
+ C("span", tl, [
485
+ C("span", null, o(i.value.setupError), 1),
486
+ p(e(N), {
487
487
  variant: "secondary",
488
488
  size: "sm",
489
- disabled: e(b),
490
- onClick: e(ee)
489
+ disabled: e(g),
490
+ onClick: e(te)
491
491
  }, {
492
492
  default: s(() => [
493
- h(o(u.value.retry), 1)
493
+ h(o(i.value.retry), 1)
494
494
  ]),
495
495
  _: 1
496
496
  }, 8, ["disabled", "onClick"])
497
497
  ])
498
498
  ]),
499
499
  _: 1
500
- })) : e(P) && !("confirm" in e(P)) ? (l(), y(e(W), {
500
+ })) : e(S) && !("confirm" in e(S)) ? (l(), y(e(J), {
501
501
  key: 1,
502
502
  tone: "danger",
503
503
  role: "alert"
504
504
  }, {
505
505
  default: s(() => [
506
- h(o(e(P).code === "session_ended" ? u.value.session : e(q)(e(P)) ?? u.value.setupError), 1),
507
- e(P).reason ? (l(), k("span", ll, o(e(P).reason), 1)) : m("", !0)
506
+ h(o(e(S).code === "session_ended" ? i.value.session : e(F)(e(S)) ?? i.value.setupError), 1),
507
+ e(S).reason ? (l(), k("span", ll, o(e(S).reason), 1)) : m("", !0)
508
508
  ]),
509
509
  _: 1
510
510
  })) : m("", !0),
511
- C.value ? (l(), y(e(W), {
511
+ P.value ? (l(), y(e(J), {
512
512
  key: 2,
513
513
  tone: "info",
514
514
  role: "status"
515
515
  }, {
516
516
  default: s(() => [
517
- h(o(e(Le)(C.value, t.locale)), 1)
517
+ h(o(e(Le)(P.value, t.locale)), 1)
518
518
  ]),
519
519
  _: 1
520
520
  })) : (l(), k(Q, { key: 3 }, [
521
- !e(r) && !e(d) && !e(p) ? (l(), k("div", nl, [
522
- f(e(we), {
523
- label: u.value.status,
521
+ !e(u) && !e(d) && !e(f) ? (l(), k("div", nl, [
522
+ p(e(we), {
523
+ label: i.value.status,
524
524
  "data-placeholder-row": ""
525
525
  }, {
526
526
  default: s(() => [
527
- f(e(Ne), {
527
+ p(e(Ve), {
528
528
  width: "5rem",
529
529
  height: "20px"
530
530
  })
@@ -532,20 +532,20 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
532
532
  _: 1
533
533
  }, 8, ["label"])
534
534
  ])) : m("", !0),
535
- (e(r) || e(d)) && !L.value ? (l(), k("div", sl, [
536
- f(e(we), {
537
- label: u.value.status
535
+ (e(u) || e(d)) && !R.value ? (l(), k("div", sl, [
536
+ p(e(we), {
537
+ label: i.value.status
538
538
  }, {
539
539
  default: s(() => [
540
- S("span", {
540
+ C("span", {
541
541
  role: "status",
542
542
  "data-executor-status": M.value
543
543
  }, [
544
- f(e(Je), {
545
- tone: D.value.tone
544
+ p(e(Je), {
545
+ tone: V.value.tone
546
546
  }, {
547
547
  default: s(() => [
548
- h(o(D.value.text), 1)
548
+ h(o(V.value.text), 1)
549
549
  ]),
550
550
  _: 1
551
551
  }, 8, ["tone"])
@@ -553,104 +553,104 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
553
553
  ]),
554
554
  _: 1
555
555
  }, 8, ["label"]),
556
- e(r)?.reason && (e(r).state === "blocked" || e(r).state === "unsupported") ? (l(), y(e(we), {
556
+ e(u)?.reason && (e(u).state === "blocked" || e(u).state === "unsupported") ? (l(), y(e(we), {
557
557
  key: 0,
558
- label: u.value.details
558
+ label: i.value.details
559
559
  }, {
560
560
  default: s(() => [
561
- e(q)(e(r)) ? (l(), k(Q, { key: 0 }, [
562
- h(o(e(q)(e(r))), 1),
563
- S("span", il, o(e(r).reason), 1)
561
+ e(F)(e(u)) ? (l(), k(Q, { key: 0 }, [
562
+ h(o(e(F)(e(u))), 1),
563
+ C("span", il, o(e(u).reason), 1)
564
564
  ], 64)) : (l(), k(Q, { key: 1 }, [
565
- h(o(e(r).reason), 1)
565
+ h(o(e(u).reason), 1)
566
566
  ], 64))
567
567
  ]),
568
568
  _: 1
569
569
  }, 8, ["label"])) : m("", !0),
570
- e(x)?.selection ? (l(), y(e(we), {
570
+ e(w)?.selection ? (l(), y(e(we), {
571
571
  key: 1,
572
- label: u.value.protectedScope
572
+ label: i.value.protectedScope
573
573
  }, {
574
574
  default: s(() => [
575
- f(e(Ve), {
576
- path: e(x).selection.root
575
+ p(e(Ne), {
576
+ path: e(w).selection.root
577
577
  }, null, 8, ["path"])
578
578
  ]),
579
579
  _: 1
580
580
  }, 8, ["label"])) : m("", !0)
581
581
  ])) : m("", !0),
582
- M.value === "blocked" && !L.value ? (l(), y(e(W), {
582
+ M.value === "blocked" && !R.value ? (l(), y(e(J), {
583
583
  key: 2,
584
584
  tone: "warning"
585
585
  }, {
586
586
  default: s(() => [
587
- h(o(e(z) ? u.value.blocked : u.value.executorBlocked), 1)
587
+ h(o(e(E) ? i.value.blocked : i.value.executorBlocked), 1)
588
588
  ]),
589
589
  _: 1
590
590
  })) : m("", !0),
591
- e(x)?.mismatch ? (l(), y(e(W), {
591
+ e(w)?.mismatch ? (l(), y(e(J), {
592
592
  key: 3,
593
593
  tone: "warning"
594
594
  }, {
595
595
  default: s(() => [
596
- h(o(u.value.scopeMismatch), 1)
596
+ h(o(i.value.scopeMismatch), 1)
597
597
  ]),
598
598
  _: 1
599
599
  })) : m("", !0),
600
- O.value ? (l(), y(Ge(L.value ? aa : "div"), Ze(ya({ key: 4 }, L.value ? { admin: !0, locale: t.locale, files: e(z), purpose: t.purpose, layout: t.layout, webapiProfiles: e(A), status: e(r) } : {})), {
600
+ q.value ? (l(), y(Ge(R.value ? aa : "div"), Ze(ya({ key: 4 }, R.value ? { admin: !0, locale: t.locale, files: e(E), purpose: t.purpose, layout: t.layout, webapiProfiles: e(A), status: e(u) } : {})), {
601
601
  default: s(() => [
602
- f(e(Me), {
602
+ p(e(Me), {
603
603
  direction: "vertical",
604
604
  class: "executor-form",
605
605
  onSubmit: Oe(e(H), ["prevent"])
606
606
  }, {
607
607
  default: s(() => [
608
- e(_) ? (l(), y(e(Pe), {
608
+ e(x) ? (l(), y(e(Pe), {
609
609
  key: 0,
610
- label: u.value.scopeLabel,
611
- description: u.value.preselectionHelp
610
+ label: i.value.scopeLabel,
611
+ description: i.value.preselectionHelp
612
612
  }, {
613
613
  default: s(() => [
614
- f(e(ba), {
614
+ p(e(ba), {
615
615
  id: "delegate-scope",
616
616
  modelValue: e($),
617
- "onUpdate:modelValue": K[0] || (K[0] = (le) => je($) ? $.value = le : null),
617
+ "onUpdate:modelValue": K[0] || (K[0] = (ee) => je($) ? $.value = ee : null),
618
618
  options: e(T),
619
- disabled: e(b) || e(p)
619
+ disabled: e(g) || e(f)
620
620
  }, null, 8, ["modelValue", "options", "disabled"])
621
621
  ]),
622
622
  _: 1
623
623
  }, 8, ["label", "description"])) : m("", !0),
624
- f(e(Pe), {
625
- label: u.value.password,
626
- description: e(d) ? u.value.confirmingHelp : u.value.passwordNote,
627
- help: e(E),
628
- "validate-status": e(E) ? "error" : void 0,
624
+ p(e(Pe), {
625
+ label: i.value.password,
626
+ description: e(d) ? i.value.confirmingHelp : i.value.passwordNote,
627
+ help: e(z),
628
+ "validate-status": e(z) ? "error" : void 0,
629
629
  "validate-message-display-mode": "text"
630
630
  }, {
631
- after: s(({ classes: le }) => [
632
- f(e(N), {
633
- class: De(le.afterItem),
631
+ after: s(({ classes: ee }) => [
632
+ p(e(N), {
633
+ class: De(ee.afterItem),
634
634
  type: "submit",
635
635
  variant: "primary",
636
636
  loading: e(d),
637
- disabled: e(b) || e(p) || !e(j)
637
+ disabled: e(g) || e(f) || !e(Z)
638
638
  }, {
639
639
  default: s(() => [
640
- h(o(e(_) ? u.value.confirmShare : u.value.authorize), 1)
640
+ h(o(e(x) ? i.value.confirmShare : i.value.authorize), 1)
641
641
  ]),
642
642
  _: 1
643
643
  }, 8, ["class", "loading", "disabled"])
644
644
  ]),
645
645
  default: s(() => [
646
- f(e(Ae), {
646
+ p(e(Ae), {
647
647
  id: "delegate-password",
648
648
  modelValue: e(c),
649
- "onUpdate:modelValue": K[1] || (K[1] = (le) => je(c) ? c.value = le : null),
649
+ "onUpdate:modelValue": K[1] || (K[1] = (ee) => je(c) ? c.value = ee : null),
650
650
  type: "password",
651
651
  autocomplete: "current-password",
652
- invalid: !!e(E),
653
- disabled: e(b) || e(p)
652
+ invalid: !!e(z),
653
+ disabled: e(g) || e(f)
654
654
  }, null, 8, ["modelValue", "invalid", "disabled"])
655
655
  ]),
656
656
  _: 1
@@ -680,58 +680,58 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
680
680
  ctx: {}
681
681
  },
682
682
  setup(t) {
683
- const v = t, n = w(() => Re(v.locale)), a = Te(Ye, void 0) ?? v.ctx.executor;
683
+ const v = t, n = _(() => Re(v.locale)), a = Te(Ye, void 0) ?? v.ctx.executor;
684
684
  a && Fe(Ye, a);
685
- const i = g("checking"), u = g(), r = g(!1), c = w(() => v.ctx.user?.isAdmin === !0), b = w(() => !u.value && (i.value === "needs-admin-approval" || i.value === "blocked")), d = w(() => a?.call ? { call: (_, z) => a.call(_, z) } : v.ctx.call ? v.ctx : void 0);
686
- let p = !1, P, E, x = 0;
687
- function $(_) {
688
- const z = u.value;
689
- if (u.value = Se(_), i.value = _?.state ?? "unknown", clearTimeout(E), _ && !u.value) {
690
- x = 0;
685
+ const r = b("checking"), i = b(), u = b(!1), c = _(() => v.ctx.user?.isAdmin === !0), g = _(() => !i.value && (r.value === "needs-admin-approval" || r.value === "blocked")), d = _(() => a?.call ? { call: (x, E) => a.call(x, E) } : v.ctx.call ? v.ctx : void 0);
686
+ let f = !1, S, z, w = 0;
687
+ function $(x) {
688
+ const E = i.value;
689
+ if (i.value = Se(x), r.value = x?.state ?? "unknown", clearTimeout(z), x && !i.value) {
690
+ w = 0;
691
691
  return;
692
692
  }
693
- u.value !== z && (x = 0), E = setTimeout(() => {
693
+ i.value !== E && (w = 0), z = setTimeout(() => {
694
694
  T();
695
- }, va(x++, u.value));
695
+ }, va(w++, i.value));
696
696
  }
697
697
  async function T() {
698
698
  if (!a) return;
699
- let _;
699
+ let x;
700
700
  try {
701
- _ = await a.status();
701
+ x = await a.status();
702
702
  } catch {
703
- _ = void 0;
703
+ x = void 0;
704
704
  }
705
- p || $(_);
705
+ f || $(x);
706
706
  }
707
707
  return xe(() => {
708
- a && (a.subscribe?.((_) => {
709
- !p && !ea(_) && $(_);
710
- }), P = v.ctx.reopen?.(() => {
708
+ a && (a.subscribe?.((x) => {
709
+ !f && !ea(x) && $(x);
710
+ }), S = v.ctx.reopen?.(() => {
711
711
  T();
712
712
  }), T());
713
713
  }), _e(() => {
714
- p = !0, clearTimeout(E), P?.();
715
- }), (_, z) => u.value ? (l(), k("div", rl, [
716
- f(e(W), {
714
+ f = !0, clearTimeout(z), S?.();
715
+ }), (x, E) => i.value ? (l(), k("div", rl, [
716
+ p(e(J), {
717
717
  tone: "info",
718
718
  role: "status"
719
719
  }, {
720
720
  default: s(() => [
721
- h(o(e(Le)(u.value, t.locale)), 1)
721
+ h(o(e(Le)(i.value, t.locale)), 1)
722
722
  ]),
723
723
  _: 1
724
724
  })
725
- ])) : b.value ? (l(), k("div", dl, [
726
- f(e(W), { tone: "warning" }, {
725
+ ])) : g.value ? (l(), k("div", dl, [
726
+ p(e(J), { tone: "warning" }, {
727
727
  default: s(() => [
728
- S("span", cl, [
728
+ C("span", cl, [
729
729
  h(o(c.value ? n.value.noticeAdmin : n.value.noticeUser), 1),
730
730
  c.value ? (l(), y(e(N), {
731
731
  key: 0,
732
732
  variant: "secondary",
733
733
  size: "sm",
734
- onClick: z[0] || (z[0] = (A) => r.value = !0)
734
+ onClick: E[0] || (E[0] = (A) => u.value = !0)
735
735
  }, {
736
736
  default: s(() => [
737
737
  h(o(n.value.noticeApprove), 1)
@@ -744,12 +744,12 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
744
744
  }),
745
745
  c.value ? (l(), y(e(Ke), {
746
746
  key: 0,
747
- open: r.value && b.value,
747
+ open: u.value && g.value,
748
748
  title: n.value.setupTitle,
749
- "onUpdate:open": z[1] || (z[1] = (A) => r.value = A)
749
+ "onUpdate:open": E[1] || (E[1] = (A) => u.value = A)
750
750
  }, {
751
751
  default: s(() => [
752
- f(qa, {
752
+ p(qa, {
753
753
  admin: !0,
754
754
  locale: t.locale,
755
755
  ctx: d.value,
@@ -788,70 +788,76 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
788
788
  appRoot: { type: Boolean },
789
789
  loading: { type: Boolean }
790
790
  },
791
- emits: ["update:modelValue"],
791
+ emits: ["update:modelValue", "brand"],
792
792
  setup(t, { emit: v }) {
793
- const n = t, a = v, i = w(() => ua(n.locale)), u = w(() => n.pageSurface), r = w(() => At(n.pages, i.value)), c = w(() => Rt(r.value)), b = w(() => r.value.find((C) => C.id === n.modelValue)), d = w(() => b.value && n.loading ? { ...b.value, fill: !0 } : b.value), p = w(() => d.value?.title ?? i.value[n.modelValue] ?? i.value.status), P = Xe("scroller"), E = w(() => n.pages.some((C) => typeof C != "string"));
793
+ const n = t, a = v;
794
+ function r(R) {
795
+ a("brand", R);
796
+ const q = c.value[0];
797
+ !R.defaultPrevented && q && a("update:modelValue", q.id);
798
+ }
799
+ const i = _(() => ua(n.locale)), u = _(() => n.pageSurface), c = _(() => At(n.pages, i.value)), g = _(() => Rt(c.value)), d = _(() => c.value.find((R) => R.id === n.modelValue)), f = _(() => d.value && n.loading ? { ...d.value, fill: !0 } : d.value), S = _(() => f.value?.title ?? i.value[n.modelValue] ?? i.value.status), z = Xe("scroller"), w = _(() => n.pages.some((R) => typeof R != "string"));
794
800
  qe(() => n.modelValue, () => {
795
- E.value && !n.keepScroll && P.value && (P.value.$el.scrollTop = 0);
801
+ w.value && !n.keepScroll && z.value && (z.value.$el.scrollTop = 0);
796
802
  }, { flush: "post" });
797
- const x = Aa(), $ = w(() => n.denied === !0 ? {} : n.denied || void 0), T = w(() => ca($.value, n.locale, n.brandName ?? n.ctx?.displayName)), _ = w(() => n.ctx !== void 0 && Ea(n.ctx)), z = w(() => _.value ? n.ctx : void 0), A = (C, { slots: L }) => L.default?.(), j = w(() => n.ctx !== void 0 && !_.value);
798
- function I() {
803
+ const $ = Aa(), T = _(() => n.denied === !0 ? {} : n.denied || void 0), x = _(() => ca(T.value, n.locale, n.brandName ?? n.ctx?.displayName)), E = _(() => n.ctx !== void 0 && Ea(n.ctx)), A = _(() => E.value ? n.ctx : void 0), Z = (R, { slots: q }) => q.default?.(), U = _(() => n.ctx !== void 0 && !E.value);
804
+ function te() {
799
805
  n.ctx?.host?.activateWindow?.();
800
806
  }
801
- const ee = Xe("layout"), H = g({ brand: !1, user: !1 });
802
- qe([_, ee], (C, L, O) => {
803
- const ae = ee.value?.$el;
804
- if (!_.value || !ae) {
805
- H.value = { brand: !1, user: !1 };
807
+ const H = Xe("layout"), F = b({ brand: !1, user: !1 });
808
+ qe([E, H], (R, q, le) => {
809
+ const K = H.value?.$el;
810
+ if (!E.value || !K) {
811
+ F.value = { brand: !1, user: !1 };
806
812
  return;
807
813
  }
808
- const K = () => {
809
- const ie = Et(ae);
810
- (ie.brand !== H.value.brand || ie.user !== H.value.user) && (H.value = ie);
814
+ const ee = () => {
815
+ const oe = Et(K);
816
+ (oe.brand !== F.value.brand || oe.user !== F.value.user) && (F.value = oe);
811
817
  };
812
- K();
813
- const le = new MutationObserver((ie) => {
814
- ie.some((re) => !ae.contains(re.target)) && K();
818
+ ee();
819
+ const se = new MutationObserver((oe) => {
820
+ oe.some((G) => !K.contains(G.target)) && ee();
815
821
  });
816
- le.observe(ae.ownerDocument.body, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["class", "style", "hidden"], characterData: !0 });
817
- const se = ae.ownerDocument.defaultView;
818
- se?.addEventListener("resize", K), O(() => {
819
- le.disconnect(), se?.removeEventListener("resize", K);
822
+ se.observe(K.ownerDocument.body, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["class", "style", "hidden"], characterData: !0 });
823
+ const re = K.ownerDocument.defaultView;
824
+ re?.addEventListener("resize", ee), le(() => {
825
+ se.disconnect(), re?.removeEventListener("resize", ee);
820
826
  });
821
827
  }, { flush: "post", immediate: !0 });
822
- const q = w(() => !H.value.user && z.value?.user?.name ? z.value.user : void 0);
823
- Fe(Oa, Xe("page-actions")), Fe(Ma, Xe("page-info")), Fe(Ka, w(() => n.locale));
824
- const M = Xe("notices"), D = g(!0);
825
- return ka((C) => {
826
- const L = M.value;
827
- if (!L) return;
828
- const O = () => {
829
- D.value = !Tt(L);
828
+ const M = _(() => !F.value.user && A.value?.user?.name ? A.value.user : void 0);
829
+ Fe(Oa, Xe("page-actions")), Fe(Ma, Xe("page-info")), Fe(Ka, _(() => n.locale));
830
+ const V = Xe("notices"), P = b(!0);
831
+ return ka((R) => {
832
+ const q = V.value;
833
+ if (!q) return;
834
+ const le = () => {
835
+ P.value = !Tt(q);
830
836
  };
831
- O();
832
- const ae = new MutationObserver(O);
833
- ae.observe(L, { childList: !0, subtree: !0, characterData: !0 }), C(() => ae.disconnect());
834
- }, { flush: "post" }), ka((C) => {
835
- _.value && C(ut());
836
- }), (C, L) => (l(), y(Ge(t.appRoot ? e(rt) : A), Ze(_a(t.appRoot ? { modalScope: "app", dialogBounds: j.value ? "viewport" : "app", style: "height: 100%;", onActivate: I } : {})), {
837
+ le();
838
+ const K = new MutationObserver(le);
839
+ K.observe(q, { childList: !0, subtree: !0, characterData: !0 }), R(() => K.disconnect());
840
+ }, { flush: "post" }), ka((R) => {
841
+ E.value && R(ut());
842
+ }), (R, q) => (l(), y(Ge(t.appRoot ? e(rt) : Z), Ze(_a(t.appRoot ? { modalScope: "app", dialogBounds: U.value ? "viewport" : "app", style: "height: 100%;", onActivate: te } : {})), {
837
843
  default: s(() => [
838
- (l(), y(Ge(t.appRoot ? e(dt) : A), Ze(_a(t.appRoot ? { locale: e(fa)(t.locale) } : {})), {
844
+ (l(), y(Ge(t.appRoot ? e(dt) : Z), Ze(_a(t.appRoot ? { locale: e(fa)(t.locale) } : {})), {
839
845
  default: s(() => [
840
- $.value ? (l(), y(e(wa), {
846
+ T.value ? (l(), y(e(wa), {
841
847
  key: 0,
842
848
  class: "app-denied",
843
849
  width: t.pageWidth,
844
850
  surface: u.value
845
851
  }, {
846
852
  default: s(() => [
847
- $.value.header !== !1 ? (l(), y(e(xa), {
853
+ T.value.header !== !1 ? (l(), y(e(xa), {
848
854
  key: 0,
849
- title: $.value.title ?? T.value?.title ?? i.value.deniedTitle
855
+ title: T.value.title ?? x.value?.title ?? i.value.deniedTitle
850
856
  }, null, 8, ["title"])) : m("", !0),
851
- he(C.$slots, "denied", {}, () => [
852
- f(e(W), { tone: "danger" }, {
857
+ he(R.$slots, "denied", {}, () => [
858
+ p(e(J), { tone: "danger" }, {
853
859
  default: s(() => [
854
- S("span", pl, o($.value.message ?? T.value?.message ?? i.value.deniedMessage), 1)
860
+ C("span", pl, o(T.value.message ?? x.value?.message ?? i.value.deniedMessage), 1)
855
861
  ]),
856
862
  _: 1
857
863
  })
@@ -861,43 +867,44 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
861
867
  }, 8, ["width", "surface"])) : (l(), y(e(ct), {
862
868
  key: 1,
863
869
  ref_key: "layout",
864
- ref: ee,
865
- class: De(["app-shell", { "app-shell-fill": d.value?.fill, "app-shell-portal-brand": H.value.brand }]),
870
+ ref: H,
871
+ class: De(["app-shell", { "app-shell-fill": f.value?.fill, "app-shell-portal-brand": F.value.brand }]),
866
872
  "min-height": "0",
867
- "wide-layout": t.wideLayout ?? (_.value ? "web" : "window"),
873
+ "wide-layout": t.wideLayout ?? (E.value ? "web" : "window"),
868
874
  "sidebar-storage-key": t.sidebarStorageKey,
869
875
  navigation: t.navigation,
870
876
  "brand-name": t.brandName ?? t.ctx?.displayName,
871
- "brand-icon": t.brandIcon ?? t.ctx?.appIcon
877
+ "brand-icon": t.brandIcon ?? t.ctx?.appIcon,
878
+ onBrand: r
872
879
  }, ta({
873
880
  sidebar: s(() => [
874
- f(e(vt), {
881
+ p(e(vt), {
875
882
  "model-value": t.modelValue,
876
- groups: c.value,
877
- "onUpdate:modelValue": L[0] || (L[0] = (O) => a("update:modelValue", O))
883
+ groups: g.value,
884
+ "onUpdate:modelValue": q[0] || (q[0] = (le) => a("update:modelValue", le))
878
885
  }, null, 8, ["model-value", "groups"])
879
886
  ]),
880
887
  default: s(() => [
881
- f(e(wa), {
888
+ p(e(wa), {
882
889
  ref_key: "scroller",
883
- ref: P,
884
- class: De(["app-page", { "app-page-fill": d.value?.fill }]),
890
+ ref: z,
891
+ class: De(["app-page", { "app-page-fill": f.value?.fill }]),
885
892
  width: t.pageWidth,
886
893
  surface: u.value
887
894
  }, {
888
895
  default: s(() => [
889
- d.value?.header !== !1 ? (l(), y(e(xa), {
896
+ f.value?.header !== !1 ? (l(), y(e(xa), {
890
897
  key: 0,
891
- title: p.value,
892
- description: d.value?.description ?? t.description
898
+ title: S.value,
899
+ description: f.value?.description ?? t.description
893
900
  }, {
894
901
  meta: s(() => [
895
- S("span", ml, null, 512),
896
- he(C.$slots, "meta", { page: t.modelValue }, void 0, !0)
902
+ C("span", ml, null, 512),
903
+ he(R.$slots, "meta", { page: t.modelValue }, void 0, !0)
897
904
  ]),
898
905
  actions: s(() => [
899
- S("div", yl, null, 512),
900
- t.loading ? m("", !0) : he(C.$slots, "actions", { page: t.modelValue }, void 0, !0, 0)
906
+ C("div", yl, null, 512),
907
+ t.loading ? m("", !0) : he(R.$slots, "actions", { page: t.modelValue }, void 0, !0, 0)
901
908
  ]),
902
909
  _: 3
903
910
  }, 8, ["title", "description"])) : m("", !0),
@@ -906,23 +913,23 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
906
913
  ctx: t.ctx,
907
914
  locale: t.locale
908
915
  }, null, 8, ["ctx", "locale"])) : m("", !0),
909
- e(Ba)(x.notices?.({ page: t.modelValue })) ? (l(), k("div", {
916
+ e(Ba)($.notices?.({ page: t.modelValue })) ? (l(), k("div", {
910
917
  key: 2,
911
918
  ref: "notices",
912
919
  class: "app-notices",
913
- hidden: D.value
920
+ hidden: P.value
914
921
  }, [
915
- he(C.$slots, "notices", { page: t.modelValue }, void 0, !0)
922
+ he(R.$slots, "notices", { page: t.modelValue }, void 0, !0)
916
923
  ], 8, bl)) : m("", !0),
917
- S("div", gl, [
924
+ C("div", gl, [
918
925
  t.loading ? (l(), y(e(Ua), {
919
926
  key: 0,
920
927
  text: i.value.loading
921
928
  }, null, 8, ["text"])) : (l(), k(Q, { key: 1 }, [
922
- d.value?.component ? (l(), y(Ge(d.value.component), {
923
- key: d.value.id
929
+ f.value?.component ? (l(), y(Ge(f.value.component), {
930
+ key: f.value.id
924
931
  })) : m("", !0),
925
- he(C.$slots, "default", { page: t.modelValue }, void 0, !0)
932
+ he(R.$slots, "default", { page: t.modelValue }, void 0, !0)
926
933
  ], 64))
927
934
  ])
928
935
  ]),
@@ -931,23 +938,23 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
931
938
  ]),
932
939
  _: 2
933
940
  }, [
934
- x["sidebar-footer"] || q.value ? {
941
+ $["sidebar-footer"] || M.value ? {
935
942
  name: "sidebar-footer",
936
943
  fn: s(() => [
937
- he(C.$slots, "sidebar-footer", {}, () => [
938
- q.value ? (l(), y(e(ft), {
944
+ he(R.$slots, "sidebar-footer", {}, () => [
945
+ M.value ? (l(), y(e(ft), {
939
946
  key: 0,
940
- name: q.value.name,
941
- detail: q.value.isAdmin ? i.value.administrator : i.value.dsmUser
947
+ name: M.value.name,
948
+ detail: M.value.isAdmin ? i.value.administrator : i.value.dsmUser
942
949
  }, null, 8, ["name", "detail"])) : m("", !0)
943
950
  ], !0)
944
951
  ]),
945
952
  key: "0"
946
953
  } : void 0,
947
- x.toolbar ? {
954
+ $.toolbar ? {
948
955
  name: "toolbar",
949
956
  fn: s(() => [
950
- he(C.$slots, "toolbar", { page: t.modelValue }, void 0, !0)
957
+ he(R.$slots, "toolbar", { page: t.modelValue }, void 0, !0)
951
958
  ]),
952
959
  key: "1"
953
960
  } : void 0
@@ -959,11 +966,11 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
959
966
  _: 3
960
967
  }, 16));
961
968
  }
962
- }), $s = /* @__PURE__ */ pe(hl, [["__scopeId", "data-v-bf0d4850"]]), Ss = /* @__PURE__ */ ce({
969
+ }), $s = /* @__PURE__ */ pe(hl, [["__scopeId", "data-v-a2ccb06b"]]), Ss = /* @__PURE__ */ ce({
963
970
  __name: "PageActions",
964
971
  setup(t) {
965
- const v = Te(Oa, null), n = w(() => v?.value ?? null);
966
- return (a, i) => n.value ? (l(), y(Ra, {
972
+ const v = Te(Oa, null), n = _(() => v?.value ?? null);
973
+ return (a, r) => n.value ? (l(), y(Ra, {
967
974
  key: 0,
968
975
  to: n.value
969
976
  }, [
@@ -982,17 +989,17 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
982
989
  align: { default: "start" }
983
990
  },
984
991
  setup(t) {
985
- const v = t, n = Aa(), a = w(() => (v.notes ?? []).filter(Boolean)), i = v.inline ? null : Te(Ma, null), u = w(() => i?.value ?? null), r = Te(Ka, null), c = w(() => {
992
+ const v = t, n = Aa(), a = _(() => (v.notes ?? []).filter(Boolean)), r = v.inline ? null : Te(Ma, null), i = _(() => r?.value ?? null), u = Te(Ka, null), c = _(() => {
986
993
  if (v.label) return v.label;
987
- const b = v.locale ?? r?.value ?? "en";
988
- return n.default ? ua(b).notes : We(ua(b).notesCount, { count: a.value.length }, b);
994
+ const g = v.locale ?? u?.value ?? "en";
995
+ return n.default ? ua(g).notes : We(ua(g).notesCount, { count: a.value.length }, g);
989
996
  });
990
- return (b, d) => (a.value.length || n.default) && (!e(i) || u.value) ? (l(), y(Ra, {
997
+ return (g, d) => (a.value.length || n.default) && (!e(r) || i.value) ? (l(), y(Ra, {
991
998
  key: 0,
992
- to: u.value ?? "body",
993
- disabled: !e(i)
999
+ to: i.value ?? "body",
1000
+ disabled: !e(r)
994
1001
  }, [
995
- f(e(pt), ya(b.$attrs, {
1002
+ p(e(pt), ya(g.$attrs, {
996
1003
  class: "page-info",
997
1004
  icon: "info",
998
1005
  "trigger-action": "click",
@@ -1001,9 +1008,9 @@ const Nt = ["aria-label"], Vt = { class: "executor-upgrade-title" }, Lt = { key:
1001
1008
  "aria-label": c.value
1002
1009
  }), {
1003
1010
  default: s(() => [
1004
- he(b.$slots, "default", {}, () => [
1005
- S("ul", kl, [
1006
- (l(!0), k(Q, null, fe(a.value, (p) => (l(), k("li", { key: p }, o(p), 1))), 128))
1011
+ he(g.$slots, "default", {}, () => [
1012
+ C("ul", kl, [
1013
+ (l(!0), k(Q, null, fe(a.value, (f) => (l(), k("li", { key: f }, o(f), 1))), 128))
1007
1014
  ])
1008
1015
  ], !0)
1009
1016
  ]),
@@ -1031,7 +1038,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1031
1038
  key: 5,
1032
1039
  class: "file-selection",
1033
1040
  role: "status"
1034
- }, Nl = /* @__PURE__ */ ce({
1041
+ }, Vl = /* @__PURE__ */ ce({
1035
1042
  __name: "FileBrowser",
1036
1043
  props: {
1037
1044
  provider: {},
@@ -1042,306 +1049,306 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1042
1049
  },
1043
1050
  emits: ["selected"],
1044
1051
  setup(t, { emit: v }) {
1045
- const n = t, a = v, i = w(() => ze(n.locale)), u = Pt(), { busy: r, error: c } = u, b = g([]), d = g([]), p = g([]), P = g(), E = g(), x = g(), $ = g([]), T = g(), _ = g({ key: "name", direction: "asc" }), z = g(0), A = g([]), j = g(!1);
1046
- let I = new AbortController();
1047
- async function ee() {
1048
- const V = P.value;
1049
- !V || V.isDir || !n.provider.download || await u.run(async (B) => (await n.provider.info(V.path, B), n.provider.download(V.path), !0));
1052
+ const n = t, a = v, r = _(() => ze(n.locale)), i = Pt(), { busy: u, error: c } = i, g = b([]), d = b([]), f = b([]), S = b(), z = b(), w = b(), $ = b([]), T = b(), x = b({ key: "name", direction: "asc" }), E = b(0), A = b([]), Z = b(!1);
1053
+ let U = new AbortController();
1054
+ async function te() {
1055
+ const L = S.value;
1056
+ !L || L.isDir || !n.provider.download || await i.run(async (B) => (await n.provider.info(L.path, B), n.provider.download(L.path), !0));
1050
1057
  }
1051
1058
  async function H() {
1052
- const V = p.value.at(-1)?.path, B = A.value[0];
1053
- if (!V || !B || !n.provider.upload) return;
1054
- j.value = !1, await u.run(async (Z) => (await n.provider.upload(V, B, Z), !0)) && (A.value = [], await ne(p.value), j.value = !0);
1055
- }
1056
- const q = w(() => [
1057
- { key: "name", label: i.value.nameColumn, sortable: !0 },
1058
- { key: "kind", label: i.value.kindColumn },
1059
- { key: "bytes", label: i.value.sizeColumn, align: "right", sortable: !0 }
1060
- ]), M = nt((V, { attrs: B }) => st(sa, { ...B, kind: "folder" }));
1061
- function D(V) {
1062
- return { id: V.path, label: V.name, icon: M, data: V };
1063
- }
1064
- function C(V) {
1065
- P.value = V, a("selected", V?.path);
1066
- }
1067
- function L(V) {
1068
- E.value = V.path, C(n.mode === "folder" ? V.isDir ? V : p.value.at(-1) : V.isDir ? void 0 : V);
1069
- }
1070
- function O(V) {
1071
- V.isDir ? Ce(V) : L(V);
1072
- }
1073
- const ae = (V) => b.value.find((B) => B.path === V);
1074
- function K(V, B, F = []) {
1075
- for (const Z of V) {
1076
- const ve = [...F, Z.data];
1077
- if (Z.id === B) return ve;
1078
- const R = K(Z.children ?? [], B, ve);
1079
- if (R) return R;
1059
+ const L = f.value.at(-1)?.path, B = A.value[0];
1060
+ if (!L || !B || !n.provider.upload) return;
1061
+ Z.value = !1, await i.run(async (j) => (await n.provider.upload(L, B, j), !0)) && (A.value = [], await ne(f.value), Z.value = !0);
1062
+ }
1063
+ const F = _(() => [
1064
+ { key: "name", label: r.value.nameColumn, sortable: !0 },
1065
+ { key: "kind", label: r.value.kindColumn },
1066
+ { key: "bytes", label: r.value.sizeColumn, align: "right", sortable: !0 }
1067
+ ]), M = nt((L, { attrs: B }) => st(sa, { ...B, kind: "folder" }));
1068
+ function V(L) {
1069
+ return { id: L.path, label: L.name, icon: M, data: L };
1070
+ }
1071
+ function P(L) {
1072
+ S.value = L, a("selected", L?.path);
1073
+ }
1074
+ function R(L) {
1075
+ z.value = L.path, P(n.mode === "folder" ? L.isDir ? L : f.value.at(-1) : L.isDir ? void 0 : L);
1076
+ }
1077
+ function q(L) {
1078
+ L.isDir ? Ce(L) : R(L);
1079
+ }
1080
+ const le = (L) => g.value.find((B) => B.path === L);
1081
+ function K(L, B, O = []) {
1082
+ for (const j of L) {
1083
+ const ve = [...O, j.data];
1084
+ if (j.id === B) return ve;
1085
+ const I = K(j.children ?? [], B, ve);
1086
+ if (I) return I;
1080
1087
  }
1081
1088
  }
1082
- function le(V, B) {
1083
- for (const F of V) {
1084
- if (F.id === B) return F;
1085
- const Z = le(F.children ?? [], B);
1086
- if (Z) return Z;
1089
+ function ee(L, B) {
1090
+ for (const O of L) {
1091
+ if (O.id === B) return O;
1092
+ const j = ee(O.children ?? [], B);
1093
+ if (j) return j;
1087
1094
  }
1088
1095
  }
1089
- function se(V, B, F) {
1090
- return V.map((Z) => Z.id === B ? { ...Z, children: F } : Z.children ? { ...Z, children: se(Z.children, B, F) } : Z);
1091
- }
1092
- let ie = 0;
1093
- async function re(V) {
1094
- const B = ++ie;
1095
- for (const F of V.slice(0, -1)) {
1096
- const Z = le(d.value, F.path);
1097
- if (!Z) break;
1098
- if (Z.children === void 0) {
1099
- const ve = await J(Z);
1100
- if (B !== ie || !ve) return;
1101
- d.value = se(d.value, Z.id, ve);
1096
+ function se(L, B, O) {
1097
+ return L.map((j) => j.id === B ? { ...j, children: O } : j.children ? { ...j, children: se(j.children, B, O) } : j);
1098
+ }
1099
+ let re = 0;
1100
+ async function oe(L) {
1101
+ const B = ++re;
1102
+ for (const O of L.slice(0, -1)) {
1103
+ const j = ee(d.value, O.path);
1104
+ if (!j) break;
1105
+ if (j.children === void 0) {
1106
+ const ve = await G(j);
1107
+ if (B !== re || !ve) return;
1108
+ d.value = se(d.value, j.id, ve);
1102
1109
  }
1103
- $.value.includes(Z.id) || ($.value = [...$.value, Z.id]);
1110
+ $.value.includes(j.id) || ($.value = [...$.value, j.id]);
1104
1111
  }
1105
- T.value = V.at(-1)?.path;
1112
+ T.value = L.at(-1)?.path;
1106
1113
  }
1107
- async function J(V) {
1108
- const B = z.value, F = I.signal;
1114
+ async function G(L) {
1115
+ const B = E.value, O = U.signal;
1109
1116
  try {
1110
- const Z = [];
1117
+ const j = [];
1111
1118
  let ve = 0;
1112
1119
  for (; ve !== void 0; ) {
1113
- const R = await n.provider.list(V.id, { offset: ve, sortBy: "name", sortDirection: "ASC" }, F);
1114
- if (F.aborted || B !== z.value) return;
1115
- Z.push(...R.entries.filter((X) => X.isDir).map(D)), ve = R.nextOffset;
1120
+ const I = await n.provider.list(L.id, { offset: ve, sortBy: "name", sortDirection: "ASC" }, O);
1121
+ if (O.aborted || B !== E.value) return;
1122
+ j.push(...I.entries.filter((X) => X.isDir).map(V)), ve = I.nextOffset;
1116
1123
  }
1117
- return Z;
1118
- } catch (Z) {
1119
- !F.aborted && B === z.value && (c.value = Z, C());
1124
+ return j;
1125
+ } catch (j) {
1126
+ !O.aborted && B === E.value && (c.value = j, P());
1120
1127
  return;
1121
1128
  }
1122
1129
  }
1123
- async function ne(V, B = !1) {
1124
- if (r.value) return;
1125
- C(), E.value = void 0, b.value = B ? b.value : [], x.value = B ? x.value : void 0;
1126
- const F = B ? x.value ?? 0 : 0, Z = V.at(-1)?.path;
1127
- p.value = V;
1128
- const ve = await u.run((R) => Z ? n.provider.list(Z, { offset: F, sortBy: _.value.key, sortDirection: _.value.direction === "asc" ? "ASC" : "DESC" }, R) : n.provider.shares(F, R));
1129
- ve && (b.value = B ? [...b.value, ...ve.entries] : ve.entries, x.value = ve.nextOffset, Z ? n.mode === "folder" && !B && C(V.at(-1)) : d.value = b.value.filter((R) => R.isDir).map(D), B || re(V));
1130
+ async function ne(L, B = !1) {
1131
+ if (u.value) return;
1132
+ P(), z.value = void 0, g.value = B ? g.value : [], w.value = B ? w.value : void 0;
1133
+ const O = B ? w.value ?? 0 : 0, j = L.at(-1)?.path;
1134
+ f.value = L;
1135
+ const ve = await i.run((I) => j ? n.provider.list(j, { offset: O, sortBy: x.value.key, sortDirection: x.value.direction === "asc" ? "ASC" : "DESC" }, I) : n.provider.shares(O, I));
1136
+ ve && (g.value = B ? [...g.value, ...ve.entries] : ve.entries, w.value = ve.nextOffset, j ? n.mode === "folder" && !B && P(L.at(-1)) : d.value = g.value.filter((I) => I.isDir).map(V), B || oe(L));
1130
1137
  }
1131
- const G = w(() => [{ id: "", display: i.value.roots }, ...p.value.map((V) => ({ id: V.path, display: V.name }))]);
1132
- function ye(V) {
1133
- const B = G.value.findIndex((F) => F.id === V.id);
1134
- B < p.value.length && ue(p.value.slice(0, B));
1138
+ const W = _(() => [{ id: "", display: r.value.roots }, ...f.value.map((L) => ({ id: L.path, display: L.name }))]);
1139
+ function ye(L) {
1140
+ const B = W.value.findIndex((O) => O.id === L.id);
1141
+ B < f.value.length && ue(f.value.slice(0, B));
1135
1142
  }
1136
- function Ce(V) {
1137
- ue([...p.value, V]);
1143
+ function Ce(L) {
1144
+ ue([...f.value, L]);
1138
1145
  }
1139
- const $e = g([[]]), Y = g(0);
1140
- function ue(V) {
1141
- r.value || (V.at(-1)?.path !== p.value.at(-1)?.path && ($e.value = [...$e.value.slice(0, Y.value + 1), V], Y.value++), ne(V));
1146
+ const $e = b([[]]), Y = b(0);
1147
+ function ue(L) {
1148
+ u.value || (L.at(-1)?.path !== f.value.at(-1)?.path && ($e.value = [...$e.value.slice(0, Y.value + 1), L], Y.value++), ne(L));
1142
1149
  }
1143
- function oe(V) {
1144
- r.value || (Y.value += V, ne($e.value[Y.value]));
1150
+ function ie(L) {
1151
+ u.value || (Y.value += L, ne($e.value[Y.value]));
1145
1152
  }
1146
- function ge(V) {
1147
- _.value = { key: V?.key === "bytes" ? "size" : "name", direction: V?.direction ?? "asc" }, ne(p.value);
1153
+ function ge(L) {
1154
+ x.value = { key: L?.key === "bytes" ? "size" : "name", direction: L?.direction ?? "asc" }, ne(f.value);
1148
1155
  }
1149
1156
  function Ee() {
1150
- r.value || (z.value++, I.abort(), I = new AbortController(), d.value = [], $.value = [], T.value = void 0, $e.value = [[]], Y.value = 0, ne([]));
1157
+ u.value || (E.value++, U.abort(), U = new AbortController(), d.value = [], $.value = [], T.value = void 0, $e.value = [[]], Y.value = 0, ne([]));
1151
1158
  }
1152
1159
  return xe(() => {
1153
1160
  ne([]);
1154
1161
  }), _e(() => {
1155
- z.value++, I.abort();
1156
- }), (V, B) => (l(), k("section", {
1162
+ E.value++, U.abort();
1163
+ }), (L, B) => (l(), k("section", {
1157
1164
  class: "file-browser",
1158
- "aria-busy": e(r),
1159
- "aria-label": i.value.title
1165
+ "aria-busy": e(u),
1166
+ "aria-label": r.value.title
1160
1167
  }, [
1161
- S("div", xl, [
1162
- f(e(oa), {
1163
- label: i.value.back,
1168
+ C("div", xl, [
1169
+ p(e(oa), {
1170
+ label: r.value.back,
1164
1171
  size: "sm",
1165
- disabled: e(r) || Y.value === 0,
1166
- onClick: B[0] || (B[0] = (F) => oe(-1))
1172
+ disabled: e(u) || Y.value === 0,
1173
+ onClick: B[0] || (B[0] = (O) => ie(-1))
1167
1174
  }, {
1168
1175
  default: s(() => [
1169
- f(e(wt), {
1176
+ p(e(wt), {
1170
1177
  size: 16,
1171
1178
  "aria-hidden": "true"
1172
1179
  })
1173
1180
  ]),
1174
1181
  _: 1
1175
1182
  }, 8, ["label", "disabled"]),
1176
- f(e(oa), {
1177
- label: i.value.forward,
1183
+ p(e(oa), {
1184
+ label: r.value.forward,
1178
1185
  size: "sm",
1179
- disabled: e(r) || Y.value === $e.value.length - 1,
1180
- onClick: B[1] || (B[1] = (F) => oe(1))
1186
+ disabled: e(u) || Y.value === $e.value.length - 1,
1187
+ onClick: B[1] || (B[1] = (O) => ie(1))
1181
1188
  }, {
1182
1189
  default: s(() => [
1183
- f(e(Na), {
1190
+ p(e(Va), {
1184
1191
  size: 16,
1185
1192
  "aria-hidden": "true"
1186
1193
  })
1187
1194
  ]),
1188
1195
  _: 1
1189
1196
  }, 8, ["label", "disabled"]),
1190
- f(e(oa), {
1191
- label: i.value.refresh,
1197
+ p(e(oa), {
1198
+ label: r.value.refresh,
1192
1199
  size: "sm",
1193
- disabled: e(r),
1200
+ disabled: e(u),
1194
1201
  onClick: Ee
1195
1202
  }, {
1196
1203
  default: s(() => [
1197
- f(e(xt), {
1204
+ p(e(xt), {
1198
1205
  size: 14,
1199
1206
  "aria-hidden": "true"
1200
1207
  })
1201
1208
  ]),
1202
1209
  _: 1
1203
1210
  }, 8, ["label", "disabled"]),
1204
- S("nav", {
1211
+ C("nav", {
1205
1212
  class: "file-path",
1206
- "aria-label": i.value.location
1213
+ "aria-label": r.value.location
1207
1214
  }, [
1208
- f(e(mt), {
1209
- items: G.value,
1210
- "collapsed-label": i.value.fullPath,
1215
+ p(e(mt), {
1216
+ items: W.value,
1217
+ "collapsed-label": r.value.fullPath,
1211
1218
  onClickItem: ye
1212
1219
  }, null, 8, ["items", "collapsed-label"])
1213
1220
  ], 8, Cl)
1214
1221
  ]),
1215
- t.transfers && t.provider.upload && p.value.length ? (l(), k("div", $l, [
1216
- f(e(yt), {
1222
+ t.transfers && t.provider.upload && f.value.length ? (l(), k("div", $l, [
1223
+ p(e(yt), {
1217
1224
  modelValue: A.value,
1218
- "onUpdate:modelValue": B[2] || (B[2] = (F) => A.value = F),
1225
+ "onUpdate:modelValue": B[2] || (B[2] = (O) => A.value = O),
1219
1226
  variant: "compact",
1220
- disabled: e(r),
1227
+ disabled: e(u),
1221
1228
  "max-files": 1,
1222
1229
  "max-size": 16 * 1024 ** 3,
1223
- title: i.value.upload,
1224
- onRejected: B[3] || (B[3] = (F) => c.value = { code: "upload_size_required" })
1230
+ title: r.value.upload,
1231
+ onRejected: B[3] || (B[3] = (O) => c.value = { code: "upload_size_required" })
1225
1232
  }, null, 8, ["modelValue", "disabled", "title"]),
1226
- f(e(N), {
1233
+ p(e(N), {
1227
1234
  variant: "primary",
1228
- disabled: e(r) || !A.value.length,
1235
+ disabled: e(u) || !A.value.length,
1229
1236
  onClick: H
1230
1237
  }, {
1231
1238
  default: s(() => [
1232
- h(o(i.value.upload), 1)
1239
+ h(o(r.value.upload), 1)
1233
1240
  ]),
1234
1241
  _: 1
1235
1242
  }, 8, ["disabled"])
1236
1243
  ])) : m("", !0),
1237
- j.value ? (l(), k("p", Sl, o(i.value.uploaded), 1)) : m("", !0),
1238
- t.transfers && t.provider.download && P.value && !P.value.isDir && !e(c) ? (l(), y(e(N), {
1244
+ Z.value ? (l(), k("p", Sl, o(r.value.uploaded), 1)) : m("", !0),
1245
+ t.transfers && t.provider.download && S.value && !S.value.isDir && !e(c) ? (l(), y(e(N), {
1239
1246
  key: 2,
1240
1247
  variant: "secondary",
1241
- disabled: e(r),
1242
- onClick: ee
1248
+ disabled: e(u),
1249
+ onClick: te
1243
1250
  }, {
1244
1251
  default: s(() => [
1245
- h(o(i.value.download), 1)
1252
+ h(o(r.value.download), 1)
1246
1253
  ]),
1247
1254
  _: 1
1248
1255
  }, 8, ["disabled"])) : m("", !0),
1249
- e(c) ? (l(), y(e(W), {
1256
+ e(c) ? (l(), y(e(J), {
1250
1257
  key: 3,
1251
1258
  tone: "danger"
1252
1259
  }, {
1253
1260
  default: s(() => [
1254
- S("span", Pl, o(e(Ta)(e(c), i.value, t.locale, t.name)), 1)
1261
+ C("span", Pl, o(e(Ta)(e(c), r.value, t.locale, t.name)), 1)
1255
1262
  ]),
1256
1263
  _: 1
1257
1264
  })) : m("", !0),
1258
- e(r) ? (l(), k("p", El, o(i.value.loading), 1)) : m("", !0),
1259
- S("div", Tl, [
1260
- S("aside", {
1265
+ e(u) ? (l(), k("p", El, o(r.value.loading), 1)) : m("", !0),
1266
+ C("div", Tl, [
1267
+ C("aside", {
1261
1268
  class: "file-tree",
1262
- "aria-label": i.value.roots
1269
+ "aria-label": r.value.roots
1263
1270
  }, [
1264
1271
  d.value.length ? (l(), y(e(bt), {
1265
- key: z.value,
1272
+ key: E.value,
1266
1273
  "selection-style": "background",
1267
1274
  modelValue: T.value,
1268
- "onUpdate:modelValue": B[4] || (B[4] = (F) => T.value = F),
1275
+ "onUpdate:modelValue": B[4] || (B[4] = (O) => T.value = O),
1269
1276
  nodes: d.value,
1270
- "onUpdate:nodes": B[5] || (B[5] = (F) => d.value = F),
1277
+ "onUpdate:nodes": B[5] || (B[5] = (O) => d.value = O),
1271
1278
  expanded: $.value,
1272
- "onUpdate:expanded": B[6] || (B[6] = (F) => $.value = F),
1273
- "load-children": J,
1274
- "expand-label": (F, Z) => e(We)(Z ? i.value.collapse : i.value.expand, { name: F.label }),
1275
- onSelect: B[7] || (B[7] = (F) => ue(K(d.value, F.id) ?? [F.data]))
1279
+ "onUpdate:expanded": B[6] || (B[6] = (O) => $.value = O),
1280
+ "load-children": G,
1281
+ "expand-label": (O, j) => e(We)(j ? r.value.collapse : r.value.expand, { name: O.label }),
1282
+ onSelect: B[7] || (B[7] = (O) => ue(K(d.value, O.id) ?? [O.data]))
1276
1283
  }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : m("", !0)
1277
1284
  ], 8, zl),
1278
- S("div", Al, [
1285
+ C("div", Al, [
1279
1286
  e(c) ? m("", !0) : (l(), y(e(gt), {
1280
1287
  key: 0,
1281
- columns: q.value,
1282
- rows: b.value.map((F) => ({ ...F, kind: F.isDir ? i.value.directoryKind : i.value.fileKind })),
1288
+ columns: F.value,
1289
+ rows: g.value.map((O) => ({ ...O, kind: O.isDir ? r.value.directoryKind : r.value.fileKind })),
1283
1290
  "row-key": "path",
1284
1291
  footer: !1,
1285
1292
  resizable: !1,
1286
1293
  "local-sort": !1,
1287
1294
  "local-pagination": !1,
1288
- loading: e(r),
1289
- "loading-text": i.value.loading,
1290
- sort: { key: _.value.key === "size" ? "bytes" : _.value.key, direction: _.value.direction },
1291
- labels: { empty: i.value.emptyFolder },
1295
+ loading: e(u),
1296
+ "loading-text": r.value.loading,
1297
+ sort: { key: x.value.key === "size" ? "bytes" : x.value.key, direction: x.value.direction },
1298
+ labels: { empty: r.value.emptyFolder },
1292
1299
  "single-select": "",
1293
- "selected-keys": E.value ? [E.value] : [],
1300
+ "selected-keys": z.value ? [z.value] : [],
1294
1301
  "onUpdate:sort": ge,
1295
- "onUpdate:selectedKeys": B[8] || (B[8] = (F) => {
1296
- e(r) || L(ae(F[0]));
1302
+ "onUpdate:selectedKeys": B[8] || (B[8] = (O) => {
1303
+ e(u) || R(le(O[0]));
1297
1304
  }),
1298
- onRowActivate: B[9] || (B[9] = (F) => {
1299
- e(r) || O(ae(F.path));
1305
+ onRowActivate: B[9] || (B[9] = (O) => {
1306
+ e(u) || q(le(O.path));
1300
1307
  }),
1301
- onRowDblclick: B[10] || (B[10] = (F) => {
1302
- e(r) || O(ae(F.path));
1308
+ onRowDblclick: B[10] || (B[10] = (O) => {
1309
+ e(u) || q(le(O.path));
1303
1310
  })
1304
1311
  }, {
1305
- "cell-name": s(({ row: F }) => [
1306
- S("span", Rl, [
1307
- f(e(sa), {
1308
- kind: F.isDir ? "folder" : "file",
1309
- name: F.name
1312
+ "cell-name": s(({ row: O }) => [
1313
+ C("span", Rl, [
1314
+ p(e(sa), {
1315
+ kind: O.isDir ? "folder" : "file",
1316
+ name: O.name
1310
1317
  }, null, 8, ["kind", "name"]),
1311
- h(o(F.name), 1)
1318
+ h(o(O.name), 1)
1312
1319
  ])
1313
1320
  ]),
1314
1321
  empty: s(() => [
1315
- S("div", Il, [
1316
- f(e(sa), {
1322
+ C("div", Il, [
1323
+ p(e(sa), {
1317
1324
  kind: "folder",
1318
1325
  size: [40, 40]
1319
1326
  }),
1320
- S("span", null, o(i.value.emptyFolder), 1)
1327
+ C("span", null, o(r.value.emptyFolder), 1)
1321
1328
  ])
1322
1329
  ]),
1323
- "cell-bytes": s(({ row: F }) => [
1324
- S("span", Ul, o(F.isDir || F.bytes === void 0 ? "—" : e(da)(F.bytes, e(fa)(t.locale))), 1)
1330
+ "cell-bytes": s(({ row: O }) => [
1331
+ C("span", Ul, o(O.isDir || O.bytes === void 0 ? "—" : e(da)(O.bytes, e(fa)(t.locale))), 1)
1325
1332
  ]),
1326
1333
  _: 1
1327
1334
  }, 8, ["columns", "rows", "loading", "loading-text", "sort", "labels", "selected-keys"])),
1328
- x.value !== void 0 && !e(c) ? (l(), y(e(N), {
1335
+ w.value !== void 0 && !e(c) ? (l(), y(e(N), {
1329
1336
  key: 1,
1330
1337
  variant: "secondary",
1331
- disabled: e(r),
1332
- onClick: B[11] || (B[11] = (F) => ne(p.value, !0))
1338
+ disabled: e(u),
1339
+ onClick: B[11] || (B[11] = (O) => ne(f.value, !0))
1333
1340
  }, {
1334
1341
  default: s(() => [
1335
- h(o(i.value.loadMore), 1)
1342
+ h(o(r.value.loadMore), 1)
1336
1343
  ]),
1337
1344
  _: 1
1338
1345
  }, 8, ["disabled"])) : m("", !0)
1339
1346
  ])
1340
1347
  ]),
1341
- P.value && !e(c) ? (l(), k("p", Dl, o(e(We)(i.value.selected, { name: P.value.path })), 1)) : m("", !0)
1348
+ S.value && !e(c) ? (l(), k("p", Dl, o(e(We)(r.value.selected, { name: S.value.path })), 1)) : m("", !0)
1342
1349
  ], 8, wl));
1343
1350
  }
1344
- }), Ha = /* @__PURE__ */ pe(Nl, [["__scopeId", "data-v-f4863cea"]]), Vl = {
1351
+ }), Ha = /* @__PURE__ */ pe(Vl, [["__scopeId", "data-v-f4863cea"]]), Nl = {
1345
1352
  key: 0,
1346
1353
  class: "save-consent"
1347
1354
  }, Ll = ["aria-busy", "inert"], Bl = /* @__PURE__ */ ce({
@@ -1359,46 +1366,46 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1359
1366
  },
1360
1367
  emits: ["update:open", "selected", "authorized", "refused"],
1361
1368
  setup(t, { emit: v }) {
1362
- const n = t, a = v, i = g(), u = w(() => ze(n.locale)), r = w(() => pa(n.locale)), c = g(!1), b = g();
1363
- let d = 0, p = !1;
1369
+ const n = t, a = v, r = b(), i = _(() => ze(n.locale)), u = _(() => pa(n.locale)), c = b(!1), g = b();
1370
+ let d = 0, f = !1;
1364
1371
  qe(() => n.open, () => {
1365
- d++, i.value = void 0, b.value = void 0;
1372
+ d++, r.value = void 0, g.value = void 0;
1366
1373
  }), _e(() => {
1367
- p = !0, d++;
1374
+ f = !0, d++;
1368
1375
  });
1369
- function P() {
1370
- c.value || (i.value = void 0, a("update:open", !1));
1376
+ function S() {
1377
+ c.value || (r.value = void 0, a("update:open", !1));
1371
1378
  }
1372
- async function E() {
1373
- const x = i.value, $ = n.destination, T = d;
1374
- if (!(!x || c.value || !n.open || p || $ && n.mode !== "folder")) {
1379
+ async function z() {
1380
+ const w = r.value, $ = n.destination, T = d;
1381
+ if (!(!w || c.value || !n.open || f || $ && n.mode !== "folder")) {
1375
1382
  if (!$) {
1376
- a("selected", x), P();
1383
+ a("selected", w), S();
1377
1384
  return;
1378
1385
  }
1379
- c.value = !0, b.value = void 0;
1386
+ c.value = !0, g.value = void 0;
1380
1387
  try {
1381
- const _ = await $.selectDestination({ key: $.key, path: x });
1382
- if (p || T !== d) return;
1383
- if (!_ || typeof _.id != "string" || !_.id || typeof _.username != "string" || !_.username || _.path !== x || _.key !== $.key || _.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
1384
- a("authorized", _), c.value = !1, P();
1385
- } catch (_) {
1386
- if (p || T !== d) return;
1387
- if (_?.code === "APP_DENIED") {
1388
- c.value = !1, a("refused", _), P();
1388
+ const x = await $.selectDestination({ key: $.key, path: w });
1389
+ if (f || T !== d) return;
1390
+ if (!x || typeof x.id != "string" || !x.id || typeof x.username != "string" || !x.username || x.path !== w || x.key !== $.key || x.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
1391
+ a("authorized", x), c.value = !1, S();
1392
+ } catch (x) {
1393
+ if (f || T !== d) return;
1394
+ if (x?.code === "APP_DENIED") {
1395
+ c.value = !1, a("refused", x), S();
1389
1396
  return;
1390
1397
  }
1391
- b.value = _;
1398
+ g.value = x;
1392
1399
  } finally {
1393
- p || (c.value = !1);
1400
+ f || (c.value = !1);
1394
1401
  }
1395
1402
  }
1396
1403
  }
1397
- return (x, $) => (l(), y(e(Ke), {
1404
+ return (w, $) => (l(), y(e(Ke), {
1398
1405
  open: t.open,
1399
- title: t.title ?? (t.mode === "folder" ? u.value.choose : u.value.chooseFile),
1400
- description: t.description ?? u.value.ownPermissions,
1401
- "close-label": u.value.close,
1406
+ title: t.title ?? (t.mode === "folder" ? i.value.choose : i.value.chooseFile),
1407
+ description: t.description ?? i.value.ownPermissions,
1408
+ "close-label": i.value.close,
1402
1409
  "show-close": !c.value,
1403
1410
  width: "800px",
1404
1411
  onEscapeKeyDown: $[1] || ($[1] = (T) => {
@@ -1408,45 +1415,45 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1408
1415
  c.value && T.preventDefault();
1409
1416
  }),
1410
1417
  "onUpdate:open": $[3] || ($[3] = (T) => {
1411
- T || P();
1418
+ T || S();
1412
1419
  })
1413
1420
  }, {
1414
1421
  footer: s(() => [
1415
- f(e(N), {
1422
+ p(e(N), {
1416
1423
  variant: "secondary",
1417
1424
  disabled: c.value,
1418
- onClick: P
1425
+ onClick: S
1419
1426
  }, {
1420
1427
  default: s(() => [
1421
- h(o(u.value.cancel), 1)
1428
+ h(o(i.value.cancel), 1)
1422
1429
  ]),
1423
1430
  _: 1
1424
1431
  }, 8, ["disabled"]),
1425
- f(e(N), {
1432
+ p(e(N), {
1426
1433
  variant: "primary",
1427
- disabled: !i.value || c.value || !!t.destination && t.mode !== "folder",
1428
- onClick: E
1434
+ disabled: !r.value || c.value || !!t.destination && t.mode !== "folder",
1435
+ onClick: z
1429
1436
  }, {
1430
1437
  default: s(() => [
1431
- h(o(u.value.confirm), 1)
1438
+ h(o(i.value.confirm), 1)
1432
1439
  ]),
1433
1440
  _: 1
1434
1441
  }, 8, ["disabled"])
1435
1442
  ]),
1436
1443
  default: s(() => [
1437
- t.destination ? (l(), k("p", Vl, o(r.value.selection), 1)) : m("", !0),
1438
- b.value ? (l(), y(e(W), {
1444
+ t.destination ? (l(), k("p", Nl, o(u.value.selection), 1)) : m("", !0),
1445
+ g.value ? (l(), y(e(J), {
1439
1446
  key: 1,
1440
1447
  tone: "danger",
1441
1448
  role: "alert",
1442
1449
  class: "save-message"
1443
1450
  }, {
1444
1451
  default: s(() => [
1445
- h(o(t.errorText?.(b.value) ?? e(Qe)(b.value, r.value, "select", t.locale, t.name)), 1)
1452
+ h(o(t.errorText?.(g.value) ?? e(Qe)(g.value, u.value, "select", t.locale, t.name)), 1)
1446
1453
  ]),
1447
1454
  _: 1
1448
1455
  })) : m("", !0),
1449
- S("div", {
1456
+ C("div", {
1450
1457
  class: "nas-picker-content",
1451
1458
  "aria-busy": c.value,
1452
1459
  inert: c.value
@@ -1457,7 +1464,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1457
1464
  locale: t.locale,
1458
1465
  name: t.name,
1459
1466
  mode: t.mode,
1460
- onSelected: $[0] || ($[0] = (T) => i.value = T)
1467
+ onSelected: $[0] || ($[0] = (T) => r.value = T)
1461
1468
  }, null, 8, ["provider", "locale", "name", "mode"])) : m("", !0)
1462
1469
  ], 8, Ll)
1463
1470
  ]),
@@ -1474,27 +1481,27 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1474
1481
  ctx: {}
1475
1482
  },
1476
1483
  setup(t) {
1477
- const v = t, n = g(), a = g(), i = g(!1), u = g("folder"), r = g(!1), c = g(""), b = g(0), d = za(v.ctx);
1478
- let p = !1, P;
1479
- async function E() {
1480
- if (!p) {
1481
- n.value = void 0, i.value = !1, c.value = "", r.value = !1, b.value++;
1484
+ const v = t, n = b(), a = b(), r = b(!1), i = b("folder"), u = b(!1), c = b(""), g = b(0), d = za(v.ctx);
1485
+ let f = !1, S;
1486
+ async function z() {
1487
+ if (!f) {
1488
+ n.value = void 0, r.value = !1, c.value = "", u.value = !1, g.value++;
1482
1489
  try {
1483
- await v.ctx.call("nas.session.status"), p || (a.value = void 0, i.value = !0);
1484
- } catch (x) {
1485
- if (p) return;
1486
- a.value = Se(x), !a.value && x?.code !== "unknown_method" && (n.value = x);
1490
+ await v.ctx.call("nas.session.status"), f || (a.value = void 0, r.value = !0);
1491
+ } catch (w) {
1492
+ if (f) return;
1493
+ a.value = Se(w), !a.value && w?.code !== "unknown_method" && (n.value = w);
1487
1494
  }
1488
1495
  }
1489
1496
  }
1490
- return He(() => a.value, E), xe(() => {
1491
- P = v.ctx.reopen(() => {
1492
- E();
1493
- }), E();
1497
+ return He(() => a.value, z), xe(() => {
1498
+ S = v.ctx.reopen(() => {
1499
+ z();
1500
+ }), z();
1494
1501
  }), _e(() => {
1495
- p = !0, P?.(), d.dispose();
1496
- }), (x, $) => (l(), k(Q, null, [
1497
- a.value ? (l(), y(e(W), {
1502
+ f = !0, S?.(), d.dispose();
1503
+ }), (w, $) => (l(), k(Q, null, [
1504
+ a.value ? (l(), y(e(J), {
1498
1505
  key: 0,
1499
1506
  tone: "info",
1500
1507
  role: "status"
@@ -1504,15 +1511,15 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1504
1511
  ]),
1505
1512
  _: 1
1506
1513
  })) : m("", !0),
1507
- n.value ? (l(), y(e(W), {
1514
+ n.value ? (l(), y(e(J), {
1508
1515
  key: 1,
1509
1516
  tone: "danger"
1510
1517
  }, {
1511
1518
  default: s(() => [
1512
- S("span", Fl, o(e(Ta)(n.value, e(ze)(t.ctx.locale), t.ctx.locale, t.ctx.displayName)), 1),
1513
- f(e(N), {
1519
+ C("span", Fl, o(e(Ta)(n.value, e(ze)(t.ctx.locale), t.ctx.locale, t.ctx.displayName)), 1),
1520
+ p(e(N), {
1514
1521
  variant: "secondary",
1515
- onClick: E
1522
+ onClick: z
1516
1523
  }, {
1517
1524
  default: s(() => [
1518
1525
  h(o(e(ze)(t.ctx.locale).refresh), 1)
@@ -1522,18 +1529,18 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1522
1529
  ]),
1523
1530
  _: 1
1524
1531
  })) : m("", !0),
1525
- i.value ? (l(), y(e(ke), {
1532
+ r.value ? (l(), y(e(ke), {
1526
1533
  key: 2,
1527
1534
  title: e(ze)(t.ctx.locale).title,
1528
1535
  description: e(ze)(t.ctx.locale).ownPermissions,
1529
1536
  collapsible: !1
1530
1537
  }, {
1531
1538
  default: s(() => [
1532
- S("div", ql, [
1533
- f(e(N), {
1539
+ C("div", ql, [
1540
+ p(e(N), {
1534
1541
  variant: "secondary",
1535
1542
  onClick: $[0] || ($[0] = (T) => {
1536
- u.value = "folder", r.value = !0;
1543
+ i.value = "folder", u.value = !0;
1537
1544
  })
1538
1545
  }, {
1539
1546
  default: s(() => [
@@ -1541,10 +1548,10 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1541
1548
  ]),
1542
1549
  _: 1
1543
1550
  }),
1544
- f(e(N), {
1551
+ p(e(N), {
1545
1552
  variant: "secondary",
1546
1553
  onClick: $[1] || ($[1] = (T) => {
1547
- u.value = "file", r.value = !0;
1554
+ i.value = "file", u.value = !0;
1548
1555
  })
1549
1556
  }, {
1550
1557
  default: s(() => [
@@ -1554,22 +1561,22 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1554
1561
  })
1555
1562
  ]),
1556
1563
  c.value ? (l(), k("p", Ol, [
1557
- f(e(Ve), { path: c.value }, null, 8, ["path"])
1564
+ p(e(Ne), { path: c.value }, null, 8, ["path"])
1558
1565
  ])) : m("", !0),
1559
1566
  (l(), y(Ha, {
1560
- key: b.value,
1567
+ key: g.value,
1561
1568
  provider: e(d),
1562
1569
  locale: t.ctx.locale,
1563
1570
  name: t.ctx.displayName,
1564
1571
  transfers: ""
1565
1572
  }, null, 8, ["provider", "locale", "name"])),
1566
- f(na, {
1573
+ p(na, {
1567
1574
  provider: e(d),
1568
1575
  locale: t.ctx.locale,
1569
1576
  name: t.ctx.displayName,
1570
- mode: u.value,
1571
- open: r.value,
1572
- "onUpdate:open": $[2] || ($[2] = (T) => r.value = T),
1577
+ mode: i.value,
1578
+ open: u.value,
1579
+ "onUpdate:open": $[2] || ($[2] = (T) => u.value = T),
1573
1580
  onSelected: $[3] || ($[3] = (T) => c.value = T)
1574
1581
  }, null, 8, ["provider", "locale", "name", "mode", "open"])
1575
1582
  ]),
@@ -1583,91 +1590,91 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1583
1590
  portal: {}
1584
1591
  },
1585
1592
  setup(t) {
1586
- const v = t, n = La(), a = v.portal.messages, i = g(), u = g(""), r = g(!1), c = g(""), b = g(!0), d = g(!1), p = g(ia.get(v.portal));
1587
- let P = !1, E = !1;
1588
- function x(D) {
1589
- if (!E && (i.value = D, u.value = D.alias || D.defaultAlias, D.url))
1593
+ const v = t, n = La(), a = v.portal.messages, r = b(), i = b(""), u = b(!1), c = b(""), g = b(!0), d = b(!1), f = b(ia.get(v.portal));
1594
+ let S = !1, z = !1;
1595
+ function w(V) {
1596
+ if (!z && (r.value = V, i.value = V.alias || V.defaultAlias, V.url))
1590
1597
  try {
1591
- const C = new URL(D.url);
1592
- P ||= C.origin === window.location.origin && window.location.pathname.startsWith(C.pathname);
1598
+ const P = new URL(V.url);
1599
+ S ||= P.origin === window.location.origin && window.location.pathname.startsWith(P.pathname);
1593
1600
  } catch {
1594
1601
  }
1595
1602
  }
1596
1603
  const $ = v.portal.lastStatus?.();
1597
- $ && x($);
1598
- const T = 5e3, _ = /* @__PURE__ */ Symbol("late");
1599
- async function z(D) {
1600
- if (r.value) return;
1601
- r.value = !0, c.value = "";
1602
- const C = D();
1604
+ $ && w($);
1605
+ const T = 5e3, x = /* @__PURE__ */ Symbol("late");
1606
+ async function E(V) {
1607
+ if (u.value) return;
1608
+ u.value = !0, c.value = "";
1609
+ const P = V();
1603
1610
  try {
1604
- const L = await Promise.race([C, new Promise((O) => setTimeout(() => O(_), T))]);
1605
- if (L !== _) {
1606
- x(L);
1611
+ const R = await Promise.race([P, new Promise((q) => setTimeout(() => q(x), T))]);
1612
+ if (R !== x) {
1613
+ w(R);
1607
1614
  return;
1608
1615
  }
1609
- x(await v.portal.status());
1616
+ w(await v.portal.status());
1610
1617
  try {
1611
- await C;
1618
+ await P;
1612
1619
  } finally {
1613
- x(await v.portal.status());
1620
+ w(await v.portal.status());
1614
1621
  }
1615
- } catch (L) {
1616
- E || (c.value = a[L?.code || ""] || a.portal_unavailable);
1622
+ } catch (R) {
1623
+ z || (c.value = a[R?.code || ""] || a.portal_unavailable);
1617
1624
  } finally {
1618
- E || (r.value = !1);
1625
+ z || (u.value = !1);
1619
1626
  }
1620
1627
  }
1621
- const A = w(() => !!i.value?.canManage && !!i.value.entry && i.value.entry !== "registered"), j = w(() => {
1622
- const D = i.value;
1623
- if (D) {
1624
- if (A.value) return D.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
1625
- if (D.state !== "active")
1626
- return D.canManage ? a.inactive : D.controlPanel ? void 0 : a.askAdmin;
1628
+ const A = _(() => !!r.value?.canManage && !!r.value.entry && r.value.entry !== "registered"), Z = _(() => {
1629
+ const V = r.value;
1630
+ if (V) {
1631
+ if (A.value) return V.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
1632
+ if (V.state !== "active")
1633
+ return V.canManage ? a.inactive : V.controlPanel ? void 0 : a.askAdmin;
1627
1634
  }
1628
- }), I = a.link?.replace(/\s*[::]\s*$/, "");
1629
- async function ee() {
1630
- const D = await v.portal.register();
1631
- return D.canManage && D.entry === "registered" && D.state === "inactive" ? (x(D), v.portal.apply(D.alias || D.defaultAlias)) : D;
1635
+ }), U = a.link?.replace(/\s*[::]\s*$/, "");
1636
+ async function te() {
1637
+ const V = await v.portal.register();
1638
+ return V.canManage && V.entry === "registered" && V.state === "inactive" ? (w(V), v.portal.apply(V.alias || V.defaultAlias)) : V;
1632
1639
  }
1633
1640
  function H() {
1634
- !r.value && !p.value && v.portal.status().then(x, () => {
1641
+ !u.value && !f.value && v.portal.status().then(w, () => {
1635
1642
  }).finally(() => {
1636
- E || (b.value = !1);
1643
+ z || (g.value = !1);
1637
1644
  });
1638
1645
  }
1639
- function q() {
1640
- P ? d.value = !0 : z(() => v.portal.unregister());
1646
+ function F() {
1647
+ S ? d.value = !0 : E(() => v.portal.unregister());
1641
1648
  }
1642
1649
  async function M() {
1643
- if (d.value = !1, !r.value) {
1644
- r.value = !0, p.value = "removalUnconfirmed", ia.set(v.portal, p.value);
1650
+ if (d.value = !1, !u.value) {
1651
+ u.value = !0, f.value = "removalUnconfirmed", ia.set(v.portal, f.value);
1645
1652
  try {
1646
- await v.portal.unregister(), p.value = "removedFromPage", ia.set(v.portal, p.value);
1653
+ await v.portal.unregister(), f.value = "removedFromPage", ia.set(v.portal, f.value);
1647
1654
  } catch {
1648
1655
  } finally {
1649
- E || (r.value = !1);
1656
+ z || (u.value = !1);
1650
1657
  }
1651
1658
  }
1652
1659
  }
1653
1660
  return xe(() => {
1654
1661
  n.subscribe?.(H), H();
1655
1662
  }), _e(() => {
1656
- E = !0;
1657
- }), (D, C) => (l(), k(Q, null, [
1658
- p.value ? (l(), y(e(ke), {
1663
+ z = !0;
1664
+ }), (V, P) => (l(), k(Q, null, [
1665
+ f.value ? (l(), y(e(ke), {
1659
1666
  key: 0,
1660
1667
  title: e(a).title,
1661
1668
  collapsible: !1
1662
1669
  }, {
1663
1670
  default: s(() => [
1664
- f(e(W), { tone: "info" }, {
1671
+ p(e(J), { tone: "info" }, {
1665
1672
  default: s(() => [
1666
- S("span", Kl, o(e(a)[p.value]), 1)
1673
+ C("span", Kl, o(e(a)[f.value]), 1)
1667
1674
  ]),
1668
1675
  _: 1
1669
1676
  }),
1670
- f(e(ra), {
1677
+ p(e(ra), {
1671
1678
  href: "/",
1672
1679
  external: ""
1673
1680
  }, {
@@ -1678,95 +1685,95 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1678
1685
  })
1679
1686
  ]),
1680
1687
  _: 1
1681
- }, 8, ["title"])) : i.value || b.value ? (l(), y(e(ke), {
1688
+ }, 8, ["title"])) : r.value || g.value ? (l(), y(e(ke), {
1682
1689
  key: 1,
1683
1690
  title: e(a).title,
1684
- description: j.value,
1691
+ description: Z.value,
1685
1692
  collapsible: !1,
1686
- "aria-busy": r.value || !i.value
1693
+ "aria-busy": u.value || !r.value
1687
1694
  }, ta({
1688
1695
  default: s(() => [
1689
- i.value ? (l(), k(Q, { key: 1 }, [
1690
- i.value.state === "active" ? (l(), y(e(we), {
1696
+ r.value ? (l(), k(Q, { key: 1 }, [
1697
+ r.value.state === "active" ? (l(), y(e(we), {
1691
1698
  key: 0,
1692
- label: e(I)
1699
+ label: e(U)
1693
1700
  }, {
1694
1701
  default: s(() => [
1695
- f(e(ra), {
1696
- href: i.value.url,
1702
+ p(e(ra), {
1703
+ href: r.value.url,
1697
1704
  external: ""
1698
1705
  }, {
1699
1706
  default: s(() => [
1700
- h(o(i.value.url), 1)
1707
+ h(o(r.value.url), 1)
1701
1708
  ]),
1702
1709
  _: 1
1703
1710
  }, 8, ["href"])
1704
1711
  ]),
1705
1712
  _: 1
1706
1713
  }, 8, ["label"])) : m("", !0),
1707
- i.value.canManage && !A.value ? (l(), y(e(Me), {
1714
+ r.value.canManage && !A.value ? (l(), y(e(Me), {
1708
1715
  key: 1,
1709
- onSubmit: C[3] || (C[3] = Oe((L) => z(() => t.portal.apply(u.value)), ["prevent"]))
1716
+ onSubmit: P[3] || (P[3] = Oe((R) => E(() => t.portal.apply(i.value)), ["prevent"]))
1710
1717
  }, {
1711
1718
  default: s(() => [
1712
- f(e(we), {
1719
+ p(e(we), {
1713
1720
  label: e(a).alias
1714
1721
  }, {
1715
1722
  default: s(() => [
1716
- f(e(Ae), {
1723
+ p(e(Ae), {
1717
1724
  id: "portal-alias",
1718
- modelValue: u.value,
1719
- "onUpdate:modelValue": C[0] || (C[0] = (L) => u.value = L),
1725
+ modelValue: i.value,
1726
+ "onUpdate:modelValue": P[0] || (P[0] = (R) => i.value = R),
1720
1727
  "aria-label": e(a).alias,
1721
1728
  maxlength: "64",
1722
1729
  autocomplete: "off",
1723
- disabled: r.value
1730
+ disabled: u.value
1724
1731
  }, null, 8, ["modelValue", "aria-label", "disabled"])
1725
1732
  ]),
1726
1733
  _: 1
1727
1734
  }, 8, ["label"]),
1728
- f(e(we), {
1735
+ p(e(we), {
1729
1736
  label: "",
1730
1737
  "field-width": "full"
1731
1738
  }, {
1732
1739
  default: s(() => [
1733
- f(e(la), null, {
1740
+ p(e(la), null, {
1734
1741
  default: s(() => [
1735
- f(e(N), {
1742
+ p(e(N), {
1736
1743
  type: "submit",
1737
1744
  variant: "primary",
1738
- disabled: r.value
1745
+ disabled: u.value
1739
1746
  }, {
1740
1747
  default: s(() => [
1741
1748
  h(o(e(a).apply), 1)
1742
1749
  ]),
1743
1750
  _: 1
1744
1751
  }, 8, ["disabled"]),
1745
- i.value.state === "active" ? (l(), y(e(N), {
1752
+ r.value.state === "active" ? (l(), y(e(N), {
1746
1753
  key: 0,
1747
1754
  variant: "secondary",
1748
- disabled: r.value,
1749
- onClick: C[1] || (C[1] = (L) => z(() => t.portal.disable()))
1755
+ disabled: u.value,
1756
+ onClick: P[1] || (P[1] = (R) => E(() => t.portal.disable()))
1750
1757
  }, {
1751
1758
  default: s(() => [
1752
1759
  h(o(e(a).disable), 1)
1753
1760
  ]),
1754
1761
  _: 1
1755
1762
  }, 8, ["disabled"])) : m("", !0),
1756
- f(e(N), {
1763
+ p(e(N), {
1757
1764
  variant: "secondary",
1758
- onClick: C[2] || (C[2] = (L) => t.portal.openControlPanel())
1765
+ onClick: P[2] || (P[2] = (R) => t.portal.openControlPanel())
1759
1766
  }, {
1760
1767
  default: s(() => [
1761
1768
  h(o(e(a).advanced), 1)
1762
1769
  ]),
1763
1770
  _: 1
1764
1771
  }),
1765
- i.value.entry ? (l(), y(e(N), {
1772
+ r.value.entry ? (l(), y(e(N), {
1766
1773
  key: 1,
1767
1774
  variant: "secondary",
1768
- disabled: r.value,
1769
- onClick: q
1775
+ disabled: u.value,
1776
+ onClick: F
1770
1777
  }, {
1771
1778
  default: s(() => [
1772
1779
  h(o(e(a).unregister), 1)
@@ -1782,24 +1789,24 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1782
1789
  ]),
1783
1790
  _: 1
1784
1791
  })) : m("", !0),
1785
- c.value ? (l(), y(e(W), {
1792
+ c.value ? (l(), y(e(J), {
1786
1793
  key: 2,
1787
1794
  tone: "danger"
1788
1795
  }, {
1789
1796
  default: s(() => [
1790
- S("span", Hl, o(c.value), 1)
1797
+ C("span", Hl, o(c.value), 1)
1791
1798
  ]),
1792
1799
  _: 1
1793
1800
  })) : m("", !0)
1794
- ], 64)) : (l(!0), k(Q, { key: 0 }, fe([[e(I), "20px"], [e(a).alias, "32px"], ["", "32px"]], ([L, O], ae) => (l(), y(e(we), {
1795
- key: ae,
1796
- label: L,
1801
+ ], 64)) : (l(!0), k(Q, { key: 0 }, fe([[e(U), "20px"], [e(a).alias, "32px"], ["", "32px"]], ([R, q], le) => (l(), y(e(we), {
1802
+ key: le,
1803
+ label: R,
1797
1804
  "data-placeholder-row": ""
1798
1805
  }, {
1799
1806
  default: s(() => [
1800
- f(e(Ne), {
1807
+ p(e(Ve), {
1801
1808
  width: "16rem",
1802
- height: O
1809
+ height: q
1803
1810
  }, null, 8, ["height"])
1804
1811
  ]),
1805
1812
  _: 2
@@ -1807,14 +1814,14 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1807
1814
  ]),
1808
1815
  _: 2
1809
1816
  }, [
1810
- i.value && A.value ? {
1817
+ r.value && A.value ? {
1811
1818
  name: "footer",
1812
1819
  fn: s(() => [
1813
- i.value.entry === "unregistered" ? (l(), y(e(N), {
1820
+ r.value.entry === "unregistered" ? (l(), y(e(N), {
1814
1821
  key: 0,
1815
1822
  variant: "primary",
1816
- disabled: r.value,
1817
- onClick: C[4] || (C[4] = (L) => z(ee))
1823
+ disabled: u.value,
1824
+ onClick: P[4] || (P[4] = (R) => E(te))
1818
1825
  }, {
1819
1826
  default: s(() => [
1820
1827
  h(o(e(a).register), 1)
@@ -1823,8 +1830,8 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1823
1830
  }, 8, ["disabled"])) : (l(), y(e(N), {
1824
1831
  key: 1,
1825
1832
  variant: "primary",
1826
- disabled: r.value,
1827
- onClick: q
1833
+ disabled: u.value,
1834
+ onClick: F
1828
1835
  }, {
1829
1836
  default: s(() => [
1830
1837
  h(o(e(a).unregister), 1)
@@ -1833,12 +1840,12 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1833
1840
  }, 8, ["disabled"]))
1834
1841
  ]),
1835
1842
  key: "0"
1836
- } : i.value && !i.value.canManage && i.value.controlPanel ? {
1843
+ } : r.value && !r.value.canManage && r.value.controlPanel ? {
1837
1844
  name: "footer",
1838
1845
  fn: s(() => [
1839
- f(e(N), {
1846
+ p(e(N), {
1840
1847
  variant: "secondary",
1841
- onClick: C[5] || (C[5] = (L) => t.portal.openControlPanel())
1848
+ onClick: P[5] || (P[5] = (R) => t.portal.openControlPanel())
1842
1849
  }, {
1843
1850
  default: s(() => [
1844
1851
  h(o(e(a).controlPanel), 1)
@@ -1849,26 +1856,26 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1849
1856
  key: "1"
1850
1857
  } : void 0
1851
1858
  ]), 1032, ["title", "description", "aria-busy"])) : m("", !0),
1852
- f(e(Ke), {
1859
+ p(e(Ke), {
1853
1860
  open: d.value,
1854
- "onUpdate:open": C[7] || (C[7] = (L) => d.value = L),
1861
+ "onUpdate:open": P[7] || (P[7] = (R) => d.value = R),
1855
1862
  title: e(a).unregister,
1856
1863
  description: e(a).removeFromPage,
1857
1864
  "close-label": e(a).cancel
1858
1865
  }, {
1859
1866
  footer: s(() => [
1860
- f(e(N), {
1867
+ p(e(N), {
1861
1868
  variant: "secondary",
1862
- onClick: C[6] || (C[6] = (L) => d.value = !1)
1869
+ onClick: P[6] || (P[6] = (R) => d.value = !1)
1863
1870
  }, {
1864
1871
  default: s(() => [
1865
1872
  h(o(e(a).cancel), 1)
1866
1873
  ]),
1867
1874
  _: 1
1868
1875
  }),
1869
- f(e(N), {
1876
+ p(e(N), {
1870
1877
  variant: "danger",
1871
- disabled: r.value,
1878
+ disabled: u.value,
1872
1879
  onClick: M
1873
1880
  }, {
1874
1881
  default: s(() => [
@@ -1888,47 +1895,47 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1888
1895
  locale: {}
1889
1896
  },
1890
1897
  setup(t) {
1891
- const v = t, n = v.shared.messages, a = g(), i = g(!1), u = g(""), r = g("");
1898
+ const v = t, n = v.shared.messages, a = b(), r = b(!1), i = b(""), u = b("");
1892
1899
  let c = !1;
1893
- const b = { ready: "success", pending: "warning", missing: "danger", ambiguous: "danger" }, d = (A) => ({ account: a.value?.account ?? "", folder: A.name, access: n[A.required] ?? A.required }), p = (A, j) => We(A, j, v.locale), P = w(() => a.value?.folders.filter((A) => A.state !== "ready") ?? []), E = ma(v.locale ?? "en"), x = w(() => v.shared.canGrant());
1900
+ const g = { ready: "success", pending: "warning", missing: "danger", ambiguous: "danger" }, d = (A) => ({ account: a.value?.account ?? "", folder: A.name, access: n[A.required] ?? A.required }), f = (A, Z) => We(A, Z, v.locale), S = _(() => a.value?.folders.filter((A) => A.state !== "ready") ?? []), z = ma(v.locale ?? "en"), w = _(() => v.shared.canGrant());
1894
1901
  function $(A) {
1895
- c || (a.value = A, i.value = !1);
1902
+ c || (a.value = A, r.value = !1);
1896
1903
  }
1897
1904
  async function T() {
1898
1905
  try {
1899
1906
  $(await v.shared.status());
1900
1907
  } catch {
1901
- !c && !a.value && (i.value = !0);
1908
+ !c && !a.value && (r.value = !0);
1902
1909
  }
1903
1910
  }
1904
- async function _(A) {
1905
- if (!u.value) {
1906
- u.value = A.key, r.value = "";
1911
+ async function x(A) {
1912
+ if (!i.value) {
1913
+ i.value = A.key, u.value = "";
1907
1914
  try {
1908
1915
  $(await v.shared.grant(A.key));
1909
- } catch (j) {
1910
- c || (r.value = n[j?.code || ""] || n.shared_folder_unavailable);
1916
+ } catch (Z) {
1917
+ c || (u.value = n[Z?.code || ""] || n.shared_folder_unavailable);
1911
1918
  } finally {
1912
- c || (u.value = "");
1919
+ c || (i.value = "");
1913
1920
  }
1914
1921
  }
1915
1922
  }
1916
- const z = v.shared.lastStatus?.();
1917
- return z && (a.value = z), xe(T), _e(() => {
1923
+ const E = v.shared.lastStatus?.();
1924
+ return E && (a.value = E), xe(T), _e(() => {
1918
1925
  c = !0;
1919
- }), (A, j) => !a.value && !i.value ? (l(), y(e(ke), {
1926
+ }), (A, Z) => !a.value && !r.value ? (l(), y(e(ke), {
1920
1927
  key: 0,
1921
1928
  title: e(n).title,
1922
1929
  collapsible: !1,
1923
1930
  "aria-busy": "true"
1924
1931
  }, {
1925
1932
  default: s(() => [
1926
- f(e(we), {
1933
+ p(e(we), {
1927
1934
  label: "",
1928
1935
  "data-placeholder-row": ""
1929
1936
  }, {
1930
1937
  default: s(() => [
1931
- f(e(Ne), {
1938
+ p(e(Ve), {
1932
1939
  width: "16rem",
1933
1940
  height: "20px"
1934
1941
  })
@@ -1941,32 +1948,32 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1941
1948
  key: 1,
1942
1949
  title: e(n).title,
1943
1950
  collapsible: !1,
1944
- "aria-busy": !!u.value
1951
+ "aria-busy": !!i.value
1945
1952
  }, ta({
1946
1953
  default: s(() => [
1947
- (l(!0), k(Q, null, fe(a.value.folders, (I) => (l(), y(e(we), {
1948
- key: I.key,
1949
- label: I.name,
1950
- "data-shared-folder": I.key
1954
+ (l(!0), k(Q, null, fe(a.value.folders, (U) => (l(), y(e(we), {
1955
+ key: U.key,
1956
+ label: U.name,
1957
+ "data-shared-folder": U.key
1951
1958
  }, {
1952
1959
  default: s(() => [
1953
- S("div", Xl, [
1954
- f(e(Je), {
1955
- tone: b[I.state],
1956
- "data-shared-folder-state": I.state
1960
+ C("div", Xl, [
1961
+ p(e(Je), {
1962
+ tone: g[U.state],
1963
+ "data-shared-folder-state": U.state
1957
1964
  }, {
1958
1965
  default: s(() => [
1959
- h(o(e(n)[I.state]), 1)
1966
+ h(o(e(n)[U.state]), 1)
1960
1967
  ]),
1961
1968
  _: 2
1962
1969
  }, 1032, ["tone", "data-shared-folder-state"]),
1963
- S("span", null, o(e(n).required) + o(e(E)) + o(e(n)[I.required]), 1),
1964
- S("span", null, o(e(n).granted) + o(e(E)) + o(e(n)[I.granted]), 1),
1965
- I.state === "pending" && x.value ? (l(), y(e(N), {
1970
+ C("span", null, o(e(n).required) + o(e(z)) + o(e(n)[U.required]), 1),
1971
+ C("span", null, o(e(n).granted) + o(e(z)) + o(e(n)[U.granted]), 1),
1972
+ U.state === "pending" && w.value ? (l(), y(e(N), {
1966
1973
  key: 0,
1967
1974
  variant: "primary",
1968
- disabled: !!u.value,
1969
- onClick: (ee) => _(I)
1975
+ disabled: !!i.value,
1976
+ onClick: (te) => x(U)
1970
1977
  }, {
1971
1978
  default: s(() => [
1972
1979
  h(o(e(n).grant), 1)
@@ -1977,31 +1984,31 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
1977
1984
  ]),
1978
1985
  _: 2
1979
1986
  }, 1032, ["label", "data-shared-folder"]))), 128)),
1980
- S("div", Gl, [
1981
- (l(!0), k(Q, null, fe(P.value, (I) => (l(), y(e(W), {
1982
- key: I.key,
1987
+ C("div", Gl, [
1988
+ (l(!0), k(Q, null, fe(S.value, (U) => (l(), y(e(J), {
1989
+ key: U.key,
1983
1990
  tone: "warning",
1984
1991
  "data-shared-folder-notice": ""
1985
1992
  }, {
1986
1993
  default: s(() => [
1987
- S("span", Wl, [
1988
- I.state === "pending" ? (l(), k(Q, { key: 0 }, [
1989
- h(o(e(n).pendingNote) + " " + o(x.value ? "" : p(e(n).askAdmin, d(I))) + " " + o(p(e(n).steps, d(I))), 1)
1990
- ], 64)) : I.state === "missing" ? (l(), k(Q, { key: 1 }, [
1991
- h(o(p(e(n).missingHint, d(I))), 1)
1994
+ C("span", Wl, [
1995
+ U.state === "pending" ? (l(), k(Q, { key: 0 }, [
1996
+ h(o(e(n).pendingNote) + " " + o(w.value ? "" : f(e(n).askAdmin, d(U))) + " " + o(f(e(n).steps, d(U))), 1)
1997
+ ], 64)) : U.state === "missing" ? (l(), k(Q, { key: 1 }, [
1998
+ h(o(f(e(n).missingHint, d(U))), 1)
1992
1999
  ], 64)) : (l(), k(Q, { key: 2 }, [
1993
- h(o(p(e(n).ambiguousHint, d(I))), 1)
2000
+ h(o(f(e(n).ambiguousHint, d(U))), 1)
1994
2001
  ], 64))
1995
2002
  ])
1996
2003
  ]),
1997
2004
  _: 2
1998
2005
  }, 1024))), 128)),
1999
- r.value ? (l(), y(e(W), {
2006
+ u.value ? (l(), y(e(J), {
2000
2007
  key: 0,
2001
2008
  tone: "danger"
2002
2009
  }, {
2003
2010
  default: s(() => [
2004
- S("span", Jl, o(r.value), 1)
2011
+ C("span", Jl, o(u.value), 1)
2005
2012
  ]),
2006
2013
  _: 1
2007
2014
  })) : m("", !0)
@@ -2009,12 +2016,12 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2009
2016
  ]),
2010
2017
  _: 2
2011
2018
  }, [
2012
- P.value.some((I) => I.state === "pending") ? {
2019
+ S.value.some((U) => U.state === "pending") ? {
2013
2020
  name: "footer",
2014
2021
  fn: s(() => [
2015
- f(e(N), {
2022
+ p(e(N), {
2016
2023
  variant: "secondary",
2017
- onClick: j[0] || (j[0] = (I) => t.shared.openControlPanel())
2024
+ onClick: Z[0] || (Z[0] = (U) => t.shared.openControlPanel())
2018
2025
  }, {
2019
2026
  default: s(() => [
2020
2027
  h(o(e(n).openControlPanel), 1)
@@ -2032,36 +2039,36 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2032
2039
  permission: {}
2033
2040
  },
2034
2041
  setup(t) {
2035
- const v = t, n = g(!1), a = ot([]);
2036
- let i;
2042
+ const v = t, n = b(!1), a = ot([]);
2043
+ let r;
2037
2044
  return xe(() => {
2038
- i = v.permission.subscribe((u) => {
2039
- a.value = u, n.value = u.length > 0;
2045
+ r = v.permission.subscribe((i) => {
2046
+ a.value = i, n.value = i.length > 0;
2040
2047
  }), v.permission.check().catch(() => {
2041
2048
  });
2042
2049
  }), _e(() => {
2043
- i?.();
2044
- }), (u, r) => n.value ? (l(), y(e(Ke), {
2050
+ r?.();
2051
+ }), (i, u) => n.value ? (l(), y(e(Ke), {
2045
2052
  key: 0,
2046
2053
  open: n.value,
2047
- "onUpdate:open": r[2] || (r[2] = (c) => n.value = c),
2054
+ "onUpdate:open": u[2] || (u[2] = (c) => n.value = c),
2048
2055
  title: t.permission.messages.pending,
2049
2056
  description: t.permission.messages.pendingNote,
2050
2057
  "close-label": t.permission.messages.dismiss
2051
2058
  }, {
2052
2059
  footer: s(() => [
2053
- f(e(N), {
2060
+ p(e(N), {
2054
2061
  variant: "secondary",
2055
- onClick: r[0] || (r[0] = (c) => t.permission.openControlPanel())
2062
+ onClick: u[0] || (u[0] = (c) => t.permission.openControlPanel())
2056
2063
  }, {
2057
2064
  default: s(() => [
2058
2065
  h(o(t.permission.messages.openControlPanel), 1)
2059
2066
  ]),
2060
2067
  _: 1
2061
2068
  }),
2062
- f(e(N), {
2069
+ p(e(N), {
2063
2070
  variant: "primary",
2064
- onClick: r[1] || (r[1] = (c) => n.value = !1)
2071
+ onClick: u[1] || (u[1] = (c) => n.value = !1)
2065
2072
  }, {
2066
2073
  default: s(() => [
2067
2074
  h(o(t.permission.messages.dismiss), 1)
@@ -2070,7 +2077,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2070
2077
  })
2071
2078
  ]),
2072
2079
  default: s(() => [
2073
- S("ul", Ql, [
2080
+ C("ul", Ql, [
2074
2081
  (l(!0), k(Q, null, fe(a.value, (c) => (l(), k("li", {
2075
2082
  key: JSON.stringify([c.account, c.share, c.required])
2076
2083
  }, o(t.permission.message(c)), 1))), 128))
@@ -2089,53 +2096,53 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2089
2096
  locale: {}
2090
2097
  },
2091
2098
  setup(t) {
2092
- const v = t, n = w(() => Wa(v.locale)), a = g(""), i = g(""), u = g(""), r = g(!1), c = g(!1), b = g(""), d = g(), p = w(() => window.location.protocol === "https:");
2093
- let P = !1;
2094
- function E(_) {
2095
- const z = _?.code;
2096
- return v.session.denied.value?.message || n.value.errors[z || ""] || n.value.errors.failed;
2097
- }
2098
- async function x() {
2099
- if (!(c.value || !p.value || !a.value || !i.value || r.value && !u.value)) {
2100
- c.value = !0, b.value = "";
2099
+ const v = t, n = _(() => Wa(v.locale)), a = b(""), r = b(""), i = b(""), u = b(!1), c = b(!1), g = b(""), d = b(), f = _(() => window.location.protocol === "https:");
2100
+ let S = !1;
2101
+ function z(x) {
2102
+ const E = x?.code;
2103
+ return v.session.denied.value?.message || n.value.errors[E || ""] || n.value.errors.failed;
2104
+ }
2105
+ async function w() {
2106
+ if (!(c.value || !f.value || !a.value || !r.value || u.value && !i.value)) {
2107
+ c.value = !0, g.value = "";
2101
2108
  try {
2102
- await v.session.login(a.value, i.value, u.value), i.value = "", u.value = "";
2103
- } catch (_) {
2104
- if (P) return;
2105
- u.value = "", _?.code === "otp_required" ? r.value = !0 : (b.value = E(_), i.value = "", r.value = !1);
2109
+ await v.session.login(a.value, r.value, i.value), r.value = "", i.value = "";
2110
+ } catch (x) {
2111
+ if (S) return;
2112
+ i.value = "", x?.code === "otp_required" ? u.value = !0 : (g.value = z(x), r.value = "", u.value = !1);
2106
2113
  } finally {
2107
- P || (c.value = !1, r.value && (await it(), P || d.value?.querySelector("input")?.focus()));
2114
+ S || (c.value = !1, u.value && (await it(), S || d.value?.querySelector("input")?.focus()));
2108
2115
  }
2109
2116
  }
2110
2117
  }
2111
2118
  async function $() {
2112
2119
  if (!c.value) {
2113
- c.value = !0, b.value = "";
2120
+ c.value = !0, g.value = "";
2114
2121
  try {
2115
2122
  await v.session.bootstrap();
2116
- } catch (_) {
2117
- P || (b.value = E(_));
2123
+ } catch (x) {
2124
+ S || (g.value = z(x));
2118
2125
  } finally {
2119
- P || (c.value = !1);
2126
+ S || (c.value = !1);
2120
2127
  }
2121
2128
  }
2122
2129
  }
2123
2130
  function T() {
2124
- i.value = "", u.value = "", r.value = !1, b.value = "";
2131
+ r.value = "", i.value = "", u.value = !1, g.value = "";
2125
2132
  }
2126
2133
  return Ia(() => {
2127
- P = !0, i.value = "", u.value = "";
2128
- }), (_, z) => (l(), k("main", {
2134
+ S = !0, r.value = "", i.value = "";
2135
+ }), (x, E) => (l(), k("main", {
2129
2136
  class: "identity-login",
2130
2137
  "aria-busy": c.value
2131
2138
  }, [
2132
- f(e(ke), {
2139
+ p(e(ke), {
2133
2140
  title: n.value.title,
2134
2141
  description: n.value.intro,
2135
2142
  collapsible: !1
2136
2143
  }, {
2137
2144
  default: s(() => [
2138
- p.value ? m("", !0) : (l(), y(e(W), {
2145
+ f.value ? m("", !0) : (l(), y(e(J), {
2139
2146
  key: 0,
2140
2147
  tone: "warning",
2141
2148
  title: n.value.httpsTitle
@@ -2145,56 +2152,56 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2145
2152
  ]),
2146
2153
  _: 1
2147
2154
  }, 8, ["title"])),
2148
- t.session.denied.value ? (l(), y(e(W), {
2155
+ t.session.denied.value ? (l(), y(e(J), {
2149
2156
  key: 1,
2150
2157
  tone: "danger"
2151
2158
  }, {
2152
2159
  default: s(() => [
2153
- S("span", en, o(t.session.denied.value.message), 1)
2160
+ C("span", en, o(t.session.denied.value.message), 1)
2154
2161
  ]),
2155
2162
  _: 1
2156
2163
  })) : t.session.notice.value ? (l(), k("p", an, o(n.value.notices[t.session.notice.value]), 1)) : m("", !0),
2157
- b.value && !t.session.denied.value ? (l(), y(e(W), {
2164
+ g.value && !t.session.denied.value ? (l(), y(e(J), {
2158
2165
  key: 3,
2159
2166
  tone: "danger",
2160
2167
  title: n.value.failedTitle
2161
2168
  }, {
2162
2169
  default: s(() => [
2163
- S("span", tn, o(b.value), 1)
2170
+ C("span", tn, o(g.value), 1)
2164
2171
  ]),
2165
2172
  _: 1
2166
2173
  }, 8, ["title"])) : m("", !0),
2167
2174
  t.session.denied.value ? m("", !0) : (l(), y(e(Me), {
2168
2175
  key: 4,
2169
- onSubmit: Oe(x, ["prevent"])
2176
+ onSubmit: Oe(w, ["prevent"])
2170
2177
  }, {
2171
2178
  default: s(() => [
2172
- f(e(Pe), {
2179
+ p(e(Pe), {
2173
2180
  label: n.value.account
2174
2181
  }, {
2175
2182
  default: s(() => [
2176
- f(e(Ae), {
2183
+ p(e(Ae), {
2177
2184
  modelValue: a.value,
2178
- "onUpdate:modelValue": z[0] || (z[0] = (A) => a.value = A),
2185
+ "onUpdate:modelValue": E[0] || (E[0] = (A) => a.value = A),
2179
2186
  autocomplete: "username",
2180
- disabled: c.value || r.value || !p.value
2187
+ disabled: c.value || u.value || !f.value
2181
2188
  }, null, 8, ["modelValue", "disabled"])
2182
2189
  ]),
2183
2190
  _: 1
2184
2191
  }, 8, ["label"]),
2185
- r.value ? (l(), k(Q, { key: 1 }, [
2186
- S("p", ln, o(n.value.otpPrompt), 1),
2187
- S("div", {
2192
+ u.value ? (l(), k(Q, { key: 1 }, [
2193
+ C("p", ln, o(n.value.otpPrompt), 1),
2194
+ C("div", {
2188
2195
  ref_key: "otpField",
2189
2196
  ref: d
2190
2197
  }, [
2191
- f(e(Pe), {
2198
+ p(e(Pe), {
2192
2199
  label: n.value.otp
2193
2200
  }, {
2194
2201
  default: s(() => [
2195
- f(e(Ae), {
2196
- modelValue: u.value,
2197
- "onUpdate:modelValue": z[2] || (z[2] = (A) => u.value = A),
2202
+ p(e(Ae), {
2203
+ modelValue: i.value,
2204
+ "onUpdate:modelValue": E[2] || (E[2] = (A) => i.value = A),
2198
2205
  inputmode: "numeric",
2199
2206
  autocomplete: "one-time-code",
2200
2207
  disabled: c.value
@@ -2208,29 +2215,29 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2208
2215
  label: n.value.password
2209
2216
  }, {
2210
2217
  default: s(() => [
2211
- f(e(Ae), {
2212
- modelValue: i.value,
2213
- "onUpdate:modelValue": z[1] || (z[1] = (A) => i.value = A),
2218
+ p(e(Ae), {
2219
+ modelValue: r.value,
2220
+ "onUpdate:modelValue": E[1] || (E[1] = (A) => r.value = A),
2214
2221
  type: "password",
2215
2222
  autocomplete: "current-password",
2216
- disabled: c.value || !p.value
2223
+ disabled: c.value || !f.value
2217
2224
  }, null, 8, ["modelValue", "disabled"])
2218
2225
  ]),
2219
2226
  _: 1
2220
2227
  }, 8, ["label"])),
2221
- f(e(la), null, {
2228
+ p(e(la), null, {
2222
2229
  default: s(() => [
2223
- f(e(N), {
2230
+ p(e(N), {
2224
2231
  type: "submit",
2225
2232
  variant: "primary",
2226
- disabled: c.value || !p.value || !a.value || !i.value || r.value && !u.value
2233
+ disabled: c.value || !f.value || !a.value || !r.value || u.value && !i.value
2227
2234
  }, {
2228
2235
  default: s(() => [
2229
- h(o(c.value ? n.value.signingIn : r.value ? n.value.verify : n.value.signIn), 1)
2236
+ h(o(c.value ? n.value.signingIn : u.value ? n.value.verify : n.value.signIn), 1)
2230
2237
  ]),
2231
2238
  _: 1
2232
2239
  }, 8, ["disabled"]),
2233
- r.value ? (l(), y(e(N), {
2240
+ u.value ? (l(), y(e(N), {
2234
2241
  key: 0,
2235
2242
  variant: "secondary",
2236
2243
  disabled: c.value,
@@ -2243,7 +2250,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2243
2250
  }, 8, ["disabled"])) : (l(), y(e(N), {
2244
2251
  key: 1,
2245
2252
  variant: "secondary",
2246
- disabled: c.value || !p.value,
2253
+ disabled: c.value || !f.value,
2247
2254
  onClick: $
2248
2255
  }, {
2249
2256
  default: s(() => [
@@ -2300,96 +2307,96 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2300
2307
  ctx: {}
2301
2308
  },
2302
2309
  setup(t, { expose: v }) {
2303
- const n = t, a = w(() => Ja(n.ctx.locale)), i = (R, X) => We(R, X, n.ctx.locale), u = g(), r = g([]), c = g(), b = g(!1), d = g(!1), p = g([]), P = g(), E = g(!1), x = g("3600"), $ = g(), T = g(), _ = g(), z = g(!1), A = g(), j = w(() => !u.value && !c.value && !b.value && !A.value), I = g(!1), ee = g(), H = g(""), q = g(""), M = Ya(n.ctx);
2304
- let D, C = !1;
2305
- const L = (R) => !["queued", "running"].includes(R.state), O = (R) => L(R) && R.state !== "paused", ae = (R) => R.state === "running" && R.pauseRequested, K = (R) => ae(R) ? a.value.pausing : a.value[`state_${R.state}`], le = (R) => ae(R) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[R.state];
2306
- async function se(R, X, U = !1) {
2310
+ const n = t, a = _(() => Ja(n.ctx.locale)), r = (I, X) => We(I, X, n.ctx.locale), i = b(), u = b([]), c = b(), g = b(!1), d = b(!1), f = b([]), S = b(), z = b(!1), w = b("3600"), $ = b(), T = b(), x = b(), E = b(!1), A = b(), Z = _(() => !i.value && !c.value && !g.value && !A.value), U = b(!1), te = b(), H = b(""), F = b(""), M = Ya(n.ctx);
2311
+ let V, P = !1;
2312
+ const R = (I) => !["queued", "running"].includes(I.state), q = (I) => R(I) && I.state !== "paused", le = (I) => I.state === "running" && I.pauseRequested, K = (I) => le(I) ? a.value.pausing : a.value[`state_${I.state}`], ee = (I) => le(I) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[I.state];
2313
+ async function se(I, X, D = !1) {
2307
2314
  try {
2308
- return await n.ctx.call(R, X);
2315
+ return await n.ctx.call(I, X);
2309
2316
  } catch (me) {
2310
- if (C || U && (A.value = Se(me))) return;
2311
- me?.code === "unsupported" ? (b.value = !0, r.value = [], p.value = [], P.value = void 0, $.value = void 0, T.value = void 0, u.value = void 0, _.value = void 0, ee.value = void 0, H.value && URL.revokeObjectURL(H.value), H.value = "") : C || (c.value = me);
2317
+ if (P || D && (A.value = Se(me))) return;
2318
+ me?.code === "unsupported" ? (g.value = !0, u.value = [], f.value = [], S.value = void 0, $.value = void 0, T.value = void 0, i.value = void 0, x.value = void 0, te.value = void 0, H.value && URL.revokeObjectURL(H.value), H.value = "") : P || (c.value = me);
2312
2319
  return;
2313
2320
  }
2314
2321
  }
2315
- async function ie() {
2316
- if (!(C || z.value)) {
2317
- z.value = !0;
2322
+ async function re() {
2323
+ if (!(P || E.value)) {
2324
+ E.value = !0;
2318
2325
  try {
2319
- const R = await se("bg.status", void 0, !0);
2320
- if (!R || C) return;
2321
- if (A.value = void 0, !R.limits || typeof R.admin != "boolean") {
2326
+ const I = await se("bg.status", void 0, !0);
2327
+ if (!I || P) return;
2328
+ if (A.value = void 0, !I.limits || typeof I.admin != "boolean") {
2322
2329
  c.value = { code: "unavailable" };
2323
2330
  return;
2324
2331
  }
2325
- b.value = !1, u.value = R;
2332
+ g.value = !1, i.value = I;
2326
2333
  const X = await se("bg.jobs.list", void 0, !0);
2327
- X && !C && (r.value = X.jobs ?? []);
2328
- const U = await se("bg.schedules.list", void 0, !0);
2329
- U && !C && (p.value = U.schedules ?? []), !C && r.value.every(L) && p.value.every((me) => !me.enabled) && D && (clearInterval(D), D = void 0);
2334
+ X && !P && (u.value = X.jobs ?? []);
2335
+ const D = await se("bg.schedules.list", void 0, !0);
2336
+ D && !P && (f.value = D.schedules ?? []), !P && u.value.every(R) && f.value.every((me) => !me.enabled) && V && (clearInterval(V), V = void 0);
2330
2337
  } finally {
2331
- z.value = !1;
2338
+ E.value = !1;
2332
2339
  }
2333
2340
  }
2334
2341
  }
2335
- function re() {
2336
- D || (D = setInterval(() => {
2337
- ie();
2342
+ function oe() {
2343
+ V || (V = setInterval(() => {
2344
+ re();
2338
2345
  }, 3e3));
2339
2346
  }
2340
- async function J(R) {
2347
+ async function G(I) {
2341
2348
  if (!d.value) {
2342
2349
  d.value = !0, c.value = void 0;
2343
2350
  try {
2344
- await R(), await ie(), (p.value.some((X) => X.enabled) || r.value.some((X) => !L(X))) && re();
2351
+ await I(), await re(), (f.value.some((X) => X.enabled) || u.value.some((X) => !R(X))) && oe();
2345
2352
  } finally {
2346
- C || (d.value = !1);
2353
+ P || (d.value = !1);
2347
2354
  }
2348
2355
  }
2349
2356
  }
2350
- const ne = () => J(async () => {
2351
- if (!_.value) return;
2352
- await se("bg.jobs.purge", { owner: _.value }) && (_.value = void 0);
2353
- }), G = w(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), ye = (R) => {
2354
- P.value = R, E.value = !1, x.value = "3600";
2355
- }, Ce = () => J(async () => {
2356
- if (!P.value || !E.value) return;
2357
- await se("bg.schedules.create", { key: ha(), jobId: P.value.id, intervalSeconds: Number(x.value), consent: !0 }) && (P.value = void 0);
2358
- }), $e = (R) => J(() => se("bg.schedules.disable", { id: R })), Y = () => J(async () => {
2357
+ const ne = () => G(async () => {
2358
+ if (!x.value) return;
2359
+ await se("bg.jobs.purge", { owner: x.value }) && (x.value = void 0);
2360
+ }), W = _(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), ye = (I) => {
2361
+ S.value = I, z.value = !1, w.value = "3600";
2362
+ }, Ce = () => G(async () => {
2363
+ if (!S.value || !z.value) return;
2364
+ await se("bg.schedules.create", { key: ha(), jobId: S.value.id, intervalSeconds: Number(w.value), consent: !0 }) && (S.value = void 0);
2365
+ }), $e = (I) => G(() => se("bg.schedules.disable", { id: I })), Y = () => G(async () => {
2359
2366
  if (!$.value) return;
2360
2367
  await se("bg.schedules.delete", { id: $.value.id }) && ($.value = void 0);
2361
- }), ue = () => J(async () => {
2368
+ }), ue = () => G(async () => {
2362
2369
  if (!T.value) return;
2363
2370
  await se("bg.schedules.enable", { id: T.value.id, consent: !0 }) && (T.value = void 0);
2364
- }), oe = (R) => {
2365
- const X = new Date(R);
2371
+ }), ie = (I) => {
2372
+ const X = new Date(I);
2366
2373
  return Number.isFinite(X.getTime()) ? X.toLocaleString() : a.value.unknownTime;
2367
- }, ge = (R) => R.copyRetained && R.state === "succeeded" && !R.scheduleId && R.submitter?.user === u.value?.owner?.user && R.submitter?.uid === u.value?.owner?.uid, Ee = (R) => J(() => se("bg.jobs.cancel", { id: R })), V = (R) => J(() => se("bg.jobs.pause", { id: R })), B = (R) => J(() => se("bg.jobs.resume", { id: R })), F = (R) => {
2368
- const X = R.lastIndexOf("/");
2369
- ee.value = { folder: R.slice(0, X), relative: R.slice(X + 1) };
2370
- }, Z = () => J(async () => {
2371
- if (!ee.value) return;
2372
- await se("bg.jobs.submit", { key: ha(), ...ee.value }) && (ee.value = void 0);
2374
+ }, ge = (I) => I.copyRetained && I.state === "succeeded" && !I.scheduleId && I.submitter?.user === i.value?.owner?.user && I.submitter?.uid === i.value?.owner?.uid, Ee = (I) => G(() => se("bg.jobs.cancel", { id: I })), L = (I) => G(() => se("bg.jobs.pause", { id: I })), B = (I) => G(() => se("bg.jobs.resume", { id: I })), O = (I) => {
2375
+ const X = I.lastIndexOf("/");
2376
+ te.value = { folder: I.slice(0, X), relative: I.slice(X + 1) };
2377
+ }, j = () => G(async () => {
2378
+ if (!te.value) return;
2379
+ await se("bg.jobs.submit", { key: ha(), ...te.value }) && (te.value = void 0);
2373
2380
  });
2374
- async function ve(R) {
2375
- const X = await se("bg.jobs.result", { id: R.id });
2376
- !X || C || (H.value && URL.revokeObjectURL(H.value), H.value = URL.createObjectURL(new Blob([JSON.stringify(X.result, null, 2)], { type: "application/json" })), q.value = `${R.name || R.id}.sha256.json`);
2381
+ async function ve(I) {
2382
+ const X = await se("bg.jobs.result", { id: I.id });
2383
+ !X || P || (H.value && URL.revokeObjectURL(H.value), H.value = URL.createObjectURL(new Blob([JSON.stringify(X.result, null, 2)], { type: "application/json" })), F.value = `${I.name || I.id}.sha256.json`);
2377
2384
  }
2378
- return He(() => A.value, ie), v({ refresh: ie }), xe(() => {
2379
- ie().then(() => {
2380
- (p.value.some((R) => R.enabled) || r.value.some((R) => !L(R))) && re();
2385
+ return He(() => A.value, re), v({ refresh: re }), xe(() => {
2386
+ re().then(() => {
2387
+ (f.value.some((I) => I.enabled) || u.value.some((I) => !R(I))) && oe();
2381
2388
  });
2382
2389
  }), _e(() => {
2383
- C = !0, M.dispose(), D && clearInterval(D), H.value && URL.revokeObjectURL(H.value);
2384
- }), (R, X) => (l(), y(e(ke), {
2385
- "aria-busy": d.value || z.value || j.value,
2390
+ P = !0, M.dispose(), V && clearInterval(V), H.value && URL.revokeObjectURL(H.value);
2391
+ }), (I, X) => (l(), y(e(ke), {
2392
+ "aria-busy": d.value || E.value || Z.value,
2386
2393
  title: a.value.title,
2387
- description: b.value ? void 0 : a.value.help,
2394
+ description: g.value ? void 0 : a.value.help,
2388
2395
  collapsible: !1,
2389
2396
  "data-background-panel": ""
2390
2397
  }, {
2391
2398
  default: s(() => [
2392
- b.value ? (l(), y(e(W), {
2399
+ g.value ? (l(), y(e(J), {
2393
2400
  key: 0,
2394
2401
  tone: "warning"
2395
2402
  }, {
@@ -2398,7 +2405,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2398
2405
  ]),
2399
2406
  _: 1
2400
2407
  })) : (l(), k(Q, { key: 1 }, [
2401
- A.value ? (l(), y(e(W), {
2408
+ A.value ? (l(), y(e(J), {
2402
2409
  key: 0,
2403
2410
  tone: "info",
2404
2411
  role: "status"
@@ -2408,7 +2415,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2408
2415
  ]),
2409
2416
  _: 1
2410
2417
  })) : m("", !0),
2411
- c.value ? (l(), y(e(W), {
2418
+ c.value ? (l(), y(e(J), {
2412
2419
  key: 1,
2413
2420
  tone: "danger",
2414
2421
  role: "alert"
@@ -2418,18 +2425,18 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2418
2425
  ]),
2419
2426
  _: 1
2420
2427
  })) : m("", !0),
2421
- j.value ? (l(), k(Q, { key: 2 }, [
2422
- (l(), k(Q, null, fe(["14rem", "24rem", "18rem", "24rem"], (U, me) => S("p", {
2428
+ Z.value ? (l(), k(Q, { key: 2 }, [
2429
+ (l(), k(Q, null, fe(["14rem", "24rem", "18rem", "24rem"], (D, me) => C("p", {
2423
2430
  key: me,
2424
2431
  "data-placeholder-row": ""
2425
2432
  }, [
2426
- f(e(Ne), {
2427
- width: U,
2433
+ p(e(Ve), {
2434
+ width: D,
2428
2435
  height: "20px"
2429
2436
  }, null, 8, ["width"])
2430
2437
  ])), 64)),
2431
- S("div", sn, [
2432
- f(e(N), {
2438
+ C("div", sn, [
2439
+ p(e(N), {
2433
2440
  variant: "secondary",
2434
2441
  disabled: ""
2435
2442
  }, {
@@ -2438,7 +2445,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2438
2445
  ]),
2439
2446
  _: 1
2440
2447
  }),
2441
- f(e(N), {
2448
+ p(e(N), {
2442
2449
  variant: "primary",
2443
2450
  disabled: ""
2444
2451
  }, {
@@ -2449,26 +2456,26 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2449
2456
  })
2450
2457
  ])
2451
2458
  ], 64)) : m("", !0),
2452
- u.value ? (l(), k(Q, { key: 3 }, [
2453
- S("p", on, o(u.value.worker?.alive ? i(a.value.workerRunning, { user: u.value.worker.username }) : a.value.workerStopped), 1),
2454
- S("p", un, o(i(a.value.limits, { size: u.value.limits.maxInputBytes / 1024, queue: u.value.limits.maxQueued, seconds: u.value.limits.jobTimeoutSeconds })), 1),
2455
- S("p", rn, o(u.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
2456
- S("p", dn, o(i(a.value.ownerLimits, { jobs: u.value.limits.maxOwnerPending, size: u.value.limits.maxOwnerBytes / 1024 })), 1),
2457
- S("div", cn, [
2458
- f(e(N), {
2459
+ i.value ? (l(), k(Q, { key: 3 }, [
2460
+ C("p", on, o(i.value.worker?.alive ? r(a.value.workerRunning, { user: i.value.worker.username }) : a.value.workerStopped), 1),
2461
+ C("p", un, o(r(a.value.limits, { size: i.value.limits.maxInputBytes / 1024, queue: i.value.limits.maxQueued, seconds: i.value.limits.jobTimeoutSeconds })), 1),
2462
+ C("p", rn, o(i.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
2463
+ C("p", dn, o(r(a.value.ownerLimits, { jobs: i.value.limits.maxOwnerPending, size: i.value.limits.maxOwnerBytes / 1024 })), 1),
2464
+ C("div", cn, [
2465
+ p(e(N), {
2459
2466
  variant: "secondary",
2460
2467
  disabled: d.value,
2461
- onClick: X[0] || (X[0] = (U) => I.value = !0)
2468
+ onClick: X[0] || (X[0] = (D) => U.value = !0)
2462
2469
  }, {
2463
2470
  default: s(() => [
2464
2471
  h(o(a.value.chooseFile), 1)
2465
2472
  ]),
2466
2473
  _: 1
2467
2474
  }, 8, ["disabled"]),
2468
- f(e(N), {
2475
+ p(e(N), {
2469
2476
  variant: "primary",
2470
- disabled: d.value || !ee.value,
2471
- onClick: Z
2477
+ disabled: d.value || !te.value,
2478
+ onClick: j
2472
2479
  }, {
2473
2480
  default: s(() => [
2474
2481
  h(o(a.value.submit), 1)
@@ -2476,31 +2483,31 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2476
2483
  _: 1
2477
2484
  }, 8, ["disabled"])
2478
2485
  ]),
2479
- ee.value ? (l(), k("p", vn, [
2480
- h(o(i(a.value.chosen, { path: "" }).trim()) + " ", 1),
2481
- f(e(Ve), {
2482
- path: `${ee.value.folder}/${ee.value.relative}`
2486
+ te.value ? (l(), k("p", vn, [
2487
+ h(o(r(a.value.chosen, { path: "" }).trim()) + " ", 1),
2488
+ p(e(Ne), {
2489
+ path: `${te.value.folder}/${te.value.relative}`
2483
2490
  }, null, 8, ["path"])
2484
2491
  ])) : m("", !0),
2485
- f(na, {
2486
- open: I.value,
2487
- "onUpdate:open": X[1] || (X[1] = (U) => I.value = U),
2492
+ p(na, {
2493
+ open: U.value,
2494
+ "onUpdate:open": X[1] || (X[1] = (D) => U.value = D),
2488
2495
  locale: t.ctx.locale,
2489
2496
  name: t.ctx.displayName,
2490
2497
  provider: e(M),
2491
2498
  mode: "file",
2492
2499
  title: a.value.pickerTitle,
2493
2500
  description: a.value.pickerConsent,
2494
- onSelected: F
2501
+ onSelected: O
2495
2502
  }, null, 8, ["open", "locale", "name", "provider", "title", "description"]),
2496
- _.value && u.value.admin ? (l(), y(e(W), {
2503
+ x.value && i.value.admin ? (l(), y(e(J), {
2497
2504
  key: 1,
2498
2505
  tone: "warning"
2499
2506
  }, {
2500
2507
  default: s(() => [
2501
- S("p", null, o(i(a.value.purgeConfirm, { user: _.value.user, uid: _.value.uid })), 1),
2502
- S("div", fn, [
2503
- f(e(N), {
2508
+ C("p", null, o(r(a.value.purgeConfirm, { user: x.value.user, uid: x.value.uid })), 1),
2509
+ C("div", fn, [
2510
+ p(e(N), {
2504
2511
  variant: "secondary",
2505
2512
  disabled: d.value,
2506
2513
  onClick: ne
@@ -2510,10 +2517,10 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2510
2517
  ]),
2511
2518
  _: 1
2512
2519
  }, 8, ["disabled"]),
2513
- f(e(N), {
2520
+ p(e(N), {
2514
2521
  variant: "secondary",
2515
2522
  disabled: d.value,
2516
- onClick: X[2] || (X[2] = (U) => _.value = void 0)
2523
+ onClick: X[2] || (X[2] = (D) => x.value = void 0)
2517
2524
  }, {
2518
2525
  default: s(() => [
2519
2526
  h(o(a.value.keepJobs), 1)
@@ -2524,98 +2531,98 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2524
2531
  ]),
2525
2532
  _: 1
2526
2533
  })) : m("", !0),
2527
- r.value.length ? (l(), k("div", mn, [
2528
- (l(!0), k(Q, null, fe(r.value, (U) => (l(), y(e(Ca), {
2529
- key: U.id,
2530
- title: U.name,
2534
+ u.value.length ? (l(), k("div", mn, [
2535
+ (l(!0), k(Q, null, fe(u.value, (D) => (l(), y(e(Ca), {
2536
+ key: D.id,
2537
+ title: D.name,
2531
2538
  "layout-type": "compact",
2532
- "data-job-state": U.state,
2533
- "data-job-id": U.id
2539
+ "data-job-state": D.state,
2540
+ "data-job-id": D.id
2534
2541
  }, {
2535
2542
  "header-actions": s(() => [
2536
- f(e(Je), {
2537
- tone: le(U),
2543
+ p(e(Je), {
2544
+ tone: ee(D),
2538
2545
  "data-bg-state": ""
2539
2546
  }, {
2540
2547
  default: s(() => [
2541
- h(o(K(U)), 1)
2548
+ h(o(K(D)), 1)
2542
2549
  ]),
2543
2550
  _: 2
2544
2551
  }, 1032, ["tone"])
2545
2552
  ]),
2546
2553
  default: s(() => [
2547
- S("div", yn, [
2548
- U.progress?.total ? (l(), k("span", bn, o(i(a.value.progressItems, { done: U.progress.done, count: U.progress.total })), 1)) : m("", !0),
2549
- U.progress?.totalBytes ? (l(), k("span", gn, o(i(a.value.progressBytes, { done: e(da)(U.progress.bytes, t.ctx.locale), total: e(da)(U.progress.totalBytes, t.ctx.locale) })), 1)) : m("", !0),
2550
- U.progress?.item ? (l(), k("span", hn, [
2551
- h(o(i(a.value.progressItem, { item: "" }).trim()) + " ", 1),
2552
- f(e(Ve), {
2553
- path: U.progress.item
2554
+ C("div", yn, [
2555
+ D.progress?.total ? (l(), k("span", bn, o(r(a.value.progressItems, { done: D.progress.done, count: D.progress.total })), 1)) : m("", !0),
2556
+ D.progress?.totalBytes ? (l(), k("span", gn, o(r(a.value.progressBytes, { done: e(da)(D.progress.bytes, t.ctx.locale), total: e(da)(D.progress.totalBytes, t.ctx.locale) })), 1)) : m("", !0),
2557
+ D.progress?.item ? (l(), k("span", hn, [
2558
+ h(o(r(a.value.progressItem, { item: "" }).trim()) + " ", 1),
2559
+ p(e(Ne), {
2560
+ path: D.progress.item
2554
2561
  }, null, 8, ["path"])
2555
2562
  ])) : m("", !0),
2556
- u.value.admin && U.submitter ? (l(), k("span", kn, o(i(a.value.owner, { user: U.submitter.user, uid: U.submitter.uid })), 1)) : m("", !0),
2557
- U.scheduleId ? (l(), k("span", _n, o(a.value.scheduledJob), 1)) : m("", !0),
2558
- S("div", wn, [
2559
- u.value.admin && U.submitter ? (l(), y(e(N), {
2563
+ i.value.admin && D.submitter ? (l(), k("span", kn, o(r(a.value.owner, { user: D.submitter.user, uid: D.submitter.uid })), 1)) : m("", !0),
2564
+ D.scheduleId ? (l(), k("span", _n, o(a.value.scheduledJob), 1)) : m("", !0),
2565
+ C("div", wn, [
2566
+ i.value.admin && D.submitter ? (l(), y(e(N), {
2560
2567
  key: 0,
2561
2568
  variant: "secondary",
2562
2569
  disabled: d.value,
2563
- onClick: (me) => _.value = U.submitter
2570
+ onClick: (me) => x.value = D.submitter
2564
2571
  }, {
2565
2572
  default: s(() => [
2566
2573
  h(o(a.value.purgeOwner), 1)
2567
2574
  ]),
2568
2575
  _: 1
2569
2576
  }, 8, ["disabled", "onClick"])) : m("", !0),
2570
- !L(U) && !U.pauseRequested && !U.delegation_id ? (l(), y(e(N), {
2577
+ !R(D) && !D.pauseRequested && !D.delegation_id ? (l(), y(e(N), {
2571
2578
  key: 1,
2572
2579
  variant: "secondary",
2573
2580
  disabled: d.value,
2574
- onClick: (me) => V(U.id)
2581
+ onClick: (me) => L(D.id)
2575
2582
  }, {
2576
2583
  default: s(() => [
2577
2584
  h(o(a.value.pause), 1)
2578
2585
  ]),
2579
2586
  _: 1
2580
2587
  }, 8, ["disabled", "onClick"])) : m("", !0),
2581
- U.state === "paused" || ae(U) ? (l(), y(e(N), {
2588
+ D.state === "paused" || le(D) ? (l(), y(e(N), {
2582
2589
  key: 2,
2583
2590
  variant: "secondary",
2584
2591
  disabled: d.value,
2585
- onClick: (me) => B(U.id)
2592
+ onClick: (me) => B(D.id)
2586
2593
  }, {
2587
2594
  default: s(() => [
2588
2595
  h(o(a.value.resume), 1)
2589
2596
  ]),
2590
2597
  _: 1
2591
2598
  }, 8, ["disabled", "onClick"])) : m("", !0),
2592
- O(U) ? m("", !0) : (l(), y(e(N), {
2599
+ q(D) ? m("", !0) : (l(), y(e(N), {
2593
2600
  key: 3,
2594
2601
  variant: "secondary",
2595
2602
  disabled: d.value,
2596
- onClick: (me) => Ee(U.id)
2603
+ onClick: (me) => Ee(D.id)
2597
2604
  }, {
2598
2605
  default: s(() => [
2599
2606
  h(o(a.value.cancel), 1)
2600
2607
  ]),
2601
2608
  _: 1
2602
2609
  }, 8, ["disabled", "onClick"])),
2603
- ge(U) ? (l(), y(e(N), {
2610
+ ge(D) ? (l(), y(e(N), {
2604
2611
  key: 4,
2605
2612
  variant: "secondary",
2606
2613
  disabled: d.value,
2607
- onClick: (me) => ye(U)
2614
+ onClick: (me) => ye(D)
2608
2615
  }, {
2609
2616
  default: s(() => [
2610
2617
  h(o(a.value.scheduleCopy), 1)
2611
2618
  ]),
2612
2619
  _: 1
2613
2620
  }, 8, ["disabled", "onClick"])) : m("", !0),
2614
- U.state === "succeeded" ? (l(), y(e(N), {
2621
+ D.state === "succeeded" ? (l(), y(e(N), {
2615
2622
  key: 5,
2616
2623
  variant: "secondary",
2617
2624
  disabled: d.value,
2618
- onClick: (me) => ve(U)
2625
+ onClick: (me) => ve(D)
2619
2626
  }, {
2620
2627
  default: s(() => [
2621
2628
  h(o(a.value.result), 1)
@@ -2628,7 +2635,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2628
2635
  _: 2
2629
2636
  }, 1032, ["title", "data-job-state", "data-job-id"]))), 128))
2630
2637
  ])) : (l(), k("p", pn, o(a.value.noJobs), 1)),
2631
- f(e(ke), {
2638
+ p(e(ke), {
2632
2639
  "data-bg-schedules": "",
2633
2640
  class: "bg-schedules",
2634
2641
  title: a.value.schedulesTitle,
@@ -2636,51 +2643,51 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2636
2643
  collapsible: !1
2637
2644
  }, {
2638
2645
  default: s(() => [
2639
- P.value ? (l(), y(e(Me), {
2646
+ S.value ? (l(), y(e(Me), {
2640
2647
  key: 0,
2641
2648
  class: "bg-schedule-form",
2642
2649
  onSubmit: Oe(Ce, ["prevent"])
2643
2650
  }, {
2644
2651
  default: s(() => [
2645
- S("p", null, o(i(a.value.scheduleSource, { name: P.value.name })), 1),
2646
- f(e(Pe), {
2652
+ C("p", null, o(r(a.value.scheduleSource, { name: S.value.name })), 1),
2653
+ p(e(Pe), {
2647
2654
  label: a.value.interval
2648
2655
  }, {
2649
2656
  default: s(() => [
2650
- f(e(ba), {
2651
- modelValue: x.value,
2652
- "onUpdate:modelValue": X[3] || (X[3] = (U) => x.value = U),
2657
+ p(e(ba), {
2658
+ modelValue: w.value,
2659
+ "onUpdate:modelValue": X[3] || (X[3] = (D) => w.value = D),
2653
2660
  "data-schedule-interval": "",
2654
- options: G.value,
2661
+ options: W.value,
2655
2662
  disabled: d.value
2656
2663
  }, null, 8, ["modelValue", "options", "disabled"])
2657
2664
  ]),
2658
2665
  _: 1
2659
2666
  }, 8, ["label"]),
2660
- f(e(ht), {
2661
- modelValue: E.value,
2662
- "onUpdate:modelValue": X[4] || (X[4] = (U) => E.value = U),
2667
+ p(e(ht), {
2668
+ modelValue: z.value,
2669
+ "onUpdate:modelValue": X[4] || (X[4] = (D) => z.value = D),
2663
2670
  "data-schedule-consent": "",
2664
2671
  disabled: d.value,
2665
2672
  label: a.value.scheduleConsent
2666
2673
  }, null, 8, ["modelValue", "disabled", "label"]),
2667
- f(e(la), null, {
2674
+ p(e(la), null, {
2668
2675
  default: s(() => [
2669
- f(e(N), {
2676
+ p(e(N), {
2670
2677
  type: "submit",
2671
2678
  variant: "primary",
2672
- disabled: d.value || !E.value
2679
+ disabled: d.value || !z.value
2673
2680
  }, {
2674
2681
  default: s(() => [
2675
2682
  h(o(a.value.createSchedule), 1)
2676
2683
  ]),
2677
2684
  _: 1
2678
2685
  }, 8, ["disabled"]),
2679
- f(e(N), {
2686
+ p(e(N), {
2680
2687
  type: "button",
2681
2688
  variant: "secondary",
2682
2689
  disabled: d.value,
2683
- onClick: X[5] || (X[5] = (U) => P.value = void 0)
2690
+ onClick: X[5] || (X[5] = (D) => S.value = void 0)
2684
2691
  }, {
2685
2692
  default: s(() => [
2686
2693
  h(o(a.value.cancel), 1)
@@ -2693,30 +2700,30 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2693
2700
  ]),
2694
2701
  _: 1
2695
2702
  })) : m("", !0),
2696
- p.value.length ? (l(), k("div", Cn, [
2697
- (l(!0), k(Q, null, fe(p.value, (U) => (l(), y(e(Ca), {
2698
- key: U.id,
2699
- title: U.name,
2703
+ f.value.length ? (l(), k("div", Cn, [
2704
+ (l(!0), k(Q, null, fe(f.value, (D) => (l(), y(e(Ca), {
2705
+ key: D.id,
2706
+ title: D.name,
2700
2707
  "layout-type": "compact",
2701
- "data-schedule-id": U.id
2708
+ "data-schedule-id": D.id
2702
2709
  }, {
2703
2710
  "header-actions": s(() => [
2704
- f(e(Je), {
2705
- tone: U.enabled ? "success" : "neutral",
2711
+ p(e(Je), {
2712
+ tone: D.enabled ? "success" : "neutral",
2706
2713
  "data-bg-state": ""
2707
2714
  }, {
2708
2715
  default: s(() => [
2709
- h(o(U.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
2716
+ h(o(D.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
2710
2717
  ]),
2711
2718
  _: 2
2712
2719
  }, 1032, ["tone"])
2713
2720
  ]),
2714
2721
  default: s(() => [
2715
- S("div", $n, [
2716
- u.value.admin ? (l(), k("span", Sn, o(i(a.value.owner, { user: U.owner.user, uid: U.owner.uid })), 1)) : m("", !0),
2717
- U.enabled ? (l(), k("span", Pn, o(i(a.value.nextRun, { time: oe(U.nextAt) })), 1)) : m("", !0),
2718
- S("span", En, o(i(a.value.missedRuns, { count: U.missed })), 1),
2719
- U.reason === "worker-changed" ? (l(), y(e(W), {
2722
+ C("div", $n, [
2723
+ i.value.admin ? (l(), k("span", Sn, o(r(a.value.owner, { user: D.owner.user, uid: D.owner.uid })), 1)) : m("", !0),
2724
+ D.enabled ? (l(), k("span", Pn, o(r(a.value.nextRun, { time: ie(D.nextAt) })), 1)) : m("", !0),
2725
+ C("span", En, o(r(a.value.missedRuns, { count: D.missed })), 1),
2726
+ D.reason === "worker-changed" ? (l(), y(e(J), {
2720
2727
  key: 2,
2721
2728
  tone: "warning"
2722
2729
  }, {
@@ -2724,7 +2731,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2724
2731
  h(o(a.value.revisionChanged), 1)
2725
2732
  ]),
2726
2733
  _: 1
2727
- })) : U.reason === "input-unavailable" ? (l(), y(e(W), {
2734
+ })) : D.reason === "input-unavailable" ? (l(), y(e(J), {
2728
2735
  key: 3,
2729
2736
  tone: "warning"
2730
2737
  }, {
@@ -2733,32 +2740,32 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2733
2740
  ]),
2734
2741
  _: 1
2735
2742
  })) : m("", !0),
2736
- S("div", Tn, [
2737
- U.enabled ? (l(), y(e(N), {
2743
+ C("div", Tn, [
2744
+ D.enabled ? (l(), y(e(N), {
2738
2745
  key: 0,
2739
2746
  variant: "secondary",
2740
2747
  disabled: d.value,
2741
- onClick: (me) => $e(U.id)
2748
+ onClick: (me) => $e(D.id)
2742
2749
  }, {
2743
2750
  default: s(() => [
2744
2751
  h(o(a.value.disableSchedule), 1)
2745
2752
  ]),
2746
2753
  _: 1
2747
- }, 8, ["disabled", "onClick"])) : u.value.admin ? (l(), y(e(N), {
2754
+ }, 8, ["disabled", "onClick"])) : i.value.admin ? (l(), y(e(N), {
2748
2755
  key: 1,
2749
2756
  variant: "secondary",
2750
2757
  disabled: d.value,
2751
- onClick: (me) => T.value = U
2758
+ onClick: (me) => T.value = D
2752
2759
  }, {
2753
2760
  default: s(() => [
2754
2761
  h(o(a.value.enableSchedule), 1)
2755
2762
  ]),
2756
2763
  _: 1
2757
2764
  }, 8, ["disabled", "onClick"])) : m("", !0),
2758
- f(e(N), {
2765
+ p(e(N), {
2759
2766
  variant: "secondary",
2760
2767
  disabled: d.value,
2761
- onClick: (me) => $.value = U
2768
+ onClick: (me) => $.value = D
2762
2769
  }, {
2763
2770
  default: s(() => [
2764
2771
  h(o(a.value.deleteSchedule), 1)
@@ -2771,14 +2778,14 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2771
2778
  _: 2
2772
2779
  }, 1032, ["title", "data-schedule-id"]))), 128))
2773
2780
  ])) : (l(), k("p", xn, o(a.value.noSchedules), 1)),
2774
- $.value ? (l(), y(e(W), {
2781
+ $.value ? (l(), y(e(J), {
2775
2782
  key: 3,
2776
2783
  tone: "warning"
2777
2784
  }, {
2778
2785
  default: s(() => [
2779
- S("p", null, o(i(a.value.deleteScheduleConsent, { name: $.value.name })), 1),
2780
- S("div", zn, [
2781
- f(e(N), {
2786
+ C("p", null, o(r(a.value.deleteScheduleConsent, { name: $.value.name })), 1),
2787
+ C("div", zn, [
2788
+ p(e(N), {
2782
2789
  variant: "danger",
2783
2790
  disabled: d.value,
2784
2791
  onClick: Y
@@ -2788,10 +2795,10 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2788
2795
  ]),
2789
2796
  _: 1
2790
2797
  }, 8, ["disabled"]),
2791
- f(e(N), {
2798
+ p(e(N), {
2792
2799
  variant: "secondary",
2793
2800
  disabled: d.value,
2794
- onClick: X[6] || (X[6] = (U) => $.value = void 0)
2801
+ onClick: X[6] || (X[6] = (D) => $.value = void 0)
2795
2802
  }, {
2796
2803
  default: s(() => [
2797
2804
  h(o(a.value.cancel), 1)
@@ -2802,14 +2809,14 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2802
2809
  ]),
2803
2810
  _: 1
2804
2811
  })) : m("", !0),
2805
- T.value ? (l(), y(e(W), {
2812
+ T.value ? (l(), y(e(J), {
2806
2813
  key: 4,
2807
2814
  tone: "warning"
2808
2815
  }, {
2809
2816
  default: s(() => [
2810
- S("p", null, o(i(a.value.enableScheduleConsent, { name: T.value.name })), 1),
2811
- S("div", An, [
2812
- f(e(N), {
2817
+ C("p", null, o(r(a.value.enableScheduleConsent, { name: T.value.name })), 1),
2818
+ C("div", An, [
2819
+ p(e(N), {
2813
2820
  variant: "primary",
2814
2821
  disabled: d.value,
2815
2822
  onClick: ue
@@ -2819,10 +2826,10 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2819
2826
  ]),
2820
2827
  _: 1
2821
2828
  }, 8, ["disabled"]),
2822
- f(e(N), {
2829
+ p(e(N), {
2823
2830
  variant: "secondary",
2824
2831
  disabled: d.value,
2825
- onClick: X[7] || (X[7] = (U) => T.value = void 0)
2832
+ onClick: X[7] || (X[7] = (D) => T.value = void 0)
2826
2833
  }, {
2827
2834
  default: s(() => [
2828
2835
  h(o(a.value.cancel), 1)
@@ -2839,7 +2846,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2839
2846
  H.value ? (l(), y(e(ra), {
2840
2847
  key: 4,
2841
2848
  href: H.value,
2842
- download: q.value
2849
+ download: F.value
2843
2850
  }, {
2844
2851
  default: s(() => [
2845
2852
  h(o(a.value.download), 1)
@@ -2858,7 +2865,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2858
2865
  }, Dn = {
2859
2866
  key: 0,
2860
2867
  class: "executor-brand"
2861
- }, Nn = ["src"], Vn = /* @__PURE__ */ ce({
2868
+ }, Vn = ["src"], Nn = /* @__PURE__ */ ce({
2862
2869
  __name: "ExecutorApproval",
2863
2870
  props: {
2864
2871
  admin: { type: Boolean },
@@ -2868,77 +2875,77 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2868
2875
  preload: { type: Boolean }
2869
2876
  },
2870
2877
  setup(t) {
2871
- const v = t, n = Te(Ye, void 0), a = w(() => Re(v.locale)), i = g("checking"), u = g(), r = w(() => {
2872
- const x = v.ctx;
2873
- return (x?.fullPage ?? (x?.host ? Ea({ host: x.host }) : !1)) && x?.displayName ? x : void 0;
2878
+ const v = t, n = Te(Ye, void 0), a = _(() => Re(v.locale)), r = b("checking"), i = b(), u = _(() => {
2879
+ const w = v.ctx;
2880
+ return (w?.fullPage ?? (w?.host ? Ea({ host: w.host }) : !1)) && w?.displayName ? w : void 0;
2874
2881
  });
2875
- function c(x) {
2876
- u.value = x, i.value = x.state;
2882
+ function c(w) {
2883
+ i.value = w, r.value = w.state;
2877
2884
  }
2878
- let b = !1, d;
2879
- async function p() {
2885
+ let g = !1, d;
2886
+ async function f() {
2880
2887
  try {
2881
- const x = await n.status();
2882
- b || c(x);
2888
+ const w = await n.status();
2889
+ g || c(w);
2883
2890
  } catch {
2884
- b || (u.value = void 0, i.value = "blocked");
2891
+ g || (i.value = void 0, r.value = "blocked");
2885
2892
  }
2886
2893
  }
2887
- const P = w(() => Se(u.value)), E = w(() => !!v.preload && !!n && (i.value === "ready" || i.value === "checking"));
2888
- return Fe(Va, w(() => E.value && i.value === "checking")), He(() => P.value, p), xe(() => {
2889
- n && (n.subscribe?.((x) => {
2890
- !b && !ea(x) && c(x);
2894
+ const S = _(() => Se(i.value)), z = _(() => !!v.preload && !!n && (r.value === "ready" || r.value === "checking"));
2895
+ return Fe(Na, _(() => z.value && r.value === "checking")), He(() => S.value, f), xe(() => {
2896
+ n && (n.subscribe?.((w) => {
2897
+ !g && !ea(w) && c(w);
2891
2898
  }), d = v.ctx?.reopen(() => {
2892
- p();
2893
- }), p());
2899
+ f();
2900
+ }), f());
2894
2901
  }), _e(() => {
2895
- b = !0, d?.();
2896
- }), (x, $) => (l(), k(Q, null, [
2897
- E.value ? (l(), k("div", {
2902
+ g = !0, d?.();
2903
+ }), (w, $) => (l(), k(Q, null, [
2904
+ z.value ? (l(), k("div", {
2898
2905
  key: 0,
2899
- class: De(["executor-pages", { "executor-preloading": i.value === "checking" }]),
2900
- inert: i.value === "checking" || void 0,
2901
- "aria-hidden": i.value === "checking" ? "true" : void 0
2906
+ class: De(["executor-pages", { "executor-preloading": r.value === "checking" }]),
2907
+ inert: r.value === "checking" || void 0,
2908
+ "aria-hidden": r.value === "checking" ? "true" : void 0
2902
2909
  }, [
2903
- he(x.$slots, "default", {}, void 0, !0)
2904
- ], 10, In)) : !e(n) || i.value === "ready" ? he(x.$slots, "default", {}, void 0, !0, 1) : m("", !0),
2905
- e(n) && i.value === "checking" ? (l(), y(e(Ua), {
2910
+ he(w.$slots, "default", {}, void 0, !0)
2911
+ ], 10, In)) : !e(n) || r.value === "ready" ? he(w.$slots, "default", {}, void 0, !0, 1) : m("", !0),
2912
+ e(n) && r.value === "checking" ? (l(), y(e(Ua), {
2906
2913
  key: 2,
2907
2914
  text: a.value.loading
2908
- }, null, 8, ["text"])) : e(n) && i.value !== "ready" ? (l(), k("div", Un, [
2909
- r.value ? (l(), k("header", Dn, [
2910
- r.value.appIcon ? (l(), k("img", {
2915
+ }, null, 8, ["text"])) : e(n) && r.value !== "ready" ? (l(), k("div", Un, [
2916
+ u.value ? (l(), k("header", Dn, [
2917
+ u.value.appIcon ? (l(), k("img", {
2911
2918
  key: 0,
2912
- src: r.value.appIcon,
2919
+ src: u.value.appIcon,
2913
2920
  alt: ""
2914
- }, null, 8, Nn)) : m("", !0),
2915
- S("span", null, o(r.value.displayName), 1)
2921
+ }, null, 8, Vn)) : m("", !0),
2922
+ C("span", null, o(u.value.displayName), 1)
2916
2923
  ])) : m("", !0),
2917
- P.value ? (l(), y(e(W), {
2924
+ S.value ? (l(), y(e(J), {
2918
2925
  key: 1,
2919
2926
  tone: "info",
2920
2927
  role: "status"
2921
2928
  }, {
2922
2929
  default: s(() => [
2923
- h(o(e(Le)(P.value, t.locale)), 1)
2930
+ h(o(e(Le)(S.value, t.locale)), 1)
2924
2931
  ]),
2925
2932
  _: 1
2926
2933
  })) : t.admin ? (l(), y(qa, {
2927
2934
  key: 2,
2928
2935
  admin: !0,
2929
2936
  locale: t.locale,
2930
- initial: u.value,
2937
+ initial: i.value,
2931
2938
  purpose: t.purpose,
2932
2939
  title: "",
2933
2940
  layout: "page",
2934
- onConfirmed: p
2935
- }, null, 8, ["locale", "initial", "purpose"])) : i.value === "needs-admin-approval" ? (l(), y(aa, {
2941
+ onConfirmed: f
2942
+ }, null, 8, ["locale", "initial", "purpose"])) : r.value === "needs-admin-approval" ? (l(), y(aa, {
2936
2943
  key: 3,
2937
2944
  admin: !1,
2938
2945
  locale: t.locale,
2939
2946
  purpose: t.purpose,
2940
2947
  layout: "page"
2941
- }, null, 8, ["locale", "purpose"])) : (l(), y(e(W), {
2948
+ }, null, 8, ["locale", "purpose"])) : (l(), y(e(J), {
2942
2949
  key: 4,
2943
2950
  tone: "info"
2944
2951
  }, {
@@ -2950,7 +2957,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2950
2957
  ])) : m("", !0)
2951
2958
  ], 64));
2952
2959
  }
2953
- }), Us = /* @__PURE__ */ pe(Vn, [["__scopeId", "data-v-da0bbc2c"]]), Ln = {
2960
+ }), Us = /* @__PURE__ */ pe(Nn, [["__scopeId", "data-v-da0bbc2c"]]), Ln = {
2954
2961
  key: 2,
2955
2962
  role: "status"
2956
2963
  }, Bn = {
@@ -2978,136 +2985,136 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
2978
2985
  ctx: {}
2979
2986
  },
2980
2987
  setup(t, { expose: v }) {
2981
- const n = t, a = w(() => Re(n.ctx.locale)), i = w(() => ma(n.ctx.locale)), u = za(n.ctx), r = g(), c = g([]), b = g([]), d = g(!1), p = g(), P = g(""), E = g(!1), x = g(""), $ = g(""), T = g("");
2982
- let _ = !1, z, A;
2983
- const j = g();
2984
- qe([$, x, T], () => {
2988
+ const n = t, a = _(() => Re(n.ctx.locale)), r = _(() => ma(n.ctx.locale)), i = za(n.ctx), u = b(), c = b([]), g = b([]), d = b(!1), f = b(), S = b(""), z = b(!1), w = b(""), $ = b(""), T = b("");
2989
+ let x = !1, E, A;
2990
+ const Z = b();
2991
+ qe([$, w, T], () => {
2985
2992
  A = void 0;
2986
2993
  }, { flush: "sync" });
2987
- const I = (J) => ["queued", "running", "waiting_executor"].includes(J.state), ee = { waiting_executor: "info", queued: "info", running: "info", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }, H = w(() => b.value.some((J) => J.state === "waiting_executor")), q = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], M = w(() => H.value && q.includes(p.value?.code ?? "")), D = w(() => !r.value && !p.value && !j.value), C = w(() => r.value && r.value.state !== "ready" && !(H.value && r.value.state === "needs-admin-approval" && q.includes(r.value.reason ?? "")));
2988
- async function L() {
2989
- if (_) return;
2990
- const [J, ne, G] = await Promise.allSettled([n.ctx.call("delegate.status"), n.ctx.call("delegate.list"), n.ctx.call("delegate.jobs.list")]);
2991
- if (_) return;
2992
- J.status === "fulfilled" && (r.value = J.value), ne.status === "fulfilled" && (c.value = (ne.value.delegations ?? []).filter((Ce) => !Ce.revoked)), G.status === "fulfilled" && (b.value = G.value.jobs ?? []);
2993
- const ye = [J, ne, G].find((Ce) => Ce.status === "rejected");
2994
- if (j.value = ye && Se(ye.reason), ye && !j.value) throw ye.reason;
2995
- }
2996
- async function O(J) {
2997
- if (!(d.value || _)) {
2998
- d.value = !0, p.value = void 0;
2994
+ const U = (G) => ["queued", "running", "waiting_executor"].includes(G.state), te = { waiting_executor: "info", queued: "info", running: "info", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }, H = _(() => g.value.some((G) => G.state === "waiting_executor")), F = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], M = _(() => H.value && F.includes(f.value?.code ?? "")), V = _(() => !u.value && !f.value && !Z.value), P = _(() => u.value && u.value.state !== "ready" && !(H.value && u.value.state === "needs-admin-approval" && F.includes(u.value.reason ?? "")));
2995
+ async function R() {
2996
+ if (x) return;
2997
+ const [G, ne, W] = await Promise.allSettled([n.ctx.call("delegate.status"), n.ctx.call("delegate.list"), n.ctx.call("delegate.jobs.list")]);
2998
+ if (x) return;
2999
+ G.status === "fulfilled" && (u.value = G.value), ne.status === "fulfilled" && (c.value = (ne.value.delegations ?? []).filter((Ce) => !Ce.revoked)), W.status === "fulfilled" && (g.value = W.value.jobs ?? []);
3000
+ const ye = [G, ne, W].find((Ce) => Ce.status === "rejected");
3001
+ if (Z.value = ye && Se(ye.reason), ye && !Z.value) throw ye.reason;
3002
+ }
3003
+ async function q(G) {
3004
+ if (!(d.value || x)) {
3005
+ d.value = !0, f.value = void 0;
2999
3006
  try {
3000
- await J();
3007
+ await G();
3001
3008
  } catch (ne) {
3002
- _ || (p.value = ne);
3009
+ x || (f.value = ne);
3003
3010
  } finally {
3004
- _ || (d.value = !1);
3011
+ x || (d.value = !1);
3005
3012
  }
3006
3013
  }
3007
3014
  }
3008
- const ae = () => O(L);
3009
- He(() => j.value, ae);
3010
- const K = (J) => O(async () => {
3011
- await n.ctx.call("delegate.revoke", { delegation_id: J }), await L();
3012
- }), le = (J) => O(async () => {
3013
- const ne = await n.ctx.call("delegate.jobs.cancel", { id: J });
3014
- _ || (P.value = ne.revocation_pending ? a.value.pending : ""), await L();
3015
- }), se = w(() => r.value?.state === "ready" && !!x.value && !!$.value && !!T.value), ie = () => O(async () => {
3016
- se.value && (await n.ctx.call("delegate.jobs.submit", { key: A ?? (A = crypto.randomUUID()), url: $.value, dest: x.value, name: T.value }), _ || ($.value = "", T.value = "", x.value = ""), await L());
3017
- }), re = (J) => {
3018
- const ne = new Date(J);
3015
+ const le = () => q(R);
3016
+ He(() => Z.value, le);
3017
+ const K = (G) => q(async () => {
3018
+ await n.ctx.call("delegate.revoke", { delegation_id: G }), await R();
3019
+ }), ee = (G) => q(async () => {
3020
+ const ne = await n.ctx.call("delegate.jobs.cancel", { id: G });
3021
+ x || (S.value = ne.revocation_pending ? a.value.pending : ""), await R();
3022
+ }), se = _(() => u.value?.state === "ready" && !!w.value && !!$.value && !!T.value), re = () => q(async () => {
3023
+ se.value && (await n.ctx.call("delegate.jobs.submit", { key: A ?? (A = crypto.randomUUID()), url: $.value, dest: w.value, name: T.value }), x || ($.value = "", T.value = "", w.value = ""), await R());
3024
+ }), oe = (G) => {
3025
+ const ne = new Date(G);
3019
3026
  return Number.isNaN(ne.getTime()) ? "—" : ne.toLocaleString(n.ctx.locale);
3020
3027
  };
3021
- return v({ refresh: ae }), xe(() => {
3022
- ae(), z = setInterval(() => {
3023
- b.value.some(I) && ae();
3028
+ return v({ refresh: le }), xe(() => {
3029
+ le(), E = setInterval(() => {
3030
+ g.value.some(U) && le();
3024
3031
  }, 3e3);
3025
3032
  }), _e(() => {
3026
- _ = !0, z && clearInterval(z), u.dispose();
3027
- }), (J, ne) => (l(), y(e(ke), {
3033
+ x = !0, E && clearInterval(E), i.dispose();
3034
+ }), (G, ne) => (l(), y(e(ke), {
3028
3035
  title: a.value.title,
3029
3036
  description: a.value.help,
3030
3037
  collapsible: !1,
3031
- "aria-busy": d.value || D.value,
3038
+ "aria-busy": d.value || V.value,
3032
3039
  class: "delegate-panel"
3033
3040
  }, {
3034
3041
  default: s(() => [
3035
- p.value && !M.value ? (l(), y(e(W), {
3042
+ f.value && !M.value ? (l(), y(e(J), {
3036
3043
  key: 0,
3037
3044
  tone: "danger",
3038
3045
  role: "alert"
3039
3046
  }, {
3040
3047
  default: s(() => [
3041
- h(o(e(Za)(p.value, t.ctx.locale) ?? e(ja)(p.value, a.value, t.ctx.locale, t.ctx.displayName)), 1)
3048
+ h(o(e(Za)(f.value, t.ctx.locale) ?? e(ja)(f.value, a.value, t.ctx.locale, t.ctx.displayName)), 1)
3042
3049
  ]),
3043
3050
  _: 1
3044
3051
  })) : m("", !0),
3045
- j.value ? (l(), y(e(W), {
3052
+ Z.value ? (l(), y(e(J), {
3046
3053
  key: 1,
3047
3054
  tone: "info",
3048
3055
  role: "status"
3049
3056
  }, {
3050
3057
  default: s(() => [
3051
- h(o(e(Le)(j.value, t.ctx.locale)), 1)
3058
+ h(o(e(Le)(Z.value, t.ctx.locale)), 1)
3052
3059
  ]),
3053
3060
  _: 1
3054
3061
  })) : m("", !0),
3055
- P.value ? (l(), k("p", Ln, o(P.value), 1)) : m("", !0),
3056
- C.value ? (l(), k("p", Bn, o(r.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : m("", !0),
3057
- f(e(Me), {
3062
+ S.value ? (l(), k("p", Ln, o(S.value), 1)) : m("", !0),
3063
+ P.value ? (l(), k("p", Bn, o(u.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : m("", !0),
3064
+ p(e(Me), {
3058
3065
  direction: "vertical",
3059
- onSubmit: Oe(ie, ["prevent"])
3066
+ onSubmit: Oe(re, ["prevent"])
3060
3067
  }, {
3061
3068
  default: s(() => [
3062
- f(e(Pe), {
3069
+ p(e(Pe), {
3063
3070
  label: a.value.url,
3064
3071
  "label-for": "delegate-url"
3065
3072
  }, {
3066
3073
  default: s(() => [
3067
- f(e(Ae), {
3074
+ p(e(Ae), {
3068
3075
  id: "delegate-url",
3069
3076
  modelValue: $.value,
3070
- "onUpdate:modelValue": ne[0] || (ne[0] = (G) => $.value = G),
3077
+ "onUpdate:modelValue": ne[0] || (ne[0] = (W) => $.value = W),
3071
3078
  type: "url",
3072
- disabled: d.value || r.value?.state !== "ready"
3079
+ disabled: d.value || u.value?.state !== "ready"
3073
3080
  }, null, 8, ["modelValue", "disabled"])
3074
3081
  ]),
3075
3082
  _: 1
3076
3083
  }, 8, ["label"]),
3077
- f(e(Pe), {
3084
+ p(e(Pe), {
3078
3085
  label: a.value.name,
3079
3086
  "label-for": "delegate-name"
3080
3087
  }, {
3081
3088
  default: s(() => [
3082
- f(e(Ae), {
3089
+ p(e(Ae), {
3083
3090
  id: "delegate-name",
3084
3091
  modelValue: T.value,
3085
- "onUpdate:modelValue": ne[1] || (ne[1] = (G) => T.value = G),
3092
+ "onUpdate:modelValue": ne[1] || (ne[1] = (W) => T.value = W),
3086
3093
  "data-file-name": "",
3087
- disabled: d.value || r.value?.state !== "ready"
3094
+ disabled: d.value || u.value?.state !== "ready"
3088
3095
  }, null, 8, ["modelValue", "disabled"])
3089
3096
  ]),
3090
3097
  _: 1
3091
3098
  }, 8, ["label"]),
3092
- S("p", null, o(a.value.size), 1),
3093
- x.value ? (l(), k("p", Fn, [
3094
- h(o(a.value.destination) + o(i.value), 1),
3095
- f(e(Ve), { path: x.value }, null, 8, ["path"])
3099
+ C("p", null, o(a.value.size), 1),
3100
+ w.value ? (l(), k("p", Fn, [
3101
+ h(o(a.value.destination) + o(r.value), 1),
3102
+ p(e(Ne), { path: w.value }, null, 8, ["path"])
3096
3103
  ])) : m("", !0),
3097
- f(e(la), null, {
3104
+ p(e(la), null, {
3098
3105
  default: s(() => [
3099
- f(e(N), {
3106
+ p(e(N), {
3100
3107
  type: "button",
3101
3108
  variant: "secondary",
3102
- disabled: d.value || r.value?.state !== "ready",
3103
- onClick: ne[2] || (ne[2] = (G) => E.value = !0)
3109
+ disabled: d.value || u.value?.state !== "ready",
3110
+ onClick: ne[2] || (ne[2] = (W) => z.value = !0)
3104
3111
  }, {
3105
3112
  default: s(() => [
3106
3113
  h(o(a.value.choose), 1)
3107
3114
  ]),
3108
3115
  _: 1
3109
3116
  }, 8, ["disabled"]),
3110
- f(e(N), {
3117
+ p(e(N), {
3111
3118
  type: "submit",
3112
3119
  variant: "primary",
3113
3120
  disabled: d.value || !se.value
@@ -3123,53 +3130,53 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3123
3130
  ]),
3124
3131
  _: 1
3125
3132
  }),
3126
- f(na, {
3127
- open: E.value,
3128
- "onUpdate:open": ne[3] || (ne[3] = (G) => E.value = G),
3133
+ p(na, {
3134
+ open: z.value,
3135
+ "onUpdate:open": ne[3] || (ne[3] = (W) => z.value = W),
3129
3136
  locale: t.ctx.locale,
3130
3137
  name: t.ctx.displayName,
3131
- provider: e(u),
3138
+ provider: e(i),
3132
3139
  mode: "folder",
3133
- onSelected: ne[4] || (ne[4] = (G) => x.value = G)
3140
+ onSelected: ne[4] || (ne[4] = (W) => w.value = W)
3134
3141
  }, null, 8, ["open", "locale", "name", "provider"]),
3135
- f(e(ke), {
3142
+ p(e(ke), {
3136
3143
  title: a.value.downloads,
3137
3144
  collapsible: !1,
3138
3145
  class: "delegate-group"
3139
3146
  }, {
3140
3147
  default: s(() => [
3141
- D.value ? (l(), k("p", qn, [
3142
- f(e(Ne), {
3148
+ V.value ? (l(), k("p", qn, [
3149
+ p(e(Ve), {
3143
3150
  width: "12rem",
3144
3151
  height: "20px"
3145
3152
  })
3146
- ])) : !b.value.length && !p.value ? (l(), k("p", On, o(a.value.noJobs), 1)) : (l(), k("div", Mn, [
3147
- (l(!0), k(Q, null, fe(b.value, (G) => (l(), y(e($a), {
3148
- key: G.id,
3149
- title: G.name,
3150
- "data-job-state": G.state
3153
+ ])) : !g.value.length && !f.value ? (l(), k("p", On, o(a.value.noJobs), 1)) : (l(), k("div", Mn, [
3154
+ (l(!0), k(Q, null, fe(g.value, (W) => (l(), y(e($a), {
3155
+ key: W.id,
3156
+ title: W.name,
3157
+ "data-job-state": W.state
3151
3158
  }, ta({
3152
3159
  meta: s(() => [
3153
- f(e(Je), {
3154
- tone: ee[G.state],
3155
- role: G.state === "waiting_executor" ? "status" : void 0,
3160
+ p(e(Je), {
3161
+ tone: te[W.state],
3162
+ role: W.state === "waiting_executor" ? "status" : void 0,
3156
3163
  "data-job-badge": ""
3157
3164
  }, {
3158
3165
  default: s(() => [
3159
- h(o(a.value[G.state]), 1)
3166
+ h(o(a.value[W.state]), 1)
3160
3167
  ]),
3161
3168
  _: 2
3162
3169
  }, 1032, ["tone", "role"])
3163
3170
  ]),
3164
3171
  _: 2
3165
3172
  }, [
3166
- I(G) ? {
3173
+ U(W) ? {
3167
3174
  name: "actions",
3168
3175
  fn: s(() => [
3169
- f(e(N), {
3176
+ p(e(N), {
3170
3177
  variant: "secondary",
3171
3178
  disabled: d.value,
3172
- onClick: (ye) => le(G.id)
3179
+ onClick: (ye) => ee(W.id)
3173
3180
  }, {
3174
3181
  default: s(() => [
3175
3182
  h(o(a.value.cancel), 1)
@@ -3184,34 +3191,34 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3184
3191
  ]),
3185
3192
  _: 1
3186
3193
  }, 8, ["title"]),
3187
- f(e(ke), {
3194
+ p(e(ke), {
3188
3195
  title: a.value.delegations,
3189
3196
  collapsible: !1,
3190
3197
  class: "delegate-group"
3191
3198
  }, {
3192
3199
  default: s(() => [
3193
- D.value ? (l(), k("p", Kn, [
3194
- f(e(Ne), {
3200
+ V.value ? (l(), k("p", Kn, [
3201
+ p(e(Ve), {
3195
3202
  width: "12rem",
3196
3203
  height: "20px"
3197
3204
  })
3198
- ])) : !c.value.length && !p.value ? (l(), k("p", Hn, o(a.value.noDelegations), 1)) : (l(), k("div", Xn, [
3199
- (l(!0), k(Q, null, fe(c.value, (G) => (l(), y(e($a), {
3200
- key: G.delegation_id
3205
+ ])) : !c.value.length && !f.value ? (l(), k("p", Hn, o(a.value.noDelegations), 1)) : (l(), k("div", Xn, [
3206
+ (l(!0), k(Q, null, fe(c.value, (W) => (l(), y(e($a), {
3207
+ key: W.delegation_id
3201
3208
  }, {
3202
3209
  title: s(() => [
3203
- f(e(Ve), {
3204
- path: G.path
3210
+ p(e(Ne), {
3211
+ path: W.path
3205
3212
  }, null, 8, ["path"])
3206
3213
  ]),
3207
3214
  description: s(() => [
3208
- h(o(a.value.expires) + o(i.value) + o(re(G.expires_at)), 1)
3215
+ h(o(a.value.expires) + o(r.value) + o(oe(W.expires_at)), 1)
3209
3216
  ]),
3210
3217
  actions: s(() => [
3211
- f(e(N), {
3218
+ p(e(N), {
3212
3219
  variant: "secondary",
3213
3220
  disabled: d.value,
3214
- onClick: (ye) => K(G.delegation_id)
3221
+ onClick: (ye) => K(W.delegation_id)
3215
3222
  }, {
3216
3223
  default: s(() => [
3217
3224
  h(o(a.value.revoke), 1)
@@ -3254,118 +3261,118 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3254
3261
  },
3255
3262
  emits: ["authorized", "confirmed", "destinations"],
3256
3263
  setup(t, { expose: v, emit: n }) {
3257
- const a = t, i = n, u = w(() => pa(a.locale)), r = w(() => Re(a.locale)), c = Te(Ye, void 0), b = w(() => a.ctx ?? (c?.call ? { call: c.call.bind(c) } : void 0)), d = Fa({ get admin() {
3264
+ const a = t, r = n, i = _(() => pa(a.locale)), u = _(() => Re(a.locale)), c = Te(Ye, void 0), g = _(() => a.ctx ?? (c?.call ? { call: c.call.bind(c) } : void 0)), d = Fa({ get admin() {
3258
3265
  return a.admin;
3259
3266
  }, get locale() {
3260
3267
  return a.locale;
3261
3268
  }, get ctx() {
3262
- return b.value;
3263
- } }, Y), { password: p, busy: P, confirming: E, failure: x, passwordError: $, scope: T, chosen: _, options: z, dynamic: A, canConfirm: j } = d, I = g(), ee = g([]), H = g(!1), q = g(!1), M = g(), D = g(!1), C = g(!1), L = g(!1), O = g(""), ae = g(), K = w(() => ae.value ?? (H.value ? Se(d.status.value) : void 0));
3264
- let le = !1;
3269
+ return g.value;
3270
+ } }, Y), { password: f, busy: S, confirming: z, failure: w, passwordError: $, scope: T, chosen: x, options: E, dynamic: A, canConfirm: Z } = d, U = b(), te = b([]), H = b(!1), F = b(!1), M = b(), V = b(!1), P = b(!1), R = b(!1), q = b(""), le = b(), K = _(() => le.value ?? (H.value ? Se(d.status.value) : void 0));
3271
+ let ee = !1;
3265
3272
  async function se() {
3266
3273
  let de;
3267
3274
  try {
3268
3275
  de = await a.sdk.status();
3269
- } catch (te) {
3270
- const Ie = Se(te);
3271
- if (!Ie && te?.code !== "EXECUTOR_UNAVAILABLE") throw te;
3272
- le || (ae.value = Ie, H.value = !Ie, I.value = void 0, ee.value = []);
3276
+ } catch (ae) {
3277
+ const Ie = Se(ae);
3278
+ if (!Ie && ae?.code !== "EXECUTOR_UNAVAILABLE") throw ae;
3279
+ ee || (le.value = Ie, H.value = !Ie, U.value = void 0, te.value = []);
3273
3280
  return;
3274
3281
  }
3275
- const be = await Promise.all((a.picker?.keys ?? []).map((te) => a.sdk.destination(te)));
3276
- le || (ae.value = void 0, H.value = !1, I.value = de, ee.value = be, i("destinations", be));
3282
+ const be = await Promise.all((a.picker?.keys ?? []).map((ae) => a.sdk.destination(ae)));
3283
+ ee || (le.value = void 0, H.value = !1, U.value = de, te.value = be, r("destinations", be));
3277
3284
  }
3278
- async function ie(de) {
3279
- if (!(le || q.value)) {
3280
- q.value = !0, M.value = void 0, D.value = !1;
3285
+ async function re(de) {
3286
+ if (!(ee || F.value)) {
3287
+ F.value = !0, M.value = void 0, V.value = !1;
3281
3288
  try {
3282
3289
  await de();
3283
3290
  } catch (be) {
3284
- le || (M.value = be);
3291
+ ee || (M.value = be);
3285
3292
  } finally {
3286
- le || (q.value = !1);
3293
+ ee || (F.value = !1);
3287
3294
  }
3288
3295
  }
3289
3296
  }
3290
- const re = () => ie(se), J = () => Promise.all([re(), a.admin ? d.refresh() : void 0]).then(() => {
3297
+ const oe = () => re(se), G = () => Promise.all([oe(), a.admin ? d.refresh() : void 0]).then(() => {
3291
3298
  });
3292
3299
  function ne(de) {
3293
- i("authorized", de), re();
3300
+ r("authorized", de), oe();
3294
3301
  }
3295
- function G(de) {
3296
- le || (M.value = de, D.value = !0);
3302
+ function W(de) {
3303
+ ee || (M.value = de, V.value = !0);
3297
3304
  }
3298
- const ye = w(() => D.value ? a.pickerErrorText?.(M.value) ?? Qe(M.value, u.value, "select", a.locale, a.ctx?.displayName) : Qe(M.value, u.value, "save", a.locale, a.ctx?.displayName)), Ce = (de) => ie(async () => {
3305
+ const ye = _(() => V.value ? a.pickerErrorText?.(M.value) ?? Qe(M.value, i.value, "select", a.locale, a.ctx?.displayName) : Qe(M.value, i.value, "save", a.locale, a.ctx?.displayName)), Ce = (de) => re(async () => {
3299
3306
  if ((await a.sdk.revoke({ delegation_id: de }))?.revoked !== !0) throw { code: "commit-uncertain" };
3300
3307
  await se();
3301
- }), $e = () => ie(async () => {
3308
+ }), $e = () => re(async () => {
3302
3309
  if (a.admin) {
3303
3310
  if ((await a.sdk.enable())?.disabled !== !1) throw { code: "commit-uncertain" };
3304
3311
  await se();
3305
3312
  }
3306
3313
  });
3307
3314
  async function Y() {
3308
- await ie(async () => {
3309
- if (le) return;
3315
+ await re(async () => {
3316
+ if (ee) return;
3310
3317
  const de = await a.sdk.status(), be = T.value?.selection;
3311
- if (!le) {
3318
+ if (!ee) {
3312
3319
  if (A.value) {
3313
- const te = de.selection;
3314
- if (!be || !te || te.scope !== _.value || te.scope !== be.scope || te.generation !== be.generation || te.root !== be.root) throw { code: "commit-uncertain" };
3315
- const Ie = O.value ? [O.value] : a.picker?.keys ?? [];
3320
+ const ae = de.selection;
3321
+ if (!be || !ae || ae.scope !== x.value || ae.scope !== be.scope || ae.generation !== be.generation || ae.root !== be.root) throw { code: "commit-uncertain" };
3322
+ const Ie = q.value ? [q.value] : a.picker?.keys ?? [];
3316
3323
  for (const ga of Ie) {
3317
- if (le) return;
3324
+ if (ee) return;
3318
3325
  let Ue;
3319
3326
  try {
3320
- Ue = await a.sdk.selectDestination({ key: ga, path: te.root });
3327
+ Ue = await a.sdk.selectDestination({ key: ga, path: ae.root });
3321
3328
  } catch (Ga) {
3322
- throw D.value = !0, Ga;
3329
+ throw V.value = !0, Ga;
3323
3330
  }
3324
- if (!Ue?.id || !Ue.username || Ue.path !== te.root || Ue.key !== ga || Ue.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
3325
- if (le) return;
3326
- i("authorized", Ue);
3331
+ if (!Ue?.id || !Ue.username || Ue.path !== ae.root || Ue.key !== ga || Ue.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
3332
+ if (ee) return;
3333
+ r("authorized", Ue);
3327
3334
  }
3328
3335
  }
3329
- le || (C.value = !1, i("confirmed"), await se());
3336
+ ee || (P.value = !1, r("confirmed"), await se());
3330
3337
  }
3331
3338
  });
3332
3339
  }
3333
3340
  function ue(de) {
3334
- O.value = de, a.admin && A.value ? C.value = !0 : L.value = !0;
3341
+ q.value = de, a.admin && A.value ? P.value = !0 : R.value = !0;
3335
3342
  }
3336
- const oe = w(() => I.value?.selection), ge = w(() => !I.value && !H.value && !M.value && !K.value), Ee = w(() => H.value && (!a.admin || d.status.value?.state !== "blocked") || I.value?.scopeMode === "install-selected" && !oe.value), V = w(() => a.admin && H.value && d.status.value?.state === "blocked" && !d.status.value.retry), B = w(() => !!I.value && !Ee.value && !I.value.disabled), F = w(() => a.admin && (Ee.value || H.value && !!d.status.value?.retry)), Z = w(() => a.picker ? oe.value ? et(a.picker.provider, oe.value.root) : I.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider : void 0), ve = (de) => a.picker?.labels?.[de] ?? u.value.folder, R = w(() => {
3337
- const de = x.value;
3338
- return !de || "confirm" in de ? "" : de.code === "session_ended" ? r.value.session : d.explain(de) ?? r.value.setupError;
3339
- }), X = w(() => a.admin && Ee.value && !C.value), U = w(() => P.value || q.value || d.error.value || !j.value);
3343
+ const ie = _(() => U.value?.selection), ge = _(() => !U.value && !H.value && !M.value && !K.value), Ee = _(() => H.value && (!a.admin || d.status.value?.state !== "blocked") || U.value?.scopeMode === "install-selected" && !ie.value), L = _(() => a.admin && H.value && d.status.value?.state === "blocked" && !d.status.value.retry), B = _(() => !!U.value && !Ee.value && !U.value.disabled), O = _(() => a.admin && (Ee.value || H.value && !!d.status.value?.retry)), j = _(() => a.picker ? ie.value ? et(a.picker.provider, ie.value.root) : U.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider : void 0), ve = (de) => a.picker?.labels?.[de] ?? i.value.folder, I = _(() => {
3344
+ const de = w.value;
3345
+ return !de || "confirm" in de ? "" : de.code === "session_ended" ? u.value.session : d.explain(de) ?? u.value.setupError;
3346
+ }), X = _(() => a.admin && Ee.value && !P.value), D = _(() => S.value || F.value || d.error.value || !Z.value);
3340
3347
  function me() {
3341
- C.value = !1, p.value = "", x.value = void 0, _.value = T.value?.selection?.scope ?? "";
3348
+ P.value = !1, f.value = "", w.value = void 0, x.value = T.value?.selection?.scope ?? "";
3342
3349
  }
3343
- return He(() => K.value, () => Promise.all([re(), a.admin ? d.refresh() : void 0])), v({ refresh: J }), xe(() => {
3344
- re();
3350
+ return He(() => K.value, () => Promise.all([oe(), a.admin ? d.refresh() : void 0])), v({ refresh: G }), xe(() => {
3351
+ oe();
3345
3352
  }), _e(() => {
3346
- le = !0;
3353
+ ee = !0;
3347
3354
  }), (de, be) => (l(), y(e(ke), {
3348
- title: t.title ?? u.value.title,
3349
- description: Ee.value && !C.value ? void 0 : u.value.help,
3355
+ title: t.title ?? i.value.title,
3356
+ description: Ee.value && !P.value ? void 0 : i.value.help,
3350
3357
  collapsible: !1,
3351
- "aria-busy": q.value || e(P) || ge.value,
3358
+ "aria-busy": F.value || e(S) || ge.value,
3352
3359
  class: "background-save-settings"
3353
3360
  }, {
3354
3361
  default: s(() => [
3355
- ge.value ? (l(!0), k(Q, { key: 0 }, fe(t.picker?.keys ?? [], (te) => (l(), y(e(we), {
3356
- key: te,
3357
- label: ve(te),
3362
+ ge.value ? (l(!0), k(Q, { key: 0 }, fe(t.picker?.keys ?? [], (ae) => (l(), y(e(we), {
3363
+ key: ae,
3364
+ label: ve(ae),
3358
3365
  "field-width": "full",
3359
3366
  "data-placeholder-row": ""
3360
3367
  }, {
3361
3368
  default: s(() => [
3362
- f(e(Ne), {
3369
+ p(e(Ve), {
3363
3370
  width: "20rem",
3364
3371
  height: "28px"
3365
3372
  })
3366
3373
  ]),
3367
3374
  _: 1
3368
- }, 8, ["label"]))), 128)) : K.value ? (l(), y(e(W), {
3375
+ }, 8, ["label"]))), 128)) : K.value ? (l(), y(e(J), {
3369
3376
  key: 1,
3370
3377
  tone: "info",
3371
3378
  role: "status"
@@ -3375,22 +3382,22 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3375
3382
  ]),
3376
3383
  _: 1
3377
3384
  })) : (l(), k(Q, { key: 2 }, [
3378
- M.value ? (l(), y(e(W), {
3385
+ M.value ? (l(), y(e(J), {
3379
3386
  key: 0,
3380
3387
  tone: "danger",
3381
3388
  role: "alert"
3382
3389
  }, {
3383
3390
  default: s(() => [
3384
- S("span", Wn, [
3385
- S("span", Jn, o(ye.value), 1),
3386
- f(e(N), {
3391
+ C("span", Wn, [
3392
+ C("span", Jn, o(ye.value), 1),
3393
+ p(e(N), {
3387
3394
  variant: "secondary",
3388
3395
  size: "sm",
3389
- disabled: q.value,
3390
- onClick: re
3396
+ disabled: F.value,
3397
+ onClick: oe
3391
3398
  }, {
3392
3399
  default: s(() => [
3393
- h(o(u.value.retry), 1)
3400
+ h(o(i.value.retry), 1)
3394
3401
  ]),
3395
3402
  _: 1
3396
3403
  }, 8, ["disabled"])
@@ -3398,22 +3405,22 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3398
3405
  ]),
3399
3406
  _: 1
3400
3407
  })) : m("", !0),
3401
- e(d).error.value ? (l(), y(e(W), {
3408
+ e(d).error.value ? (l(), y(e(J), {
3402
3409
  key: 1,
3403
3410
  tone: "danger",
3404
3411
  role: "alert"
3405
3412
  }, {
3406
3413
  default: s(() => [
3407
- S("span", Yn, [
3408
- h(o(r.value.setupError), 1),
3409
- f(e(N), {
3414
+ C("span", Yn, [
3415
+ h(o(u.value.setupError), 1),
3416
+ p(e(N), {
3410
3417
  variant: "secondary",
3411
3418
  size: "sm",
3412
- disabled: e(P),
3419
+ disabled: e(S),
3413
3420
  onClick: e(d).refresh
3414
3421
  }, {
3415
3422
  default: s(() => [
3416
- h(o(u.value.retry), 1)
3423
+ h(o(i.value.retry), 1)
3417
3424
  ]),
3418
3425
  _: 1
3419
3426
  }, 8, ["disabled", "onClick"])
@@ -3421,23 +3428,23 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3421
3428
  ]),
3422
3429
  _: 1
3423
3430
  })) : m("", !0),
3424
- R.value ? (l(), y(e(W), {
3431
+ I.value ? (l(), y(e(J), {
3425
3432
  key: 2,
3426
3433
  tone: "danger",
3427
3434
  role: "alert"
3428
3435
  }, {
3429
3436
  default: s(() => [
3430
- h(o(R.value), 1),
3431
- e(x) && "reason" in e(x) && e(x).reason ? (l(), k("span", Qn, o(e(x).reason), 1)) : m("", !0)
3437
+ h(o(I.value), 1),
3438
+ e(w) && "reason" in e(w) && e(w).reason ? (l(), k("span", Qn, o(e(w).reason), 1)) : m("", !0)
3432
3439
  ]),
3433
3440
  _: 1
3434
3441
  })) : m("", !0),
3435
- V.value ? (l(), y(e(W), {
3442
+ L.value ? (l(), y(e(J), {
3436
3443
  key: 3,
3437
3444
  tone: "warning"
3438
3445
  }, {
3439
3446
  default: s(() => [
3440
- h(o(e(d).explain(e(d).status.value) ?? r.value.blocked), 1),
3447
+ h(o(e(d).explain(e(d).status.value) ?? u.value.blocked), 1),
3441
3448
  e(d).status.value?.reason ? (l(), k("span", Zn, o(e(d).status.value.reason), 1)) : m("", !0)
3442
3449
  ]),
3443
3450
  _: 1
@@ -3447,22 +3454,22 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3447
3454
  locale: t.locale,
3448
3455
  files: ""
3449
3456
  }, null, 8, ["locale"])) : m("", !0),
3450
- I.value?.disabled ? (l(), y(e(W), {
3457
+ U.value?.disabled ? (l(), y(e(J), {
3451
3458
  key: 5,
3452
3459
  tone: "warning"
3453
3460
  }, {
3454
3461
  default: s(() => [
3455
- S("span", jn, [
3456
- S("span", null, o(u.value.disabled), 1),
3462
+ C("span", jn, [
3463
+ C("span", null, o(i.value.disabled), 1),
3457
3464
  t.admin ? (l(), y(e(N), {
3458
3465
  key: 0,
3459
3466
  variant: "secondary",
3460
3467
  size: "sm",
3461
- disabled: q.value,
3468
+ disabled: F.value,
3462
3469
  onClick: $e
3463
3470
  }, {
3464
3471
  default: s(() => [
3465
- h(o(u.value.enable), 1)
3472
+ h(o(i.value.enable), 1)
3466
3473
  ]),
3467
3474
  _: 1
3468
3475
  }, 8, ["disabled"])) : m("", !0)
@@ -3470,84 +3477,84 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3470
3477
  ]),
3471
3478
  _: 1
3472
3479
  })) : m("", !0),
3473
- B.value && ee.value.some((te) => te.status === "reselection-required") ? (l(), y(e(W), {
3480
+ B.value && te.value.some((ae) => ae.status === "reselection-required") ? (l(), y(e(J), {
3474
3481
  key: 6,
3475
3482
  tone: "warning"
3476
3483
  }, {
3477
3484
  default: s(() => [
3478
- h(o(u.value.reselect), 1)
3485
+ h(o(i.value.reselect), 1)
3479
3486
  ]),
3480
3487
  _: 1
3481
3488
  })) : m("", !0),
3482
- F.value || C.value ? (l(), y(Ge(X.value ? aa : "div"), Ze(ya({ key: 7 }, X.value ? { admin: !0, locale: t.locale, files: !0, status: e(d).status.value } : {})), {
3489
+ O.value || P.value ? (l(), y(Ge(X.value ? aa : "div"), Ze(ya({ key: 7 }, X.value ? { admin: !0, locale: t.locale, files: !0, status: e(d).status.value } : {})), {
3483
3490
  default: s(() => [
3484
- f(e(Me), {
3491
+ p(e(Me), {
3485
3492
  direction: "vertical",
3486
3493
  class: "save-form",
3487
3494
  onSubmit: Oe(e(d).submit, ["prevent"])
3488
3495
  }, {
3489
3496
  default: s(() => [
3490
- C.value ? (l(), k("p", es, o(u.value.changeHelp), 1)) : m("", !0),
3497
+ P.value ? (l(), k("p", es, o(i.value.changeHelp), 1)) : m("", !0),
3491
3498
  e(A) ? (l(), y(e(Pe), {
3492
3499
  key: 1,
3493
- label: u.value.folder,
3494
- description: X.value ? u.value.approveHelp : void 0,
3500
+ label: i.value.folder,
3501
+ description: X.value ? i.value.approveHelp : void 0,
3495
3502
  "data-save-row": "folder"
3496
3503
  }, {
3497
3504
  default: s(() => [
3498
- f(e(ba), {
3505
+ p(e(ba), {
3499
3506
  id: "save-scope",
3500
- modelValue: e(_),
3501
- "onUpdate:modelValue": be[0] || (be[0] = (te) => je(_) ? _.value = te : null),
3502
- options: e(z),
3503
- disabled: e(P)
3507
+ modelValue: e(x),
3508
+ "onUpdate:modelValue": be[0] || (be[0] = (ae) => je(x) ? x.value = ae : null),
3509
+ options: e(E),
3510
+ disabled: e(S)
3504
3511
  }, null, 8, ["modelValue", "options", "disabled"])
3505
3512
  ]),
3506
3513
  _: 1
3507
3514
  }, 8, ["label", "description"])) : m("", !0),
3508
- f(e(Pe), {
3509
- label: u.value.password,
3510
- description: e(E) ? r.value.confirmingHelp : X.value ? r.value.passwordNote : void 0,
3515
+ p(e(Pe), {
3516
+ label: i.value.password,
3517
+ description: e(z) ? u.value.confirmingHelp : X.value ? u.value.passwordNote : void 0,
3511
3518
  help: e($),
3512
3519
  "validate-status": e($) ? "error" : void 0,
3513
3520
  "validate-message-display-mode": "text"
3514
3521
  }, {
3515
- after: s(({ classes: te }) => [
3516
- f(e(N), {
3517
- class: De(te.afterItem),
3522
+ after: s(({ classes: ae }) => [
3523
+ p(e(N), {
3524
+ class: De(ae.afterItem),
3518
3525
  type: "submit",
3519
3526
  variant: "primary",
3520
- loading: e(E),
3521
- disabled: U.value
3527
+ loading: e(z),
3528
+ disabled: D.value
3522
3529
  }, {
3523
3530
  default: s(() => [
3524
- h(o(C.value ? u.value.confirmChange : u.value.approve), 1)
3531
+ h(o(P.value ? i.value.confirmChange : i.value.approve), 1)
3525
3532
  ]),
3526
3533
  _: 1
3527
3534
  }, 8, ["class", "loading", "disabled"]),
3528
- C.value ? (l(), y(e(N), {
3535
+ P.value ? (l(), y(e(N), {
3529
3536
  key: 0,
3530
- class: De(te.afterItem),
3537
+ class: De(ae.afterItem),
3531
3538
  type: "button",
3532
3539
  variant: "secondary",
3533
- disabled: e(P),
3540
+ disabled: e(S),
3534
3541
  onClick: me
3535
3542
  }, {
3536
3543
  default: s(() => [
3537
- h(o(u.value.cancelChange), 1)
3544
+ h(o(i.value.cancelChange), 1)
3538
3545
  ]),
3539
3546
  _: 1
3540
3547
  }, 8, ["class", "disabled"])) : m("", !0)
3541
3548
  ]),
3542
3549
  default: s(() => [
3543
- f(e(Ae), {
3550
+ p(e(Ae), {
3544
3551
  id: "save-password",
3545
- modelValue: e(p),
3546
- "onUpdate:modelValue": be[1] || (be[1] = (te) => je(p) ? p.value = te : null),
3552
+ modelValue: e(f),
3553
+ "onUpdate:modelValue": be[1] || (be[1] = (ae) => je(f) ? f.value = ae : null),
3547
3554
  type: "password",
3548
3555
  autocomplete: "current-password",
3549
3556
  invalid: !!e($),
3550
- disabled: e(P)
3557
+ disabled: e(S)
3551
3558
  }, null, 8, ["modelValue", "invalid", "disabled"])
3552
3559
  ]),
3553
3560
  _: 1
@@ -3558,38 +3565,38 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3558
3565
  ]),
3559
3566
  _: 1
3560
3567
  }, 16)) : m("", !0),
3561
- B.value && !C.value && !F.value ? (l(!0), k(Q, { key: 8 }, fe(ee.value, (te) => (l(), y(e(we), {
3562
- key: te.key,
3563
- label: ve(te.key),
3568
+ B.value && !P.value && !O.value ? (l(!0), k(Q, { key: 8 }, fe(te.value, (ae) => (l(), y(e(we), {
3569
+ key: ae.key,
3570
+ label: ve(ae.key),
3564
3571
  "field-width": "full",
3565
3572
  "data-save-row": "folder"
3566
3573
  }, {
3567
3574
  default: s(() => [
3568
- S("div", as, [
3569
- te.status === "active" && te.destination ? (l(), y(e(Ve), {
3575
+ C("div", as, [
3576
+ ae.status === "active" && ae.destination ? (l(), y(e(Ne), {
3570
3577
  key: 0,
3571
- path: te.destination.path
3572
- }, null, 8, ["path"])) : (l(), k("span", ts, o(u.value.folderNone), 1)),
3573
- f(e(N), {
3578
+ path: ae.destination.path
3579
+ }, null, 8, ["path"])) : (l(), k("span", ts, o(i.value.folderNone), 1)),
3580
+ p(e(N), {
3574
3581
  variant: "secondary",
3575
3582
  size: "sm",
3576
- disabled: q.value || e(P) || (t.admin && I.value?.scopeMode === "install-selected" ? !e(A) || e(d).error.value : !Z.value),
3577
- onClick: (Ie) => ue(te.key)
3583
+ disabled: F.value || e(S) || (t.admin && U.value?.scopeMode === "install-selected" ? !e(A) || e(d).error.value : !j.value),
3584
+ onClick: (Ie) => ue(ae.key)
3578
3585
  }, {
3579
3586
  default: s(() => [
3580
- h(o(u.value.choose), 1)
3587
+ h(o(i.value.choose), 1)
3581
3588
  ]),
3582
3589
  _: 1
3583
3590
  }, 8, ["disabled", "onClick"]),
3584
- te.status === "active" && te.destination ? (l(), y(e(N), {
3591
+ ae.status === "active" && ae.destination ? (l(), y(e(N), {
3585
3592
  key: 2,
3586
3593
  variant: "ghost",
3587
3594
  size: "sm",
3588
- disabled: q.value,
3589
- onClick: (Ie) => Ce(te.destination.id)
3595
+ disabled: F.value,
3596
+ onClick: (Ie) => Ce(ae.destination.id)
3590
3597
  }, {
3591
3598
  default: s(() => [
3592
- h(o(u.value.revoke), 1)
3599
+ h(o(i.value.revoke), 1)
3593
3600
  ]),
3594
3601
  _: 1
3595
3602
  }, 8, ["disabled", "onClick"])) : m("", !0)
@@ -3599,17 +3606,17 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3599
3606
  }, 1032, ["label"]))), 128)) : m("", !0)
3600
3607
  ], 64)),
3601
3608
  he(de.$slots, "default", {}, void 0, !0),
3602
- Z.value ? (l(), y(na, {
3603
- key: oe.value?.scope,
3604
- open: L.value,
3605
- "onUpdate:open": be[2] || (be[2] = (te) => L.value = te),
3606
- provider: Z.value,
3609
+ j.value ? (l(), y(na, {
3610
+ key: ie.value?.scope,
3611
+ open: R.value,
3612
+ "onUpdate:open": be[2] || (be[2] = (ae) => R.value = ae),
3613
+ provider: j.value,
3607
3614
  locale: t.locale,
3608
3615
  name: t.ctx?.displayName,
3609
3616
  mode: "folder",
3610
- destination: { key: O.value, selectDestination: t.sdk.selectDestination },
3617
+ destination: { key: q.value, selectDestination: t.sdk.selectDestination },
3611
3618
  onAuthorized: ne,
3612
- onRefused: G,
3619
+ onRefused: W,
3613
3620
  "error-text": t.pickerErrorText
3614
3621
  }, null, 8, ["open", "provider", "locale", "name", "destination", "error-text"])) : m("", !0)
3615
3622
  ]),
@@ -3633,24 +3640,24 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3633
3640
  },
3634
3641
  emits: ["authorized"],
3635
3642
  setup(t, { expose: v, emit: n }) {
3636
- const a = t, i = n, u = w(() => pa(a.locale)), r = w(() => ma(a.locale)), c = g([]), b = g(), d = () => (P.value = void 0, b.value?.refresh() ?? Promise.resolve()), p = g(!1), P = g();
3637
- async function E($) {
3638
- if (p.value) return;
3639
- p.value = !0, P.value = void 0;
3640
- const T = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (_) => _.toString(16).padStart(2, "0")).join("");
3643
+ const a = t, r = n, i = _(() => pa(a.locale)), u = _(() => ma(a.locale)), c = b([]), g = b(), d = () => (S.value = void 0, g.value?.refresh() ?? Promise.resolve()), f = b(!1), S = b();
3644
+ async function z($) {
3645
+ if (f.value) return;
3646
+ f.value = !0, S.value = void 0;
3647
+ const T = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (x) => x.toString(16).padStart(2, "0")).join("");
3641
3648
  try {
3642
3649
  await a.sdk.exportExample({ key: $, job_id: T });
3643
- } catch (_) {
3644
- P.value = _;
3650
+ } catch (x) {
3651
+ S.value = x;
3645
3652
  } finally {
3646
- p.value = !1;
3653
+ f.value = !1;
3647
3654
  }
3648
3655
  }
3649
- const x = ($) => a.picker?.labels?.[$] ? `${u.value.example}${r.value}${a.picker.labels[$]}` : u.value.example;
3656
+ const w = ($) => a.picker?.labels?.[$] ? `${i.value.example}${u.value}${a.picker.labels[$]}` : i.value.example;
3650
3657
  return v({ refresh: d }), ($, T) => (l(), k("div", ss, [
3651
- f(ns, {
3658
+ p(ns, {
3652
3659
  ref_key: "settings",
3653
- ref: b,
3660
+ ref: g,
3654
3661
  sdk: t.sdk,
3655
3662
  admin: t.admin,
3656
3663
  locale: t.locale,
@@ -3658,31 +3665,31 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3658
3665
  picker: t.picker,
3659
3666
  ctx: t.ctx,
3660
3667
  "picker-error-text": t.pickerErrorText,
3661
- onAuthorized: T[0] || (T[0] = (_) => i("authorized", _)),
3662
- onDestinations: T[1] || (T[1] = (_) => c.value = _.filter((z) => z.status === "active"))
3668
+ onAuthorized: T[0] || (T[0] = (x) => r("authorized", x)),
3669
+ onDestinations: T[1] || (T[1] = (x) => c.value = x.filter((E) => E.status === "active"))
3663
3670
  }, {
3664
3671
  default: s(() => [
3665
- P.value ? (l(), y(e(W), {
3672
+ S.value ? (l(), y(e(J), {
3666
3673
  key: 0,
3667
3674
  tone: "danger",
3668
3675
  role: "alert"
3669
3676
  }, {
3670
3677
  default: s(() => [
3671
- h(o(e(Qe)(P.value, u.value, "save", t.locale, t.ctx?.displayName)), 1)
3678
+ h(o(e(Qe)(S.value, i.value, "save", t.locale, t.ctx?.displayName)), 1)
3672
3679
  ]),
3673
3680
  _: 1
3674
3681
  })) : m("", !0),
3675
3682
  t.sampleSave && c.value.length ? (l(), k("div", os, [
3676
- S("p", is, o(u.value.exampleHelp), 1),
3677
- S("div", us, [
3678
- (l(!0), k(Q, null, fe(c.value, (_) => (l(), y(e(N), {
3679
- key: _.key,
3683
+ C("p", is, o(i.value.exampleHelp), 1),
3684
+ C("div", us, [
3685
+ (l(!0), k(Q, null, fe(c.value, (x) => (l(), y(e(N), {
3686
+ key: x.key,
3680
3687
  variant: "secondary",
3681
- disabled: p.value,
3682
- onClick: (z) => E(_.key)
3688
+ disabled: f.value,
3689
+ onClick: (E) => z(x.key)
3683
3690
  }, {
3684
3691
  default: s(() => [
3685
- h(o(x(_.key)), 1)
3692
+ h(o(w(x.key)), 1)
3686
3693
  ]),
3687
3694
  _: 2
3688
3695
  }, 1032, ["disabled", "onClick"]))), 128))
@@ -3693,7 +3700,7 @@ const wl = ["aria-busy", "aria-label"], xl = { class: "file-toolbar file-locatio
3693
3700
  }, 8, ["sdk", "admin", "locale", "title", "picker", "ctx", "picker-error-text"])
3694
3701
  ]));
3695
3702
  }
3696
- }), Ns = /* @__PURE__ */ pe(rs, [["__scopeId", "data-v-05618cb8"]]);
3703
+ }), Vs = /* @__PURE__ */ pe(rs, [["__scopeId", "data-v-05618cb8"]]);
3697
3704
  function ds(t) {
3698
3705
  const { code: v, message: n } = t ?? {};
3699
3706
  return !!Be(t) || typeof v == "string" && ["APP_DENIED", "PERMISSION_DENIED", "cross_origin", "origin_required"].includes(v) || v === "bad_response" && /HTTP 40[13]\b/.test(String(n));
@@ -3712,126 +3719,126 @@ const vs = { class: "authorization-content" }, fs = ["aria-busy", "data-authoriz
3712
3719
  },
3713
3720
  emits: ["ready"],
3714
3721
  setup(t, { emit: v }) {
3715
- const n = t, a = v, i = g(), u = g(), r = g(!1), c = g(!1), b = g(!1), d = Ct();
3716
- let p = [], P = !1, E = 0, x = !1, $, T = 0, _;
3717
- const z = w(() => at(n.ctx.locale, n.name ?? n.ctx.displayName ?? "")), A = w(() => i.value || u.value), j = w(() => A.value?.state === "authorization_required"), I = w(() => ["helper_untrusted", "cli_untrusted"].includes(A.value?.reason || "")), ee = w(() => j.value && !I.value), H = w(() => A.value?.state === "unavailable" ? Se(A.value) : void 0), q = w(() => H.value ?? { credential_not_ready: "credential", access_denied: "denied", check_failed: "config" }[A.value?.reason ?? ""] ?? "unavailable"), M = w(() => ca({ code: A.value?.reason }, n.ctx.locale, n.name ?? n.ctx.displayName)), D = w(() => M.value?.title ?? (A.value ? j.value ? z.value("title") : A.value.state === "ready" ? z.value("ready") : A.value.state === "not_admin" ? z.value("not_admin.title") : A.value.state === "session_expired" ? z.value("session_expired.title") : z.value(q.value + ".title") : z.value("checking"))), C = w(() => M.value?.message ?? (j.value ? z.value("purpose") : A.value?.state === "not_admin" ? z.value("not_admin.body") : A.value?.state === "session_expired" ? z.value("session_expired.body") : A.value?.state === "unavailable" ? z.value(q.value + ".body") : z.value("purpose"))), L = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], O = w(() => L.includes(A.value?.reason || "") ? A.value.reason : "unknown"), ae = w(() => I.value ? "next.reinstall" : O.value === "grant_missing" ? "next.install" : O.value === "upgrade_reapproval" || O.value === "grant_incompatible" ? "next.update" : "next.repair");
3722
+ const n = t, a = v, r = b(), i = b(), u = b(!1), c = b(!1), g = b(!1), d = Ct();
3723
+ let f = [], S = !1, z = 0, w = !1, $, T = 0, x;
3724
+ const E = _(() => at(n.ctx.locale, n.name ?? n.ctx.displayName ?? "")), A = _(() => r.value || i.value), Z = _(() => A.value?.state === "authorization_required"), U = _(() => ["helper_untrusted", "cli_untrusted"].includes(A.value?.reason || "")), te = _(() => Z.value && !U.value), H = _(() => A.value?.state === "unavailable" ? Se(A.value) : void 0), F = _(() => H.value ?? { credential_not_ready: "credential", access_denied: "denied", check_failed: "config" }[A.value?.reason ?? ""] ?? "unavailable"), M = _(() => ca({ code: A.value?.reason }, n.ctx.locale, n.name ?? n.ctx.displayName)), V = _(() => M.value?.title ?? (A.value ? Z.value ? E.value("title") : A.value.state === "ready" ? E.value("ready") : A.value.state === "not_admin" ? E.value("not_admin.title") : A.value.state === "session_expired" ? E.value("session_expired.title") : E.value(F.value + ".title") : E.value("checking"))), P = _(() => M.value?.message ?? (Z.value ? E.value("purpose") : A.value?.state === "not_admin" ? E.value("not_admin.body") : A.value?.state === "session_expired" ? E.value("session_expired.body") : A.value?.state === "unavailable" ? E.value(F.value + ".body") : E.value("purpose"))), R = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], q = _(() => R.includes(A.value?.reason || "") ? A.value.reason : "unknown"), le = _(() => U.value ? "next.reinstall" : q.value === "grant_missing" ? "next.install" : q.value === "upgrade_reapproval" || q.value === "grant_incompatible" ? "next.update" : "next.repair");
3718
3725
  function K(Y) {
3719
3726
  if (!Y || Y.command !== "authorization" || Y.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(Y.state) || Y.reason === "upgrade_reapproval" && Y.state !== "authorization_required") throw Error("invalid status");
3720
3727
  return Y;
3721
3728
  }
3722
- const le = ["service_unavailable", "request_timeout", "request_canceled", "network", "app_unavailable", "internal", "auth_unavailable", "EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT", "EXECUTOR_PAUSED"];
3729
+ const ee = ["service_unavailable", "request_timeout", "request_canceled", "network", "app_unavailable", "internal", "auth_unavailable", "EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT", "EXECUTOR_PAUSED"];
3723
3730
  function se(Y) {
3724
- const { code: ue } = Y ?? {}, oe = Se(Y);
3725
- return oe ? oe === "stopped" ? "APP_STOPPED" : "APP_STARTING" : ue === "credential_not_ready" ? ue : Be(Y) ? Be(Y) : ds(Y) ? "access_denied" : typeof ue == "string" && le.includes(ue) || ue === void 0 ? "service_unavailable" : "check_failed";
3731
+ const { code: ue } = Y ?? {}, ie = Se(Y);
3732
+ return ie ? ie === "stopped" ? "APP_STOPPED" : "APP_STARTING" : ue === "credential_not_ready" ? ue : Be(Y) ? Be(Y) : ds(Y) ? "access_denied" : typeof ue == "string" && ee.includes(ue) || ue === void 0 ? "service_unavailable" : "check_failed";
3726
3733
  }
3727
- let ie;
3728
- function re() {
3729
- clearTimeout($), H.value !== ie && (ie = H.value, T = 0), H.value && ($ = setTimeout(() => {
3730
- r.value ? x = !0 : G("status");
3734
+ let re;
3735
+ function oe() {
3736
+ clearTimeout($), H.value !== re && (re = H.value, T = 0), H.value && ($ = setTimeout(() => {
3737
+ u.value ? w = !0 : W("status");
3731
3738
  }, va(T++, H.value)));
3732
3739
  }
3733
- const J = [1e3, 3e3];
3740
+ const G = [1e3, 3e3];
3734
3741
  async function ne(Y) {
3735
- const ue = Y === "status" && !b.value ? J : [];
3736
- for (let oe = 0; ; oe++) {
3742
+ const ue = Y === "status" && !g.value ? G : [];
3743
+ for (let ie = 0; ; ie++) {
3737
3744
  try {
3738
3745
  const ge = K(await n.ctx.authorization?.[Y]());
3739
- if (ge.state !== "unavailable" || oe >= ue.length) return ge;
3746
+ if (ge.state !== "unavailable" || ie >= ue.length) return ge;
3740
3747
  } catch (ge) {
3741
- if (["session_required", "credential_not_ready"].includes(ge.code) || oe >= ue.length) throw ge;
3748
+ if (["session_required", "credential_not_ready"].includes(ge.code) || ie >= ue.length) throw ge;
3742
3749
  }
3743
- if (await new Promise((ge) => setTimeout(ge, ue[oe])), P) throw Error("disposed");
3750
+ if (await new Promise((ge) => setTimeout(ge, ue[ie])), S) throw Error("disposed");
3744
3751
  }
3745
3752
  }
3746
- async function G(Y) {
3747
- if (r.value || P) return;
3748
- const ue = ++E;
3749
- u.value = Y === "request" && i.value?.state === "authorization_required" ? i.value : void 0, r.value = !0, c.value = !1, i.value = void 0;
3753
+ async function W(Y) {
3754
+ if (u.value || S) return;
3755
+ const ue = ++z;
3756
+ i.value = Y === "request" && r.value?.state === "authorization_required" ? r.value : void 0, u.value = !0, c.value = !1, r.value = void 0;
3750
3757
  try {
3751
- const oe = await ne(Y);
3752
- if (P || ue !== E) return;
3753
- i.value = oe, b.value = oe.state !== "ready", oe.state === "ready" && ye(!0), oe.state === "ready" && a("ready");
3754
- } catch (oe) {
3755
- !P && ue === E && (i.value = oe.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : u.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: se(oe) }, c.value = !M.value && q.value === "unavailable", b.value = !0);
3758
+ const ie = await ne(Y);
3759
+ if (S || ue !== z) return;
3760
+ r.value = ie, g.value = ie.state !== "ready", ie.state === "ready" && ye(!0), ie.state === "ready" && a("ready");
3761
+ } catch (ie) {
3762
+ !S && ue === z && (r.value = ie.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : i.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: se(ie) }, c.value = !M.value && F.value === "unavailable", g.value = !0);
3756
3763
  } finally {
3757
- !P && ue === E && (r.value = !1, u.value = void 0, x ? (x = !1, G("status")) : re());
3764
+ !S && ue === z && (u.value = !1, i.value = void 0, w ? (w = !1, W("status")) : oe());
3758
3765
  }
3759
3766
  }
3760
3767
  function ye(Y) {
3761
- const ue = p;
3762
- p = [], ue.forEach((oe) => oe(Y));
3768
+ const ue = f;
3769
+ f = [], ue.forEach((ie) => ie(Y));
3763
3770
  }
3764
3771
  function Ce(Y) {
3765
- b.value = Y, Y || ye(!1);
3772
+ g.value = Y, Y || ye(!1);
3766
3773
  }
3767
3774
  function $e() {
3768
- return i.value?.state === "ready" ? Promise.resolve(!0) : (r.value || (b.value = !0), new Promise((Y) => p.push(Y)));
3775
+ return r.value?.state === "ready" ? Promise.resolve(!0) : (u.value || (g.value = !0), new Promise((Y) => f.push(Y)));
3769
3776
  }
3770
- return Fe(Xa, { state: w(() => i.value?.state ?? "checking"), requireAuthorization: $e, text: z, busy: r, canManage: () => !!n.ctx.authorization?.canManage?.(), revoke: () => G("revoke") }), xe(() => {
3771
- _ = n.ctx.reopen(() => {
3772
- r.value ? x = !0 : G("status");
3773
- }), G("status");
3777
+ return Fe(Xa, { state: _(() => r.value?.state ?? "checking"), requireAuthorization: $e, text: E, busy: u, canManage: () => !!n.ctx.authorization?.canManage?.(), revoke: () => W("revoke") }), xe(() => {
3778
+ x = n.ctx.reopen(() => {
3779
+ u.value ? w = !0 : W("status");
3780
+ }), W("status");
3774
3781
  }), Ia(() => {
3775
- P = !0, E++, clearTimeout($), ye(!1), typeof _ == "function" && _();
3782
+ S = !0, z++, clearTimeout($), ye(!1), typeof x == "function" && x();
3776
3783
  }), (Y, ue) => (l(), k(Q, null, [
3777
- S("div", vs, [
3784
+ C("div", vs, [
3778
3785
  he(Y.$slots, "default", {}, void 0, !0)
3779
3786
  ]),
3780
- f(e(Ke), {
3781
- open: b.value && !e(d),
3782
- title: D.value,
3787
+ p(e(Ke), {
3788
+ open: g.value && !e(d),
3789
+ title: V.value,
3783
3790
  "onUpdate:open": Ce
3784
3791
  }, {
3785
3792
  footer: s(() => [
3786
- ee.value ? (l(), y(e(N), {
3793
+ te.value ? (l(), y(e(N), {
3787
3794
  key: 0,
3788
3795
  variant: "primary",
3789
- loading: r.value,
3790
- disabled: r.value,
3791
- onClick: ue[0] || (ue[0] = (oe) => G("request"))
3796
+ loading: u.value,
3797
+ disabled: u.value,
3798
+ onClick: ue[0] || (ue[0] = (ie) => W("request"))
3792
3799
  }, {
3793
3800
  default: s(() => [
3794
- h(o(r.value ? z.value("authorizing") : z.value("authorize")), 1)
3801
+ h(o(u.value ? E.value("authorizing") : E.value("authorize")), 1)
3795
3802
  ]),
3796
3803
  _: 1
3797
3804
  }, 8, ["loading", "disabled"])) : (l(), y(e(N), {
3798
3805
  key: 1,
3799
3806
  variant: "primary",
3800
- loading: r.value,
3801
- disabled: r.value,
3802
- onClick: ue[1] || (ue[1] = (oe) => G("status"))
3807
+ loading: u.value,
3808
+ disabled: u.value,
3809
+ onClick: ue[1] || (ue[1] = (ie) => W("status"))
3803
3810
  }, {
3804
3811
  default: s(() => [
3805
- h(o(r.value ? z.value("checking") : z.value("retry")), 1)
3812
+ h(o(u.value ? E.value("checking") : E.value("retry")), 1)
3806
3813
  ]),
3807
3814
  _: 1
3808
3815
  }, 8, ["loading", "disabled"]))
3809
3816
  ]),
3810
3817
  default: s(() => [
3811
- S("div", {
3818
+ C("div", {
3812
3819
  class: "authorization-view",
3813
- "aria-busy": r.value,
3814
- "data-authorization-state": i.value?.state || "checking"
3820
+ "aria-busy": u.value,
3821
+ "data-authorization-state": r.value?.state || "checking"
3815
3822
  }, [
3816
- S("p", ps, o(C.value), 1),
3817
- j.value ? (l(), y(e(W), {
3823
+ C("p", ps, o(P.value), 1),
3824
+ Z.value ? (l(), y(e(J), {
3818
3825
  key: 0,
3819
3826
  class: "authorization-status",
3820
- tone: ["grant_missing", "upgrade_reapproval"].includes(O.value) ? "info" : "warning",
3821
- title: z.value("reason." + O.value)
3827
+ tone: ["grant_missing", "upgrade_reapproval"].includes(q.value) ? "info" : "warning",
3828
+ title: E.value("reason." + q.value)
3822
3829
  }, {
3823
3830
  default: s(() => [
3824
- h(o(z.value(ae.value)), 1)
3831
+ h(o(E.value(le.value)), 1)
3825
3832
  ]),
3826
3833
  _: 1
3827
3834
  }, 8, ["tone", "title"])) : m("", !0),
3828
- c.value ? (l(), y(e(W), {
3835
+ c.value ? (l(), y(e(J), {
3829
3836
  key: 1,
3830
3837
  class: "authorization-failed",
3831
3838
  tone: "warning"
3832
3839
  }, {
3833
3840
  default: s(() => [
3834
- h(o(z.value("failed")), 1)
3841
+ h(o(E.value("failed")), 1)
3835
3842
  ]),
3836
3843
  _: 1
3837
3844
  })) : m("", !0)
@@ -3841,39 +3848,39 @@ const vs = { class: "authorization-content" }, fs = ["aria-busy", "data-authoriz
3841
3848
  }, 8, ["open", "title"])
3842
3849
  ], 64));
3843
3850
  }
3844
- }), Vs = /* @__PURE__ */ pe(ms, [["__scopeId", "data-v-e6c8e4e1"]]), ys = { class: "authorization-setting" }, bs = {
3851
+ }), Ns = /* @__PURE__ */ pe(ms, [["__scopeId", "data-v-e6c8e4e1"]]), ys = { class: "authorization-setting" }, bs = {
3845
3852
  class: "authorization-state",
3846
3853
  role: "status"
3847
3854
  }, gs = { class: "authorization-revoke-body" }, hs = /* @__PURE__ */ ce({
3848
3855
  __name: "AuthorizationSettings",
3849
3856
  setup(t) {
3850
- const { state: v, requireAuthorization: n, text: a, busy: i, canManage: u, revoke: r } = cs(), c = g(!1), b = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
3851
- return (d, p) => (l(), k(Q, null, [
3852
- f(e(ke), {
3857
+ const { state: v, requireAuthorization: n, text: a, busy: r, canManage: i, revoke: u } = cs(), c = b(!1), g = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
3858
+ return (d, f) => (l(), k(Q, null, [
3859
+ p(e(ke), {
3853
3860
  title: e(a)("settings.title"),
3854
3861
  collapsible: !1
3855
3862
  }, {
3856
3863
  default: s(() => [
3857
- f(e(we), {
3864
+ p(e(we), {
3858
3865
  label: e(a)("settings.status"),
3859
3866
  description: e(a)("purpose"),
3860
3867
  align: "center"
3861
3868
  }, {
3862
3869
  default: s(() => [
3863
- S("div", ys, [
3864
- S("span", bs, [
3870
+ C("div", ys, [
3871
+ C("span", bs, [
3865
3872
  e(v) === "ready" ? (l(), y(e(Da), {
3866
3873
  key: 0,
3867
3874
  size: 16,
3868
3875
  "aria-hidden": "true"
3869
3876
  })) : m("", !0),
3870
- h(o(e(a)(b[e(v)])), 1)
3877
+ h(o(e(a)(g[e(v)])), 1)
3871
3878
  ]),
3872
- e(v) === "ready" && e(u)() ? (l(), y(e(N), {
3879
+ e(v) === "ready" && e(i)() ? (l(), y(e(N), {
3873
3880
  key: 0,
3874
3881
  variant: "secondary",
3875
- disabled: e(i),
3876
- onClick: p[0] || (p[0] = (P) => c.value = !0)
3882
+ disabled: e(r),
3883
+ onClick: f[0] || (f[0] = (S) => c.value = !0)
3877
3884
  }, {
3878
3885
  default: s(() => [
3879
3886
  h(o(e(a)("revoke")), 1)
@@ -3882,7 +3889,7 @@ const vs = { class: "authorization-content" }, fs = ["aria-busy", "data-authoriz
3882
3889
  }, 8, ["disabled"])) : e(v) !== "ready" && e(v) !== "checking" ? (l(), y(e(N), {
3883
3890
  key: 1,
3884
3891
  variant: "secondary",
3885
- onClick: p[1] || (p[1] = (P) => e(n)())
3892
+ onClick: f[1] || (f[1] = (S) => e(n)())
3886
3893
  }, {
3887
3894
  default: s(() => [
3888
3895
  h(o(e(a)("settings.details")), 1)
@@ -3896,26 +3903,26 @@ const vs = { class: "authorization-content" }, fs = ["aria-busy", "data-authoriz
3896
3903
  ]),
3897
3904
  _: 1
3898
3905
  }, 8, ["title"]),
3899
- f(e(Ke), {
3906
+ p(e(Ke), {
3900
3907
  open: c.value,
3901
- "onUpdate:open": p[4] || (p[4] = (P) => c.value = P),
3908
+ "onUpdate:open": f[4] || (f[4] = (S) => c.value = S),
3902
3909
  title: e(a)("revoke.title")
3903
3910
  }, {
3904
3911
  footer: s(() => [
3905
- f(e(N), {
3912
+ p(e(N), {
3906
3913
  variant: "secondary",
3907
- onClick: p[2] || (p[2] = (P) => c.value = !1)
3914
+ onClick: f[2] || (f[2] = (S) => c.value = !1)
3908
3915
  }, {
3909
3916
  default: s(() => [
3910
3917
  h(o(e(a)("cancel")), 1)
3911
3918
  ]),
3912
3919
  _: 1
3913
3920
  }),
3914
- f(e(N), {
3921
+ p(e(N), {
3915
3922
  variant: "danger",
3916
- disabled: e(i),
3917
- onClick: p[3] || (p[3] = (P) => {
3918
- c.value = !1, e(r)();
3923
+ disabled: e(r),
3924
+ onClick: f[3] || (f[3] = (S) => {
3925
+ c.value = !1, e(u)();
3919
3926
  })
3920
3927
  }, {
3921
3928
  default: s(() => [
@@ -3925,7 +3932,7 @@ const vs = { class: "authorization-content" }, fs = ["aria-busy", "data-authoriz
3925
3932
  }, 8, ["disabled"])
3926
3933
  ]),
3927
3934
  default: s(() => [
3928
- S("p", gs, o(e(a)("revoke.body")), 1)
3935
+ C("p", gs, o(e(a)("revoke.body")), 1)
3929
3936
  ]),
3930
3937
  _: 1
3931
3938
  }, 8, ["open", "title"])
@@ -3934,16 +3941,16 @@ const vs = { class: "authorization-content" }, fs = ["aria-busy", "data-authoriz
3934
3941
  }), Ls = /* @__PURE__ */ pe(hs, [["__scopeId", "data-v-8452013e"]]);
3935
3942
  export {
3936
3943
  $s as AppShell,
3937
- Vs as AuthorizationGate,
3944
+ Ns as AuthorizationGate,
3938
3945
  Ls as AuthorizationSettings,
3939
3946
  Is as BackgroundPanel,
3940
- Ns as BackgroundSavePanel,
3947
+ Vs as BackgroundSavePanel,
3941
3948
  ns as BackgroundSaveSettings,
3942
3949
  qs as DEFAULT_REQUEST_TIMEOUT,
3943
3950
  Ds as DelegatePanel,
3944
3951
  Us as ExecutorApproval,
3945
3952
  fl as ExecutorNotice,
3946
- Va as ExecutorPreloadKey,
3953
+ Na as ExecutorPreloadKey,
3947
3954
  qa as ExecutorSettings,
3948
3955
  Ye as ExecutorSetupKey,
3949
3956
  Os as FILE_STATION_APP,