typerighter 0.56.0 → 0.56.1
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 -3
- package/README.npm.md +3 -3
- package/dist/{app-Btmcn8ed.js → app-Dh1RgRtN.js} +440 -501
- package/dist/{cli-0cwy5E5t.js → cli-Be64NWBp.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/theme-default/composables/client-preferences/index.d.ts +0 -2
- package/dist/client/theme-default/composables/client-preferences/index.d.ts.map +1 -1
- package/dist/client/theme-default/composables/client-preferences/useSidebarConfig.d.ts +1 -0
- package/dist/client/theme-default/composables/client-preferences/useSidebarConfig.d.ts.map +1 -1
- package/dist/client/theme-default/composables/client-preferences/useTheme.d.ts +1 -0
- package/dist/client/theme-default/composables/client-preferences/useTheme.d.ts.map +1 -1
- package/dist/client/theme-default.js +1098 -1126
- package/dist/client.js +3 -1
- package/dist/index.js +2 -2
- package/dist/{init-CVVOslzB.js → init-BmrfQCbP.js} +1 -1
- package/dist/{page-I67xAM4w.js → page-RL9qA6-j.js} +22 -21
- package/dist/prerenderWorker.js +1 -1
- package/dist/useSidebarConfig-n149FAq4.js +31 -0
- package/dist/useTheme-B-j0bXCL.js +62 -0
- package/dist/{vite-DQoRnpfn.js → vite-C2ruOX7H.js} +1 -1
- package/dist/vite.js +1 -1
- package/package.json +3 -3
- package/dist/client/theme-default/composables/client-preferences/utils/registry.d.ts +0 -3
- package/dist/client/theme-default/composables/client-preferences/utils/registry.d.ts.map +0 -1
- package/dist/registry-DHnqBLvh.js +0 -9
|
@@ -1,47 +1,19 @@
|
|
|
1
1
|
import { A as e, D as t, E as n, I as r, L as i, P as a, R as o, T as s, Y as c, _ as l, a as u, b as d, c as f, f as p, j as m, k as h, l as g, n as _, nt as v, p as y, r as b, rt as x, s as S, v as C, w, y as T } from "../shared-BK7uzYmy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as Ke } from "../
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let n = typeof localStorage < "u" ? localStorage.getItem(e) : null, r = n === null ? t : bt(n, t), i = U(r);
|
|
11
|
-
return Y(i, (t) => {
|
|
12
|
-
typeof localStorage < "u" && localStorage.setItem(e, String(t));
|
|
13
|
-
}), i;
|
|
14
|
-
}
|
|
15
|
-
function bt(e, t) {
|
|
16
|
-
return typeof t == "boolean" ? e === "true" : typeof t == "number" ? Number(e) || t : e;
|
|
17
|
-
}
|
|
18
|
-
// src/client/theme-default/composables/client-preferences/useSidebarConfig.ts
|
|
19
|
-
var xt = "td-sidebar-width", St = "td-sidebar-collapsed", Ct = "--td-sidebar-width", wt = 300, Tt = 48, Et = 200, Dt = 500;
|
|
20
|
-
function Ot() {
|
|
21
|
-
let e = yt(xt, 300), t = yt(St, !1), n = U(!1);
|
|
22
|
-
V(() => {
|
|
23
|
-
n.value = !0;
|
|
24
|
-
});
|
|
25
|
-
let r = M(() => t.value ? 48 : e.value);
|
|
26
|
-
return {
|
|
27
|
-
sidebarWidth: e,
|
|
28
|
-
sidebarCollapsed: t,
|
|
29
|
-
sidebarStyle: M(() => n.value ? { width: `${r.value}px` } : {})
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function kt() {
|
|
33
|
-
let e = `${_e(St)}==='true'`, t = `collapsed?48:(Number(${_e(xt)})||300)`;
|
|
34
|
-
return oe(`var collapsed=${e};var width=${t};` + ie(Ct, "`${width}px`"));
|
|
35
|
-
}
|
|
36
|
-
Be(kt);
|
|
37
|
-
var At = O({
|
|
2
|
+
import { n as E } from "../useTheme-B-j0bXCL.js";
|
|
3
|
+
import { i as ee, n as te, o as D, r as ne, s as re, t as ie } from "../useSidebarConfig-n149FAq4.js";
|
|
4
|
+
import { t as ae } from "../es-B_QJMowB.js";
|
|
5
|
+
import { A as O, B as oe, C as se, D as ce, E as le, F as ue, H as k, I as de, L as fe, M as pe, N as me, O as he, P as ge, R as _e, S as ve, T as ye, V as be, _ as xe, a as Se, b as Ce, c as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, k as je, l as Me, m as Ne, n as Pe, o as Fe, p as A, r as j, s as Ie, u as Le, v as Re, w as ze, x as Be, y as Ve, z as He } from "../app-Dh1RgRtN.js";
|
|
6
|
+
import { a as Ue, i as We, n as Ge, t as Ke } from "../brand-BSCRFcrY.js";
|
|
7
|
+
import { t as qe } from "../inlineRe-CoUp2DgK.js";
|
|
8
|
+
import { Fragment as M, Teleport as Je, Transition as Ye, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createTextVNode as R, createVNode as z, defineComponent as B, getCurrentScope as Xe, h as Ze, markRaw as Qe, mergeModels as $e, mergeProps as et, nextTick as tt, normalizeClass as V, normalizeStyle as nt, onBeforeUnmount as rt, onMounted as it, onScopeDispose as at, onUnmounted as ot, openBlock as H, readonly as st, ref as U, render as ct, renderList as W, renderSlot as G, resolveComponent as lt, resolveDynamicComponent as ut, shallowReadonly as dt, shallowRef as ft, toDisplayString as K, toValue as pt, unref as q, useModel as mt, useTemplateRef as J, vModelText as ht, vShow as gt, watch as Y, watchEffect as _t, withCtx as X, withDirectives as vt, withKeys as yt, withModifiers as bt } from "vue";
|
|
9
|
+
var xt = k({
|
|
38
10
|
name: "check",
|
|
39
11
|
size: 24,
|
|
40
12
|
node: [["path", {
|
|
41
13
|
d: "M20 6 9 17l-5-5",
|
|
42
14
|
key: "1gmf2c"
|
|
43
15
|
}]]
|
|
44
|
-
}),
|
|
16
|
+
}), St = k({
|
|
45
17
|
name: "chevrons-left",
|
|
46
18
|
size: 24,
|
|
47
19
|
node: [["path", {
|
|
@@ -51,7 +23,7 @@ var At = O({
|
|
|
51
23
|
d: "m18 17-5-5 5-5",
|
|
52
24
|
key: "h8a8et"
|
|
53
25
|
}]]
|
|
54
|
-
}),
|
|
26
|
+
}), Ct = k({
|
|
55
27
|
name: "chevrons-right",
|
|
56
28
|
size: 24,
|
|
57
29
|
node: [["path", {
|
|
@@ -61,7 +33,7 @@ var At = O({
|
|
|
61
33
|
d: "m13 17 5-5-5-5",
|
|
62
34
|
key: "17xmmf"
|
|
63
35
|
}]]
|
|
64
|
-
}),
|
|
36
|
+
}), wt = k({
|
|
65
37
|
name: "circle-dot",
|
|
66
38
|
size: 24,
|
|
67
39
|
node: [["circle", {
|
|
@@ -75,7 +47,7 @@ var At = O({
|
|
|
75
47
|
r: "10",
|
|
76
48
|
key: "1mglay"
|
|
77
49
|
}]]
|
|
78
|
-
}),
|
|
50
|
+
}), Tt = k({
|
|
79
51
|
name: "clipboard-copy",
|
|
80
52
|
size: 24,
|
|
81
53
|
node: [
|
|
@@ -105,14 +77,14 @@ var At = O({
|
|
|
105
77
|
key: "5dvupr"
|
|
106
78
|
}]
|
|
107
79
|
]
|
|
108
|
-
}),
|
|
80
|
+
}), Et = k({
|
|
109
81
|
name: "command",
|
|
110
82
|
size: 24,
|
|
111
83
|
node: [["path", {
|
|
112
84
|
d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",
|
|
113
85
|
key: "11bfej"
|
|
114
86
|
}]]
|
|
115
|
-
}),
|
|
87
|
+
}), Dt = k({
|
|
116
88
|
name: "corner-down-left",
|
|
117
89
|
size: 24,
|
|
118
90
|
node: [["path", {
|
|
@@ -122,7 +94,7 @@ var At = O({
|
|
|
122
94
|
d: "m9 10-5 5 5 5",
|
|
123
95
|
key: "1kshq7"
|
|
124
96
|
}]]
|
|
125
|
-
}),
|
|
97
|
+
}), Ot = k({
|
|
126
98
|
name: "delete",
|
|
127
99
|
size: 24,
|
|
128
100
|
node: [
|
|
@@ -139,14 +111,14 @@ var At = O({
|
|
|
139
111
|
key: "1fp51s"
|
|
140
112
|
}]
|
|
141
113
|
]
|
|
142
|
-
}),
|
|
114
|
+
}), kt = k({
|
|
143
115
|
name: "folder-open",
|
|
144
116
|
size: 24,
|
|
145
117
|
node: [["path", {
|
|
146
118
|
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
147
119
|
key: "usdka0"
|
|
148
120
|
}]]
|
|
149
|
-
}),
|
|
121
|
+
}), At = k({
|
|
150
122
|
name: "loader-circle",
|
|
151
123
|
size: 24,
|
|
152
124
|
node: [["path", {
|
|
@@ -154,7 +126,7 @@ var At = O({
|
|
|
154
126
|
key: "13zald"
|
|
155
127
|
}]],
|
|
156
128
|
aliases: ["loader-2"]
|
|
157
|
-
}),
|
|
129
|
+
}), jt = k({
|
|
158
130
|
name: "maximize",
|
|
159
131
|
size: 24,
|
|
160
132
|
node: [
|
|
@@ -175,7 +147,7 @@ var At = O({
|
|
|
175
147
|
key: "18trek"
|
|
176
148
|
}]
|
|
177
149
|
]
|
|
178
|
-
}),
|
|
150
|
+
}), Mt = k({
|
|
179
151
|
name: "option",
|
|
180
152
|
size: 24,
|
|
181
153
|
node: [["path", {
|
|
@@ -185,14 +157,14 @@ var At = O({
|
|
|
185
157
|
d: "M3 3h5.28a1 1 0 0 1 .948.684l5.544 16.632a1 1 0 0 0 .949.684H21",
|
|
186
158
|
key: "1qf1im"
|
|
187
159
|
}]]
|
|
188
|
-
}),
|
|
160
|
+
}), Nt = k({
|
|
189
161
|
name: "space",
|
|
190
162
|
size: 24,
|
|
191
163
|
node: [["path", {
|
|
192
164
|
d: "M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1",
|
|
193
165
|
key: "lt2kga"
|
|
194
166
|
}]]
|
|
195
|
-
}),
|
|
167
|
+
}), Pt = k({
|
|
196
168
|
name: "square-check-big",
|
|
197
169
|
size: 24,
|
|
198
170
|
node: [["path", {
|
|
@@ -203,7 +175,7 @@ var At = O({
|
|
|
203
175
|
key: "1pflzl"
|
|
204
176
|
}]],
|
|
205
177
|
aliases: ["check-square"]
|
|
206
|
-
}),
|
|
178
|
+
}), Ft = k({
|
|
207
179
|
name: "tags",
|
|
208
180
|
size: 24,
|
|
209
181
|
node: [
|
|
@@ -223,7 +195,7 @@ var At = O({
|
|
|
223
195
|
key: "12ikhr"
|
|
224
196
|
}]
|
|
225
197
|
]
|
|
226
|
-
}),
|
|
198
|
+
}), It = k({
|
|
227
199
|
name: "type",
|
|
228
200
|
size: 24,
|
|
229
201
|
node: [
|
|
@@ -240,117 +212,117 @@ var At = O({
|
|
|
240
212
|
key: "s66wpe"
|
|
241
213
|
}]
|
|
242
214
|
]
|
|
243
|
-
}),
|
|
215
|
+
}), Lt = [
|
|
244
216
|
"height",
|
|
245
217
|
"width",
|
|
246
218
|
"viewBox"
|
|
247
|
-
],
|
|
219
|
+
], Rt = ["d"], zt = ["d"], Bt = ["d"], Vt = /* @__PURE__ */ B({
|
|
248
220
|
__name: "TdBrandIcon",
|
|
249
221
|
props: { size: { default: 28 } },
|
|
250
222
|
setup(e) {
|
|
251
|
-
return (t, n) => (H(),
|
|
223
|
+
return (t, n) => (H(), I("svg", {
|
|
252
224
|
fill: "none",
|
|
253
225
|
height: e.size,
|
|
254
226
|
width: e.size * 208 / 128,
|
|
255
|
-
viewBox: q(
|
|
227
|
+
viewBox: q(Ue),
|
|
256
228
|
xmlns: "http://www.w3.org/2000/svg"
|
|
257
229
|
}, [
|
|
258
|
-
|
|
230
|
+
L("path", {
|
|
259
231
|
"clip-rule": "evenodd",
|
|
260
|
-
d: q(
|
|
232
|
+
d: q(Ge),
|
|
261
233
|
"fill-rule": "evenodd",
|
|
262
234
|
fill: "currentColor"
|
|
263
|
-
}, null, 8,
|
|
264
|
-
|
|
265
|
-
d: q(
|
|
235
|
+
}, null, 8, Rt),
|
|
236
|
+
L("path", {
|
|
237
|
+
d: q(We),
|
|
266
238
|
fill: "currentColor"
|
|
267
|
-
}, null, 8,
|
|
268
|
-
|
|
269
|
-
d: q(
|
|
239
|
+
}, null, 8, zt),
|
|
240
|
+
L("path", {
|
|
241
|
+
d: q(Ke),
|
|
270
242
|
fill: "currentColor"
|
|
271
|
-
}, null, 8,
|
|
272
|
-
], 8,
|
|
243
|
+
}, null, 8, Bt)
|
|
244
|
+
], 8, Lt));
|
|
273
245
|
}
|
|
274
|
-
}),
|
|
246
|
+
}), Ht = ["title", "aria-label"], Ut = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
275
247
|
__name: "TdButton",
|
|
276
248
|
props: { label: {} },
|
|
277
249
|
setup(e) {
|
|
278
|
-
return (t, n) => (H(),
|
|
250
|
+
return (t, n) => (H(), I("button", {
|
|
279
251
|
type: "button",
|
|
280
252
|
class: "td-icon-btn",
|
|
281
253
|
title: e.label,
|
|
282
254
|
"aria-label": e.label
|
|
283
|
-
}, [G(t.$slots, "default", {}, void 0, !0)], 8,
|
|
255
|
+
}, [G(t.$slots, "default", {}, void 0, !0)], 8, Ht));
|
|
284
256
|
}
|
|
285
|
-
}), [["__scopeId", "data-v-b1861a4a"]]),
|
|
257
|
+
}), [["__scopeId", "data-v-b1861a4a"]]), Wt = Math.min, Gt = Math.max, Kt = Math.round, qt = (e) => ({
|
|
286
258
|
x: e,
|
|
287
259
|
y: e
|
|
288
|
-
}),
|
|
260
|
+
}), Jt = {
|
|
289
261
|
left: "right",
|
|
290
262
|
right: "left",
|
|
291
263
|
bottom: "top",
|
|
292
264
|
top: "bottom"
|
|
293
265
|
};
|
|
294
|
-
function
|
|
295
|
-
return
|
|
266
|
+
function Yt(e, t, n) {
|
|
267
|
+
return Gt(e, Wt(t, n));
|
|
296
268
|
}
|
|
297
|
-
function
|
|
269
|
+
function Xt(e, t) {
|
|
298
270
|
return typeof e == "function" ? e(t) : e;
|
|
299
271
|
}
|
|
300
|
-
function
|
|
272
|
+
function Zt(e) {
|
|
301
273
|
return e.split("-")[0];
|
|
302
274
|
}
|
|
303
|
-
function
|
|
275
|
+
function Qt(e) {
|
|
304
276
|
return e.split("-")[1];
|
|
305
277
|
}
|
|
306
|
-
function
|
|
278
|
+
function $t(e) {
|
|
307
279
|
return e === "x" ? "y" : "x";
|
|
308
280
|
}
|
|
309
|
-
function
|
|
281
|
+
function en(e) {
|
|
310
282
|
return e === "y" ? "height" : "width";
|
|
311
283
|
}
|
|
312
|
-
function
|
|
284
|
+
function tn(e) {
|
|
313
285
|
let t = e[0];
|
|
314
286
|
return t === "t" || t === "b" ? "y" : "x";
|
|
315
287
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
288
|
+
function nn(e) {
|
|
289
|
+
return $t(tn(e));
|
|
318
290
|
}
|
|
319
|
-
function
|
|
291
|
+
function rn(e, t, n) {
|
|
320
292
|
n === void 0 && (n = !1);
|
|
321
|
-
let r =
|
|
322
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
293
|
+
let r = Qt(e), i = nn(e), a = en(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
294
|
+
return t.reference[a] > t.floating[a] && (o = pn(o)), [o, pn(o)];
|
|
323
295
|
}
|
|
324
|
-
function
|
|
325
|
-
let t =
|
|
296
|
+
function an(e) {
|
|
297
|
+
let t = pn(e);
|
|
326
298
|
return [
|
|
327
|
-
|
|
299
|
+
on(e),
|
|
328
300
|
t,
|
|
329
|
-
|
|
301
|
+
on(t)
|
|
330
302
|
];
|
|
331
303
|
}
|
|
332
|
-
function
|
|
304
|
+
function on(e) {
|
|
333
305
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
334
306
|
}
|
|
335
|
-
var
|
|
336
|
-
function
|
|
307
|
+
var sn = ["left", "right"], cn = ["right", "left"], ln = ["top", "bottom"], un = ["bottom", "top"];
|
|
308
|
+
function dn(e, t, n) {
|
|
337
309
|
switch (e) {
|
|
338
310
|
case "top":
|
|
339
|
-
case "bottom": return n ? t ?
|
|
311
|
+
case "bottom": return n ? t ? cn : sn : t ? sn : cn;
|
|
340
312
|
case "left":
|
|
341
|
-
case "right": return t ?
|
|
313
|
+
case "right": return t ? ln : un;
|
|
342
314
|
default: return [];
|
|
343
315
|
}
|
|
344
316
|
}
|
|
345
|
-
function
|
|
346
|
-
let i =
|
|
347
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
317
|
+
function fn(e, t, n, r) {
|
|
318
|
+
let i = Qt(e), a = dn(Zt(e), n === "start", r);
|
|
319
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(on)))), a;
|
|
348
320
|
}
|
|
349
|
-
function
|
|
350
|
-
let t =
|
|
351
|
-
return
|
|
321
|
+
function pn(e) {
|
|
322
|
+
let t = Zt(e);
|
|
323
|
+
return Jt[t] + e.slice(t.length);
|
|
352
324
|
}
|
|
353
|
-
function
|
|
325
|
+
function mn(e) {
|
|
354
326
|
return {
|
|
355
327
|
top: e.top ?? 0,
|
|
356
328
|
right: e.right ?? 0,
|
|
@@ -358,15 +330,15 @@ function Cn(e) {
|
|
|
358
330
|
left: e.left ?? 0
|
|
359
331
|
};
|
|
360
332
|
}
|
|
361
|
-
function
|
|
333
|
+
function hn(e) {
|
|
362
334
|
return typeof e == "number" ? {
|
|
363
335
|
top: e,
|
|
364
336
|
right: e,
|
|
365
337
|
bottom: e,
|
|
366
338
|
left: e
|
|
367
|
-
} :
|
|
339
|
+
} : mn(e);
|
|
368
340
|
}
|
|
369
|
-
function
|
|
341
|
+
function gn(e) {
|
|
370
342
|
let { x: t, y: n, width: r, height: i } = e;
|
|
371
343
|
return {
|
|
372
344
|
width: r,
|
|
@@ -380,8 +352,8 @@ function Tn(e) {
|
|
|
380
352
|
};
|
|
381
353
|
}
|
|
382
354
|
// ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
383
|
-
function
|
|
384
|
-
let { reference: r, floating: i } = e, a =
|
|
355
|
+
function _n(e, t, n) {
|
|
356
|
+
let { reference: r, floating: i } = e, a = tn(t), o = nn(t), s = en(o), c = Zt(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
385
357
|
switch (c) {
|
|
386
358
|
case "top":
|
|
387
359
|
p = {
|
|
@@ -412,12 +384,12 @@ function En(e, t, n) {
|
|
|
412
384
|
y: r.y
|
|
413
385
|
};
|
|
414
386
|
}
|
|
415
|
-
let m =
|
|
387
|
+
let m = Qt(t);
|
|
416
388
|
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
417
389
|
}
|
|
418
|
-
async function
|
|
390
|
+
async function vn(e, t) {
|
|
419
391
|
t === void 0 && (t = {});
|
|
420
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } =
|
|
392
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Xt(t, e), p = hn(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = gn(await i.getClippingRect({
|
|
421
393
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
422
394
|
boundary: c,
|
|
423
395
|
rootBoundary: l,
|
|
@@ -430,7 +402,7 @@ async function Dn(e, t) {
|
|
|
430
402
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
431
403
|
x: 1,
|
|
432
404
|
y: 1
|
|
433
|
-
}, y =
|
|
405
|
+
}, y = gn(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
434
406
|
elements: o,
|
|
435
407
|
rect: g,
|
|
436
408
|
offsetParent: _,
|
|
@@ -443,15 +415,15 @@ async function Dn(e, t) {
|
|
|
443
415
|
right: (y.right - h.right + p.right) / v.x
|
|
444
416
|
};
|
|
445
417
|
}
|
|
446
|
-
var
|
|
418
|
+
var yn = 50, bn = async (e, t, n) => {
|
|
447
419
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
448
420
|
...o,
|
|
449
|
-
detectOverflow:
|
|
421
|
+
detectOverflow: vn
|
|
450
422
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
451
423
|
reference: e,
|
|
452
424
|
floating: t,
|
|
453
425
|
strategy: i
|
|
454
|
-
}), { x: u, y: d } =
|
|
426
|
+
}), { x: u, y: d } = _n(l, r, c), f = r, p = 0, m = {};
|
|
455
427
|
for (let n = 0; n < a.length; n++) {
|
|
456
428
|
let h = a[n];
|
|
457
429
|
if (!h) continue;
|
|
@@ -472,11 +444,11 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
472
444
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
473
445
|
...m[g],
|
|
474
446
|
...b
|
|
475
|
-
}, x && p <
|
|
447
|
+
}, x && p < yn && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
476
448
|
reference: e,
|
|
477
449
|
floating: t,
|
|
478
450
|
strategy: i
|
|
479
|
-
}) : x.rects), {x: u, y: d} =
|
|
451
|
+
}) : x.rects), {x: u, y: d} = _n(l, f, c)), n = -1);
|
|
480
452
|
}
|
|
481
453
|
return {
|
|
482
454
|
x: u,
|
|
@@ -485,18 +457,18 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
485
457
|
strategy: i,
|
|
486
458
|
middlewareData: m
|
|
487
459
|
};
|
|
488
|
-
},
|
|
460
|
+
}, xn = (e) => ({
|
|
489
461
|
name: "arrow",
|
|
490
462
|
options: e,
|
|
491
463
|
async fn(t) {
|
|
492
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } =
|
|
464
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = Xt(e, t) || {};
|
|
493
465
|
if (l == null) return {};
|
|
494
|
-
let d =
|
|
466
|
+
let d = hn(u), f = {
|
|
495
467
|
x: n,
|
|
496
468
|
y: r
|
|
497
|
-
}, p =
|
|
469
|
+
}, p = nn(i), m = en(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
498
470
|
C && await (o.isElement == null ? void 0 : o.isElement(S)) || (C = s.floating[y] || a.floating[m]);
|
|
499
|
-
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E =
|
|
471
|
+
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = Wt(d[_], T), ee = Wt(d[v], T), te = C - h[m] - ee, D = C / 2 - h[m] / 2 + w, ne = Yt(E, D, te), re = !c.arrow && Qt(i) != null && D !== ne && a.reference[m] / 2 - (D < E ? E : ee) - h[m] / 2 < 0, ie = re ? D < E ? D - E : D - te : 0;
|
|
500
472
|
return {
|
|
501
473
|
[p]: f[p] + ie,
|
|
502
474
|
data: {
|
|
@@ -507,19 +479,19 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
507
479
|
reset: re
|
|
508
480
|
};
|
|
509
481
|
}
|
|
510
|
-
}),
|
|
482
|
+
}), Sn = function(e) {
|
|
511
483
|
return e === void 0 && (e = {}), {
|
|
512
484
|
name: "flip",
|
|
513
485
|
options: e,
|
|
514
486
|
async fn(t) {
|
|
515
487
|
var n;
|
|
516
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } =
|
|
488
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Xt(e, t);
|
|
517
489
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
518
|
-
let g =
|
|
519
|
-
!d && x && b.push(...
|
|
490
|
+
let g = Zt(r), _ = tn(o), v = Zt(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [pn(o)] : an(o)), x = p !== "none";
|
|
491
|
+
!d && x && b.push(...fn(o, m, p, y));
|
|
520
492
|
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
521
493
|
if (l && w.push(C[g]), u) {
|
|
522
|
-
let e =
|
|
494
|
+
let e = rn(r, a, y);
|
|
523
495
|
w.push(C[e[0]], C[e[1]]);
|
|
524
496
|
}
|
|
525
497
|
if (T = [...T, {
|
|
@@ -527,7 +499,7 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
527
499
|
overflows: w
|
|
528
500
|
}], !w.every((e) => e <= 0)) {
|
|
529
501
|
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
530
|
-
if (t && (u !== "alignment" || _ ===
|
|
502
|
+
if (t && (u !== "alignment" || _ === tn(t) || T.every((e) => tn(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
531
503
|
data: {
|
|
532
504
|
index: e,
|
|
533
505
|
overflows: T
|
|
@@ -539,7 +511,7 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
539
511
|
case "bestFit": {
|
|
540
512
|
let e = T.filter((e) => {
|
|
541
513
|
if (x) {
|
|
542
|
-
let t =
|
|
514
|
+
let t = tn(e.placement);
|
|
543
515
|
return t === _ || t === "y";
|
|
544
516
|
}
|
|
545
517
|
return !0;
|
|
@@ -554,9 +526,9 @@ var On = 50, kn = async (e, t, n) => {
|
|
|
554
526
|
return {};
|
|
555
527
|
}
|
|
556
528
|
};
|
|
557
|
-
},
|
|
558
|
-
async function
|
|
559
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o =
|
|
529
|
+
}, Cn = /*#__PURE__*/ new Set(["left", "top"]);
|
|
530
|
+
async function wn(e, t) {
|
|
531
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = Zt(n), s = Qt(n), c = tn(n) === "y", l = Cn.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Xt(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
560
532
|
mainAxis: d,
|
|
561
533
|
crossAxis: 0,
|
|
562
534
|
alignmentAxis: null
|
|
@@ -573,13 +545,13 @@ async function Nn(e, t) {
|
|
|
573
545
|
y: p * u
|
|
574
546
|
};
|
|
575
547
|
}
|
|
576
|
-
var
|
|
548
|
+
var Tn = function(e) {
|
|
577
549
|
return e === void 0 && (e = 0), {
|
|
578
550
|
name: "offset",
|
|
579
551
|
options: e,
|
|
580
552
|
async fn(t) {
|
|
581
553
|
var n;
|
|
582
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
554
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await wn(t, e);
|
|
583
555
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
584
556
|
x: r + s.x,
|
|
585
557
|
y: i + s.y,
|
|
@@ -590,7 +562,7 @@ var Pn = function(e) {
|
|
|
590
562
|
};
|
|
591
563
|
}
|
|
592
564
|
};
|
|
593
|
-
},
|
|
565
|
+
}, En = function(e) {
|
|
594
566
|
return e === void 0 && (e = {}), {
|
|
595
567
|
name: "shift",
|
|
596
568
|
options: e,
|
|
@@ -601,10 +573,10 @@ var Pn = function(e) {
|
|
|
601
573
|
x: t,
|
|
602
574
|
y: n
|
|
603
575
|
};
|
|
604
|
-
} }, ...l } =
|
|
576
|
+
} }, ...l } = Xt(e, t), u = {
|
|
605
577
|
x: n,
|
|
606
578
|
y: r
|
|
607
|
-
}, d = await a.detectOverflow(t, l), f =
|
|
579
|
+
}, d = await a.detectOverflow(t, l), f = tn(i), p = $t(f), m = u[p], h = u[f], g = (e, t) => Yt(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
608
580
|
o && (m = g(p, m)), s && (h = g(f, h));
|
|
609
581
|
let _ = c.fn({
|
|
610
582
|
...t,
|
|
@@ -626,39 +598,39 @@ var Pn = function(e) {
|
|
|
626
598
|
};
|
|
627
599
|
};
|
|
628
600
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
629
|
-
function
|
|
601
|
+
function Dn() {
|
|
630
602
|
return typeof window < "u";
|
|
631
603
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
604
|
+
function On(e) {
|
|
605
|
+
return An(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
634
606
|
}
|
|
635
607
|
function Z(e) {
|
|
636
608
|
var t;
|
|
637
609
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
638
610
|
}
|
|
639
|
-
function
|
|
640
|
-
return ((
|
|
611
|
+
function kn(e) {
|
|
612
|
+
return ((An(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
641
613
|
}
|
|
642
|
-
function
|
|
643
|
-
return
|
|
614
|
+
function An(e) {
|
|
615
|
+
return Dn() ? e instanceof Node || e instanceof Z(e).Node : !1;
|
|
644
616
|
}
|
|
645
|
-
function
|
|
646
|
-
return
|
|
617
|
+
function jn(e) {
|
|
618
|
+
return Dn() ? e instanceof Element || e instanceof Z(e).Element : !1;
|
|
647
619
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
620
|
+
function Mn(e) {
|
|
621
|
+
return Dn() ? e instanceof HTMLElement || e instanceof Z(e).HTMLElement : !1;
|
|
650
622
|
}
|
|
651
|
-
function
|
|
652
|
-
return !
|
|
623
|
+
function Nn(e) {
|
|
624
|
+
return !Dn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Z(e).ShadowRoot;
|
|
653
625
|
}
|
|
654
|
-
function
|
|
655
|
-
let { overflow: t, overflowX: n, overflowY: r, display: i } =
|
|
626
|
+
function Pn(e) {
|
|
627
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = Gn(e);
|
|
656
628
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
657
629
|
}
|
|
658
|
-
function
|
|
659
|
-
return /^(table|td|th)$/.test(
|
|
630
|
+
function Fn(e) {
|
|
631
|
+
return /^(table|td|th)$/.test(On(e));
|
|
660
632
|
}
|
|
661
|
-
function
|
|
633
|
+
function In(e) {
|
|
662
634
|
try {
|
|
663
635
|
if (e.matches(":popover-open")) return !0;
|
|
664
636
|
} catch {}
|
|
@@ -668,31 +640,31 @@ function Gn(e) {
|
|
|
668
640
|
return !1;
|
|
669
641
|
}
|
|
670
642
|
}
|
|
671
|
-
var
|
|
672
|
-
function
|
|
673
|
-
let t =
|
|
674
|
-
return
|
|
643
|
+
var Ln = /transform|translate|scale|rotate|perspective|filter/, Rn = /paint|layout|strict|content/, zn = (e) => !!e && e !== "none", Bn;
|
|
644
|
+
function Vn(e) {
|
|
645
|
+
let t = jn(e) ? Gn(e) : e;
|
|
646
|
+
return zn(t.transform) || zn(t.translate) || zn(t.scale) || zn(t.rotate) || zn(t.perspective) || !Un() && (zn(t.backdropFilter) || zn(t.filter)) || Ln.test(t.willChange || "") || Rn.test(t.contain || "");
|
|
675
647
|
}
|
|
676
|
-
function
|
|
677
|
-
let t =
|
|
678
|
-
for (;
|
|
679
|
-
if (
|
|
680
|
-
if (
|
|
681
|
-
t =
|
|
648
|
+
function Hn(e) {
|
|
649
|
+
let t = qn(e);
|
|
650
|
+
for (; Mn(t) && !Wn(t);) {
|
|
651
|
+
if (Vn(t)) return t;
|
|
652
|
+
if (In(t)) return null;
|
|
653
|
+
t = qn(t);
|
|
682
654
|
}
|
|
683
655
|
return null;
|
|
684
656
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
657
|
+
function Un() {
|
|
658
|
+
return Bn ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Bn;
|
|
687
659
|
}
|
|
688
|
-
function
|
|
689
|
-
return /^(html|body|#document)$/.test(
|
|
660
|
+
function Wn(e) {
|
|
661
|
+
return /^(html|body|#document)$/.test(On(e));
|
|
690
662
|
}
|
|
691
|
-
function
|
|
663
|
+
function Gn(e) {
|
|
692
664
|
return Z(e).getComputedStyle(e);
|
|
693
665
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
666
|
+
function Kn(e) {
|
|
667
|
+
return jn(e) ? {
|
|
696
668
|
scrollLeft: e.scrollLeft,
|
|
697
669
|
scrollTop: e.scrollTop
|
|
698
670
|
} : {
|
|
@@ -700,101 +672,101 @@ function tr(e) {
|
|
|
700
672
|
scrollTop: e.scrollY
|
|
701
673
|
};
|
|
702
674
|
}
|
|
703
|
-
function
|
|
704
|
-
if (
|
|
705
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
706
|
-
return
|
|
675
|
+
function qn(e) {
|
|
676
|
+
if (On(e) === "html") return e;
|
|
677
|
+
let t = e.assignedSlot || e.parentNode || Nn(e) && e.host || kn(e);
|
|
678
|
+
return Nn(t) ? t.host : t;
|
|
707
679
|
}
|
|
708
|
-
function
|
|
709
|
-
let t =
|
|
710
|
-
return
|
|
680
|
+
function Jn(e) {
|
|
681
|
+
let t = qn(e);
|
|
682
|
+
return Wn(t) ? (e.ownerDocument || e).body : Mn(t) && Pn(t) ? t : Jn(t);
|
|
711
683
|
}
|
|
712
|
-
function
|
|
684
|
+
function Yn(e, t, n) {
|
|
713
685
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
714
|
-
let r =
|
|
686
|
+
let r = Jn(e), i = r === e.ownerDocument?.body, a = Z(r);
|
|
715
687
|
if (i) {
|
|
716
|
-
let e =
|
|
717
|
-
return t.concat(a, a.visualViewport || [],
|
|
688
|
+
let e = Xn(a);
|
|
689
|
+
return t.concat(a, a.visualViewport || [], Pn(r) ? r : [], e && n ? Yn(e) : []);
|
|
718
690
|
}
|
|
719
|
-
return t.concat(r,
|
|
691
|
+
return t.concat(r, Yn(r, [], n));
|
|
720
692
|
}
|
|
721
|
-
function
|
|
693
|
+
function Xn(e) {
|
|
722
694
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
723
695
|
}
|
|
724
696
|
// ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
725
|
-
function
|
|
726
|
-
let t =
|
|
697
|
+
function Zn(e) {
|
|
698
|
+
let t = Gn(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = Mn(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Kt(n) !== a || Kt(r) !== o;
|
|
727
699
|
return s && (n = a, r = o), {
|
|
728
700
|
width: n,
|
|
729
701
|
height: r,
|
|
730
702
|
$: s
|
|
731
703
|
};
|
|
732
704
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
705
|
+
function Qn(e) {
|
|
706
|
+
return jn(e) ? e : e.contextElement;
|
|
735
707
|
}
|
|
736
|
-
function
|
|
737
|
-
let t =
|
|
738
|
-
if (!
|
|
739
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
708
|
+
function $n(e) {
|
|
709
|
+
let t = Qn(e);
|
|
710
|
+
if (!Mn(t)) return qt(1);
|
|
711
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Zn(t), o = (a ? Kt(n.width) : n.width) / r, s = (a ? Kt(n.height) : n.height) / i;
|
|
740
712
|
return o && Number.isFinite(o) || (o = 1), s && Number.isFinite(s) || (s = 1), {
|
|
741
713
|
x: o,
|
|
742
714
|
y: s
|
|
743
715
|
};
|
|
744
716
|
}
|
|
745
|
-
var
|
|
746
|
-
function
|
|
717
|
+
var er = /*#__PURE__*/ qt(0);
|
|
718
|
+
function tr(e) {
|
|
747
719
|
let t = Z(e);
|
|
748
|
-
return !
|
|
720
|
+
return !Un() || !t.visualViewport ? er : {
|
|
749
721
|
x: t.visualViewport.offsetLeft,
|
|
750
722
|
y: t.visualViewport.offsetTop
|
|
751
723
|
};
|
|
752
724
|
}
|
|
753
|
-
function
|
|
725
|
+
function nr(e, t, n) {
|
|
754
726
|
return t === void 0 && (t = !1), !!n && t && n === Z(e);
|
|
755
727
|
}
|
|
756
|
-
function
|
|
728
|
+
function rr(e, t, n, r) {
|
|
757
729
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
758
|
-
let i = e.getBoundingClientRect(), a =
|
|
759
|
-
t && (r ?
|
|
760
|
-
let s =
|
|
730
|
+
let i = e.getBoundingClientRect(), a = Qn(e), o = qt(1);
|
|
731
|
+
t && (r ? jn(r) && (o = $n(r)) : o = $n(e));
|
|
732
|
+
let s = nr(a, n, r) ? tr(a) : qt(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
761
733
|
if (a && r) {
|
|
762
|
-
let e = Z(a), t =
|
|
734
|
+
let e = Z(a), t = jn(r) ? Z(r) : r, n = e, i = Xn(n);
|
|
763
735
|
for (; i && t !== n;) {
|
|
764
|
-
let e =
|
|
765
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = Z(i), i =
|
|
736
|
+
let e = $n(i), t = i.getBoundingClientRect(), r = Gn(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
737
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = Z(i), i = Xn(n);
|
|
766
738
|
}
|
|
767
739
|
}
|
|
768
|
-
return
|
|
740
|
+
return gn({
|
|
769
741
|
width: u,
|
|
770
742
|
height: d,
|
|
771
743
|
x: c,
|
|
772
744
|
y: l
|
|
773
745
|
});
|
|
774
746
|
}
|
|
775
|
-
function
|
|
776
|
-
let n =
|
|
777
|
-
return t ? t.left + n :
|
|
747
|
+
function ir(e, t) {
|
|
748
|
+
let n = Kn(e).scrollLeft;
|
|
749
|
+
return t ? t.left + n : rr(kn(e)).left + n;
|
|
778
750
|
}
|
|
779
|
-
function
|
|
751
|
+
function ar(e, t) {
|
|
780
752
|
let n = e.getBoundingClientRect();
|
|
781
753
|
return {
|
|
782
|
-
x: n.left + t.scrollLeft -
|
|
754
|
+
x: n.left + t.scrollLeft - ir(e, n),
|
|
783
755
|
y: n.top + t.scrollTop
|
|
784
756
|
};
|
|
785
757
|
}
|
|
786
|
-
function
|
|
787
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
758
|
+
function or(e) {
|
|
759
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = kn(r), s = t ? In(t.floating) : !1;
|
|
788
760
|
if (r === o || s && a) return n;
|
|
789
761
|
let c = {
|
|
790
762
|
scrollLeft: 0,
|
|
791
763
|
scrollTop: 0
|
|
792
|
-
}, l =
|
|
793
|
-
if ((d || !a) && ((
|
|
794
|
-
let e =
|
|
795
|
-
l =
|
|
764
|
+
}, l = qt(1), u = qt(0), d = Mn(r);
|
|
765
|
+
if ((d || !a) && ((On(r) !== "body" || Pn(o)) && (c = Kn(r)), d)) {
|
|
766
|
+
let e = rr(r);
|
|
767
|
+
l = $n(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
796
768
|
}
|
|
797
|
-
let f = o && !d && !a ?
|
|
769
|
+
let f = o && !d && !a ? ar(o, c) : qt(0);
|
|
798
770
|
return {
|
|
799
771
|
width: n.width * l.x,
|
|
800
772
|
height: n.height * l.y,
|
|
@@ -802,29 +774,29 @@ function hr(e) {
|
|
|
802
774
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
803
775
|
};
|
|
804
776
|
}
|
|
805
|
-
function
|
|
777
|
+
function sr(e) {
|
|
806
778
|
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
807
779
|
}
|
|
808
|
-
function
|
|
809
|
-
let t =
|
|
810
|
-
return
|
|
780
|
+
function cr(e) {
|
|
781
|
+
let t = Kn(e), n = e.ownerDocument.body, r = Gt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Gt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + ir(e), o = -t.scrollTop;
|
|
782
|
+
return Gn(n).direction === "rtl" && (a += Gt(e.clientWidth, n.clientWidth) - r), {
|
|
811
783
|
width: r,
|
|
812
784
|
height: i,
|
|
813
785
|
x: a,
|
|
814
786
|
y: o
|
|
815
787
|
};
|
|
816
788
|
}
|
|
817
|
-
var
|
|
818
|
-
function
|
|
789
|
+
var lr = 25;
|
|
790
|
+
function ur(e, t, n) {
|
|
819
791
|
n === void 0 && (n = "viewport");
|
|
820
|
-
let r = n === "layoutViewport", i = Z(e), a =
|
|
792
|
+
let r = n === "layoutViewport", i = Z(e), a = kn(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
821
793
|
if (o) {
|
|
822
|
-
let e = !
|
|
794
|
+
let e = !Un() || t === "fixed";
|
|
823
795
|
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
824
796
|
}
|
|
825
|
-
if (
|
|
797
|
+
if (ir(a) <= 0) {
|
|
826
798
|
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
827
|
-
o <=
|
|
799
|
+
o <= lr && (s -= o);
|
|
828
800
|
}
|
|
829
801
|
return {
|
|
830
802
|
width: s,
|
|
@@ -833,8 +805,8 @@ function yr(e, t, n) {
|
|
|
833
805
|
y: u
|
|
834
806
|
};
|
|
835
807
|
}
|
|
836
|
-
function
|
|
837
|
-
let n =
|
|
808
|
+
function dr(e, t) {
|
|
809
|
+
let n = rr(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = $n(e);
|
|
838
810
|
return {
|
|
839
811
|
width: e.clientWidth * a.x,
|
|
840
812
|
height: e.clientHeight * a.y,
|
|
@@ -842,13 +814,13 @@ function br(e, t) {
|
|
|
842
814
|
y: r * a.y
|
|
843
815
|
};
|
|
844
816
|
}
|
|
845
|
-
function
|
|
817
|
+
function fr(e, t, n) {
|
|
846
818
|
let r;
|
|
847
|
-
if (t === "viewport" || t === "layoutViewport") r =
|
|
848
|
-
else if (t === "document") r =
|
|
849
|
-
else if (
|
|
819
|
+
if (t === "viewport" || t === "layoutViewport") r = ur(e, n, t);
|
|
820
|
+
else if (t === "document") r = cr(kn(e));
|
|
821
|
+
else if (jn(t)) r = dr(t, n);
|
|
850
822
|
else {
|
|
851
|
-
let n =
|
|
823
|
+
let n = tr(e);
|
|
852
824
|
r = {
|
|
853
825
|
x: t.x - n.x,
|
|
854
826
|
y: t.y - n.y,
|
|
@@ -856,23 +828,23 @@ function xr(e, t, n) {
|
|
|
856
828
|
height: t.height
|
|
857
829
|
};
|
|
858
830
|
}
|
|
859
|
-
return
|
|
831
|
+
return gn(r);
|
|
860
832
|
}
|
|
861
|
-
function
|
|
833
|
+
function pr(e, t) {
|
|
862
834
|
let n = t.get(e);
|
|
863
835
|
if (n) return n;
|
|
864
|
-
let r =
|
|
865
|
-
for (;
|
|
866
|
-
let e =
|
|
867
|
-
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o =
|
|
836
|
+
let r = Yn(e, [], !1).filter((e) => jn(e) && On(e) !== "body"), i = null, a = Gn(e).position === "fixed", o = a ? qn(e) : e;
|
|
837
|
+
for (; jn(o) && !Wn(o);) {
|
|
838
|
+
let e = Gn(o), t = Vn(o), n = i ? i.position : a ? "fixed" : "";
|
|
839
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = qn(o);
|
|
868
840
|
}
|
|
869
841
|
return t.set(e, r), r;
|
|
870
842
|
}
|
|
871
|
-
function
|
|
872
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
843
|
+
function mr(e) {
|
|
844
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? In(t) ? [] : pr(t, this._c) : [].concat(n), r], o = fr(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
873
845
|
for (let e = 1; e < a.length; e++) {
|
|
874
|
-
let n =
|
|
875
|
-
s =
|
|
846
|
+
let n = fr(t, a[e], i);
|
|
847
|
+
s = Gt(n.top, s), c = Wt(n.right, c), l = Wt(n.bottom, l), u = Gt(n.left, u);
|
|
876
848
|
}
|
|
877
849
|
return {
|
|
878
850
|
width: c - u,
|
|
@@ -881,24 +853,24 @@ function Cr(e) {
|
|
|
881
853
|
y: s
|
|
882
854
|
};
|
|
883
855
|
}
|
|
884
|
-
function
|
|
885
|
-
let { width: t, height: n } =
|
|
856
|
+
function hr(e) {
|
|
857
|
+
let { width: t, height: n } = Zn(e);
|
|
886
858
|
return {
|
|
887
859
|
width: t,
|
|
888
860
|
height: n
|
|
889
861
|
};
|
|
890
862
|
}
|
|
891
|
-
function
|
|
892
|
-
let r =
|
|
863
|
+
function gr(e, t, n) {
|
|
864
|
+
let r = Mn(t), i = kn(t), a = n === "fixed", o = rr(e, !0, a, t), s = {
|
|
893
865
|
scrollLeft: 0,
|
|
894
866
|
scrollTop: 0
|
|
895
|
-
}, c =
|
|
896
|
-
if ((r || !a) && ((
|
|
897
|
-
let e =
|
|
867
|
+
}, c = qt(0);
|
|
868
|
+
if ((r || !a) && ((On(t) !== "body" || Pn(i)) && (s = Kn(t)), r)) {
|
|
869
|
+
let e = rr(t, !0, a, t);
|
|
898
870
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
899
871
|
}
|
|
900
|
-
!r && i && (c.x =
|
|
901
|
-
let l = i && !r && !a ?
|
|
872
|
+
!r && i && (c.x = ir(i));
|
|
873
|
+
let l = i && !r && !a ? ar(i, s) : qt(0);
|
|
902
874
|
return {
|
|
903
875
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
904
876
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -906,34 +878,34 @@ function Tr(e, t, n) {
|
|
|
906
878
|
height: o.height
|
|
907
879
|
};
|
|
908
880
|
}
|
|
909
|
-
function
|
|
910
|
-
return
|
|
881
|
+
function _r(e) {
|
|
882
|
+
return Gn(e).position === "static";
|
|
911
883
|
}
|
|
912
|
-
function
|
|
913
|
-
if (!
|
|
884
|
+
function vr(e, t) {
|
|
885
|
+
if (!Mn(e) || Gn(e).position === "fixed") return null;
|
|
914
886
|
if (t) return t(e);
|
|
915
887
|
let n = e.offsetParent;
|
|
916
|
-
return
|
|
888
|
+
return kn(e) === n && (n = n.ownerDocument.body), n;
|
|
917
889
|
}
|
|
918
|
-
function
|
|
890
|
+
function yr(e, t) {
|
|
919
891
|
let n = Z(e);
|
|
920
|
-
if (
|
|
921
|
-
if (!
|
|
922
|
-
let t =
|
|
923
|
-
for (; t &&
|
|
924
|
-
if (
|
|
925
|
-
t =
|
|
892
|
+
if (In(e)) return n;
|
|
893
|
+
if (!Mn(e)) {
|
|
894
|
+
let t = qn(e);
|
|
895
|
+
for (; t && !Wn(t);) {
|
|
896
|
+
if (jn(t) && !_r(t)) return t;
|
|
897
|
+
t = qn(t);
|
|
926
898
|
}
|
|
927
899
|
return n;
|
|
928
900
|
}
|
|
929
|
-
let r =
|
|
930
|
-
for (; r &&
|
|
931
|
-
return r &&
|
|
901
|
+
let r = vr(e, t);
|
|
902
|
+
for (; r && Fn(r) && _r(r);) r = vr(r, t);
|
|
903
|
+
return r && Wn(r) && _r(r) && !Vn(r) ? n : r || Hn(e) || n;
|
|
932
904
|
}
|
|
933
|
-
var
|
|
934
|
-
let t = this.getOffsetParent ||
|
|
905
|
+
var br = async function(e) {
|
|
906
|
+
let t = this.getOffsetParent || yr, n = this.getDimensions, r = await n(e.floating);
|
|
935
907
|
return {
|
|
936
|
-
reference:
|
|
908
|
+
reference: gr(e.reference, await t(e.floating), e.strategy),
|
|
937
909
|
floating: {
|
|
938
910
|
x: 0,
|
|
939
911
|
y: 0,
|
|
@@ -942,76 +914,76 @@ var kr = async function(e) {
|
|
|
942
914
|
}
|
|
943
915
|
};
|
|
944
916
|
};
|
|
945
|
-
function
|
|
946
|
-
return
|
|
947
|
-
}
|
|
948
|
-
var
|
|
949
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
950
|
-
getDocumentElement:
|
|
951
|
-
getClippingRect:
|
|
952
|
-
getOffsetParent:
|
|
953
|
-
getElementRects:
|
|
954
|
-
getClientRects:
|
|
955
|
-
getDimensions:
|
|
956
|
-
getScale:
|
|
957
|
-
isElement:
|
|
958
|
-
isRTL:
|
|
959
|
-
},
|
|
917
|
+
function xr(e) {
|
|
918
|
+
return Gn(e).direction === "rtl";
|
|
919
|
+
}
|
|
920
|
+
var Sr = {
|
|
921
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: or,
|
|
922
|
+
getDocumentElement: kn,
|
|
923
|
+
getClippingRect: mr,
|
|
924
|
+
getOffsetParent: yr,
|
|
925
|
+
getElementRects: br,
|
|
926
|
+
getClientRects: sr,
|
|
927
|
+
getDimensions: hr,
|
|
928
|
+
getScale: $n,
|
|
929
|
+
isElement: jn,
|
|
930
|
+
isRTL: xr
|
|
931
|
+
}, Cr = Tn, wr = En, Tr = Sn, Er = xn, Dr = (e, t, n) => {
|
|
960
932
|
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
961
|
-
...
|
|
933
|
+
...Sr,
|
|
962
934
|
...i.platform,
|
|
963
935
|
_c: r
|
|
964
936
|
};
|
|
965
|
-
return
|
|
937
|
+
return bn(e, t, {
|
|
966
938
|
...i,
|
|
967
939
|
platform: a
|
|
968
940
|
});
|
|
969
941
|
};
|
|
970
942
|
// ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.44_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
971
|
-
function
|
|
943
|
+
function Or(e) {
|
|
972
944
|
return typeof e == "object" && !!e && "$el" in e;
|
|
973
945
|
}
|
|
974
|
-
function
|
|
975
|
-
if (
|
|
946
|
+
function kr(e) {
|
|
947
|
+
if (Or(e)) {
|
|
976
948
|
let t = e.$el;
|
|
977
|
-
return
|
|
949
|
+
return An(t) && On(t) === "#comment" ? null : t;
|
|
978
950
|
}
|
|
979
951
|
return e;
|
|
980
952
|
}
|
|
981
|
-
function
|
|
953
|
+
function Ar(e) {
|
|
982
954
|
return {
|
|
983
955
|
name: "arrow",
|
|
984
956
|
options: e,
|
|
985
957
|
fn(t) {
|
|
986
|
-
let n =
|
|
987
|
-
return n == null ? {} :
|
|
958
|
+
let n = kr(pt(e.element));
|
|
959
|
+
return n == null ? {} : Er({
|
|
988
960
|
element: n,
|
|
989
961
|
padding: e.padding
|
|
990
962
|
}).fn(t);
|
|
991
963
|
}
|
|
992
964
|
};
|
|
993
965
|
}
|
|
994
|
-
function
|
|
966
|
+
function jr(e) {
|
|
995
967
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
996
968
|
}
|
|
997
|
-
function
|
|
998
|
-
let n =
|
|
969
|
+
function Mr(e, t) {
|
|
970
|
+
let n = jr(e);
|
|
999
971
|
return Math.round(t * n) / n;
|
|
1000
972
|
}
|
|
1001
|
-
function
|
|
973
|
+
function Nr(e, t, n) {
|
|
1002
974
|
n === void 0 && (n = {});
|
|
1003
|
-
let r = n.whileElementsMounted, i =
|
|
975
|
+
let r = n.whileElementsMounted, i = N(() => pt(n.open) ?? !0), a = N(() => pt(n.middleware)), o = N(() => pt(n.placement) ?? "bottom"), s = N(() => pt(n.strategy) ?? "absolute"), c = N(() => pt(n.transform) ?? !0), l = N(() => kr(e.value)), u = N(() => kr(t.value)), d = U(0), f = U(0), p = U(s.value), m = U(o.value), h = ft({}), g = U(!1), _ = N(() => {
|
|
1004
976
|
let e = {
|
|
1005
977
|
position: p.value,
|
|
1006
978
|
left: "0",
|
|
1007
979
|
top: "0"
|
|
1008
980
|
};
|
|
1009
981
|
if (!u.value) return e;
|
|
1010
|
-
let t =
|
|
982
|
+
let t = Mr(u.value, d.value), n = Mr(u.value, f.value);
|
|
1011
983
|
return c.value ? {
|
|
1012
984
|
...e,
|
|
1013
985
|
transform: "translate(" + t + "px, " + n + "px)",
|
|
1014
|
-
...
|
|
986
|
+
...jr(u.value) >= 1.5 && { willChange: "transform" }
|
|
1015
987
|
} : {
|
|
1016
988
|
position: p.value,
|
|
1017
989
|
left: t + "px",
|
|
@@ -1021,7 +993,7 @@ function Hr(e, t, n) {
|
|
|
1021
993
|
function y() {
|
|
1022
994
|
if (l.value == null || u.value == null) return;
|
|
1023
995
|
let e = i.value;
|
|
1024
|
-
|
|
996
|
+
Dr(l.value, u.value, {
|
|
1025
997
|
middleware: a.value,
|
|
1026
998
|
placement: o.value,
|
|
1027
999
|
strategy: s.value
|
|
@@ -1043,13 +1015,13 @@ function Hr(e, t, n) {
|
|
|
1043
1015
|
o,
|
|
1044
1016
|
s,
|
|
1045
1017
|
i
|
|
1046
|
-
], y, { flush: "sync" }), Y([l, u], x, { flush: "sync" }), Y(i, S, { flush: "sync" }),
|
|
1047
|
-
x:
|
|
1048
|
-
y:
|
|
1049
|
-
strategy:
|
|
1050
|
-
placement:
|
|
1051
|
-
middlewareData:
|
|
1052
|
-
isPositioned:
|
|
1018
|
+
], y, { flush: "sync" }), Y([l, u], x, { flush: "sync" }), Y(i, S, { flush: "sync" }), Xe() && at(b), {
|
|
1019
|
+
x: dt(d),
|
|
1020
|
+
y: dt(f),
|
|
1021
|
+
strategy: dt(p),
|
|
1022
|
+
placement: dt(m),
|
|
1023
|
+
middlewareData: dt(h),
|
|
1024
|
+
isPositioned: dt(g),
|
|
1053
1025
|
floatingStyles: _,
|
|
1054
1026
|
update: y
|
|
1055
1027
|
};
|
|
@@ -1057,38 +1029,38 @@ function Hr(e, t, n) {
|
|
|
1057
1029
|
// src/client/theme-default/utils/keys.ts
|
|
1058
1030
|
var Q = /* @__PURE__ */ function(e) {
|
|
1059
1031
|
return e.ArrowDown = "ArrowDown", e.ArrowUp = "ArrowUp", e.ArrowLeft = "ArrowLeft", e.ArrowRight = "ArrowRight", e.Enter = "Enter", e.Tab = "Tab", e.Space = " ", e.Escape = "Escape", e.Shift = "Shift", e.Control = "Control", e.Alt = "Alt", e.Meta = "Meta", e.Delete = "Delete", e.Backspace = "Backspace", e.F1 = "F1", e.F2 = "F2", e.F3 = "F3", e.F4 = "F4", e.F5 = "F5", e.F6 = "F6", e.F7 = "F7", e.F8 = "F8", e.F9 = "F9", e.F10 = "F10", e.F11 = "F11", e.F12 = "F12", e.a = "a", e.b = "b", e.c = "c", e.d = "d", e.e = "e", e.f = "f", e.g = "g", e.h = "h", e.i = "i", e.j = "j", e.k = "k", e.l = "l", e.m = "m", e.n = "n", e.o = "o", e.p = "p", e.q = "q", e.r = "r", e.s = "s", e.t = "t", e.u = "u", e.v = "v", e.w = "w", e.x = "x", e.y = "y", e.z = "z", e.FSlash = "/", e.Question = "?", e.Backslash = "\\", e;
|
|
1060
|
-
}({}),
|
|
1032
|
+
}({}), Pr = { class: "td-kbd-shortcut" }, $ = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1061
1033
|
__name: "TdKbdShortcut",
|
|
1062
1034
|
props: { keys: {} },
|
|
1063
1035
|
setup(e) {
|
|
1064
1036
|
let t = {
|
|
1065
|
-
[Q.ArrowDown]:
|
|
1066
|
-
[Q.ArrowUp]:
|
|
1067
|
-
[Q.ArrowLeft]:
|
|
1068
|
-
[Q.ArrowRight]:
|
|
1069
|
-
[Q.Control]:
|
|
1070
|
-
[Q.Meta]:
|
|
1071
|
-
[Q.Alt]:
|
|
1072
|
-
[Q.Enter]:
|
|
1073
|
-
[Q.Delete]:
|
|
1074
|
-
[Q.Space]:
|
|
1037
|
+
[Q.ArrowDown]: be,
|
|
1038
|
+
[Q.ArrowUp]: fe,
|
|
1039
|
+
[Q.ArrowLeft]: oe,
|
|
1040
|
+
[Q.ArrowRight]: He,
|
|
1041
|
+
[Q.Control]: Et,
|
|
1042
|
+
[Q.Meta]: Et,
|
|
1043
|
+
[Q.Alt]: Mt,
|
|
1044
|
+
[Q.Enter]: Dt,
|
|
1045
|
+
[Q.Delete]: Ot,
|
|
1046
|
+
[Q.Space]: Nt
|
|
1075
1047
|
}, n = {
|
|
1076
1048
|
[Q.Shift]: "⇧",
|
|
1077
1049
|
[Q.Escape]: "Esc",
|
|
1078
1050
|
[Q.Tab]: "Tab",
|
|
1079
1051
|
[Q.Backspace]: "⌫"
|
|
1080
|
-
}, r =
|
|
1052
|
+
}, r = N(() => e.keys.map((e) => {
|
|
1081
1053
|
let r = t[e];
|
|
1082
1054
|
if (r) return { icon: r };
|
|
1083
1055
|
let i = n[e];
|
|
1084
1056
|
return i ? { label: i } : { label: e.toUpperCase() };
|
|
1085
1057
|
}));
|
|
1086
|
-
return (e, t) => (H(),
|
|
1058
|
+
return (e, t) => (H(), I("span", Pr, [(H(!0), I(M, null, W(r.value, (e, t) => (H(), I("kbd", { key: t }, [e.icon ? (H(), P(ut(e.icon), {
|
|
1087
1059
|
key: 0,
|
|
1088
1060
|
size: 12
|
|
1089
|
-
})) : (H(),
|
|
1061
|
+
})) : (H(), I(M, { key: 1 }, [R(K(e.label), 1)], 64))]))), 128))]));
|
|
1090
1062
|
}
|
|
1091
|
-
}), [["__scopeId", "data-v-ad94203e"]]),
|
|
1063
|
+
}), [["__scopeId", "data-v-ad94203e"]]), Fr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1092
1064
|
inheritAttrs: !1,
|
|
1093
1065
|
__name: "TdTooltip",
|
|
1094
1066
|
props: {
|
|
@@ -1101,13 +1073,13 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
1101
1073
|
shortcut: { default: () => void 0 }
|
|
1102
1074
|
},
|
|
1103
1075
|
setup(e) {
|
|
1104
|
-
let t = J("trigger"), n = J("tooltip"), r = J("arrowEl"), i = U(!1), a, o, { floatingStyles: s, middlewareData: c, placement: l } =
|
|
1076
|
+
let t = J("trigger"), n = J("tooltip"), r = J("arrowEl"), i = U(!1), a, o, { floatingStyles: s, middlewareData: c, placement: l } = Nr(t, n, {
|
|
1105
1077
|
placement: e.placement,
|
|
1106
1078
|
middleware: [
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1079
|
+
Cr(8),
|
|
1080
|
+
Tr(),
|
|
1081
|
+
wr({ padding: 8 }),
|
|
1082
|
+
Ar({ element: r })
|
|
1111
1083
|
]
|
|
1112
1084
|
});
|
|
1113
1085
|
function u() {
|
|
@@ -1119,39 +1091,39 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
1119
1091
|
i.value = !0;
|
|
1120
1092
|
}, 400));
|
|
1121
1093
|
}
|
|
1122
|
-
|
|
1094
|
+
rt(u);
|
|
1123
1095
|
function f() {
|
|
1124
1096
|
u(), o = setTimeout(() => {
|
|
1125
1097
|
i.value = !1;
|
|
1126
1098
|
}, 100);
|
|
1127
1099
|
}
|
|
1128
|
-
return (r, a) => (H(),
|
|
1100
|
+
return (r, a) => (H(), I(M, null, [L("span", et({
|
|
1129
1101
|
ref_key: "trigger",
|
|
1130
1102
|
ref: t
|
|
1131
1103
|
}, r.$attrs, {
|
|
1132
1104
|
class: "td-tooltip-trigger",
|
|
1133
1105
|
onMouseenter: d,
|
|
1134
1106
|
onMouseleave: f
|
|
1135
|
-
}), [G(r.$slots, "default", {}, void 0, !0)], 16), (H(),
|
|
1107
|
+
}), [G(r.$slots, "default", {}, void 0, !0)], 16), (H(), P(Je, { to: "body" }, [i.value ? (H(), I("div", {
|
|
1136
1108
|
key: 0,
|
|
1137
1109
|
ref_key: "tooltip",
|
|
1138
1110
|
ref: n,
|
|
1139
1111
|
class: "td-tooltip",
|
|
1140
|
-
style:
|
|
1112
|
+
style: nt(q(s)),
|
|
1141
1113
|
role: "tooltip",
|
|
1142
1114
|
onMouseenter: u,
|
|
1143
1115
|
onMouseleave: f
|
|
1144
1116
|
}, [
|
|
1145
|
-
|
|
1146
|
-
e.shortcut ? (H(),
|
|
1117
|
+
R(K(e.text) + " ", 1),
|
|
1118
|
+
e.shortcut ? (H(), P($, {
|
|
1147
1119
|
key: 0,
|
|
1148
1120
|
keys: e.shortcut,
|
|
1149
1121
|
class: "td-tooltip-shortcut"
|
|
1150
|
-
}, null, 8, ["keys"])) :
|
|
1151
|
-
|
|
1122
|
+
}, null, 8, ["keys"])) : F("", !0),
|
|
1123
|
+
L("div", {
|
|
1152
1124
|
ref: "arrowEl",
|
|
1153
1125
|
class: "td-tooltip-arrow",
|
|
1154
|
-
style:
|
|
1126
|
+
style: nt({
|
|
1155
1127
|
left: q(c).arrow?.x === void 0 ? "" : `${q(c).arrow.x}px`,
|
|
1156
1128
|
top: q(c).arrow?.y === void 0 ? "" : `${q(c).arrow.y}px`,
|
|
1157
1129
|
...q(l).startsWith("bottom") ? { top: "-4px" } : {},
|
|
@@ -1160,16 +1132,16 @@ var Q = /* @__PURE__ */ function(e) {
|
|
|
1160
1132
|
...q(l).startsWith("left") ? { right: "-4px" } : {}
|
|
1161
1133
|
})
|
|
1162
1134
|
}, null, 4)
|
|
1163
|
-
], 36)) :
|
|
1135
|
+
], 36)) : F("", !0)]))], 64));
|
|
1164
1136
|
}
|
|
1165
1137
|
}), [["__scopeId", "data-v-db48de27"]]);
|
|
1166
1138
|
// src/client/theme-default/utils/renderInlineMarkup.ts
|
|
1167
|
-
function
|
|
1168
|
-
let t = U(
|
|
1169
|
-
return
|
|
1139
|
+
function Ir(e) {
|
|
1140
|
+
let t = U(Lr(e()));
|
|
1141
|
+
return _t((n) => {
|
|
1170
1142
|
let r = e();
|
|
1171
1143
|
if (!r.includes("$")) {
|
|
1172
|
-
t.value =
|
|
1144
|
+
t.value = Lr(r);
|
|
1173
1145
|
return;
|
|
1174
1146
|
}
|
|
1175
1147
|
let i = !0;
|
|
@@ -1180,58 +1152,58 @@ function Gr(e) {
|
|
|
1180
1152
|
});
|
|
1181
1153
|
}), t;
|
|
1182
1154
|
}
|
|
1183
|
-
function
|
|
1155
|
+
function Lr(e) {
|
|
1184
1156
|
let t = 0, n = "";
|
|
1185
|
-
for (let r of e.matchAll(
|
|
1157
|
+
for (let r of e.matchAll(qe)) n += f(e.slice(t, r.index)), r[1] === void 0 ? n += f(r[0]) : n += `<code>${f(r[1])}</code>`, t = r.index + r[0].length;
|
|
1186
1158
|
return n += f(e.slice(t)), n;
|
|
1187
1159
|
}
|
|
1188
1160
|
// src/client/theme-default/components/TdTree/TdTreeNodeLabel.vue?vue&type=script&setup=true&lang.ts
|
|
1189
|
-
var
|
|
1161
|
+
var Rr = ["innerHTML"], zr = /* @__PURE__ */ B({
|
|
1190
1162
|
__name: "TdTreeNodeLabel",
|
|
1191
1163
|
props: { text: {} },
|
|
1192
1164
|
setup(e) {
|
|
1193
|
-
let t =
|
|
1194
|
-
return (e, n) => (H(),
|
|
1165
|
+
let t = Ir(() => e.text);
|
|
1166
|
+
return (e, n) => (H(), I("span", { innerHTML: q(t) }, null, 8, Rr));
|
|
1195
1167
|
}
|
|
1196
|
-
}),
|
|
1168
|
+
}), Br = ["aria-expanded"], Vr = { class: "td-tree-label-text" }, Hr = ["href"], Ur = { class: "td-tree-count" }, Wr = ["href"], Gr = ["href"], Kr = {
|
|
1197
1169
|
key: 2,
|
|
1198
1170
|
class: "td-tree-time"
|
|
1199
|
-
},
|
|
1171
|
+
}, qr = 10, Jr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1200
1172
|
__name: "TdTreeNode",
|
|
1201
1173
|
props: {
|
|
1202
1174
|
node: {},
|
|
1203
1175
|
urlPrefix: { default: "" }
|
|
1204
1176
|
},
|
|
1205
1177
|
setup(n) {
|
|
1206
|
-
let r =
|
|
1178
|
+
let r = Ie(), { withBase: i } = j(), a = N(() => w(n.urlPrefix, n.node.name)), o = N(() => l(n.node)), f = N(() => o.value ? t(o.value.filepath) : s(a.value)), p = N(() => i(f.value)), m = N(() => o.value?.label ?? c(n.node.name)), h = N(() => o.value?.icon ? Le(o.value.icon.name) : void 0), g = N(() => n.node.entries.filter((e) => e.kind === "dir" || !d(e.item.filepath))), _ = N(() => 0 < n.node.entries.length), v = N(() => y(n.node));
|
|
1207
1179
|
function y(e) {
|
|
1208
1180
|
let t = 0;
|
|
1209
1181
|
for (let n of e.entries) n.kind === "file" ? t++ : t += y(n.node);
|
|
1210
1182
|
return t;
|
|
1211
1183
|
}
|
|
1212
|
-
let b = U(!e(a.value, r.path)), x = U(!1), S =
|
|
1184
|
+
let b = U(!e(a.value, r.path)), x = U(!1), S = N(() => g.value.filter((e) => e.kind === "file")), C = N(() => S.value.length), E = N(() => {
|
|
1213
1185
|
let e = 0;
|
|
1214
1186
|
for (let n of g.value) if (n.kind === "file") {
|
|
1215
1187
|
if (t(n.item.filepath) === r.path) return e;
|
|
1216
1188
|
e++;
|
|
1217
1189
|
}
|
|
1218
1190
|
return -1;
|
|
1219
|
-
}), ee =
|
|
1220
|
-
if (C.value <=
|
|
1191
|
+
}), ee = N(() => {
|
|
1192
|
+
if (C.value <= qr) return {
|
|
1221
1193
|
start: 0,
|
|
1222
1194
|
end: C.value
|
|
1223
1195
|
};
|
|
1224
1196
|
let e = E.value;
|
|
1225
1197
|
if (e < 0) return {
|
|
1226
1198
|
start: 0,
|
|
1227
|
-
end:
|
|
1199
|
+
end: qr
|
|
1228
1200
|
};
|
|
1229
|
-
let t = Math.max(0, e - 4), n = t +
|
|
1230
|
-
return C.value < n && (n = C.value, t = Math.max(0, n -
|
|
1201
|
+
let t = Math.max(0, e - 4), n = t + qr;
|
|
1202
|
+
return C.value < n && (n = C.value, t = Math.max(0, n - qr)), {
|
|
1231
1203
|
start: t,
|
|
1232
1204
|
end: n
|
|
1233
1205
|
};
|
|
1234
|
-
}), te =
|
|
1206
|
+
}), te = N(() => x.value ? 0 : ee.value.start), D = N(() => x.value ? 0 : Math.max(0, C.value - ee.value.end)), ne = N(() => {
|
|
1235
1207
|
if (x.value) return g.value;
|
|
1236
1208
|
let { start: e, end: t } = ee.value, n = 0;
|
|
1237
1209
|
return g.value.filter((r) => {
|
|
@@ -1243,181 +1215,181 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1243
1215
|
Y(() => r.path, (t) => {
|
|
1244
1216
|
e(a.value, t) && (b.value = !1);
|
|
1245
1217
|
});
|
|
1246
|
-
function
|
|
1218
|
+
function re() {
|
|
1247
1219
|
x.value = !0;
|
|
1248
1220
|
}
|
|
1249
|
-
function
|
|
1221
|
+
function ie(e) {
|
|
1250
1222
|
return r.path === e;
|
|
1251
1223
|
}
|
|
1252
|
-
function
|
|
1224
|
+
function ae(e) {
|
|
1253
1225
|
e.key === "ArrowRight" && b.value ? (b.value = !1, e.preventDefault()) : e.key === "ArrowLeft" && !b.value && (b.value = !0, e.preventDefault());
|
|
1254
1226
|
}
|
|
1255
|
-
function
|
|
1227
|
+
function O() {
|
|
1256
1228
|
b.value = !b.value;
|
|
1257
1229
|
}
|
|
1258
1230
|
return (e, n) => {
|
|
1259
|
-
let r =
|
|
1260
|
-
return _.value ? (H(),
|
|
1231
|
+
let r = lt("TdTreeNode", !0);
|
|
1232
|
+
return _.value ? (H(), I("div", {
|
|
1261
1233
|
key: 0,
|
|
1262
1234
|
class: "td-tree-node",
|
|
1263
1235
|
role: "treeitem",
|
|
1264
1236
|
"aria-expanded": !b.value
|
|
1265
|
-
}, [
|
|
1237
|
+
}, [L("div", {
|
|
1266
1238
|
class: "td-tree-label",
|
|
1267
1239
|
role: "button",
|
|
1268
1240
|
tabindex: "0",
|
|
1269
|
-
onClick:
|
|
1270
|
-
onKeydown:
|
|
1241
|
+
onClick: O,
|
|
1242
|
+
onKeydown: ae
|
|
1271
1243
|
}, [
|
|
1272
|
-
|
|
1244
|
+
z(q(ue), {
|
|
1273
1245
|
size: 14,
|
|
1274
|
-
class:
|
|
1246
|
+
class: V(["td-tree-caret", { "is-collapsed": b.value }])
|
|
1275
1247
|
}, null, 8, ["class"]),
|
|
1276
|
-
|
|
1277
|
-
|
|
1248
|
+
L("span", Vr, K(m.value), 1),
|
|
1249
|
+
z(Fr, {
|
|
1278
1250
|
text: "Open index page",
|
|
1279
1251
|
always: ""
|
|
1280
1252
|
}, {
|
|
1281
|
-
default: X(() => [
|
|
1253
|
+
default: X(() => [L("a", {
|
|
1282
1254
|
href: p.value,
|
|
1283
|
-
class:
|
|
1284
|
-
onClick: n[0] ||=
|
|
1285
|
-
}, [h.value ? (H(),
|
|
1255
|
+
class: V(["td-tree-index-btn", { "is-active": ie(f.value) }]),
|
|
1256
|
+
onClick: n[0] ||= bt(() => {}, ["stop"])
|
|
1257
|
+
}, [h.value ? (H(), P(ut(h.value), {
|
|
1286
1258
|
key: 0,
|
|
1287
1259
|
size: 12
|
|
1288
|
-
})) :
|
|
1260
|
+
})) : ie(f.value) ? (H(), P(q(kt), {
|
|
1289
1261
|
key: 1,
|
|
1290
1262
|
size: 12
|
|
1291
|
-
})) : (H(),
|
|
1263
|
+
})) : (H(), P(q(ce), {
|
|
1292
1264
|
key: 2,
|
|
1293
1265
|
size: 12
|
|
1294
|
-
}))], 10,
|
|
1266
|
+
}))], 10, Hr)]),
|
|
1295
1267
|
_: 1
|
|
1296
1268
|
}),
|
|
1297
|
-
|
|
1298
|
-
], 32),
|
|
1299
|
-
class:
|
|
1269
|
+
L("span", Ur, K(v.value), 1)
|
|
1270
|
+
], 32), L("div", {
|
|
1271
|
+
class: V(["td-collapse td-tree-children", { "is-collapsed": b.value }]),
|
|
1300
1272
|
role: "group"
|
|
1301
|
-
}, [
|
|
1302
|
-
o.value ? (H(),
|
|
1273
|
+
}, [L("div", null, [
|
|
1274
|
+
o.value ? (H(), I("a", {
|
|
1303
1275
|
key: 0,
|
|
1304
1276
|
href: p.value,
|
|
1305
|
-
class:
|
|
1306
|
-
}, [
|
|
1277
|
+
class: V(["td-tree-link td-tree-index-entry", { "is-active": ie(f.value) }])
|
|
1278
|
+
}, [z(q(de), {
|
|
1307
1279
|
size: 14,
|
|
1308
1280
|
class: "td-tree-file-icon"
|
|
1309
|
-
}), n[1] ||=
|
|
1310
|
-
te.value > 0 ? (H(),
|
|
1281
|
+
}), n[1] ||= L("span", { class: "td-tree-link-text" }, "Overview", -1)], 10, Wr)) : F("", !0),
|
|
1282
|
+
te.value > 0 ? (H(), I("button", {
|
|
1311
1283
|
key: 1,
|
|
1312
1284
|
class: "td-tree-more",
|
|
1313
1285
|
type: "button",
|
|
1314
|
-
onClick:
|
|
1315
|
-
}, K(te.value) + " more... ", 1)) :
|
|
1316
|
-
(H(!0),
|
|
1286
|
+
onClick: re
|
|
1287
|
+
}, K(te.value) + " more... ", 1)) : F("", !0),
|
|
1288
|
+
(H(!0), I(M, null, W(ne.value, (e) => (H(), I(M, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (H(), P(r, {
|
|
1317
1289
|
key: 0,
|
|
1318
1290
|
node: e.node,
|
|
1319
1291
|
"url-prefix": a.value
|
|
1320
|
-
}, null, 8, ["node", "url-prefix"])) : (H(),
|
|
1292
|
+
}, null, 8, ["node", "url-prefix"])) : (H(), I("a", {
|
|
1321
1293
|
key: 1,
|
|
1322
1294
|
href: q(i)(q(t)(e.item.filepath)),
|
|
1323
|
-
class:
|
|
1295
|
+
class: V(["td-tree-link", { "is-active": ie(q(t)(e.item.filepath)) }])
|
|
1324
1296
|
}, [
|
|
1325
|
-
e.item.icon && q(
|
|
1297
|
+
e.item.icon && q(Le)(e.item.icon.name) ? (H(), P(ut(q(Le)(e.item.icon.name)), {
|
|
1326
1298
|
key: 0,
|
|
1327
1299
|
size: 14,
|
|
1328
1300
|
class: "td-tree-file-icon"
|
|
1329
|
-
})) : (H(),
|
|
1301
|
+
})) : (H(), P(q(he), {
|
|
1330
1302
|
key: 1,
|
|
1331
1303
|
size: 14,
|
|
1332
1304
|
class: "td-tree-file-icon"
|
|
1333
1305
|
})),
|
|
1334
|
-
|
|
1306
|
+
z(Fr, {
|
|
1335
1307
|
class: "td-tree-link-text",
|
|
1336
1308
|
text: q(T)(e.item.filepath, e.item.label)
|
|
1337
1309
|
}, {
|
|
1338
|
-
default: X(() => [
|
|
1310
|
+
default: X(() => [z(zr, { text: q(T)(e.item.filepath, e.item.label) }, null, 8, ["text"])]),
|
|
1339
1311
|
_: 2
|
|
1340
1312
|
}, 1032, ["text"]),
|
|
1341
|
-
e.item.fileMetadata ? (H(),
|
|
1342
|
-
], 10,
|
|
1343
|
-
|
|
1313
|
+
e.item.fileMetadata ? (H(), I("span", Kr, K(q(u)(e.item.fileMetadata.mtimeSecs)), 1)) : F("", !0)
|
|
1314
|
+
], 10, Gr))], 64))), 128)),
|
|
1315
|
+
D.value > 0 ? (H(), I("button", {
|
|
1344
1316
|
key: 2,
|
|
1345
1317
|
class: "td-tree-more",
|
|
1346
1318
|
type: "button",
|
|
1347
|
-
onClick:
|
|
1348
|
-
}, K(
|
|
1349
|
-
])], 2)], 8,
|
|
1319
|
+
onClick: re
|
|
1320
|
+
}, K(D.value) + " more... ", 1)) : F("", !0)
|
|
1321
|
+
])], 2)], 8, Br)) : F("", !0);
|
|
1350
1322
|
};
|
|
1351
1323
|
}
|
|
1352
|
-
}), [["__scopeId", "data-v-f9c9c250"]]),
|
|
1324
|
+
}), [["__scopeId", "data-v-f9c9c250"]]), Yr = {
|
|
1353
1325
|
class: "td-nav",
|
|
1354
1326
|
"aria-label": "Site navigation"
|
|
1355
|
-
},
|
|
1327
|
+
}, Xr = { role: "tree" }, Zr = ["href"], Qr = {
|
|
1356
1328
|
key: 0,
|
|
1357
1329
|
class: "td-root-link-time"
|
|
1358
|
-
},
|
|
1330
|
+
}, $r = ["href"], ei = { class: "td-root-link-text" }, ti = {
|
|
1359
1331
|
key: 2,
|
|
1360
1332
|
class: "td-root-link-time"
|
|
1361
|
-
},
|
|
1333
|
+
}, ni = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1362
1334
|
__name: "TdContentNav",
|
|
1363
1335
|
props: { tree: {} },
|
|
1364
1336
|
setup(e) {
|
|
1365
|
-
let n =
|
|
1337
|
+
let n = Ie(), { withBase: r } = j(), i = N(() => e.tree.entries.find((e) => e.kind === "file" && d(e.item.filepath))?.item), a = N(() => e.tree.entries.filter((e) => e.kind === "dir" || !d(e.item.filepath)));
|
|
1366
1338
|
function o(e) {
|
|
1367
1339
|
return n.path === e;
|
|
1368
1340
|
}
|
|
1369
|
-
return (e, n) => (H(),
|
|
1341
|
+
return (e, n) => (H(), I("nav", Yr, [L("div", Xr, [L("a", {
|
|
1370
1342
|
href: q(r)(i.value ? q(t)(i.value.filepath) : q(s)("/")),
|
|
1371
|
-
class:
|
|
1343
|
+
class: V(["td-root-link", { "is-active": o(i.value ? q(t)(i.value.filepath) : q(s)("/")) }]),
|
|
1372
1344
|
role: "treeitem"
|
|
1373
1345
|
}, [
|
|
1374
|
-
|
|
1346
|
+
z(q(le), {
|
|
1375
1347
|
size: 14,
|
|
1376
1348
|
class: "td-root-link-icon"
|
|
1377
1349
|
}),
|
|
1378
|
-
n[0] ||=
|
|
1379
|
-
i.value ? (H(),
|
|
1380
|
-
], 10,
|
|
1350
|
+
n[0] ||= L("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
1351
|
+
i.value ? (H(), I("span", Qr, K(i.value.fileMetadata ? q(u)(i.value.fileMetadata.mtimeSecs) : ""), 1)) : F("", !0)
|
|
1352
|
+
], 10, Zr), (H(!0), I(M, null, W(a.value, (e) => (H(), I(M, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (H(), P(Jr, {
|
|
1381
1353
|
key: 0,
|
|
1382
1354
|
node: e.node
|
|
1383
|
-
}, null, 8, ["node"])) : (H(),
|
|
1355
|
+
}, null, 8, ["node"])) : (H(), I("a", {
|
|
1384
1356
|
key: 1,
|
|
1385
1357
|
href: q(r)(q(t)(e.item.filepath)),
|
|
1386
|
-
class:
|
|
1358
|
+
class: V(["td-root-link", { "is-active": o(q(t)(e.item.filepath)) }]),
|
|
1387
1359
|
role: "treeitem"
|
|
1388
1360
|
}, [
|
|
1389
|
-
e.item.icon && q(
|
|
1361
|
+
e.item.icon && q(Le)(e.item.icon.name) ? (H(), P(ut(q(Le)(e.item.icon.name)), {
|
|
1390
1362
|
key: 0,
|
|
1391
1363
|
size: 14,
|
|
1392
1364
|
class: "td-root-link-icon"
|
|
1393
|
-
})) : (H(),
|
|
1365
|
+
})) : (H(), P(q(he), {
|
|
1394
1366
|
key: 1,
|
|
1395
1367
|
size: 14,
|
|
1396
1368
|
class: "td-root-link-icon"
|
|
1397
1369
|
})),
|
|
1398
|
-
|
|
1399
|
-
e.item.fileMetadata ? (H(),
|
|
1400
|
-
], 10,
|
|
1370
|
+
L("span", ei, K(q(T)(e.item.filepath, e.item.label)), 1),
|
|
1371
|
+
e.item.fileMetadata ? (H(), I("span", ti, K(q(u)(e.item.fileMetadata.mtimeSecs)), 1)) : F("", !0)
|
|
1372
|
+
], 10, $r))], 64))), 128))])]));
|
|
1401
1373
|
}
|
|
1402
|
-
}), [["__scopeId", "data-v-038de594"]]),
|
|
1374
|
+
}), [["__scopeId", "data-v-038de594"]]), ri = { class: "td-footer" }, ii = { key: 0 }, ai = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1403
1375
|
__name: "TdFooter",
|
|
1404
1376
|
setup(e) {
|
|
1405
|
-
let t =
|
|
1406
|
-
return (e, r) => (H(),
|
|
1377
|
+
let t = j(), n = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1378
|
+
return (e, r) => (H(), I("footer", ri, [r[0] ||= L("span", null, [R(" Powered by "), L("a", {
|
|
1407
1379
|
href: "https://github.com/huydo862003/typerighter",
|
|
1408
1380
|
target: "_blank",
|
|
1409
1381
|
rel: "noopener noreferrer",
|
|
1410
1382
|
class: "td-footer-link"
|
|
1411
|
-
}, "Typerighter")], -1), q(t).author || q(t).license ? (H(),
|
|
1412
|
-
q(t).license ? (H(),
|
|
1413
|
-
q(t).license && q(t).author ? (H(),
|
|
1414
|
-
q(t).author ? (H(),
|
|
1415
|
-
])) :
|
|
1383
|
+
}, "Typerighter")], -1), q(t).author || q(t).license ? (H(), I("span", ii, [
|
|
1384
|
+
q(t).license ? (H(), I(M, { key: 0 }, [R(K(q(t).license), 1)], 64)) : F("", !0),
|
|
1385
|
+
q(t).license && q(t).author ? (H(), I(M, { key: 1 }, [R(" · ")], 64)) : F("", !0),
|
|
1386
|
+
q(t).author ? (H(), I(M, { key: 2 }, [R("© " + K(q(n)) + " " + K(q(t).author), 1)], 64)) : F("", !0)
|
|
1387
|
+
])) : F("", !0)]));
|
|
1416
1388
|
}
|
|
1417
|
-
}), [["__scopeId", "data-v-696804f8"]]),
|
|
1389
|
+
}), [["__scopeId", "data-v-696804f8"]]), oi = {
|
|
1418
1390
|
key: 0,
|
|
1419
1391
|
class: "td-dropdown-panel"
|
|
1420
|
-
},
|
|
1392
|
+
}, si = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1421
1393
|
inheritAttrs: !1,
|
|
1422
1394
|
__name: "TdDropdown",
|
|
1423
1395
|
props: {
|
|
@@ -1429,7 +1401,7 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1429
1401
|
},
|
|
1430
1402
|
emits: ["update:open"],
|
|
1431
1403
|
setup(e) {
|
|
1432
|
-
let t =
|
|
1404
|
+
let t = mt(e, "open"), n = J("wrapper");
|
|
1433
1405
|
function r(e) {
|
|
1434
1406
|
n.value?.contains(e.target) || (t.value = !1);
|
|
1435
1407
|
}
|
|
@@ -1438,29 +1410,29 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1438
1410
|
}
|
|
1439
1411
|
return Y(t, (e) => {
|
|
1440
1412
|
typeof document < "u" && (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
1441
|
-
}),
|
|
1413
|
+
}), ot(() => {
|
|
1442
1414
|
typeof document < "u" && document.removeEventListener("click", r);
|
|
1443
|
-
}), (e, r) => (H(),
|
|
1415
|
+
}), (e, r) => (H(), I("span", et({
|
|
1444
1416
|
ref_key: "wrapper",
|
|
1445
1417
|
ref: n
|
|
1446
|
-
}, e.$attrs, { class: "td-dropdown" }), [
|
|
1418
|
+
}, e.$attrs, { class: "td-dropdown" }), [L("span", { onClick: i }, [G(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (H(), I("div", oi, [G(e.$slots, "default", {}, void 0, !0)])) : F("", !0)], 16));
|
|
1447
1419
|
}
|
|
1448
|
-
}), [["__scopeId", "data-v-645fe3f0"]]),
|
|
1420
|
+
}), [["__scopeId", "data-v-645fe3f0"]]), ci = {
|
|
1449
1421
|
class: "td-breadcrumb",
|
|
1450
1422
|
"aria-label": "Breadcrumb"
|
|
1451
|
-
},
|
|
1423
|
+
}, li = ["href"], ui = {
|
|
1452
1424
|
type: "button",
|
|
1453
1425
|
class: "td-breadcrumb-ellipsis"
|
|
1454
|
-
},
|
|
1426
|
+
}, di = ["href"], fi = ["href"], pi = {
|
|
1455
1427
|
key: 1,
|
|
1456
1428
|
class: "td-breadcrumb-current"
|
|
1457
|
-
},
|
|
1429
|
+
}, mi = ["href"], hi = {
|
|
1458
1430
|
key: 1,
|
|
1459
1431
|
class: "td-breadcrumb-current"
|
|
1460
|
-
},
|
|
1432
|
+
}, gi = 3, _i = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1461
1433
|
__name: "TdBreadcrumb",
|
|
1462
1434
|
setup(e) {
|
|
1463
|
-
let t =
|
|
1435
|
+
let t = Ie(), { withBase: n } = j(), i = U(!1), a = N(() => {
|
|
1464
1436
|
let e = r(t.path), i = [{
|
|
1465
1437
|
name: "Home",
|
|
1466
1438
|
href: n(s("/"))
|
|
@@ -1475,127 +1447,127 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1475
1447
|
});
|
|
1476
1448
|
}
|
|
1477
1449
|
return i;
|
|
1478
|
-
}), o =
|
|
1450
|
+
}), o = N(() => gi < a.value.length), l = N(() => a.value.slice(1, -2));
|
|
1479
1451
|
return Y(() => t.path, () => {
|
|
1480
1452
|
i.value = !1;
|
|
1481
|
-
}), (e, t) => (H(),
|
|
1453
|
+
}), (e, t) => (H(), I("nav", ci, [L("a", {
|
|
1482
1454
|
href: a.value[0].href,
|
|
1483
1455
|
class: "td-breadcrumb-link td-breadcrumb-home"
|
|
1484
|
-
}, K(a.value[0].name), 9,
|
|
1485
|
-
t[2] ||=
|
|
1456
|
+
}, K(a.value[0].name), 9, li), o.value ? (H(), I(M, { key: 0 }, [
|
|
1457
|
+
t[2] ||= L("span", {
|
|
1486
1458
|
class: "td-breadcrumb-sep",
|
|
1487
1459
|
"aria-hidden": "true"
|
|
1488
1460
|
}, "/", -1),
|
|
1489
|
-
|
|
1461
|
+
z(si, {
|
|
1490
1462
|
open: i.value,
|
|
1491
1463
|
"onUpdate:open": t[0] ||= (e) => i.value = e
|
|
1492
1464
|
}, {
|
|
1493
|
-
trigger: X(() => [
|
|
1494
|
-
default: X(() => [(H(!0),
|
|
1465
|
+
trigger: X(() => [L("button", ui, [z(q(O), { size: 14 })])]),
|
|
1466
|
+
default: X(() => [(H(!0), I(M, null, W(l.value, (e) => (H(), I("a", {
|
|
1495
1467
|
key: e.href,
|
|
1496
1468
|
href: e.href,
|
|
1497
1469
|
class: "td-breadcrumb-dropdown-item"
|
|
1498
|
-
}, K(e.name), 9,
|
|
1470
|
+
}, K(e.name), 9, di))), 128))]),
|
|
1499
1471
|
_: 1
|
|
1500
1472
|
}, 8, ["open"]),
|
|
1501
|
-
(H(!0),
|
|
1473
|
+
(H(!0), I(M, null, W(a.value.slice(-2), (e) => (H(), I(M, { key: e.href }, [t[1] ||= L("span", {
|
|
1502
1474
|
class: "td-breadcrumb-sep",
|
|
1503
1475
|
"aria-hidden": "true"
|
|
1504
|
-
}, "/", -1), e === a.value[a.value.length - 1] ? (H(),
|
|
1476
|
+
}, "/", -1), e === a.value[a.value.length - 1] ? (H(), I("span", pi, K(e.name), 1)) : (H(), I("a", {
|
|
1505
1477
|
key: 0,
|
|
1506
1478
|
href: e.href,
|
|
1507
1479
|
class: "td-breadcrumb-link"
|
|
1508
|
-
}, K(e.name), 9,
|
|
1509
|
-
], 64)) : (H(!0),
|
|
1480
|
+
}, K(e.name), 9, fi))], 64))), 128))
|
|
1481
|
+
], 64)) : (H(!0), I(M, { key: 1 }, W(a.value.slice(1), (e, n) => (H(), I(M, { key: e.href }, [t[3] ||= L("span", {
|
|
1510
1482
|
class: "td-breadcrumb-sep",
|
|
1511
1483
|
"aria-hidden": "true"
|
|
1512
|
-
}, "/", -1), n < a.value.length - 2 ? (H(),
|
|
1484
|
+
}, "/", -1), n < a.value.length - 2 ? (H(), I("a", {
|
|
1513
1485
|
key: 0,
|
|
1514
1486
|
href: e.href,
|
|
1515
1487
|
class: "td-breadcrumb-link"
|
|
1516
|
-
}, K(e.name), 9,
|
|
1488
|
+
}, K(e.name), 9, mi)) : (H(), I("span", hi, K(e.name), 1))], 64))), 128))]));
|
|
1517
1489
|
}
|
|
1518
|
-
}), [["__scopeId", "data-v-89f87a49"]]),
|
|
1490
|
+
}), [["__scopeId", "data-v-89f87a49"]]), vi = {
|
|
1519
1491
|
key: 0,
|
|
1520
1492
|
class: "td-header-nav"
|
|
1521
|
-
},
|
|
1493
|
+
}, yi = [
|
|
1522
1494
|
"href",
|
|
1523
1495
|
"target",
|
|
1524
1496
|
"rel"
|
|
1525
|
-
],
|
|
1497
|
+
], bi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1526
1498
|
__name: "TdHeaderNavBar",
|
|
1527
1499
|
setup(e) {
|
|
1528
|
-
let t =
|
|
1500
|
+
let t = j(), { withBase: n } = t, r = Ie();
|
|
1529
1501
|
function i(e) {
|
|
1530
1502
|
return !m(e) && r.path.startsWith(n(e));
|
|
1531
1503
|
}
|
|
1532
|
-
return (e, r) => q(t).nav?.length ? (H(),
|
|
1504
|
+
return (e, r) => q(t).nav?.length ? (H(), I("nav", vi, [(H(!0), I(M, null, W(q(t).nav, (e) => (H(), I("a", {
|
|
1533
1505
|
key: e.link,
|
|
1534
1506
|
href: q(m)(e.link) ? e.link : q(n)(e.link),
|
|
1535
1507
|
target: q(m)(e.link) ? "_blank" : void 0,
|
|
1536
1508
|
rel: q(m)(e.link) ? "noopener noreferrer" : void 0,
|
|
1537
|
-
class:
|
|
1509
|
+
class: V(["td-header-nav-link", { "is-active": i(e.link) }])
|
|
1538
1510
|
}, [
|
|
1539
|
-
e.icon && q(
|
|
1511
|
+
e.icon && q(Le)(e.icon) ? (H(), P(ut(q(Le)(e.icon)), {
|
|
1540
1512
|
key: 0,
|
|
1541
1513
|
size: 14,
|
|
1542
1514
|
class: "td-header-nav-icon"
|
|
1543
|
-
})) :
|
|
1544
|
-
|
|
1545
|
-
q(m)(e.link) ? (H(),
|
|
1515
|
+
})) : F("", !0),
|
|
1516
|
+
R(" " + K(e.title) + " ", 1),
|
|
1517
|
+
q(m)(e.link) ? (H(), P(q(_e), {
|
|
1546
1518
|
key: 1,
|
|
1547
1519
|
size: 14
|
|
1548
|
-
})) :
|
|
1549
|
-
], 10,
|
|
1520
|
+
})) : F("", !0)
|
|
1521
|
+
], 10, yi))), 128))])) : F("", !0);
|
|
1550
1522
|
}
|
|
1551
|
-
}), [["__scopeId", "data-v-b7b3bb7c"]]),
|
|
1523
|
+
}), [["__scopeId", "data-v-b7b3bb7c"]]), xi = {
|
|
1552
1524
|
key: 0,
|
|
1553
1525
|
class: "td-menu-nav"
|
|
1554
|
-
},
|
|
1526
|
+
}, Si = [
|
|
1555
1527
|
"href",
|
|
1556
1528
|
"target",
|
|
1557
1529
|
"rel"
|
|
1558
|
-
],
|
|
1530
|
+
], Ci = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1559
1531
|
__name: "TdHeaderNavMenu",
|
|
1560
1532
|
setup(e) {
|
|
1561
|
-
let t =
|
|
1533
|
+
let t = j(), { withBase: n } = t, r = Ie();
|
|
1562
1534
|
function i(e) {
|
|
1563
1535
|
return !m(e) && r.path.startsWith(n(e));
|
|
1564
1536
|
}
|
|
1565
|
-
return (e, r) => q(t).nav?.length ? (H(),
|
|
1537
|
+
return (e, r) => q(t).nav?.length ? (H(), I("nav", xi, [(H(!0), I(M, null, W(q(t).nav, (e) => (H(), I("a", {
|
|
1566
1538
|
key: e.link,
|
|
1567
1539
|
href: q(m)(e.link) ? e.link : q(n)(e.link),
|
|
1568
1540
|
target: q(m)(e.link) ? "_blank" : void 0,
|
|
1569
1541
|
rel: q(m)(e.link) ? "noopener noreferrer" : void 0,
|
|
1570
|
-
class:
|
|
1542
|
+
class: V(["td-menu-nav-item", { "is-active": i(e.link) }])
|
|
1571
1543
|
}, [
|
|
1572
|
-
e.icon ? (H(),
|
|
1544
|
+
e.icon ? (H(), P(Me, {
|
|
1573
1545
|
key: 0,
|
|
1574
1546
|
name: e.icon,
|
|
1575
1547
|
size: 16
|
|
1576
|
-
}, null, 8, ["name"])) :
|
|
1577
|
-
|
|
1578
|
-
q(m)(e.link) ? (H(),
|
|
1548
|
+
}, null, 8, ["name"])) : F("", !0),
|
|
1549
|
+
L("span", null, K(e.title), 1),
|
|
1550
|
+
q(m)(e.link) ? (H(), P(q(_e), {
|
|
1579
1551
|
key: 1,
|
|
1580
1552
|
size: 14
|
|
1581
|
-
})) :
|
|
1582
|
-
], 10,
|
|
1553
|
+
})) : F("", !0)
|
|
1554
|
+
], 10, Si))), 128))])) : F("", !0);
|
|
1583
1555
|
}
|
|
1584
|
-
}), [["__scopeId", "data-v-8b23de5a"]]),
|
|
1556
|
+
}), [["__scopeId", "data-v-8b23de5a"]]), wi = { class: "td-widget-checkbox" }, Ti = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1585
1557
|
__name: "TdWidgetCheckbox",
|
|
1586
1558
|
props: { value: {} },
|
|
1587
1559
|
setup(e) {
|
|
1588
|
-
return (t, n) => (H(),
|
|
1560
|
+
return (t, n) => (H(), I("span", wi, [e.value ? (H(), P(q(Pt), {
|
|
1589
1561
|
key: 0,
|
|
1590
1562
|
size: 16,
|
|
1591
1563
|
class: "td-widget-checkbox-icon is-checked"
|
|
1592
|
-
})) : (H(),
|
|
1564
|
+
})) : (H(), P(q(Re), {
|
|
1593
1565
|
key: 1,
|
|
1594
1566
|
size: 16,
|
|
1595
1567
|
class: "td-widget-checkbox-icon"
|
|
1596
1568
|
}))]));
|
|
1597
1569
|
}
|
|
1598
|
-
}), [["__scopeId", "data-v-13241c06"]]),
|
|
1570
|
+
}), [["__scopeId", "data-v-13241c06"]]), Ei = /* @__PURE__ */ new Set([
|
|
1599
1571
|
"png",
|
|
1600
1572
|
"jpg",
|
|
1601
1573
|
"jpeg",
|
|
@@ -1607,11 +1579,11 @@ var qr = ["innerHTML"], Jr = /* @__PURE__ */ z({
|
|
|
1607
1579
|
"ico",
|
|
1608
1580
|
"tiff"
|
|
1609
1581
|
]);
|
|
1610
|
-
function
|
|
1582
|
+
function Di(e) {
|
|
1611
1583
|
if (!e) return;
|
|
1612
1584
|
if (typeof e == "string") {
|
|
1613
1585
|
let t = e.trim();
|
|
1614
|
-
return !t || !
|
|
1586
|
+
return !t || !Oi({ url: t }) ? void 0 : {
|
|
1615
1587
|
url: t,
|
|
1616
1588
|
name: i(t),
|
|
1617
1589
|
isImage: !0
|
|
@@ -1628,23 +1600,23 @@ function Ii(e) {
|
|
|
1628
1600
|
name: a,
|
|
1629
1601
|
format: o,
|
|
1630
1602
|
icon: n.icon,
|
|
1631
|
-
isImage:
|
|
1603
|
+
isImage: Oi({
|
|
1632
1604
|
url: r,
|
|
1633
1605
|
name: a,
|
|
1634
1606
|
format: o
|
|
1635
1607
|
})
|
|
1636
1608
|
};
|
|
1637
1609
|
}
|
|
1638
|
-
function
|
|
1639
|
-
if (e.format &&
|
|
1610
|
+
function Oi(e) {
|
|
1611
|
+
if (e.format && Ei.has(e.format.toLowerCase())) return !0;
|
|
1640
1612
|
let t = o(e.name || e.url).slice(1);
|
|
1641
|
-
return t ?
|
|
1613
|
+
return t ? Ei.has(t.toLowerCase()) : !1;
|
|
1642
1614
|
}
|
|
1643
1615
|
// src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
|
|
1644
|
-
var
|
|
1616
|
+
var ki = {
|
|
1645
1617
|
key: 0,
|
|
1646
1618
|
class: "td-widget-relation-wrapper"
|
|
1647
|
-
},
|
|
1619
|
+
}, Ai = ["href", "title"], ji = ["src", "alt"], Mi = ["href"], Ni = { class: "td-widget-file-name" }, Pi = ["href"], Fi = ["href"], Ii = { key: 1 }, Li = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1648
1620
|
__name: "TdWidgetRelation",
|
|
1649
1621
|
props: {
|
|
1650
1622
|
value: {},
|
|
@@ -1654,80 +1626,80 @@ var Ri = {
|
|
|
1654
1626
|
}
|
|
1655
1627
|
},
|
|
1656
1628
|
setup(e) {
|
|
1657
|
-
let { withBase: t } =
|
|
1658
|
-
return (a, o) => n.value ? (H(),
|
|
1629
|
+
let { withBase: t } = j(), n = N(() => Di(e.value)), r = N(() => n.value?.icon ? Le(n.value.icon.name) : void 0), i = N(() => n.value !== void 0 && m(n.value.url));
|
|
1630
|
+
return (a, o) => n.value ? (H(), I("span", ki, [n.value.isImage ? (H(), I("a", {
|
|
1659
1631
|
key: 0,
|
|
1660
1632
|
href: q(t)(n.value.url),
|
|
1661
1633
|
target: "_blank",
|
|
1662
1634
|
rel: "noopener noreferrer",
|
|
1663
1635
|
class: "td-widget-image-preview",
|
|
1664
1636
|
title: n.value.name
|
|
1665
|
-
}, [
|
|
1637
|
+
}, [L("img", {
|
|
1666
1638
|
src: q(t)(n.value.url),
|
|
1667
1639
|
alt: n.value.name,
|
|
1668
1640
|
class: "td-widget-image-img",
|
|
1669
1641
|
loading: "lazy"
|
|
1670
|
-
}, null, 8,
|
|
1642
|
+
}, null, 8, ji)], 8, Ai)) : n.value.format || n.value.url.includes(".") ? (H(), I("a", {
|
|
1671
1643
|
key: 1,
|
|
1672
1644
|
href: q(t)(n.value.url),
|
|
1673
1645
|
target: "_blank",
|
|
1674
1646
|
rel: "noopener noreferrer",
|
|
1675
1647
|
class: "td-widget-file-link"
|
|
1676
|
-
}, [
|
|
1648
|
+
}, [z(q(je), { class: "td-widget-file-icon" }), L("span", Ni, K(n.value.name), 1)], 8, Mi)) : i.value ? (H(), I("a", {
|
|
1677
1649
|
key: 2,
|
|
1678
1650
|
href: n.value.url,
|
|
1679
1651
|
target: "_blank",
|
|
1680
1652
|
rel: "noopener noreferrer",
|
|
1681
1653
|
class: "td-widget-ref td-widget-ref-external"
|
|
1682
|
-
}, [
|
|
1654
|
+
}, [z(q(_e), {
|
|
1683
1655
|
size: 12,
|
|
1684
1656
|
class: "td-widget-external-icon"
|
|
1685
|
-
})], 8,
|
|
1657
|
+
})], 8, Pi)) : (H(), I("a", {
|
|
1686
1658
|
key: 3,
|
|
1687
1659
|
href: q(t)(n.value.url),
|
|
1688
1660
|
class: "td-widget-ref"
|
|
1689
|
-
}, [r.value && !e.hideIcon ? (H(),
|
|
1661
|
+
}, [r.value && !e.hideIcon ? (H(), P(ut(r.value), {
|
|
1690
1662
|
key: 0,
|
|
1691
1663
|
size: 14,
|
|
1692
1664
|
class: "td-widget-ref-icon"
|
|
1693
|
-
})) :
|
|
1665
|
+
})) : F("", !0), R(K(n.value.name), 1)], 8, Fi))])) : (H(), I("span", Ii, K(e.value), 1));
|
|
1694
1666
|
}
|
|
1695
|
-
}), [["__scopeId", "data-v-20319819"]]),
|
|
1667
|
+
}), [["__scopeId", "data-v-20319819"]]), Ri = { key: 0 }, zi = { class: "td-widget-list td-widget-list-icons" }, Bi = { key: 1 }, Vi = { class: "td-widget-list" }, Hi = 5, Ui = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1696
1668
|
__name: "TdWidgetList",
|
|
1697
1669
|
props: {
|
|
1698
1670
|
definition: {},
|
|
1699
1671
|
value: {}
|
|
1700
1672
|
},
|
|
1701
1673
|
setup(e) {
|
|
1702
|
-
let t = U(!1), n =
|
|
1674
|
+
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => e.definition.items?.widget === "relation"), i = N(() => r.value ? n.value.map((e) => Di(e)).filter((e) => e !== void 0) : []), a = N(() => r.value ? Math.max(0, i.value.length - Hi) : Math.max(0, n.value.length - Hi));
|
|
1703
1675
|
function o() {
|
|
1704
1676
|
t.value = !t.value;
|
|
1705
1677
|
}
|
|
1706
1678
|
function s(e) {
|
|
1707
|
-
return t.value ? e : e.slice(0,
|
|
1679
|
+
return t.value ? e : e.slice(0, Hi);
|
|
1708
1680
|
}
|
|
1709
|
-
return (e, c) => r.value ? (H(),
|
|
1681
|
+
return (e, c) => r.value ? (H(), I("div", Ri, [L("ul", zi, [(H(!0), I(M, null, W(s(i.value), (e, t) => (H(), I("li", { key: t }, [L("div", null, [(H(), P(ut(e.icon ? q(Le)(e.icon.name) ?? q(he) : q(he)), {
|
|
1710
1682
|
size: 14,
|
|
1711
1683
|
class: "td-widget-list-icon"
|
|
1712
|
-
}))]),
|
|
1684
|
+
}))]), z(Li, {
|
|
1713
1685
|
value: { $ref: e },
|
|
1714
1686
|
"hide-icon": ""
|
|
1715
|
-
}, null, 8, ["value"])]))), 128))]), a.value > 0 ? (H(),
|
|
1687
|
+
}, null, 8, ["value"])]))), 128))]), a.value > 0 ? (H(), I("button", {
|
|
1716
1688
|
key: 0,
|
|
1717
1689
|
class: "td-widget-more",
|
|
1718
1690
|
type: "button",
|
|
1719
1691
|
onClick: o
|
|
1720
|
-
}, K(t.value ? "show less" : `+${a.value} more`), 1)) :
|
|
1692
|
+
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)])) : (H(), I("div", Bi, [L("ul", Vi, [(H(!0), I(M, null, W(s(n.value), (e, t) => (H(), I("li", { key: t }, [q(Di)(e) ? (H(), P(Li, {
|
|
1721
1693
|
key: 0,
|
|
1722
1694
|
value: e
|
|
1723
|
-
}, null, 8, ["value"])) : (H(),
|
|
1695
|
+
}, null, 8, ["value"])) : (H(), I(M, { key: 1 }, [R(K(e), 1)], 64))]))), 128))]), a.value > 0 ? (H(), I("button", {
|
|
1724
1696
|
key: 0,
|
|
1725
1697
|
class: "td-widget-more",
|
|
1726
1698
|
type: "button",
|
|
1727
1699
|
onClick: o
|
|
1728
|
-
}, K(t.value ? "show less" : `+${a.value} more`), 1)) :
|
|
1700
|
+
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)]));
|
|
1729
1701
|
}
|
|
1730
|
-
}), [["__scopeId", "data-v-bc659020"]]),
|
|
1702
|
+
}), [["__scopeId", "data-v-bc659020"]]), Wi = [
|
|
1731
1703
|
{
|
|
1732
1704
|
fg: "#a0522d",
|
|
1733
1705
|
bg: "rgba(160, 82, 45, 0.1)"
|
|
@@ -1761,55 +1733,55 @@ var Ri = {
|
|
|
1761
1733
|
bg: "rgba(239, 68, 68, 0.1)"
|
|
1762
1734
|
}
|
|
1763
1735
|
];
|
|
1764
|
-
function
|
|
1765
|
-
let t =
|
|
1736
|
+
function Gi(e) {
|
|
1737
|
+
let t = Wi[Ki(String(e ?? "")) % Wi.length];
|
|
1766
1738
|
return {
|
|
1767
1739
|
color: t.fg,
|
|
1768
1740
|
background: t.bg
|
|
1769
1741
|
};
|
|
1770
1742
|
}
|
|
1771
|
-
function
|
|
1743
|
+
function Ki(e) {
|
|
1772
1744
|
let t = 0;
|
|
1773
1745
|
for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
|
|
1774
1746
|
return Math.abs(t);
|
|
1775
1747
|
}
|
|
1776
1748
|
// src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1777
|
-
var
|
|
1749
|
+
var qi = 5, Ji = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1778
1750
|
__name: "TdWidgetMultiSelect",
|
|
1779
1751
|
props: { value: {} },
|
|
1780
1752
|
setup(e) {
|
|
1781
|
-
let t = U(!1), n =
|
|
1753
|
+
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => t.value ? n.value : n.value.slice(0, qi)), i = N(() => Math.max(0, n.value.length - qi));
|
|
1782
1754
|
function a() {
|
|
1783
1755
|
t.value = !t.value;
|
|
1784
1756
|
}
|
|
1785
|
-
return (e, n) => (H(),
|
|
1757
|
+
return (e, n) => (H(), I(M, null, [(H(!0), I(M, null, W(r.value, (e, t) => (H(), I("span", {
|
|
1786
1758
|
key: t,
|
|
1787
1759
|
class: "td-widget-pill",
|
|
1788
|
-
style:
|
|
1789
|
-
}, K(e), 5))), 128)), i.value > 0 ? (H(),
|
|
1760
|
+
style: nt(q(Gi)(e))
|
|
1761
|
+
}, K(e), 5))), 128)), i.value > 0 ? (H(), I("button", {
|
|
1790
1762
|
key: 0,
|
|
1791
1763
|
class: "td-widget-more",
|
|
1792
1764
|
type: "button",
|
|
1793
1765
|
onClick: a
|
|
1794
|
-
}, K(t.value ? "show less" : `+${i.value} more`), 1)) :
|
|
1766
|
+
}, K(t.value ? "show less" : `+${i.value} more`), 1)) : F("", !0)], 64));
|
|
1795
1767
|
}
|
|
1796
|
-
}), [["__scopeId", "data-v-b3656329"]]),
|
|
1768
|
+
}), [["__scopeId", "data-v-b3656329"]]), Yi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1797
1769
|
__name: "TdWidgetSelect",
|
|
1798
1770
|
props: { value: {} },
|
|
1799
1771
|
setup(e) {
|
|
1800
|
-
return (t, n) => (H(),
|
|
1772
|
+
return (t, n) => (H(), I("span", {
|
|
1801
1773
|
class: "td-widget-pill",
|
|
1802
|
-
style:
|
|
1774
|
+
style: nt(q(Gi)(e.value))
|
|
1803
1775
|
}, K(e.value), 5));
|
|
1804
1776
|
}
|
|
1805
|
-
}), [["__scopeId", "data-v-b9e2b4fd"]]),
|
|
1777
|
+
}), [["__scopeId", "data-v-b9e2b4fd"]]), Xi = ["href", "title"], Zi = ["src", "alt"], Qi = ["href"], $i = { class: "td-widget-file-name" }, ea = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1806
1778
|
__name: "TdWidgetText",
|
|
1807
1779
|
props: {
|
|
1808
1780
|
definition: {},
|
|
1809
1781
|
value: {}
|
|
1810
1782
|
},
|
|
1811
1783
|
setup(e) {
|
|
1812
|
-
let { withBase: t } =
|
|
1784
|
+
let { withBase: t } = j(), n = N(() => typeof e.value == "string" ? e.value.trim() : ""), r = N(() => Di(e.value)), i = N(() => r.value ? r.value.isImage : 0 < n.value.length && Oi({ url: n.value })), a = N(() => r.value ? r.value.url : n.value), o = N(() => t(a.value)), s = N(() => !n.value || !n.value.includes(".") || n.value.includes(" ") ? !1 : n.value.endsWith(".pdf") || n.value.endsWith(".zip") || n.value.endsWith(".doc") || n.value.endsWith(".docx"));
|
|
1813
1785
|
function c(t) {
|
|
1814
1786
|
if (t == null) return "";
|
|
1815
1787
|
if (typeof t == "object" && !Array.isArray(t)) {
|
|
@@ -1822,65 +1794,65 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1822
1794
|
}
|
|
1823
1795
|
return e.definition.widget === "date" ? _(String(t)) : String(t);
|
|
1824
1796
|
}
|
|
1825
|
-
return (t, a) => i.value ? (H(),
|
|
1797
|
+
return (t, a) => i.value ? (H(), I("a", {
|
|
1826
1798
|
key: 0,
|
|
1827
1799
|
href: o.value,
|
|
1828
1800
|
target: "_blank",
|
|
1829
1801
|
rel: "noopener noreferrer",
|
|
1830
1802
|
class: "td-widget-image-preview",
|
|
1831
1803
|
title: r.value ? r.value.name : n.value
|
|
1832
|
-
}, [
|
|
1804
|
+
}, [L("img", {
|
|
1833
1805
|
src: o.value,
|
|
1834
1806
|
alt: r.value ? r.value.name : n.value,
|
|
1835
1807
|
class: "td-widget-image-img",
|
|
1836
1808
|
loading: "lazy"
|
|
1837
|
-
}, null, 8,
|
|
1809
|
+
}, null, 8, Zi)], 8, Xi)) : s.value ? (H(), I("a", {
|
|
1838
1810
|
key: 1,
|
|
1839
1811
|
href: o.value,
|
|
1840
1812
|
target: "_blank",
|
|
1841
1813
|
rel: "noopener noreferrer",
|
|
1842
1814
|
class: "td-widget-file-link"
|
|
1843
|
-
}, [
|
|
1815
|
+
}, [z(q(je), { class: "td-widget-file-icon" }), L("span", $i, K(n.value.split("/").pop() ?? n.value), 1)], 8, Qi)) : (H(), I(M, { key: 2 }, [R(K(c(e.value)), 1)], 64));
|
|
1844
1816
|
}
|
|
1845
|
-
}), [["__scopeId", "data-v-2ea0f146"]]),
|
|
1817
|
+
}), [["__scopeId", "data-v-2ea0f146"]]), ta = {
|
|
1846
1818
|
key: 0,
|
|
1847
1819
|
class: "td-frontmatter-empty"
|
|
1848
|
-
},
|
|
1820
|
+
}, na = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1849
1821
|
__name: "TdFrontmatterValue",
|
|
1850
1822
|
props: {
|
|
1851
1823
|
definition: {},
|
|
1852
1824
|
value: {}
|
|
1853
1825
|
},
|
|
1854
1826
|
setup(e) {
|
|
1855
|
-
return (t, n) => e.value === void 0 || e.value === null ? (H(),
|
|
1827
|
+
return (t, n) => e.value === void 0 || e.value === null ? (H(), I("span", ta, "Empty")) : e.definition.widget === "checkbox" ? (H(), P(Ti, {
|
|
1856
1828
|
key: 1,
|
|
1857
1829
|
value: e.value
|
|
1858
|
-
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(),
|
|
1830
|
+
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(), P(Yi, {
|
|
1859
1831
|
key: 2,
|
|
1860
1832
|
value: e.value
|
|
1861
|
-
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(),
|
|
1833
|
+
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(), P(Ji, {
|
|
1862
1834
|
key: 3,
|
|
1863
1835
|
value: e.value
|
|
1864
|
-
}, null, 8, ["value"])) : q(
|
|
1836
|
+
}, null, 8, ["value"])) : q(Di)(e.value) || e.definition.widget === "relation" ? (H(), P(Li, {
|
|
1865
1837
|
key: 4,
|
|
1866
1838
|
value: e.value
|
|
1867
|
-
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(),
|
|
1839
|
+
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(), P(Ui, {
|
|
1868
1840
|
key: 5,
|
|
1869
1841
|
definition: e.definition,
|
|
1870
1842
|
value: e.value
|
|
1871
|
-
}, null, 8, ["definition", "value"])) : (H(),
|
|
1843
|
+
}, null, 8, ["definition", "value"])) : (H(), P(ea, {
|
|
1872
1844
|
key: 6,
|
|
1873
1845
|
definition: e.definition,
|
|
1874
1846
|
value: e.value
|
|
1875
1847
|
}, null, 8, ["definition", "value"]));
|
|
1876
1848
|
}
|
|
1877
|
-
}), [["__scopeId", "data-v-1deedc98"]]),
|
|
1849
|
+
}), [["__scopeId", "data-v-1deedc98"]]), ra = {
|
|
1878
1850
|
key: 0,
|
|
1879
1851
|
class: "td-fm-rail"
|
|
1880
|
-
},
|
|
1852
|
+
}, ia = { class: "td-fm-rail-key" }, aa = { class: "td-fm-rail-value" }, oa = {
|
|
1881
1853
|
key: 1,
|
|
1882
1854
|
class: "td-fm-box"
|
|
1883
|
-
},
|
|
1855
|
+
}, sa = { class: "td-fm-box-label" }, ca = { class: "td-fm-box-count" }, la = { class: "td-fm-box-toggle" }, ua = { class: "td-fm-box-body" }, da = { class: "td-fm-box-key" }, fa = { class: "td-fm-box-value" }, pa = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1884
1856
|
__name: "TdFrontmatter",
|
|
1885
1857
|
props: {
|
|
1886
1858
|
mode: { default: "inline" },
|
|
@@ -1888,12 +1860,12 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1888
1860
|
frontmatter: {}
|
|
1889
1861
|
},
|
|
1890
1862
|
setup(e) {
|
|
1891
|
-
let t =
|
|
1863
|
+
let t = ke(), n = N(() => {
|
|
1892
1864
|
if (e.schema) return t.value.schemas[e.schema];
|
|
1893
|
-
}), r =
|
|
1865
|
+
}), r = N(() => {
|
|
1894
1866
|
let t = e.frontmatter;
|
|
1895
1867
|
return t._type && t.fields && typeof t.fields == "object" && !Array.isArray(t.fields) ? t.fields : t;
|
|
1896
|
-
}), i =
|
|
1868
|
+
}), i = N(() => {
|
|
1897
1869
|
let e = n.value, t = r.value, i = [], a = /* @__PURE__ */ new Set();
|
|
1898
1870
|
e && Object.keys(e).forEach((e) => a.add(e)), Object.keys(t).forEach((e) => a.add(e));
|
|
1899
1871
|
for (let n of a) {
|
|
@@ -1905,15 +1877,15 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1905
1877
|
}
|
|
1906
1878
|
return i;
|
|
1907
1879
|
}), a = {
|
|
1908
|
-
text:
|
|
1909
|
-
checkbox:
|
|
1910
|
-
select:
|
|
1911
|
-
multiSelect:
|
|
1912
|
-
relation:
|
|
1913
|
-
list:
|
|
1880
|
+
text: It,
|
|
1881
|
+
checkbox: wt,
|
|
1882
|
+
select: De,
|
|
1883
|
+
multiSelect: Ft,
|
|
1884
|
+
relation: _e,
|
|
1885
|
+
list: ye
|
|
1914
1886
|
};
|
|
1915
1887
|
function o(e) {
|
|
1916
|
-
return a[e] ??
|
|
1888
|
+
return a[e] ?? It;
|
|
1917
1889
|
}
|
|
1918
1890
|
let s = U(!1), l = U(!1);
|
|
1919
1891
|
function u() {
|
|
@@ -1922,73 +1894,73 @@ var na = 5, ra = /*#__PURE__*/ k(/* @__PURE__ */ z({
|
|
|
1922
1894
|
function d() {
|
|
1923
1895
|
l.value = !l.value;
|
|
1924
1896
|
}
|
|
1925
|
-
return (t, n) => e.mode === "rail" && i.value.length > 0 ? (H(),
|
|
1897
|
+
return (t, n) => e.mode === "rail" && i.value.length > 0 ? (H(), I("div", ra, [L("button", {
|
|
1926
1898
|
type: "button",
|
|
1927
1899
|
class: "td-fm-rail-header",
|
|
1928
1900
|
onClick: d
|
|
1929
|
-
}, [n[0] ||=
|
|
1901
|
+
}, [n[0] ||= L("span", { class: "td-fm-rail-label" }, "Properties", -1), z(q(ue), {
|
|
1930
1902
|
size: 14,
|
|
1931
|
-
class:
|
|
1932
|
-
}, null, 8, ["class"])]),
|
|
1903
|
+
class: V(["td-fm-rail-caret", { "is-collapsed": l.value }])
|
|
1904
|
+
}, null, 8, ["class"])]), L("div", { class: V(["td-collapse", { "is-collapsed": l.value }]) }, [L("div", null, [(H(!0), I(M, null, W(i.value, ([e, t]) => (H(), I("div", {
|
|
1933
1905
|
key: e,
|
|
1934
1906
|
class: "td-fm-rail-row"
|
|
1935
|
-
}, [
|
|
1907
|
+
}, [L("span", ia, [(H(), P(ut(o(t.widget)), {
|
|
1936
1908
|
size: 12,
|
|
1937
1909
|
class: "td-fm-icon"
|
|
1938
|
-
})),
|
|
1910
|
+
})), R(" " + K(q(c)(e)), 1)]), L("span", aa, [z(na, {
|
|
1939
1911
|
definition: t,
|
|
1940
1912
|
value: r.value[e]
|
|
1941
|
-
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) : i.value.length > 0 ? (H(),
|
|
1913
|
+
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) : i.value.length > 0 ? (H(), I("div", oa, [L("button", {
|
|
1942
1914
|
type: "button",
|
|
1943
1915
|
class: "td-fm-box-header",
|
|
1944
1916
|
onClick: u
|
|
1945
|
-
}, [
|
|
1917
|
+
}, [L("span", sa, [n[1] ||= R("Properties ", -1), L("span", ca, K(i.value.length), 1)]), L("span", la, [R(K(s.value ? "Show" : "Hide") + " ", 1), s.value ? (H(), P(q(me), {
|
|
1946
1918
|
key: 1,
|
|
1947
1919
|
size: 14
|
|
1948
|
-
})) : (H(),
|
|
1920
|
+
})) : (H(), P(q(ue), {
|
|
1949
1921
|
key: 0,
|
|
1950
1922
|
size: 14
|
|
1951
|
-
}))])]),
|
|
1923
|
+
}))])]), L("div", { class: V(["td-collapse", { "is-collapsed": s.value }]) }, [L("div", ua, [(H(!0), I(M, null, W(i.value, ([e, t]) => (H(), I(M, { key: e }, [L("span", da, [(H(), P(ut(o(t.widget)), {
|
|
1952
1924
|
size: 12,
|
|
1953
1925
|
class: "td-fm-icon"
|
|
1954
|
-
})),
|
|
1926
|
+
})), R(" " + K(q(c)(e)), 1)]), L("span", fa, [z(na, {
|
|
1955
1927
|
definition: t,
|
|
1956
1928
|
value: r.value[e]
|
|
1957
|
-
}, null, 8, ["definition", "value"])])], 64))), 128))])], 2)])) :
|
|
1929
|
+
}, null, 8, ["definition", "value"])])], 64))), 128))])], 2)])) : F("", !0);
|
|
1958
1930
|
}
|
|
1959
1931
|
}), [["__scopeId", "data-v-88227032"]]);
|
|
1960
1932
|
// src/client/theme-default/composables/useMediaQuery.ts
|
|
1961
|
-
function
|
|
1933
|
+
function ma(e) {
|
|
1962
1934
|
let t = U(!1), n;
|
|
1963
1935
|
function r(e) {
|
|
1964
1936
|
t.value = e.matches;
|
|
1965
1937
|
}
|
|
1966
|
-
return
|
|
1938
|
+
return it(() => {
|
|
1967
1939
|
n = window.matchMedia(e), t.value = n.matches, n?.addEventListener("change", r);
|
|
1968
|
-
}),
|
|
1940
|
+
}), ot(() => {
|
|
1969
1941
|
n?.removeEventListener("change", r);
|
|
1970
1942
|
}), t;
|
|
1971
1943
|
}
|
|
1972
1944
|
// src/client/theme-default/composables/useHotkey.ts
|
|
1973
|
-
var
|
|
1945
|
+
var ha = /* @__PURE__ */ new Map([
|
|
1974
1946
|
[Q.Control, "ctrlKey"],
|
|
1975
1947
|
[Q.Alt, "altKey"],
|
|
1976
1948
|
[Q.Shift, "shiftKey"],
|
|
1977
1949
|
[Q.Meta, "metaKey"]
|
|
1978
1950
|
]);
|
|
1979
|
-
function
|
|
1951
|
+
function ga(e) {
|
|
1980
1952
|
if (!(e instanceof Element)) return !1;
|
|
1981
1953
|
let t = e.tagName.toLowerCase();
|
|
1982
1954
|
return t === "input" || t === "textarea" || t === "select" || e.isContentEditable;
|
|
1983
1955
|
}
|
|
1984
|
-
function
|
|
1956
|
+
function _a(e, t, n) {
|
|
1985
1957
|
function r(r) {
|
|
1986
|
-
r.defaultPrevented || n?.ignoreWhenTyping &&
|
|
1958
|
+
r.defaultPrevented || n?.ignoreWhenTyping && ga(r.target) || ba(r, e) && (r.preventDefault(), t(r));
|
|
1987
1959
|
}
|
|
1988
1960
|
let i = { capture: n?.capture ?? !1 };
|
|
1989
|
-
|
|
1961
|
+
it(() => window.addEventListener("keydown", r, i)), ot(() => window.removeEventListener("keydown", r, i));
|
|
1990
1962
|
}
|
|
1991
|
-
function
|
|
1963
|
+
function va(e) {
|
|
1992
1964
|
let t = [];
|
|
1993
1965
|
function n(e, n) {
|
|
1994
1966
|
t.push({
|
|
@@ -1997,47 +1969,47 @@ function Da(e) {
|
|
|
1997
1969
|
});
|
|
1998
1970
|
}
|
|
1999
1971
|
function r(e) {
|
|
2000
|
-
for (let n of t) if (
|
|
1972
|
+
for (let n of t) if (ba(e, n.keys)) {
|
|
2001
1973
|
e.preventDefault(), e.stopPropagation(), n.handler(e);
|
|
2002
1974
|
return;
|
|
2003
1975
|
}
|
|
2004
1976
|
}
|
|
2005
1977
|
return Y(e, (e, t) => {
|
|
2006
1978
|
t?.removeEventListener("keydown", r), e?.addEventListener("keydown", r);
|
|
2007
|
-
}, { immediate: !0 }),
|
|
1979
|
+
}, { immediate: !0 }), ot(() => {
|
|
2008
1980
|
e.value?.removeEventListener("keydown", r);
|
|
2009
1981
|
}), { register: n };
|
|
2010
1982
|
}
|
|
2011
|
-
function
|
|
1983
|
+
function ya(e) {
|
|
2012
1984
|
if (e.length === 1 && /[a-z]/i.test(e)) return `Key${e.toUpperCase()}`;
|
|
2013
1985
|
}
|
|
2014
|
-
function
|
|
2015
|
-
let n = t.filter((e) =>
|
|
1986
|
+
function ba(e, t) {
|
|
1987
|
+
let n = t.filter((e) => ha.has(e)), r = t.filter((e) => !ha.has(e));
|
|
2016
1988
|
if (r.length !== 1) return !1;
|
|
2017
|
-
let i =
|
|
1989
|
+
let i = ya(r[0]);
|
|
2018
1990
|
if (!(i ? e.code === i : e.key.toLowerCase() === r[0].toLowerCase())) return !1;
|
|
2019
|
-
for (let t of n) if (!e[
|
|
1991
|
+
for (let t of n) if (!e[ha.get(t)]) return !1;
|
|
2020
1992
|
return !(e.ctrlKey && !n.includes(Q.Control) || e.altKey && !n.includes(Q.Alt) || e.shiftKey && !n.includes(Q.Shift) || e.metaKey && !n.includes(Q.Meta));
|
|
2021
1993
|
}
|
|
2022
1994
|
// src/client/theme-default/composables/useMenu.ts
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
let e =
|
|
1995
|
+
var xa = U(!1);
|
|
1996
|
+
function Sa() {
|
|
1997
|
+
let e = ma("(width >= 64rem)"), t = N(() => !e.value);
|
|
2026
1998
|
function n() {
|
|
2027
|
-
|
|
1999
|
+
xa.value = !xa.value;
|
|
2028
2000
|
}
|
|
2029
2001
|
function r() {
|
|
2030
|
-
|
|
2002
|
+
xa.value = !0;
|
|
2031
2003
|
}
|
|
2032
2004
|
function i() {
|
|
2033
|
-
|
|
2005
|
+
xa.value = !1;
|
|
2034
2006
|
}
|
|
2035
2007
|
return Y(e, (e) => {
|
|
2036
2008
|
e && i();
|
|
2037
|
-
}),
|
|
2038
|
-
|
|
2009
|
+
}), _a([Q.Escape], () => {
|
|
2010
|
+
xa.value && i();
|
|
2039
2011
|
}), {
|
|
2040
|
-
isOpen:
|
|
2012
|
+
isOpen: st(xa),
|
|
2041
2013
|
isDrawerMounted: t,
|
|
2042
2014
|
toggle: n,
|
|
2043
2015
|
open: r,
|
|
@@ -2045,20 +2017,20 @@ function ja() {
|
|
|
2045
2017
|
};
|
|
2046
2018
|
}
|
|
2047
2019
|
// src/client/theme-default/components/TdMenuButton.vue
|
|
2048
|
-
var
|
|
2020
|
+
var Ca = /* @__PURE__ */ B({
|
|
2049
2021
|
__name: "TdMenuButton",
|
|
2050
2022
|
setup(e) {
|
|
2051
|
-
let { isOpen: t, toggle: n } =
|
|
2052
|
-
return (e, r) => (H(),
|
|
2023
|
+
let { isOpen: t, toggle: n } = Sa();
|
|
2024
|
+
return (e, r) => (H(), P(Ut, {
|
|
2053
2025
|
class: "td-menu-button",
|
|
2054
2026
|
label: q(t) ? "Close menu" : "Open menu",
|
|
2055
2027
|
"aria-expanded": q(t),
|
|
2056
2028
|
onClick: q(n)
|
|
2057
2029
|
}, {
|
|
2058
|
-
default: X(() => [q(t) ? (H(),
|
|
2030
|
+
default: X(() => [q(t) ? (H(), P(q(Ne), {
|
|
2059
2031
|
key: 0,
|
|
2060
2032
|
size: 20
|
|
2061
|
-
})) : (H(),
|
|
2033
|
+
})) : (H(), P(q(ze), {
|
|
2062
2034
|
key: 1,
|
|
2063
2035
|
size: 20
|
|
2064
2036
|
}))]),
|
|
@@ -2071,9 +2043,9 @@ var Ma = /* @__PURE__ */ z({
|
|
|
2071
2043
|
}
|
|
2072
2044
|
});
|
|
2073
2045
|
// src/client/theme-default/composables/usePreviousNext.ts
|
|
2074
|
-
function
|
|
2075
|
-
let e =
|
|
2076
|
-
let i =
|
|
2046
|
+
function wa() {
|
|
2047
|
+
let e = ke(), t = Ie(), { withBase: n, title: r } = j(), i = N(() => {
|
|
2048
|
+
let i = Ea(e.value.contentTree, r), a = i.findIndex((e) => e.url === t.path);
|
|
2077
2049
|
if (a === -1) return {};
|
|
2078
2050
|
let o = 0 < a ? i[a - 1] : void 0, s = a < i.length - 1 ? i[a + 1] : void 0;
|
|
2079
2051
|
return {
|
|
@@ -2088,22 +2060,22 @@ function Na() {
|
|
|
2088
2060
|
};
|
|
2089
2061
|
});
|
|
2090
2062
|
return {
|
|
2091
|
-
previous:
|
|
2092
|
-
next:
|
|
2063
|
+
previous: N(() => i.value.previous),
|
|
2064
|
+
next: N(() => i.value.next)
|
|
2093
2065
|
};
|
|
2094
2066
|
}
|
|
2095
|
-
function
|
|
2067
|
+
function Ta(e, t, n) {
|
|
2096
2068
|
let r = w(t, e.name), i = l(e);
|
|
2097
|
-
i && n.push(
|
|
2098
|
-
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(
|
|
2069
|
+
i && n.push(Da(i));
|
|
2070
|
+
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(Da(t.item)) : t.kind === "dir" && Ta(t.node, r, n);
|
|
2099
2071
|
}
|
|
2100
|
-
function
|
|
2072
|
+
function Ea(e, t) {
|
|
2101
2073
|
let n = [], r = e.entries.find((e) => e.kind === "file" && d(e.item.filepath));
|
|
2102
|
-
r && r.kind === "file" && n.push(
|
|
2103
|
-
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(
|
|
2074
|
+
r && r.kind === "file" && n.push(Da(r.item, t));
|
|
2075
|
+
for (let t of e.entries) t.kind === "file" && !d(t.item.filepath) ? n.push(Da(t.item)) : t.kind === "dir" && Ta(t.node, "", n);
|
|
2104
2076
|
return n;
|
|
2105
2077
|
}
|
|
2106
|
-
function
|
|
2078
|
+
function Da(e, n) {
|
|
2107
2079
|
let r = e.label === void 0 ? n === void 0 ? T(e.filepath) : C(e.filepath, n) : e.label;
|
|
2108
2080
|
return {
|
|
2109
2081
|
url: t(e.filepath),
|
|
@@ -2111,46 +2083,46 @@ function Ia(e, n) {
|
|
|
2111
2083
|
};
|
|
2112
2084
|
}
|
|
2113
2085
|
// src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
|
|
2114
|
-
var
|
|
2086
|
+
var Oa = {
|
|
2115
2087
|
key: 0,
|
|
2116
2088
|
class: "td-prevnext",
|
|
2117
2089
|
"aria-label": "Page navigation"
|
|
2118
|
-
},
|
|
2090
|
+
}, ka = ["href"], Aa = { class: "td-prevnext-label" }, ja = { class: "td-prevnext-title" }, Ma = {
|
|
2119
2091
|
key: 1,
|
|
2120
2092
|
class: "td-prevnext-spacer"
|
|
2121
|
-
},
|
|
2093
|
+
}, Na = ["href"], Pa = { class: "td-prevnext-label" }, Fa = { class: "td-prevnext-title" }, Ia = {
|
|
2122
2094
|
key: 3,
|
|
2123
2095
|
class: "td-prevnext-spacer"
|
|
2124
|
-
},
|
|
2096
|
+
}, La = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2125
2097
|
__name: "TdPreviousNext",
|
|
2126
2098
|
setup(e) {
|
|
2127
|
-
let { previous: t, next: n } =
|
|
2128
|
-
return (e, r) => q(t) || q(n) ? (H(),
|
|
2099
|
+
let { previous: t, next: n } = wa();
|
|
2100
|
+
return (e, r) => q(t) || q(n) ? (H(), I("nav", Oa, [q(t) ? (H(), I("a", {
|
|
2129
2101
|
key: 0,
|
|
2130
2102
|
href: q(t).url,
|
|
2131
2103
|
class: "td-prevnext-link is-previous"
|
|
2132
|
-
}, [
|
|
2133
|
-
|
|
2104
|
+
}, [L("span", Aa, [
|
|
2105
|
+
z(q(ge), {
|
|
2134
2106
|
size: 14,
|
|
2135
2107
|
class: "td-prevnext-chevron"
|
|
2136
2108
|
}),
|
|
2137
|
-
r[0] ||=
|
|
2138
|
-
|
|
2139
|
-
]),
|
|
2109
|
+
r[0] ||= R(" Previous ", -1),
|
|
2110
|
+
z($, { keys: [q(Q).Control, q(Q).ArrowLeft] }, null, 8, ["keys"])
|
|
2111
|
+
]), L("span", ja, K(q(t).title), 1)], 8, ka)) : (H(), I("span", Ma)), q(n) ? (H(), I("a", {
|
|
2140
2112
|
key: 2,
|
|
2141
2113
|
href: q(n).url,
|
|
2142
2114
|
class: "td-prevnext-link is-next"
|
|
2143
|
-
}, [
|
|
2144
|
-
|
|
2145
|
-
r[1] ||=
|
|
2146
|
-
|
|
2115
|
+
}, [L("span", Pa, [
|
|
2116
|
+
z($, { keys: [q(Q).Control, q(Q).ArrowRight] }, null, 8, ["keys"]),
|
|
2117
|
+
r[1] ||= R(" Next ", -1),
|
|
2118
|
+
z(q(me), {
|
|
2147
2119
|
size: 14,
|
|
2148
2120
|
class: "td-prevnext-chevron"
|
|
2149
2121
|
})
|
|
2150
|
-
]),
|
|
2122
|
+
]), L("span", Fa, K(q(n).title), 1)], 8, Na)) : (H(), I("span", Ia))])) : F("", !0);
|
|
2151
2123
|
}
|
|
2152
|
-
}), [["__scopeId", "data-v-b937f37a"]]),
|
|
2153
|
-
function
|
|
2124
|
+
}), [["__scopeId", "data-v-b937f37a"]]), Ra = 100;
|
|
2125
|
+
function za(e) {
|
|
2154
2126
|
let t = U(void 0), n = [], r;
|
|
2155
2127
|
function i() {
|
|
2156
2128
|
if (n.length === 0) return;
|
|
@@ -2160,7 +2132,7 @@ function Ja(e) {
|
|
|
2160
2132
|
return;
|
|
2161
2133
|
}
|
|
2162
2134
|
let r;
|
|
2163
|
-
for (let t of n) if (
|
|
2135
|
+
for (let t of n) if (Ba(t) <= e + Ra) r = t.id;
|
|
2164
2136
|
else break;
|
|
2165
2137
|
t.value = r;
|
|
2166
2138
|
}
|
|
@@ -2173,31 +2145,31 @@ function Ja(e) {
|
|
|
2173
2145
|
let r = new Set(e.map((e) => e.slug));
|
|
2174
2146
|
n = Array.from(document.querySelectorAll(".td-content h2[id], .td-content h3[id], .td-content h4[id], .td-content h5[id]")).filter((e) => r.has(e.id)), i();
|
|
2175
2147
|
}
|
|
2176
|
-
return
|
|
2148
|
+
return it(() => {
|
|
2177
2149
|
window.addEventListener("scroll", a);
|
|
2178
|
-
}),
|
|
2150
|
+
}), ot(() => {
|
|
2179
2151
|
window.removeEventListener("scroll", a), r !== void 0 && cancelAnimationFrame(r);
|
|
2180
2152
|
}), Y(e, (e) => {
|
|
2181
|
-
typeof window < "u" &&
|
|
2153
|
+
typeof window < "u" && tt(() => o(e));
|
|
2182
2154
|
}, { immediate: !0 }), t;
|
|
2183
2155
|
}
|
|
2184
|
-
function
|
|
2156
|
+
function Ba(e) {
|
|
2185
2157
|
let t = 0, n = e;
|
|
2186
2158
|
for (; n;) t += n.offsetTop, n = n.offsetParent;
|
|
2187
2159
|
return t;
|
|
2188
2160
|
}
|
|
2189
2161
|
// src/client/theme-default/components/custom/TdToc.vue?vue&type=script&setup=true&lang.ts
|
|
2190
|
-
var
|
|
2162
|
+
var Va = {
|
|
2191
2163
|
key: 0,
|
|
2192
2164
|
class: "td-toc-inline-wrap"
|
|
2193
|
-
},
|
|
2165
|
+
}, Ha = { class: "td-toc-inline-list" }, Ua = ["href", "innerHTML"], Wa = {
|
|
2194
2166
|
key: 0,
|
|
2195
2167
|
class: "td-toc-inline-children"
|
|
2196
|
-
},
|
|
2168
|
+
}, Ga = ["href", "innerHTML"], Ka = {
|
|
2197
2169
|
key: 1,
|
|
2198
2170
|
class: "td-toc",
|
|
2199
2171
|
"data-testid": "toc"
|
|
2200
|
-
},
|
|
2172
|
+
}, qa = { class: "td-toc-list" }, Ja = ["href", "innerHTML"], Ya = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2201
2173
|
__name: "TdToc",
|
|
2202
2174
|
props: {
|
|
2203
2175
|
headings: {},
|
|
@@ -2215,75 +2187,75 @@ var Xa = {
|
|
|
2215
2187
|
}
|
|
2216
2188
|
},
|
|
2217
2189
|
setup(e) {
|
|
2218
|
-
let t =
|
|
2190
|
+
let t = N(() => {
|
|
2219
2191
|
let t = [];
|
|
2220
2192
|
for (let n of e.headings) {
|
|
2221
2193
|
t.push(n);
|
|
2222
2194
|
for (let e of n.children) t.push(e);
|
|
2223
2195
|
}
|
|
2224
2196
|
return t;
|
|
2225
|
-
}), n = e.static || e.inline ?
|
|
2197
|
+
}), n = e.static || e.inline ? N(() => void 0) : za(() => t.value), r = J("list");
|
|
2226
2198
|
return Y(n, () => {
|
|
2227
|
-
|
|
2199
|
+
tt(() => {
|
|
2228
2200
|
r.value?.querySelector("a.is-active")?.scrollIntoView({ block: "center" });
|
|
2229
2201
|
});
|
|
2230
|
-
}), (r, i) => e.inline ? (H(),
|
|
2202
|
+
}), (r, i) => e.inline ? (H(), I("div", Va, [i[0] ||= L("div", { class: "td-toc-inline-label" }, " On this page ", -1), L("ul", Ha, [(H(!0), I(M, null, W(e.headings, (e) => (H(), I("li", {
|
|
2231
2203
|
key: e.slug,
|
|
2232
2204
|
class: "td-toc-inline-item"
|
|
2233
|
-
}, [
|
|
2205
|
+
}, [L("a", {
|
|
2234
2206
|
href: e.link,
|
|
2235
2207
|
class: "td-toc-inline-link is-h2",
|
|
2236
2208
|
innerHTML: q(g)(e.titleHtml)
|
|
2237
|
-
}, null, 8,
|
|
2209
|
+
}, null, 8, Ua), e.children.length ? (H(), I("ul", Wa, [(H(!0), I(M, null, W(e.children, (e) => (H(), I("li", { key: e.slug }, [L("a", {
|
|
2238
2210
|
href: e.link,
|
|
2239
2211
|
class: "td-toc-inline-link is-h3",
|
|
2240
2212
|
innerHTML: q(g)(e.titleHtml)
|
|
2241
|
-
}, null, 8,
|
|
2213
|
+
}, null, 8, Ga)]))), 128))])) : F("", !0)]))), 128))])])) : e.headings.length ? (H(), I("div", Ka, [L("div", {
|
|
2242
2214
|
ref: "list",
|
|
2243
|
-
class:
|
|
2244
|
-
}, [
|
|
2215
|
+
class: V(["td-toc-list-wrap", { "is-scrollable": e.scrollable }])
|
|
2216
|
+
}, [L("ul", qa, [(H(!0), I(M, null, W(t.value, (e) => (H(), I("li", {
|
|
2245
2217
|
key: e.slug,
|
|
2246
|
-
class:
|
|
2218
|
+
class: V({
|
|
2247
2219
|
"td-toc-indent-1": e.level === 3,
|
|
2248
2220
|
"td-toc-indent-2": e.level === 4,
|
|
2249
2221
|
"td-toc-indent-3": e.level === 5
|
|
2250
2222
|
})
|
|
2251
|
-
}, [
|
|
2223
|
+
}, [L("a", {
|
|
2252
2224
|
href: e.link,
|
|
2253
|
-
class:
|
|
2225
|
+
class: V(["td-toc-link", { "is-active": q(n) === e.slug }]),
|
|
2254
2226
|
innerHTML: q(g)(e.titleHtml)
|
|
2255
|
-
}, null, 10,
|
|
2227
|
+
}, null, 10, Ja)], 2))), 128))])], 2)])) : F("", !0);
|
|
2256
2228
|
}
|
|
2257
|
-
}), [["__scopeId", "data-v-35b9f0c3"]]),
|
|
2229
|
+
}), [["__scopeId", "data-v-35b9f0c3"]]), Xa = {
|
|
2258
2230
|
key: 0,
|
|
2259
2231
|
class: "td-rail"
|
|
2260
|
-
},
|
|
2232
|
+
}, Za = { class: "td-rail-inner" }, Qa = {
|
|
2261
2233
|
class: "td-rail-indicators",
|
|
2262
2234
|
"aria-hidden": "true"
|
|
2263
|
-
},
|
|
2235
|
+
}, $a = { class: "td-rail-panel" }, eo = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2264
2236
|
__name: "TdRail",
|
|
2265
2237
|
setup(e) {
|
|
2266
|
-
let { page: t } =
|
|
2238
|
+
let { page: t } = Se(), n = N(() => {
|
|
2267
2239
|
let e = [];
|
|
2268
2240
|
for (let n of t.value.headings) {
|
|
2269
2241
|
e.push(n);
|
|
2270
2242
|
for (let t of n.children) e.push(t);
|
|
2271
2243
|
}
|
|
2272
2244
|
return e;
|
|
2273
|
-
}), r =
|
|
2274
|
-
return (e, i) => q(t).headings.length > 1 ? (H(),
|
|
2245
|
+
}), r = za(() => n.value);
|
|
2246
|
+
return (e, i) => q(t).headings.length > 1 ? (H(), I("aside", Xa, [L("div", Za, [L("div", Qa, [(H(!0), I(M, null, W(n.value, (e) => (H(), I("div", {
|
|
2275
2247
|
key: e.slug,
|
|
2276
|
-
class:
|
|
2248
|
+
class: V(["td-rail-indicator", {
|
|
2277
2249
|
"is-h3": e.level === 3,
|
|
2278
2250
|
"is-active": q(r) === e.slug
|
|
2279
2251
|
}])
|
|
2280
|
-
}, null, 2))), 128))]),
|
|
2252
|
+
}, null, 2))), 128))]), L("div", $a, [z(Ya, { headings: q(t).headings }, null, 8, ["headings"])])])])) : F("", !0);
|
|
2281
2253
|
}
|
|
2282
|
-
}), [["__scopeId", "data-v-ebea8dba"]]),
|
|
2254
|
+
}), [["__scopeId", "data-v-ebea8dba"]]), to = {
|
|
2283
2255
|
class: "td-skeleton",
|
|
2284
2256
|
role: "status",
|
|
2285
2257
|
"aria-label": "Loading"
|
|
2286
|
-
},
|
|
2258
|
+
}, no = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2287
2259
|
__name: "TdSkeleton",
|
|
2288
2260
|
props: { lines: { default: 5 } },
|
|
2289
2261
|
setup(e) {
|
|
@@ -2297,13 +2269,13 @@ var Xa = {
|
|
|
2297
2269
|
55,
|
|
2298
2270
|
72
|
|
2299
2271
|
];
|
|
2300
|
-
return (n, r) => (H(),
|
|
2272
|
+
return (n, r) => (H(), I("div", to, [(H(!0), I(M, null, W(e.lines, (e) => (H(), I("div", {
|
|
2301
2273
|
key: e,
|
|
2302
2274
|
class: "td-skeleton-line",
|
|
2303
|
-
style:
|
|
2275
|
+
style: nt({ width: `${t[(e - 1) % t.length]}%` })
|
|
2304
2276
|
}, null, 4))), 128))]));
|
|
2305
2277
|
}
|
|
2306
|
-
}), [["__scopeId", "data-v-f78bb079"]]),
|
|
2278
|
+
}), [["__scopeId", "data-v-f78bb079"]]), ro = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2307
2279
|
__name: "TdSidebarNav",
|
|
2308
2280
|
props: {
|
|
2309
2281
|
tree: {},
|
|
@@ -2311,33 +2283,33 @@ var Xa = {
|
|
|
2311
2283
|
ready: { type: Boolean }
|
|
2312
2284
|
},
|
|
2313
2285
|
setup(e) {
|
|
2314
|
-
let t =
|
|
2286
|
+
let t = Ie(), n = J("scrollElement");
|
|
2315
2287
|
return Y(() => t.path, () => {
|
|
2316
|
-
|
|
2288
|
+
tt(() => {
|
|
2317
2289
|
n.value?.querySelector(".is-active")?.scrollIntoView({ block: "nearest" });
|
|
2318
2290
|
});
|
|
2319
|
-
}, { immediate: !0 }), (t, r) => (H(),
|
|
2291
|
+
}, { immediate: !0 }), (t, r) => (H(), I("div", {
|
|
2320
2292
|
ref_key: "scrollElement",
|
|
2321
2293
|
ref: n,
|
|
2322
2294
|
class: "td-sidebar-scroll"
|
|
2323
|
-
}, [!e.searchActive && !e.ready ? (H(),
|
|
2295
|
+
}, [!e.searchActive && !e.ready ? (H(), P(no, { key: 0 })) : e.searchActive ? F("", !0) : (H(), P(ni, {
|
|
2324
2296
|
key: 1,
|
|
2325
2297
|
tree: e.tree
|
|
2326
2298
|
}, null, 8, ["tree"]))], 512));
|
|
2327
2299
|
}
|
|
2328
|
-
}), [["__scopeId", "data-v-ca83b6cd"]]),
|
|
2300
|
+
}), [["__scopeId", "data-v-ca83b6cd"]]), io = { class: "td-sidebar-icons" }, ao = ["href", "aria-label"], oo = {
|
|
2329
2301
|
key: 1,
|
|
2330
2302
|
class: "td-sidebar-icon-sep"
|
|
2331
|
-
},
|
|
2303
|
+
}, so = ["href", "aria-label"], co = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2332
2304
|
__name: "TdSidebarIcons",
|
|
2333
2305
|
props: { tree: {} },
|
|
2334
2306
|
emits: ["search"],
|
|
2335
2307
|
setup(n, { emit: r }) {
|
|
2336
|
-
let i = r, a =
|
|
2308
|
+
let i = r, a = Ie(), { withBase: o } = j(), u = N(() => n.tree.entries.find((e) => e.kind === "file" && d(e.item.filepath))?.item), f = N(() => {
|
|
2337
2309
|
let e = [];
|
|
2338
2310
|
for (let r of n.tree.entries) {
|
|
2339
2311
|
if (r.kind !== "dir") continue;
|
|
2340
|
-
let n = r.node, i = w("", n.name), a = l(n), u = a ? t(a.filepath) : s(i), d = a?.label ?? c(n.name), f = a?.icon ?
|
|
2312
|
+
let n = r.node, i = w("", n.name), a = l(n), u = a ? t(a.filepath) : s(i), d = a?.label ?? c(n.name), f = a?.icon ? Le(a.icon.name) : void 0;
|
|
2341
2313
|
e.push({
|
|
2342
2314
|
label: d,
|
|
2343
2315
|
href: o(u),
|
|
@@ -2354,55 +2326,55 @@ var Xa = {
|
|
|
2354
2326
|
function m(t) {
|
|
2355
2327
|
return a.path === t || e(t, a.path);
|
|
2356
2328
|
}
|
|
2357
|
-
return (e, n) => (H(),
|
|
2358
|
-
|
|
2329
|
+
return (e, n) => (H(), I("div", io, [
|
|
2330
|
+
z(Fr, {
|
|
2359
2331
|
text: "Search",
|
|
2360
2332
|
always: ""
|
|
2361
2333
|
}, {
|
|
2362
|
-
default: X(() => [
|
|
2334
|
+
default: X(() => [L("button", {
|
|
2363
2335
|
class: "td-sidebar-icon-btn",
|
|
2364
2336
|
type: "button",
|
|
2365
2337
|
"aria-label": "Search",
|
|
2366
2338
|
onClick: p
|
|
2367
|
-
}, [
|
|
2339
|
+
}, [z(q(Ve), { size: 16 })])]),
|
|
2368
2340
|
_: 1
|
|
2369
2341
|
}),
|
|
2370
|
-
u.value ? (H(),
|
|
2342
|
+
u.value ? (H(), P(Fr, {
|
|
2371
2343
|
key: 0,
|
|
2372
2344
|
text: u.value.label ?? "Home",
|
|
2373
2345
|
always: ""
|
|
2374
2346
|
}, {
|
|
2375
|
-
default: X(() => [
|
|
2347
|
+
default: X(() => [L("a", {
|
|
2376
2348
|
href: q(o)(q(t)(u.value.filepath)),
|
|
2377
|
-
class:
|
|
2349
|
+
class: V(["td-sidebar-icon-btn", { "is-active": m(q(t)(u.value.filepath)) }]),
|
|
2378
2350
|
"aria-label": u.value.label ?? "Home"
|
|
2379
|
-
}, [
|
|
2351
|
+
}, [z(q(le), { size: 16 })], 10, ao)]),
|
|
2380
2352
|
_: 1
|
|
2381
|
-
}, 8, ["text"])) :
|
|
2382
|
-
f.value.length ? (H(),
|
|
2383
|
-
(H(!0),
|
|
2353
|
+
}, 8, ["text"])) : F("", !0),
|
|
2354
|
+
f.value.length ? (H(), I("div", oo)) : F("", !0),
|
|
2355
|
+
(H(!0), I(M, null, W(f.value, (e) => (H(), P(Fr, {
|
|
2384
2356
|
key: e.href,
|
|
2385
2357
|
text: e.label,
|
|
2386
2358
|
always: ""
|
|
2387
2359
|
}, {
|
|
2388
|
-
default: X(() => [
|
|
2360
|
+
default: X(() => [L("a", {
|
|
2389
2361
|
href: e.href,
|
|
2390
|
-
class:
|
|
2362
|
+
class: V(["td-sidebar-icon-btn", { "is-active": m(e.path) }]),
|
|
2391
2363
|
"aria-label": e.label
|
|
2392
|
-
}, [e.isFallback ? (H(),
|
|
2364
|
+
}, [e.isFallback ? (H(), P(q(ce), {
|
|
2393
2365
|
key: 1,
|
|
2394
2366
|
size: 16
|
|
2395
|
-
})) : (H(),
|
|
2367
|
+
})) : (H(), P(ut(e.icon), {
|
|
2396
2368
|
key: 0,
|
|
2397
2369
|
size: 16
|
|
2398
|
-
}))], 10,
|
|
2370
|
+
}))], 10, so)]),
|
|
2399
2371
|
_: 2
|
|
2400
2372
|
}, 1032, ["text"]))), 128))
|
|
2401
2373
|
]));
|
|
2402
2374
|
}
|
|
2403
2375
|
}), [["__scopeId", "data-v-a8248b04"]]);
|
|
2404
2376
|
// src/client/theme-default/components/TdSiteSearch/highlight.ts
|
|
2405
|
-
function
|
|
2377
|
+
function lo(e, t) {
|
|
2406
2378
|
if (!e || !t) return f(e);
|
|
2407
2379
|
let n = t.trim().split(/\s+/).filter(Boolean), r = f(e);
|
|
2408
2380
|
for (let e of n) {
|
|
@@ -2412,15 +2384,15 @@ function yo(e, t) {
|
|
|
2412
2384
|
return r;
|
|
2413
2385
|
}
|
|
2414
2386
|
// src/client/theme-default/components/TdSiteSearch/useSiteSearch.ts
|
|
2415
|
-
var
|
|
2416
|
-
function
|
|
2417
|
-
let e =
|
|
2387
|
+
var uo = 120;
|
|
2388
|
+
function fo() {
|
|
2389
|
+
let e = Pe(), t, n = ft([]), r = ft(!1);
|
|
2418
2390
|
Y(e, () => {
|
|
2419
2391
|
t = void 0;
|
|
2420
2392
|
});
|
|
2421
2393
|
function i() {
|
|
2422
2394
|
if (t) return t;
|
|
2423
|
-
if (e.value) return t =
|
|
2395
|
+
if (e.value) return t = Qe(ae.loadJSON(e.value, {
|
|
2424
2396
|
fields: v,
|
|
2425
2397
|
storeFields: x
|
|
2426
2398
|
})), t;
|
|
@@ -2428,13 +2400,13 @@ function xo() {
|
|
|
2428
2400
|
function a(e, t) {
|
|
2429
2401
|
if (!e) return "";
|
|
2430
2402
|
let n = Object.keys(t);
|
|
2431
|
-
if (n.length === 0) return e.slice(0,
|
|
2403
|
+
if (n.length === 0) return e.slice(0, uo);
|
|
2432
2404
|
let r = e.toLowerCase(), i = e.length;
|
|
2433
2405
|
for (let e of n) {
|
|
2434
2406
|
let t = r.indexOf(e.toLowerCase());
|
|
2435
2407
|
t !== -1 && t < i && (i = t);
|
|
2436
2408
|
}
|
|
2437
|
-
let a = Math.max(0, i - 30), o = Math.min(e.length, a +
|
|
2409
|
+
let a = Math.max(0, i - 30), o = Math.min(e.length, a + uo), s = e.slice(a, o).trim();
|
|
2438
2410
|
return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
|
|
2439
2411
|
}
|
|
2440
2412
|
async function o(e) {
|
|
@@ -2466,7 +2438,7 @@ function xo() {
|
|
|
2466
2438
|
function l() {
|
|
2467
2439
|
r.value = !1;
|
|
2468
2440
|
}
|
|
2469
|
-
let u =
|
|
2441
|
+
let u = ft(!1);
|
|
2470
2442
|
return Y(e, (e) => {
|
|
2471
2443
|
e && (u.value = !0);
|
|
2472
2444
|
}, { immediate: !0 }), {
|
|
@@ -2478,31 +2450,31 @@ function xo() {
|
|
|
2478
2450
|
};
|
|
2479
2451
|
}
|
|
2480
2452
|
// src/client/theme-default/components/TdCommandPalette.vue?vue&type=script&setup=true&lang.ts
|
|
2481
|
-
var
|
|
2453
|
+
var po = {
|
|
2482
2454
|
class: "td-palette",
|
|
2483
2455
|
role: "dialog",
|
|
2484
2456
|
"aria-modal": "true",
|
|
2485
2457
|
"aria-label": "Command palette"
|
|
2486
|
-
},
|
|
2458
|
+
}, mo = { class: "td-palette-input-row" }, ho = {
|
|
2487
2459
|
ref: "results",
|
|
2488
2460
|
class: "td-palette-results"
|
|
2489
|
-
},
|
|
2461
|
+
}, go = [
|
|
2490
2462
|
"href",
|
|
2491
2463
|
"onClick",
|
|
2492
2464
|
"onMouseenter"
|
|
2493
|
-
],
|
|
2465
|
+
], _o = ["innerHTML"], vo = { class: "td-palette-item-path" }, yo = { class: "td-palette-group-label" }, bo = { class: "td-palette-item-label" }, xo = {
|
|
2494
2466
|
key: 1,
|
|
2495
2467
|
class: "td-palette-empty"
|
|
2496
|
-
},
|
|
2468
|
+
}, So = { class: "td-palette-footer" }, Co = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2497
2469
|
__name: "TdCommandPalette",
|
|
2498
2470
|
emits: ["toggle-sidebar", "show-shortcuts"],
|
|
2499
2471
|
setup(e, { expose: t, emit: r }) {
|
|
2500
|
-
let i = r, a = U(!1), o = U(""), s = U(0), c = J("input"), l = J("results"), u =
|
|
2472
|
+
let i = r, a = U(!1), o = U(""), s = U(0), c = J("input"), l = J("results"), u = Ie(), d = we(), { withBase: f } = j(), { previous: p, next: m } = wa(), { results: h, search: g, cancel: _ } = fo(), v = N(() => o.value.trim());
|
|
2501
2473
|
function y() {
|
|
2502
2474
|
a.value = !1, _();
|
|
2503
2475
|
}
|
|
2504
2476
|
function b() {
|
|
2505
|
-
o.value = "", a.value = !0, s.value = 0,
|
|
2477
|
+
o.value = "", a.value = !0, s.value = 0, tt(() => c.value?.focus());
|
|
2506
2478
|
}
|
|
2507
2479
|
t({
|
|
2508
2480
|
open: b,
|
|
@@ -2510,10 +2482,10 @@ var So = {
|
|
|
2510
2482
|
}), Y(v, (e, t, n) => {
|
|
2511
2483
|
n(() => _()), g(e), s.value = 0;
|
|
2512
2484
|
});
|
|
2513
|
-
let x =
|
|
2485
|
+
let x = N(() => {
|
|
2514
2486
|
let e = n(u.path);
|
|
2515
2487
|
return e === "/" ? void 0 : e;
|
|
2516
|
-
}), S =
|
|
2488
|
+
}), S = N(() => {
|
|
2517
2489
|
let e = [];
|
|
2518
2490
|
return m.value && e.push({
|
|
2519
2491
|
id: "nav-next",
|
|
@@ -2554,18 +2526,18 @@ var So = {
|
|
|
2554
2526
|
navigator.clipboard.writeText(window.location.href).catch(() => {}), y();
|
|
2555
2527
|
}
|
|
2556
2528
|
}), e;
|
|
2557
|
-
}), C =
|
|
2529
|
+
}), C = N(() => {
|
|
2558
2530
|
if (!v.value) return S.value;
|
|
2559
2531
|
let e = v.value.toLowerCase();
|
|
2560
2532
|
return S.value.filter((t) => t.label.toLowerCase().includes(e) || t.group.toLowerCase().includes(e));
|
|
2561
|
-
}), w =
|
|
2533
|
+
}), w = N(() => {
|
|
2562
2534
|
let e = /* @__PURE__ */ new Map();
|
|
2563
2535
|
for (let t of C.value) e.has(t.group) || e.set(t.group, []), e.get(t.group).push(t);
|
|
2564
2536
|
return [...e.entries()].map(([e, t]) => ({
|
|
2565
2537
|
name: e,
|
|
2566
2538
|
commands: t
|
|
2567
2539
|
}));
|
|
2568
|
-
}), T =
|
|
2540
|
+
}), T = N(() => h.value.length + C.value.length);
|
|
2569
2541
|
function E(e) {
|
|
2570
2542
|
return h.value.length + C.value.indexOf(e);
|
|
2571
2543
|
}
|
|
@@ -2595,16 +2567,16 @@ var So = {
|
|
|
2595
2567
|
requestAnimationFrame(() => {
|
|
2596
2568
|
l.value?.querySelector(".is-selected")?.scrollIntoView({ block: "nearest" });
|
|
2597
2569
|
});
|
|
2598
|
-
}), (e, t) => (H(),
|
|
2570
|
+
}), (e, t) => (H(), P(Je, { to: "body" }, [a.value ? (H(), I(M, { key: 0 }, [L("div", {
|
|
2599
2571
|
class: "td-palette-scrim",
|
|
2600
2572
|
onClick: y
|
|
2601
|
-
}),
|
|
2602
|
-
|
|
2603
|
-
|
|
2573
|
+
}), L("div", po, [
|
|
2574
|
+
L("div", mo, [
|
|
2575
|
+
z(q(Ve), {
|
|
2604
2576
|
size: 14,
|
|
2605
2577
|
class: "td-palette-input-icon"
|
|
2606
2578
|
}),
|
|
2607
|
-
|
|
2579
|
+
vt(L("input", {
|
|
2608
2580
|
ref: "input",
|
|
2609
2581
|
"onUpdate:modelValue": t[0] ||= (e) => o.value = e,
|
|
2610
2582
|
class: "td-palette-input",
|
|
@@ -2613,55 +2585,55 @@ var So = {
|
|
|
2613
2585
|
autocomplete: "off",
|
|
2614
2586
|
spellcheck: "false",
|
|
2615
2587
|
onKeydown: ee
|
|
2616
|
-
}, null, 544), [[
|
|
2617
|
-
|
|
2588
|
+
}, null, 544), [[ht, o.value]]),
|
|
2589
|
+
L("button", {
|
|
2618
2590
|
class: "td-palette-esc",
|
|
2619
2591
|
type: "button",
|
|
2620
2592
|
"aria-label": "Close",
|
|
2621
2593
|
onClick: y
|
|
2622
2594
|
}, " esc ")
|
|
2623
2595
|
]),
|
|
2624
|
-
|
|
2625
|
-
q(h).length > 0 ? (H(),
|
|
2596
|
+
L("div", ho, [
|
|
2597
|
+
q(h).length > 0 ? (H(), I(M, { key: 0 }, [t[1] ||= L("div", { class: "td-palette-group-label" }, " Pages ", -1), (H(!0), I(M, null, W(q(h), (e, t) => (H(), I("a", {
|
|
2626
2598
|
key: e.id,
|
|
2627
2599
|
href: q(f)(e.id),
|
|
2628
|
-
class:
|
|
2629
|
-
onClick:
|
|
2600
|
+
class: V(["td-palette-item", { "is-selected": t === s.value }]),
|
|
2601
|
+
onClick: bt(() => ne(t), ["prevent"]),
|
|
2630
2602
|
onMouseenter: () => s.value = t
|
|
2631
|
-
}, [
|
|
2603
|
+
}, [L("span", {
|
|
2632
2604
|
class: "td-palette-item-label",
|
|
2633
|
-
innerHTML: q(
|
|
2634
|
-
}, null, 8,
|
|
2635
|
-
(H(!0),
|
|
2605
|
+
innerHTML: q(lo)(e.title, v.value)
|
|
2606
|
+
}, null, 8, _o), L("span", vo, K(e.id), 1)], 42, go))), 128))], 64)) : F("", !0),
|
|
2607
|
+
(H(!0), I(M, null, W(w.value, (e) => (H(), I(M, { key: e.name }, [L("div", yo, K(e.name), 1), (H(!0), I(M, null, W(e.commands, (e) => (H(), P(ut(e.href ? "a" : "button"), et({ key: e.id }, { ref_for: !0 }, e.href ? { href: e.href } : { type: "button" }, {
|
|
2636
2608
|
class: ["td-palette-item", { "is-selected": E(e) === s.value }],
|
|
2637
2609
|
onClick: () => te(e),
|
|
2638
2610
|
onMouseenter: () => s.value = E(e)
|
|
2639
2611
|
}), {
|
|
2640
|
-
default: X(() => [
|
|
2612
|
+
default: X(() => [L("span", bo, K(e.label), 1), e.keys ? (H(), P($, {
|
|
2641
2613
|
key: 0,
|
|
2642
2614
|
keys: e.keys
|
|
2643
|
-
}, null, 8, ["keys"])) :
|
|
2615
|
+
}, null, 8, ["keys"])) : F("", !0)]),
|
|
2644
2616
|
_: 2
|
|
2645
2617
|
}, 1040, [
|
|
2646
2618
|
"class",
|
|
2647
2619
|
"onClick",
|
|
2648
2620
|
"onMouseenter"
|
|
2649
2621
|
]))), 128))], 64))), 128)),
|
|
2650
|
-
T.value === 0 && v.value ? (H(),
|
|
2622
|
+
T.value === 0 && v.value ? (H(), I("div", xo, " No results for \"" + K(v.value) + "\" ", 1)) : F("", !0)
|
|
2651
2623
|
], 512),
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
t[2] ||=
|
|
2656
|
-
|
|
2657
|
-
t[3] ||=
|
|
2624
|
+
L("div", So, [
|
|
2625
|
+
L("span", null, [
|
|
2626
|
+
z($, { keys: [q(Q).ArrowUp] }, null, 8, ["keys"]),
|
|
2627
|
+
t[2] ||= R(),
|
|
2628
|
+
z($, { keys: [q(Q).ArrowDown] }, null, 8, ["keys"]),
|
|
2629
|
+
t[3] ||= R(" navigate", -1)
|
|
2658
2630
|
]),
|
|
2659
|
-
|
|
2660
|
-
|
|
2631
|
+
L("span", null, [z($, { keys: [q(Q).Enter] }, null, 8, ["keys"]), t[4] ||= R(" select", -1)]),
|
|
2632
|
+
L("span", null, [z($, { keys: [q(Q).Escape] }, null, 8, ["keys"]), t[5] ||= R(" close", -1)])
|
|
2661
2633
|
])
|
|
2662
|
-
])], 64)) :
|
|
2634
|
+
])], 64)) : F("", !0)]));
|
|
2663
2635
|
}
|
|
2664
|
-
}), [["__scopeId", "data-v-12ce6133"]]),
|
|
2636
|
+
}), [["__scopeId", "data-v-12ce6133"]]), wo = ["onKeydown"], To = { class: "td-shortcuts-header" }, Eo = { class: "td-shortcuts-table" }, Do = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2665
2637
|
__name: "TdShortcutsDialog",
|
|
2666
2638
|
props: { open: { type: Boolean } },
|
|
2667
2639
|
emits: ["close"],
|
|
@@ -2671,42 +2643,42 @@ var So = {
|
|
|
2671
2643
|
n("close");
|
|
2672
2644
|
}
|
|
2673
2645
|
return Y(() => e.open, (e) => {
|
|
2674
|
-
e &&
|
|
2675
|
-
}), (t, n) => (H(),
|
|
2646
|
+
e && tt(() => r.value?.focus());
|
|
2647
|
+
}), (t, n) => (H(), P(Je, { to: "body" }, [e.open ? (H(), I(M, { key: 0 }, [L("div", {
|
|
2676
2648
|
class: "td-shortcuts-scrim",
|
|
2677
2649
|
onClick: i
|
|
2678
|
-
}),
|
|
2650
|
+
}), L("div", {
|
|
2679
2651
|
ref: "dialog",
|
|
2680
2652
|
class: "td-shortcuts-dialog",
|
|
2681
2653
|
role: "dialog",
|
|
2682
2654
|
"aria-modal": "true",
|
|
2683
2655
|
"aria-label": "Keyboard shortcuts",
|
|
2684
2656
|
tabindex: "-1",
|
|
2685
|
-
onKeydown:
|
|
2686
|
-
}, [
|
|
2657
|
+
onKeydown: yt(bt(i, ["stop"]), ["esc"])
|
|
2658
|
+
}, [L("div", To, [n[0] ||= L("h2", { class: "td-shortcuts-title" }, " Keyboard shortcuts ", -1), L("button", {
|
|
2687
2659
|
class: "td-shortcuts-close",
|
|
2688
2660
|
type: "button",
|
|
2689
2661
|
"aria-label": "Close",
|
|
2690
2662
|
onClick: i
|
|
2691
|
-
}, [
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
])])], 40,
|
|
2699
|
-
}
|
|
2700
|
-
}), [["__scopeId", "data-v-09d6a93c"]]),
|
|
2663
|
+
}, [z(q(Ne), { size: 16 })])]), L("table", Eo, [L("tbody", null, [
|
|
2664
|
+
L("tr", null, [n[1] ||= L("td", null, "Search", -1), L("td", null, [z($, { keys: [q(Q).Meta, q(Q).k] }, null, 8, ["keys"])])]),
|
|
2665
|
+
L("tr", null, [n[2] ||= L("td", null, "Commands", -1), L("td", null, [z($, { keys: [q(Q).Meta, q(Q).FSlash] }, null, 8, ["keys"])])]),
|
|
2666
|
+
L("tr", null, [n[3] ||= L("td", null, "Next page", -1), L("td", null, [z($, { keys: [q(Q).Control, q(Q).ArrowRight] }, null, 8, ["keys"])])]),
|
|
2667
|
+
L("tr", null, [n[4] ||= L("td", null, "Previous page", -1), L("td", null, [z($, { keys: [q(Q).Control, q(Q).ArrowLeft] }, null, 8, ["keys"])])]),
|
|
2668
|
+
L("tr", null, [n[5] ||= L("td", null, "Toggle sidebar", -1), L("td", null, [z($, { keys: [q(Q).Meta, q(Q).Backslash] }, null, 8, ["keys"])])]),
|
|
2669
|
+
L("tr", null, [n[6] ||= L("td", null, "Close", -1), L("td", null, [z($, { keys: [q(Q).Escape] }, null, 8, ["keys"])])])
|
|
2670
|
+
])])], 40, wo)], 64)) : F("", !0)]));
|
|
2671
|
+
}
|
|
2672
|
+
}), [["__scopeId", "data-v-09d6a93c"]]), Oo = { class: "td-search" }, ko = { class: "td-search-input-wrap" }, Ao = {
|
|
2701
2673
|
key: 2,
|
|
2702
2674
|
class: "td-search-count"
|
|
2703
|
-
},
|
|
2675
|
+
}, jo = {
|
|
2704
2676
|
key: 0,
|
|
2705
2677
|
class: "td-search-results"
|
|
2706
|
-
},
|
|
2678
|
+
}, Mo = ["href"], No = ["innerHTML"], Po = { class: "td-search-result-path" }, Fo = ["innerHTML"], Io = {
|
|
2707
2679
|
key: 1,
|
|
2708
2680
|
class: "td-search-empty"
|
|
2709
|
-
},
|
|
2681
|
+
}, Lo = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2710
2682
|
__name: "TdSiteSearch",
|
|
2711
2683
|
props: {
|
|
2712
2684
|
active: {
|
|
@@ -2717,9 +2689,9 @@ var So = {
|
|
|
2717
2689
|
query: { default: "" },
|
|
2718
2690
|
queryModifiers: {}
|
|
2719
2691
|
},
|
|
2720
|
-
emits: /*@__PURE__*/
|
|
2692
|
+
emits: /*@__PURE__*/ $e(["select"], ["update:active", "update:query"]),
|
|
2721
2693
|
setup(e, { expose: t, emit: n }) {
|
|
2722
|
-
let r =
|
|
2694
|
+
let r = mt(e, "active"), i = mt(e, "query"), o = n, s = Ie(), { withBase: l } = j(), { results: u, searching: d, indexLoaded: f, search: p, cancel: m } = fo(), h = U(-1), g = N(() => 0 < i.value.trim().length), _ = N(() => {
|
|
2723
2695
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
2724
2696
|
for (let n of u.value) {
|
|
2725
2697
|
let r = a(n.id), i = t.get(r);
|
|
@@ -2743,7 +2715,7 @@ var So = {
|
|
|
2743
2715
|
function v() {
|
|
2744
2716
|
i.value = "";
|
|
2745
2717
|
}
|
|
2746
|
-
let y =
|
|
2718
|
+
let y = N(() => _.value.flatMap((e) => e.results)), b = N(() => {
|
|
2747
2719
|
let e = /* @__PURE__ */ new Map();
|
|
2748
2720
|
for (let t = 0; t < y.value.length; t++) e.set(y.value[t].id, t);
|
|
2749
2721
|
return e;
|
|
@@ -2783,13 +2755,13 @@ var So = {
|
|
|
2783
2755
|
get isFocused() {
|
|
2784
2756
|
return document.activeElement === w.value;
|
|
2785
2757
|
}
|
|
2786
|
-
}), (e, t) => (H(),
|
|
2787
|
-
|
|
2788
|
-
|
|
2758
|
+
}), (e, t) => (H(), I("div", Oo, [
|
|
2759
|
+
L("div", ko, [
|
|
2760
|
+
z(q(Ve), {
|
|
2789
2761
|
size: 14,
|
|
2790
2762
|
class: "td-search-icon"
|
|
2791
2763
|
}),
|
|
2792
|
-
|
|
2764
|
+
vt(L("input", {
|
|
2793
2765
|
ref_key: "searchInput",
|
|
2794
2766
|
ref: w,
|
|
2795
2767
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
@@ -2798,63 +2770,63 @@ var So = {
|
|
|
2798
2770
|
size: "1",
|
|
2799
2771
|
placeholder: "Search...",
|
|
2800
2772
|
onKeydown: x
|
|
2801
|
-
}, null, 544), [[
|
|
2802
|
-
!g.value && !q(d) ? (H(),
|
|
2773
|
+
}, null, 544), [[ht, i.value]]),
|
|
2774
|
+
!g.value && !q(d) ? (H(), P($, {
|
|
2803
2775
|
key: 0,
|
|
2804
2776
|
keys: [q(Q).Meta, q(Q).k],
|
|
2805
2777
|
class: "td-search-kbd"
|
|
2806
|
-
}, null, 8, ["keys"])) :
|
|
2807
|
-
q(d) || !q(f) ? (H(),
|
|
2778
|
+
}, null, 8, ["keys"])) : F("", !0),
|
|
2779
|
+
q(d) || !q(f) ? (H(), P(q(At), {
|
|
2808
2780
|
key: 1,
|
|
2809
2781
|
size: 12,
|
|
2810
2782
|
class: "td-search-spinner"
|
|
2811
|
-
})) : g.value ? (H(),
|
|
2812
|
-
i.value ? (H(),
|
|
2783
|
+
})) : g.value ? (H(), I("span", Ao, K(q(u).length), 1)) : F("", !0),
|
|
2784
|
+
i.value ? (H(), I("button", {
|
|
2813
2785
|
key: 3,
|
|
2814
2786
|
class: "td-search-clear",
|
|
2815
2787
|
type: "button",
|
|
2816
2788
|
"aria-label": "Clear search",
|
|
2817
2789
|
onClick: v
|
|
2818
|
-
}, [
|
|
2790
|
+
}, [z(q(Ne), { size: 12 })])) : F("", !0)
|
|
2819
2791
|
]),
|
|
2820
|
-
g.value && q(u).length > 0 ? (H(),
|
|
2792
|
+
g.value && q(u).length > 0 ? (H(), I("div", jo, [(H(!0), I(M, null, W(_.value, (e) => (H(), I("div", {
|
|
2821
2793
|
key: e.pageUrl,
|
|
2822
2794
|
class: "td-search-group"
|
|
2823
|
-
}, [(H(!0),
|
|
2795
|
+
}, [(H(!0), I(M, null, W(e.results, (e) => (H(), I("a", {
|
|
2824
2796
|
key: e.id,
|
|
2825
2797
|
href: q(l)(e.id),
|
|
2826
|
-
class:
|
|
2798
|
+
class: V(["td-search-result", {
|
|
2827
2799
|
"is-selected": b.value.get(e.id) === h.value,
|
|
2828
2800
|
"is-current": q(l)(e.id) === q(s).path
|
|
2829
2801
|
}]),
|
|
2830
2802
|
onClick: S
|
|
2831
2803
|
}, [
|
|
2832
|
-
|
|
2804
|
+
L("span", {
|
|
2833
2805
|
class: "td-search-result-title",
|
|
2834
|
-
innerHTML: q(
|
|
2835
|
-
}, null, 8,
|
|
2836
|
-
|
|
2837
|
-
e.excerpt ? (H(),
|
|
2806
|
+
innerHTML: q(lo)(e.title, i.value)
|
|
2807
|
+
}, null, 8, No),
|
|
2808
|
+
L("span", Po, K(e.id), 1),
|
|
2809
|
+
e.excerpt ? (H(), I("span", {
|
|
2838
2810
|
key: 0,
|
|
2839
2811
|
class: "td-search-result-excerpt",
|
|
2840
|
-
innerHTML: q(
|
|
2841
|
-
}, null, 8,
|
|
2842
|
-
], 10,
|
|
2843
|
-
g.value && q(u).length === 0 ? (H(),
|
|
2812
|
+
innerHTML: q(lo)(e.excerpt, i.value)
|
|
2813
|
+
}, null, 8, Fo)) : F("", !0)
|
|
2814
|
+
], 10, Mo))), 128))]))), 128))])) : F("", !0),
|
|
2815
|
+
g.value && q(u).length === 0 ? (H(), I("div", Io, " No results for \"" + K(i.value) + "\" ", 1)) : F("", !0)
|
|
2844
2816
|
]));
|
|
2845
2817
|
}
|
|
2846
|
-
}), [["__scopeId", "data-v-f42853f1"]]),
|
|
2818
|
+
}), [["__scopeId", "data-v-f42853f1"]]), Ro = /* @__PURE__ */ B({
|
|
2847
2819
|
__name: "TdThemeToggle",
|
|
2848
2820
|
setup(e) {
|
|
2849
|
-
let { isDark: t, toggle: n } =
|
|
2850
|
-
return (e, r) => (H(),
|
|
2821
|
+
let { isDark: t, toggle: n } = E();
|
|
2822
|
+
return (e, r) => (H(), P(Ut, {
|
|
2851
2823
|
label: q(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
2852
2824
|
onClick: q(n)
|
|
2853
2825
|
}, {
|
|
2854
|
-
default: X(() => [q(t) ? (H(),
|
|
2826
|
+
default: X(() => [q(t) ? (H(), P(q(xe), {
|
|
2855
2827
|
key: 0,
|
|
2856
2828
|
size: 18
|
|
2857
|
-
})) : (H(),
|
|
2829
|
+
})) : (H(), P(q(Be), {
|
|
2858
2830
|
key: 1,
|
|
2859
2831
|
size: 18
|
|
2860
2832
|
}))]),
|
|
@@ -2863,7 +2835,7 @@ var So = {
|
|
|
2863
2835
|
}
|
|
2864
2836
|
});
|
|
2865
2837
|
// src/client/theme-default/composables/useCopyCode.ts
|
|
2866
|
-
function
|
|
2838
|
+
function zo() {
|
|
2867
2839
|
function e(e) {
|
|
2868
2840
|
let t = e.target?.closest(".td-code-copy, .copy");
|
|
2869
2841
|
if (!t) return;
|
|
@@ -2883,14 +2855,14 @@ function Jo() {
|
|
|
2883
2855
|
}, 2e3);
|
|
2884
2856
|
}
|
|
2885
2857
|
}
|
|
2886
|
-
|
|
2858
|
+
it(() => {
|
|
2887
2859
|
document.addEventListener("click", e);
|
|
2888
|
-
}),
|
|
2860
|
+
}), ot(() => {
|
|
2889
2861
|
document.removeEventListener("click", e);
|
|
2890
2862
|
});
|
|
2891
2863
|
}
|
|
2892
2864
|
// src/client/theme-default/composables/useCopyHeadingAnchor.ts
|
|
2893
|
-
function
|
|
2865
|
+
function Bo() {
|
|
2894
2866
|
function e(e) {
|
|
2895
2867
|
let t = e.target?.closest(".td-header-anchor");
|
|
2896
2868
|
if (!t) return;
|
|
@@ -2900,18 +2872,18 @@ function Yo() {
|
|
|
2900
2872
|
t.classList.remove("td-header-anchor--copied");
|
|
2901
2873
|
}, 2e3);
|
|
2902
2874
|
}
|
|
2903
|
-
|
|
2875
|
+
it(() => {
|
|
2904
2876
|
document.addEventListener("click", e);
|
|
2905
|
-
}),
|
|
2877
|
+
}), ot(() => {
|
|
2906
2878
|
document.removeEventListener("click", e);
|
|
2907
2879
|
});
|
|
2908
2880
|
}
|
|
2909
2881
|
// src/client/theme-default/composables/useResizableTable.ts
|
|
2910
|
-
var
|
|
2911
|
-
function
|
|
2882
|
+
var Vo = 6, Ho = 40;
|
|
2883
|
+
function Uo() {
|
|
2912
2884
|
let e, t = !1;
|
|
2913
2885
|
function n(e, t) {
|
|
2914
|
-
return e.getBoundingClientRect().right - t <
|
|
2886
|
+
return e.getBoundingClientRect().right - t < Vo;
|
|
2915
2887
|
}
|
|
2916
2888
|
function r(r) {
|
|
2917
2889
|
if (t) return;
|
|
@@ -2931,27 +2903,27 @@ function Qo() {
|
|
|
2931
2903
|
r.classList.add("is-resizing"), document.body.style.cursor = "col-resize";
|
|
2932
2904
|
function o(e) {
|
|
2933
2905
|
let t = e.clientX - i;
|
|
2934
|
-
r && (r.style.width = `${Math.max(
|
|
2906
|
+
r && (r.style.width = `${Math.max(Ho, a + t)}px`);
|
|
2935
2907
|
}
|
|
2936
2908
|
function s() {
|
|
2937
2909
|
t = !1, r?.classList.remove("is-resizing"), document.body.style.cursor = "", document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
|
|
2938
2910
|
}
|
|
2939
2911
|
document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
|
|
2940
2912
|
}
|
|
2941
|
-
|
|
2913
|
+
it(() => {
|
|
2942
2914
|
document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
|
|
2943
|
-
}),
|
|
2915
|
+
}), ot(() => {
|
|
2944
2916
|
document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
|
|
2945
2917
|
});
|
|
2946
2918
|
}
|
|
2947
2919
|
// src/client/theme-default/components/TdDiagram.vue?vue&type=script&setup=true&lang.ts
|
|
2948
|
-
var
|
|
2920
|
+
var Wo = ["id"], Go = { class: "td-diagram-frame" }, Ko = ["innerHTML"], qo = { class: "td-diagram-code" }, Jo = { class: "td-diagram-code-number" }, Yo = { class: "td-diagram-code-column" }, Xo = { class: "td-diagram-toolbar" }, Zo = { class: "td-diagram-toolbar-label" }, Qo = { class: "td-diagram-segment" }, $o = { class: "td-diagram-zoom" }, es = {
|
|
2949
2921
|
key: 0,
|
|
2950
2922
|
class: "td-diagram-caption"
|
|
2951
|
-
},
|
|
2923
|
+
}, ts = ["aria-label"], ns = { class: "td-diagram-modal-header" }, rs = { class: "td-diagram-modal-header-left" }, is = { class: "td-diagram-modal-title" }, as = { class: "td-diagram-modal-chip" }, os = { class: "td-diagram-modal-header-right" }, ss = ["aria-pressed"], cs = { class: "td-diagram-button-label" }, ls = { class: "td-diagram-modal-body" }, us = {
|
|
2952
2924
|
key: 0,
|
|
2953
2925
|
class: "td-diagram-modal-code-panel"
|
|
2954
|
-
},
|
|
2926
|
+
}, ds = { class: "td-diagram-modal-code-panel-header" }, fs = { class: "td-diagram-modal-code-panel-body" }, ps = { class: "td-diagram-code td-diagram-code--modal" }, ms = { class: "td-diagram-code-number" }, hs = { class: "td-diagram-code-column" }, gs = ["innerHTML"], _s = { class: "td-diagram-modal-hint" }, vs = .15, ys = 5, bs = 4, xs = .9, Ss = .82, Cs = 1.25, ws = .8, Ts = 1.6, Es = 1400, Ds = 20, Os = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2955
2927
|
__name: "TdDiagram",
|
|
2956
2928
|
props: {
|
|
2957
2929
|
svg: {},
|
|
@@ -2969,7 +2941,7 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
2969
2941
|
x: 0,
|
|
2970
2942
|
y: 0,
|
|
2971
2943
|
scale: 1
|
|
2972
|
-
}), h =
|
|
2944
|
+
}), h = N(() => {
|
|
2973
2945
|
let t = e.svg.match(/viewBox=["']([^"']+)["']/);
|
|
2974
2946
|
if (t) {
|
|
2975
2947
|
let e = t[1].split(/[\s,]+/);
|
|
@@ -2986,33 +2958,33 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
2986
2958
|
width: 400,
|
|
2987
2959
|
height: 300
|
|
2988
2960
|
};
|
|
2989
|
-
}), g =
|
|
2961
|
+
}), g = N(() => e.source.split("\n")), _ = N(() => g.value.length), v = N(() => `${Math.round(p.value.scale * 100)}%`), y = N(() => `${Math.round(m.value.scale * 100)}%`), b = N(() => e.label === "Mermaid" ? "mmd" : e.label === "D2" ? "d2" : "txt"), x = N(() => ({
|
|
2990
2962
|
width: `${h.value.width}px`,
|
|
2991
2963
|
height: `${h.value.height}px`
|
|
2992
|
-
})), S =
|
|
2964
|
+
})), S = N(() => {
|
|
2993
2965
|
let { x: e, y: t, scale: n } = p.value;
|
|
2994
2966
|
return {
|
|
2995
2967
|
...x.value,
|
|
2996
2968
|
transform: `translate(${e}px, ${t}px) scale(${n})`
|
|
2997
2969
|
};
|
|
2998
|
-
}), C =
|
|
2970
|
+
}), C = N(() => {
|
|
2999
2971
|
let { x: e, y: t, scale: n } = m.value;
|
|
3000
2972
|
return {
|
|
3001
2973
|
...x.value,
|
|
3002
2974
|
transform: `translate(${e}px, ${t}px) scale(${n})`
|
|
3003
2975
|
};
|
|
3004
|
-
}), w =
|
|
3005
|
-
let { x: e, y: t, scale: n } = m.value, r =
|
|
2976
|
+
}), w = N(() => {
|
|
2977
|
+
let { x: e, y: t, scale: n } = m.value, r = Ds * n;
|
|
3006
2978
|
return {
|
|
3007
2979
|
backgroundSize: `${r}px ${r}px`,
|
|
3008
2980
|
backgroundPosition: `${e % r}px ${t % r}px`
|
|
3009
2981
|
};
|
|
3010
2982
|
});
|
|
3011
2983
|
function T(e) {
|
|
3012
|
-
return Math.min(
|
|
2984
|
+
return Math.min(ys, Math.max(vs, e));
|
|
3013
2985
|
}
|
|
3014
2986
|
function E() {
|
|
3015
|
-
l.value = !1,
|
|
2987
|
+
l.value = !1, Re?.(), Re = void 0, s.value?.focus();
|
|
3016
2988
|
}
|
|
3017
2989
|
function ee(e, t, n, r, i) {
|
|
3018
2990
|
if (n <= 0 || r <= 0) return {
|
|
@@ -3027,18 +2999,18 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3027
2999
|
scale: a
|
|
3028
3000
|
};
|
|
3029
3001
|
}
|
|
3030
|
-
function
|
|
3031
|
-
|
|
3002
|
+
function te() {
|
|
3003
|
+
ne(d);
|
|
3032
3004
|
}
|
|
3033
|
-
function
|
|
3034
|
-
|
|
3005
|
+
function D() {
|
|
3006
|
+
ne(f);
|
|
3035
3007
|
}
|
|
3036
|
-
function
|
|
3037
|
-
navigator.clipboard.writeText(e.source).catch(() => {}), t.value = !0, clearTimeout(
|
|
3008
|
+
function ne(t) {
|
|
3009
|
+
navigator.clipboard.writeText(e.source).catch(() => {}), t.value = !0, clearTimeout(ze), ze = setTimeout(() => {
|
|
3038
3010
|
t.value = !1;
|
|
3039
|
-
},
|
|
3011
|
+
}, Es);
|
|
3040
3012
|
}
|
|
3041
|
-
function
|
|
3013
|
+
function re() {
|
|
3042
3014
|
let t = (a.value ?? r.value)?.querySelector("svg");
|
|
3043
3015
|
if (!t) return;
|
|
3044
3016
|
let n = t.cloneNode(!0);
|
|
@@ -3046,67 +3018,67 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3046
3018
|
let i = new XMLSerializer().serializeToString(n), o = new Blob([i], { type: "image/svg+xml" }), s = URL.createObjectURL(o), c = document.createElement("a");
|
|
3047
3019
|
c.href = s, c.download = `${e.diagramId}.svg`, c.click(), URL.revokeObjectURL(s);
|
|
3048
3020
|
}
|
|
3049
|
-
function
|
|
3050
|
-
|
|
3021
|
+
function ie() {
|
|
3022
|
+
O(n.value ?? void 0, p, xs);
|
|
3051
3023
|
}
|
|
3052
3024
|
function ae() {
|
|
3053
|
-
|
|
3025
|
+
O(i.value ?? void 0, m, Ss);
|
|
3054
3026
|
}
|
|
3055
|
-
function
|
|
3027
|
+
function O(e, t, n) {
|
|
3056
3028
|
!e || e.offsetWidth <= 0 || (t.value = ee(e.offsetWidth, e.offsetHeight, h.value.width, h.value.height, n));
|
|
3057
3029
|
}
|
|
3058
|
-
function
|
|
3030
|
+
function oe(e, t) {
|
|
3059
3031
|
let n = t.getBoundingClientRect(), r = (t.offsetWidth ? n.width / t.offsetWidth : 1) || 1;
|
|
3060
3032
|
return {
|
|
3061
3033
|
x: (e.clientX - n.left) / r,
|
|
3062
3034
|
y: (e.clientY - n.top) / r
|
|
3063
3035
|
};
|
|
3064
3036
|
}
|
|
3065
|
-
function
|
|
3037
|
+
function ce(e) {
|
|
3066
3038
|
e.target.classList.contains("td-diagram-modal-backdrop") && E();
|
|
3067
3039
|
}
|
|
3068
|
-
function
|
|
3069
|
-
e.key === "Escape" ? (e.stopPropagation(), E()) : e.key === "+" || e.key === "=" ?
|
|
3040
|
+
function le(e) {
|
|
3041
|
+
e.key === "Escape" ? (e.stopPropagation(), E()) : e.key === "+" || e.key === "=" ? de() : e.key === "-" ? fe() : e.key === "0" && ae();
|
|
3042
|
+
}
|
|
3043
|
+
function ue() {
|
|
3044
|
+
xe(n.value ?? void 0, p, Cs);
|
|
3045
|
+
}
|
|
3046
|
+
function k() {
|
|
3047
|
+
xe(n.value ?? void 0, p, ws);
|
|
3070
3048
|
}
|
|
3071
3049
|
function de() {
|
|
3072
|
-
|
|
3050
|
+
xe(i.value ?? void 0, m, Cs);
|
|
3073
3051
|
}
|
|
3074
3052
|
function fe() {
|
|
3075
|
-
|
|
3053
|
+
xe(i.value ?? void 0, m, ws);
|
|
3076
3054
|
}
|
|
3077
3055
|
function me() {
|
|
3078
|
-
Ce(i.value ?? void 0, m, Ms);
|
|
3079
|
-
}
|
|
3080
|
-
function he() {
|
|
3081
|
-
Ce(i.value ?? void 0, m, Ns);
|
|
3082
|
-
}
|
|
3083
|
-
function ge() {
|
|
3084
3056
|
let e = i.value;
|
|
3085
3057
|
if (!e) return;
|
|
3086
3058
|
let t = T(1);
|
|
3087
|
-
m.value =
|
|
3059
|
+
m.value = be(m.value, e.offsetWidth / 2, e.offsetHeight / 2, t / m.value.scale);
|
|
3088
3060
|
}
|
|
3089
|
-
function
|
|
3061
|
+
function he() {
|
|
3090
3062
|
l.value = !0, u.value = c.value, m.value = {
|
|
3091
3063
|
x: 0,
|
|
3092
3064
|
y: 0,
|
|
3093
3065
|
scale: 1
|
|
3094
|
-
},
|
|
3066
|
+
}, tt(() => {
|
|
3095
3067
|
requestAnimationFrame(() => {
|
|
3096
|
-
ae(), o.value?.focus({ preventScroll: !0 }),
|
|
3068
|
+
ae(), o.value?.focus({ preventScroll: !0 }), Ee();
|
|
3097
3069
|
});
|
|
3098
3070
|
});
|
|
3099
3071
|
}
|
|
3100
|
-
function
|
|
3072
|
+
function ge() {
|
|
3101
3073
|
c.value = !0;
|
|
3102
3074
|
}
|
|
3103
|
-
function
|
|
3075
|
+
function _e() {
|
|
3104
3076
|
c.value = !1;
|
|
3105
3077
|
}
|
|
3106
|
-
function
|
|
3078
|
+
function ye() {
|
|
3107
3079
|
u.value = !u.value;
|
|
3108
3080
|
}
|
|
3109
|
-
function
|
|
3081
|
+
function be(e, t, n, r) {
|
|
3110
3082
|
let i = T(e.scale * r), a = i / e.scale;
|
|
3111
3083
|
return {
|
|
3112
3084
|
x: t - (t - e.x) * a,
|
|
@@ -3114,10 +3086,10 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3114
3086
|
scale: i
|
|
3115
3087
|
};
|
|
3116
3088
|
}
|
|
3117
|
-
function
|
|
3118
|
-
e && (t.value =
|
|
3089
|
+
function xe(e, t, n) {
|
|
3090
|
+
e && (t.value = be(t.value, e.offsetWidth / 2, e.offsetHeight / 2, n));
|
|
3119
3091
|
}
|
|
3120
|
-
let
|
|
3092
|
+
let Se = {
|
|
3121
3093
|
active: !1,
|
|
3122
3094
|
startClientX: 0,
|
|
3123
3095
|
startClientY: 0,
|
|
@@ -3125,7 +3097,7 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3125
3097
|
startTransformY: 0,
|
|
3126
3098
|
moved: !1,
|
|
3127
3099
|
clientScale: 1
|
|
3128
|
-
},
|
|
3100
|
+
}, we = {
|
|
3129
3101
|
active: !1,
|
|
3130
3102
|
startClientX: 0,
|
|
3131
3103
|
startClientY: 0,
|
|
@@ -3134,23 +3106,23 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3134
3106
|
moved: !1,
|
|
3135
3107
|
clientScale: 1
|
|
3136
3108
|
};
|
|
3137
|
-
function
|
|
3109
|
+
function Te(e) {
|
|
3138
3110
|
function t(t) {
|
|
3139
3111
|
if (!t.ctrlKey && !t.metaKey) return;
|
|
3140
3112
|
t.preventDefault();
|
|
3141
|
-
let n =
|
|
3142
|
-
p.value =
|
|
3113
|
+
let n = oe(t, e), r = Math.exp(-t.deltaY * .01);
|
|
3114
|
+
p.value = be(p.value, n.x, n.y, r);
|
|
3143
3115
|
}
|
|
3144
3116
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
3145
3117
|
}
|
|
3146
|
-
function
|
|
3118
|
+
function Ee() {
|
|
3147
3119
|
let e = i.value;
|
|
3148
3120
|
if (!e) return;
|
|
3149
3121
|
function t(t) {
|
|
3150
3122
|
if (e) {
|
|
3151
3123
|
if (t.preventDefault(), t.ctrlKey || t.metaKey) {
|
|
3152
|
-
let n =
|
|
3153
|
-
m.value =
|
|
3124
|
+
let n = oe(t, e), r = Math.exp(-t.deltaY * .01);
|
|
3125
|
+
m.value = be(m.value, n.x, n.y, r);
|
|
3154
3126
|
} else {
|
|
3155
3127
|
let n = (e.offsetWidth ? e.getBoundingClientRect().width / e.offsetWidth : 1) || 1;
|
|
3156
3128
|
m.value = {
|
|
@@ -3161,294 +3133,294 @@ var $o = ["id"], es = { class: "td-diagram-frame" }, ts = ["innerHTML"], ns = {
|
|
|
3161
3133
|
}
|
|
3162
3134
|
}
|
|
3163
3135
|
}
|
|
3164
|
-
e.addEventListener("wheel", t, { passive: !1 }),
|
|
3136
|
+
e.addEventListener("wheel", t, { passive: !1 }), Re = () => e.removeEventListener("wheel", t);
|
|
3165
3137
|
}
|
|
3166
|
-
function
|
|
3138
|
+
function De(e, t, n, r) {
|
|
3167
3139
|
if (e.button !== 0) return;
|
|
3168
3140
|
t.active = !0, t.moved = !1;
|
|
3169
3141
|
let i = n.getBoundingClientRect();
|
|
3170
3142
|
t.clientScale = (n.offsetWidth ? i.width / n.offsetWidth : 1) || 1, t.startClientX = e.clientX, t.startClientY = e.clientY, t.startTransformX = r.value.x, t.startTransformY = r.value.y, n.setPointerCapture(e.pointerId), n.style.cursor = "grabbing";
|
|
3171
3143
|
}
|
|
3172
|
-
function
|
|
3144
|
+
function Oe(e, t, n, r) {
|
|
3173
3145
|
t.active && (t.active = !1, n.releasePointerCapture(e.pointerId), n.style.cursor = "", !t.moved && r && r());
|
|
3174
3146
|
}
|
|
3175
|
-
function
|
|
3147
|
+
function ke(e, t, n) {
|
|
3176
3148
|
if (!t.active) return;
|
|
3177
3149
|
let r = (e.clientX - t.startClientX) / t.clientScale, i = (e.clientY - t.startClientY) / t.clientScale;
|
|
3178
|
-
!t.moved &&
|
|
3150
|
+
!t.moved && bs <= Math.hypot(r, i) && (t.moved = !0), t.moved && (n.value = {
|
|
3179
3151
|
x: t.startTransformX + r,
|
|
3180
3152
|
y: t.startTransformY + i,
|
|
3181
3153
|
scale: n.value.scale
|
|
3182
3154
|
});
|
|
3183
3155
|
}
|
|
3184
|
-
function
|
|
3156
|
+
function je(e) {
|
|
3185
3157
|
let t = n.value;
|
|
3186
|
-
t &&
|
|
3158
|
+
t && De(e, Se, t, p);
|
|
3187
3159
|
}
|
|
3188
|
-
function
|
|
3160
|
+
function Me(e) {
|
|
3189
3161
|
let t = n.value;
|
|
3190
|
-
t &&
|
|
3191
|
-
}
|
|
3192
|
-
function Ne(e) {
|
|
3193
|
-
Me(e, we, p);
|
|
3162
|
+
t && Oe(e, Se, t, he);
|
|
3194
3163
|
}
|
|
3195
3164
|
function Pe(e) {
|
|
3165
|
+
ke(e, Se, p);
|
|
3166
|
+
}
|
|
3167
|
+
function Fe(e) {
|
|
3196
3168
|
let t = i.value;
|
|
3197
3169
|
if (!t) return;
|
|
3198
|
-
let n =
|
|
3199
|
-
m.value =
|
|
3170
|
+
let n = oe(e, t);
|
|
3171
|
+
m.value = be(m.value, n.x, n.y, Ts);
|
|
3200
3172
|
}
|
|
3201
|
-
function
|
|
3173
|
+
function A(e) {
|
|
3202
3174
|
let t = i.value;
|
|
3203
|
-
t &&
|
|
3175
|
+
t && De(e, we, t, m);
|
|
3204
3176
|
}
|
|
3205
|
-
function
|
|
3177
|
+
function j(e) {
|
|
3206
3178
|
let t = i.value;
|
|
3207
|
-
t &&
|
|
3179
|
+
t && Oe(e, we, t);
|
|
3208
3180
|
}
|
|
3209
|
-
function
|
|
3210
|
-
|
|
3181
|
+
function Ie(e) {
|
|
3182
|
+
ke(e, we, m);
|
|
3211
3183
|
}
|
|
3212
3184
|
Y(u, () => {
|
|
3213
|
-
|
|
3185
|
+
tt(() => ae());
|
|
3214
3186
|
});
|
|
3215
|
-
let Re, ze
|
|
3216
|
-
return
|
|
3187
|
+
let Le, Re, ze;
|
|
3188
|
+
return it(() => {
|
|
3217
3189
|
let e = n.value;
|
|
3218
3190
|
if (!e) return;
|
|
3219
3191
|
let t = new ResizeObserver(() => {
|
|
3220
|
-
0 < e.offsetWidth && 0 < e.offsetHeight && (
|
|
3192
|
+
0 < e.offsetWidth && 0 < e.offsetHeight && (ie(), t.disconnect());
|
|
3221
3193
|
});
|
|
3222
|
-
t.observe(e),
|
|
3223
|
-
}),
|
|
3224
|
-
|
|
3225
|
-
}), (n, r) => (H(),
|
|
3194
|
+
t.observe(e), Le = Te(e);
|
|
3195
|
+
}), rt(() => {
|
|
3196
|
+
Le?.(), Re?.(), clearTimeout(ze);
|
|
3197
|
+
}), (n, r) => (H(), I("figure", {
|
|
3226
3198
|
id: e.diagramId,
|
|
3227
3199
|
class: "td-diagram"
|
|
3228
3200
|
}, [
|
|
3229
|
-
|
|
3230
|
-
|
|
3201
|
+
L("div", Go, [
|
|
3202
|
+
vt(L("div", {
|
|
3231
3203
|
ref: "stage",
|
|
3232
3204
|
class: "td-diagram-stage",
|
|
3233
|
-
onPointerdown:
|
|
3234
|
-
onPointermove:
|
|
3235
|
-
onPointerup:
|
|
3236
|
-
onPointercancel:
|
|
3237
|
-
}, [
|
|
3205
|
+
onPointerdown: je,
|
|
3206
|
+
onPointermove: Pe,
|
|
3207
|
+
onPointerup: Me,
|
|
3208
|
+
onPointercancel: Me
|
|
3209
|
+
}, [L("div", {
|
|
3238
3210
|
ref: "canvas",
|
|
3239
3211
|
class: "td-diagram-canvas",
|
|
3240
|
-
style:
|
|
3212
|
+
style: nt(S.value),
|
|
3241
3213
|
innerHTML: e.svg
|
|
3242
|
-
}, null, 12,
|
|
3243
|
-
|
|
3244
|
-
r[3] ||=
|
|
3245
|
-
(H(!0),
|
|
3214
|
+
}, null, 12, Ko)], 544), [[gt, !c.value]]),
|
|
3215
|
+
vt(L("pre", qo, [
|
|
3216
|
+
r[3] ||= R(" ", -1),
|
|
3217
|
+
(H(!0), I(M, null, W(g.value, (e, t) => (H(), I("div", {
|
|
3246
3218
|
key: t,
|
|
3247
3219
|
class: "td-diagram-code-row"
|
|
3248
3220
|
}, [
|
|
3249
|
-
r[0] ||=
|
|
3250
|
-
|
|
3251
|
-
r[1] ||=
|
|
3252
|
-
|
|
3253
|
-
r[2] ||=
|
|
3221
|
+
r[0] ||= R("\n ", -1),
|
|
3222
|
+
L("span", Jo, K(t + 1), 1),
|
|
3223
|
+
r[1] ||= R("\n ", -1),
|
|
3224
|
+
L("span", Yo, K(e || " "), 1),
|
|
3225
|
+
r[2] ||= R("\n ", -1)
|
|
3254
3226
|
]))), 128)),
|
|
3255
|
-
r[4] ||=
|
|
3256
|
-
], 512), [[
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3227
|
+
r[4] ||= R("\n ", -1)
|
|
3228
|
+
], 512), [[gt, c.value]]),
|
|
3229
|
+
L("div", Xo, [
|
|
3230
|
+
L("span", Zo, K(e.label), 1),
|
|
3231
|
+
L("div", Qo, [L("button", {
|
|
3260
3232
|
type: "button",
|
|
3261
|
-
class:
|
|
3262
|
-
onClick:
|
|
3263
|
-
}, " Preview ", 2),
|
|
3233
|
+
class: V(["td-diagram-segment-button", { "is-active": !c.value }]),
|
|
3234
|
+
onClick: _e
|
|
3235
|
+
}, " Preview ", 2), L("button", {
|
|
3264
3236
|
type: "button",
|
|
3265
|
-
class:
|
|
3266
|
-
onClick:
|
|
3237
|
+
class: V(["td-diagram-segment-button", { "is-active": c.value }]),
|
|
3238
|
+
onClick: ge
|
|
3267
3239
|
}, " Code ", 2)]),
|
|
3268
|
-
|
|
3240
|
+
L("button", {
|
|
3269
3241
|
type: "button",
|
|
3270
|
-
class:
|
|
3242
|
+
class: V(["td-diagram-button", { "is-copied": d.value }]),
|
|
3271
3243
|
"aria-label": "Copy source",
|
|
3272
|
-
onClick:
|
|
3273
|
-
}, [d.value ? (H(),
|
|
3244
|
+
onClick: te
|
|
3245
|
+
}, [d.value ? (H(), P(q(xt), {
|
|
3274
3246
|
key: 0,
|
|
3275
3247
|
size: 16
|
|
3276
|
-
})) : (H(),
|
|
3248
|
+
})) : (H(), P(q(Tt), {
|
|
3277
3249
|
key: 1,
|
|
3278
3250
|
size: 16
|
|
3279
3251
|
}))], 2),
|
|
3280
|
-
|
|
3252
|
+
L("button", {
|
|
3281
3253
|
ref: "expandButton",
|
|
3282
3254
|
type: "button",
|
|
3283
3255
|
class: "td-diagram-button",
|
|
3284
3256
|
"aria-label": "Open full-screen preview",
|
|
3285
|
-
onClick:
|
|
3286
|
-
}, [
|
|
3257
|
+
onClick: he
|
|
3258
|
+
}, [z(q(jt), { size: 16 })], 512)
|
|
3287
3259
|
]),
|
|
3288
|
-
|
|
3289
|
-
|
|
3260
|
+
vt(L("div", $o, [
|
|
3261
|
+
L("button", {
|
|
3290
3262
|
type: "button",
|
|
3291
3263
|
class: "td-diagram-button",
|
|
3292
3264
|
"aria-label": "Zoom out",
|
|
3293
|
-
onClick:
|
|
3294
|
-
}, [
|
|
3295
|
-
|
|
3265
|
+
onClick: k
|
|
3266
|
+
}, [z(q(ve), { size: 16 })]),
|
|
3267
|
+
L("button", {
|
|
3296
3268
|
type: "button",
|
|
3297
3269
|
class: "td-diagram-button td-diagram-zoom-level",
|
|
3298
3270
|
"aria-label": "Reset zoom",
|
|
3299
|
-
onClick:
|
|
3271
|
+
onClick: ie
|
|
3300
3272
|
}, K(v.value), 1),
|
|
3301
|
-
|
|
3273
|
+
L("button", {
|
|
3302
3274
|
type: "button",
|
|
3303
3275
|
class: "td-diagram-button",
|
|
3304
3276
|
"aria-label": "Zoom in",
|
|
3305
|
-
onClick:
|
|
3306
|
-
}, [
|
|
3307
|
-
], 512), [[
|
|
3308
|
-
|
|
3277
|
+
onClick: ue
|
|
3278
|
+
}, [z(q(Ce), { size: 16 })])
|
|
3279
|
+
], 512), [[gt, !c.value]]),
|
|
3280
|
+
vt(L("div", { class: "td-diagram-hint" }, " Click to expand · Drag to pan · " + K(q(t)) + " + scroll to zoom ", 513), [[gt, !c.value]])
|
|
3309
3281
|
]),
|
|
3310
|
-
e.title ? (H(),
|
|
3311
|
-
(H(),
|
|
3282
|
+
e.title ? (H(), I("figcaption", es, K(e.title), 1)) : F("", !0),
|
|
3283
|
+
(H(), P(Je, { to: "body" }, [l.value ? (H(), I("div", {
|
|
3312
3284
|
key: 0,
|
|
3313
3285
|
class: "td-diagram-modal-backdrop",
|
|
3314
|
-
onClick:
|
|
3315
|
-
}, [
|
|
3286
|
+
onClick: ce
|
|
3287
|
+
}, [L("div", {
|
|
3316
3288
|
ref: "modalDialog",
|
|
3317
3289
|
class: "td-diagram-modal",
|
|
3318
3290
|
role: "dialog",
|
|
3319
3291
|
"aria-label": e.title || `${e.label} diagram`,
|
|
3320
3292
|
tabindex: "-1",
|
|
3321
|
-
onKeydown:
|
|
3322
|
-
}, [
|
|
3323
|
-
|
|
3293
|
+
onKeydown: le
|
|
3294
|
+
}, [L("div", ns, [L("div", rs, [L("span", is, K(e.title || "Diagram"), 1), L("span", as, K(e.label), 1)]), L("div", os, [
|
|
3295
|
+
L("button", {
|
|
3324
3296
|
type: "button",
|
|
3325
|
-
class:
|
|
3297
|
+
class: V(["td-diagram-modal-button", { "is-active": u.value }]),
|
|
3326
3298
|
"aria-pressed": u.value,
|
|
3327
3299
|
"aria-label": "Toggle code",
|
|
3328
|
-
onClick:
|
|
3329
|
-
}, [
|
|
3330
|
-
r[8] ||=
|
|
3331
|
-
|
|
3300
|
+
onClick: ye
|
|
3301
|
+
}, [z(q(pe), { size: 16 }), r[5] ||= L("span", { class: "td-diagram-button-label" }, "Code", -1)], 10, ss),
|
|
3302
|
+
r[8] ||= L("span", { class: "td-diagram-modal-separator" }, null, -1),
|
|
3303
|
+
L("button", {
|
|
3332
3304
|
type: "button",
|
|
3333
3305
|
class: "td-diagram-modal-button",
|
|
3334
3306
|
"aria-label": "Zoom out",
|
|
3335
|
-
onClick:
|
|
3336
|
-
}, [
|
|
3337
|
-
|
|
3307
|
+
onClick: fe
|
|
3308
|
+
}, [z(q(ve), { size: 16 })]),
|
|
3309
|
+
L("button", {
|
|
3338
3310
|
type: "button",
|
|
3339
3311
|
class: "td-diagram-modal-button td-diagram-modal-zoom-level",
|
|
3340
3312
|
"aria-label": "Zoom to 100%",
|
|
3341
|
-
onClick:
|
|
3313
|
+
onClick: me
|
|
3342
3314
|
}, K(y.value), 1),
|
|
3343
|
-
|
|
3315
|
+
L("button", {
|
|
3344
3316
|
type: "button",
|
|
3345
3317
|
class: "td-diagram-modal-button",
|
|
3346
3318
|
"aria-label": "Zoom in",
|
|
3347
|
-
onClick:
|
|
3348
|
-
}, [
|
|
3349
|
-
|
|
3319
|
+
onClick: de
|
|
3320
|
+
}, [z(q(Ce), { size: 16 })]),
|
|
3321
|
+
L("button", {
|
|
3350
3322
|
type: "button",
|
|
3351
3323
|
class: "td-diagram-modal-button",
|
|
3352
3324
|
"aria-label": "Fit to view",
|
|
3353
3325
|
onClick: ae
|
|
3354
|
-
}, [
|
|
3355
|
-
r[9] ||=
|
|
3356
|
-
|
|
3326
|
+
}, [z(q(se), { size: 16 }), r[6] ||= L("span", { class: "td-diagram-button-label" }, "Fit", -1)]),
|
|
3327
|
+
r[9] ||= L("span", { class: "td-diagram-modal-separator" }, null, -1),
|
|
3328
|
+
L("button", {
|
|
3357
3329
|
type: "button",
|
|
3358
|
-
class:
|
|
3330
|
+
class: V(["td-diagram-modal-button", { "is-copied": f.value }]),
|
|
3359
3331
|
"aria-label": "Copy source",
|
|
3360
|
-
onClick:
|
|
3361
|
-
}, [f.value ? (H(),
|
|
3332
|
+
onClick: D
|
|
3333
|
+
}, [f.value ? (H(), P(q(xt), {
|
|
3362
3334
|
key: 0,
|
|
3363
3335
|
size: 16
|
|
3364
|
-
})) : (H(),
|
|
3336
|
+
})) : (H(), P(q(Tt), {
|
|
3365
3337
|
key: 1,
|
|
3366
3338
|
size: 16
|
|
3367
|
-
})),
|
|
3368
|
-
|
|
3339
|
+
})), L("span", cs, K(f.value ? "Copied" : "Copy"), 1)], 2),
|
|
3340
|
+
L("button", {
|
|
3369
3341
|
type: "button",
|
|
3370
3342
|
class: "td-diagram-modal-button",
|
|
3371
3343
|
"aria-label": "Download SVG",
|
|
3372
|
-
onClick:
|
|
3373
|
-
}, [
|
|
3374
|
-
r[10] ||=
|
|
3375
|
-
|
|
3344
|
+
onClick: re
|
|
3345
|
+
}, [z(q(Ae), { size: 16 }), r[7] ||= L("span", { class: "td-diagram-button-label" }, "SVG", -1)]),
|
|
3346
|
+
r[10] ||= L("span", { class: "td-diagram-modal-separator" }, null, -1),
|
|
3347
|
+
L("button", {
|
|
3376
3348
|
type: "button",
|
|
3377
3349
|
class: "td-diagram-modal-button",
|
|
3378
3350
|
"aria-label": "Close preview",
|
|
3379
3351
|
onClick: E
|
|
3380
|
-
}, [
|
|
3381
|
-
])]),
|
|
3382
|
-
r[14] ||=
|
|
3383
|
-
(H(!0),
|
|
3352
|
+
}, [z(q(Ne), { size: 16 })])
|
|
3353
|
+
])]), L("div", ls, [u.value ? (H(), I("div", us, [L("div", ds, " diagram." + K(b.value) + " · " + K(_.value) + " lines ", 1), L("div", fs, [L("pre", ps, [
|
|
3354
|
+
r[14] ||= R(" ", -1),
|
|
3355
|
+
(H(!0), I(M, null, W(g.value, (e, t) => (H(), I("div", {
|
|
3384
3356
|
key: t,
|
|
3385
3357
|
class: "td-diagram-code-row"
|
|
3386
3358
|
}, [
|
|
3387
|
-
r[11] ||=
|
|
3388
|
-
|
|
3389
|
-
r[12] ||=
|
|
3390
|
-
|
|
3391
|
-
r[13] ||=
|
|
3359
|
+
r[11] ||= R("\n ", -1),
|
|
3360
|
+
L("span", ms, K(t + 1), 1),
|
|
3361
|
+
r[12] ||= R("\n ", -1),
|
|
3362
|
+
L("span", hs, K(e || " "), 1),
|
|
3363
|
+
r[13] ||= R("\n ", -1)
|
|
3392
3364
|
]))), 128)),
|
|
3393
|
-
r[15] ||=
|
|
3394
|
-
])])])) :
|
|
3365
|
+
r[15] ||= R("\n ", -1)
|
|
3366
|
+
])])])) : F("", !0), L("div", {
|
|
3395
3367
|
ref: "modalStage",
|
|
3396
3368
|
class: "td-diagram-modal-stage",
|
|
3397
|
-
style:
|
|
3398
|
-
onPointerdown:
|
|
3399
|
-
onPointermove:
|
|
3400
|
-
onPointerup:
|
|
3401
|
-
onPointercancel:
|
|
3402
|
-
onDblclick:
|
|
3403
|
-
}, [
|
|
3369
|
+
style: nt(w.value),
|
|
3370
|
+
onPointerdown: A,
|
|
3371
|
+
onPointermove: Ie,
|
|
3372
|
+
onPointerup: j,
|
|
3373
|
+
onPointercancel: j,
|
|
3374
|
+
onDblclick: Fe
|
|
3375
|
+
}, [L("div", {
|
|
3404
3376
|
ref: "modalCanvas",
|
|
3405
3377
|
class: "td-diagram-modal-canvas",
|
|
3406
|
-
style:
|
|
3378
|
+
style: nt(C.value),
|
|
3407
3379
|
innerHTML: e.svg
|
|
3408
|
-
}, null, 12,
|
|
3409
|
-
], 8,
|
|
3380
|
+
}, null, 12, gs), L("div", _s, " Drag or scroll to pan · " + K(q(t)) + " + scroll or pinch to zoom · Double-click to zoom in · Esc to close ", 1)], 36)])], 40, ts)])) : F("", !0)]))
|
|
3381
|
+
], 8, Wo));
|
|
3410
3382
|
}
|
|
3411
3383
|
}), [["__scopeId", "data-v-fb95bcf7"]]);
|
|
3412
3384
|
// src/client/theme-default/composables/lazy-embed/mountDiagram.ts
|
|
3413
|
-
function
|
|
3385
|
+
function ks(e, t) {
|
|
3414
3386
|
let n = document.createElement("div");
|
|
3415
|
-
n.style.display = "contents", e.replaceWith(n),
|
|
3387
|
+
n.style.display = "contents", e.replaceWith(n), ct(Ze(Os, t), n);
|
|
3416
3388
|
}
|
|
3417
3389
|
// src/client/theme-default/composables/lazy-embed/d2.ts
|
|
3418
|
-
var
|
|
3419
|
-
function
|
|
3390
|
+
var As = "https://esm.sh/@terrastruct/d2@0.1.32", js, Ms = 0;
|
|
3391
|
+
function Ns(e) {
|
|
3420
3392
|
let t = {
|
|
3421
3393
|
selector: ".td-d2-placeholder",
|
|
3422
|
-
onRender:
|
|
3394
|
+
onRender: Fs,
|
|
3423
3395
|
onVisible() {
|
|
3424
3396
|
let e = document.createElement("link");
|
|
3425
|
-
e.rel = "modulepreload", e.href =
|
|
3397
|
+
e.rel = "modulepreload", e.href = As, document.head.appendChild(e);
|
|
3426
3398
|
}
|
|
3427
3399
|
};
|
|
3428
|
-
|
|
3400
|
+
it(() => e.register(t)), ot(() => e.unregister(t));
|
|
3429
3401
|
}
|
|
3430
|
-
async function
|
|
3431
|
-
if (
|
|
3402
|
+
async function Ps() {
|
|
3403
|
+
if (js) return js;
|
|
3432
3404
|
try {
|
|
3433
3405
|
let e = await import(
|
|
3434
3406
|
/* @vite-ignore */
|
|
3435
|
-
|
|
3407
|
+
As
|
|
3436
3408
|
);
|
|
3437
|
-
|
|
3409
|
+
js = new (e.D2 || (e.default?.D2) || e.default)();
|
|
3438
3410
|
} catch {
|
|
3439
3411
|
return;
|
|
3440
3412
|
}
|
|
3441
|
-
return
|
|
3413
|
+
return js;
|
|
3442
3414
|
}
|
|
3443
|
-
async function
|
|
3415
|
+
async function Fs(e) {
|
|
3444
3416
|
let t = e, n = t.querySelector("code");
|
|
3445
3417
|
if (!n) return;
|
|
3446
|
-
let r = n.textContent ?? "", i = await
|
|
3418
|
+
let r = n.textContent ?? "", i = await Ps();
|
|
3447
3419
|
if (!i) return;
|
|
3448
|
-
let a = `td-d2-${
|
|
3420
|
+
let a = `td-d2-${Ms++}`, o = t.getAttribute("data-title");
|
|
3449
3421
|
try {
|
|
3450
3422
|
let e = await i.compile(r, { layout: "dagre" });
|
|
3451
|
-
|
|
3423
|
+
ks(t, {
|
|
3452
3424
|
svg: await i.render(e.diagram, {
|
|
3453
3425
|
...e.renderOptions,
|
|
3454
3426
|
themeID: document.documentElement.classList.contains("dark") ? 200 : 0
|
|
@@ -3463,42 +3435,42 @@ async function Ws(e) {
|
|
|
3463
3435
|
}
|
|
3464
3436
|
}
|
|
3465
3437
|
// src/client/theme-default/composables/lazy-embed/mermaid.ts
|
|
3466
|
-
var
|
|
3467
|
-
function
|
|
3438
|
+
var Is = "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs", Ls, Rs = 0;
|
|
3439
|
+
function zs(e) {
|
|
3468
3440
|
let t = {
|
|
3469
3441
|
selector: ".td-mermaid-placeholder",
|
|
3470
|
-
onRender:
|
|
3442
|
+
onRender: Vs,
|
|
3471
3443
|
onVisible() {
|
|
3472
3444
|
let e = document.createElement("link");
|
|
3473
|
-
e.rel = "modulepreload", e.href =
|
|
3445
|
+
e.rel = "modulepreload", e.href = Is, document.head.appendChild(e);
|
|
3474
3446
|
}
|
|
3475
3447
|
};
|
|
3476
|
-
|
|
3448
|
+
it(() => e.register(t)), ot(() => e.unregister(t));
|
|
3477
3449
|
}
|
|
3478
|
-
async function
|
|
3479
|
-
if (
|
|
3450
|
+
async function Bs() {
|
|
3451
|
+
if (Ls !== void 0) return Ls;
|
|
3480
3452
|
try {
|
|
3481
|
-
|
|
3453
|
+
Ls = await import(
|
|
3482
3454
|
/* @vite-ignore */
|
|
3483
|
-
|
|
3455
|
+
Is
|
|
3484
3456
|
);
|
|
3485
3457
|
} catch {
|
|
3486
3458
|
return;
|
|
3487
3459
|
}
|
|
3488
|
-
return
|
|
3460
|
+
return Ls.default.initialize({
|
|
3489
3461
|
startOnLoad: !1,
|
|
3490
3462
|
theme: document.documentElement.classList.contains("dark") ? "dark" : "default"
|
|
3491
|
-
}),
|
|
3463
|
+
}), Ls;
|
|
3492
3464
|
}
|
|
3493
|
-
async function
|
|
3465
|
+
async function Vs(e) {
|
|
3494
3466
|
let t = e, n = t.querySelector("code");
|
|
3495
3467
|
if (!n) return;
|
|
3496
|
-
let r = n.textContent ?? "", i = await
|
|
3468
|
+
let r = n.textContent ?? "", i = await Bs();
|
|
3497
3469
|
if (i === void 0) return;
|
|
3498
|
-
let a = `td-mermaid-${
|
|
3470
|
+
let a = `td-mermaid-${Rs++}`, o = t.getAttribute("data-title");
|
|
3499
3471
|
try {
|
|
3500
3472
|
let { svg: e } = await i.default.render(a, r);
|
|
3501
|
-
|
|
3473
|
+
ks(t, {
|
|
3502
3474
|
svg: e,
|
|
3503
3475
|
source: r,
|
|
3504
3476
|
title: o ?? void 0,
|
|
@@ -3510,15 +3482,15 @@ async function Xs(e) {
|
|
|
3510
3482
|
}
|
|
3511
3483
|
}
|
|
3512
3484
|
// src/client/theme-default/composables/lazy-embed/github.ts
|
|
3513
|
-
var
|
|
3514
|
-
function
|
|
3485
|
+
var Hs = "https://emgithub.com/embed-v2.js";
|
|
3486
|
+
function Us(e) {
|
|
3515
3487
|
let t, n = [], r = {
|
|
3516
3488
|
selector: ".td-github-placeholder",
|
|
3517
3489
|
onRender(e) {
|
|
3518
3490
|
let t = e, r = t.getAttribute("data-url");
|
|
3519
3491
|
if (!r) return;
|
|
3520
3492
|
let i = document.documentElement.classList.contains("dark"), a = document.createElement("script");
|
|
3521
|
-
a.src =
|
|
3493
|
+
a.src = Ws(r, i);
|
|
3522
3494
|
let o = document.createElement("div");
|
|
3523
3495
|
o.className = "td-github-wrapper", o.dataset.url = r, o.appendChild(a), t.replaceWith(o), n.push({
|
|
3524
3496
|
container: o,
|
|
@@ -3531,10 +3503,10 @@ function Qs(e) {
|
|
|
3531
3503
|
for (let e = n.length - 1; 0 <= e; e--) n[e].container.isConnected || n.splice(e, 1);
|
|
3532
3504
|
for (let t of n) {
|
|
3533
3505
|
let n = document.createElement("script");
|
|
3534
|
-
n.src =
|
|
3506
|
+
n.src = Ws(t.url, e), t.container.innerHTML = "", t.container.appendChild(n);
|
|
3535
3507
|
}
|
|
3536
3508
|
}
|
|
3537
|
-
|
|
3509
|
+
it(() => {
|
|
3538
3510
|
e.register(r);
|
|
3539
3511
|
let n = document.documentElement.classList.contains("dark");
|
|
3540
3512
|
t = new MutationObserver(() => {
|
|
@@ -3544,15 +3516,15 @@ function Qs(e) {
|
|
|
3544
3516
|
attributes: !0,
|
|
3545
3517
|
attributeFilter: ["class"]
|
|
3546
3518
|
});
|
|
3547
|
-
}),
|
|
3519
|
+
}), ot(() => {
|
|
3548
3520
|
e.unregister(r), t?.disconnect(), n.length = 0;
|
|
3549
3521
|
});
|
|
3550
3522
|
}
|
|
3551
|
-
function
|
|
3552
|
-
return `${
|
|
3523
|
+
function Ws(e, t) {
|
|
3524
|
+
return `${Hs}?target=${encodeURIComponent(e)}&style=${t ? "base16/gruvbox-dark-medium" : "grayscale"}&type=code&showBorder=on&showFileMeta=on&showFullPath=on&showCopy=on&showLineNumbers=on`;
|
|
3553
3525
|
}
|
|
3554
3526
|
// src/client/theme-default/composables/lazy-embed/index.ts
|
|
3555
|
-
function
|
|
3527
|
+
function Gs() {
|
|
3556
3528
|
let e = [], t = /* @__PURE__ */ new WeakSet(), n = /* @__PURE__ */ new WeakMap(), r, i;
|
|
3557
3529
|
function a() {
|
|
3558
3530
|
let i = document.getElementById("td-content");
|
|
@@ -3561,7 +3533,7 @@ function ec() {
|
|
|
3561
3533
|
for (let i of e) t.has(i) || (t.add(i), n.set(i, a), r.observe(i));
|
|
3562
3534
|
}
|
|
3563
3535
|
}
|
|
3564
|
-
|
|
3536
|
+
it(() => {
|
|
3565
3537
|
r = new IntersectionObserver((e) => {
|
|
3566
3538
|
for (let t of e) if (t.isIntersecting) {
|
|
3567
3539
|
r?.unobserve(t.target);
|
|
@@ -3574,7 +3546,7 @@ function ec() {
|
|
|
3574
3546
|
childList: !0,
|
|
3575
3547
|
subtree: !0
|
|
3576
3548
|
}));
|
|
3577
|
-
}),
|
|
3549
|
+
}), ot(() => {
|
|
3578
3550
|
i?.disconnect(), r?.disconnect();
|
|
3579
3551
|
});
|
|
3580
3552
|
let o = {
|
|
@@ -3586,38 +3558,38 @@ function ec() {
|
|
|
3586
3558
|
n !== -1 && e.splice(n, 1);
|
|
3587
3559
|
}
|
|
3588
3560
|
};
|
|
3589
|
-
|
|
3561
|
+
zs(o), Ns(o), Us(o);
|
|
3590
3562
|
}
|
|
3591
3563
|
// src/client/theme-default/TdLayout.vue?vue&type=script&setup=true&lang.ts
|
|
3592
|
-
var
|
|
3564
|
+
var Ks = { class: "td-header" }, qs = { class: "td-header-left" }, Js = ["href"], Ys = { class: "td-brand-name" }, Xs = { class: "td-header-right" }, Zs = ["href"], Qs = { class: "td-drawer-header" }, $s = ["href"], ec = { class: "td-brand-name" }, tc = {
|
|
3593
3565
|
key: 0,
|
|
3594
3566
|
class: "pt-4",
|
|
3595
3567
|
"aria-label": "Site navigation"
|
|
3596
|
-
},
|
|
3568
|
+
}, nc = { class: "td-page" }, rc = ["aria-label"], ic = {
|
|
3597
3569
|
key: 2,
|
|
3598
3570
|
class: "td-sidebar-collapse-label"
|
|
3599
|
-
},
|
|
3571
|
+
}, ac = ["onKeydown"], oc = { class: "td-main-and-rail" }, sc = { class: "td-main" }, cc = {
|
|
3600
3572
|
id: "td-content",
|
|
3601
3573
|
class: "td-content",
|
|
3602
3574
|
"data-testid": "content"
|
|
3603
|
-
},
|
|
3575
|
+
}, lc = {
|
|
3604
3576
|
key: 0,
|
|
3605
3577
|
class: "td-page-eyebrow"
|
|
3606
|
-
},
|
|
3578
|
+
}, uc = {
|
|
3607
3579
|
key: 1,
|
|
3608
3580
|
class: "td-page-icon"
|
|
3609
|
-
},
|
|
3581
|
+
}, dc = ["innerHTML"], fc = {
|
|
3610
3582
|
key: 3,
|
|
3611
3583
|
class: "td-page-meta"
|
|
3612
|
-
},
|
|
3584
|
+
}, pc = { key: 0 }, mc = { class: "td-content-body" }, hc = ["href"], gc = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
3613
3585
|
__name: "TdLayout",
|
|
3614
3586
|
setup(e) {
|
|
3615
|
-
let { title: t, page: n } =
|
|
3587
|
+
let { title: t, page: n } = Se(), i = N(() => {
|
|
3616
3588
|
let e = n.value.icon;
|
|
3617
|
-
return e ?
|
|
3618
|
-
}), a =
|
|
3619
|
-
Y(() => v.path, () => m()),
|
|
3620
|
-
let x = J("sidebarSearch"), S = J("menuSearch"), C = J("palette"), { previous: w, next: T } =
|
|
3589
|
+
return e ? Le(e.name) : void 0;
|
|
3590
|
+
}), a = j(), { withBase: o } = a, c = we(), l = ke(), u = N(() => l.value.ready), { isOpen: d, isDrawerMounted: f, open: p, close: m } = Sa(), h = U(""), g = U(!1), _ = U(!1), v = Ie(), y = U(!1);
|
|
3591
|
+
Y(() => v.path, () => m()), zo(), Bo(), Gs();
|
|
3592
|
+
let x = J("sidebarSearch"), S = J("menuSearch"), C = J("palette"), { previous: w, next: T } = wa();
|
|
3621
3593
|
function E() {
|
|
3622
3594
|
y.value = !1;
|
|
3623
3595
|
}
|
|
@@ -3630,133 +3602,133 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3630
3602
|
].filter(Boolean).join("/")}`;
|
|
3631
3603
|
}
|
|
3632
3604
|
function te() {
|
|
3633
|
-
O.value = !1,
|
|
3605
|
+
O.value = !1, tt(() => x.value?.focus());
|
|
3634
3606
|
}
|
|
3635
|
-
function
|
|
3607
|
+
function ne() {
|
|
3636
3608
|
x.value?.isVisible ? x.value.focus() : (p(), S.value?.focus());
|
|
3637
3609
|
}
|
|
3638
|
-
function
|
|
3610
|
+
function re() {
|
|
3639
3611
|
C.value?.open();
|
|
3640
3612
|
}
|
|
3641
|
-
function
|
|
3613
|
+
function ie() {
|
|
3642
3614
|
y.value = !0;
|
|
3643
3615
|
}
|
|
3644
|
-
|
|
3616
|
+
_a([Q.Control, Q.k], ne), _a([Q.Meta, Q.k], ne), _a([Q.Control, Q.FSlash], re), _a([Q.Meta, Q.FSlash], re), _a([Q.Control, Q.ArrowLeft], () => {
|
|
3645
3617
|
w.value && c.go(w.value.url);
|
|
3646
|
-
}, { ignoreWhenTyping: !0 }),
|
|
3618
|
+
}, { ignoreWhenTyping: !0 }), _a([Q.Control, Q.ArrowRight], () => {
|
|
3647
3619
|
T.value && c.go(T.value.url);
|
|
3648
|
-
}, { ignoreWhenTyping: !0 }),
|
|
3620
|
+
}, { ignoreWhenTyping: !0 }), _t(() => {
|
|
3649
3621
|
if (typeof document > "u") return;
|
|
3650
3622
|
let e = t.value, r = a.title;
|
|
3651
3623
|
document.title = e && e !== r ? `${e} - ${r}` : r;
|
|
3652
3624
|
let i = n.value.frontmatter?.description === void 0 ? a.description ?? "" : String(n.value.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
|
|
3653
3625
|
o && o.setAttribute("content", i);
|
|
3654
|
-
}),
|
|
3655
|
-
let { sidebarWidth:
|
|
3656
|
-
function se() {
|
|
3657
|
-
f.value ? d.value ? m() : p() : ce();
|
|
3658
|
-
}
|
|
3626
|
+
}), Uo();
|
|
3627
|
+
let { sidebarWidth: ae, sidebarCollapsed: O, sidebarStyle: oe } = D(), se = U(!1);
|
|
3659
3628
|
function ce() {
|
|
3660
|
-
|
|
3629
|
+
f.value ? d.value ? m() : p() : le();
|
|
3661
3630
|
}
|
|
3662
|
-
Ea([Q.Control, Q.Backslash], se, { capture: !0 }), Ea([Q.Meta, Q.Backslash], se, { capture: !0 });
|
|
3663
3631
|
function le() {
|
|
3664
|
-
|
|
3632
|
+
O.value = !O.value;
|
|
3665
3633
|
}
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3634
|
+
_a([Q.Control, Q.Backslash], ce, { capture: !0 }), _a([Q.Meta, Q.Backslash], ce, { capture: !0 });
|
|
3635
|
+
function ue() {
|
|
3636
|
+
ae.value = Math.min(500, ae.value + 20);
|
|
3637
|
+
}
|
|
3638
|
+
function k(e) {
|
|
3639
|
+
let t = e.clientX, n = ae.value, r = e.currentTarget;
|
|
3640
|
+
se.value = !0, r.setPointerCapture(e.pointerId);
|
|
3669
3641
|
function i(e) {
|
|
3670
3642
|
let r = Math.min(500, window.innerWidth * .85), i = Math.min(r, Math.max(200, n + e.clientX - t));
|
|
3671
|
-
|
|
3643
|
+
ae.value = i;
|
|
3672
3644
|
}
|
|
3673
3645
|
function a() {
|
|
3674
|
-
|
|
3646
|
+
se.value = !1, document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a);
|
|
3675
3647
|
}
|
|
3676
3648
|
document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
|
|
3677
3649
|
}
|
|
3678
3650
|
function de() {
|
|
3679
|
-
|
|
3651
|
+
ae.value = Math.max(200, ae.value - 20);
|
|
3680
3652
|
}
|
|
3681
|
-
return (e, r) => (H(),
|
|
3653
|
+
return (e, r) => (H(), I("div", null, [
|
|
3682
3654
|
G(e.$slots, "layout-top", {}, void 0, !0),
|
|
3683
|
-
r[6] ||=
|
|
3655
|
+
r[6] ||= L("a", {
|
|
3684
3656
|
href: "#td-content",
|
|
3685
3657
|
class: "td-skip-link"
|
|
3686
3658
|
}, "Skip to content", -1),
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3659
|
+
L("header", Ks, [
|
|
3660
|
+
L("div", qs, [
|
|
3661
|
+
z(Ca, { onClick: q(p) }, null, 8, ["onClick"]),
|
|
3662
|
+
L("a", {
|
|
3691
3663
|
href: q(o)(q(s)("/")),
|
|
3692
3664
|
class: "td-brand"
|
|
3693
|
-
}, [
|
|
3694
|
-
|
|
3665
|
+
}, [z(Vt), L("span", Ys, K(q(a).title || "Typedown"), 1)], 8, Js),
|
|
3666
|
+
z(_i, { class: "td-header-breadcrumb" })
|
|
3695
3667
|
]),
|
|
3696
|
-
|
|
3668
|
+
z(q(bi)),
|
|
3697
3669
|
G(e.$slots, "nav-bar-after", {}, void 0, !0),
|
|
3698
|
-
|
|
3699
|
-
|
|
3670
|
+
L("div", Xs, [
|
|
3671
|
+
z(Fr, {
|
|
3700
3672
|
text: "Commands",
|
|
3701
3673
|
placement: "bottom",
|
|
3702
3674
|
shortcut: [q(Q).Meta, q(Q).FSlash],
|
|
3703
3675
|
always: ""
|
|
3704
3676
|
}, {
|
|
3705
|
-
default: X(() => [
|
|
3677
|
+
default: X(() => [L("button", {
|
|
3706
3678
|
class: "td-header-commands-btn",
|
|
3707
3679
|
type: "button",
|
|
3708
3680
|
"aria-label": "Open command palette",
|
|
3709
|
-
onClick:
|
|
3710
|
-
}, [
|
|
3681
|
+
onClick: re
|
|
3682
|
+
}, [z(q(Oe), { size: 15 })])]),
|
|
3711
3683
|
_: 1
|
|
3712
3684
|
}, 8, ["shortcut"]),
|
|
3713
|
-
|
|
3714
|
-
q(a).repo ? (H(),
|
|
3685
|
+
z(Ro),
|
|
3686
|
+
q(a).repo ? (H(), I("a", {
|
|
3715
3687
|
key: 0,
|
|
3716
3688
|
href: q(a).repo.url,
|
|
3717
3689
|
target: "_blank",
|
|
3718
3690
|
rel: "noopener noreferrer",
|
|
3719
3691
|
class: "td-header-icon-link",
|
|
3720
3692
|
"aria-label": "GitHub repository"
|
|
3721
|
-
}, [...r[5] ||= [
|
|
3693
|
+
}, [...r[5] ||= [L("svg", {
|
|
3722
3694
|
width: "20",
|
|
3723
3695
|
height: "20",
|
|
3724
3696
|
viewBox: "0 0 98 96",
|
|
3725
3697
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3726
3698
|
"aria-hidden": "true",
|
|
3727
3699
|
fill: "currentColor"
|
|
3728
|
-
}, [
|
|
3700
|
+
}, [L("path", {
|
|
3729
3701
|
"fill-rule": "evenodd",
|
|
3730
3702
|
"clip-rule": "evenodd",
|
|
3731
3703
|
d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59\n 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367\n 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778\n 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125\n 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2\n 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364\n 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
|
|
3732
|
-
})], -1)]], 8,
|
|
3704
|
+
})], -1)]], 8, Zs)) : F("", !0)
|
|
3733
3705
|
])
|
|
3734
3706
|
]),
|
|
3735
|
-
|
|
3736
|
-
default: X(() => [q(f) ? (H(),
|
|
3707
|
+
z(Ye, { name: "td-drawer-scrim" }, {
|
|
3708
|
+
default: X(() => [q(f) ? (H(), I("div", {
|
|
3737
3709
|
key: 0,
|
|
3738
|
-
class:
|
|
3710
|
+
class: V(["td-drawer-scrim", { "is-open": q(d) }]),
|
|
3739
3711
|
onClick: r[0] ||= (...e) => q(m) && q(m)(...e)
|
|
3740
|
-
}, null, 2)) :
|
|
3712
|
+
}, null, 2)) : F("", !0)]),
|
|
3741
3713
|
_: 1
|
|
3742
3714
|
}),
|
|
3743
|
-
|
|
3744
|
-
default: X(() => [q(f) ? (H(),
|
|
3715
|
+
z(Ye, { name: "td-drawer-panel" }, {
|
|
3716
|
+
default: X(() => [q(f) ? (H(), I("aside", {
|
|
3745
3717
|
key: 0,
|
|
3746
|
-
class:
|
|
3718
|
+
class: V(["td-drawer", { "is-open": q(d) }])
|
|
3747
3719
|
}, [
|
|
3748
|
-
|
|
3720
|
+
L("header", Qs, [L("a", {
|
|
3749
3721
|
href: q(o)(q(s)("/")),
|
|
3750
3722
|
class: "td-brand"
|
|
3751
|
-
}, [
|
|
3723
|
+
}, [z(Vt), L("span", ec, K(q(a).title || "Typedown"), 1)], 8, $s), z(Ut, {
|
|
3752
3724
|
label: "Close menu",
|
|
3753
3725
|
onClick: q(m)
|
|
3754
3726
|
}, {
|
|
3755
|
-
default: X(() => [
|
|
3727
|
+
default: X(() => [z(q(Ne), { size: 20 })]),
|
|
3756
3728
|
_: 1
|
|
3757
3729
|
}, 8, ["onClick"])]),
|
|
3758
|
-
|
|
3759
|
-
|
|
3730
|
+
z(q(Ci)),
|
|
3731
|
+
z(Lo, {
|
|
3760
3732
|
ref_key: "menuSearch",
|
|
3761
3733
|
ref: S,
|
|
3762
3734
|
query: h.value,
|
|
@@ -3769,29 +3741,29 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3769
3741
|
"active",
|
|
3770
3742
|
"onSelect"
|
|
3771
3743
|
]),
|
|
3772
|
-
_.value ?
|
|
3744
|
+
_.value ? F("", !0) : (H(), I("nav", tc, [u.value ? (H(), P(ni, {
|
|
3773
3745
|
key: 1,
|
|
3774
3746
|
tree: q(l).contentTree
|
|
3775
|
-
}, null, 8, ["tree"])) : (H(),
|
|
3776
|
-
], 2)) :
|
|
3747
|
+
}, null, 8, ["tree"])) : (H(), P(no, { key: 0 }))]))
|
|
3748
|
+
], 2)) : F("", !0)]),
|
|
3777
3749
|
_: 1
|
|
3778
3750
|
}),
|
|
3779
|
-
|
|
3780
|
-
class:
|
|
3781
|
-
"is-resizing":
|
|
3751
|
+
L("div", nc, [L("nav", {
|
|
3752
|
+
class: V(["td-sidebar-left", {
|
|
3753
|
+
"is-resizing": se.value,
|
|
3782
3754
|
"is-collapsed": q(O)
|
|
3783
3755
|
}]),
|
|
3784
3756
|
"data-testid": "sidebar",
|
|
3785
3757
|
"aria-label": "Site navigation",
|
|
3786
|
-
style:
|
|
3758
|
+
style: nt(q(oe))
|
|
3787
3759
|
}, [
|
|
3788
|
-
q(O) ? (H(),
|
|
3760
|
+
q(O) ? (H(), P(co, {
|
|
3789
3761
|
key: 1,
|
|
3790
3762
|
tree: q(l).contentTree,
|
|
3791
3763
|
onSearch: te
|
|
3792
|
-
}, null, 8, ["tree"])) : (H(),
|
|
3764
|
+
}, null, 8, ["tree"])) : (H(), I(M, { key: 0 }, [
|
|
3793
3765
|
G(e.$slots, "sidebar-top", {}, void 0, !0),
|
|
3794
|
-
|
|
3766
|
+
z(Lo, {
|
|
3795
3767
|
ref_key: "sidebarSearch",
|
|
3796
3768
|
ref: x,
|
|
3797
3769
|
query: h.value,
|
|
@@ -3800,7 +3772,7 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3800
3772
|
"onUpdate:active": r[4] ||= (e) => g.value = e,
|
|
3801
3773
|
class: "td-sidebar-search"
|
|
3802
3774
|
}, null, 8, ["query", "active"]),
|
|
3803
|
-
|
|
3775
|
+
z(ro, {
|
|
3804
3776
|
tree: q(l).contentTree,
|
|
3805
3777
|
"search-active": g.value,
|
|
3806
3778
|
ready: u.value
|
|
@@ -3811,99 +3783,99 @@ var tc = { class: "td-header" }, nc = { class: "td-header-left" }, rc = ["href"]
|
|
|
3811
3783
|
]),
|
|
3812
3784
|
G(e.$slots, "sidebar-bottom", {}, void 0, !0)
|
|
3813
3785
|
], 64)),
|
|
3814
|
-
|
|
3786
|
+
L("button", {
|
|
3815
3787
|
class: "td-sidebar-collapse-btn",
|
|
3816
3788
|
type: "button",
|
|
3817
3789
|
"aria-label": q(O) ? "Expand sidebar" : "Collapse sidebar",
|
|
3818
|
-
onClick:
|
|
3790
|
+
onClick: le
|
|
3819
3791
|
}, [
|
|
3820
|
-
q(O) ? (H(),
|
|
3792
|
+
q(O) ? (H(), P(q(Ct), {
|
|
3821
3793
|
key: 1,
|
|
3822
3794
|
size: 14
|
|
3823
|
-
})) : (H(),
|
|
3795
|
+
})) : (H(), P(q(St), {
|
|
3824
3796
|
key: 0,
|
|
3825
3797
|
size: 14
|
|
3826
3798
|
})),
|
|
3827
|
-
q(O) ?
|
|
3828
|
-
q(O) ?
|
|
3799
|
+
q(O) ? F("", !0) : (H(), I("span", ic, "Collapse sidebar")),
|
|
3800
|
+
q(O) ? F("", !0) : (H(), P($, {
|
|
3829
3801
|
key: 3,
|
|
3830
3802
|
keys: [q(Q).Meta, q(Q).Backslash]
|
|
3831
3803
|
}, null, 8, ["keys"]))
|
|
3832
|
-
], 8,
|
|
3833
|
-
q(O) ?
|
|
3804
|
+
], 8, rc),
|
|
3805
|
+
q(O) ? F("", !0) : (H(), I("div", {
|
|
3834
3806
|
key: 2,
|
|
3835
3807
|
class: "td-resize-handle",
|
|
3836
3808
|
role: "separator",
|
|
3837
3809
|
"aria-orientation": "vertical",
|
|
3838
3810
|
"aria-label": "Resize sidebar",
|
|
3839
3811
|
tabindex: "0",
|
|
3840
|
-
onPointerdown:
|
|
3841
|
-
onKeydown: [
|
|
3842
|
-
}, null, 40,
|
|
3843
|
-
], 6),
|
|
3812
|
+
onPointerdown: bt(k, ["prevent"]),
|
|
3813
|
+
onKeydown: [yt(bt(de, ["prevent"]), ["left"]), yt(bt(ue, ["prevent"]), ["right"])]
|
|
3814
|
+
}, null, 40, ac))
|
|
3815
|
+
], 6), L("div", oc, [L("main", sc, [L("article", cc, [
|
|
3844
3816
|
G(e.$slots, "doc-before", {}, void 0, !0),
|
|
3845
|
-
q(n).schema ? (H(),
|
|
3846
|
-
i.value ? (H(),
|
|
3847
|
-
q(t) ? (H(),
|
|
3817
|
+
q(n).schema ? (H(), I("div", lc, K(q(n).schemaLabel ?? q(n).schema), 1)) : F("", !0),
|
|
3818
|
+
i.value ? (H(), I("div", uc, [(H(), P(ut(i.value), { size: 32 }))])) : F("", !0),
|
|
3819
|
+
q(t) ? (H(), I("h1", {
|
|
3848
3820
|
key: 2,
|
|
3849
3821
|
class: "td-page-title",
|
|
3850
3822
|
innerHTML: q(n).titleHtml
|
|
3851
|
-
}, null, 8,
|
|
3852
|
-
q(n).fileMetadata ? (H(),
|
|
3853
|
-
|
|
3823
|
+
}, null, 8, dc)) : F("", !0),
|
|
3824
|
+
q(n).fileMetadata ? (H(), I("div", fc, [L("span", null, K(q(b)(q(n).fileMetadata.mtimeSecs, "Modified")), 1), q(n).fileMetadata.ctimeSecs === q(n).fileMetadata.mtimeSecs ? F("", !0) : (H(), I("span", pc, " · " + K(q(b)(q(n).fileMetadata.ctimeSecs, "Created")), 1))])) : F("", !0),
|
|
3825
|
+
z(q(pa), {
|
|
3854
3826
|
class: "td-frontmatter-inline",
|
|
3855
3827
|
schema: q(n).schema,
|
|
3856
3828
|
frontmatter: q(n).frontmatter
|
|
3857
3829
|
}, null, 8, ["schema", "frontmatter"]),
|
|
3858
|
-
q(n).headings.length > 1 ? (H(),
|
|
3830
|
+
q(n).headings.length > 1 ? (H(), P(Ya, {
|
|
3859
3831
|
key: 4,
|
|
3860
3832
|
class: "td-toc-inline",
|
|
3861
3833
|
headings: q(n).headings,
|
|
3862
3834
|
inline: ""
|
|
3863
|
-
}, null, 8, ["headings"])) :
|
|
3835
|
+
}, null, 8, ["headings"])) : F("", !0),
|
|
3864
3836
|
G(e.$slots, "doc-content-before", {}, void 0, !0),
|
|
3865
|
-
|
|
3837
|
+
L("div", mc, [z(q(Fe))]),
|
|
3866
3838
|
G(e.$slots, "doc-content-after", {}, void 0, !0),
|
|
3867
|
-
|
|
3868
|
-
q(a).repo && q(n).filepath ? (H(),
|
|
3839
|
+
z(La),
|
|
3840
|
+
q(a).repo && q(n).filepath ? (H(), I("a", {
|
|
3869
3841
|
key: 5,
|
|
3870
3842
|
href: ee(q(n).filepath),
|
|
3871
3843
|
target: "_blank",
|
|
3872
3844
|
rel: "noopener noreferrer",
|
|
3873
3845
|
class: "td-page-edit"
|
|
3874
|
-
}, "Edit this page", 8,
|
|
3846
|
+
}, "Edit this page", 8, hc)) : F("", !0),
|
|
3875
3847
|
G(e.$slots, "doc-after", {}, void 0, !0)
|
|
3876
|
-
])]),
|
|
3877
|
-
|
|
3848
|
+
])]), z(eo, { class: "td-rail" })])]),
|
|
3849
|
+
z(ai),
|
|
3878
3850
|
G(e.$slots, "layout-bottom", {}, void 0, !0),
|
|
3879
|
-
|
|
3851
|
+
z(Co, {
|
|
3880
3852
|
ref_key: "palette",
|
|
3881
3853
|
ref: C,
|
|
3882
|
-
onToggleSidebar:
|
|
3883
|
-
onShowShortcuts:
|
|
3854
|
+
onToggleSidebar: le,
|
|
3855
|
+
onShowShortcuts: ie
|
|
3884
3856
|
}, null, 512),
|
|
3885
|
-
|
|
3857
|
+
z(Do, {
|
|
3886
3858
|
open: y.value,
|
|
3887
3859
|
onClose: E
|
|
3888
3860
|
}, null, 8, ["open"])
|
|
3889
3861
|
]));
|
|
3890
3862
|
}
|
|
3891
|
-
}), [["__scopeId", "data-v-e1cb586a"]]),
|
|
3863
|
+
}), [["__scopeId", "data-v-e1cb586a"]]), _c = { class: "pt-16 pb-24" }, vc = ["href"], yc = /* @__PURE__ */ B({
|
|
3892
3864
|
__name: "TdNotFound",
|
|
3893
3865
|
setup(e) {
|
|
3894
|
-
let { withBase: t } =
|
|
3895
|
-
return (e, n) => (H(),
|
|
3896
|
-
n[0] ||=
|
|
3897
|
-
n[1] ||=
|
|
3898
|
-
n[2] ||=
|
|
3899
|
-
|
|
3866
|
+
let { withBase: t } = j();
|
|
3867
|
+
return (e, n) => (H(), I("div", _c, [
|
|
3868
|
+
n[0] ||= L("p", { class: "text-td-4xl font-extrabold leading-none tracking-td-tight text-td-fg-muted" }, " 404 ", -1),
|
|
3869
|
+
n[1] ||= L("h1", { class: "text-td-xl font-extrabold leading-td-tight tracking-td-tight mt-4" }, " Page Not Found ", -1),
|
|
3870
|
+
n[2] ||= L("p", { class: "text-td-fg-muted mt-2 text-td-base leading-td-relaxed" }, " The page you are looking for does not exist. ", -1),
|
|
3871
|
+
L("a", {
|
|
3900
3872
|
class: "inline-flex items-center mt-6 text-td-accent text-td-sm font-extrabold tracking-td-tight hover:text-td-accent-hi",
|
|
3901
3873
|
href: q(t)(q(s)("/"))
|
|
3902
|
-
}, "Go Home", 8,
|
|
3874
|
+
}, "Go Home", 8, vc)
|
|
3903
3875
|
]));
|
|
3904
3876
|
}
|
|
3905
|
-
}),
|
|
3906
|
-
Layout:
|
|
3907
|
-
NotFound:
|
|
3877
|
+
}), bc = {
|
|
3878
|
+
Layout: gc,
|
|
3879
|
+
NotFound: yc
|
|
3908
3880
|
};
|
|
3909
|
-
export {
|
|
3881
|
+
export { ie as SIDEBAR_COLLAPSED_WIDTH, te as SIDEBAR_DEFAULT_WIDTH, ne as SIDEBAR_MAX_WIDTH, ee as SIDEBAR_MIN_WIDTH, Vt as TdBrandIcon, ni as TdContentNav, Ee as TdDirectoryIndex, ai as TdFooter, Te as TdGlossaryIndex, $ as TdKbdShortcut, Q as TdKeyName, gc as TdLayout, yc as TdNotFound, La as TdPreviousNext, eo as TdRail, Ro as TdThemeToggle, Ya as TdToc, bc as default, ga as isTypingTarget, re as useClientPreferences, zo as useCopyCode, _a as useGlobalHotkey, va as useLocalHotkeys, D as useSidebarConfig, E as useTheme };
|