@synopackageland/sdk 0.49.1 → 0.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/vue.js +193 -194
- package/executor-manifest.json +1 -1
- package/package.json +1 -1
package/dist/vue.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { appRefusal as ca, appDenial as Ke, delegateCopy as
|
|
2
|
-
import { DEFAULT_REQUEST_TIMEOUT as po, FILE_STATION_APP as mo, LIFECYCLE_RETRY_MAX_MS as yo, LIFECYCLE_STARTING_RETRY_MAX_MS as bo, MAX_LAUNCH_ROUTE as go, activePage as ho, authorizationCatalogs as ko, backgroundCatalogs as
|
|
3
|
-
import { inject as ze, ref as y, computed as
|
|
1
|
+
import { appRefusal as ca, appDenial as Ke, delegateCopy as Ue, createDsmFileStation as rt, appLifecycle as Ee, lifecycleRetryDelay as xa, joinSentences as Ba, lifecycleCopy as Fe, shellCopy as sa, isFullPage as Fa, uiLocale as Oa, format as Ge, nasCopy as Ne, nasErrorCopy as qa, saveCopy as Ca, saveError as oa, createNasProvider as Ma, labelSeparator as $a, identityCopy as Ka, backgroundCopy as dt, createBackgroundPickerProvider as ct, backgroundErrorCopy as vt, requestKey as ka, lifecycleRefusal as ft, errorCopy as pt, scopedPicker as mt, authorizationCopy as Ha, createEntryCheck as yt } from "./index.js";
|
|
2
|
+
import { DEFAULT_REQUEST_TIMEOUT as po, FILE_STATION_APP as mo, LIFECYCLE_RETRY_MAX_MS as yo, LIFECYCLE_STARTING_RETRY_MAX_MS as bo, MAX_LAUNCH_ROUTE as go, activePage as ho, authorizationCatalogs as ko, backgroundCatalogs as _o, bridgeCatalogs as wo, bridgeErrorCopy as xo, catalogs as Co, clientTimeout as $o, createBackgroundSaveFacade as So, createClient as Po, createDsmSession as Eo, createFileTransfers as To, createPortalAccess as Ao, createSharedFolderAccess as zo, createSharedFolderPermission as Ro, createStandaloneContext as Io, createStandaloneHost as Uo, decodeResponse as Do, delegateCatalogs as Lo, dsmLaunchURL as No, encodeRequest as Vo, fileStationPath as Bo, followLaunchRoute as Fo, identityCatalogs as Oo, launchRoute as qo, mergeCatalogs as Mo, nasCatalogs as Ko, openFileInFileStation as Ho, openFolderInFileStation as Go, portalCatalogs as Xo, portalMessages as Wo, protocolCodes as Jo, protocolOps as Yo, protocolSchemas as Qo, readDsmPorts as Zo, saveCatalogs as jo, sharedFolderAccessFor as ei, sharedFolderCatalogs as ai, sharedFolderMessages as ti, sharedFolderPermissionMessage as li, shellCatalogs as ni, shellPages as si, uiLocales as oi } from "./index.js";
|
|
3
|
+
import { inject as ze, ref as y, computed as _, onBeforeUnmount as ge, Comment as bt, Text as gt, Fragment as ae, watch as Xe, onMounted as _e, defineComponent as re, openBlock as l, createElementBlock as x, createElementVNode as $, toDisplayString as o, createCommentVNode as b, renderList as fe, normalizeClass as Re, createVNode as p, unref as e, createTextVNode as h, createBlock as g, renderSlot as he, withCtx as s, resolveDynamicComponent as je, normalizeProps as ia, mergeProps as Sa, withModifiers as We, isRef as ua, provide as He, useTemplateRef as Ze, useSlots as Ga, watchEffect as Aa, guardReactiveProps as za, createSlots as va, Teleport as Xa, markRaw as ht, h as kt, useId as _t, shallowRef as wt, onUnmounted as Wa, nextTick as xt } from "vue";
|
|
4
4
|
import { Timer as Ct, Info as $t, ShieldCheck as Ja, ChevronRight as Ya, LogOut as St, ChevronLeft as Pt, RotateCw as Et } from "@lucide/vue";
|
|
5
|
-
import { SettingsSection as ke, Callout as ee, Button as L, SettingsRow as xe, Skeleton as Ve, Badge as ea, PathDisplay as Be, Form as Je, FormItem as Te, Select as Pa, Input as
|
|
5
|
+
import { SettingsSection as ke, Callout as ee, Button as L, SettingsRow as xe, Skeleton as Ve, Badge as ea, PathDisplay as Be, Form as Je, FormItem as Te, Select as Pa, Input as Ie, Dialog as Oe, ensureDeviceViewport as Tt, AppRoot as At, ConfigProvider as zt, PageContent as Ra, PageHeader as Ia, AppLayout as Rt, LoadingArea as Qa, AppSidebar as It, AppSidebarUser as Ut, IconButton as na, InfoTip as Za, FileTypeIcon as ga, Breadcrumb as Dt, FilePicker as Lt, TreeView as Nt, DataGrid as Vt, Link as _a, FormActions as fa, Card as Ua, Checkbox as Bt, ListItem as Da } from "@synopackageland/ui";
|
|
6
6
|
const aa = /* @__PURE__ */ Symbol("executor-setup"), ja = /* @__PURE__ */ Symbol("executor-preload");
|
|
7
7
|
function Ft() {
|
|
8
8
|
return ze(ja, y(!1));
|
|
@@ -32,7 +32,7 @@ function qt(t) {
|
|
|
32
32
|
return /: the executor status request failed\.$/.test(t ?? "");
|
|
33
33
|
}
|
|
34
34
|
function Js(t) {
|
|
35
|
-
const d = y(), n =
|
|
35
|
+
const d = y(), n = _(() => d.value ? { code: d.value, ...ca({ code: d.value }, t.locale, t.displayName) } : void 0), a = y(!1), r = y(!1), i = y(), u = y("");
|
|
36
36
|
let v = !1, m = 0, c, f;
|
|
37
37
|
function C() {
|
|
38
38
|
clearTimeout(c), clearTimeout(f);
|
|
@@ -44,7 +44,7 @@ function Js(t) {
|
|
|
44
44
|
const K = Ke(F);
|
|
45
45
|
return v || !K ? !1 : (T(), d.value = K, !0);
|
|
46
46
|
}
|
|
47
|
-
async function
|
|
47
|
+
async function w(F, K) {
|
|
48
48
|
const V = m;
|
|
49
49
|
try {
|
|
50
50
|
return await t.call(F, K);
|
|
@@ -63,7 +63,7 @@ function Js(t) {
|
|
|
63
63
|
const V = m;
|
|
64
64
|
f = setTimeout(async () => {
|
|
65
65
|
try {
|
|
66
|
-
const z = await
|
|
66
|
+
const z = await w("identity.session");
|
|
67
67
|
!v && m === V && A(z);
|
|
68
68
|
} catch (z) {
|
|
69
69
|
!v && m === V && !S(z) && T("expired");
|
|
@@ -72,11 +72,11 @@ function Js(t) {
|
|
|
72
72
|
}
|
|
73
73
|
async function P() {
|
|
74
74
|
try {
|
|
75
|
-
const F = await
|
|
75
|
+
const F = await w("identity.status");
|
|
76
76
|
if (v) return;
|
|
77
77
|
if (d.value = void 0, a.value = F.enabled === !0, a.value)
|
|
78
78
|
try {
|
|
79
|
-
A(await
|
|
79
|
+
A(await w("identity.session", { bootstrap: !0 }));
|
|
80
80
|
} catch (K) {
|
|
81
81
|
!v && !Ke(K) && T();
|
|
82
82
|
}
|
|
@@ -113,15 +113,15 @@ function Js(t) {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
async function Q(F, K, V) {
|
|
116
|
-
const z = await
|
|
116
|
+
const z = await w("identity.login", { account: F, password: K, otp: V });
|
|
117
117
|
v || (m++, A(z));
|
|
118
118
|
}
|
|
119
119
|
async function O() {
|
|
120
|
-
const F = await
|
|
120
|
+
const F = await w("identity.session", { bootstrap: !0 });
|
|
121
121
|
v || (m++, A(F));
|
|
122
122
|
}
|
|
123
123
|
async function H() {
|
|
124
|
-
await
|
|
124
|
+
await w("identity.logout"), v || T();
|
|
125
125
|
}
|
|
126
126
|
function W() {
|
|
127
127
|
v = !0, T();
|
|
@@ -201,11 +201,11 @@ function Wt(t) {
|
|
|
201
201
|
}
|
|
202
202
|
const Jt = { password_rejected: "passwordRejected", password_required: "passwordRequired", password_confirm_failed: "passwordConfirmFailed" }, Yt = 6e4, Qt = 1e3;
|
|
203
203
|
function tt(t, d) {
|
|
204
|
-
const n = et(), a =
|
|
204
|
+
const n = et(), a = _(() => Ue(t.locale)), r = y(), i = y(""), u = y(!1), v = y(!1), m = y(!1), c = y(), f = y(!1), C = _(() => f.value ? a.value.passwordRequired : c.value && "confirm" in c.value ? a.value[Jt[c.value.confirm]] : "");
|
|
205
205
|
Xe(i, () => {
|
|
206
206
|
f.value = !1;
|
|
207
207
|
});
|
|
208
|
-
const T = y(), S = y(""),
|
|
208
|
+
const T = y(), S = y(""), w = y([]), A = rt({ webApi: t.ctx?.webApi }), P = _(() => T.value?.scope_mode === "install-selected"), E = _(() => !!T.value?.scope_mode), I = _(() => [{ label: a.value.homeScope, value: "home" }, ...w.value]), Q = _(() => !P.value || !!S.value && I.value.some((B) => B.value === S.value)), O = _(() => P.value && !T.value?.selection);
|
|
209
209
|
let H = !1;
|
|
210
210
|
async function W(B) {
|
|
211
211
|
const te = B ?? await n.status();
|
|
@@ -223,7 +223,7 @@ function tt(t, d) {
|
|
|
223
223
|
if (se += J.shares.length, se >= J.total) break;
|
|
224
224
|
if (de === 127) throw { code: "EXECUTOR_PROTOCOL" };
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
w.value = Z, S.value = q.selection?.scope ?? q.preselection ?? "";
|
|
227
227
|
}
|
|
228
228
|
async function F(B) {
|
|
229
229
|
if (!(!t.admin || u.value)) {
|
|
@@ -278,7 +278,7 @@ function tt(t, d) {
|
|
|
278
278
|
return !1;
|
|
279
279
|
}
|
|
280
280
|
const ne = (B) => B?.code === "executor_starting" ? a.value.statusStarting : qt(B?.reason) ? a.value.statusUnreachable : void 0;
|
|
281
|
-
return
|
|
281
|
+
return _e(() => {
|
|
282
282
|
n.subscribe?.((B) => {
|
|
283
283
|
!H && !ra(B) && (r.value = B);
|
|
284
284
|
}), F(t.initial);
|
|
@@ -308,7 +308,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
308
308
|
locale: {}
|
|
309
309
|
},
|
|
310
310
|
setup(t) {
|
|
311
|
-
const d = t, n =
|
|
311
|
+
const d = t, n = _(() => Ue(d.locale)), a = _(() => d.status?.approval), r = _(() => d.status?.state === "needs-admin-approval" && (d.status.code === "task_outdated" || !!a.value)), i = _(() => a.value?.permissions === "unchanged" ? n.value.upgradeUnchanged : a.value?.permissions === "expanded" ? n.value.upgradeExpanded : n.value.upgradeReview), u = (v) => v?.slice(0, 12) ?? "—";
|
|
312
312
|
return (v, m) => r.value ? (l(), x("section", {
|
|
313
313
|
key: 0,
|
|
314
314
|
class: "executor-upgrade",
|
|
@@ -389,7 +389,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
389
389
|
webapiProfiles: {}
|
|
390
390
|
},
|
|
391
391
|
setup(t) {
|
|
392
|
-
const d = t, n =
|
|
392
|
+
const d = t, n = _(() => d.status?.code === "task_outdated" || !!d.status?.approval), a = _(() => Ue(d.locale)), r = _(() => Ba([a.value.consentWhy, d.purpose || (d.files ? a.value.consentPurposeFiles : a.value.consentPurpose)], d.locale ?? "en")), i = _(() => [a.value.pointPassword, a.value.pointLimited, a.value.pointUpdate, a.value.pointRevoke]);
|
|
393
393
|
return (u, v) => (l(), x("div", {
|
|
394
394
|
class: Re(["executor-consent", `executor-consent-${t.layout ?? "inline"}`]),
|
|
395
395
|
"data-executor-consent": "",
|
|
@@ -448,10 +448,10 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
448
448
|
}, kl = {
|
|
449
449
|
key: 0,
|
|
450
450
|
class: "executor-summary"
|
|
451
|
-
},
|
|
451
|
+
}, _l = {
|
|
452
452
|
key: 1,
|
|
453
453
|
class: "executor-summary"
|
|
454
|
-
},
|
|
454
|
+
}, wl = ["data-executor-status"], xl = { class: "executor-reason" }, Cl = /* @__PURE__ */ re({
|
|
455
455
|
__name: "ExecutorSettings",
|
|
456
456
|
props: {
|
|
457
457
|
admin: { type: Boolean },
|
|
@@ -464,9 +464,9 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
464
464
|
},
|
|
465
465
|
emits: ["confirmed"],
|
|
466
466
|
setup(t, { expose: d, emit: n }) {
|
|
467
|
-
const a = t, r = n, i =
|
|
467
|
+
const a = t, r = n, i = _(() => Ue(a.locale)), { status: u, password: v, busy: m, confirming: c, error: f, failure: C, passwordError: T, scope: S, chosen: w, options: A, dynamic: P, files: E, webapiProfiles: I, canConfirm: Q, needsScope: O, refresh: H, submit: W, explain: F } = tt(a, () => r("confirmed")), K = _(() => c.value ? "confirming" : u.value ? u.value.state === "ready" ? "ready" : "blocked" : void 0), V = _(() => ({ ready: { tone: "success", text: i.value.statusReady }, blocked: { tone: "danger", text: i.value.statusBlocked }, confirming: { tone: "info", text: i.value.statusConfirming } })[K.value ?? "confirming"]), z = _(() => c.value ? void 0 : Ee(u.value));
|
|
468
468
|
Ye(() => z.value, H);
|
|
469
|
-
const M =
|
|
469
|
+
const M = _(() => !z.value && (u.value?.state === "needs-admin-approval" || O.value)), ne = _(() => M.value || !!u.value?.retry);
|
|
470
470
|
return d({ refresh: H }), (B, te) => t.admin ? (l(), g(e(ke), {
|
|
471
471
|
key: 0,
|
|
472
472
|
title: t.title ?? i.value.setupTitle,
|
|
@@ -532,7 +532,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
532
532
|
_: 1
|
|
533
533
|
}, 8, ["label"])
|
|
534
534
|
])) : b("", !0),
|
|
535
|
-
(e(u) || e(c)) && !M.value ? (l(), x("div",
|
|
535
|
+
(e(u) || e(c)) && !M.value ? (l(), x("div", _l, [
|
|
536
536
|
p(e(xe), {
|
|
537
537
|
label: i.value.status
|
|
538
538
|
}, {
|
|
@@ -549,7 +549,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
549
549
|
]),
|
|
550
550
|
_: 1
|
|
551
551
|
}, 8, ["tone"])
|
|
552
|
-
], 8,
|
|
552
|
+
], 8, wl)
|
|
553
553
|
]),
|
|
554
554
|
_: 1
|
|
555
555
|
}, 8, ["label"]),
|
|
@@ -613,8 +613,8 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
613
613
|
default: s(() => [
|
|
614
614
|
p(e(Pa), {
|
|
615
615
|
id: "delegate-scope",
|
|
616
|
-
modelValue: e(
|
|
617
|
-
"onUpdate:modelValue": te[0] || (te[0] = (q) => ua(
|
|
616
|
+
modelValue: e(w),
|
|
617
|
+
"onUpdate:modelValue": te[0] || (te[0] = (q) => ua(w) ? w.value = q : null),
|
|
618
618
|
options: e(A),
|
|
619
619
|
disabled: e(m) || e(f)
|
|
620
620
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
@@ -643,7 +643,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
643
643
|
}, 8, ["class", "loading", "disabled"])
|
|
644
644
|
]),
|
|
645
645
|
default: s(() => [
|
|
646
|
-
p(e(
|
|
646
|
+
p(e(Ie), {
|
|
647
647
|
id: "delegate-password",
|
|
648
648
|
modelValue: e(v),
|
|
649
649
|
"onUpdate:modelValue": te[1] || (te[1] = (q) => ua(v) ? v.value = q : null),
|
|
@@ -680,11 +680,11 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
680
680
|
ctx: {}
|
|
681
681
|
},
|
|
682
682
|
setup(t) {
|
|
683
|
-
const d = t, n =
|
|
683
|
+
const d = t, n = _(() => Ue(d.locale)), a = ze(aa, void 0) ?? d.ctx.executor;
|
|
684
684
|
a && He(aa, a);
|
|
685
|
-
const r = y("checking"), i = y(), u = y(!1), v =
|
|
685
|
+
const r = y("checking"), i = y(), u = y(!1), v = _(() => d.ctx.user?.isAdmin === !0), m = _(() => !i.value && (r.value === "needs-admin-approval" || r.value === "blocked")), c = _(() => a?.call ? { webApi: d.ctx.webApi, call: (P, E) => a.call(P, E) } : d.ctx.call ? d.ctx : void 0);
|
|
686
686
|
let f = !1, C, T, S = 0;
|
|
687
|
-
function
|
|
687
|
+
function w(P) {
|
|
688
688
|
const E = i.value;
|
|
689
689
|
if (i.value = Ee(P), r.value = P?.state ?? "unknown", clearTimeout(T), P && !i.value) {
|
|
690
690
|
S = 0;
|
|
@@ -702,11 +702,11 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
702
702
|
} catch {
|
|
703
703
|
P = void 0;
|
|
704
704
|
}
|
|
705
|
-
f ||
|
|
705
|
+
f || w(P);
|
|
706
706
|
}
|
|
707
|
-
return
|
|
707
|
+
return _e(() => {
|
|
708
708
|
a && (a.subscribe?.((P) => {
|
|
709
|
-
!f && !ra(P) &&
|
|
709
|
+
!f && !ra(P) && w(P);
|
|
710
710
|
}), C = d.ctx.reopen?.(() => {
|
|
711
711
|
A();
|
|
712
712
|
}), A());
|
|
@@ -772,7 +772,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
772
772
|
ctx: {}
|
|
773
773
|
},
|
|
774
774
|
setup(t) {
|
|
775
|
-
const d = t, n =
|
|
775
|
+
const d = t, n = _(() => sa(d.locale ?? "en")), a = y(!1), r = new AbortController();
|
|
776
776
|
let i, u = -1 / 0;
|
|
777
777
|
async function v() {
|
|
778
778
|
const f = d.ctx.uiUpdate;
|
|
@@ -787,7 +787,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
787
787
|
function m() {
|
|
788
788
|
document.visibilityState !== "hidden" && Date.now() - u >= 6e4 && v();
|
|
789
789
|
}
|
|
790
|
-
|
|
790
|
+
_e(() => {
|
|
791
791
|
d.ctx.uiUpdate && (i = d.ctx.reopen?.(() => {
|
|
792
792
|
v();
|
|
793
793
|
}), document.addEventListener("visibilitychange", m), v());
|
|
@@ -858,11 +858,11 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
858
858
|
const te = v.value[0];
|
|
859
859
|
!B.defaultPrevented && te && a("update:modelValue", te.id);
|
|
860
860
|
}
|
|
861
|
-
const i =
|
|
861
|
+
const i = _(() => sa(n.locale)), u = _(() => n.pageSurface), v = _(() => Xt(n.pages, i.value)), m = _(() => Wt(v.value)), c = _(() => v.value.find((B) => B.id === n.modelValue)), f = _(() => c.value && n.loading ? { ...c.value, fill: !0 } : c.value), C = _(() => f.value?.title ?? i.value[n.modelValue] ?? i.value.status), T = Ze("scroller"), S = _(() => n.pages.some((B) => typeof B != "string"));
|
|
862
862
|
Xe(() => n.modelValue, () => {
|
|
863
863
|
S.value && !n.keepScroll && T.value && (T.value.$el.scrollTop = 0);
|
|
864
864
|
}, { flush: "post" });
|
|
865
|
-
const
|
|
865
|
+
const w = Ga(), A = _(() => n.denied === !0 ? {} : n.denied || void 0), P = _(() => ca(A.value, n.locale, n.brandName ?? n.ctx?.displayName)), E = _(() => n.ctx !== void 0 && Fa(n.ctx)), I = _(() => E.value ? n.ctx : void 0), Q = (B, { slots: te }) => te.default?.(), O = _(() => n.ctx !== void 0 && !E.value);
|
|
866
866
|
function H() {
|
|
867
867
|
n.ctx?.host?.activateWindow?.();
|
|
868
868
|
}
|
|
@@ -887,14 +887,14 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
887
887
|
de.disconnect(), J?.removeEventListener("resize", se);
|
|
888
888
|
});
|
|
889
889
|
}, { flush: "post", immediate: !0 });
|
|
890
|
-
const K =
|
|
890
|
+
const K = _(() => !F.value.user && I.value?.user?.name ? I.value.user : void 0), V = _(() => {
|
|
891
891
|
const B = I.value?.host;
|
|
892
892
|
return typeof B?.signOut == "function" && B.platform().host === "dsm";
|
|
893
893
|
});
|
|
894
894
|
function z() {
|
|
895
895
|
I.value?.host?.signOut?.();
|
|
896
896
|
}
|
|
897
|
-
He(nt, Ze("page-actions")), He(st, Ze("page-info")), He(ot,
|
|
897
|
+
He(nt, Ze("page-actions")), He(st, Ze("page-info")), He(ot, _(() => n.locale));
|
|
898
898
|
const M = Ze("notices"), ne = y(!0);
|
|
899
899
|
return Aa((B) => {
|
|
900
900
|
const te = M.value;
|
|
@@ -986,7 +986,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
986
986
|
ctx: t.ctx,
|
|
987
987
|
locale: t.locale
|
|
988
988
|
}, null, 8, ["ctx", "locale"])) : b("", !0),
|
|
989
|
-
e(at)(
|
|
989
|
+
e(at)(w.notices?.({ page: t.modelValue })) ? (l(), x("div", {
|
|
990
990
|
key: 3,
|
|
991
991
|
ref: "notices",
|
|
992
992
|
class: "app-notices",
|
|
@@ -1011,7 +1011,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
1011
1011
|
]),
|
|
1012
1012
|
_: 2
|
|
1013
1013
|
}, [
|
|
1014
|
-
|
|
1014
|
+
w["sidebar-footer"] || K.value ? {
|
|
1015
1015
|
name: "sidebar-footer",
|
|
1016
1016
|
fn: s(() => [
|
|
1017
1017
|
he(B.$slots, "sidebar-footer", {}, () => [
|
|
@@ -1040,7 +1040,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
1040
1040
|
]),
|
|
1041
1041
|
key: "0"
|
|
1042
1042
|
} : void 0,
|
|
1043
|
-
|
|
1043
|
+
w.toolbar ? {
|
|
1044
1044
|
name: "toolbar",
|
|
1045
1045
|
fn: s(() => [
|
|
1046
1046
|
he(B.$slots, "toolbar", { page: t.modelValue }, void 0, !0)
|
|
@@ -1058,7 +1058,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
1058
1058
|
}), Ys = /* @__PURE__ */ ve(Fl, [["__scopeId", "data-v-3ac4674c"]]), Qs = /* @__PURE__ */ re({
|
|
1059
1059
|
__name: "PageActions",
|
|
1060
1060
|
setup(t) {
|
|
1061
|
-
const d = ze(nt, null), n =
|
|
1061
|
+
const d = ze(nt, null), n = _(() => d?.value ?? null);
|
|
1062
1062
|
return (a, r) => n.value ? (l(), g(Xa, {
|
|
1063
1063
|
key: 0,
|
|
1064
1064
|
to: n.value
|
|
@@ -1078,7 +1078,7 @@ const Zt = ["aria-label"], jt = { class: "executor-upgrade-title" }, el = { key:
|
|
|
1078
1078
|
align: { default: "start" }
|
|
1079
1079
|
},
|
|
1080
1080
|
setup(t) {
|
|
1081
|
-
const d = t, n = Ga(), a =
|
|
1081
|
+
const d = t, n = Ga(), a = _(() => (d.notes ?? []).filter(Boolean)), r = d.inline ? null : ze(st, null), i = _(() => r?.value ?? null), u = ze(ot, null), v = _(() => {
|
|
1082
1082
|
if (d.label) return d.label;
|
|
1083
1083
|
const m = d.locale ?? u?.value ?? "en";
|
|
1084
1084
|
return n.default ? sa(m).notes : Ge(sa(m).notesCount, { count: a.value.length }, m);
|
|
@@ -1115,7 +1115,7 @@ function Ml(t) {
|
|
|
1115
1115
|
const la = (t, d = "name", n = "ASC") => `${d}
|
|
1116
1116
|
${n}
|
|
1117
1117
|
${t}`, Va = ["B", "KB", "MB", "GB", "TB", "PB"];
|
|
1118
|
-
function
|
|
1118
|
+
function wa(t, d) {
|
|
1119
1119
|
let n = 0, a = t;
|
|
1120
1120
|
for (; a >= 1024 && n < Va.length - 1; )
|
|
1121
1121
|
a /= 1024, n++;
|
|
@@ -1143,10 +1143,10 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1143
1143
|
},
|
|
1144
1144
|
emits: ["selected"],
|
|
1145
1145
|
setup(t, { emit: d }) {
|
|
1146
|
-
const n = t, a = d, r =
|
|
1146
|
+
const n = t, a = d, r = _(() => Ne(n.locale)), i = Mt(), { busy: u, error: v } = i, m = y(!1), c = y(!1), f = _(() => Ml(n.provider)), C = y([]), T = y([]), S = y([]), w = y(), A = y(), P = y(), E = y([]), I = y(), Q = y({ key: "name", direction: "asc" }), O = y(0), H = y([]), W = y(!1);
|
|
1147
1147
|
let F = new AbortController();
|
|
1148
1148
|
async function K() {
|
|
1149
|
-
const k =
|
|
1149
|
+
const k = w.value;
|
|
1150
1150
|
!k || k.isDir || !n.provider.download || await i.run(async (R) => (await n.provider.info(k.path, R), await n.provider.download(k.path), !0));
|
|
1151
1151
|
}
|
|
1152
1152
|
async function V() {
|
|
@@ -1154,7 +1154,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1154
1154
|
if (!k || !R || !n.provider.upload) return;
|
|
1155
1155
|
W.value = !1, await i.run(async (X) => (await n.provider.upload(k, R, X), !0)) && (H.value = [], await Pe(S.value), W.value = !0);
|
|
1156
1156
|
}
|
|
1157
|
-
const z =
|
|
1157
|
+
const z = _(() => [
|
|
1158
1158
|
{ key: "name", label: r.value.nameColumn, sortable: !0, tooltip: (k) => k.path },
|
|
1159
1159
|
{ key: "kind", label: r.value.kindColumn, width: 96 },
|
|
1160
1160
|
{ key: "bytes", label: r.value.sizeColumn, align: "right", sortable: !0, width: 96 }
|
|
@@ -1163,7 +1163,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1163
1163
|
return { id: k.path, label: k.name, icon: M, data: k };
|
|
1164
1164
|
}
|
|
1165
1165
|
function B(k) {
|
|
1166
|
-
|
|
1166
|
+
w.value = k, a("selected", k?.path);
|
|
1167
1167
|
}
|
|
1168
1168
|
function te(k) {
|
|
1169
1169
|
A.value = k.path, k.isDir && le(k.path), B(n.mode === "folder" ? k.isDir ? k : S.value.at(-1) : k.isDir ? void 0 : k);
|
|
@@ -1176,8 +1176,8 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1176
1176
|
for (const X of k) {
|
|
1177
1177
|
const ye = [...D, X.data];
|
|
1178
1178
|
if (X.id === R) return ye;
|
|
1179
|
-
const
|
|
1180
|
-
if (
|
|
1179
|
+
const we = se(X.children ?? [], R, ye);
|
|
1180
|
+
if (we) return we;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
function de(k, R) {
|
|
@@ -1212,11 +1212,11 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1212
1212
|
const D = O.value, X = F.signal;
|
|
1213
1213
|
try {
|
|
1214
1214
|
const ye = [];
|
|
1215
|
-
let
|
|
1216
|
-
for (;
|
|
1217
|
-
const Ae = await n.provider.list(k.id, { offset:
|
|
1215
|
+
let we = 0;
|
|
1216
|
+
for (; we !== void 0; ) {
|
|
1217
|
+
const Ae = await n.provider.list(k.id, { offset: we, sortBy: "name", sortDirection: "ASC" }, X);
|
|
1218
1218
|
if (X.aborted || D !== O.value) return;
|
|
1219
|
-
ye.push(...Ae.entries),
|
|
1219
|
+
ye.push(...Ae.entries), we = Ae.nextOffset;
|
|
1220
1220
|
}
|
|
1221
1221
|
return f.value.set(la(k.id), { entries: ye }), pe(ye);
|
|
1222
1222
|
} catch (ye) {
|
|
@@ -1226,11 +1226,11 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1226
1226
|
}
|
|
1227
1227
|
const $e = /* @__PURE__ */ new Map();
|
|
1228
1228
|
function le(k) {
|
|
1229
|
-
const { sortBy: R, direction: D } = ie(), X = la(k, R, D), ye = O.value,
|
|
1229
|
+
const { sortBy: R, direction: D } = ie(), X = la(k, R, D), ye = O.value, we = F.signal;
|
|
1230
1230
|
if (f.value.has(X) || $e.has(X)) return;
|
|
1231
|
-
const Ae = n.provider.list(k, { offset: 0, sortBy: R, sortDirection: D },
|
|
1231
|
+
const Ae = n.provider.list(k, { offset: 0, sortBy: R, sortDirection: D }, we);
|
|
1232
1232
|
$e.set(X, Ae), Ae.then((Qe) => {
|
|
1233
|
-
!
|
|
1233
|
+
!we.aborted && ye === O.value && !f.value.has(X) && f.value.set(X, { entries: Qe.entries, next: Qe.nextOffset });
|
|
1234
1234
|
}, () => {
|
|
1235
1235
|
}).finally(() => {
|
|
1236
1236
|
$e.get(X) === Ae && $e.delete(X);
|
|
@@ -1249,10 +1249,10 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1249
1249
|
be?.abort();
|
|
1250
1250
|
const D = new AbortController(), X = ++Se, ye = () => D.abort();
|
|
1251
1251
|
be = D, F.signal.addEventListener("abort", ye, { once: !0 });
|
|
1252
|
-
const
|
|
1252
|
+
const we = k.at(-1)?.path, { sortBy: Ae, direction: Qe } = ie(), ma = la(we ?? "", Ae, Qe), Ea = R ? P.value ?? 0 : 0, ya = R ? void 0 : f.value.get(ma);
|
|
1253
1253
|
A.value = void 0, S.value = k, v.value = void 0, R || (B(), c.value = !!ya, ya ? qe(k, ya) : (C.value = [], P.value = void 0)), m.value = !0;
|
|
1254
1254
|
try {
|
|
1255
|
-
const ba = await ((R ? void 0 : $e.get(ma)) ?? (
|
|
1255
|
+
const ba = await ((R ? void 0 : $e.get(ma)) ?? (we ? n.provider.list(we, { offset: Ea, sortBy: Ae, sortDirection: Qe }, D.signal) : n.provider.shares(Ea, D.signal)));
|
|
1256
1256
|
if (X !== Se || D.signal.aborted) return;
|
|
1257
1257
|
const ta = { entries: R ? [...C.value, ...ba.entries] : ba.entries, next: ba.nextOffset };
|
|
1258
1258
|
f.value.set(ma, ta), R ? (C.value = ta.entries, P.value = ta.next) : qe(k, ta), c.value = !1;
|
|
@@ -1262,9 +1262,9 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1262
1262
|
F.signal.removeEventListener("abort", ye), X === Se && (m.value = !1, be = void 0);
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
|
-
const
|
|
1266
|
-
function
|
|
1267
|
-
const R =
|
|
1265
|
+
const De = _(() => [{ id: "", display: r.value.roots }, ...S.value.map((k) => ({ id: k.path, display: k.name }))]);
|
|
1266
|
+
function Le(k) {
|
|
1267
|
+
const R = De.value.findIndex((D) => D.id === k.id);
|
|
1268
1268
|
R < S.value.length && U(S.value.slice(0, R));
|
|
1269
1269
|
}
|
|
1270
1270
|
function Me(k) {
|
|
@@ -1283,7 +1283,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1283
1283
|
function me() {
|
|
1284
1284
|
u.value || (f.value.clear(), $e.clear(), O.value++, F.abort(), F = new AbortController(), T.value = [], E.value = [], I.value = void 0, N.value = [[]], G.value = 0, Pe([]));
|
|
1285
1285
|
}
|
|
1286
|
-
return
|
|
1286
|
+
return _e(() => {
|
|
1287
1287
|
Pe([]);
|
|
1288
1288
|
}), ge(() => {
|
|
1289
1289
|
O.value++, F.abort();
|
|
@@ -1341,9 +1341,9 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1341
1341
|
"aria-label": r.value.location
|
|
1342
1342
|
}, [
|
|
1343
1343
|
p(e(Dt), {
|
|
1344
|
-
items:
|
|
1344
|
+
items: De.value,
|
|
1345
1345
|
"collapsed-label": r.value.fullPath,
|
|
1346
|
-
onClickItem:
|
|
1346
|
+
onClickItem: Le
|
|
1347
1347
|
}, null, 8, ["items", "collapsed-label"])
|
|
1348
1348
|
], 8, Gl)
|
|
1349
1349
|
]),
|
|
@@ -1370,7 +1370,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1370
1370
|
}, 8, ["disabled"])
|
|
1371
1371
|
])) : b("", !0),
|
|
1372
1372
|
W.value ? (l(), x("p", Wl, o(r.value.uploaded), 1)) : b("", !0),
|
|
1373
|
-
t.transfers && t.provider.download &&
|
|
1373
|
+
t.transfers && t.provider.download && w.value && !w.value.isDir && !e(v) ? (l(), g(e(L), {
|
|
1374
1374
|
key: 2,
|
|
1375
1375
|
variant: "secondary",
|
|
1376
1376
|
disabled: e(u),
|
|
@@ -1455,7 +1455,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1455
1455
|
])
|
|
1456
1456
|
]),
|
|
1457
1457
|
"cell-bytes": s(({ row: D }) => [
|
|
1458
|
-
$("span", tn, o(D.isDir || D.bytes === void 0 ? "—" : e(
|
|
1458
|
+
$("span", tn, o(D.isDir || D.bytes === void 0 ? "—" : e(wa)(D.bytes, e(Oa)(t.locale))), 1)
|
|
1459
1459
|
]),
|
|
1460
1460
|
_: 1
|
|
1461
1461
|
}, 8, ["columns", "rows", "loading", "sort", "labels", "selected-keys"])),
|
|
@@ -1472,7 +1472,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1472
1472
|
}, 8, ["disabled"])) : b("", !0)
|
|
1473
1473
|
])
|
|
1474
1474
|
]),
|
|
1475
|
-
|
|
1475
|
+
w.value && !e(v) && !t.fill ? (l(), x("p", ln, o(e(Ge)(r.value.selected, { name: w.value.path })), 1)) : b("", !0)
|
|
1476
1476
|
], 10, Kl));
|
|
1477
1477
|
}
|
|
1478
1478
|
}), it = /* @__PURE__ */ ve(nn, [["__scopeId", "data-v-ed3b642c"]]), sn = { class: "nas-picker-body" }, on = ["aria-busy", "inert"], un = { class: "nas-picker-status" }, rn = ["title"], dn = /* @__PURE__ */ re({
|
|
@@ -1490,7 +1490,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1490
1490
|
},
|
|
1491
1491
|
emits: ["update:open", "selected", "authorized", "refused"],
|
|
1492
1492
|
setup(t, { emit: d }) {
|
|
1493
|
-
const n = t, a = d, r = y(), i =
|
|
1493
|
+
const n = t, a = d, r = y(), i = _(() => Ne(n.locale)), u = _(() => Ca(n.locale)), v = y(!1), m = y(), c = `nas-picker-consent-${_t()}`;
|
|
1494
1494
|
let f = 0, C = !1;
|
|
1495
1495
|
Xe(() => n.open, () => {
|
|
1496
1496
|
f++, r.value = void 0, m.value = void 0;
|
|
@@ -1501,17 +1501,17 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1501
1501
|
v.value || (r.value = void 0, a("update:open", !1));
|
|
1502
1502
|
}
|
|
1503
1503
|
async function S() {
|
|
1504
|
-
const
|
|
1505
|
-
if (!(!
|
|
1504
|
+
const w = r.value, A = n.destination, P = f;
|
|
1505
|
+
if (!(!w || v.value || !n.open || C || A && n.mode !== "folder")) {
|
|
1506
1506
|
if (!A) {
|
|
1507
|
-
a("selected",
|
|
1507
|
+
a("selected", w), T();
|
|
1508
1508
|
return;
|
|
1509
1509
|
}
|
|
1510
1510
|
v.value = !0, m.value = void 0;
|
|
1511
1511
|
try {
|
|
1512
|
-
const E = await A.selectDestination({ key: A.key, path:
|
|
1512
|
+
const E = await A.selectDestination({ key: A.key, path: w });
|
|
1513
1513
|
if (C || P !== f) return;
|
|
1514
|
-
if (!E || typeof E.id != "string" || !E.id || typeof E.username != "string" || !E.username || E.path !==
|
|
1514
|
+
if (!E || typeof E.id != "string" || !E.id || typeof E.username != "string" || !E.username || E.path !== w || E.key !== A.key || E.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
|
|
1515
1515
|
a("authorized", E), v.value = !1, T();
|
|
1516
1516
|
} catch (E) {
|
|
1517
1517
|
if (C || P !== f) return;
|
|
@@ -1525,7 +1525,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
|
-
return (
|
|
1528
|
+
return (w, A) => (l(), g(e(Oe), {
|
|
1529
1529
|
open: t.open,
|
|
1530
1530
|
title: t.title ?? (t.mode === "folder" ? i.value.choose : i.value.chooseFile),
|
|
1531
1531
|
description: t.description,
|
|
@@ -1644,13 +1644,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
return Ye(() => a.value, T),
|
|
1647
|
+
return Ye(() => a.value, T), _e(() => {
|
|
1648
1648
|
C = d.ctx.reopen(() => {
|
|
1649
1649
|
T();
|
|
1650
1650
|
}), T();
|
|
1651
1651
|
}), ge(() => {
|
|
1652
1652
|
f = !0, C?.(), c.dispose();
|
|
1653
|
-
}), (S,
|
|
1653
|
+
}), (S, w) => (l(), x(ae, null, [
|
|
1654
1654
|
a.value ? (l(), g(e(ee), {
|
|
1655
1655
|
key: 0,
|
|
1656
1656
|
tone: "info",
|
|
@@ -1666,13 +1666,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1666
1666
|
tone: "danger"
|
|
1667
1667
|
}, {
|
|
1668
1668
|
default: s(() => [
|
|
1669
|
-
$("span", cn, o(e(qa)(n.value, e(
|
|
1669
|
+
$("span", cn, o(e(qa)(n.value, e(Ne)(t.ctx.locale), t.ctx.locale, t.ctx.displayName)), 1),
|
|
1670
1670
|
p(e(L), {
|
|
1671
1671
|
variant: "secondary",
|
|
1672
1672
|
onClick: T
|
|
1673
1673
|
}, {
|
|
1674
1674
|
default: s(() => [
|
|
1675
|
-
h(o(e(
|
|
1675
|
+
h(o(e(Ne)(t.ctx.locale).refresh), 1)
|
|
1676
1676
|
]),
|
|
1677
1677
|
_: 1
|
|
1678
1678
|
})
|
|
@@ -1681,31 +1681,30 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1681
1681
|
})) : b("", !0),
|
|
1682
1682
|
r.value ? (l(), g(e(ke), {
|
|
1683
1683
|
key: 2,
|
|
1684
|
-
title: e(
|
|
1685
|
-
description: e(Ie)(t.ctx.locale).ownPermissions,
|
|
1684
|
+
title: e(Ne)(t.ctx.locale).title,
|
|
1686
1685
|
collapsible: !1
|
|
1687
1686
|
}, {
|
|
1688
1687
|
default: s(() => [
|
|
1689
1688
|
$("div", vn, [
|
|
1690
1689
|
p(e(L), {
|
|
1691
1690
|
variant: "secondary",
|
|
1692
|
-
onClick:
|
|
1691
|
+
onClick: w[0] || (w[0] = (A) => {
|
|
1693
1692
|
i.value = "folder", u.value = !0;
|
|
1694
1693
|
})
|
|
1695
1694
|
}, {
|
|
1696
1695
|
default: s(() => [
|
|
1697
|
-
h(o(e(
|
|
1696
|
+
h(o(e(Ne)(t.ctx.locale).choose), 1)
|
|
1698
1697
|
]),
|
|
1699
1698
|
_: 1
|
|
1700
1699
|
}),
|
|
1701
1700
|
p(e(L), {
|
|
1702
1701
|
variant: "secondary",
|
|
1703
|
-
onClick:
|
|
1702
|
+
onClick: w[1] || (w[1] = (A) => {
|
|
1704
1703
|
i.value = "file", u.value = !0;
|
|
1705
1704
|
})
|
|
1706
1705
|
}, {
|
|
1707
1706
|
default: s(() => [
|
|
1708
|
-
h(o(e(
|
|
1707
|
+
h(o(e(Ne)(t.ctx.locale).chooseFile), 1)
|
|
1709
1708
|
]),
|
|
1710
1709
|
_: 1
|
|
1711
1710
|
})
|
|
@@ -1726,15 +1725,15 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1726
1725
|
name: t.ctx.displayName,
|
|
1727
1726
|
mode: i.value,
|
|
1728
1727
|
open: u.value,
|
|
1729
|
-
"onUpdate:open":
|
|
1730
|
-
onSelected:
|
|
1728
|
+
"onUpdate:open": w[2] || (w[2] = (A) => u.value = A),
|
|
1729
|
+
onSelected: w[3] || (w[3] = (A) => v.value = A)
|
|
1731
1730
|
}, null, 8, ["provider", "locale", "name", "mode", "open"])
|
|
1732
1731
|
]),
|
|
1733
1732
|
_: 1
|
|
1734
|
-
}, 8, ["title"
|
|
1733
|
+
}, 8, ["title"])) : b("", !0)
|
|
1735
1734
|
], 64));
|
|
1736
1735
|
}
|
|
1737
|
-
}), js = /* @__PURE__ */ ve(pn, [["__scopeId", "data-v-
|
|
1736
|
+
}), js = /* @__PURE__ */ ve(pn, [["__scopeId", "data-v-93a61d74"]]), mn = { role: "status" }, yn = { role: "alert" }, ha = /* @__PURE__ */ new WeakMap(), eo = /* @__PURE__ */ re({
|
|
1738
1737
|
__name: "PortalSettings",
|
|
1739
1738
|
props: {
|
|
1740
1739
|
portal: {}
|
|
@@ -1750,8 +1749,8 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1750
1749
|
} catch {
|
|
1751
1750
|
}
|
|
1752
1751
|
}
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1752
|
+
const w = d.portal.lastStatus?.();
|
|
1753
|
+
w && S(w);
|
|
1755
1754
|
const A = 5e3, P = /* @__PURE__ */ Symbol("late");
|
|
1756
1755
|
async function E(V) {
|
|
1757
1756
|
if (u.value) return;
|
|
@@ -1775,7 +1774,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1775
1774
|
T || (u.value = !1);
|
|
1776
1775
|
}
|
|
1777
1776
|
}
|
|
1778
|
-
const I =
|
|
1777
|
+
const I = _(() => !!r.value?.canManage && !!r.value.entry && r.value.entry !== "registered"), Q = _(() => {
|
|
1779
1778
|
const V = r.value;
|
|
1780
1779
|
if (V) {
|
|
1781
1780
|
if (I.value) return V.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
|
|
@@ -1807,7 +1806,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1807
1806
|
}
|
|
1808
1807
|
}
|
|
1809
1808
|
}
|
|
1810
|
-
return
|
|
1809
|
+
return _e(() => {
|
|
1811
1810
|
n.subscribe?.(W), W();
|
|
1812
1811
|
}), ge(() => {
|
|
1813
1812
|
T = !0;
|
|
@@ -1824,7 +1823,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1824
1823
|
]),
|
|
1825
1824
|
_: 1
|
|
1826
1825
|
}),
|
|
1827
|
-
p(e(
|
|
1826
|
+
p(e(_a), {
|
|
1828
1827
|
href: "/",
|
|
1829
1828
|
external: ""
|
|
1830
1829
|
}, {
|
|
@@ -1849,7 +1848,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1849
1848
|
label: e(O)
|
|
1850
1849
|
}, {
|
|
1851
1850
|
default: s(() => [
|
|
1852
|
-
p(e(
|
|
1851
|
+
p(e(_a), {
|
|
1853
1852
|
href: r.value.url,
|
|
1854
1853
|
external: ""
|
|
1855
1854
|
}, {
|
|
@@ -1870,7 +1869,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
1870
1869
|
label: e(a).alias
|
|
1871
1870
|
}, {
|
|
1872
1871
|
default: s(() => [
|
|
1873
|
-
p(e(
|
|
1872
|
+
p(e(Ie), {
|
|
1874
1873
|
id: "portal-alias",
|
|
1875
1874
|
modelValue: i.value,
|
|
1876
1875
|
"onUpdate:modelValue": z[0] || (z[0] = (M) => i.value = M),
|
|
@@ -2043,7 +2042,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2043
2042
|
}, 8, ["open", "title", "description", "close-label"])
|
|
2044
2043
|
], 64));
|
|
2045
2044
|
}
|
|
2046
|
-
}), bn = { class: "sf-state" }, gn = { class: "sf-notices" }, hn = { role: "status" }, kn = { role: "alert" },
|
|
2045
|
+
}), bn = { class: "sf-state" }, gn = { class: "sf-notices" }, hn = { role: "status" }, kn = { role: "alert" }, _n = /* @__PURE__ */ re({
|
|
2047
2046
|
__name: "SharedFolderSettings",
|
|
2048
2047
|
props: {
|
|
2049
2048
|
shared: {},
|
|
@@ -2052,13 +2051,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2052
2051
|
setup(t) {
|
|
2053
2052
|
const d = t, n = d.shared.messages, a = y(), r = y(!1), i = y(""), u = y("");
|
|
2054
2053
|
let v = !1;
|
|
2055
|
-
const m = { ready: "success", pending: "warning", missing: "danger", ambiguous: "danger" }, c = (I) => ({ account: a.value?.account ?? "", folder: I.name, access: n[I.required] ?? I.required }), f = (I, Q) => Ge(I, Q, d.locale), C =
|
|
2056
|
-
function
|
|
2054
|
+
const m = { ready: "success", pending: "warning", missing: "danger", ambiguous: "danger" }, c = (I) => ({ account: a.value?.account ?? "", folder: I.name, access: n[I.required] ?? I.required }), f = (I, Q) => Ge(I, Q, d.locale), C = _(() => a.value?.folders.filter((I) => I.state !== "ready") ?? []), T = $a(d.locale ?? "en"), S = _(() => d.shared.canGrant());
|
|
2055
|
+
function w(I) {
|
|
2057
2056
|
v || (a.value = I, r.value = !1);
|
|
2058
2057
|
}
|
|
2059
2058
|
async function A() {
|
|
2060
2059
|
try {
|
|
2061
|
-
|
|
2060
|
+
w(await d.shared.status());
|
|
2062
2061
|
} catch {
|
|
2063
2062
|
!v && !a.value && (r.value = !0);
|
|
2064
2063
|
}
|
|
@@ -2067,7 +2066,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2067
2066
|
if (!i.value) {
|
|
2068
2067
|
i.value = I.key, u.value = "";
|
|
2069
2068
|
try {
|
|
2070
|
-
|
|
2069
|
+
w(await d.shared.grant(I.key));
|
|
2071
2070
|
} catch (Q) {
|
|
2072
2071
|
v || (u.value = n[Q?.code || ""] || n.shared_folder_unavailable);
|
|
2073
2072
|
} finally {
|
|
@@ -2076,7 +2075,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2076
2075
|
}
|
|
2077
2076
|
}
|
|
2078
2077
|
const E = d.shared.lastStatus?.();
|
|
2079
|
-
return E && (a.value = E),
|
|
2078
|
+
return E && (a.value = E), _e(A), ge(() => {
|
|
2080
2079
|
v = !0;
|
|
2081
2080
|
}), (I, Q) => !a.value && !r.value ? (l(), g(e(ke), {
|
|
2082
2081
|
key: 0,
|
|
@@ -2189,7 +2188,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2189
2188
|
} : void 0
|
|
2190
2189
|
]), 1032, ["title", "aria-busy"])) : b("", !0);
|
|
2191
2190
|
}
|
|
2192
|
-
}), ao = /* @__PURE__ */ ve(
|
|
2191
|
+
}), ao = /* @__PURE__ */ ve(_n, [["__scopeId", "data-v-3cf3ef1b"]]), wn = { class: "shared-folder-permission-issues" }, xn = {
|
|
2193
2192
|
key: 0,
|
|
2194
2193
|
role: "alert"
|
|
2195
2194
|
}, Cn = /* @__PURE__ */ re({
|
|
@@ -2198,9 +2197,9 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2198
2197
|
permission: {}
|
|
2199
2198
|
},
|
|
2200
2199
|
setup(t) {
|
|
2201
|
-
const d = t, n = y(!1), a =
|
|
2200
|
+
const d = t, n = y(!1), a = wt([]), r = y(!1), i = y(!1);
|
|
2202
2201
|
let u = !1, v;
|
|
2203
|
-
|
|
2202
|
+
_e(() => {
|
|
2204
2203
|
v = d.permission.subscribe((c) => {
|
|
2205
2204
|
a.value = c, n.value = c.length > 0;
|
|
2206
2205
|
}), d.permission.check().catch(() => {
|
|
@@ -2259,7 +2258,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2259
2258
|
}, 8, ["disabled"])
|
|
2260
2259
|
]),
|
|
2261
2260
|
default: s(() => [
|
|
2262
|
-
$("ul",
|
|
2261
|
+
$("ul", wn, [
|
|
2263
2262
|
(l(!0), x(ae, null, fe(a.value, (C) => (l(), x("li", {
|
|
2264
2263
|
key: JSON.stringify([C.account, C.share, C.required])
|
|
2265
2264
|
}, o(t.permission.message(C)), 1))), 128))
|
|
@@ -2279,7 +2278,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2279
2278
|
locale: {}
|
|
2280
2279
|
},
|
|
2281
2280
|
setup(t) {
|
|
2282
|
-
const d = t, n =
|
|
2281
|
+
const d = t, n = _(() => Ka(d.locale)), a = y(""), r = y(""), i = y(""), u = y(!1), v = y(!1), m = y(""), c = y(), f = _(() => window.location.protocol === "https:");
|
|
2283
2282
|
let C = !1;
|
|
2284
2283
|
function T(P) {
|
|
2285
2284
|
const E = P?.code;
|
|
@@ -2298,7 +2297,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2298
2297
|
}
|
|
2299
2298
|
}
|
|
2300
2299
|
}
|
|
2301
|
-
async function
|
|
2300
|
+
async function w() {
|
|
2302
2301
|
if (!v.value) {
|
|
2303
2302
|
v.value = !0, m.value = "";
|
|
2304
2303
|
try {
|
|
@@ -2363,7 +2362,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2363
2362
|
label: n.value.account
|
|
2364
2363
|
}, {
|
|
2365
2364
|
default: s(() => [
|
|
2366
|
-
p(e(
|
|
2365
|
+
p(e(Ie), {
|
|
2367
2366
|
modelValue: a.value,
|
|
2368
2367
|
"onUpdate:modelValue": E[0] || (E[0] = (I) => a.value = I),
|
|
2369
2368
|
autocomplete: "username",
|
|
@@ -2382,7 +2381,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2382
2381
|
label: n.value.otp
|
|
2383
2382
|
}, {
|
|
2384
2383
|
default: s(() => [
|
|
2385
|
-
p(e(
|
|
2384
|
+
p(e(Ie), {
|
|
2386
2385
|
modelValue: i.value,
|
|
2387
2386
|
"onUpdate:modelValue": E[2] || (E[2] = (I) => i.value = I),
|
|
2388
2387
|
inputmode: "numeric",
|
|
@@ -2398,7 +2397,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2398
2397
|
label: n.value.password
|
|
2399
2398
|
}, {
|
|
2400
2399
|
default: s(() => [
|
|
2401
|
-
p(e(
|
|
2400
|
+
p(e(Ie), {
|
|
2402
2401
|
modelValue: r.value,
|
|
2403
2402
|
"onUpdate:modelValue": E[1] || (E[1] = (I) => r.value = I),
|
|
2404
2403
|
type: "password",
|
|
@@ -2434,7 +2433,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2434
2433
|
key: 1,
|
|
2435
2434
|
variant: "secondary",
|
|
2436
2435
|
disabled: v.value || !f.value,
|
|
2437
|
-
onClick:
|
|
2436
|
+
onClick: w
|
|
2438
2437
|
}, {
|
|
2439
2438
|
default: s(() => [
|
|
2440
2439
|
h(o(n.value.continueDSM), 1)
|
|
@@ -2490,7 +2489,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2490
2489
|
ctx: {}
|
|
2491
2490
|
},
|
|
2492
2491
|
setup(t, { expose: d }) {
|
|
2493
|
-
const n = t, a =
|
|
2492
|
+
const n = t, a = _(() => dt(n.ctx.locale)), r = (N, G) => Ge(N, G, n.ctx.locale), i = y(), u = y([]), v = y(), m = y(!1), c = y(!1), f = y([]), C = y(), T = y(!1), S = y("3600"), w = y(), A = y(), P = y(), E = y(!1), I = y(), Q = _(() => !i.value && !v.value && !m.value && !I.value), O = y(!1), H = y(), W = y(""), F = y(""), K = ct(n.ctx);
|
|
2494
2493
|
let V, z = !1;
|
|
2495
2494
|
const M = (N) => !["queued", "running"].includes(N.state), ne = (N) => M(N) && N.state !== "paused", B = (N) => N.state === "running" && N.pauseRequested, te = (N) => B(N) ? a.value.pausing : a.value[`state_${N.state}`], q = (N) => B(N) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[N.state];
|
|
2496
2495
|
async function Z(N, G, U = !1) {
|
|
@@ -2498,7 +2497,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2498
2497
|
return await n.ctx.call(N, G);
|
|
2499
2498
|
} catch (ce) {
|
|
2500
2499
|
if (z || U && (I.value = Ee(ce))) return;
|
|
2501
|
-
ce?.code === "unsupported" ? (m.value = !0, u.value = [], f.value = [], C.value = void 0,
|
|
2500
|
+
ce?.code === "unsupported" ? (m.value = !0, u.value = [], f.value = [], C.value = void 0, w.value = void 0, A.value = void 0, i.value = void 0, P.value = void 0, H.value = void 0, W.value && URL.revokeObjectURL(W.value), W.value = "") : z || (v.value = ce);
|
|
2502
2501
|
return;
|
|
2503
2502
|
}
|
|
2504
2503
|
}
|
|
@@ -2540,24 +2539,24 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2540
2539
|
const Y = () => J(async () => {
|
|
2541
2540
|
if (!P.value) return;
|
|
2542
2541
|
await Z("bg.jobs.purge", { owner: P.value }) && (P.value = void 0);
|
|
2543
|
-
}), j =
|
|
2542
|
+
}), j = _(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), pe = (N) => {
|
|
2544
2543
|
C.value = N, T.value = !1, S.value = "3600";
|
|
2545
2544
|
}, Ce = () => J(async () => {
|
|
2546
2545
|
if (!C.value || !T.value) return;
|
|
2547
2546
|
await Z("bg.schedules.create", { key: ka(), jobId: C.value.id, intervalSeconds: Number(S.value), consent: !0 }) && (C.value = void 0);
|
|
2548
2547
|
}), $e = (N) => J(() => Z("bg.schedules.disable", { id: N })), le = () => J(async () => {
|
|
2549
|
-
if (!
|
|
2550
|
-
await Z("bg.schedules.delete", { id:
|
|
2548
|
+
if (!w.value) return;
|
|
2549
|
+
await Z("bg.schedules.delete", { id: w.value.id }) && (w.value = void 0);
|
|
2551
2550
|
}), ie = () => J(async () => {
|
|
2552
2551
|
if (!A.value) return;
|
|
2553
2552
|
await Z("bg.schedules.enable", { id: A.value.id, consent: !0 }) && (A.value = void 0);
|
|
2554
2553
|
}), oe = (N) => {
|
|
2555
2554
|
const G = new Date(N);
|
|
2556
2555
|
return Number.isFinite(G.getTime()) ? G.toLocaleString() : a.value.unknownTime;
|
|
2557
|
-
}, be = (N) => N.copyRetained && N.state === "succeeded" && !N.scheduleId && N.submitter?.user === i.value?.owner?.user && N.submitter?.uid === i.value?.owner?.uid, Se = (N) => J(() => Z("bg.jobs.cancel", { id: N })), qe = (N) => J(() => Z("bg.jobs.pause", { id: N })), Pe = (N) => J(() => Z("bg.jobs.resume", { id: N })),
|
|
2556
|
+
}, be = (N) => N.copyRetained && N.state === "succeeded" && !N.scheduleId && N.submitter?.user === i.value?.owner?.user && N.submitter?.uid === i.value?.owner?.uid, Se = (N) => J(() => Z("bg.jobs.cancel", { id: N })), qe = (N) => J(() => Z("bg.jobs.pause", { id: N })), Pe = (N) => J(() => Z("bg.jobs.resume", { id: N })), De = (N) => {
|
|
2558
2557
|
const G = N.lastIndexOf("/");
|
|
2559
2558
|
H.value = { folder: N.slice(0, G), relative: N.slice(G + 1) };
|
|
2560
|
-
},
|
|
2559
|
+
}, Le = () => J(async () => {
|
|
2561
2560
|
if (!H.value) return;
|
|
2562
2561
|
await Z("bg.jobs.submit", { key: ka(), ...H.value }) && (H.value = void 0);
|
|
2563
2562
|
});
|
|
@@ -2565,7 +2564,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2565
2564
|
const G = await Z("bg.jobs.result", { id: N.id });
|
|
2566
2565
|
!G || z || (W.value && URL.revokeObjectURL(W.value), W.value = URL.createObjectURL(new Blob([JSON.stringify(G.result, null, 2)], { type: "application/json" })), F.value = `${N.name || N.id}.sha256.json`);
|
|
2567
2566
|
}
|
|
2568
|
-
return Ye(() => I.value, se), d({ refresh: se }),
|
|
2567
|
+
return Ye(() => I.value, se), d({ refresh: se }), _e(() => {
|
|
2569
2568
|
se().then(() => {
|
|
2570
2569
|
(f.value.some((N) => N.enabled) || u.value.some((N) => !M(N))) && de();
|
|
2571
2570
|
});
|
|
@@ -2658,7 +2657,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2658
2657
|
p(e(L), {
|
|
2659
2658
|
variant: "primary",
|
|
2660
2659
|
disabled: c.value || !H.value,
|
|
2661
|
-
onClick:
|
|
2660
|
+
onClick: Le
|
|
2662
2661
|
}, {
|
|
2663
2662
|
default: s(() => [
|
|
2664
2663
|
h(o(a.value.submit), 1)
|
|
@@ -2681,7 +2680,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2681
2680
|
mode: "file",
|
|
2682
2681
|
title: a.value.pickerTitle,
|
|
2683
2682
|
description: a.value.pickerConsent,
|
|
2684
|
-
onSelected:
|
|
2683
|
+
onSelected: De
|
|
2685
2684
|
}, null, 8, ["open", "locale", "name", "provider", "title", "description"]),
|
|
2686
2685
|
P.value && i.value.admin ? (l(), g(e(ee), {
|
|
2687
2686
|
key: 1,
|
|
@@ -2736,7 +2735,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2736
2735
|
default: s(() => [
|
|
2737
2736
|
$("div", On, [
|
|
2738
2737
|
U.progress?.total ? (l(), x("span", qn, o(r(a.value.progressItems, { done: U.progress.done, count: U.progress.total })), 1)) : b("", !0),
|
|
2739
|
-
U.progress?.totalBytes ? (l(), x("span", Mn, o(r(a.value.progressBytes, { done: e(
|
|
2738
|
+
U.progress?.totalBytes ? (l(), x("span", Mn, o(r(a.value.progressBytes, { done: e(wa)(U.progress.bytes, t.ctx.locale), total: e(wa)(U.progress.totalBytes, t.ctx.locale) })), 1)) : b("", !0),
|
|
2740
2739
|
U.progress?.item ? (l(), x("span", Kn, [
|
|
2741
2740
|
h(o(r(a.value.progressItem, { item: "" }).trim()) + " ", 1),
|
|
2742
2741
|
p(e(Be), {
|
|
@@ -2948,7 +2947,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2948
2947
|
p(e(L), {
|
|
2949
2948
|
variant: "secondary",
|
|
2950
2949
|
disabled: c.value,
|
|
2951
|
-
onClick: (ce) =>
|
|
2950
|
+
onClick: (ce) => w.value = U
|
|
2952
2951
|
}, {
|
|
2953
2952
|
default: s(() => [
|
|
2954
2953
|
h(o(a.value.deleteSchedule), 1)
|
|
@@ -2961,12 +2960,12 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2961
2960
|
_: 2
|
|
2962
2961
|
}, 1032, ["title", "data-schedule-id"]))), 128))
|
|
2963
2962
|
])) : (l(), x("p", Wn, o(a.value.noSchedules), 1)),
|
|
2964
|
-
|
|
2963
|
+
w.value ? (l(), g(e(ee), {
|
|
2965
2964
|
key: 3,
|
|
2966
2965
|
tone: "warning"
|
|
2967
2966
|
}, {
|
|
2968
2967
|
default: s(() => [
|
|
2969
|
-
$("p", null, o(r(a.value.deleteScheduleConsent, { name:
|
|
2968
|
+
$("p", null, o(r(a.value.deleteScheduleConsent, { name: w.value.name })), 1),
|
|
2970
2969
|
$("div", as, [
|
|
2971
2970
|
p(e(L), {
|
|
2972
2971
|
variant: "danger",
|
|
@@ -2981,7 +2980,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
2981
2980
|
p(e(L), {
|
|
2982
2981
|
variant: "secondary",
|
|
2983
2982
|
disabled: c.value,
|
|
2984
|
-
onClick: G[6] || (G[6] = (U) =>
|
|
2983
|
+
onClick: G[6] || (G[6] = (U) => w.value = void 0)
|
|
2985
2984
|
}, {
|
|
2986
2985
|
default: s(() => [
|
|
2987
2986
|
h(o(a.value.cancel), 1)
|
|
@@ -3026,7 +3025,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3026
3025
|
]),
|
|
3027
3026
|
_: 1
|
|
3028
3027
|
}, 8, ["title", "description"]),
|
|
3029
|
-
W.value ? (l(), g(e(
|
|
3028
|
+
W.value ? (l(), g(e(_a), {
|
|
3030
3029
|
key: 4,
|
|
3031
3030
|
href: W.value,
|
|
3032
3031
|
download: F.value
|
|
@@ -3058,40 +3057,40 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3058
3057
|
preload: { type: Boolean }
|
|
3059
3058
|
},
|
|
3060
3059
|
setup(t) {
|
|
3061
|
-
const d = t, n = ze(aa, void 0), a =
|
|
3062
|
-
const
|
|
3063
|
-
return (
|
|
3060
|
+
const d = t, n = ze(aa, void 0), a = _(() => n?.call ? { webApi: d.ctx?.webApi, call: (w, A) => n.call(w, A) } : d.ctx?.call ? d.ctx : void 0), r = _(() => Ue(d.locale)), i = y("checking"), u = y(), v = _(() => {
|
|
3061
|
+
const w = d.ctx;
|
|
3062
|
+
return (w?.fullPage ?? (w?.host ? Fa({ host: w.host }) : !1)) && w?.displayName ? w : void 0;
|
|
3064
3063
|
});
|
|
3065
|
-
function m(
|
|
3066
|
-
u.value =
|
|
3064
|
+
function m(w) {
|
|
3065
|
+
u.value = w, i.value = w.state;
|
|
3067
3066
|
}
|
|
3068
3067
|
let c = !1, f;
|
|
3069
3068
|
async function C() {
|
|
3070
3069
|
try {
|
|
3071
|
-
const
|
|
3072
|
-
c || m(
|
|
3070
|
+
const w = await n.status();
|
|
3071
|
+
c || m(w);
|
|
3073
3072
|
} catch {
|
|
3074
3073
|
c || (u.value = void 0, i.value = "blocked");
|
|
3075
3074
|
}
|
|
3076
3075
|
}
|
|
3077
|
-
const T =
|
|
3078
|
-
return He(ja,
|
|
3079
|
-
n && (n.subscribe?.((
|
|
3080
|
-
!c && !ra(
|
|
3076
|
+
const T = _(() => Ee(u.value)), S = _(() => !!d.preload && !!n && (i.value === "ready" || i.value === "checking"));
|
|
3077
|
+
return He(ja, _(() => S.value && i.value === "checking")), Ye(() => T.value, C), _e(() => {
|
|
3078
|
+
n && (n.subscribe?.((w) => {
|
|
3079
|
+
!c && !ra(w) && m(w);
|
|
3081
3080
|
}), f = d.ctx?.reopen(() => {
|
|
3082
3081
|
C();
|
|
3083
3082
|
}), C());
|
|
3084
3083
|
}), ge(() => {
|
|
3085
3084
|
c = !0, f?.();
|
|
3086
|
-
}), (
|
|
3085
|
+
}), (w, A) => (l(), x(ae, null, [
|
|
3087
3086
|
S.value ? (l(), x("div", {
|
|
3088
3087
|
key: 0,
|
|
3089
3088
|
class: Re(["executor-pages", { "executor-preloading": i.value === "checking" }]),
|
|
3090
3089
|
inert: i.value === "checking" || void 0,
|
|
3091
3090
|
"aria-hidden": i.value === "checking" ? "true" : void 0
|
|
3092
3091
|
}, [
|
|
3093
|
-
he(
|
|
3094
|
-
], 10, ns)) : !e(n) || i.value === "ready" ? he(
|
|
3092
|
+
he(w.$slots, "default", {}, void 0, !0)
|
|
3093
|
+
], 10, ns)) : !e(n) || i.value === "ready" ? he(w.$slots, "default", {}, void 0, !0, 1) : b("", !0),
|
|
3095
3094
|
e(n) && i.value === "checking" ? (l(), g(e(Qa), {
|
|
3096
3095
|
key: 2,
|
|
3097
3096
|
text: r.value.loading
|
|
@@ -3169,13 +3168,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3169
3168
|
ctx: {}
|
|
3170
3169
|
},
|
|
3171
3170
|
setup(t, { expose: d }) {
|
|
3172
|
-
const n = t, a =
|
|
3171
|
+
const n = t, a = _(() => Ue(n.ctx.locale)), r = _(() => $a(n.ctx.locale)), i = Ma(n.ctx), u = y(), v = y([]), m = y([]), c = y(!1), f = y(), C = y(""), T = y(!1), S = y(""), w = y(""), A = y("");
|
|
3173
3172
|
let P = !1, E, I;
|
|
3174
3173
|
const Q = y();
|
|
3175
|
-
Xe([
|
|
3174
|
+
Xe([w, S, A], () => {
|
|
3176
3175
|
I = void 0;
|
|
3177
3176
|
}, { flush: "sync" });
|
|
3178
|
-
const O = (J) => ["queued", "running", "waiting_executor"].includes(J.state), H = { waiting_executor: "info", queued: "info", running: "info", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }, W =
|
|
3177
|
+
const O = (J) => ["queued", "running", "waiting_executor"].includes(J.state), H = { waiting_executor: "info", queued: "info", running: "info", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }, W = _(() => m.value.some((J) => J.state === "waiting_executor")), F = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], K = _(() => W.value && F.includes(f.value?.code ?? "")), V = _(() => !u.value && !f.value && !Q.value), z = _(() => u.value && u.value.state !== "ready" && !(W.value && u.value.state === "needs-admin-approval" && F.includes(u.value.reason ?? "")));
|
|
3179
3178
|
async function M() {
|
|
3180
3179
|
if (P) return;
|
|
3181
3180
|
const [J, Y, j] = await Promise.allSettled([n.ctx.call("delegate.status"), n.ctx.call("delegate.list"), n.ctx.call("delegate.jobs.list")]);
|
|
@@ -3203,13 +3202,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3203
3202
|
}), q = (J) => ne(async () => {
|
|
3204
3203
|
const Y = await n.ctx.call("delegate.jobs.cancel", { id: J });
|
|
3205
3204
|
P || (C.value = Y.revocation_pending ? a.value.pending : ""), await M();
|
|
3206
|
-
}), Z =
|
|
3207
|
-
Z.value && (await n.ctx.call("delegate.jobs.submit", { key: I ?? (I = ka()), url:
|
|
3205
|
+
}), Z = _(() => u.value?.state === "ready" && !!S.value && !!w.value && !!A.value), se = () => ne(async () => {
|
|
3206
|
+
Z.value && (await n.ctx.call("delegate.jobs.submit", { key: I ?? (I = ka()), url: w.value, dest: S.value, name: A.value }), P || (w.value = "", A.value = "", S.value = ""), await M());
|
|
3208
3207
|
}), de = (J) => {
|
|
3209
3208
|
const Y = new Date(J);
|
|
3210
3209
|
return Number.isNaN(Y.getTime()) ? "—" : Y.toLocaleString(n.ctx.locale);
|
|
3211
3210
|
};
|
|
3212
|
-
return d({ refresh: B }),
|
|
3211
|
+
return d({ refresh: B }), _e(() => {
|
|
3213
3212
|
B(), E = setInterval(() => {
|
|
3214
3213
|
m.value.some(O) && B();
|
|
3215
3214
|
}, 3e3);
|
|
@@ -3255,10 +3254,10 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3255
3254
|
"label-for": "delegate-url"
|
|
3256
3255
|
}, {
|
|
3257
3256
|
default: s(() => [
|
|
3258
|
-
p(e(
|
|
3257
|
+
p(e(Ie), {
|
|
3259
3258
|
id: "delegate-url",
|
|
3260
|
-
modelValue:
|
|
3261
|
-
"onUpdate:modelValue": Y[0] || (Y[0] = (j) =>
|
|
3259
|
+
modelValue: w.value,
|
|
3260
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (j) => w.value = j),
|
|
3262
3261
|
type: "url",
|
|
3263
3262
|
disabled: c.value || u.value?.state !== "ready"
|
|
3264
3263
|
}, null, 8, ["modelValue", "disabled"])
|
|
@@ -3270,7 +3269,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3270
3269
|
"label-for": "delegate-name"
|
|
3271
3270
|
}, {
|
|
3272
3271
|
default: s(() => [
|
|
3273
|
-
p(e(
|
|
3272
|
+
p(e(Ie), {
|
|
3274
3273
|
id: "delegate-name",
|
|
3275
3274
|
modelValue: A.value,
|
|
3276
3275
|
"onUpdate:modelValue": Y[1] || (Y[1] = (j) => A.value = j),
|
|
@@ -3420,7 +3419,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3420
3419
|
_: 1
|
|
3421
3420
|
}, 8, ["title", "description", "aria-busy"]));
|
|
3422
3421
|
}
|
|
3423
|
-
}), oo = /* @__PURE__ */ ve(gs, [["__scopeId", "data-v-4f648674"]]), hs = { class: "save-alert" }, ks = { "data-save-error": "" },
|
|
3422
|
+
}), oo = /* @__PURE__ */ ve(gs, [["__scopeId", "data-v-4f648674"]]), hs = { class: "save-alert" }, ks = { "data-save-error": "" }, _s = { class: "save-alert" }, ws = {
|
|
3424
3423
|
key: 0,
|
|
3425
3424
|
class: "save-reason"
|
|
3426
3425
|
}, xs = {
|
|
@@ -3445,13 +3444,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3445
3444
|
},
|
|
3446
3445
|
emits: ["authorized", "confirmed", "destinations"],
|
|
3447
3446
|
setup(t, { expose: d, emit: n }) {
|
|
3448
|
-
const a = t, r = n, i =
|
|
3447
|
+
const a = t, r = n, i = _(() => Ca(a.locale)), u = _(() => Ue(a.locale)), v = ze(aa, void 0), m = _(() => a.ctx ?? (v?.call ? { call: v.call.bind(v) } : void 0)), c = tt({ get admin() {
|
|
3449
3448
|
return a.admin;
|
|
3450
3449
|
}, get locale() {
|
|
3451
3450
|
return a.locale;
|
|
3452
3451
|
}, get ctx() {
|
|
3453
3452
|
return m.value;
|
|
3454
|
-
} }, le), { password: f, busy: C, confirming: T, failure: S, passwordError:
|
|
3453
|
+
} }, le), { password: f, busy: C, confirming: T, failure: S, passwordError: w, scope: A, chosen: P, options: E, dynamic: I, canConfirm: Q } = c, O = y(), H = y([]), W = y(!1), F = y(!1), K = y(), V = y(!1), z = y(!1), M = y(!1), ne = y(""), B = y(), te = _(() => B.value ?? (W.value ? Ee(c.status.value) : void 0));
|
|
3455
3454
|
let q = !1;
|
|
3456
3455
|
async function Z() {
|
|
3457
3456
|
let ue;
|
|
@@ -3486,7 +3485,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3486
3485
|
function j(ue) {
|
|
3487
3486
|
q || (K.value = ue, V.value = !0);
|
|
3488
3487
|
}
|
|
3489
|
-
const pe =
|
|
3488
|
+
const pe = _(() => V.value ? a.pickerErrorText?.(K.value) ?? oa(K.value, i.value, "select", a.locale, a.ctx?.displayName) : oa(K.value, i.value, "save", a.locale, a.ctx?.displayName)), Ce = (ue) => se(async () => {
|
|
3490
3489
|
if ((await a.sdk.revoke({ delegation_id: ue }))?.revoked !== !0) throw { code: "commit-uncertain" };
|
|
3491
3490
|
await Z();
|
|
3492
3491
|
}), $e = () => se(async () => {
|
|
@@ -3524,14 +3523,14 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3524
3523
|
function ie(ue) {
|
|
3525
3524
|
ne.value = ue, a.admin && I.value ? z.value = !0 : M.value = !0;
|
|
3526
3525
|
}
|
|
3527
|
-
const oe =
|
|
3526
|
+
const oe = _(() => O.value?.selection), be = _(() => !O.value && !W.value && !K.value && !te.value), Se = _(() => W.value && (!a.admin || c.status.value?.state !== "blocked") || O.value?.scopeMode === "install-selected" && !oe.value), qe = _(() => a.admin && W.value && c.status.value?.state === "blocked" && !c.status.value.retry), Pe = _(() => !!O.value && !Se.value && !O.value.disabled), De = _(() => a.admin && (Se.value || W.value && !!c.status.value?.retry)), Le = _(() => a.picker ? oe.value ? mt(a.picker.provider, oe.value.root) : O.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider : void 0), Me = (ue) => a.picker?.labels?.[ue] ?? i.value.folder, N = _(() => {
|
|
3528
3527
|
const ue = S.value;
|
|
3529
3528
|
return !ue || "confirm" in ue ? "" : ue.code === "session_ended" ? u.value.session : c.explain(ue) ?? u.value.setupError;
|
|
3530
|
-
}), G =
|
|
3529
|
+
}), G = _(() => a.admin && Se.value && !z.value), U = _(() => C.value || F.value || c.error.value || !Q.value);
|
|
3531
3530
|
function ce() {
|
|
3532
3531
|
z.value = !1, f.value = "", S.value = void 0, P.value = A.value?.selection?.scope ?? "";
|
|
3533
3532
|
}
|
|
3534
|
-
return Ye(() => te.value, () => Promise.all([de(), a.admin ? c.refresh() : void 0])), d({ refresh: J }),
|
|
3533
|
+
return Ye(() => te.value, () => Promise.all([de(), a.admin ? c.refresh() : void 0])), d({ refresh: J }), _e(() => {
|
|
3535
3534
|
de();
|
|
3536
3535
|
}), ge(() => {
|
|
3537
3536
|
q = !0;
|
|
@@ -3595,7 +3594,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3595
3594
|
role: "alert"
|
|
3596
3595
|
}, {
|
|
3597
3596
|
default: s(() => [
|
|
3598
|
-
$("span",
|
|
3597
|
+
$("span", _s, [
|
|
3599
3598
|
h(o(u.value.setupError), 1),
|
|
3600
3599
|
p(e(L), {
|
|
3601
3600
|
variant: "secondary",
|
|
@@ -3619,7 +3618,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3619
3618
|
}, {
|
|
3620
3619
|
default: s(() => [
|
|
3621
3620
|
h(o(N.value), 1),
|
|
3622
|
-
e(S) && "reason" in e(S) && e(S).reason ? (l(), x("span",
|
|
3621
|
+
e(S) && "reason" in e(S) && e(S).reason ? (l(), x("span", ws, o(e(S).reason), 1)) : b("", !0)
|
|
3623
3622
|
]),
|
|
3624
3623
|
_: 1
|
|
3625
3624
|
})) : b("", !0),
|
|
@@ -3670,7 +3669,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3670
3669
|
]),
|
|
3671
3670
|
_: 1
|
|
3672
3671
|
})) : b("", !0),
|
|
3673
|
-
|
|
3672
|
+
De.value || z.value ? (l(), g(je(G.value ? da : "div"), ia(Sa({ key: 7 }, G.value ? { admin: !0, locale: t.locale, files: !0, status: e(c).status.value } : {})), {
|
|
3674
3673
|
default: s(() => [
|
|
3675
3674
|
p(e(Je), {
|
|
3676
3675
|
direction: "vertical",
|
|
@@ -3699,8 +3698,8 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3699
3698
|
p(e(Te), {
|
|
3700
3699
|
label: i.value.password,
|
|
3701
3700
|
description: e(T) ? u.value.confirmingHelp : G.value ? u.value.passwordNote : void 0,
|
|
3702
|
-
help: e(
|
|
3703
|
-
"validate-status": e(
|
|
3701
|
+
help: e(w),
|
|
3702
|
+
"validate-status": e(w) ? "error" : void 0,
|
|
3704
3703
|
"validate-message-display-mode": "text"
|
|
3705
3704
|
}, {
|
|
3706
3705
|
after: s(({ classes: k }) => [
|
|
@@ -3731,13 +3730,13 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3731
3730
|
}, 8, ["class", "disabled"])) : b("", !0)
|
|
3732
3731
|
]),
|
|
3733
3732
|
default: s(() => [
|
|
3734
|
-
p(e(
|
|
3733
|
+
p(e(Ie), {
|
|
3735
3734
|
id: "save-password",
|
|
3736
3735
|
modelValue: e(f),
|
|
3737
3736
|
"onUpdate:modelValue": me[1] || (me[1] = (k) => ua(f) ? f.value = k : null),
|
|
3738
3737
|
type: "password",
|
|
3739
3738
|
autocomplete: "current-password",
|
|
3740
|
-
invalid: !!e(
|
|
3739
|
+
invalid: !!e(w),
|
|
3741
3740
|
disabled: e(C)
|
|
3742
3741
|
}, null, 8, ["modelValue", "invalid", "disabled"])
|
|
3743
3742
|
]),
|
|
@@ -3749,7 +3748,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3749
3748
|
]),
|
|
3750
3749
|
_: 1
|
|
3751
3750
|
}, 16)) : b("", !0),
|
|
3752
|
-
Pe.value && !z.value && !
|
|
3751
|
+
Pe.value && !z.value && !De.value ? (l(!0), x(ae, { key: 8 }, fe(H.value, (k) => (l(), g(e(xe), {
|
|
3753
3752
|
key: k.key,
|
|
3754
3753
|
label: Me(k.key),
|
|
3755
3754
|
"field-width": "full",
|
|
@@ -3764,7 +3763,7 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3764
3763
|
p(e(L), {
|
|
3765
3764
|
variant: "secondary",
|
|
3766
3765
|
size: "sm",
|
|
3767
|
-
disabled: F.value || e(C) || (t.admin && O.value?.scopeMode === "install-selected" ? !e(I) || e(c).error.value : !
|
|
3766
|
+
disabled: F.value || e(C) || (t.admin && O.value?.scopeMode === "install-selected" ? !e(I) || e(c).error.value : !Le.value),
|
|
3768
3767
|
onClick: (R) => ie(k.key)
|
|
3769
3768
|
}, {
|
|
3770
3769
|
default: s(() => [
|
|
@@ -3790,11 +3789,11 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3790
3789
|
}, 1032, ["label"]))), 128)) : b("", !0)
|
|
3791
3790
|
], 64)),
|
|
3792
3791
|
he(ue.$slots, "default", {}, void 0, !0),
|
|
3793
|
-
|
|
3792
|
+
Le.value ? (l(), g(pa, {
|
|
3794
3793
|
key: oe.value?.scope,
|
|
3795
3794
|
open: M.value,
|
|
3796
3795
|
"onUpdate:open": me[2] || (me[2] = (k) => M.value = k),
|
|
3797
|
-
provider:
|
|
3796
|
+
provider: Le.value,
|
|
3798
3797
|
locale: t.locale,
|
|
3799
3798
|
name: t.ctx?.displayName,
|
|
3800
3799
|
mode: "folder",
|
|
@@ -3824,21 +3823,21 @@ const Kl = ["aria-busy", "aria-label"], Hl = { class: "file-toolbar file-locatio
|
|
|
3824
3823
|
},
|
|
3825
3824
|
emits: ["authorized"],
|
|
3826
3825
|
setup(t, { expose: d, emit: n }) {
|
|
3827
|
-
const a = t, r = n, i =
|
|
3828
|
-
async function T(
|
|
3826
|
+
const a = t, r = n, i = _(() => Ca(a.locale)), u = _(() => $a(a.locale)), v = y([]), m = y(), c = () => (C.value = void 0, m.value?.refresh() ?? Promise.resolve()), f = y(!1), C = y();
|
|
3827
|
+
async function T(w) {
|
|
3829
3828
|
if (f.value) return;
|
|
3830
3829
|
f.value = !0, C.value = void 0;
|
|
3831
3830
|
const A = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (P) => P.toString(16).padStart(2, "0")).join("");
|
|
3832
3831
|
try {
|
|
3833
|
-
await a.sdk.exportExample({ key:
|
|
3832
|
+
await a.sdk.exportExample({ key: w, job_id: A });
|
|
3834
3833
|
} catch (P) {
|
|
3835
3834
|
C.value = P;
|
|
3836
3835
|
} finally {
|
|
3837
3836
|
f.value = !1;
|
|
3838
3837
|
}
|
|
3839
3838
|
}
|
|
3840
|
-
const S = (
|
|
3841
|
-
return d({ refresh: c }), (
|
|
3839
|
+
const S = (w) => a.picker?.labels?.[w] ? `${i.value.example}${u.value}${a.picker.labels[w]}` : i.value.example;
|
|
3840
|
+
return d({ refresh: c }), (w, A) => (l(), x("div", As, [
|
|
3842
3841
|
p(Ts, {
|
|
3843
3842
|
ref_key: "settings",
|
|
3844
3843
|
ref: m,
|
|
@@ -3904,8 +3903,8 @@ const Ns = { class: "authorization-content" }, Vs = ["aria-busy", "data-authoriz
|
|
|
3904
3903
|
emits: ["ready"],
|
|
3905
3904
|
setup(t, { emit: d }) {
|
|
3906
3905
|
const n = t, a = d, r = y(), i = y(), u = y(!1), v = y(!1), m = y(!1), c = Ft();
|
|
3907
|
-
let f = [], C = !1, T = 0, S = !1,
|
|
3908
|
-
const E =
|
|
3906
|
+
let f = [], C = !1, T = 0, S = !1, w, A = 0, P;
|
|
3907
|
+
const E = _(() => Ha(n.ctx.locale, n.name ?? n.ctx.displayName ?? "")), I = _(() => r.value || i.value), Q = _(() => I.value?.state === "authorization_required"), O = _(() => ["helper_untrusted", "cli_untrusted"].includes(I.value?.reason || "")), H = _(() => Q.value && !O.value), W = _(() => I.value?.state === "unavailable" ? Ee(I.value) : void 0), F = _(() => W.value ?? { credential_not_ready: "credential", access_denied: "denied", check_failed: "config" }[I.value?.reason ?? ""] ?? "unavailable"), K = _(() => ca({ code: I.value?.reason }, n.ctx.locale, n.name ?? n.ctx.displayName)), V = _(() => K.value?.title ?? (I.value ? Q.value ? E.value("title") : I.value.state === "ready" ? E.value("ready") : I.value.state === "not_admin" ? E.value("not_admin.title") : I.value.state === "session_expired" ? E.value("session_expired.title") : E.value(F.value + ".title") : E.value("checking"))), z = _(() => K.value?.message ?? (Q.value ? E.value("purpose") : I.value?.state === "not_admin" ? E.value("not_admin.body") : I.value?.state === "session_expired" ? E.value("session_expired.body") : I.value?.state === "unavailable" ? E.value(F.value + ".body") : E.value("purpose"))), M = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], ne = _(() => M.includes(I.value?.reason || "") ? I.value.reason : "unknown"), B = _(() => O.value ? "next.reinstall" : ne.value === "grant_missing" ? "next.install" : ne.value === "upgrade_reapproval" || ne.value === "grant_incompatible" ? "next.update" : "next.repair");
|
|
3909
3908
|
function te(le) {
|
|
3910
3909
|
if (!le || le.command !== "authorization" || le.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(le.state) || le.reason === "upgrade_reapproval" && le.state !== "authorization_required") throw Error("invalid status");
|
|
3911
3910
|
return le;
|
|
@@ -3917,7 +3916,7 @@ const Ns = { class: "authorization-content" }, Vs = ["aria-busy", "data-authoriz
|
|
|
3917
3916
|
}
|
|
3918
3917
|
let se;
|
|
3919
3918
|
function de() {
|
|
3920
|
-
clearTimeout(
|
|
3919
|
+
clearTimeout(w), W.value !== se && (se = W.value, A = 0), W.value && (w = setTimeout(() => {
|
|
3921
3920
|
u.value ? S = !0 : j("status");
|
|
3922
3921
|
}, xa(A++, W.value)));
|
|
3923
3922
|
}
|
|
@@ -3958,12 +3957,12 @@ const Ns = { class: "authorization-content" }, Vs = ["aria-busy", "data-authoriz
|
|
|
3958
3957
|
function $e() {
|
|
3959
3958
|
return r.value?.state === "ready" ? Promise.resolve(!0) : (u.value || (m.value = !0), new Promise((le) => f.push(le)));
|
|
3960
3959
|
}
|
|
3961
|
-
return He(ut, { state:
|
|
3960
|
+
return He(ut, { state: _(() => r.value?.state ?? "checking"), requireAuthorization: $e, text: E, busy: u, canManage: () => !!n.ctx.authorization?.canManage?.(), revoke: () => j("revoke") }), _e(() => {
|
|
3962
3961
|
P = n.ctx.reopen(() => {
|
|
3963
3962
|
u.value ? S = !0 : j("status");
|
|
3964
3963
|
}), j("status");
|
|
3965
3964
|
}), Wa(() => {
|
|
3966
|
-
C = !0, T++, clearTimeout(
|
|
3965
|
+
C = !0, T++, clearTimeout(w), pe(!1), typeof P == "function" && P();
|
|
3967
3966
|
}), (le, ie) => (l(), x(ae, null, [
|
|
3968
3967
|
$("div", Ns, [
|
|
3969
3968
|
he(le.$slots, "default", {}, void 0, !0)
|
|
@@ -4131,17 +4130,17 @@ const Ns = { class: "authorization-content" }, Vs = ["aria-busy", "data-authoriz
|
|
|
4131
4130
|
messages: {}
|
|
4132
4131
|
},
|
|
4133
4132
|
setup(t) {
|
|
4134
|
-
const d = t, n = y(), a = y(!1), r = y(!1), i =
|
|
4133
|
+
const d = t, n = y(), a = y(!1), r = y(!1), i = _(() => {
|
|
4135
4134
|
if (d.messages) return d.messages;
|
|
4136
|
-
const S = Ka(d.locale ?? "en"),
|
|
4135
|
+
const S = Ka(d.locale ?? "en"), w = Ha(d.locale ?? "en", d.ctx.displayName ?? "");
|
|
4137
4136
|
return {
|
|
4138
4137
|
title: S.failedTitle,
|
|
4139
4138
|
session: S.errors.session_required,
|
|
4140
4139
|
unavailable: S.errors.auth_unavailable,
|
|
4141
|
-
retry:
|
|
4142
|
-
dismiss:
|
|
4140
|
+
retry: w("retry"),
|
|
4141
|
+
dismiss: w("cancel")
|
|
4143
4142
|
};
|
|
4144
|
-
}), u =
|
|
4143
|
+
}), u = _(() => ca(n.value, d.locale ?? "en", d.ctx.displayName)), v = _(() => u.value?.message ?? (n.value?.code === "session_required" ? i.value.session : i.value.unavailable)), m = yt({ call: (...S) => d.ctx.call(...S) }, d.mode, (S) => {
|
|
4145
4144
|
n.value = S, a.value = S !== void 0;
|
|
4146
4145
|
});
|
|
4147
4146
|
let c, f = !1;
|
|
@@ -4156,18 +4155,18 @@ const Ns = { class: "authorization-content" }, Vs = ["aria-busy", "data-authoriz
|
|
|
4156
4155
|
function T() {
|
|
4157
4156
|
document.visibilityState !== "hidden" && m.check();
|
|
4158
4157
|
}
|
|
4159
|
-
return
|
|
4158
|
+
return _e(() => {
|
|
4160
4159
|
c = d.ctx.reopen?.(() => {
|
|
4161
4160
|
m.check();
|
|
4162
4161
|
}), document.addEventListener("visibilitychange", T), m.check();
|
|
4163
4162
|
}), ge(() => {
|
|
4164
4163
|
f = !0, m.dispose(), c?.(), document.removeEventListener("visibilitychange", T);
|
|
4165
|
-
}), (S,
|
|
4164
|
+
}), (S, w) => (l(), x(ae, null, [
|
|
4166
4165
|
he(S.$slots, "default"),
|
|
4167
4166
|
n.value && a.value ? (l(), g(e(Oe), {
|
|
4168
4167
|
key: 0,
|
|
4169
4168
|
open: a.value,
|
|
4170
|
-
"onUpdate:open":
|
|
4169
|
+
"onUpdate:open": w[1] || (w[1] = (A) => a.value = A),
|
|
4171
4170
|
title: u.value?.title ?? i.value.title,
|
|
4172
4171
|
description: v.value,
|
|
4173
4172
|
"close-label": i.value.dismiss
|
|
@@ -4175,7 +4174,7 @@ const Ns = { class: "authorization-content" }, Vs = ["aria-busy", "data-authoriz
|
|
|
4175
4174
|
footer: s(() => [
|
|
4176
4175
|
p(e(L), {
|
|
4177
4176
|
variant: "secondary",
|
|
4178
|
-
onClick:
|
|
4177
|
+
onClick: w[0] || (w[0] = (A) => a.value = !1)
|
|
4179
4178
|
}, {
|
|
4180
4179
|
default: s(() => [
|
|
4181
4180
|
h(o(i.value.dismiss), 1)
|
|
@@ -4235,10 +4234,10 @@ export {
|
|
|
4235
4234
|
ca as appRefusal,
|
|
4236
4235
|
ko as authorizationCatalogs,
|
|
4237
4236
|
Ha as authorizationCopy,
|
|
4238
|
-
|
|
4237
|
+
_o as backgroundCatalogs,
|
|
4239
4238
|
dt as backgroundCopy,
|
|
4240
4239
|
vt as backgroundErrorCopy,
|
|
4241
|
-
|
|
4240
|
+
wo as bridgeCatalogs,
|
|
4242
4241
|
xo as bridgeErrorCopy,
|
|
4243
4242
|
Co as catalogs,
|
|
4244
4243
|
$o as clientTimeout,
|
|
@@ -4258,7 +4257,7 @@ export {
|
|
|
4258
4257
|
Uo as createStandaloneHost,
|
|
4259
4258
|
Do as decodeResponse,
|
|
4260
4259
|
Lo as delegateCatalogs,
|
|
4261
|
-
|
|
4260
|
+
Ue as delegateCopy,
|
|
4262
4261
|
No as dsmLaunchURL,
|
|
4263
4262
|
Vo as encodeRequest,
|
|
4264
4263
|
pt as errorCopy,
|
|
@@ -4276,7 +4275,7 @@ export {
|
|
|
4276
4275
|
xa as lifecycleRetryDelay,
|
|
4277
4276
|
Mo as mergeCatalogs,
|
|
4278
4277
|
Ko as nasCatalogs,
|
|
4279
|
-
|
|
4278
|
+
Ne as nasCopy,
|
|
4280
4279
|
qa as nasErrorCopy,
|
|
4281
4280
|
Ho as openFileInFileStation,
|
|
4282
4281
|
Go as openFolderInFileStation,
|