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