@synopackageland/sdk 0.10.5 → 0.10.6

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