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