mdzilla 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/_chunks/exporter.mjs +2 -2
- package/dist/_chunks/server.mjs +1510 -0
- package/dist/cli/main.mjs +25 -4
- package/package.json +16 -15
|
@@ -0,0 +1,1510 @@
|
|
|
1
|
+
import { mkdir, readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
2
|
+
import { basename, dirname, extname, join } from "node:path";
|
|
3
|
+
import { parseMeta, renderToMarkdown, renderToText } from "md4x";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { init, parseMeta as parseMeta$1, renderToHtml, renderToText as renderToText$1 } from "md4x/napi";
|
|
7
|
+
import { highlightText } from "@speed-highlight/core";
|
|
8
|
+
//#region web/.output/server/index.mjs
|
|
9
|
+
globalThis.__nitro_main__ = import.meta.url;
|
|
10
|
+
var te = Object.defineProperty, v = (e, t) => () => (e && (t = e(e = 0)), t), y = (e, t) => {
|
|
11
|
+
let n = {};
|
|
12
|
+
for (var r in e) te(n, r, {
|
|
13
|
+
get: e[r],
|
|
14
|
+
enumerable: !0
|
|
15
|
+
});
|
|
16
|
+
return t || te(n, Symbol.toStringTag, { value: `Module` }), n;
|
|
17
|
+
}, ne = {};
|
|
18
|
+
globalThis.__nitro_vite_envs__ = ne;
|
|
19
|
+
var b, re = v((() => {
|
|
20
|
+
b = (() => {
|
|
21
|
+
let e = function() {};
|
|
22
|
+
return e.prototype = Object.create(null), Object.freeze(e.prototype), e;
|
|
23
|
+
})();
|
|
24
|
+
})), ie, x, ae = v((() => {
|
|
25
|
+
ie = URL, x = Response;
|
|
26
|
+
}));
|
|
27
|
+
function oe(e = ``) {
|
|
28
|
+
return e.replace(ve, ``);
|
|
29
|
+
}
|
|
30
|
+
function se(e, t = 200) {
|
|
31
|
+
return !e || (typeof e == `string` && (e = +e), e < 100 || e > 599) ? t : e;
|
|
32
|
+
}
|
|
33
|
+
function ce(e, t) {
|
|
34
|
+
if (e == null) return !0;
|
|
35
|
+
if (t !== `object`) return t === `boolean` || t === `number` || t === `string`;
|
|
36
|
+
if (typeof e.toJSON == `function` || Array.isArray(e)) return !0;
|
|
37
|
+
if (typeof e.pipe == `function` || typeof e.pipeTo == `function`) return !1;
|
|
38
|
+
if (e instanceof b) return !0;
|
|
39
|
+
let n = Object.getPrototypeOf(e);
|
|
40
|
+
return n === Object.prototype || n === null;
|
|
41
|
+
}
|
|
42
|
+
function S(e, t, n = {}) {
|
|
43
|
+
if (typeof e?.then == `function`) return (e.catch?.((e) => e) || Promise.resolve(e)).then((e) => S(e, t, n));
|
|
44
|
+
let r = le(e, t, n);
|
|
45
|
+
if (typeof r?.then == `function`) return S(r, t, n);
|
|
46
|
+
let { onResponse: i } = n;
|
|
47
|
+
return i ? Promise.resolve(i(r, t)).then(() => r) : r;
|
|
48
|
+
}
|
|
49
|
+
function le(e, t, n, r) {
|
|
50
|
+
if (e === ye) return new x(null);
|
|
51
|
+
if (e === N && (e = new M({
|
|
52
|
+
status: 404,
|
|
53
|
+
message: `Cannot find any route matching [${t.req.method}] ${t.url}`
|
|
54
|
+
})), e && e instanceof Error) {
|
|
55
|
+
let i = M.isError(e), a = i ? e : new M(e);
|
|
56
|
+
i || (a.unhandled = !0, e?.stack && (a.stack = e.stack)), a.unhandled && !n.silent && console.error(a);
|
|
57
|
+
let { onError: o } = n;
|
|
58
|
+
return o && !r ? Promise.resolve(o(a, t)).catch((e) => e).then((r) => le(r ?? e, t, n, !0)) : fe(a, n.debug);
|
|
59
|
+
}
|
|
60
|
+
let i = t[k], a = i?.[A];
|
|
61
|
+
if (t[k] = void 0, !(e instanceof Response)) {
|
|
62
|
+
let r = ue(e, t, n), o = r.status || i?.status;
|
|
63
|
+
return new x(de(t.req.method, o) ? null : r.body, {
|
|
64
|
+
status: o,
|
|
65
|
+
statusText: r.statusText || i?.statusText,
|
|
66
|
+
headers: r.headers && a ? C(r.headers, a) : r.headers || a
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (!a || r || !e.ok) return e;
|
|
70
|
+
try {
|
|
71
|
+
return C(e.headers, a, e.headers), e;
|
|
72
|
+
} catch {
|
|
73
|
+
return new x(de(t.req.method, e.status) ? null : e.body, {
|
|
74
|
+
status: e.status,
|
|
75
|
+
statusText: e.statusText,
|
|
76
|
+
headers: C(e.headers, a)
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function C(e, t, n = new Headers(e)) {
|
|
81
|
+
for (let [e, r] of t) e === `set-cookie` ? n.append(e, r) : n.set(e, r);
|
|
82
|
+
return n;
|
|
83
|
+
}
|
|
84
|
+
function ue(e, t, n) {
|
|
85
|
+
if (e == null) return {
|
|
86
|
+
body: ``,
|
|
87
|
+
headers: be
|
|
88
|
+
};
|
|
89
|
+
let r = typeof e;
|
|
90
|
+
if (r === `string`) return { body: e };
|
|
91
|
+
if (e instanceof Uint8Array) return t.res.headers.set(`content-length`, e.byteLength.toString()), { body: e };
|
|
92
|
+
if (e instanceof P || e?.constructor?.name === `HTTPResponse`) return e;
|
|
93
|
+
if (ce(e, r)) return {
|
|
94
|
+
body: JSON.stringify(e, void 0, n.debug ? 2 : void 0),
|
|
95
|
+
headers: L
|
|
96
|
+
};
|
|
97
|
+
if (r === `bigint`) return {
|
|
98
|
+
body: e.toString(),
|
|
99
|
+
headers: L
|
|
100
|
+
};
|
|
101
|
+
if (e instanceof Blob) {
|
|
102
|
+
let t = new Headers({
|
|
103
|
+
"content-type": e.type,
|
|
104
|
+
"content-length": e.size.toString()
|
|
105
|
+
}), n = e.name;
|
|
106
|
+
return n && (n = encodeURIComponent(n), t.set(`content-disposition`, `filename="${n}"; filename*=UTF-8''${n}`)), {
|
|
107
|
+
body: e.stream(),
|
|
108
|
+
headers: t
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return r === `symbol` ? { body: e.toString() } : r === `function` ? { body: `${e.name}()` } : { body: e };
|
|
112
|
+
}
|
|
113
|
+
function de(e, t) {
|
|
114
|
+
return e === `HEAD` || t === 100 || t === 101 || t === 102 || t === 204 || t === 205 || t === 304;
|
|
115
|
+
}
|
|
116
|
+
function fe(e, t) {
|
|
117
|
+
return new x(JSON.stringify({
|
|
118
|
+
...e.toJSON(),
|
|
119
|
+
stack: t && e.stack ? e.stack.split(`
|
|
120
|
+
`).map((e) => e.trim()) : void 0
|
|
121
|
+
}, void 0, t ? 2 : void 0), {
|
|
122
|
+
status: e.status,
|
|
123
|
+
statusText: e.statusText,
|
|
124
|
+
headers: e.headers ? C(L, e.headers) : new Headers(L)
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function w(e, t, n, r = 0) {
|
|
128
|
+
if (r === t.length) return n(e);
|
|
129
|
+
let i = t[r], a, o, s = () => a ? o : (a = !0, o = w(e, t, n, r + 1), o), c = i(e, s);
|
|
130
|
+
return pe(c) ? s() : typeof c?.then == `function` ? c.then((e) => pe(e) ? s() : e) : c;
|
|
131
|
+
}
|
|
132
|
+
function pe(e) {
|
|
133
|
+
return e === void 0 || e === N;
|
|
134
|
+
}
|
|
135
|
+
function me(e) {
|
|
136
|
+
let t = new b();
|
|
137
|
+
if (!e || e === `?`) return t;
|
|
138
|
+
let n = e.length, r = ``, i = ``, a = -1, o = -1, s = !1, c = !1, l = !1, u = !1, d = !1, f = 0;
|
|
139
|
+
for (let p = 0; p < n + 1; p++) switch (f = p === n ? 38 : e.charCodeAt(p), f) {
|
|
140
|
+
case 38:
|
|
141
|
+
if (d = o > a, d || (o = p), r = e.slice(a + 1, o), d || r.length > 0) {
|
|
142
|
+
if (l && (r = r.replace(R, ` `)), s) try {
|
|
143
|
+
r = decodeURIComponent(r);
|
|
144
|
+
} catch {}
|
|
145
|
+
if (d && (i = e.slice(o + 1, p), u && (i = i.replace(R, ` `)), c)) try {
|
|
146
|
+
i = decodeURIComponent(i);
|
|
147
|
+
} catch {}
|
|
148
|
+
let n = t[r];
|
|
149
|
+
n === void 0 ? t[r] = i : Array.isArray(n) ? n.push(i) : t[r] = [n, i];
|
|
150
|
+
}
|
|
151
|
+
i = ``, a = p, o = p, s = !1, c = !1, l = !1, u = !1;
|
|
152
|
+
break;
|
|
153
|
+
case 61:
|
|
154
|
+
o <= a ? o = p : c = !0;
|
|
155
|
+
break;
|
|
156
|
+
case 43:
|
|
157
|
+
o > a ? u = !0 : l = !0;
|
|
158
|
+
break;
|
|
159
|
+
case 37:
|
|
160
|
+
o > a ? c = !0 : s = !0;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
return t;
|
|
164
|
+
}
|
|
165
|
+
function he(e) {
|
|
166
|
+
return me((e.url || new URL(e.req.url)).search.slice(1));
|
|
167
|
+
}
|
|
168
|
+
function T(e) {
|
|
169
|
+
if (typeof e == `function`) return ge(e);
|
|
170
|
+
let t = e.handler || (e.fetch ? function(t) {
|
|
171
|
+
return e.fetch(t.req);
|
|
172
|
+
} : z);
|
|
173
|
+
return Object.assign(ge(e.middleware?.length ? function(n) {
|
|
174
|
+
return w(n, e.middleware, t);
|
|
175
|
+
} : t), e);
|
|
176
|
+
}
|
|
177
|
+
function ge(e) {
|
|
178
|
+
return `fetch` in e ? e : Object.assign(e, { fetch: (t) => {
|
|
179
|
+
typeof t == `string` && (t = new URL(t, `http://_`)), t instanceof URL && (t = new Request(t));
|
|
180
|
+
let n = new j(t);
|
|
181
|
+
try {
|
|
182
|
+
return Promise.resolve(S(e(n), n));
|
|
183
|
+
} catch (e) {
|
|
184
|
+
return Promise.resolve(S(e, n));
|
|
185
|
+
}
|
|
186
|
+
} });
|
|
187
|
+
}
|
|
188
|
+
function E(e) {
|
|
189
|
+
let t, n;
|
|
190
|
+
return T(function(r) {
|
|
191
|
+
return t ? t(r) : (n ??= Promise.resolve(e()).then(function(e) {
|
|
192
|
+
if (t = D(e) || D(e.default), typeof t != `function`) throw TypeError(`Invalid lazy handler`, { cause: { resolved: e } });
|
|
193
|
+
return t;
|
|
194
|
+
})).then((e) => e(r));
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function D(e) {
|
|
198
|
+
if (typeof e == `function`) return e;
|
|
199
|
+
if (typeof e?.handler == `function`) return e.handler;
|
|
200
|
+
if (typeof e?.fetch == `function`) return function(t) {
|
|
201
|
+
return e.fetch(t.req);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
var O, k, A, j, _e, ve, M, N, ye, P, F, I, be, L, R, z, xe, Se = v((() => {
|
|
205
|
+
re(), ae(), O = `h3.internal.event.`, k = Symbol.for(`${O}res`), A = Symbol.for(`${O}res.headers`), j = class {
|
|
206
|
+
app;
|
|
207
|
+
req;
|
|
208
|
+
url;
|
|
209
|
+
context;
|
|
210
|
+
static __is_event__ = !0;
|
|
211
|
+
constructor(e, t, n) {
|
|
212
|
+
this.context = t || e.context || new b(), this.req = e, this.app = n;
|
|
213
|
+
let r = e._url;
|
|
214
|
+
this.url = r && r instanceof URL ? r : new ie(e.url);
|
|
215
|
+
}
|
|
216
|
+
get res() {
|
|
217
|
+
return this[k] ||= new _e();
|
|
218
|
+
}
|
|
219
|
+
get runtime() {
|
|
220
|
+
return this.req.runtime;
|
|
221
|
+
}
|
|
222
|
+
waitUntil(e) {
|
|
223
|
+
this.req.waitUntil?.(e);
|
|
224
|
+
}
|
|
225
|
+
toString() {
|
|
226
|
+
return `[${this.req.method}] ${this.req.url}`;
|
|
227
|
+
}
|
|
228
|
+
toJSON() {
|
|
229
|
+
return this.toString();
|
|
230
|
+
}
|
|
231
|
+
get node() {
|
|
232
|
+
return this.req.runtime?.node;
|
|
233
|
+
}
|
|
234
|
+
get headers() {
|
|
235
|
+
return this.req.headers;
|
|
236
|
+
}
|
|
237
|
+
get path() {
|
|
238
|
+
return this.url.pathname + this.url.search;
|
|
239
|
+
}
|
|
240
|
+
get method() {
|
|
241
|
+
return this.req.method;
|
|
242
|
+
}
|
|
243
|
+
}, _e = class {
|
|
244
|
+
status;
|
|
245
|
+
statusText;
|
|
246
|
+
get headers() {
|
|
247
|
+
return this[A] ||= new Headers();
|
|
248
|
+
}
|
|
249
|
+
}, ve = /[^\u0009\u0020-\u007E]/g, M = class e extends Error {
|
|
250
|
+
get name() {
|
|
251
|
+
return `HTTPError`;
|
|
252
|
+
}
|
|
253
|
+
status;
|
|
254
|
+
statusText;
|
|
255
|
+
headers;
|
|
256
|
+
cause;
|
|
257
|
+
data;
|
|
258
|
+
body;
|
|
259
|
+
unhandled;
|
|
260
|
+
static isError(e) {
|
|
261
|
+
return e instanceof Error && e?.name === `HTTPError`;
|
|
262
|
+
}
|
|
263
|
+
static status(t, n, r) {
|
|
264
|
+
return new e({
|
|
265
|
+
...r,
|
|
266
|
+
statusText: n,
|
|
267
|
+
status: t
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
constructor(e, t) {
|
|
271
|
+
let n, r;
|
|
272
|
+
typeof e == `string` ? (n = e, r = t) : r = e;
|
|
273
|
+
let i = se(r?.status || r?.cause?.status || r?.status || r?.statusCode, 500), a = oe(r?.statusText || r?.cause?.statusText || r?.statusText || r?.statusMessage), o = n || r?.message || r?.cause?.message || r?.statusText || r?.statusMessage || [
|
|
274
|
+
`HTTPError`,
|
|
275
|
+
i,
|
|
276
|
+
a
|
|
277
|
+
].filter(Boolean).join(` `);
|
|
278
|
+
super(o, { cause: r }), this.cause = r, this.status = i, this.statusText = a || void 0;
|
|
279
|
+
let s = r?.headers || r?.cause?.headers;
|
|
280
|
+
this.headers = s ? new Headers(s) : void 0, this.unhandled = r?.unhandled ?? r?.cause?.unhandled ?? void 0, this.data = r?.data, this.body = r?.body;
|
|
281
|
+
}
|
|
282
|
+
get statusCode() {
|
|
283
|
+
return this.status;
|
|
284
|
+
}
|
|
285
|
+
get statusMessage() {
|
|
286
|
+
return this.statusText;
|
|
287
|
+
}
|
|
288
|
+
toJSON() {
|
|
289
|
+
let e = this.unhandled;
|
|
290
|
+
return {
|
|
291
|
+
status: this.status,
|
|
292
|
+
statusText: this.statusText,
|
|
293
|
+
unhandled: e,
|
|
294
|
+
message: e ? `HTTPError` : this.message,
|
|
295
|
+
data: e ? void 0 : this.data,
|
|
296
|
+
...e ? void 0 : this.body
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
}, N = Symbol.for(`h3.notFound`), ye = Symbol.for(`h3.handled`), P = class {
|
|
300
|
+
#e;
|
|
301
|
+
#t;
|
|
302
|
+
body;
|
|
303
|
+
constructor(e, t) {
|
|
304
|
+
this.body = e, this.#t = t;
|
|
305
|
+
}
|
|
306
|
+
get status() {
|
|
307
|
+
return this.#t?.status || 200;
|
|
308
|
+
}
|
|
309
|
+
get statusText() {
|
|
310
|
+
return this.#t?.statusText || `OK`;
|
|
311
|
+
}
|
|
312
|
+
get headers() {
|
|
313
|
+
return this.#e ||= new Headers(this.#t?.headers);
|
|
314
|
+
}
|
|
315
|
+
}, F = (e) => (...t) => {
|
|
316
|
+
throw Error(`Headers are frozen (${e} ${t.join(`, `)})`);
|
|
317
|
+
}, I = class extends Headers {
|
|
318
|
+
set = F(`set`);
|
|
319
|
+
append = F(`append`);
|
|
320
|
+
delete = F(`delete`);
|
|
321
|
+
}, be = new I({ "content-length": `0` }), L = new I({ "content-type": `application/json;charset=UTF-8` }), R = /\+/g, z = () => N, xe = class {
|
|
322
|
+
config;
|
|
323
|
+
"~middleware";
|
|
324
|
+
"~routes" = [];
|
|
325
|
+
constructor(e = {}) {
|
|
326
|
+
this[`~middleware`] = [], this.config = e, this.fetch = this.fetch.bind(this), this.handler = this.handler.bind(this);
|
|
327
|
+
}
|
|
328
|
+
fetch(e) {
|
|
329
|
+
return this[`~request`](e);
|
|
330
|
+
}
|
|
331
|
+
handler(e) {
|
|
332
|
+
let t = this[`~findRoute`](e);
|
|
333
|
+
t && (e.context.params = t.params, e.context.matchedRoute = t.data);
|
|
334
|
+
let n = t?.data.handler || z, r = this[`~getMiddleware`](e, t);
|
|
335
|
+
return r.length > 0 ? w(e, r, n) : n(e);
|
|
336
|
+
}
|
|
337
|
+
"~request"(e, t) {
|
|
338
|
+
let n = new j(e, t, this), r;
|
|
339
|
+
try {
|
|
340
|
+
if (this.config.onRequest) {
|
|
341
|
+
let e = this.config.onRequest(n);
|
|
342
|
+
r = typeof e?.then == `function` ? e.then(() => this.handler(n)) : this.handler(n);
|
|
343
|
+
} else r = this.handler(n);
|
|
344
|
+
} catch (e) {
|
|
345
|
+
r = Promise.reject(e);
|
|
346
|
+
}
|
|
347
|
+
return S(r, n, this.config);
|
|
348
|
+
}
|
|
349
|
+
"~findRoute"(e) {}
|
|
350
|
+
"~addRoute"(e) {
|
|
351
|
+
this[`~routes`].push(e);
|
|
352
|
+
}
|
|
353
|
+
"~getMiddleware"(e, t) {
|
|
354
|
+
let n = t?.data.middleware, r = this[`~middleware`];
|
|
355
|
+
return n ? [...r, ...n] : r;
|
|
356
|
+
}
|
|
357
|
+
}, new TextEncoder();
|
|
358
|
+
})), B = v((() => {
|
|
359
|
+
Se();
|
|
360
|
+
}));
|
|
361
|
+
B(), ae();
|
|
362
|
+
var we = (e, t) => {
|
|
363
|
+
let n = V(e, t);
|
|
364
|
+
return new x(typeof n.body == `string` ? n.body : JSON.stringify(n.body, null, 2), n);
|
|
365
|
+
};
|
|
366
|
+
function V(e, t) {
|
|
367
|
+
let n = e.unhandled ?? !M.isError(e), { status: r = 500, statusText: i = `` } = n ? {} : e;
|
|
368
|
+
if (r === 404) {
|
|
369
|
+
let e = t.url || new URL(t.req.url);
|
|
370
|
+
if (/^\/[^/]/.test(`/`) && !e.pathname.startsWith(`/`)) return {
|
|
371
|
+
status: 302,
|
|
372
|
+
headers: new Headers({ location: `/${e.pathname.slice(1)}${e.search}` })
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
let a = new Headers(n ? {} : e.headers);
|
|
376
|
+
return a.set(`content-type`, `application/json; charset=utf-8`), {
|
|
377
|
+
status: r,
|
|
378
|
+
statusText: i,
|
|
379
|
+
headers: a,
|
|
380
|
+
body: {
|
|
381
|
+
error: !0,
|
|
382
|
+
...n ? {
|
|
383
|
+
status: r,
|
|
384
|
+
unhandled: !0
|
|
385
|
+
} : typeof e.toJSON == `function` ? e.toJSON() : {
|
|
386
|
+
status: r,
|
|
387
|
+
statusText: i,
|
|
388
|
+
message: e.message
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
var Te = [we];
|
|
394
|
+
async function Ee(e, t) {
|
|
395
|
+
for (let n of Te) try {
|
|
396
|
+
let r = await n(e, t, { defaultHandler: V });
|
|
397
|
+
if (r) return r;
|
|
398
|
+
} catch (e) {
|
|
399
|
+
console.error(e);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
String.fromCharCode;
|
|
403
|
+
var De = /%2f/gi;
|
|
404
|
+
function Oe(e = ``) {
|
|
405
|
+
try {
|
|
406
|
+
return decodeURIComponent(`` + e);
|
|
407
|
+
} catch {
|
|
408
|
+
return `` + e;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function ke(e) {
|
|
412
|
+
return Oe(e.replace(De, `%252F`));
|
|
413
|
+
}
|
|
414
|
+
var Ae = /\/$|\/\?|\/#/, je = /^\.?\//;
|
|
415
|
+
function H(e = ``, t) {
|
|
416
|
+
return t ? Ae.test(e) : e.endsWith(`/`);
|
|
417
|
+
}
|
|
418
|
+
function Me(e = ``, t) {
|
|
419
|
+
if (!t) return (H(e) ? e.slice(0, -1) : e) || `/`;
|
|
420
|
+
if (!H(e, !0)) return e || `/`;
|
|
421
|
+
let n = e, r = ``, i = e.indexOf(`#`);
|
|
422
|
+
i !== -1 && (n = e.slice(0, i), r = e.slice(i));
|
|
423
|
+
let [a, ...o] = n.split(`?`);
|
|
424
|
+
return ((a.endsWith(`/`) ? a.slice(0, -1) : a) || `/`) + (o.length > 0 ? `?${o.join(`?`)}` : ``) + r;
|
|
425
|
+
}
|
|
426
|
+
function Ne(e = ``, t) {
|
|
427
|
+
if (!t) return e.endsWith(`/`) ? e : e + `/`;
|
|
428
|
+
if (H(e, !0)) return e || `/`;
|
|
429
|
+
let n = e, r = ``, i = e.indexOf(`#`);
|
|
430
|
+
if (i !== -1 && (n = e.slice(0, i), r = e.slice(i), !n)) return r;
|
|
431
|
+
let [a, ...o] = n.split(`?`);
|
|
432
|
+
return a + `/` + (o.length > 0 ? `?${o.join(`?`)}` : ``) + r;
|
|
433
|
+
}
|
|
434
|
+
function Pe(e = ``) {
|
|
435
|
+
return e.startsWith(`/`);
|
|
436
|
+
}
|
|
437
|
+
function Fe(e = ``) {
|
|
438
|
+
return Pe(e) ? e : `/` + e;
|
|
439
|
+
}
|
|
440
|
+
function Ie(e) {
|
|
441
|
+
return e && e !== `/`;
|
|
442
|
+
}
|
|
443
|
+
function Le(e, ...t) {
|
|
444
|
+
let n = e || ``;
|
|
445
|
+
for (let e of t.filter((e) => Ie(e))) if (n) {
|
|
446
|
+
let t = e.replace(je, ``);
|
|
447
|
+
n = Ne(n) + t;
|
|
448
|
+
} else n = e;
|
|
449
|
+
return n;
|
|
450
|
+
}
|
|
451
|
+
var Re = ((e) => function(t) {
|
|
452
|
+
for (let [n, r] of Object.entries(e.options || {})) t.res.headers.set(n, r);
|
|
453
|
+
}), U = {
|
|
454
|
+
"/assets/index-BC9qhYL0.js": {
|
|
455
|
+
type: `text/javascript; charset=utf-8`,
|
|
456
|
+
etag: `"2c32-P9M3yJbjRmzrrPeoaEqQI2KbS4E"`,
|
|
457
|
+
mtime: `2026-03-14T09:22:03.134Z`,
|
|
458
|
+
size: 11314,
|
|
459
|
+
path: `../public/assets/index-BC9qhYL0.js`,
|
|
460
|
+
data: `KGZ1bmN0aW9uKCl7bGV0IGU9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudChgbGlua2ApLnJlbExpc3Q7aWYoZSYmZS5zdXBwb3J0cyYmZS5zdXBwb3J0cyhgbW9kdWxlcHJlbG9hZGApKXJldHVybjtmb3IobGV0IGUgb2YgZG9jd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Bmb250LXdlaWdodD0iYm9sZCIgZm9udC1zaXplPSIxOCIgZmlsbD0iI0VERjJGNCI+IzwvdGV4dD4KCiAgPCEtLSBFeWVzIC0tPgogIDxjaXJjbGUgY3g9Ijc4IiBjeT0iMTcyIiByPSI1IiBmaWxsPSIjRUYyMzNDIi8+CiAgPGNpcmNsZSBjeD0iMTIyIiBjeT0iMTcyIiByPSI1IiBmaWxsPSIjRUYyMzNDIi8+CgogIDwhLS0gVGVldGggKHppbGxhIGJpdGUgb24gYm90dG9tKSAtLT4KICA8cG9seWdvbiBwb2ludHM9IjY4LDE4MCA3NCwxOTIgODAsMTgwIiBmaWxsPSIjRURGMkY0Ii8+CiAgPHBvbHlnb24gcG9pbnRzPSI4OCwxODAgOTQsMTkyIDEwMCwxODAiIGZpbGw9IiNFREYyRjQiLz4KICA8cG9seWdvbiBwb2ludHM9IjEwOCwxODAgMTE0LDE5MiAxMjAsMTgwIiBmaWxsPSIjRURGMkY0Ii8+CiAgPHBvbHlnb24gcG9pbnRzPSIxMjgsMTgwIDEzNCwxOTIgMTQwLDE4MCIgZmlsbD0iI0VERjJGNCIvPgoKICA8IS0tIFNwaWtlcyBvbiB0b3AgKHppbGxhIGhvcm5zKSAtLT4KICA8cG9seWdvbiBwb2ludHM9IjcwLDMwIDc4LDEwIDg2LDMwIiBmaWxsPSIjMkIyRDQyIi8+CiAgPHBvbHlnb24gcG9pbnRzPSI5MiwzMCAxMDAsNiAxMDgsMzAiIGZpbGw9IiMyQjJENDIiLz4KICA8cG9seWdvbiBwb2ludHM9IjExNCwzMCAxMjIsMTAgMTMwLDMwIiBmaWxsPSIjMkIyRDQyIi8+Cjwvc3ZnPgo=`
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
function ze(e) {
|
|
472
|
+
if (U[e]) return U[e]._data ? U[e]._data : U[e].data ? (U[e]._data = Uint8Array.from(atob(U[e].data), (e) => e.charCodeAt(0)), U[e]._data) : U[e].data;
|
|
473
|
+
}
|
|
474
|
+
var Be = {};
|
|
475
|
+
function Ve(e = ``) {
|
|
476
|
+
if (U[e]) return !0;
|
|
477
|
+
for (let t in Be) if (e.startsWith(t)) return !0;
|
|
478
|
+
return !1;
|
|
479
|
+
}
|
|
480
|
+
function He(e) {
|
|
481
|
+
return U[e];
|
|
482
|
+
}
|
|
483
|
+
B();
|
|
484
|
+
var Ue = new Set([`HEAD`, `GET`]), We = {
|
|
485
|
+
gzip: `.gz`,
|
|
486
|
+
br: `.br`,
|
|
487
|
+
zstd: `.zst`
|
|
488
|
+
}, Ge = T((e) => {
|
|
489
|
+
if (e.req.method && !Ue.has(e.req.method)) return;
|
|
490
|
+
let t = ke(Fe(Me(e.url.pathname))), n, r = [...(e.req.headers.get(`accept-encoding`) || ``).split(`,`).map((e) => We[e.trim()]).filter(Boolean).sort(), ``];
|
|
491
|
+
for (let e of r) for (let r of [t + e, Le(t, `index.html` + e)]) {
|
|
492
|
+
let e = He(r);
|
|
493
|
+
if (e) {
|
|
494
|
+
n = e, t = r;
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
if (!n) {
|
|
499
|
+
if (Ve(t)) throw e.res.headers.delete(`Cache-Control`), new M({ status: 404 });
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
if (r.length > 1 && e.res.headers.append(`Vary`, `Accept-Encoding`), e.req.headers.get(`if-none-match`) === n.etag) return e.res.status = 304, e.res.statusText = `Not Modified`, ``;
|
|
503
|
+
let i = e.req.headers.get(`if-modified-since`), a = new Date(n.mtime);
|
|
504
|
+
return i && n.mtime && new Date(i) >= a ? (e.res.status = 304, e.res.statusText = `Not Modified`, ``) : (n.type && e.res.headers.set(`Content-Type`, n.type), n.etag && !e.res.headers.has(`ETag`) && e.res.headers.set(`ETag`, n.etag), n.mtime && !e.res.headers.has(`Last-Modified`) && e.res.headers.set(`Last-Modified`, a.toUTCString()), n.encoding && !e.res.headers.has(`Content-Encoding`) && e.res.headers.set(`Content-Encoding`, n.encoding), n.size > 0 && !e.res.headers.has(`Content-Length`) && e.res.headers.set(`Content-Length`, n.size.toString()), ze(t));
|
|
505
|
+
}), W = v((() => {
|
|
506
|
+
B();
|
|
507
|
+
}));
|
|
508
|
+
function Ke(e, t, n) {
|
|
509
|
+
let r = [];
|
|
510
|
+
for (let i of e) r.push({
|
|
511
|
+
entry: i,
|
|
512
|
+
depth: t,
|
|
513
|
+
filePath: n.get(i.path)
|
|
514
|
+
}), i.children && r.push(...Ke(i.children, t + 1, n));
|
|
515
|
+
return r;
|
|
516
|
+
}
|
|
517
|
+
function qe(e, t) {
|
|
518
|
+
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
519
|
+
if (n.length === 0) return 0;
|
|
520
|
+
if (n.length > r.length) return -1;
|
|
521
|
+
let i = 0, a = 0, o = -1;
|
|
522
|
+
for (let e = 0; e < r.length && a < n.length; e++) r[e] === n[a] && (o === e - 1 && (i -= 5), (e === 0 || `/\\-_. `.includes(r[e - 1])) && (i -= 10), o >= 0 && (i += e - o - 1), o = e, a++);
|
|
523
|
+
return a < n.length ? -1 : (i += r.length * .1, i);
|
|
524
|
+
}
|
|
525
|
+
function Je(e, t, n) {
|
|
526
|
+
if (!t) return e;
|
|
527
|
+
let r = [];
|
|
528
|
+
for (let i of e) {
|
|
529
|
+
let e = Infinity;
|
|
530
|
+
for (let r of n(i)) {
|
|
531
|
+
let n = qe(t, r);
|
|
532
|
+
n >= 0 && n < e && (e = n);
|
|
533
|
+
}
|
|
534
|
+
e < Infinity && r.push({
|
|
535
|
+
item: i,
|
|
536
|
+
score: e
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
return r.sort((e, t) => e.score - t.score), r.map((e) => e.item);
|
|
540
|
+
}
|
|
541
|
+
var Ye, Xe = v((() => {
|
|
542
|
+
Ye = class {
|
|
543
|
+
source;
|
|
544
|
+
tree = [];
|
|
545
|
+
flat = [];
|
|
546
|
+
_fileMap = /* @__PURE__ */ new Map();
|
|
547
|
+
_contentCache = /* @__PURE__ */ new Map();
|
|
548
|
+
constructor(e) {
|
|
549
|
+
this.source = e;
|
|
550
|
+
}
|
|
551
|
+
async load() {
|
|
552
|
+
let { tree: e, fileMap: t } = await this.source.load();
|
|
553
|
+
this.tree = e, this._fileMap = t, this.flat = Ke(this.tree, 0, this._fileMap), this._contentCache.clear();
|
|
554
|
+
}
|
|
555
|
+
async reload() {
|
|
556
|
+
return this.load();
|
|
557
|
+
}
|
|
558
|
+
async getContent(e) {
|
|
559
|
+
if (!e.filePath || e.entry.page === !1) return;
|
|
560
|
+
let t = this._contentCache.get(e.filePath);
|
|
561
|
+
if (t !== void 0) return t;
|
|
562
|
+
let n = await this.source.readContent(e.filePath);
|
|
563
|
+
return this._contentCache.set(e.filePath, n), n;
|
|
564
|
+
}
|
|
565
|
+
invalidate(e) {
|
|
566
|
+
this._contentCache.delete(e);
|
|
567
|
+
}
|
|
568
|
+
filter(e) {
|
|
569
|
+
return Je(this.flat, e, ({ entry: e }) => [e.title, e.path]);
|
|
570
|
+
}
|
|
571
|
+
get pages() {
|
|
572
|
+
return this.flat.filter((e) => e.entry.page !== !1);
|
|
573
|
+
}
|
|
574
|
+
findByPath(e) {
|
|
575
|
+
return this.flat.find((t) => t.entry.page !== !1 && (t.entry.path === e || t.entry.path === e + `/`));
|
|
576
|
+
}
|
|
577
|
+
async resolvePage(e) {
|
|
578
|
+
let t = e.startsWith(`/`) ? e : `/` + e, n = this.findByPath(t);
|
|
579
|
+
if (n) {
|
|
580
|
+
let e = await this.getContent(n);
|
|
581
|
+
if (e) return {
|
|
582
|
+
entry: n,
|
|
583
|
+
raw: e
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
let r = t.match(/^\/[^/]+(\/.+)$/);
|
|
587
|
+
if (r) {
|
|
588
|
+
let e = this.findByPath(r[1]);
|
|
589
|
+
if (e) {
|
|
590
|
+
let t = await this.getContent(e);
|
|
591
|
+
if (t) return {
|
|
592
|
+
entry: e,
|
|
593
|
+
raw: t
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
let i = await this.source.readContent(t).catch(() => void 0);
|
|
598
|
+
return i ? { raw: i } : {};
|
|
599
|
+
}
|
|
600
|
+
matchIndices(e) {
|
|
601
|
+
if (!e) return [];
|
|
602
|
+
let t = e.toLowerCase(), n = /* @__PURE__ */ new Set();
|
|
603
|
+
for (let e = 0; e < this.flat.length; e++) {
|
|
604
|
+
let { entry: r } = this.flat[e];
|
|
605
|
+
if (r.title.toLowerCase().includes(t) || r.path.toLowerCase().includes(t)) {
|
|
606
|
+
n.add(e);
|
|
607
|
+
let t = this.flat[e].depth;
|
|
608
|
+
for (let r = e + 1; r < this.flat.length && !(this.flat[r].depth <= t); r++) n.add(r);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
return [...n].sort((e, t) => e - t);
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
})), G, K = v((() => {
|
|
615
|
+
G = class {};
|
|
616
|
+
}));
|
|
617
|
+
function Ze(e) {
|
|
618
|
+
let t = e.endsWith(`.md`) ? e.slice(0, -3) : e, n = t.endsWith(`.draft`);
|
|
619
|
+
n && (t = t.slice(0, -6));
|
|
620
|
+
let r = t.match(/^(\d+)\.(.+)$/);
|
|
621
|
+
return r ? {
|
|
622
|
+
order: Number(r[1]),
|
|
623
|
+
slug: r[2],
|
|
624
|
+
draft: n
|
|
625
|
+
} : {
|
|
626
|
+
order: Infinity,
|
|
627
|
+
slug: t,
|
|
628
|
+
draft: n
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
function Qe(e) {
|
|
632
|
+
return e.split(`-`).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(` `);
|
|
633
|
+
}
|
|
634
|
+
async function $e(e) {
|
|
635
|
+
try {
|
|
636
|
+
let { headings: n, ...r } = parseMeta(`---\n${await readFile(join(e, `.navigation.yml`), `utf8`)}\n---\n`);
|
|
637
|
+
return r;
|
|
638
|
+
} catch {
|
|
639
|
+
return {};
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
function et(e) {
|
|
643
|
+
let t = e.navigation;
|
|
644
|
+
if (t === !1) return {
|
|
645
|
+
...e,
|
|
646
|
+
navigation: !1
|
|
647
|
+
};
|
|
648
|
+
if (typeof t == `object` && t) {
|
|
649
|
+
let { navigation: n, ...r } = e;
|
|
650
|
+
return {
|
|
651
|
+
...r,
|
|
652
|
+
...t
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
return e;
|
|
656
|
+
}
|
|
657
|
+
function tt(e) {
|
|
658
|
+
let t = {}, n = !1;
|
|
659
|
+
for (let [r, i] of Object.entries(e)) !it.has(r) && r !== `navigation` && (t[r] = i, n = !0);
|
|
660
|
+
return n ? t : void 0;
|
|
661
|
+
}
|
|
662
|
+
async function nt(e, t) {
|
|
663
|
+
return rt(e, `/`, t || {});
|
|
664
|
+
}
|
|
665
|
+
async function rt(e, i, o) {
|
|
666
|
+
let u = await readdir(e), d = [];
|
|
667
|
+
for (let n of u) {
|
|
668
|
+
if (n.startsWith(`.`) || n.startsWith(`_`) || n === `node_modules` || n === `dist` || n === `package.json` || n === `pnpm-lock.yaml` || n === `pnpm-workspace.yaml`) continue;
|
|
669
|
+
let u = join(e, n), f;
|
|
670
|
+
try {
|
|
671
|
+
f = await stat(u);
|
|
672
|
+
} catch {
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
if (f.isDirectory()) {
|
|
676
|
+
let { order: e, slug: t } = Ze(n), r = await $e(u);
|
|
677
|
+
if (r.navigation === !1) continue;
|
|
678
|
+
let a = await rt(u, i === `/` ? `/${t}` : `${i}/${t}`, o), s = a.some((e) => e.slug === ``), c = {
|
|
679
|
+
slug: t,
|
|
680
|
+
path: i === `/` ? `/${t}` : `${i}/${t}`,
|
|
681
|
+
title: r.title || Qe(t),
|
|
682
|
+
order: e,
|
|
683
|
+
...r.icon ? { icon: r.icon } : {},
|
|
684
|
+
...r.description ? { description: r.description } : {},
|
|
685
|
+
...s ? {} : { page: !1 },
|
|
686
|
+
...a.length > 0 ? { children: a } : {}
|
|
687
|
+
};
|
|
688
|
+
d.push(c);
|
|
689
|
+
} else if (extname(n) === `.md`) {
|
|
690
|
+
let { order: e, slug: r, draft: s } = Ze(basename(n));
|
|
691
|
+
if (s && !o.drafts) continue;
|
|
692
|
+
let c = et(parseMeta(await readFile(u, `utf8`)));
|
|
693
|
+
if (c.navigation === !1) continue;
|
|
694
|
+
let f = typeof c.order == `number` ? c.order : e, p = r === `index` ? `` : r, m = c.title || Qe(r) || `index`, h = p === `` ? i === `/` ? `/` : i : i === `/` ? `/${p}` : `${i}/${p}`, g = tt(c), _ = {
|
|
695
|
+
slug: p,
|
|
696
|
+
path: h,
|
|
697
|
+
title: m,
|
|
698
|
+
order: f,
|
|
699
|
+
...c.icon ? { icon: c.icon } : {},
|
|
700
|
+
...c.description ? { description: c.description } : {},
|
|
701
|
+
...s ? { draft: !0 } : {},
|
|
702
|
+
...g
|
|
703
|
+
};
|
|
704
|
+
d.push(_);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
return d.sort((e, t) => e.order - t.order || e.slug.localeCompare(t.slug)), d;
|
|
708
|
+
}
|
|
709
|
+
var it, at = v((() => {
|
|
710
|
+
it = new Set([
|
|
711
|
+
`slug`,
|
|
712
|
+
`path`,
|
|
713
|
+
`title`,
|
|
714
|
+
`order`,
|
|
715
|
+
`icon`,
|
|
716
|
+
`description`,
|
|
717
|
+
`page`,
|
|
718
|
+
`children`,
|
|
719
|
+
`headings`
|
|
720
|
+
]);
|
|
721
|
+
}));
|
|
722
|
+
function ot(e) {
|
|
723
|
+
let t = e.endsWith(`.draft`) ? e.slice(0, -6) : e, n = t.match(/^(\d+)\.(.+)$/);
|
|
724
|
+
return n ? n[2] : t;
|
|
725
|
+
}
|
|
726
|
+
async function st(e, t) {
|
|
727
|
+
let r = /* @__PURE__ */ new Map(), i = await readdir(t, { withFileTypes: !0 });
|
|
728
|
+
for (let n of i) {
|
|
729
|
+
if (n.name.startsWith(`.`) || n.name.startsWith(`_`) || n.name === `node_modules` || n.name === `dist`) continue;
|
|
730
|
+
let i = join(t, n.name);
|
|
731
|
+
if (n.isDirectory()) {
|
|
732
|
+
let t = ot(n.name), a = await st(e === `/` ? `/${t}` : `${e}/${t}`, i);
|
|
733
|
+
for (let [e, t] of a) r.set(e, t);
|
|
734
|
+
} else if (extname(n.name) === `.md`) {
|
|
735
|
+
let t = ot(n.name.replace(/\.md$/, ``)), a = t === `index` ? `` : t, o = a === `` ? e === `/` ? `/` : e : e === `/` ? `/${a}` : `${e}/${a}`;
|
|
736
|
+
r.set(o, i);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
return r;
|
|
740
|
+
}
|
|
741
|
+
async function ct(e, n) {
|
|
742
|
+
let r;
|
|
743
|
+
try {
|
|
744
|
+
r = JSON.parse(await readFile(join(n, `_navigation.json`), `utf8`));
|
|
745
|
+
} catch {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
lt(e, r);
|
|
749
|
+
}
|
|
750
|
+
function lt(e, t) {
|
|
751
|
+
let n = new Map(t.map((e, t) => [e.path, t]));
|
|
752
|
+
e.sort((e, t) => (n.get(e.path) ?? Infinity) - (n.get(t.path) ?? Infinity));
|
|
753
|
+
for (let n of e) if (n.children?.length) {
|
|
754
|
+
let e = t.find((e) => e.path === n.path);
|
|
755
|
+
e?.children && lt(n.children, e.children);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
var q, J = v((() => {
|
|
759
|
+
at(), K(), q = class extends G {
|
|
760
|
+
dir;
|
|
761
|
+
constructor(e) {
|
|
762
|
+
super(), this.dir = e;
|
|
763
|
+
}
|
|
764
|
+
async load() {
|
|
765
|
+
let e = await nt(this.dir);
|
|
766
|
+
return await ct(e, this.dir), {
|
|
767
|
+
tree: e,
|
|
768
|
+
fileMap: await st(`/`, this.dir)
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
async readContent(e) {
|
|
772
|
+
return readFile(e, `utf8`);
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
})), ut, dt = v((() => {
|
|
776
|
+
K(), J(), ut = class extends G {
|
|
777
|
+
src;
|
|
778
|
+
options;
|
|
779
|
+
_fs;
|
|
780
|
+
constructor(e, t = {}) {
|
|
781
|
+
super(), this.src = e, this.options = t;
|
|
782
|
+
}
|
|
783
|
+
async load() {
|
|
784
|
+
let e = this.options.subdir ? `${this.src}/${this.options.subdir}` : this.src, t = e.replace(/[/#:]/g, `_`), n = join(tmpdir(), `mdzilla`, `gh`, t), { downloadTemplate: r } = await import(`giget`);
|
|
785
|
+
await r(e, {
|
|
786
|
+
dir: n,
|
|
787
|
+
auth: this.options.auth,
|
|
788
|
+
force: !0,
|
|
789
|
+
install: !1
|
|
790
|
+
});
|
|
791
|
+
let i = n;
|
|
792
|
+
for (let e of [`docs/content`, `docs`]) {
|
|
793
|
+
let t = join(n, e);
|
|
794
|
+
if (existsSync(t)) {
|
|
795
|
+
i = t;
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
return this._fs = new q(i), this._fs.load();
|
|
800
|
+
}
|
|
801
|
+
async readContent(e) {
|
|
802
|
+
if (!this._fs) throw Error(`DocsSourceGit: call load() before readContent()`);
|
|
803
|
+
return this._fs.readContent(e);
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
}));
|
|
807
|
+
function ft(e) {
|
|
808
|
+
let t = e, n = ``;
|
|
809
|
+
if (t.startsWith(`@`)) {
|
|
810
|
+
let e = t.indexOf(`/`, t.indexOf(`/`) + 1);
|
|
811
|
+
e > 0 && (n = t.slice(e), t = t.slice(0, e));
|
|
812
|
+
} else {
|
|
813
|
+
let e = t.indexOf(`/`);
|
|
814
|
+
e > 0 && (n = t.slice(e), t = t.slice(0, e));
|
|
815
|
+
}
|
|
816
|
+
let r = t.startsWith(`@`) ? t.indexOf(`@`, 1) : t.indexOf(`@`), i = r > 0;
|
|
817
|
+
return {
|
|
818
|
+
name: i ? t.slice(0, r) : t,
|
|
819
|
+
version: i ? t.slice(r + 1) : `latest`,
|
|
820
|
+
subdir: n
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
async function pt(e, t) {
|
|
824
|
+
let n = t ? `https://registry.npmjs.org/${e}/${t}` : `https://registry.npmjs.org/${e}`, r = await fetch(n);
|
|
825
|
+
if (!r.ok) throw Error(`Failed to fetch package info for ${e}${t ? `@${t}` : ``}: ${r.status} ${r.statusText}`);
|
|
826
|
+
return r.json();
|
|
827
|
+
}
|
|
828
|
+
function mt(e) {
|
|
829
|
+
let t;
|
|
830
|
+
try {
|
|
831
|
+
t = new URL(e);
|
|
832
|
+
} catch {
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
if (t.hostname !== `www.npmjs.com` && t.hostname !== `npmjs.com`) return;
|
|
836
|
+
let n = t.pathname.match(/^\/package\/((?:@[^/]+\/)?[^/]+)\/?$/);
|
|
837
|
+
if (n) return n[1];
|
|
838
|
+
let r = t.pathname.match(/^\/((?:@[^/]+\/)?[^/]+)\/?$/);
|
|
839
|
+
if (r && !/^(package|settings|signup|login|org|search)$/.test(r[1])) return r[1];
|
|
840
|
+
}
|
|
841
|
+
var ht = v((() => {}));
|
|
842
|
+
function gt(e, t) {
|
|
843
|
+
if (e.includes(`text/html`) || e.includes(`application/xhtml`)) return !0;
|
|
844
|
+
let n = t.trimStart();
|
|
845
|
+
return n.startsWith(`<!`) || n.startsWith(`<html`);
|
|
846
|
+
}
|
|
847
|
+
function _t(e) {
|
|
848
|
+
try {
|
|
849
|
+
return new URL(e).hostname;
|
|
850
|
+
} catch {
|
|
851
|
+
return e;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
function vt(e, t, n, r) {
|
|
855
|
+
let i = e.split(`
|
|
856
|
+
`), a = [], o = ``, s = ``, c, l = 0, u = 0;
|
|
857
|
+
for (let e of i) {
|
|
858
|
+
let r = e.trim();
|
|
859
|
+
if (!o && r.startsWith(`# `) && !r.startsWith(`## `)) {
|
|
860
|
+
o = r.slice(2).trim();
|
|
861
|
+
continue;
|
|
862
|
+
}
|
|
863
|
+
if (!s && r.startsWith(`> `)) {
|
|
864
|
+
s = r.slice(2).trim();
|
|
865
|
+
continue;
|
|
866
|
+
}
|
|
867
|
+
if (r.startsWith(`## `)) {
|
|
868
|
+
c = {
|
|
869
|
+
slug: yt(r.slice(3).trim()),
|
|
870
|
+
path: `/_section/${l}`,
|
|
871
|
+
title: r.slice(3).trim(),
|
|
872
|
+
order: l++,
|
|
873
|
+
page: !1,
|
|
874
|
+
children: []
|
|
875
|
+
}, u = 0, a.push(c);
|
|
876
|
+
continue;
|
|
877
|
+
}
|
|
878
|
+
let i = r.match(/^-\s*\[([^\]]+)]\(([^)]+)\)(?::\s*(.+))?$/);
|
|
879
|
+
if (i) {
|
|
880
|
+
let e = i[1], r = i[2], o = i[3]?.trim(), s;
|
|
881
|
+
try {
|
|
882
|
+
if (s = new URL(r, t), s.origin !== t) continue;
|
|
883
|
+
} catch {
|
|
884
|
+
continue;
|
|
885
|
+
}
|
|
886
|
+
let l = s.pathname.replace(/\/+$/, ``) || `/`, d = {
|
|
887
|
+
slug: l.split(`/`).pop() || l,
|
|
888
|
+
path: l,
|
|
889
|
+
title: e,
|
|
890
|
+
order: u++,
|
|
891
|
+
...o ? { description: o } : {}
|
|
892
|
+
};
|
|
893
|
+
n.set(l, l), c ? c.children.push(d) : a.push(d);
|
|
894
|
+
continue;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
if (a.length === 0) return [];
|
|
898
|
+
let d = {
|
|
899
|
+
slug: ``,
|
|
900
|
+
path: `/`,
|
|
901
|
+
title: o || _t(t),
|
|
902
|
+
order: 0,
|
|
903
|
+
...s ? { description: s } : {},
|
|
904
|
+
...a.length > 0 ? { children: a } : {}
|
|
905
|
+
};
|
|
906
|
+
return n.set(`/`, `/`), r.set(`/`, e), [d];
|
|
907
|
+
}
|
|
908
|
+
function yt(e) {
|
|
909
|
+
return e.toLowerCase().replace(/[^a-z\d]+/g, `-`).replace(/^-|-$/g, ``);
|
|
910
|
+
}
|
|
911
|
+
function bt(e, t) {
|
|
912
|
+
let n = /* @__PURE__ */ new Set(), r = [], i = /* @__PURE__ */ new Set(), a = 0, o = /\[([^\]]+)]\(([^)]+)\)/g, s;
|
|
913
|
+
for (; (s = o.exec(e)) !== null;) {
|
|
914
|
+
let e = s[1], o = s[2], c = xt(o, t);
|
|
915
|
+
if (!c) continue;
|
|
916
|
+
let l = c.pathname.replace(/\/+$/, ``) || `/`, u = /\/index\.md$/i.test(l) || l.endsWith(`/index`);
|
|
917
|
+
if (l = l.replace(/\/index\.md$/i, ``).replace(/\/index$/, ``).replace(/\.md$/i, ``), l ||= `/`, l === `/` || n.has(l)) continue;
|
|
918
|
+
n.add(l), u && i.add(l);
|
|
919
|
+
let d = l.split(`/`).pop() || l;
|
|
920
|
+
r.push({
|
|
921
|
+
slug: d,
|
|
922
|
+
path: l,
|
|
923
|
+
title: e,
|
|
924
|
+
order: a++
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
return {
|
|
928
|
+
entries: r,
|
|
929
|
+
tocPaths: i
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
function xt(e, t) {
|
|
933
|
+
try {
|
|
934
|
+
let n = new URL(t), r = new URL(e, t);
|
|
935
|
+
return r.origin !== n.origin || e.startsWith(`#`) || /\.(png|jpg|jpeg|gif|svg|css|js|ico|woff2?)$/i.test(r.pathname) ? void 0 : r;
|
|
936
|
+
} catch {
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
var St, Ct = v((() => {
|
|
941
|
+
K(), ht(), St = class extends G {
|
|
942
|
+
url;
|
|
943
|
+
options;
|
|
944
|
+
_contentCache = /* @__PURE__ */ new Map();
|
|
945
|
+
_tree = [];
|
|
946
|
+
_fileMap = /* @__PURE__ */ new Map();
|
|
947
|
+
_npmPackage;
|
|
948
|
+
constructor(e, t = {}) {
|
|
949
|
+
super(), this.url = e.replace(/\/+$/, ``), this._npmPackage = mt(this.url), this.options = t;
|
|
950
|
+
}
|
|
951
|
+
async load() {
|
|
952
|
+
if (this._npmPackage) return this._loadNpm(this._npmPackage);
|
|
953
|
+
let e = await this._tryLlmsTxt();
|
|
954
|
+
if (e) return this._tree = e, {
|
|
955
|
+
tree: this._tree,
|
|
956
|
+
fileMap: this._fileMap
|
|
957
|
+
};
|
|
958
|
+
let t = await this._fetch(this.url);
|
|
959
|
+
this._contentCache.set(`/`, t);
|
|
960
|
+
let n = {
|
|
961
|
+
slug: ``,
|
|
962
|
+
path: `/`,
|
|
963
|
+
title: parseMeta(t).title || _t(this.url),
|
|
964
|
+
order: 0
|
|
965
|
+
}, { entries: r, tocPaths: i } = bt(t, this.url);
|
|
966
|
+
if (r.length > 0) {
|
|
967
|
+
n.children = r;
|
|
968
|
+
for (let e of r) this._fileMap.set(e.path, e.path);
|
|
969
|
+
}
|
|
970
|
+
return this._tree = [n], this._fileMap.set(`/`, `/`), i.size > 0 && await this._crawlTocPages(r, i), {
|
|
971
|
+
tree: this._tree,
|
|
972
|
+
fileMap: this._fileMap
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
async _tryLlmsTxt() {
|
|
976
|
+
let e;
|
|
977
|
+
try {
|
|
978
|
+
e = new URL(this.url).origin;
|
|
979
|
+
} catch {
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
let t;
|
|
983
|
+
try {
|
|
984
|
+
let n = await fetch(`${e}/llms.txt`, { headers: {
|
|
985
|
+
accept: `text/plain`,
|
|
986
|
+
...this.options.headers
|
|
987
|
+
} });
|
|
988
|
+
if (!n.ok) return;
|
|
989
|
+
t = await n.text();
|
|
990
|
+
} catch {
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
if (t.trimStart().startsWith(`#`)) return vt(t, e, this._fileMap, this._contentCache);
|
|
994
|
+
}
|
|
995
|
+
async readContent(e) {
|
|
996
|
+
let t = this._contentCache.get(e);
|
|
997
|
+
if (t !== void 0) return t;
|
|
998
|
+
let n = new URL(this.url).origin, r = e === `/` ? this.url : `${n}${e}`, i = await this._fetch(r);
|
|
999
|
+
return this._contentCache.set(e, i), i;
|
|
1000
|
+
}
|
|
1001
|
+
async _crawlTocPages(e, t, n = 0) {
|
|
1002
|
+
if (n > 3) return;
|
|
1003
|
+
let r = new URL(this.url).origin;
|
|
1004
|
+
await Promise.all(e.map(async (e) => {
|
|
1005
|
+
if (!t.has(e.path)) return;
|
|
1006
|
+
let i = `${r}${e.path}`, a = await this._fetch(i);
|
|
1007
|
+
this._contentCache.set(e.path, a);
|
|
1008
|
+
let { entries: o, tocPaths: s } = bt(a, i);
|
|
1009
|
+
if (o.length > 0) {
|
|
1010
|
+
e.children = o;
|
|
1011
|
+
for (let e of o) this._fileMap.set(e.path, e.path);
|
|
1012
|
+
s.size > 0 && await this._crawlTocPages(o, s, n + 1);
|
|
1013
|
+
}
|
|
1014
|
+
}));
|
|
1015
|
+
}
|
|
1016
|
+
async _loadNpm(e) {
|
|
1017
|
+
let t;
|
|
1018
|
+
try {
|
|
1019
|
+
let n = await pt(e);
|
|
1020
|
+
t = n.readme || `# ${n.name || e}\n\n${n.description || `No README available.`}`;
|
|
1021
|
+
} catch (n) {
|
|
1022
|
+
t = `# Fetch Error\n\nFailed to fetch package \`${e}\`\n\n> ${n instanceof Error ? n.message : String(n)}`;
|
|
1023
|
+
}
|
|
1024
|
+
return this._contentCache.set(`/`, t), this._fileMap.set(`/`, `/`), this._tree = [{
|
|
1025
|
+
slug: ``,
|
|
1026
|
+
path: `/`,
|
|
1027
|
+
title: parseMeta(t).title || e,
|
|
1028
|
+
order: 0
|
|
1029
|
+
}], {
|
|
1030
|
+
tree: this._tree,
|
|
1031
|
+
fileMap: this._fileMap
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
async _fetch(e) {
|
|
1035
|
+
let t;
|
|
1036
|
+
try {
|
|
1037
|
+
t = await fetch(e, { headers: {
|
|
1038
|
+
accept: `text/markdown, text/plain;q=0.9, text/html;q=0.8`,
|
|
1039
|
+
...this.options.headers
|
|
1040
|
+
} });
|
|
1041
|
+
} catch (t) {
|
|
1042
|
+
return `# Fetch Error\n\nFailed to fetch \`${e}\`\n\n> ${t instanceof Error ? t.message : String(t)}`;
|
|
1043
|
+
}
|
|
1044
|
+
if (!t.ok) return `# ${t.status} ${t.statusText}\n\nFailed to fetch \`${e}\``;
|
|
1045
|
+
let n = t.headers.get(`content-type`) || ``, r = await t.text();
|
|
1046
|
+
if (gt(n, r)) {
|
|
1047
|
+
let { htmlToMarkdown: t } = await import(`mdream`);
|
|
1048
|
+
return t(r, { origin: e });
|
|
1049
|
+
}
|
|
1050
|
+
return r;
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
}));
|
|
1054
|
+
async function wt(e) {
|
|
1055
|
+
let { name: t, version: n, subdir: r } = ft(e), i = await pt(t, n);
|
|
1056
|
+
return {
|
|
1057
|
+
name: i.name,
|
|
1058
|
+
version: i.version,
|
|
1059
|
+
subdir: r,
|
|
1060
|
+
tar: i.dist.tarball
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
var Tt, Et = v((() => {
|
|
1064
|
+
K(), J(), ht(), Tt = class extends G {
|
|
1065
|
+
src;
|
|
1066
|
+
options;
|
|
1067
|
+
_fs;
|
|
1068
|
+
constructor(e, t = {}) {
|
|
1069
|
+
super(), this.src = e, this.options = t;
|
|
1070
|
+
}
|
|
1071
|
+
async load() {
|
|
1072
|
+
let e = this.src.startsWith(`npm:`) ? this.src : `npm:${this.src}`, t = this.options.subdir ? `${e}/${this.options.subdir}` : e, n = t.replace(/[/#:@]/g, `_`), r = join(tmpdir(), `mdzilla`, `npm`, n), { downloadTemplate: i } = await import(`giget`);
|
|
1073
|
+
await i(t, {
|
|
1074
|
+
dir: r,
|
|
1075
|
+
force: !0,
|
|
1076
|
+
install: !1,
|
|
1077
|
+
providers: { npm: wt },
|
|
1078
|
+
registry: !1
|
|
1079
|
+
});
|
|
1080
|
+
let a = r;
|
|
1081
|
+
for (let e of [`docs/content`, `docs`]) {
|
|
1082
|
+
let t = join(r, e);
|
|
1083
|
+
if (existsSync(t)) {
|
|
1084
|
+
a = t;
|
|
1085
|
+
break;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return this._fs = new q(a), this._fs.load();
|
|
1089
|
+
}
|
|
1090
|
+
async readContent(e) {
|
|
1091
|
+
if (!this._fs) throw Error(`DocsSourceNpm: call load() before readContent()`);
|
|
1092
|
+
return this._fs.readContent(e);
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
})), Dt = v((() => {
|
|
1096
|
+
K(), J(), dt(), Ct(), Et();
|
|
1097
|
+
}));
|
|
1098
|
+
async function Ot(t, n, r = {}) {
|
|
1099
|
+
let a = t.flat.find((e) => e.entry.path === `/`), s = [`# ${r.title ?? a?.entry.title ?? `Table of Contents`}`, ``], l = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
|
|
1100
|
+
kt(t.tree, f);
|
|
1101
|
+
for (let a of t.flat) {
|
|
1102
|
+
if ((r.filter ? !r.filter(a) : a.entry.page === !1) || At.has(a.entry.path)) continue;
|
|
1103
|
+
let p = await t.getContent(a);
|
|
1104
|
+
if (p === void 0) continue;
|
|
1105
|
+
let m = r.plainText ? renderToText(p) : renderToMarkdown(p), h = a.entry.path === `/` || f.has(a.entry.path) ? a.entry.path === `/` ? `/index.md` : `${a.entry.path}/index.md` : a.entry.path.endsWith(`.md`) ? a.entry.path : `${a.entry.path}.md`, g = join(n, h);
|
|
1106
|
+
await mkdir(dirname(g), { recursive: !0 }), await writeFile(g, m, `utf8`), l.add(h.slice(1));
|
|
1107
|
+
let _ = ` `.repeat(a.depth), ee = a.entry.description ? `: ${a.entry.description}` : ``;
|
|
1108
|
+
s.push(`${_}- [${a.entry.title}](.${h})${ee}`);
|
|
1109
|
+
}
|
|
1110
|
+
let p = r.tocFile ?? `README.md`;
|
|
1111
|
+
l.has(p) && (p = `_${p}`), await writeFile(join(n, p), s.join(`
|
|
1112
|
+
`) + `
|
|
1113
|
+
`, `utf8`), await writeFile(join(n, `_navigation.json`), JSON.stringify(t.tree, null, 2) + `
|
|
1114
|
+
`, `utf8`);
|
|
1115
|
+
}
|
|
1116
|
+
function kt(e, t) {
|
|
1117
|
+
for (let n of e) n.children?.length && (t.add(n.path), kt(n.children, t));
|
|
1118
|
+
}
|
|
1119
|
+
var At, jt = v((() => {
|
|
1120
|
+
At = new Set([`/llms.txt`, `/llms-full.txt`]);
|
|
1121
|
+
})), Mt = y({
|
|
1122
|
+
DocsManager: () => Ye,
|
|
1123
|
+
DocsSource: () => G,
|
|
1124
|
+
DocsSourceFS: () => q,
|
|
1125
|
+
DocsSourceGit: () => ut,
|
|
1126
|
+
DocsSourceHTTP: () => St,
|
|
1127
|
+
DocsSourceNpm: () => Tt,
|
|
1128
|
+
exportDocsToFS: () => Ot
|
|
1129
|
+
}), Nt = v((() => {
|
|
1130
|
+
Xe(), Dt(), jt();
|
|
1131
|
+
}));
|
|
1132
|
+
async function Y(e) {
|
|
1133
|
+
if (X) return X;
|
|
1134
|
+
if (!X) {
|
|
1135
|
+
let { DocsManager: t, DocsSourceGit: n } = await Promise.resolve().then(() => (Nt(), Mt));
|
|
1136
|
+
X = new t(e?.source || new n(`gh:nitrojs/nitro/docs`, { subdir: `docs` })), await X.load();
|
|
1137
|
+
}
|
|
1138
|
+
return X;
|
|
1139
|
+
}
|
|
1140
|
+
var X, Z = v((() => {})), Pt = y({ default: () => Ft }), Ft, It = v((() => {
|
|
1141
|
+
W(), Z(), Ft = T(async () => ({
|
|
1142
|
+
title: `Nitro`,
|
|
1143
|
+
toc: (await Y()).tree
|
|
1144
|
+
}));
|
|
1145
|
+
})), Lt = y({ default: () => Q });
|
|
1146
|
+
async function Rt(e) {
|
|
1147
|
+
let t = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/g, n = [];
|
|
1148
|
+
for (let r of e.matchAll(t)) {
|
|
1149
|
+
let [e, t, i] = r, a = Bt(i);
|
|
1150
|
+
n.push(highlightText(a, t, !1).then((n) => ({
|
|
1151
|
+
match: e,
|
|
1152
|
+
result: `<pre><code class="language-${t}">${n}</code></pre>`
|
|
1153
|
+
})).catch(() => ({
|
|
1154
|
+
match: e,
|
|
1155
|
+
result: e
|
|
1156
|
+
})));
|
|
1157
|
+
}
|
|
1158
|
+
let r = e;
|
|
1159
|
+
for (let { match: e, result: t } of await Promise.all(n)) r = r.replace(e, t);
|
|
1160
|
+
return r;
|
|
1161
|
+
}
|
|
1162
|
+
function zt(e) {
|
|
1163
|
+
return e.replace(/<(h[1-6])>(.*?)<\/\1>/g, (e, t, n) => {
|
|
1164
|
+
let r = n.replace(/<[^>]+>/g, ``).trim().toLowerCase().replace(/[^\w\s-]/g, ``).replace(/\s+/g, `-`);
|
|
1165
|
+
return `<${t} id="${r}"><a href="#${r}">#</a>${n}</${t}>`;
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
function Bt(e) {
|
|
1169
|
+
return e.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
1170
|
+
}
|
|
1171
|
+
var Q, Vt = v((async () => {
|
|
1172
|
+
W(), Z(), await init(), Q = T(async (e) => {
|
|
1173
|
+
let { path: t } = he(e);
|
|
1174
|
+
if (!t) return { error: `Missing ?path= query parameter` };
|
|
1175
|
+
let n = await (await Y()).resolvePage(t);
|
|
1176
|
+
return n.raw ? {
|
|
1177
|
+
path: t,
|
|
1178
|
+
html: zt(await Rt(renderToHtml(n.raw)))
|
|
1179
|
+
} : {
|
|
1180
|
+
error: `Page not found`,
|
|
1181
|
+
path: t
|
|
1182
|
+
};
|
|
1183
|
+
});
|
|
1184
|
+
})), Ht = y({ default: () => Wt });
|
|
1185
|
+
function Ut(e, t, n = {}) {
|
|
1186
|
+
let { maxSnippets: r = 3, radius: i = 80 } = n, a = e.toLowerCase(), o = [];
|
|
1187
|
+
for (let e of t) {
|
|
1188
|
+
let t = a.indexOf(e);
|
|
1189
|
+
for (; t !== -1 && o.length < r * 2;) o.push(t), t = a.indexOf(e, t + e.length);
|
|
1190
|
+
}
|
|
1191
|
+
o.sort((e, t) => e - t);
|
|
1192
|
+
let s = [], c = -1;
|
|
1193
|
+
for (let t of o) {
|
|
1194
|
+
if (s.length >= r) break;
|
|
1195
|
+
let n = Math.max(0, t - i), a = Math.min(e.length, t + i);
|
|
1196
|
+
if (n <= c) continue;
|
|
1197
|
+
c = a;
|
|
1198
|
+
let o = e.slice(n, a).trim().replaceAll(/\s+/g, ` `);
|
|
1199
|
+
n > 0 && (o = `…` + o), a < e.length && (o += `…`), s.push(o);
|
|
1200
|
+
}
|
|
1201
|
+
return s;
|
|
1202
|
+
}
|
|
1203
|
+
var Wt, Gt = v((() => {
|
|
1204
|
+
W(), Z(), Wt = T(async (e) => {
|
|
1205
|
+
let { q: t, limit: n } = he(e);
|
|
1206
|
+
if (!t || t.length < 2) return { results: [] };
|
|
1207
|
+
let r = await Y(), i = Math.min(Number(n) || 20, 50), a = t.toLowerCase(), o = a.split(/\s+/).filter(Boolean), s = [], c = /* @__PURE__ */ new Set();
|
|
1208
|
+
for (let e of r.pages) {
|
|
1209
|
+
let t = e.entry.title, n = t.toLowerCase();
|
|
1210
|
+
o.every((e) => n.includes(e)) && (c.add(e.entry.path), s.push({
|
|
1211
|
+
path: e.entry.path,
|
|
1212
|
+
title: t,
|
|
1213
|
+
score: n === a ? 0 : 100,
|
|
1214
|
+
snippets: []
|
|
1215
|
+
}));
|
|
1216
|
+
}
|
|
1217
|
+
for (let e of r.pages) {
|
|
1218
|
+
if (c.has(e.entry.path)) continue;
|
|
1219
|
+
let t = await r.getContent(e);
|
|
1220
|
+
if (!t) continue;
|
|
1221
|
+
let n = t.toLowerCase();
|
|
1222
|
+
if (!o.every((e) => n.includes(e))) continue;
|
|
1223
|
+
let i = 300, l, u = parseMeta$1(t);
|
|
1224
|
+
for (let e of u.headings || []) {
|
|
1225
|
+
let t = e.text.toLowerCase();
|
|
1226
|
+
if (o.every((e) => t.includes(e))) {
|
|
1227
|
+
i = t === a ? 150 : 200, l = e.text;
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
let d = Ut(renderToText$1(t), o);
|
|
1232
|
+
s.push({
|
|
1233
|
+
path: e.entry.path,
|
|
1234
|
+
title: e.entry.title,
|
|
1235
|
+
heading: l,
|
|
1236
|
+
snippets: d,
|
|
1237
|
+
score: i
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
for (let e of s) {
|
|
1241
|
+
if (e.snippets.length > 0) continue;
|
|
1242
|
+
let t = r.pages.find((t) => t.entry.path === e.path);
|
|
1243
|
+
if (!t) continue;
|
|
1244
|
+
let n = await r.getContent(t);
|
|
1245
|
+
n && (e.snippets = Ut(renderToText$1(n), o));
|
|
1246
|
+
}
|
|
1247
|
+
return s.sort((e, t) => e.score - t.score), { results: s.slice(0, i).map(({ score: e, ...t }) => t) };
|
|
1248
|
+
});
|
|
1249
|
+
})), Kt, qt = v((() => {
|
|
1250
|
+
B(), Kt = () => new P(`<!doctype html>
|
|
1251
|
+
<html lang="en">
|
|
1252
|
+
<head>
|
|
1253
|
+
<meta charset="UTF-8" />
|
|
1254
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
1255
|
+
<link rel="icon" type="image/svg+xml" href="/assets/logo-BLkVGWak.svg" />
|
|
1256
|
+
<title></title>
|
|
1257
|
+
<style>/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
|
|
1258
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-50:oklch(98.2% .018 155.826);--color-green-300:oklch(87.1% .15 154.449);--color-green-500:oklch(72.3% .219 149.579);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-blue-50:oklch(97% .014 254.604);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-gray-950:oklch(13% .028 261.692);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--radius-md:.375rem;--radius-xl:.75rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.z-50{z-index:50}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.h-4{height:calc(var(--spacing) * 4)}.h-8{height:calc(var(--spacing) * 8)}.h-screen{height:100vh}.max-h-80{max-height:calc(var(--spacing) * 80)}.w-4{width:calc(var(--spacing) * 4)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-90{rotate:90deg}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-gray-50{background-color:var(--color-gray-50)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-\\[15vh\\]{padding-top:15vh}.text-center{text-align:center}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-900{color:var(--color-gray-900)}.text-red-500{color:var(--color-red-500)}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:text-gray-500:hover{color:var(--color-gray-500)}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.sm\\:inline{display:inline}}.dark\\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\\:bg-gray-950:where(.dark,.dark *){background-color:var(--color-gray-950)}.dark\\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\\:text-gray-200:where(.dark,.dark *){color:var(--color-gray-200)}.dark\\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\\:text-gray-500:where(.dark,.dark *),.dark\\:placeholder-gray-500:where(.dark,.dark *)::placeholder{color:var(--color-gray-500)}@media (hover:hover){.dark\\:hover\\:border-gray-600:where(.dark,.dark *):hover{border-color:var(--color-gray-600)}.dark\\:hover\\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\\:hover\\:text-gray-100:where(.dark,.dark *):hover{color:var(--color-gray-100)}.dark\\:hover\\:text-gray-300:where(.dark,.dark *):hover{color:var(--color-gray-300)}.dark\\:hover\\:text-gray-400:where(.dark,.dark *):hover{color:var(--color-gray-400)}}}#search-results::-webkit-scrollbar{width:6px}#search-results::-webkit-scrollbar-thumb{background:var(--color-gray-300);border-radius:3px}.dark #search-results::-webkit-scrollbar-thumb{background:var(--color-gray-600)}.line-clamp-2{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.nav-active{background:var(--color-gray-100)}.dark .nav-active{background:var(--color-gray-800)}.prose{color:var(--color-gray-700);line-height:1.75}.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{color:var(--color-gray-900);margin-top:2em;margin-bottom:.75em;font-weight:700;line-height:1.3;position:relative}:is(.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6)>a[href^=\\#]{color:var(--color-gray-300);opacity:0;padding-right:.25em;font-weight:400;text-decoration:none;transition:opacity .15s;position:absolute;right:100%}:is(.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6):hover>a[href^=\\#]{opacity:1}.prose h1{margin-top:0;font-size:2.25em}.prose h2{border-bottom:1px solid var(--color-gray-200);padding-bottom:.3em;font-size:1.5em}.prose h3{font-size:1.25em}.prose h4{font-size:1.1em}.prose p{margin-top:1.25em;margin-bottom:1.25em}.prose a{color:var(--color-blue-600);text-underline-offset:2px;text-decoration:underline}.prose a:hover{color:var(--color-blue-500)}.prose strong{color:var(--color-gray-900);font-weight:600}.prose code{color:var(--color-gray-800);background:var(--color-gray-100);border-radius:.25em;padding:.2em .4em;font-size:.875em}.prose pre{border:1px solid var(--color-gray-200);background:#f6f8fa;border-radius:.5em;margin-top:1.5em;margin-bottom:1.5em;padding:1em;overflow-x:auto}.prose pre code{background:0 0;border-radius:0;padding:0;font-size:.875em}.prose blockquote{border-left:3px solid var(--color-gray-300);color:var(--color-gray-500);margin-top:1.5em;margin-bottom:1.5em;padding-left:1em;font-style:italic}.prose blockquote.alert{border-left-width:4px;border-radius:.5em;padding:.75em 1em;font-style:normal}.prose blockquote.alert>p:first-child{margin-top:0}.prose blockquote.alert>p:last-child{margin-bottom:0}.prose blockquote.alert-tip{border-left-color:var(--color-green-500);background:#f0fdf499}@supports (color:color-mix(in lab, red, red)){.prose blockquote.alert-tip{background:color-mix(in srgb, var(--color-green-50) 60%, transparent)}}.prose blockquote.alert-tip{color:var(--color-green-800)}.prose blockquote.alert-note{border-left-color:var(--color-blue-500);background:#eff6ff99}@supports (color:color-mix(in lab, red, red)){.prose blockquote.alert-note{background:color-mix(in srgb, var(--color-blue-50) 60%, transparent)}}.prose blockquote.alert-note{color:var(--color-blue-800)}.prose blockquote.alert-important{border-left-color:var(--color-purple-500);background:#faf5ff99}@supports (color:color-mix(in lab, red, red)){.prose blockquote.alert-important{background:color-mix(in srgb, var(--color-purple-50) 60%, transparent)}}.prose blockquote.alert-important{color:var(--color-purple-800)}.prose blockquote.alert-warning{border-left-color:var(--color-yellow-500);background:#fefce899}@supports (color:color-mix(in lab, red, red)){.prose blockquote.alert-warning{background:color-mix(in srgb, var(--color-yellow-50) 60%, transparent)}}.prose blockquote.alert-warning{color:var(--color-yellow-800)}.prose blockquote.alert-caution{border-left-color:var(--color-red-500);background:#fef2f299}@supports (color:color-mix(in lab, red, red)){.prose blockquote.alert-caution{background:color-mix(in srgb, var(--color-red-50) 60%, transparent)}}.prose blockquote.alert-caution{color:var(--color-red-800)}.prose ul{margin-top:1.25em;margin-bottom:1.25em;padding-left:1.5em;list-style:outside}.prose ol{margin-top:1.25em;margin-bottom:1.25em;padding-left:1.5em;list-style:decimal}.prose li{margin-top:.5em;margin-bottom:.5em}.prose li>ul,.prose li>ol{margin-top:.25em;margin-bottom:.25em}.prose hr{border:none;border-top:1px solid var(--color-gray-200);margin-top:2em;margin-bottom:2em}.prose table{border-collapse:collapse;width:100%;margin-top:1.5em;margin-bottom:1.5em;font-size:.875em}.prose th,.prose td{border:1px solid var(--color-gray-200);text-align:left;padding:.5em .75em}.prose th{background:var(--color-gray-50);color:var(--color-gray-900);font-weight:600}.prose img,.prose video{border-radius:.5em;max-width:100%;margin-top:1.5em;margin-bottom:1.5em}.dark .prose{color:var(--color-gray-200)}.dark .prose h1,.dark .prose h2,.dark .prose h3,.dark .prose h4,.dark .prose h5,.dark .prose h6{color:var(--color-gray-50)}:is(.dark .prose h1,.dark .prose h2,.dark .prose h3,.dark .prose h4,.dark .prose h5,.dark .prose h6)>a[href^=\\#]{color:var(--color-gray-600)}.dark .prose h2{border-bottom-color:var(--color-gray-700)}.dark .prose a{color:var(--color-blue-400)}.dark .prose a:hover{color:var(--color-blue-300)}.dark .prose strong{color:var(--color-gray-50)}.dark .prose code{color:var(--color-gray-100);background:var(--color-gray-800)}.dark .prose pre{border-color:var(--color-gray-700);background:#161b22}.dark .prose pre code{color:var(--color-gray-100);background:0 0}.dark .prose blockquote{border-left-color:var(--color-gray-600);color:var(--color-gray-400)}.dark .prose blockquote.alert-tip{background:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.dark .prose blockquote.alert-tip{background:color-mix(in srgb, var(--color-green-900) 30%, transparent)}}.dark .prose blockquote.alert-tip{color:var(--color-green-300);border-left-color:var(--color-green-500)}.dark .prose blockquote.alert-note{background:#1c398e4d}@supports (color:color-mix(in lab, red, red)){.dark .prose blockquote.alert-note{background:color-mix(in srgb, var(--color-blue-900) 30%, transparent)}}.dark .prose blockquote.alert-note{color:var(--color-blue-300);border-left-color:var(--color-blue-500)}.dark .prose blockquote.alert-important{background:#59168b4d}@supports (color:color-mix(in lab, red, red)){.dark .prose blockquote.alert-important{background:color-mix(in srgb, var(--color-purple-900) 30%, transparent)}}.dark .prose blockquote.alert-important{color:var(--color-purple-300);border-left-color:var(--color-purple-500)}.dark .prose blockquote.alert-warning{background:#733e0a4d}@supports (color:color-mix(in lab, red, red)){.dark .prose blockquote.alert-warning{background:color-mix(in srgb, var(--color-yellow-900) 30%, transparent)}}.dark .prose blockquote.alert-warning{color:var(--color-yellow-300);border-left-color:var(--color-yellow-500)}.dark .prose blockquote.alert-caution{background:#82181a4d}@supports (color:color-mix(in lab, red, red)){.dark .prose blockquote.alert-caution{background:color-mix(in srgb, var(--color-red-900) 30%, transparent)}}.dark .prose blockquote.alert-caution{color:var(--color-red-300);border-left-color:var(--color-red-500)}.dark .prose hr{border-top-color:var(--color-gray-700)}.dark .prose th,.dark .prose td{border-color:var(--color-gray-700)}.dark .prose th{background:var(--color-gray-800);color:var(--color-gray-50)}.shj-syn-cmnt{color:#6e7781;font-style:italic}.shj-syn-err,.shj-syn-kwd{color:#cf222e}.shj-syn-class{color:#953800}.shj-syn-type,.shj-syn-oper,.shj-syn-num,.shj-syn-section,.shj-syn-var,.shj-syn-bool{color:#0550ae}.shj-syn-str{color:#0a3069}.shj-syn-func{color:#8250df}.shj-syn-insert{color:#116329}.shj-syn-deleted{color:#cf222e}.shj-syn-esc{color:#0550ae}.dark .shj-syn-cmnt{color:#8b949e}.dark .shj-syn-err,.dark .shj-syn-kwd{color:#ff7b72}.dark .shj-syn-class{color:#ffa657}.dark .shj-syn-type,.dark .shj-syn-oper,.dark .shj-syn-num,.dark .shj-syn-section,.dark .shj-syn-var,.dark .shj-syn-bool{color:#79c0ff}.dark .shj-syn-str{color:#a5d6ff}.dark .shj-syn-func{color:#d2a8ff}.dark .shj-syn-insert{color:#98c379}.dark .shj-syn-deleted{color:#ff7b72}.dark .shj-syn-esc{color:#79c0ff}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}</style>
|
|
1259
|
+
<script type="module" crossorigin src="/assets/index-BC9qhYL0.js"><\/script>
|
|
1260
|
+
</head>
|
|
1261
|
+
<body class="h-screen flex flex-col bg-white text-gray-900 dark:bg-gray-950 dark:text-gray-200">
|
|
1262
|
+
<!-- Header -->
|
|
1263
|
+
<header
|
|
1264
|
+
class="flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-800"
|
|
1265
|
+
>
|
|
1266
|
+
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMjAwIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgPCEtLSBCb2R5OiByb3VuZGVkIHJlY3RhbmdsZSAoZG9jdW1lbnQgc2hhcGUpIC0tPgogIDxyZWN0IHg9IjQwIiB5PSIzMCIgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxNTAiIHJ4PSIxOCIgcnk9IjE4IiBmaWxsPSIjMkIyRDQyIi8+CgogIDwhLS0gRG9jdW1lbnQgbGluZXMgKG1hcmtkb3duIGZlZWwpIC0tPgogIDxyZWN0IHg9IjYyIiB5PSI3MCIgd2lkdGg9IjUwIiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjOEQ5OUFFIi8+CiAgPHJlY3QgeD0iNjIiIHk9Ijg2IiB3aWR0aD0iNzYiIGhlaWdodD0iNiIgcng9IjMiIGZpbGw9IiM4RDk5QUUiLz4KICA8cmVjdCB4PSI2MiIgeT0iMTAyIiB3aWR0a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xsPSIjMkIyRDQyIi8+CiAgPHBvbHlnb24gcG9pbnRzPSI5MiwzMCAxMDAsNiAxMDgsMzAiIGZpbGw9IiMyQjJENDIiLz4KICA8cG9seWdvbiBwb2ludHM9IjExNCwzMCAxMjIsMTAgMTMwLDMwIiBmaWxsPSIjMkIyRDQyIi8+Cjwvc3ZnPgo=" alt="mdzilla" class="h-8" />
|
|
1267
|
+
<div class="flex items-center gap-3">
|
|
1268
|
+
<button
|
|
1269
|
+
id="search-trigger"
|
|
1270
|
+
type="button"
|
|
1271
|
+
class="flex items-center gap-2 w-56 px-3 py-1.5 text-sm border rounded-md bg-white text-gray-400 border-gray-200 hover:border-gray-300 hover:text-gray-500 dark:bg-gray-900 dark:text-gray-500 dark:border-gray-700 dark:hover:border-gray-600 dark:hover:text-gray-400 transition-colors cursor-pointer"
|
|
1272
|
+
>
|
|
1273
|
+
<svg
|
|
1274
|
+
class="size-4 shrink-0"
|
|
1275
|
+
fill="none"
|
|
1276
|
+
viewBox="0 0 24 24"
|
|
1277
|
+
stroke-width="1.5"
|
|
1278
|
+
stroke="currentColor"
|
|
1279
|
+
>
|
|
1280
|
+
<path
|
|
1281
|
+
stroke-linecap="round"
|
|
1282
|
+
stroke-linejoin="round"
|
|
1283
|
+
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
|
|
1284
|
+
/>
|
|
1285
|
+
</svg>
|
|
1286
|
+
<span class="flex-1 text-left">Search…</span>
|
|
1287
|
+
<kbd
|
|
1288
|
+
class="hidden sm:inline text-xs text-gray-400 dark:text-gray-500 border border-gray-200 dark:border-gray-700 rounded px-1.5 py-0.5"
|
|
1289
|
+
>⌘K</kbd
|
|
1290
|
+
>
|
|
1291
|
+
</button>
|
|
1292
|
+
<button
|
|
1293
|
+
id="theme-toggle"
|
|
1294
|
+
type="button"
|
|
1295
|
+
class="p-1.5 rounded-md text-gray-500 hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-gray-100 dark:hover:bg-gray-800 transition-colors"
|
|
1296
|
+
title="Toggle theme"
|
|
1297
|
+
>
|
|
1298
|
+
<svg
|
|
1299
|
+
id="icon-sun"
|
|
1300
|
+
class="hidden size-5"
|
|
1301
|
+
fill="none"
|
|
1302
|
+
viewBox="0 0 24 24"
|
|
1303
|
+
stroke-width="1.5"
|
|
1304
|
+
stroke="currentColor"
|
|
1305
|
+
>
|
|
1306
|
+
<path
|
|
1307
|
+
stroke-linecap="round"
|
|
1308
|
+
stroke-linejoin="round"
|
|
1309
|
+
d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
|
|
1310
|
+
/>
|
|
1311
|
+
</svg>
|
|
1312
|
+
<svg
|
|
1313
|
+
id="icon-moon"
|
|
1314
|
+
class="hidden size-5"
|
|
1315
|
+
fill="none"
|
|
1316
|
+
viewBox="0 0 24 24"
|
|
1317
|
+
stroke-width="1.5"
|
|
1318
|
+
stroke="currentColor"
|
|
1319
|
+
>
|
|
1320
|
+
<path
|
|
1321
|
+
stroke-linecap="round"
|
|
1322
|
+
stroke-linejoin="round"
|
|
1323
|
+
d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"
|
|
1324
|
+
/>
|
|
1325
|
+
</svg>
|
|
1326
|
+
</button>
|
|
1327
|
+
</div>
|
|
1328
|
+
</header>
|
|
1329
|
+
|
|
1330
|
+
<!-- Main layout -->
|
|
1331
|
+
<div class="flex flex-1 overflow-hidden">
|
|
1332
|
+
<!-- Sidebar -->
|
|
1333
|
+
<nav
|
|
1334
|
+
id="sidebar"
|
|
1335
|
+
class="w-64 shrink-0 overflow-y-auto border-r border-gray-200 dark:border-gray-800 p-3"
|
|
1336
|
+
></nav>
|
|
1337
|
+
|
|
1338
|
+
<!-- Content -->
|
|
1339
|
+
<main id="content" class="flex-1 overflow-y-auto p-8"></main>
|
|
1340
|
+
</div>
|
|
1341
|
+
|
|
1342
|
+
<!-- Search modal -->
|
|
1343
|
+
<div id="search-modal" class="hidden fixed inset-0 z-50">
|
|
1344
|
+
<div id="search-backdrop" class="absolute inset-0 bg-black/50"></div>
|
|
1345
|
+
<div class="relative flex justify-center pt-[15vh] px-4">
|
|
1346
|
+
<div
|
|
1347
|
+
class="w-full max-w-lg bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-700 shadow-2xl overflow-hidden"
|
|
1348
|
+
>
|
|
1349
|
+
<div
|
|
1350
|
+
class="flex items-center gap-3 px-4 py-3 border-b border-gray-200 dark:border-gray-700"
|
|
1351
|
+
>
|
|
1352
|
+
<svg
|
|
1353
|
+
class="size-5 text-gray-400 shrink-0"
|
|
1354
|
+
fill="none"
|
|
1355
|
+
viewBox="0 0 24 24"
|
|
1356
|
+
stroke-width="1.5"
|
|
1357
|
+
stroke="currentColor"
|
|
1358
|
+
>
|
|
1359
|
+
<path
|
|
1360
|
+
stroke-linecap="round"
|
|
1361
|
+
stroke-linejoin="round"
|
|
1362
|
+
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
|
|
1363
|
+
/>
|
|
1364
|
+
</svg>
|
|
1365
|
+
<input
|
|
1366
|
+
id="search-input"
|
|
1367
|
+
type="text"
|
|
1368
|
+
placeholder="Search documentation…"
|
|
1369
|
+
class="flex-1 bg-transparent text-sm text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none"
|
|
1370
|
+
/>
|
|
1371
|
+
<kbd
|
|
1372
|
+
class="text-xs text-gray-400 dark:text-gray-500 border border-gray-200 dark:border-gray-700 rounded px-1.5 py-0.5"
|
|
1373
|
+
>esc</kbd
|
|
1374
|
+
>
|
|
1375
|
+
</div>
|
|
1376
|
+
<div id="search-results" class="max-h-80 overflow-y-auto">
|
|
1377
|
+
<p class="px-4 py-8 text-sm text-gray-400 text-center">Type to search…</p>
|
|
1378
|
+
</div>
|
|
1379
|
+
</div>
|
|
1380
|
+
</div>
|
|
1381
|
+
</div>
|
|
1382
|
+
|
|
1383
|
+
</body>
|
|
1384
|
+
</html>
|
|
1385
|
+
`, { headers: { "content-type": `text/html; charset=utf-8` } });
|
|
1386
|
+
})), Jt = y({ default: () => Yt });
|
|
1387
|
+
function Yt(e) {
|
|
1388
|
+
return Kt(e.req);
|
|
1389
|
+
}
|
|
1390
|
+
var Xt = v((() => {
|
|
1391
|
+
qt();
|
|
1392
|
+
}));
|
|
1393
|
+
B();
|
|
1394
|
+
var Zt = (() => {
|
|
1395
|
+
let e = [{
|
|
1396
|
+
name: `headers`,
|
|
1397
|
+
route: `/assets/**`,
|
|
1398
|
+
handler: Re,
|
|
1399
|
+
options: { "cache-control": `public, max-age=31536000, immutable` }
|
|
1400
|
+
}];
|
|
1401
|
+
return (t, n) => {
|
|
1402
|
+
let r = [];
|
|
1403
|
+
n.charCodeAt(n.length - 1) === 47 && (n = n.slice(0, -1) || `/`);
|
|
1404
|
+
let i = n.split(`/`);
|
|
1405
|
+
return i.length > 1 && i[1] === `assets` && r.unshift({
|
|
1406
|
+
data: e,
|
|
1407
|
+
params: { _: i.slice(2).join(`/`) }
|
|
1408
|
+
}), r;
|
|
1409
|
+
};
|
|
1410
|
+
})(), Qt = E(() => Promise.resolve().then(() => (It(), Pt))), $t = E(() => Vt().then(() => Lt)), en = E(() => Promise.resolve().then(() => (Gt(), Ht))), tn = E(() => Promise.resolve().then(() => (Xt(), Jt))), nn = (() => {
|
|
1411
|
+
let e = {
|
|
1412
|
+
route: `/api/meta`,
|
|
1413
|
+
handler: Qt
|
|
1414
|
+
}, t = {
|
|
1415
|
+
route: `/api/page`,
|
|
1416
|
+
handler: $t
|
|
1417
|
+
}, n = {
|
|
1418
|
+
route: `/api/search`,
|
|
1419
|
+
handler: en
|
|
1420
|
+
}, r = {
|
|
1421
|
+
route: `/**`,
|
|
1422
|
+
handler: tn
|
|
1423
|
+
};
|
|
1424
|
+
return (i, a) => {
|
|
1425
|
+
if (a.charCodeAt(a.length - 1) === 47 && (a = a.slice(0, -1) || `/`), a === `/api/meta`) return { data: e };
|
|
1426
|
+
if (a === `/api/page`) return { data: t };
|
|
1427
|
+
if (a === `/api/search`) return { data: n };
|
|
1428
|
+
let o = a.split(`/`);
|
|
1429
|
+
return o.length, {
|
|
1430
|
+
data: r,
|
|
1431
|
+
params: { _: o.slice(1).join(`/`) }
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
})(), rn = [D(Ge)].filter(Boolean);
|
|
1435
|
+
B();
|
|
1436
|
+
var an = `default`;
|
|
1437
|
+
function $() {
|
|
1438
|
+
let e = $._instance;
|
|
1439
|
+
return e || (e = $._instance = on(), globalThis.__nitro__ = globalThis.__nitro__ || {}, globalThis.__nitro__[an] = e, e);
|
|
1440
|
+
}
|
|
1441
|
+
function on() {
|
|
1442
|
+
let e = (e, t) => {
|
|
1443
|
+
if (t?.event) {
|
|
1444
|
+
let n = t.event.req.context?.nitro?.errors;
|
|
1445
|
+
n && n.push({
|
|
1446
|
+
error: e,
|
|
1447
|
+
context: t
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
}, t = sn({ onError(e, t) {
|
|
1451
|
+
return Ee(e, t);
|
|
1452
|
+
} });
|
|
1453
|
+
return {
|
|
1454
|
+
fetch: (e) => (e.context ||= {}, e.context.nitro = e.context.nitro || { errors: [] }, t.fetch(e)),
|
|
1455
|
+
h3: t,
|
|
1456
|
+
hooks: void 0,
|
|
1457
|
+
captureError: e
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
function sn(e) {
|
|
1461
|
+
let t = new xe(e);
|
|
1462
|
+
return t[`~findRoute`] = (e) => nn(e.req.method, e.url.pathname), t[`~middleware`].push(...rn), t[`~getMiddleware`] = (e, n) => {
|
|
1463
|
+
let r = e.url.pathname, i = e.req.method, a = [];
|
|
1464
|
+
{
|
|
1465
|
+
let t = cn(i, r);
|
|
1466
|
+
e.context.routeRules = t?.routeRules, t?.routeRuleMiddleware.length && a.push(...t.routeRuleMiddleware);
|
|
1467
|
+
}
|
|
1468
|
+
return a.push(...t[`~middleware`]), n?.data?.middleware?.length && a.push(...n.data.middleware), a;
|
|
1469
|
+
}, t;
|
|
1470
|
+
}
|
|
1471
|
+
function cn(e, t) {
|
|
1472
|
+
let n = Zt(e, t);
|
|
1473
|
+
if (!n?.length) return { routeRuleMiddleware: [] };
|
|
1474
|
+
let r = {};
|
|
1475
|
+
for (let e of n) for (let t of e.data) {
|
|
1476
|
+
let n = r[t.name];
|
|
1477
|
+
if (n) {
|
|
1478
|
+
if (t.options === !1) {
|
|
1479
|
+
delete r[t.name];
|
|
1480
|
+
continue;
|
|
1481
|
+
}
|
|
1482
|
+
typeof n.options == `object` && typeof t.options == `object` ? n.options = {
|
|
1483
|
+
...n.options,
|
|
1484
|
+
...t.options
|
|
1485
|
+
} : n.options = t.options, n.route = t.route, n.params = {
|
|
1486
|
+
...n.params,
|
|
1487
|
+
...e.params
|
|
1488
|
+
};
|
|
1489
|
+
} else t.options !== !1 && (r[t.name] = {
|
|
1490
|
+
...t,
|
|
1491
|
+
params: e.params
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
let i = [];
|
|
1495
|
+
for (let e of Object.values(r)) e.options === !1 || !e.handler || i.push(e.handler(e));
|
|
1496
|
+
return {
|
|
1497
|
+
routeRules: r,
|
|
1498
|
+
routeRuleMiddleware: i
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
Z();
|
|
1502
|
+
async function ln(e) {
|
|
1503
|
+
let t = $(), n = await Y(e);
|
|
1504
|
+
return {
|
|
1505
|
+
fetch: t.fetch,
|
|
1506
|
+
docs: n
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
//#endregion
|
|
1510
|
+
export { ln as createDocsServer };
|