@hiai-gg/docsmint 0.3.7 → 0.3.8
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/backend/src/lib/logger.ts +45 -15
- package/dist/backend/index.js +238 -150
- package/dist/frontend/CategoryDialog-DphkZqIB.js +611 -0
- package/dist/frontend/ConfirmDialog-BLF3x_hr.js +214 -0
- package/dist/frontend/CreateSnapshotDialog-D5vPvFTL.js +216 -0
- package/dist/frontend/DatePicker-CLNTdvTk.js +259 -0
- package/dist/frontend/DeleteDialog-DxYFJivN.js +174 -0
- package/dist/frontend/FolderDialog-CRVZM2Oi.js +250 -0
- package/dist/frontend/FolderNode-C2zG7uii.js +298 -0
- package/dist/frontend/FolderTreeSelector-CyB8y2Sm.js +103 -0
- package/dist/frontend/Icon-CooFj4Ee.js +64 -0
- package/dist/frontend/SettingsDialog-DCM4-N6_.js +1016 -0
- package/dist/frontend/ShareDialog-DYu3RKQu.js +165 -0
- package/dist/frontend/TagCreateDialog-DXQs2bL9.js +260 -0
- package/dist/frontend/camera-iKXDOOWT.js +29 -0
- package/dist/frontend/check-D-UuvBuh.js +25 -0
- package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
- package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
- package/dist/frontend/clock-DJHbHZb8.js +29 -0
- package/dist/frontend/{bundle-mjs-CP6Owz-8.js → clsx-C7bIvsDS.js} +16 -1
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/delete-dialog.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1364 -1353
- package/dist/frontend/components/editor/document-title.js +25 -25
- package/dist/frontend/components/editor/markdown-toggle.js +45 -45
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/folder-tree-selector.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +169 -151
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.js +1 -1
- package/dist/frontend/components/sidebar.js +1161 -1153
- package/dist/frontend/components/tag-create-dialog.js +1 -1
- package/dist/frontend/components/version-history.js +188 -187
- package/dist/frontend/copy-GppwRMjX.js +32 -0
- package/dist/frontend/dashboard.js +1188 -1156
- package/dist/frontend/dialog-D6NxYVmy.js +213 -0
- package/dist/frontend/doc-tabs.js +2 -2
- package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
- package/dist/frontend/extension.js +8 -8
- package/dist/frontend/{floating-layer-anchor-C51M4l6v.js → floating-layer-anchor-CPwucTfd.js} +1414 -1412
- package/dist/frontend/folder-DeWhnD7O.js +45 -0
- package/dist/frontend/folder-refresh.js +1 -1
- package/dist/frontend/input-B5Rak-5G.js +23 -0
- package/dist/frontend/keyboard.js +1 -1
- package/dist/frontend/{keyboard.svelte-D7H8DihC.js → keyboard.svelte-CApmX0vl.js} +53 -53
- package/dist/frontend/label-CW9rxoAb.js +30 -0
- package/dist/frontend/{loader-circle-Bk-WFz9g.js → loader-circle-BA6aLO71.js} +86 -85
- package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
- package/dist/frontend/search.js +680 -654
- package/dist/frontend/select-value-sF86Geyh.js +1446 -0
- package/dist/frontend/shared-document.js +94 -94
- package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
- package/dist/frontend/tag-HxRazVN_.js +54 -0
- package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
- package/dist/frontend/textarea-i1720bE7.js +23 -0
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
- package/dist/frontend/{utils-C0OW2678.js → utils-CffiyuTo.js} +2 -3
- package/dist/frontend/{utils-D8kmM3ub.js → utils-hzdMVeCv.js} +2 -3
- package/dist/frontend/utils.js +1 -1
- package/dist/frontend/x-CzBsnJ2x.js +25 -0
- package/dist/frontend-ssr/api/attachments.js +2 -0
- package/dist/frontend-ssr/api/categories.js +2 -0
- package/dist/frontend-ssr/api/documents.js +2 -0
- package/dist/frontend-ssr/api/folders.js +2 -0
- package/dist/frontend-ssr/api/settings.js +2 -0
- package/dist/frontend-ssr/api/share.js +2 -0
- package/dist/frontend-ssr/api/tags.js +2 -0
- package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
- package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
- package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
- package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
- package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
- package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
- package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
- package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
- package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
- package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
- package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
- package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
- package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
- package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
- package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
- package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
- package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
- package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
- package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
- package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
- package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
- package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
- package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
- package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
- package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
- package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
- package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
- package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
- package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
- package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
- package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
- package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
- package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
- package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
- package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
- package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
- package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
- package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
- package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
- package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
- package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
- package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
- package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
- package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
- package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
- package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
- package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
- package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
- package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
- package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
- package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
- package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
- package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
- package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
- package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
- package/dist/frontend-ssr/collaboration.js +39 -0
- package/dist/frontend-ssr/components/category-dialog.js +2 -0
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
- package/dist/frontend-ssr/components/delete-dialog.js +2 -0
- package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
- package/dist/frontend-ssr/components/editor/document-title.js +11 -0
- package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
- package/dist/frontend-ssr/components/editor/extensions.js +2 -0
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
- package/dist/frontend-ssr/components/editor/markdown.js +2 -0
- package/dist/frontend-ssr/components/folder-node.js +2 -0
- package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
- package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
- package/dist/frontend-ssr/components/settings.js +2 -0
- package/dist/frontend-ssr/components/share-dialog.js +2 -0
- package/dist/frontend-ssr/components/sidebar.js +2033 -0
- package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
- package/dist/frontend-ssr/components/version-history.js +370 -0
- package/dist/frontend-ssr/dashboard.js +2542 -0
- package/dist/frontend-ssr/doc-tabs.js +23 -0
- package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
- package/dist/frontend-ssr/extension.js +13 -0
- package/dist/frontend-ssr/folder-refresh.js +2 -0
- package/dist/frontend-ssr/i18n.js +10 -0
- package/dist/frontend-ssr/keyboard.js +2 -0
- package/dist/frontend-ssr/offline/identity.js +2 -0
- package/dist/frontend-ssr/search.js +332 -0
- package/dist/frontend-ssr/shared-document.js +273 -0
- package/dist/frontend-ssr/theme.js +9 -0
- package/dist/frontend-ssr/types.js +1 -0
- package/dist/frontend-ssr/utils/clipboard.js +2 -0
- package/dist/frontend-ssr/utils/dndzone.js +2 -0
- package/dist/frontend-ssr/utils.js +2 -0
- package/package.json +22 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +3 -0
- package/packages/mcp-server/src/index.ts +1 -1
- package/dist/frontend/CategoryDialog--rIE7FrH.js +0 -580
- package/dist/frontend/ConfirmDialog-Cpzyb55f.js +0 -212
- package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +0 -216
- package/dist/frontend/DatePicker-Byynca7V.js +0 -257
- package/dist/frontend/DeleteDialog-ap6nOywZ.js +0 -174
- package/dist/frontend/FolderDialog-DmN_trV0.js +0 -247
- package/dist/frontend/FolderNode-C4B8a2fd.js +0 -317
- package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +0 -100
- package/dist/frontend/Icon-DtNo0N1U.js +0 -64
- package/dist/frontend/SettingsDialog-2kTaTXAs.js +0 -992
- package/dist/frontend/ShareDialog-BBDGNF5n.js +0 -165
- package/dist/frontend/TagCreateDialog-DiLZnJo4.js +0 -258
- package/dist/frontend/camera-B7dAOd4s.js +0 -28
- package/dist/frontend/check-CDwRlG9T.js +0 -24
- package/dist/frontend/chevron-down-B7ZrjUmT.js +0 -24
- package/dist/frontend/circle-check-CDqeMB2d.js +0 -28
- package/dist/frontend/client-Bc5Fzx40.js +0 -2785
- package/dist/frontend/clock-Ck5Sn-Zl.js +0 -28
- package/dist/frontend/clsx-nmtDPO_P.js +0 -16
- package/dist/frontend/copy-CMAA6GP0.js +0 -31
- package/dist/frontend/dialog-BDkiG42a.js +0 -213
- package/dist/frontend/disclose-version-5I57E3LD.js +0 -3
- package/dist/frontend/ellipsis-vertical-BBuPldbW.js +0 -519
- package/dist/frontend/folder-TQjKY4yn.js +0 -44
- package/dist/frontend/index-client-jobkrWVL.js +0 -86
- package/dist/frontend/input-CBI6p4Xl.js +0 -23
- package/dist/frontend/label-C-GkhEp4.js +0 -30
- package/dist/frontend/rotate-ccw-CleZtJ5D.js +0 -24
- package/dist/frontend/select-value-CvrWRkXW.js +0 -1436
- package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +0 -65
- package/dist/frontend/tag-Dx3SmucJ.js +0 -53
- package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +0 -29
- package/dist/frontend/textarea-Dfp78XlL.js +0 -23
- package/dist/frontend/theme.svelte-CROg1Hi5.js +0 -49
- package/dist/frontend/x-DaTdeDXv.js +0 -24
|
@@ -1,580 +0,0 @@
|
|
|
1
|
-
import "./disclose-version-5I57E3LD.js";
|
|
2
|
-
import { $ as e, A as t, E as n, F as r, K as i, M as a, Q as o, R as s, V as c, _t as l, at as u, ct as d, dt as f, et as p, ft as m, gt as h, j as g, k as _, n as v, q as y, rt as b, s as x, tt as S, u as C, w as ee, x as w } from "./client-Bc5Fzx40.js";
|
|
3
|
-
import { t as T } from "./loader-circle-Bk-WFz9g.js";
|
|
4
|
-
import { a as E, i as D, n as te, o as O, r as ne, t as re } from "./dialog-BDkiG42a.js";
|
|
5
|
-
import { a as ie, i as ae, n as oe, r as se, t as ce } from "./select-value-CvrWRkXW.js";
|
|
6
|
-
import { t as k } from "./label-C-GkhEp4.js";
|
|
7
|
-
import { t as le } from "./copy-CMAA6GP0.js";
|
|
8
|
-
import { t as ue } from "./circle-check-CDqeMB2d.js";
|
|
9
|
-
import { Qn as de, S as fe, _ as pe, b as A, er as me, g as he, h as ge, m as _e, nr as ve, p as ye, tr as be, v as xe, x as Se, y as Ce } from "./messages-BpYaLbzE.js";
|
|
10
|
-
import { t as we } from "./input-CBI6p4Xl.js";
|
|
11
|
-
import { a as Te, n as Ee, o as De, r as Oe, s as ke, t as Ae } from "./api-keys-CpkrA8rD.js";
|
|
12
|
-
//#region src/lib/components/sidebar/category-dialog-feedback.ts
|
|
13
|
-
function je(e, t) {
|
|
14
|
-
return typeof e == "object" && e && "status" in e && e.status === 409 ? "A category with this name already exists." : e instanceof Error && e.message.trim().length > 0 ? e.message : t;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/lib/components/sidebar/CategoryDialog.svelte
|
|
18
|
-
var Me = a("<span class=\"font-medium text-foreground\"> </span> ", 1), Ne = a("Delete <span class=\"font-medium text-foreground\"> </span> ", 1), j = a("<!> <!>", 1), Pe = a("<div class=\"flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/10 p-4\" role=\"status\" aria-live=\"polite\"><!> <div><p class=\"text-sm font-medium text-foreground\"> </p> <p class=\"text-sm text-muted-foreground\"><span class=\"font-medium text-foreground\"> </span> </p></div></div>"), Fe = a("<!> Copy API key", 1), Ie = a("<div class=\"rounded-md border border-primary/20 bg-background/80 p-3\"><p class=\"text-xs font-medium text-foreground\">Copy the API key now. It remains available in Settings → API.</p> <code class=\"mt-2 block break-all rounded bg-muted p-2 text-xs text-foreground\"> </code> <!></div>"), Le = a("<p class=\"text-xs text-destructive\" role=\"alert\"> </p>"), Re = a("<div class=\"space-y-3 rounded-lg border border-primary/30 bg-primary/10 p-4\" role=\"status\" aria-live=\"polite\"><div class=\"flex items-start gap-3\"><!> <div><p class=\"text-sm font-medium text-foreground\">Category created</p> <p class=\"text-sm text-muted-foreground\"> </p></div></div> <!> <!></div>"), ze = a("<p id=\"category-dialog-name-error\" class=\"text-xs text-destructive\" role=\"alert\"> </p>"), Be = a("<!> <!> <!>", 1), Ve = a("<div class=\"space-y-3 rounded-md border border-border/70 bg-muted/30 p-3\"><div class=\"flex flex-wrap items-center justify-between gap-2\"><!> <div class=\"flex flex-wrap gap-2\"><!> <!></div></div> <div class=\"grid gap-2 sm:grid-cols-3\"><label class=\"flex items-center gap-2 rounded-md border border-border/60 bg-background px-3 py-2 text-sm\"><input type=\"checkbox\" class=\"size-4 rounded border-input\"/> <span>Read</span></label> <label class=\"flex items-center gap-2 rounded-md border border-border/60 bg-background px-3 py-2 text-sm\"><input type=\"checkbox\" class=\"size-4 rounded border-input\"/> <span>Edit</span></label> <label class=\"flex items-center gap-2 rounded-md border border-border/60 bg-background px-3 py-2 text-sm\"><input type=\"checkbox\" class=\"size-4 rounded border-input\"/> <span>Write</span></label></div></div>"), He = a("<p class=\"text-xs text-muted-foreground\">Save Category API access first, then reopen settings to issue a key.</p>"), Ue = a("<div class=\"rounded-lg border border-primary/30 bg-primary/10 p-3 text-primary\"><p class=\"text-xs font-medium\">Copy now — this raw key is shown once.</p> <code class=\"mt-1 block break-all rounded bg-background/80 p-2 text-xs text-foreground\"> </code> <!></div>"), We = a("<div class=\"flex items-center justify-between gap-3 rounded-md bg-muted/40 px-3 py-2 text-xs\"><span> </span> <div class=\"flex shrink-0 gap-2\"><!> <!></div></div>"), Ge = a("<div class=\"space-y-3 rounded-md border border-border/70 p-3\"><div class=\"flex items-center justify-between gap-2\"><div><!><p class=\"text-xs text-muted-foreground\">Keys inherit the saved permissions above.</p></div> <!></div> <!> <!> <div class=\"max-h-48 space-y-2 overflow-y-auto pr-1\"></div></div>"), Ke = a("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), qe = a("<!> ", 1);
|
|
19
|
-
function M(a, M) {
|
|
20
|
-
m(M, !0);
|
|
21
|
-
let N = {
|
|
22
|
-
Root: ie,
|
|
23
|
-
Content: ae,
|
|
24
|
-
Item: se,
|
|
25
|
-
Trigger: oe,
|
|
26
|
-
Value: ce
|
|
27
|
-
}, P = v(M, "open", 15, !1), F = u(""), I = u(null), L = u(!1), R = u("unavailable"), z = u(!1), B = u(!1), V = u(!1), H = u(S([])), U = u(S({})), W = u(null), G = u(!1), K = u(null), q = u(null), J = u(null), Y = d(() => c(W) ? c(U)[c(W)] : void 0);
|
|
28
|
-
async function X(e) {
|
|
29
|
-
b(H, (await Te()).keys.filter((t) => Ee(t.scopes) === e), !0);
|
|
30
|
-
}
|
|
31
|
-
async function Je() {
|
|
32
|
-
if (M.category?.id) {
|
|
33
|
-
b(G, !0);
|
|
34
|
-
try {
|
|
35
|
-
let e = await Oe(M.category.id);
|
|
36
|
-
b(U, {
|
|
37
|
-
...c(U),
|
|
38
|
-
[e.id]: e.key
|
|
39
|
-
}, !0), b(W, e.id, !0), await X(M.category.id);
|
|
40
|
-
} catch (e) {
|
|
41
|
-
b(I, e instanceof Error ? e.message : "Failed to create category API key", !0);
|
|
42
|
-
} finally {
|
|
43
|
-
b(G, !1);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async function Ye(e) {
|
|
48
|
-
if (M.category?.id) {
|
|
49
|
-
b(G, !0);
|
|
50
|
-
try {
|
|
51
|
-
await ke(e);
|
|
52
|
-
let { [e]: t, ...n } = c(U);
|
|
53
|
-
b(U, n, !0), c(W) === e && b(W, null), await X(M.category.id);
|
|
54
|
-
} finally {
|
|
55
|
-
b(G, !1);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async function Xe(e) {
|
|
60
|
-
let t = c(U)[e.id] ?? await De(e.id);
|
|
61
|
-
await navigator.clipboard.writeText(Ae(e, t));
|
|
62
|
-
}
|
|
63
|
-
y(() => {
|
|
64
|
-
if (!P()) return;
|
|
65
|
-
b(F, M.category?.name ?? "", !0);
|
|
66
|
-
let e = M.category?.apiMode === "category" ? "category" : M.category?.apiMode === "global" || M.category?.apiMode === "general" ? "global" : "unavailable";
|
|
67
|
-
b(R, e, !0), b(z, !!M.category?.apiPermissionRead, !0), b(B, !!M.category?.apiPermissionEdit, !0), b(V, !!M.category?.apiPermissionWrite, !0), e === "unavailable" && (b(z, !1), b(B, !1), b(V, !1)), b(U, {}, !0), b(W, null), b(H, [], !0), b(K, null), b(q, null), b(J, null), M.mode === "edit" && M.category?.id && X(M.category.id), b(I, null);
|
|
68
|
-
});
|
|
69
|
-
let Z = d(() => c(F).trim()), Q = d(() => M.mode === "delete"), Ze = d(() => c(z) || c(B) || c(V)), Qe = d(() => c(J) ? _e() : c(Q) ? he() : M.mode === "edit" ? Se() : fe()), $e = d(() => c(Q) ? me() : M.mode === "edit" ? ve() : de());
|
|
70
|
-
function et(e) {
|
|
71
|
-
return e === "category" ? "category" : e === "global" ? "global" : "unavailable";
|
|
72
|
-
}
|
|
73
|
-
function tt(e) {
|
|
74
|
-
if (e === "read") {
|
|
75
|
-
b(z, !0), b(B, !1), b(V, !1);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (e === "write") {
|
|
79
|
-
b(z, !1), b(B, !1), b(V, !0);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
if (e === "read-write") {
|
|
83
|
-
b(z, !0), b(B, !1), b(V, !0);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
b(z, !0), b(B, !0), b(V, !0);
|
|
87
|
-
}
|
|
88
|
-
async function nt(e) {
|
|
89
|
-
if (e?.preventDefault(), !c(L)) {
|
|
90
|
-
if (c(Q)) {
|
|
91
|
-
if (!M.onDelete) {
|
|
92
|
-
$();
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
b(L, !0);
|
|
96
|
-
try {
|
|
97
|
-
await M.onDelete(), b(J, M.category?.name ?? "Category", !0);
|
|
98
|
-
} catch (e) {
|
|
99
|
-
console.error("CategoryDialog: delete failed", e), b(I, e instanceof Error ? e.message : pe(), !0);
|
|
100
|
-
} finally {
|
|
101
|
-
b(L, !1);
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (c(Z).length === 0) {
|
|
106
|
-
b(I, "Name is required");
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
if (c(R) !== "unavailable" && !c(Ze)) {
|
|
110
|
-
b(I, "Select at least one permission");
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (!M.onSave) {
|
|
114
|
-
$();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
b(I, null), b(L, !0);
|
|
118
|
-
try {
|
|
119
|
-
let e = await M.onSave({
|
|
120
|
-
name: c(Z),
|
|
121
|
-
apiMode: et(c(R)),
|
|
122
|
-
apiPermissionRead: c(R) === "unavailable" ? !1 : c(z),
|
|
123
|
-
apiPermissionEdit: c(R) === "unavailable" ? !1 : c(B),
|
|
124
|
-
apiPermissionWrite: c(R) === "unavailable" ? !1 : c(V)
|
|
125
|
-
});
|
|
126
|
-
if (M.mode === "create" && e) {
|
|
127
|
-
if (b(K, e.name, !0), c(R) === "category") try {
|
|
128
|
-
b(q, (await Oe(e.id)).key, !0);
|
|
129
|
-
} catch (e) {
|
|
130
|
-
b(I, `Category created, but its API key could not be created: ${je(e, "Unknown error")}`);
|
|
131
|
-
}
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
$();
|
|
135
|
-
} catch (e) {
|
|
136
|
-
console.error("CategoryDialog: save failed", e), b(I, je(e, M.mode === "edit" ? xe() : Ce()), !0);
|
|
137
|
-
} finally {
|
|
138
|
-
b(L, !1);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function $() {
|
|
143
|
-
c(L) || (P(!1), M.onClose?.());
|
|
144
|
-
}
|
|
145
|
-
function rt(e) {
|
|
146
|
-
if (!e && c(L)) {
|
|
147
|
-
P(!0);
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
e || $();
|
|
151
|
-
}
|
|
152
|
-
E(a, {
|
|
153
|
-
onOpenChange: rt,
|
|
154
|
-
get open() {
|
|
155
|
-
return P();
|
|
156
|
-
},
|
|
157
|
-
set open(e) {
|
|
158
|
-
P(e);
|
|
159
|
-
},
|
|
160
|
-
children: (a, u) => {
|
|
161
|
-
var f = Be(), m = e(f);
|
|
162
|
-
te(m, {
|
|
163
|
-
children: (a, s) => {
|
|
164
|
-
var u = j(), d = e(u);
|
|
165
|
-
re(d, {
|
|
166
|
-
children: (e, n) => {
|
|
167
|
-
h();
|
|
168
|
-
var a = r();
|
|
169
|
-
i(() => _(a, c(Qe))), t(e, a);
|
|
170
|
-
},
|
|
171
|
-
$$slots: { default: !0 }
|
|
172
|
-
});
|
|
173
|
-
var f = p(d, 2), m = (n) => {
|
|
174
|
-
D(n, {
|
|
175
|
-
children: (n, r) => {
|
|
176
|
-
var a = Me(), s = e(a), u = o(s);
|
|
177
|
-
l(s);
|
|
178
|
-
var d = p(s);
|
|
179
|
-
i((e) => {
|
|
180
|
-
_(u, `“${c(J) ?? ""}”`), _(d, ` ${e ?? ""}`);
|
|
181
|
-
}, [() => ye()]), t(n, a);
|
|
182
|
-
},
|
|
183
|
-
$$slots: { default: !0 }
|
|
184
|
-
});
|
|
185
|
-
}, g = (n) => {
|
|
186
|
-
D(n, {
|
|
187
|
-
children: (n, r) => {
|
|
188
|
-
h();
|
|
189
|
-
var a = Ne(), s = p(e(a)), c = o(s);
|
|
190
|
-
l(s);
|
|
191
|
-
var u = p(s);
|
|
192
|
-
i((e) => {
|
|
193
|
-
_(c, `“${M.category?.name ?? "Category" ?? ""}”`), _(u, `?
|
|
194
|
-
${e ?? ""}`);
|
|
195
|
-
}, [() => ge()]), t(n, a);
|
|
196
|
-
},
|
|
197
|
-
$$slots: { default: !0 }
|
|
198
|
-
});
|
|
199
|
-
}, v = (e) => {
|
|
200
|
-
D(e, {
|
|
201
|
-
children: (e, n) => {
|
|
202
|
-
h();
|
|
203
|
-
var a = r();
|
|
204
|
-
i((e) => _(a, e), [() => A()]), t(e, a);
|
|
205
|
-
},
|
|
206
|
-
$$slots: { default: !0 }
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
n(f, (e) => {
|
|
210
|
-
c(J) ? e(m) : c(Q) ? e(g, 1) : e(v, -1);
|
|
211
|
-
}), t(a, u);
|
|
212
|
-
},
|
|
213
|
-
$$slots: { default: !0 }
|
|
214
|
-
});
|
|
215
|
-
var v = p(m, 2), y = (e) => {
|
|
216
|
-
var n = Pe(), r = o(n);
|
|
217
|
-
ue(r, { class: "mt-0.5 size-5 shrink-0 text-primary" });
|
|
218
|
-
var a = p(r, 2), s = o(a), u = o(s, !0);
|
|
219
|
-
l(s);
|
|
220
|
-
var d = p(s, 2), f = o(d), m = o(f);
|
|
221
|
-
l(f);
|
|
222
|
-
var h = p(f);
|
|
223
|
-
l(d), l(a), l(n), i((e, t) => {
|
|
224
|
-
_(u, e), _(m, `“${c(J) ?? ""}”`), _(h, ` ${t ?? ""}`);
|
|
225
|
-
}, [() => _e(), () => ye()]), t(e, n);
|
|
226
|
-
}, S = (r) => {
|
|
227
|
-
var a = Re(), s = o(a), u = o(s);
|
|
228
|
-
ue(u, { class: "mt-0.5 size-5 shrink-0 text-primary" });
|
|
229
|
-
var d = p(u, 2), f = p(o(d), 2), m = o(f);
|
|
230
|
-
l(f), l(d), l(s);
|
|
231
|
-
var g = p(s, 2), v = (n) => {
|
|
232
|
-
var r = Ie(), a = p(o(r), 2), s = o(a, !0);
|
|
233
|
-
l(a), O(p(a, 2), {
|
|
234
|
-
type: "button",
|
|
235
|
-
size: "sm",
|
|
236
|
-
variant: "outline",
|
|
237
|
-
class: "mt-2",
|
|
238
|
-
onclick: () => navigator.clipboard.writeText(c(q) ?? ""),
|
|
239
|
-
children: (n, r) => {
|
|
240
|
-
var i = Fe();
|
|
241
|
-
le(e(i), { class: "mr-1 size-3.5" }), h(), t(n, i);
|
|
242
|
-
},
|
|
243
|
-
$$slots: { default: !0 }
|
|
244
|
-
}), l(r), i(() => _(s, c(q))), t(n, r);
|
|
245
|
-
};
|
|
246
|
-
n(g, (e) => {
|
|
247
|
-
c(q) && e(v);
|
|
248
|
-
});
|
|
249
|
-
var y = p(g, 2), b = (e) => {
|
|
250
|
-
var n = Le(), r = o(n, !0);
|
|
251
|
-
l(n), i(() => _(r, c(I))), t(e, n);
|
|
252
|
-
};
|
|
253
|
-
n(y, (e) => {
|
|
254
|
-
c(I) && e(b);
|
|
255
|
-
}), l(a), i(() => _(m, `${c(K) ?? ""} is ready to use.`)), t(r, a);
|
|
256
|
-
}, E = (a) => {
|
|
257
|
-
var u = Ke(), f = o(u), m = o(f);
|
|
258
|
-
k(m, {
|
|
259
|
-
for: "category-dialog-name",
|
|
260
|
-
children: (e, n) => {
|
|
261
|
-
h();
|
|
262
|
-
var a = r();
|
|
263
|
-
i((e) => _(a, e), [() => A()]), t(e, a);
|
|
264
|
-
},
|
|
265
|
-
$$slots: { default: !0 }
|
|
266
|
-
});
|
|
267
|
-
var v = p(m, 2);
|
|
268
|
-
{
|
|
269
|
-
let e = d(() => A()), t = d(() => c(I) ? "true" : void 0), n = d(() => c(I) ? "category-dialog-name-error" : void 0);
|
|
270
|
-
we(v, {
|
|
271
|
-
id: "category-dialog-name",
|
|
272
|
-
name: "name",
|
|
273
|
-
type: "text",
|
|
274
|
-
get placeholder() {
|
|
275
|
-
return c(e);
|
|
276
|
-
},
|
|
277
|
-
maxlength: 255,
|
|
278
|
-
required: !0,
|
|
279
|
-
get disabled() {
|
|
280
|
-
return c(L);
|
|
281
|
-
},
|
|
282
|
-
get "aria-invalid"() {
|
|
283
|
-
return c(t);
|
|
284
|
-
},
|
|
285
|
-
get "aria-describedby"() {
|
|
286
|
-
return c(n);
|
|
287
|
-
},
|
|
288
|
-
autocomplete: "off",
|
|
289
|
-
get value() {
|
|
290
|
-
return c(F);
|
|
291
|
-
},
|
|
292
|
-
set value(e) {
|
|
293
|
-
b(F, e, !0);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
var y = p(v, 2), S = (e) => {
|
|
298
|
-
var n = ze(), r = o(n, !0);
|
|
299
|
-
l(n), i(() => _(r, c(I))), t(e, n);
|
|
300
|
-
};
|
|
301
|
-
n(y, (e) => {
|
|
302
|
-
c(I) && e(S);
|
|
303
|
-
}), l(f);
|
|
304
|
-
var T = p(f, 2), E = o(T);
|
|
305
|
-
k(E, {
|
|
306
|
-
for: "category-dialog-api-mode",
|
|
307
|
-
children: (e, n) => {
|
|
308
|
-
h(), t(e, r("API access"));
|
|
309
|
-
},
|
|
310
|
-
$$slots: { default: !0 }
|
|
311
|
-
}), w(p(E, 2), () => N.Root, (n, a) => {
|
|
312
|
-
a(n, {
|
|
313
|
-
type: "single",
|
|
314
|
-
get value() {
|
|
315
|
-
return c(R);
|
|
316
|
-
},
|
|
317
|
-
get disabled() {
|
|
318
|
-
return c(L);
|
|
319
|
-
},
|
|
320
|
-
onValueChange: (e) => {
|
|
321
|
-
(e === "unavailable" || e === "global" || e === "category") && b(R, e, !0);
|
|
322
|
-
},
|
|
323
|
-
children: (n, a) => {
|
|
324
|
-
var o = j(), s = e(o);
|
|
325
|
-
w(s, () => N.Trigger, (n, a) => {
|
|
326
|
-
a(n, {
|
|
327
|
-
id: "category-dialog-api-mode",
|
|
328
|
-
class: "h-10 w-full",
|
|
329
|
-
children: (n, a) => {
|
|
330
|
-
var o = g();
|
|
331
|
-
w(e(o), () => N.Value, (e, n) => {
|
|
332
|
-
n(e, {
|
|
333
|
-
placeholder: "Select API access",
|
|
334
|
-
children: (e, n) => {
|
|
335
|
-
h();
|
|
336
|
-
var a = r();
|
|
337
|
-
i(() => _(a, c(R) === "unavailable" ? "Unavailable" : c(R) === "global" ? "Global" : "Category API")), t(e, a);
|
|
338
|
-
},
|
|
339
|
-
$$slots: { default: !0 }
|
|
340
|
-
});
|
|
341
|
-
}), t(n, o);
|
|
342
|
-
},
|
|
343
|
-
$$slots: { default: !0 }
|
|
344
|
-
});
|
|
345
|
-
}), w(p(s, 2), () => N.Content, (n, i) => {
|
|
346
|
-
i(n, {
|
|
347
|
-
children: (n, i) => {
|
|
348
|
-
var a = Be(), o = e(a);
|
|
349
|
-
w(o, () => N.Item, (e, n) => {
|
|
350
|
-
n(e, {
|
|
351
|
-
value: "unavailable",
|
|
352
|
-
children: (e, n) => {
|
|
353
|
-
h(), t(e, r("Unavailable"));
|
|
354
|
-
},
|
|
355
|
-
$$slots: { default: !0 }
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
var s = p(o, 2);
|
|
359
|
-
w(s, () => N.Item, (e, n) => {
|
|
360
|
-
n(e, {
|
|
361
|
-
value: "global",
|
|
362
|
-
children: (e, n) => {
|
|
363
|
-
h(), t(e, r("Global"));
|
|
364
|
-
},
|
|
365
|
-
$$slots: { default: !0 }
|
|
366
|
-
});
|
|
367
|
-
}), w(p(s, 2), () => N.Item, (e, n) => {
|
|
368
|
-
n(e, {
|
|
369
|
-
value: "category",
|
|
370
|
-
children: (e, n) => {
|
|
371
|
-
h(), t(e, r("Category API"));
|
|
372
|
-
},
|
|
373
|
-
$$slots: { default: !0 }
|
|
374
|
-
});
|
|
375
|
-
}), t(n, a);
|
|
376
|
-
},
|
|
377
|
-
$$slots: { default: !0 }
|
|
378
|
-
});
|
|
379
|
-
}), t(n, o);
|
|
380
|
-
},
|
|
381
|
-
$$slots: { default: !0 }
|
|
382
|
-
});
|
|
383
|
-
}), l(T);
|
|
384
|
-
var D = p(T, 2), te = (e) => {
|
|
385
|
-
var n = Ve(), a = o(n), s = o(a);
|
|
386
|
-
k(s, {
|
|
387
|
-
class: "text-sm",
|
|
388
|
-
children: (e, n) => {
|
|
389
|
-
h(), t(e, r("Permissions"));
|
|
390
|
-
},
|
|
391
|
-
$$slots: { default: !0 }
|
|
392
|
-
});
|
|
393
|
-
var u = p(s, 2), d = o(u);
|
|
394
|
-
O(d, {
|
|
395
|
-
type: "button",
|
|
396
|
-
variant: "outline",
|
|
397
|
-
size: "sm",
|
|
398
|
-
onclick: () => tt("read-write"),
|
|
399
|
-
children: (e, n) => {
|
|
400
|
-
h(), t(e, r("Read / Write"));
|
|
401
|
-
},
|
|
402
|
-
$$slots: { default: !0 }
|
|
403
|
-
}), O(p(d, 2), {
|
|
404
|
-
type: "button",
|
|
405
|
-
variant: "outline",
|
|
406
|
-
size: "sm",
|
|
407
|
-
onclick: () => tt("read-edit-write"),
|
|
408
|
-
children: (e, n) => {
|
|
409
|
-
h(), t(e, r("Read / Edit / Write"));
|
|
410
|
-
},
|
|
411
|
-
$$slots: { default: !0 }
|
|
412
|
-
}), l(u), l(a);
|
|
413
|
-
var f = p(a, 2), m = o(f), g = o(m);
|
|
414
|
-
C(g), h(2), l(m);
|
|
415
|
-
var _ = p(m, 2), v = o(_);
|
|
416
|
-
C(v), h(2), l(_);
|
|
417
|
-
var y = p(_, 2), S = o(y);
|
|
418
|
-
C(S), h(2), l(y), l(f), l(n), i(() => {
|
|
419
|
-
g.disabled = c(L), v.disabled = c(L), S.disabled = c(L);
|
|
420
|
-
}), x(g, () => c(z), (e) => b(z, e)), x(v, () => c(B), (e) => b(B, e)), x(S, () => c(V), (e) => b(V, e)), t(e, n);
|
|
421
|
-
};
|
|
422
|
-
n(D, (e) => {
|
|
423
|
-
c(R) !== "unavailable" && e(te);
|
|
424
|
-
});
|
|
425
|
-
var ne = p(D, 2), re = (e) => {
|
|
426
|
-
var a = Ge(), s = o(a), u = o(s);
|
|
427
|
-
k(o(u), {
|
|
428
|
-
children: (e, n) => {
|
|
429
|
-
h(), t(e, r("Category API keys"));
|
|
430
|
-
},
|
|
431
|
-
$$slots: { default: !0 }
|
|
432
|
-
}), h(), l(u);
|
|
433
|
-
var f = p(u, 2);
|
|
434
|
-
{
|
|
435
|
-
let e = d(() => c(L) || c(G) || M.category.apiMode !== "category");
|
|
436
|
-
O(f, {
|
|
437
|
-
type: "button",
|
|
438
|
-
size: "sm",
|
|
439
|
-
onclick: Je,
|
|
440
|
-
get disabled() {
|
|
441
|
-
return c(e);
|
|
442
|
-
},
|
|
443
|
-
children: (e, n) => {
|
|
444
|
-
h(), t(e, r("Create key"));
|
|
445
|
-
},
|
|
446
|
-
$$slots: { default: !0 }
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
l(s);
|
|
450
|
-
var m = p(s, 2), g = (e) => {
|
|
451
|
-
t(e, He());
|
|
452
|
-
};
|
|
453
|
-
n(m, (e) => {
|
|
454
|
-
M.category.apiMode !== "category" && e(g);
|
|
455
|
-
});
|
|
456
|
-
var v = p(m, 2), y = (e) => {
|
|
457
|
-
var n = Ue(), a = p(o(n), 2), s = o(a, !0);
|
|
458
|
-
l(a), O(p(a, 2), {
|
|
459
|
-
type: "button",
|
|
460
|
-
size: "sm",
|
|
461
|
-
variant: "outline",
|
|
462
|
-
class: "mt-2",
|
|
463
|
-
onclick: () => navigator.clipboard.writeText(c(Y)),
|
|
464
|
-
children: (e, n) => {
|
|
465
|
-
h(), t(e, r("Copy key"));
|
|
466
|
-
},
|
|
467
|
-
$$slots: { default: !0 }
|
|
468
|
-
}), l(n), i(() => _(s, c(Y))), t(e, n);
|
|
469
|
-
};
|
|
470
|
-
n(v, (e) => {
|
|
471
|
-
c(Y) && e(y);
|
|
472
|
-
});
|
|
473
|
-
var b = p(v, 2);
|
|
474
|
-
ee(b, 21, () => c(H), (e) => e.id, (e, n) => {
|
|
475
|
-
var a = We(), s = o(a), u = o(s);
|
|
476
|
-
l(s);
|
|
477
|
-
var f = p(s, 2), m = o(f);
|
|
478
|
-
{
|
|
479
|
-
let e = d(() => !c(n).recoverable && !c(U)[c(n).id]);
|
|
480
|
-
O(m, {
|
|
481
|
-
type: "button",
|
|
482
|
-
size: "sm",
|
|
483
|
-
variant: "outline",
|
|
484
|
-
onclick: () => Xe(c(n)),
|
|
485
|
-
get disabled() {
|
|
486
|
-
return c(e);
|
|
487
|
-
},
|
|
488
|
-
children: (e, a) => {
|
|
489
|
-
h();
|
|
490
|
-
var o = r();
|
|
491
|
-
i(() => _(o, c(n).recoverable || c(U)[c(n).id] ? "Copy key" : "Rotate to enable copy")), t(e, o);
|
|
492
|
-
},
|
|
493
|
-
$$slots: { default: !0 }
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
O(p(m, 2), {
|
|
497
|
-
type: "button",
|
|
498
|
-
size: "sm",
|
|
499
|
-
variant: "destructive",
|
|
500
|
-
onclick: () => Ye(c(n).id),
|
|
501
|
-
get disabled() {
|
|
502
|
-
return c(G);
|
|
503
|
-
},
|
|
504
|
-
children: (e, n) => {
|
|
505
|
-
h(), t(e, r("Revoke"));
|
|
506
|
-
},
|
|
507
|
-
$$slots: { default: !0 }
|
|
508
|
-
}), l(f), l(a), i(() => _(u, `${c(n).name ?? ""} · ${c(n).prefix ?? ""}…`)), t(e, a);
|
|
509
|
-
}), l(b), l(a), t(e, a);
|
|
510
|
-
};
|
|
511
|
-
n(ne, (e) => {
|
|
512
|
-
M.mode === "edit" && c(R) === "category" && M.category?.id && e(re);
|
|
513
|
-
}), l(u), s("submit", u, nt), t(a, u);
|
|
514
|
-
}, ie = (e) => {
|
|
515
|
-
var n = Le(), r = o(n, !0);
|
|
516
|
-
l(n), i(() => _(r, c(I))), t(e, n);
|
|
517
|
-
};
|
|
518
|
-
n(v, (e) => {
|
|
519
|
-
c(J) ? e(y) : c(K) ? e(S, 1) : c(Q) ? c(I) && e(ie, 3) : e(E, 2);
|
|
520
|
-
}), ne(p(v, 2), {
|
|
521
|
-
class: "gap-2 max-sm:flex-col max-sm:items-stretch",
|
|
522
|
-
children: (a, o) => {
|
|
523
|
-
var s = j(), l = e(s), u = (e) => {
|
|
524
|
-
O(e, {
|
|
525
|
-
variant: "outline",
|
|
526
|
-
type: "button",
|
|
527
|
-
onclick: $,
|
|
528
|
-
get disabled() {
|
|
529
|
-
return c(L);
|
|
530
|
-
},
|
|
531
|
-
children: (e, n) => {
|
|
532
|
-
h();
|
|
533
|
-
var a = r();
|
|
534
|
-
i((e) => _(a, e), [() => be()]), t(e, a);
|
|
535
|
-
},
|
|
536
|
-
$$slots: { default: !0 }
|
|
537
|
-
});
|
|
538
|
-
};
|
|
539
|
-
n(l, (e) => {
|
|
540
|
-
!c(K) && !c(J) && e(u);
|
|
541
|
-
});
|
|
542
|
-
var f = p(l, 2);
|
|
543
|
-
{
|
|
544
|
-
let r = d(() => c(Q) ? "button" : "submit"), a = d(() => c(Q) ? "destructive" : "default"), o = d(() => c(K) || c(J) ? $ : nt), s = d(() => c(L) || !c(Q) && !c(K) && !c(J) && c(Z).length === 0);
|
|
545
|
-
O(f, {
|
|
546
|
-
get type() {
|
|
547
|
-
return c(r);
|
|
548
|
-
},
|
|
549
|
-
get variant() {
|
|
550
|
-
return c(a);
|
|
551
|
-
},
|
|
552
|
-
get onclick() {
|
|
553
|
-
return c(o);
|
|
554
|
-
},
|
|
555
|
-
get disabled() {
|
|
556
|
-
return c(s);
|
|
557
|
-
},
|
|
558
|
-
children: (r, a) => {
|
|
559
|
-
var o = qe(), s = e(o), l = (e) => {
|
|
560
|
-
T(e, { class: "mr-1 size-4 animate-spin" });
|
|
561
|
-
};
|
|
562
|
-
n(s, (e) => {
|
|
563
|
-
c(L) && e(l);
|
|
564
|
-
});
|
|
565
|
-
var u = p(s);
|
|
566
|
-
i(() => _(u, ` ${(c(K) || c(J) ? "Done" : c($e)) ?? ""}`)), t(r, o);
|
|
567
|
-
},
|
|
568
|
-
$$slots: { default: !0 }
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
t(a, s);
|
|
572
|
-
},
|
|
573
|
-
$$slots: { default: !0 }
|
|
574
|
-
}), t(a, f);
|
|
575
|
-
},
|
|
576
|
-
$$slots: { default: !0 }
|
|
577
|
-
}), f();
|
|
578
|
-
}
|
|
579
|
-
//#endregion
|
|
580
|
-
export { M as t };
|