@hiai-gg/docsmint 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -23
- package/backend/src/lib/lifecycle-service.ts +574 -0
- package/{packages/sdk/dist → dist}/client.d.ts +16 -1
- package/{packages/sdk/dist → dist}/client.js +25 -1
- package/dist/frontend/DatePicker-BcMD49PV.js +275 -0
- package/dist/frontend/SettingsDialog-DiAyhzw0.js +4852 -0
- package/dist/frontend/ShareDialog-DaZf1raY.js +1317 -0
- package/dist/frontend/api/categories.d.ts +14 -0
- package/dist/frontend/api/categories.js +2 -0
- package/dist/frontend/api/documents.d.ts +16 -0
- package/dist/frontend/api/documents.js +2 -0
- package/dist/frontend/api/folders.d.ts +14 -0
- package/dist/frontend/api/folders.js +2 -0
- package/dist/frontend/api/settings.d.ts +10 -0
- package/dist/frontend/api/settings.js +2 -0
- package/dist/frontend/api/tags.d.ts +15 -0
- package/dist/frontend/api/tags.js +2 -0
- package/dist/frontend/categories-BE6ZpZl8.js +61 -0
- package/dist/frontend/client-B9hzI0W8.js +76 -0
- package/dist/frontend/client-C6QQGb0e.js +2766 -0
- package/dist/frontend/components/settings.d.ts +2 -0
- package/dist/frontend/components/settings.js +2 -0
- package/dist/frontend/components/sidebar.d.ts +2 -0
- package/dist/frontend/components/sidebar.js +4569 -0
- package/dist/frontend/context-DbnW5yib.js +31 -0
- package/dist/frontend/dashboard.d.ts +2 -0
- package/dist/frontend/dashboard.js +2152 -0
- package/dist/frontend/documents-DFVS9SsL.js +83 -0
- package/dist/frontend/extension.d.ts +35 -0
- package/dist/frontend/extension.js +10 -0
- package/dist/frontend/folders-CGe9diAG.js +91 -0
- package/dist/frontend/frontend.css +2 -0
- package/dist/frontend/i18n.d.ts +5 -0
- package/dist/frontend/i18n.js +8 -0
- package/dist/frontend/input-ieWIt8I7.js +257 -0
- package/dist/frontend/messages-CTGAsqFu.js +1106 -0
- package/dist/frontend/resolve-Bl6xmJl_.js +2068 -0
- package/dist/frontend/schemas-DwtKylCJ.js +3002 -0
- package/dist/frontend/search.d.ts +2 -0
- package/dist/frontend/search.js +1001 -0
- package/dist/frontend/settings-PCrOtied.js +1313 -0
- package/dist/frontend/shared-document.d.ts +16 -0
- package/dist/frontend/shared-document.js +193 -0
- package/dist/frontend/tag-C5xrg-bb.js +53 -0
- package/dist/frontend/tag-store.svelte-B3839FYq.js +6152 -0
- package/dist/frontend/tags-DVXTut0p.js +48 -0
- package/dist/frontend/theme.d.ts +4 -0
- package/dist/frontend/theme.js +8 -0
- package/dist/frontend/theme.svelte-ei0QxXa8.js +49 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -0
- package/dist/lifecycle.d.ts +90 -0
- package/dist/lifecycle.js +99 -0
- package/{packages/sdk/dist → dist}/types.d.ts +5 -0
- package/dist/workspace.d.ts +21 -0
- package/dist/workspace.js +66 -0
- package/package.json +75 -35
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +41 -0
- package/packages/mcp-server/src/index.ts +1 -1
- package/frontend/src/lib/components/editor/shared-document.ts +0 -237
- package/frontend/src/lib/extensions/context.ts +0 -60
- package/frontend/src/lib/extensions/doc-tabs.ts +0 -18
- package/frontend/src/lib/extensions/resolve.ts +0 -48
- package/frontend/src/lib/extensions/types.ts +0 -202
- package/frontend/src/lib/hosts/DocsmintSharedDocumentHost.svelte +0 -65
- package/frontend/src/lib/hosts/HiaiDocsDashboardHost.svelte +0 -1007
- package/frontend/src/lib/hosts/HiaiDocsExtensionProvider.svelte +0 -20
- package/frontend/src/lib/hosts/HiaiDocsSearchHost.svelte +0 -996
- package/frontend/src/lib/hosts/index.ts +0 -25
- package/frontend/src/lib/index.ts +0 -65
- package/frontend/src/lib/stores/doc-tab-registry.svelte.ts +0 -68
- package/packages/sdk/dist/index.d.ts +0 -3
- package/packages/sdk/dist/index.js +0 -1
- /package/{packages/sdk/dist → dist}/types.js +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* failures (502 / 503 / 504 / timeout / network reset) are retried
|
|
8
8
|
* with exponential backoff up to `config.retries` attempts.
|
|
9
9
|
*/
|
|
10
|
-
import type { DocsApiKeyCreated, DocsApiKeyListResponse, DocsAttachment, DocsAttachmentConfirmInput, DocsAttachmentListResponse, DocsAttachmentPresignInput, DocsAttachmentPresignResponse, DocsCategory, DocsCategoryInput, DocsCategoryUpdate, DocsDocument, DocsDocumentCreateInput, DocsDocumentListResponse, DocsDocumentPipeline, DocsDocumentUpdateInput, DocsFolder, DocsFolderCreateInput, DocsFolderUpdateInput, DocsGraphEntitiesResponse, DocsGraphRelatedResponse, DocsGraphSearchResponse, DocsHealthResponse, DocsRequestContext, DocsSearchOptions, DocsSearchResponse, DocsSearchSuggestItem, DocsSharedContent, DocsShareLink, DocsShareListResponse, DocsShareRole, DocsTag, DocsVersion, DocsVersionDiff } from "./types.js";
|
|
10
|
+
import type { DocsApiKeyCreated, DocsApiKeyListResponse, DocsAttachment, DocsAttachmentConfirmInput, DocsAttachmentListResponse, DocsAttachmentPresignInput, DocsAttachmentPresignResponse, DocsCategory, DocsCategoryInput, DocsCategoryUpdate, DocsDocument, DocsDocumentCreateInput, DocsDocumentListResponse, DocsDocumentCursorPage, DocsDocumentPipeline, DocsDocumentUpdateInput, DocsFolder, DocsFolderCreateInput, DocsFolderUpdateInput, DocsGraphEntitiesResponse, DocsGraphRelatedResponse, DocsGraphSearchResponse, DocsHealthResponse, DocsRequestContext, DocsSearchOptions, DocsSearchResponse, DocsSearchSuggestItem, DocsSharedContent, DocsShareLink, DocsShareListResponse, DocsShareRole, DocsTag, DocsVersion, DocsVersionDiff } from "./types.js";
|
|
11
11
|
export interface DocsClientConfig {
|
|
12
12
|
/** Base URL of the hiai-docs API, e.g. `http://localhost:50700`. */
|
|
13
13
|
baseUrl: string;
|
|
@@ -68,6 +68,15 @@ export declare class DocsClient {
|
|
|
68
68
|
page?: number;
|
|
69
69
|
limit?: number;
|
|
70
70
|
}, context?: DocsRequestContext): Promise<DocsDocumentListResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* List documents through the bounded cursor API. Cursors are opaque and
|
|
73
|
+
* bound by the server to the authenticated workspace and category scope.
|
|
74
|
+
*/
|
|
75
|
+
listDocuments(options?: {
|
|
76
|
+
categoryId?: string;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
limit?: number;
|
|
79
|
+
}, context?: DocsRequestContext): Promise<DocsDocumentCursorPage>;
|
|
71
80
|
duplicateDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
72
81
|
getDocumentPipeline(id: string, context?: DocsRequestContext): Promise<DocsDocumentPipeline>;
|
|
73
82
|
publishDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
@@ -183,5 +192,11 @@ export declare class DocsClient {
|
|
|
183
192
|
private wrapNetworkError;
|
|
184
193
|
private isTimeoutError;
|
|
185
194
|
private mergeContext;
|
|
195
|
+
/**
|
|
196
|
+
* Capture transport defaults at the boundary. Hosts often reuse a mutable
|
|
197
|
+
* request object for a whole incoming request; retaining its HeaderInit by
|
|
198
|
+
* reference would let later mutations silently change this client's scope.
|
|
199
|
+
*/
|
|
200
|
+
private snapshotContext;
|
|
186
201
|
private toBlob;
|
|
187
202
|
}
|
|
@@ -52,7 +52,7 @@ export class DocsClient {
|
|
|
52
52
|
this.config = {
|
|
53
53
|
baseUrl: config.baseUrl.replace(/\/+$/, ""),
|
|
54
54
|
apiKey: config.apiKey,
|
|
55
|
-
requestContext: config.requestContext,
|
|
55
|
+
requestContext: this.snapshotContext(config.requestContext),
|
|
56
56
|
fetch: config.fetch ?? fetch,
|
|
57
57
|
timeout: config.timeout ?? 10_000,
|
|
58
58
|
retries: config.retries ?? 3,
|
|
@@ -102,6 +102,19 @@ export class DocsClient {
|
|
|
102
102
|
}),
|
|
103
103
|
}, context);
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* List documents through the bounded cursor API. Cursors are opaque and
|
|
107
|
+
* bound by the server to the authenticated workspace and category scope.
|
|
108
|
+
*/
|
|
109
|
+
async listDocuments(options = {}, context) {
|
|
110
|
+
return this.request("GET", "/api/documents/cursor", {
|
|
111
|
+
query: this.cleanQuery({
|
|
112
|
+
categoryId: options.categoryId,
|
|
113
|
+
cursor: options.cursor,
|
|
114
|
+
limit: options.limit,
|
|
115
|
+
}),
|
|
116
|
+
}, context);
|
|
117
|
+
}
|
|
105
118
|
async duplicateDoc(id, context) {
|
|
106
119
|
return this.request("POST", `/api/documents/${encodeURIComponent(id)}/duplicate`, undefined, context);
|
|
107
120
|
}
|
|
@@ -543,6 +556,17 @@ export class DocsClient {
|
|
|
543
556
|
},
|
|
544
557
|
};
|
|
545
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* Capture transport defaults at the boundary. Hosts often reuse a mutable
|
|
561
|
+
* request object for a whole incoming request; retaining its HeaderInit by
|
|
562
|
+
* reference would let later mutations silently change this client's scope.
|
|
563
|
+
*/
|
|
564
|
+
snapshotContext(context) {
|
|
565
|
+
if (!context)
|
|
566
|
+
return undefined;
|
|
567
|
+
const headers = Object.freeze(Object.fromEntries(new Headers(context.headers).entries()));
|
|
568
|
+
return Object.freeze({ ...context, headers });
|
|
569
|
+
}
|
|
546
570
|
toBlob(file, mimeType) {
|
|
547
571
|
if (file instanceof Blob) {
|
|
548
572
|
// Re-wrap with explicit MIME if the caller passed one.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { A as e, B as t, F as n, G as r, H as i, I as a, J as o, K as s, L as c, M as ee, N as l, P as u, Q as d, R as te, U as ne, V as re, W as ie, X as ae, Y as oe, Z as se, j as ce, k as le, q as ue, z as de } from "./messages-CTGAsqFu.js";
|
|
2
|
+
import "./context-DbnW5yib.js";
|
|
3
|
+
import { $ as f, A as p, C as m, D as h, E as fe, H as g, J as _, L as v, M as y, N as b, R as x, T as S, _t as C, d as w, dt as T, et as E, ft as pe, g as me, h as he, i as D, it as O, j as k, k as A, l as j, lt as ge, n as M, nt as N, o as P, ot as F, q as I, r as L, t as R, tt as z } from "./client-C6QQGb0e.js";
|
|
4
|
+
import { a as B, i as V, r as H } from "./resolve-Bl6xmJl_.js";
|
|
5
|
+
import { u as _e } from "./tag-store.svelte-B3839FYq.js";
|
|
6
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/badge/badge.svelte
|
|
7
|
+
var U = /* @__PURE__ */ new Set([
|
|
8
|
+
"$$slots",
|
|
9
|
+
"$$events",
|
|
10
|
+
"$$legacy",
|
|
11
|
+
"ref",
|
|
12
|
+
"class",
|
|
13
|
+
"variant",
|
|
14
|
+
"children"
|
|
15
|
+
]), W = b("<div><!></div>");
|
|
16
|
+
function G(e, t) {
|
|
17
|
+
pe(t, !0);
|
|
18
|
+
let n = M(t, "ref", 15, null), r = M(t, "variant", 3, "default"), i = L(t, U);
|
|
19
|
+
var a = W();
|
|
20
|
+
j(a, (e) => ({
|
|
21
|
+
class: e,
|
|
22
|
+
...i
|
|
23
|
+
}), [() => V(K({ variant: r() }), t.class)]);
|
|
24
|
+
var o = f(a), s = (e) => {
|
|
25
|
+
var n = y();
|
|
26
|
+
A(E(n), () => t.children), k(e, n);
|
|
27
|
+
};
|
|
28
|
+
h(o, (e) => {
|
|
29
|
+
t.children && e(s);
|
|
30
|
+
}), C(a), P(a, (e) => n(e), () => n()), k(e, a), T();
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/badge/index.js
|
|
34
|
+
var K = B({
|
|
35
|
+
base: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
36
|
+
variants: { variant: {
|
|
37
|
+
default: "border-transparent bg-primary text-primary-foreground shadow",
|
|
38
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
39
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow",
|
|
40
|
+
outline: "text-foreground"
|
|
41
|
+
} },
|
|
42
|
+
defaultVariants: { variant: "default" }
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/calendar.svelte
|
|
46
|
+
function q(e, t) {
|
|
47
|
+
let n = R(t, [
|
|
48
|
+
"children",
|
|
49
|
+
"$$slots",
|
|
50
|
+
"$$events",
|
|
51
|
+
"$$legacy"
|
|
52
|
+
]), r = [
|
|
53
|
+
["path", { d: "M8 2v4" }],
|
|
54
|
+
["path", { d: "M16 2v4" }],
|
|
55
|
+
["rect", {
|
|
56
|
+
width: "18",
|
|
57
|
+
height: "18",
|
|
58
|
+
x: "3",
|
|
59
|
+
y: "4",
|
|
60
|
+
rx: "2"
|
|
61
|
+
}],
|
|
62
|
+
["path", { d: "M3 10h18" }]
|
|
63
|
+
];
|
|
64
|
+
H(e, D({ name: "calendar" }, () => n, {
|
|
65
|
+
get iconNode() {
|
|
66
|
+
return r;
|
|
67
|
+
},
|
|
68
|
+
children: (e, n) => {
|
|
69
|
+
var r = y();
|
|
70
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
71
|
+
},
|
|
72
|
+
$$slots: { default: !0 }
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/chevron-left.svelte
|
|
77
|
+
function J(e, t) {
|
|
78
|
+
let n = R(t, [
|
|
79
|
+
"children",
|
|
80
|
+
"$$slots",
|
|
81
|
+
"$$events",
|
|
82
|
+
"$$legacy"
|
|
83
|
+
]), r = [["path", { d: "m15 18-6-6 6-6" }]];
|
|
84
|
+
H(e, D({ name: "chevron-left" }, () => n, {
|
|
85
|
+
get iconNode() {
|
|
86
|
+
return r;
|
|
87
|
+
},
|
|
88
|
+
children: (e, n) => {
|
|
89
|
+
var r = y();
|
|
90
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
91
|
+
},
|
|
92
|
+
$$slots: { default: !0 }
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/folder-kanban.svelte
|
|
97
|
+
function Y(e, t) {
|
|
98
|
+
let n = R(t, [
|
|
99
|
+
"children",
|
|
100
|
+
"$$slots",
|
|
101
|
+
"$$events",
|
|
102
|
+
"$$legacy"
|
|
103
|
+
]), r = [
|
|
104
|
+
["path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" }],
|
|
105
|
+
["path", { d: "M8 10v4" }],
|
|
106
|
+
["path", { d: "M12 10v2" }],
|
|
107
|
+
["path", { d: "M16 10v6" }]
|
|
108
|
+
];
|
|
109
|
+
H(e, D({ name: "folder-kanban" }, () => n, {
|
|
110
|
+
get iconNode() {
|
|
111
|
+
return r;
|
|
112
|
+
},
|
|
113
|
+
children: (e, n) => {
|
|
114
|
+
var r = y();
|
|
115
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
116
|
+
},
|
|
117
|
+
$$slots: { default: !0 }
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/rotate-ccw.svelte
|
|
122
|
+
function X(e, t) {
|
|
123
|
+
let n = R(t, [
|
|
124
|
+
"children",
|
|
125
|
+
"$$slots",
|
|
126
|
+
"$$events",
|
|
127
|
+
"$$legacy"
|
|
128
|
+
]), r = [["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }]];
|
|
129
|
+
H(e, D({ name: "rotate-ccw" }, () => n, {
|
|
130
|
+
get iconNode() {
|
|
131
|
+
return r;
|
|
132
|
+
},
|
|
133
|
+
children: (e, n) => {
|
|
134
|
+
var r = y();
|
|
135
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
136
|
+
},
|
|
137
|
+
$$slots: { default: !0 }
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/lib/components/DatePicker.svelte
|
|
142
|
+
var ve = b("<span class=\"dp-weekday svelte-zmry26\"> </span>"), ye = b("<span class=\"dp-empty svelte-zmry26\"></span>"), be = b("<button type=\"button\"> </button>"), xe = b("<button type=\"button\" class=\"dp-clear svelte-zmry26\"> </button>"), Se = b("<div class=\"dp-popover svelte-zmry26\" role=\"dialog\"><div class=\"dp-header svelte-zmry26\"><button type=\"button\" class=\"dp-nav svelte-zmry26\"><!></button> <span class=\"dp-title svelte-zmry26\"> </span> <button type=\"button\" class=\"dp-nav svelte-zmry26\"><!></button></div> <div class=\"dp-weekdays svelte-zmry26\"></div> <div class=\"dp-grid svelte-zmry26\"></div> <!></div>"), Ce = b("<div class=\"datepicker svelte-zmry26\"><button type=\"button\" aria-haspopup=\"dialog\" class=\"dp-trigger svelte-zmry26\"><!> <span> </span></button> <!></div>");
|
|
143
|
+
function we(m, v) {
|
|
144
|
+
pe(v, !0);
|
|
145
|
+
let b = M(v, "value", 15, ""), D = M(v, "ariaLabel", 19, () => ce()), A = M(v, "placeholder", 19, () => l()), j = F(!1), L = F(null), R = [
|
|
146
|
+
t(),
|
|
147
|
+
de(),
|
|
148
|
+
te(),
|
|
149
|
+
c(),
|
|
150
|
+
a(),
|
|
151
|
+
n(),
|
|
152
|
+
u()
|
|
153
|
+
], B = [
|
|
154
|
+
d(),
|
|
155
|
+
se(),
|
|
156
|
+
ae(),
|
|
157
|
+
oe(),
|
|
158
|
+
o(),
|
|
159
|
+
ue(),
|
|
160
|
+
s(),
|
|
161
|
+
r(),
|
|
162
|
+
ie(),
|
|
163
|
+
ne(),
|
|
164
|
+
i(),
|
|
165
|
+
re()
|
|
166
|
+
];
|
|
167
|
+
function V(e) {
|
|
168
|
+
return String(e).padStart(2, "0");
|
|
169
|
+
}
|
|
170
|
+
function H(e) {
|
|
171
|
+
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
172
|
+
return t ? {
|
|
173
|
+
y: Number(t[1]),
|
|
174
|
+
m: Number(t[2]) - 1,
|
|
175
|
+
d: Number(t[3])
|
|
176
|
+
} : null;
|
|
177
|
+
}
|
|
178
|
+
let U = /* @__PURE__ */ new Date(), W = F(N(U.getFullYear())), G = F(N(U.getMonth()));
|
|
179
|
+
_(() => {
|
|
180
|
+
if (g(j)) {
|
|
181
|
+
let e = H(b());
|
|
182
|
+
e && (O(W, e.y, !0), O(G, e.m, !0));
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
let K = ge(() => H(b()));
|
|
186
|
+
function Y() {
|
|
187
|
+
let e = (new Date(g(W), g(G), 1).getDay() + 6) % 7, t = new Date(g(W), g(G) + 1, 0).getDate(), n = [];
|
|
188
|
+
for (let t = 0; t < e; t++) n.push(null);
|
|
189
|
+
for (let e = 1; e <= t; e++) n.push(e);
|
|
190
|
+
return n;
|
|
191
|
+
}
|
|
192
|
+
function X(e) {
|
|
193
|
+
return e === U.getDate() && g(G) === U.getMonth() && g(W) === U.getFullYear();
|
|
194
|
+
}
|
|
195
|
+
function we(e) {
|
|
196
|
+
return g(K) !== null && g(K).y === g(W) && g(K).m === g(G) && g(K).d === e;
|
|
197
|
+
}
|
|
198
|
+
function Te(e) {
|
|
199
|
+
b(`${g(W)}-${V(g(G) + 1)}-${V(e)}`), O(j, !1), v.onchange?.();
|
|
200
|
+
}
|
|
201
|
+
function Ee() {
|
|
202
|
+
b(""), O(j, !1), v.onchange?.();
|
|
203
|
+
}
|
|
204
|
+
function De() {
|
|
205
|
+
g(G) === 0 ? (O(G, 11), O(W, g(W) - 1)) : O(G, g(G) - 1);
|
|
206
|
+
}
|
|
207
|
+
function Oe() {
|
|
208
|
+
g(G) === 11 ? (O(G, 0), O(W, g(W) + 1)) : O(G, g(G) + 1);
|
|
209
|
+
}
|
|
210
|
+
_(() => {
|
|
211
|
+
if (!g(j)) return;
|
|
212
|
+
function e(e) {
|
|
213
|
+
g(L) && !g(L).contains(e.target) && O(j, !1);
|
|
214
|
+
}
|
|
215
|
+
function t(e) {
|
|
216
|
+
e.key === "Escape" && O(j, !1);
|
|
217
|
+
}
|
|
218
|
+
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
219
|
+
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
var Z = Ce(), Q = f(Z), ke = f(Q);
|
|
223
|
+
q(ke, { class: "size-3.5 shrink-0 opacity-70" });
|
|
224
|
+
var $ = z(ke, 2), Ae = f($, !0);
|
|
225
|
+
C($), C(Q);
|
|
226
|
+
var je = z(Q, 2), Me = (t) => {
|
|
227
|
+
var n = Se(), r = f(n), i = f(r);
|
|
228
|
+
J(f(i), { class: "size-4" }), C(i);
|
|
229
|
+
var a = z(i, 2), o = f(a);
|
|
230
|
+
C(a);
|
|
231
|
+
var s = z(a, 2);
|
|
232
|
+
_e(f(s), { class: "size-4" }), C(s), C(r);
|
|
233
|
+
var c = z(r, 2);
|
|
234
|
+
S(c, 20, () => R, (e) => e, (e, t) => {
|
|
235
|
+
var n = ve(), r = f(n, !0);
|
|
236
|
+
C(n), I(() => p(r, t)), k(e, n);
|
|
237
|
+
}), C(c);
|
|
238
|
+
var l = z(c, 2);
|
|
239
|
+
S(l, 21, Y, fe, (e, t) => {
|
|
240
|
+
var n = y(), r = E(n), i = (e) => {
|
|
241
|
+
k(e, ye());
|
|
242
|
+
}, a = (e) => {
|
|
243
|
+
var n = be();
|
|
244
|
+
let r;
|
|
245
|
+
var i = f(n, !0);
|
|
246
|
+
C(n), I((e) => {
|
|
247
|
+
r = he(n, 1, "dp-day svelte-zmry26", null, r, e), p(i, g(t));
|
|
248
|
+
}, [() => ({
|
|
249
|
+
selected: we(g(t)),
|
|
250
|
+
today: X(g(t))
|
|
251
|
+
})]), x("click", n, () => Te(g(t))), k(e, n);
|
|
252
|
+
};
|
|
253
|
+
h(r, (e) => {
|
|
254
|
+
g(t) === null ? e(i) : e(a, -1);
|
|
255
|
+
}), k(e, n);
|
|
256
|
+
}), C(l);
|
|
257
|
+
var u = z(l, 2), d = (e) => {
|
|
258
|
+
var t = xe(), n = f(t, !0);
|
|
259
|
+
C(t), I((e) => p(n, e), [() => ee()]), x("click", t, Ee), k(e, t);
|
|
260
|
+
};
|
|
261
|
+
h(u, (e) => {
|
|
262
|
+
b() && e(d);
|
|
263
|
+
}), C(n), I((e, t) => {
|
|
264
|
+
w(n, "aria-label", D()), w(i, "aria-label", e), p(o, `${B[g(G)] ?? ""} ${g(W) ?? ""}`), w(s, "aria-label", t);
|
|
265
|
+
}, [() => e(), () => le()]), x("click", i, De), x("click", s, Oe), k(t, n);
|
|
266
|
+
};
|
|
267
|
+
h(je, (e) => {
|
|
268
|
+
g(j) && e(Me);
|
|
269
|
+
}), C(Z), P(Z, (e) => O(L, e), () => g(L)), I(() => {
|
|
270
|
+
w(Q, "id", v.id), w(Q, "aria-label", D()), w(Q, "aria-expanded", g(j)), he($, 1, me(b() ? "" : "dp-placeholder"), "svelte-zmry26"), p(Ae, b() || A());
|
|
271
|
+
}), x("click", Q, () => O(j, !g(j))), k(m, Z), T();
|
|
272
|
+
}
|
|
273
|
+
v(["click"]);
|
|
274
|
+
//#endregion
|
|
275
|
+
export { q as a, J as i, X as n, G as o, Y as r, we as t };
|