@x-wave/blog 2.2.6 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/consts/index.js +24 -0
- package/index.js +928 -879
- package/locales/index.js +180 -0
- package/package.json +1 -1
- package/styles/index.css +1 -1
- package/types/index.d.ts +31 -0
- package/consts/index.ts +0 -9
- package/consts/navigation.ts +0 -26
- package/locales/index.ts +0 -182
- package/types/index.ts +0 -40
package/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useLocation as Y, useNavigate as Q, Link as de, useParams as
|
|
4
|
-
import { CaretLeft as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { createPortal as
|
|
10
|
-
const
|
|
11
|
-
tabContainer:
|
|
12
|
-
tab:
|
|
13
|
-
active:
|
|
1
|
+
import { jsxs as d, jsx as e, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as A } from "react-i18next";
|
|
3
|
+
import { useLocation as Y, useNavigate as Q, Link as de, useParams as ve, Navigate as qe, Routes as Ze, Route as Se } from "react-router-dom";
|
|
4
|
+
import { CaretLeft as et, CaretRight as We, ArrowSquareOut as tt, User as nt, CalendarBlank as at, X as fe, Tag as ot, MagnifyingGlass as Pe, List as st, Sun as Me, Moon as Be, Monitor as je, CaretDown as _e, Globe as ct } from "@phosphor-icons/react";
|
|
5
|
+
import { createContext as He, useState as C, useEffect as L, useContext as Fe, useRef as G } from "react";
|
|
6
|
+
import rt from "react-markdown";
|
|
7
|
+
import lt from "remark-gfm";
|
|
8
|
+
import it from "i18next";
|
|
9
|
+
import { createPortal as ze } from "react-dom";
|
|
10
|
+
const dt = "_tabContainer_zk6h4_1", ut = "_tab_zk6h4_1", ht = "_active_zk6h4_45", ae = {
|
|
11
|
+
tabContainer: dt,
|
|
12
|
+
tab: ut,
|
|
13
|
+
active: ht
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
const { t: n } =
|
|
15
|
+
function mt({ hasAdvanced: t }) {
|
|
16
|
+
const { t: n } = A(), s = Y(), c = Q();
|
|
17
17
|
if (!t) return null;
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const a =
|
|
18
|
+
const l = new URLSearchParams(s.search).has("advanced"), g = () => {
|
|
19
|
+
if (l) {
|
|
20
|
+
const i = new URLSearchParams(s.search);
|
|
21
|
+
i.delete("advanced");
|
|
22
|
+
const a = i.toString(), m = a ? `?${a}` : "";
|
|
23
23
|
c(`${s.pathname}${m}${s.hash}`);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
if (!
|
|
27
|
-
const
|
|
28
|
-
|
|
25
|
+
}, u = () => {
|
|
26
|
+
if (!l) {
|
|
27
|
+
const i = new URLSearchParams(s.search);
|
|
28
|
+
i.set("advanced", ""), c(`${s.pathname}?${i.toString()}${s.hash}`);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ d("div", { className: ae.tabContainer, children: [
|
|
32
32
|
/* @__PURE__ */ e(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
35
|
type: "button",
|
|
36
|
-
className: `${ae.tab} ${
|
|
37
|
-
onClick:
|
|
36
|
+
className: `${ae.tab} ${l ? "" : ae.active}`,
|
|
37
|
+
onClick: g,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
40
40
|
),
|
|
@@ -42,90 +42,90 @@ function ut({ hasAdvanced: t }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${ae.tab} ${
|
|
46
|
-
onClick:
|
|
45
|
+
className: `${ae.tab} ${l ? ae.active : ""}`,
|
|
46
|
+
onClick: u,
|
|
47
47
|
children: n("ui.advanced")
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
] });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function gt({ children: t }) {
|
|
53
53
|
return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ke(t) {
|
|
56
56
|
const n = /* @__PURE__ */ new Map();
|
|
57
|
-
function s(
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
60
|
-
const a = {}, m =
|
|
61
|
-
let
|
|
62
|
-
const
|
|
63
|
-
for (const
|
|
57
|
+
function s(u) {
|
|
58
|
+
const i = u.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
59
|
+
if (!i) return { frontmatter: {}, content: u };
|
|
60
|
+
const a = {}, m = i[1];
|
|
61
|
+
let r = "", o = !1;
|
|
62
|
+
const f = [];
|
|
63
|
+
for (const p of m.split(`
|
|
64
64
|
`)) {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
65
|
+
const N = p.trim();
|
|
66
|
+
if (N.startsWith("-")) {
|
|
67
|
+
if (o) {
|
|
68
|
+
const v = N.substring(1).trim();
|
|
69
|
+
f.push(v);
|
|
70
70
|
}
|
|
71
71
|
continue;
|
|
72
72
|
}
|
|
73
|
-
if (
|
|
74
|
-
const [
|
|
75
|
-
if (
|
|
76
|
-
|
|
73
|
+
if (o && !N.startsWith("-") && (a[r] = f.slice(), f.length = 0, o = !1), N != null && N.includes(":")) {
|
|
74
|
+
const [v, ...b] = N.split(":"), y = b.join(":").trim();
|
|
75
|
+
if (r = v.trim(), !y) {
|
|
76
|
+
o = !0;
|
|
77
77
|
continue;
|
|
78
78
|
}
|
|
79
|
-
y === "true" ? a[
|
|
79
|
+
y === "true" ? a[r] = !0 : y === "false" ? a[r] = !1 : a[r] = y;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
const w =
|
|
82
|
+
o && f.length > 0 && (a[r] = f);
|
|
83
|
+
const w = u.replace(
|
|
84
84
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
85
85
|
""
|
|
86
86
|
);
|
|
87
87
|
return { frontmatter: a, content: w };
|
|
88
88
|
}
|
|
89
|
-
function c(
|
|
90
|
-
return (
|
|
89
|
+
function c(u) {
|
|
90
|
+
return (u.split("/").pop() || "").replace(/(-advanced)?\.mdx$/, "");
|
|
91
91
|
}
|
|
92
|
-
function h(
|
|
93
|
-
const m = typeof
|
|
92
|
+
function h(u, i, a) {
|
|
93
|
+
const m = typeof u.title == "string" ? u.title : void 0;
|
|
94
94
|
if (m) return m;
|
|
95
|
-
const
|
|
96
|
-
return
|
|
95
|
+
const r = i.match(/^#\s+(.+)$/m);
|
|
96
|
+
return r ? r[1].trim() : a;
|
|
97
97
|
}
|
|
98
|
-
async function*
|
|
99
|
-
const
|
|
100
|
-
(m) => m.startsWith(
|
|
98
|
+
async function* l(u) {
|
|
99
|
+
const i = `./docs/${u}/`, a = Object.keys(t).filter(
|
|
100
|
+
(m) => m.startsWith(i)
|
|
101
101
|
);
|
|
102
102
|
for (const m of a)
|
|
103
103
|
if (!(m.split("/").pop() || "").endsWith("-advanced.mdx"))
|
|
104
104
|
try {
|
|
105
|
-
const
|
|
106
|
-
yield { slug:
|
|
107
|
-
} catch (
|
|
108
|
-
console.warn(`Failed to process ${m}:`,
|
|
105
|
+
const o = t[m], f = await o(), { frontmatter: w, content: p } = s(f), N = c(m), v = h(w, p, N);
|
|
106
|
+
yield { slug: N, title: v, frontmatter: w, content: p, filePath: m };
|
|
107
|
+
} catch (o) {
|
|
108
|
+
console.warn(`Failed to process ${m}:`, o);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
111
|
+
async function g(u) {
|
|
112
|
+
const i = n.get(u);
|
|
113
|
+
if (i) return i;
|
|
114
114
|
const a = (async () => {
|
|
115
115
|
const m = [];
|
|
116
|
-
for await (const
|
|
116
|
+
for await (const r of l(u))
|
|
117
117
|
m.push({
|
|
118
|
-
slug:
|
|
119
|
-
title:
|
|
120
|
-
frontmatter:
|
|
118
|
+
slug: r.slug,
|
|
119
|
+
title: r.title,
|
|
120
|
+
frontmatter: r.frontmatter
|
|
121
121
|
});
|
|
122
|
-
return m.sort((
|
|
123
|
-
const
|
|
124
|
-
return
|
|
122
|
+
return m.sort((r, o) => {
|
|
123
|
+
const f = r.frontmatter.date, w = o.frontmatter.date, p = f ? new Date(f).getTime() : null, N = w ? new Date(w).getTime() : null, v = p !== null && !Number.isNaN(p) ? p : null, b = N !== null && !Number.isNaN(N) ? N : null;
|
|
124
|
+
return v !== null && b !== null ? v !== b ? b - v : r.title.localeCompare(o.title) : v !== null ? -1 : b !== null ? 1 : r.title.localeCompare(o.title);
|
|
125
125
|
}), m;
|
|
126
126
|
})();
|
|
127
|
-
return n.set(
|
|
128
|
-
n.delete(
|
|
127
|
+
return n.set(u, a), a.catch(() => {
|
|
128
|
+
n.delete(u);
|
|
129
129
|
}), a;
|
|
130
130
|
}
|
|
131
131
|
return {
|
|
@@ -133,21 +133,21 @@ function He(t) {
|
|
|
133
133
|
* Load MDX content for a given language and slug.
|
|
134
134
|
* Automatically loads the advanced variant if `advanced` is true.
|
|
135
135
|
*/
|
|
136
|
-
async loadMDXContent(
|
|
137
|
-
const m = a ? `${
|
|
138
|
-
if (!
|
|
139
|
-
const
|
|
140
|
-
return { content:
|
|
136
|
+
async loadMDXContent(u, i, a = !1) {
|
|
137
|
+
const m = a ? `${i}-advanced.mdx` : `${i}.mdx`, r = `./docs/${u}/${m}`, o = t[r];
|
|
138
|
+
if (!o) throw new Error(`File not found: ${r}`);
|
|
139
|
+
const f = await o(), { frontmatter: w, content: p } = s(f);
|
|
140
|
+
return { content: p, frontmatter: w };
|
|
141
141
|
},
|
|
142
142
|
/**
|
|
143
143
|
* Load English content for generating consistent heading IDs.
|
|
144
144
|
* All heading anchors are derived from English content for stability across translations.
|
|
145
145
|
*/
|
|
146
|
-
async loadEnglishContent(
|
|
147
|
-
const m = `./docs/en/${
|
|
148
|
-
if (!
|
|
149
|
-
const
|
|
150
|
-
return
|
|
146
|
+
async loadEnglishContent(u, i = !1) {
|
|
147
|
+
const m = `./docs/en/${i ? `${u}-advanced.mdx` : `${u}.mdx`}`, r = t[m];
|
|
148
|
+
if (!r) throw new Error(`File not found: ${m}`);
|
|
149
|
+
const o = await r(), { content: f } = s(o);
|
|
150
|
+
return f;
|
|
151
151
|
},
|
|
152
152
|
/**
|
|
153
153
|
* Build a tag index from all MDX files.
|
|
@@ -156,13 +156,13 @@ function He(t) {
|
|
|
156
156
|
* @param language - Language code to scan (defaults to 'en')
|
|
157
157
|
* @returns Promise resolving to tag index mapping tag names to document info
|
|
158
158
|
*/
|
|
159
|
-
async buildTagIndex(
|
|
160
|
-
const
|
|
161
|
-
for (const m of
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
for (const
|
|
165
|
-
a[
|
|
159
|
+
async buildTagIndex(u = "en") {
|
|
160
|
+
const i = await g(u), a = {};
|
|
161
|
+
for (const m of i) {
|
|
162
|
+
const r = m.frontmatter.tags;
|
|
163
|
+
if (r && Array.isArray(r))
|
|
164
|
+
for (const o of r)
|
|
165
|
+
a[o] || (a[o] = []), a[o].some((f) => f.slug === m.slug) || a[o].push({ slug: m.slug, title: m.title });
|
|
166
166
|
}
|
|
167
167
|
return a;
|
|
168
168
|
},
|
|
@@ -173,8 +173,8 @@ function He(t) {
|
|
|
173
173
|
* @param language - Language code to scan
|
|
174
174
|
* @returns Promise resolving to array of articles with metadata, sorted by date (newest first) then title
|
|
175
175
|
*/
|
|
176
|
-
async discoverArticles(
|
|
177
|
-
return (await
|
|
176
|
+
async discoverArticles(u) {
|
|
177
|
+
return (await g(u)).map((a) => ({
|
|
178
178
|
slug: a.slug,
|
|
179
179
|
title: a.title,
|
|
180
180
|
date: a.frontmatter.date,
|
|
@@ -184,8 +184,8 @@ function He(t) {
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
const n =
|
|
187
|
+
function ns(t) {
|
|
188
|
+
const n = Ke(t);
|
|
189
189
|
return {
|
|
190
190
|
mdxFiles: t,
|
|
191
191
|
loadContent: n.loadMDXContent,
|
|
@@ -193,115 +193,81 @@ function Vo(t) {
|
|
|
193
193
|
discoverArticles: n.discoverArticles
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
m
|
|
196
|
+
const Ee = "app-theme", Ue = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", De = (t) => t === "system" ? Ue() : t, Ge = He(void 0);
|
|
197
|
+
function _t({ children: t, defaultTheme: n }) {
|
|
198
|
+
const s = () => n || (typeof window > "u" ? "system" : localStorage.getItem(Ee) || "system"), [c, h] = C(s);
|
|
199
|
+
L(() => {
|
|
200
|
+
const g = De(c), u = document.querySelector(".xw-blog-root");
|
|
201
|
+
if (u && (u.classList.remove("light", "dark"), u.classList.add(g)), c === "system") {
|
|
202
|
+
const i = window.matchMedia("(prefers-color-scheme: dark)"), a = () => {
|
|
203
|
+
const m = Ue(), r = document.querySelector(".xw-blog-root");
|
|
204
|
+
r && (r.classList.remove("light", "dark"), r.classList.add(m));
|
|
204
205
|
};
|
|
205
|
-
return
|
|
206
|
+
return i.addEventListener("change", a), () => i.removeEventListener("change", a);
|
|
206
207
|
}
|
|
207
|
-
}, [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
localStorage.setItem(je, r), c(r);
|
|
211
|
-
},
|
|
212
|
-
effectiveTheme: Ee(s)
|
|
208
|
+
}, [c]);
|
|
209
|
+
const l = (g) => {
|
|
210
|
+
localStorage.setItem(Ee, g), h(g);
|
|
213
211
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
title: a
|
|
225
|
-
});
|
|
226
|
-
} catch {
|
|
227
|
-
r.push({
|
|
228
|
-
...d,
|
|
229
|
-
title: d.slug
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
const _ = st.getFixedT(n)(h.title);
|
|
233
|
-
c.push({
|
|
234
|
-
title: _,
|
|
235
|
-
items: r,
|
|
236
|
-
...h.defaultOpen !== void 0 && {
|
|
237
|
-
defaultOpen: h.defaultOpen
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
} else
|
|
241
|
-
try {
|
|
242
|
-
const r = await s(n, h.slug, !1), _ = typeof r.frontmatter.title == "string" ? r.frontmatter.title : h.slug;
|
|
243
|
-
c.push({
|
|
244
|
-
...h,
|
|
245
|
-
title: _
|
|
246
|
-
});
|
|
247
|
-
} catch {
|
|
248
|
-
c.push({
|
|
249
|
-
...h,
|
|
250
|
-
title: h.slug
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
return c;
|
|
254
|
-
}, ee = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), gt = (t, n) => {
|
|
255
|
-
const s = n.findIndex(
|
|
256
|
-
(c) => c.slug === t
|
|
212
|
+
return /* @__PURE__ */ e(
|
|
213
|
+
Ge.Provider,
|
|
214
|
+
{
|
|
215
|
+
value: {
|
|
216
|
+
theme: c,
|
|
217
|
+
setTheme: l,
|
|
218
|
+
effectiveTheme: De(c)
|
|
219
|
+
},
|
|
220
|
+
children: t
|
|
221
|
+
}
|
|
257
222
|
);
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
223
|
+
}
|
|
224
|
+
const Qe = () => {
|
|
225
|
+
const t = Fe(Ge);
|
|
226
|
+
if (!t)
|
|
227
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
228
|
+
return t;
|
|
229
|
+
}, Xe = He(null);
|
|
230
|
+
function as({
|
|
264
231
|
children: t,
|
|
265
232
|
config: n,
|
|
266
233
|
blog: s,
|
|
267
234
|
navigationData: c = []
|
|
268
235
|
}) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const { buildTagIndex: d } = He(s.mdxFiles), u = n.supportedLanguages.map(async (a) => {
|
|
236
|
+
const [h, l] = C({});
|
|
237
|
+
L(() => {
|
|
238
|
+
const { buildTagIndex: u } = Ke(s.mdxFiles), i = n.supportedLanguages.map(async (a) => {
|
|
273
239
|
try {
|
|
274
|
-
const m = await
|
|
240
|
+
const m = await u(a);
|
|
275
241
|
return { language: a, index: m };
|
|
276
242
|
} catch (m) {
|
|
277
243
|
return console.error(`Failed to build tag index for ${a}:`, m), { language: a, index: {} };
|
|
278
244
|
}
|
|
279
245
|
});
|
|
280
|
-
Promise.all(
|
|
246
|
+
Promise.all(i).then((a) => {
|
|
281
247
|
const m = {};
|
|
282
|
-
for (const
|
|
283
|
-
m[
|
|
284
|
-
|
|
248
|
+
for (const r of a)
|
|
249
|
+
m[r.language] = r.index;
|
|
250
|
+
l(m);
|
|
285
251
|
}).catch((a) => {
|
|
286
252
|
console.error("Failed to build tag indices:", a);
|
|
287
253
|
});
|
|
288
254
|
}, [s.mdxFiles, n.supportedLanguages]);
|
|
289
|
-
const
|
|
290
|
-
return /* @__PURE__ */ e(
|
|
291
|
-
|
|
255
|
+
const g = { ...n, navigationData: c, tagIndex: h };
|
|
256
|
+
return /* @__PURE__ */ e(_t, { defaultTheme: n.defaultTheme, children: /* @__PURE__ */ e(
|
|
257
|
+
Xe.Provider,
|
|
292
258
|
{
|
|
293
259
|
value: {
|
|
294
|
-
config:
|
|
260
|
+
config: g,
|
|
295
261
|
loadContent: s.loadContent,
|
|
296
262
|
loadEnglishContent: s.loadEnglishContent,
|
|
297
263
|
discoverArticles: s.discoverArticles
|
|
298
264
|
},
|
|
299
|
-
children: /* @__PURE__ */ e(
|
|
265
|
+
children: /* @__PURE__ */ e(gt, { children: t })
|
|
300
266
|
}
|
|
301
|
-
);
|
|
267
|
+
) });
|
|
302
268
|
}
|
|
303
269
|
function R() {
|
|
304
|
-
const t =
|
|
270
|
+
const t = Fe(Xe);
|
|
305
271
|
if (!t)
|
|
306
272
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
307
273
|
return t;
|
|
@@ -309,7 +275,7 @@ function R() {
|
|
|
309
275
|
function pt(t, n, s) {
|
|
310
276
|
return `/${s ? `${s}/` : ""}${n}/${t}`;
|
|
311
277
|
}
|
|
312
|
-
function
|
|
278
|
+
function Ye(t) {
|
|
313
279
|
const n = {
|
|
314
280
|
advanced: !1,
|
|
315
281
|
anchor: ""
|
|
@@ -320,7 +286,7 @@ function Ue(t) {
|
|
|
320
286
|
h === "advanced" ? n.advanced = !0 : h.startsWith("a=") && (n.anchor = h.substring(2));
|
|
321
287
|
return n;
|
|
322
288
|
}
|
|
323
|
-
function
|
|
289
|
+
function Ae(t, n = 80) {
|
|
324
290
|
const s = document.getElementById(t);
|
|
325
291
|
if (s) {
|
|
326
292
|
const h = s.getBoundingClientRect().top + window.pageYOffset - n;
|
|
@@ -358,26 +324,26 @@ function Tt({
|
|
|
358
324
|
nextTitle: c,
|
|
359
325
|
language: h
|
|
360
326
|
}) {
|
|
361
|
-
const { t:
|
|
362
|
-
const w = `${m}/${h}/${
|
|
327
|
+
const { t: l } = A(), { config: g } = R(), u = Y(), a = Ye(u.search).advanced, m = g.basePath || "", r = (f) => {
|
|
328
|
+
const w = `${m}/${h}/${f}`;
|
|
363
329
|
return a ? `${w}?advanced=true` : w;
|
|
364
330
|
};
|
|
365
331
|
if (!t && !s)
|
|
366
332
|
return null;
|
|
367
|
-
const
|
|
333
|
+
const o = () => {
|
|
368
334
|
ft("auto");
|
|
369
335
|
};
|
|
370
|
-
return /* @__PURE__ */ e("nav", { className: O.articleNavigation, "aria-label": "Article navigation", children: /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ e("nav", { className: O.articleNavigation, "aria-label": "Article navigation", children: /* @__PURE__ */ d("div", { className: O.navContainer, children: [
|
|
371
337
|
t ? /* @__PURE__ */ e(
|
|
372
338
|
de,
|
|
373
339
|
{
|
|
374
|
-
to:
|
|
340
|
+
to: r(t),
|
|
375
341
|
className: O.navLink,
|
|
376
|
-
onClick:
|
|
377
|
-
children: /* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */ e("div", { className: O.navIcon, children: /* @__PURE__ */ e(
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */ e("span", { className: O.navLabel, children:
|
|
342
|
+
onClick: o,
|
|
343
|
+
children: /* @__PURE__ */ d("div", { className: O.navLinkContent, children: [
|
|
344
|
+
/* @__PURE__ */ e("div", { className: O.navIcon, children: /* @__PURE__ */ e(et, { size: 20, weight: "bold" }) }),
|
|
345
|
+
/* @__PURE__ */ d("div", { className: O.navText, children: [
|
|
346
|
+
/* @__PURE__ */ e("span", { className: O.navLabel, children: l("nav.previous") }),
|
|
381
347
|
/* @__PURE__ */ e("span", { className: O.navTitle, children: n || t })
|
|
382
348
|
] })
|
|
383
349
|
] })
|
|
@@ -386,42 +352,42 @@ function Tt({
|
|
|
386
352
|
s ? /* @__PURE__ */ e(
|
|
387
353
|
de,
|
|
388
354
|
{
|
|
389
|
-
to:
|
|
355
|
+
to: r(s),
|
|
390
356
|
className: O.navLink,
|
|
391
|
-
onClick:
|
|
392
|
-
children: /* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */ e("span", { className: O.navLabel, children:
|
|
357
|
+
onClick: o,
|
|
358
|
+
children: /* @__PURE__ */ d("div", { className: O.navLinkContent, children: [
|
|
359
|
+
/* @__PURE__ */ d("div", { className: O.navText, children: [
|
|
360
|
+
/* @__PURE__ */ e("span", { className: O.navLabel, children: l("nav.next") }),
|
|
395
361
|
/* @__PURE__ */ e("span", { className: O.navTitle, children: c || s })
|
|
396
362
|
] }),
|
|
397
|
-
/* @__PURE__ */ e("div", { className: O.navIcon, children: /* @__PURE__ */ e(
|
|
363
|
+
/* @__PURE__ */ e("div", { className: O.navIcon, children: /* @__PURE__ */ e(We, { size: 20, weight: "bold" }) })
|
|
398
364
|
] })
|
|
399
365
|
}
|
|
400
366
|
) : /* @__PURE__ */ e("div", {})
|
|
401
367
|
] }) });
|
|
402
368
|
}
|
|
403
|
-
const
|
|
404
|
-
blogSidebar:
|
|
405
|
-
section:
|
|
369
|
+
const xt = "_blogSidebar_n1up9_1", Lt = "_section_n1up9_21", St = "_sectionTitle_n1up9_28", Pt = "_linksList_n1up9_35", Mt = "_link_n1up9_35", oe = {
|
|
370
|
+
blogSidebar: xt,
|
|
371
|
+
section: Lt,
|
|
406
372
|
sectionTitle: St,
|
|
407
373
|
linksList: Pt,
|
|
408
374
|
link: Mt
|
|
409
375
|
};
|
|
410
376
|
function Bt() {
|
|
411
|
-
const { t } =
|
|
412
|
-
return s.length === 0 ? null : /* @__PURE__ */ e("aside", { className: oe.blogSidebar, children: /* @__PURE__ */
|
|
377
|
+
const { t } = A(), { config: n } = R(), s = n.socialLinks || [];
|
|
378
|
+
return s.length === 0 ? null : /* @__PURE__ */ e("aside", { className: oe.blogSidebar, children: /* @__PURE__ */ d("div", { className: oe.section, children: [
|
|
413
379
|
/* @__PURE__ */ e("h3", { className: oe.sectionTitle, children: t("ui.connect") }),
|
|
414
380
|
/* @__PURE__ */ e("div", { className: oe.linksList, children: s.map((c, h) => {
|
|
415
|
-
const
|
|
416
|
-
return /* @__PURE__ */
|
|
381
|
+
const l = c.icon || tt, g = c.target === "_blank";
|
|
382
|
+
return /* @__PURE__ */ d(
|
|
417
383
|
"a",
|
|
418
384
|
{
|
|
419
385
|
href: c.url,
|
|
420
386
|
className: oe.link,
|
|
421
387
|
target: c.target || "_blank",
|
|
422
|
-
rel:
|
|
388
|
+
rel: g ? "noopener noreferrer" : void 0,
|
|
423
389
|
children: [
|
|
424
|
-
/* @__PURE__ */ e(
|
|
390
|
+
/* @__PURE__ */ e(l, { size: 18, weight: "duotone" }),
|
|
425
391
|
/* @__PURE__ */ e("span", { children: c.label })
|
|
426
392
|
]
|
|
427
393
|
},
|
|
@@ -430,189 +396,237 @@ function Bt() {
|
|
|
430
396
|
}) })
|
|
431
397
|
] }) });
|
|
432
398
|
}
|
|
433
|
-
const jt = "_breadcrumb_rarc4_1", Et = "_breadcrumbList_rarc4_5",
|
|
399
|
+
const jt = "_breadcrumb_rarc4_1", Et = "_breadcrumbList_rarc4_5", Dt = "_breadcrumbItem_rarc4_15", At = "_breadcrumbLink_rarc4_21", Rt = "_breadcrumbSeparator_rarc4_41", Ot = "_breadcrumbCurrent_rarc4_46", X = {
|
|
434
400
|
breadcrumb: jt,
|
|
435
401
|
breadcrumbList: Et,
|
|
436
|
-
breadcrumbItem:
|
|
437
|
-
breadcrumbLink:
|
|
402
|
+
breadcrumbItem: Dt,
|
|
403
|
+
breadcrumbLink: At,
|
|
438
404
|
breadcrumbSeparator: Rt,
|
|
439
405
|
breadcrumbCurrent: Ot
|
|
440
406
|
};
|
|
441
407
|
function qt({ articleTitle: t, language: n }) {
|
|
442
|
-
const { t: s } =
|
|
443
|
-
a.preventDefault(), window.scrollTo({ top: 0, left: 0, behavior: "auto" }), h(
|
|
444
|
-
},
|
|
445
|
-
return /* @__PURE__ */ e("nav", { className: X.breadcrumb, "aria-label": "Breadcrumb", children: /* @__PURE__ */
|
|
408
|
+
const { t: s } = A(), { config: c } = R(), h = Q(), g = `${c.basePath || ""}/${n}`, u = (a) => {
|
|
409
|
+
a.preventDefault(), window.scrollTo({ top: 0, left: 0, behavior: "auto" }), h(g);
|
|
410
|
+
}, i = (a, m = 60) => a.length <= m ? a : `${a.substring(0, m)}…`;
|
|
411
|
+
return /* @__PURE__ */ e("nav", { className: X.breadcrumb, "aria-label": "Breadcrumb", children: /* @__PURE__ */ d("ol", { className: X.breadcrumbList, children: [
|
|
446
412
|
/* @__PURE__ */ e("li", { className: X.breadcrumbItem, children: /* @__PURE__ */ e(
|
|
447
413
|
"button",
|
|
448
414
|
{
|
|
449
|
-
onClick:
|
|
415
|
+
onClick: u,
|
|
450
416
|
className: X.breadcrumbLink,
|
|
451
417
|
type: "button",
|
|
452
418
|
children: s("ui.home")
|
|
453
419
|
}
|
|
454
420
|
) }),
|
|
455
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ d("li", { className: X.breadcrumbItem, children: [
|
|
456
422
|
/* @__PURE__ */ e("span", { className: X.breadcrumbSeparator, children: "/" }),
|
|
457
|
-
/* @__PURE__ */ e("span", { className: X.breadcrumbCurrent, children:
|
|
423
|
+
/* @__PURE__ */ e("span", { className: X.breadcrumbCurrent, children: i(t) })
|
|
458
424
|
] })
|
|
459
425
|
] }) });
|
|
460
426
|
}
|
|
461
|
-
const Wt = "
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
427
|
+
const Wt = (t) => "items" in t, Re = (t) => "items" in t, Ht = async (t, n, s) => {
|
|
428
|
+
const c = [];
|
|
429
|
+
for (const h of t)
|
|
430
|
+
if (Wt(h)) {
|
|
431
|
+
const l = [];
|
|
432
|
+
for (const u of h.items)
|
|
433
|
+
try {
|
|
434
|
+
const i = await s(n, u.slug, !1), a = typeof i.frontmatter.title == "string" ? i.frontmatter.title : u.slug;
|
|
435
|
+
l.push({
|
|
436
|
+
...u,
|
|
437
|
+
title: a
|
|
438
|
+
});
|
|
439
|
+
} catch {
|
|
440
|
+
l.push({
|
|
441
|
+
...u,
|
|
442
|
+
title: u.slug
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
const g = it.getFixedT(n)(h.title);
|
|
446
|
+
c.push({
|
|
447
|
+
title: g,
|
|
448
|
+
items: l,
|
|
449
|
+
...h.defaultOpen !== void 0 && {
|
|
450
|
+
defaultOpen: h.defaultOpen
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
} else
|
|
454
|
+
try {
|
|
455
|
+
const l = await s(n, h.slug, !1), g = typeof l.frontmatter.title == "string" ? l.frontmatter.title : h.slug;
|
|
456
|
+
c.push({
|
|
457
|
+
...h,
|
|
458
|
+
title: g
|
|
459
|
+
});
|
|
460
|
+
} catch {
|
|
461
|
+
c.push({
|
|
462
|
+
...h,
|
|
463
|
+
title: h.slug
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
return c;
|
|
467
|
+
}, ee = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), Ft = (t, n) => {
|
|
468
|
+
const s = n.findIndex(
|
|
469
|
+
(c) => c.slug === t
|
|
470
|
+
);
|
|
471
|
+
return s === -1 ? {} : {
|
|
472
|
+
prev: s > 0 ? n[s - 1] : void 0,
|
|
473
|
+
next: s < n.length - 1 ? n[s + 1] : void 0
|
|
474
|
+
};
|
|
475
|
+
}, zt = "_metadata_bsge0_1", Kt = "_author_bsge0_9", Ut = "_date_bsge0_10", ge = {
|
|
476
|
+
metadata: zt,
|
|
477
|
+
author: Kt,
|
|
478
|
+
date: Ut
|
|
465
479
|
};
|
|
466
|
-
function
|
|
467
|
-
const { t: s } =
|
|
468
|
-
return !t && !n ? null : /* @__PURE__ */
|
|
469
|
-
n && /* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */ e(
|
|
480
|
+
function pe({ date: t, author: n }) {
|
|
481
|
+
const { t: s } = A();
|
|
482
|
+
return !t && !n ? null : /* @__PURE__ */ d("div", { className: ge.metadata, children: [
|
|
483
|
+
n && /* @__PURE__ */ d("span", { className: ge.author, children: [
|
|
484
|
+
/* @__PURE__ */ e(nt, { size: 16, weight: "regular" }),
|
|
471
485
|
n
|
|
472
486
|
] }),
|
|
473
|
-
t && /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */ e(
|
|
487
|
+
t && /* @__PURE__ */ d("span", { className: ge.date, children: [
|
|
488
|
+
/* @__PURE__ */ e(at, { size: 16, weight: "regular" }),
|
|
475
489
|
s("ui.lastEdited"),
|
|
476
490
|
": ",
|
|
477
491
|
t
|
|
478
492
|
] })
|
|
479
493
|
] });
|
|
480
494
|
}
|
|
481
|
-
const
|
|
482
|
-
tableOfContents:
|
|
483
|
-
header:
|
|
484
|
-
title:
|
|
485
|
-
nav:
|
|
486
|
-
list:
|
|
487
|
-
link:
|
|
488
|
-
active:
|
|
489
|
-
level1:
|
|
490
|
-
level2:
|
|
491
|
-
level3:
|
|
492
|
-
level4:
|
|
493
|
-
level5:
|
|
494
|
-
level6:
|
|
495
|
+
const Gt = "_tableOfContents_9ofak_1", Qt = "_header_9ofak_21", Xt = "_title_9ofak_25", Yt = "_nav_9ofak_34", Vt = "_list_9ofak_40", Jt = "_link_9ofak_47", Zt = "_active_9ofak_71", en = "_level1_9ofak_87", tn = "_level2_9ofak_93", nn = "_level3_9ofak_98", an = "_level4_9ofak_104", on = "_level5_9ofak_110", sn = "_level6_9ofak_116", F = {
|
|
496
|
+
tableOfContents: Gt,
|
|
497
|
+
header: Qt,
|
|
498
|
+
title: Xt,
|
|
499
|
+
nav: Yt,
|
|
500
|
+
list: Vt,
|
|
501
|
+
link: Jt,
|
|
502
|
+
active: Zt,
|
|
503
|
+
level1: en,
|
|
504
|
+
level2: tn,
|
|
505
|
+
level3: nn,
|
|
506
|
+
level4: an,
|
|
507
|
+
level5: on,
|
|
508
|
+
level6: sn
|
|
495
509
|
};
|
|
496
|
-
function
|
|
510
|
+
function cn({
|
|
497
511
|
content: t,
|
|
498
512
|
englishContent: n
|
|
499
513
|
}) {
|
|
500
|
-
const { t: s } =
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
let w =
|
|
505
|
-
const
|
|
514
|
+
const { t: s } = A(), c = Y(), h = Q(), [l, g] = C([]), [u, i] = C(""), a = G(null);
|
|
515
|
+
L(() => {
|
|
516
|
+
i(""), (() => {
|
|
517
|
+
const o = /^(#{1,6})\s+(.+)$/gm, f = [];
|
|
518
|
+
let w = o.exec(t);
|
|
519
|
+
const p = [];
|
|
506
520
|
for (; w !== null; ) {
|
|
507
521
|
const y = w[1].length, P = w[2].trim();
|
|
508
|
-
|
|
522
|
+
p.push({ level: y, text: P }), w = o.exec(t);
|
|
509
523
|
}
|
|
510
|
-
const
|
|
511
|
-
let
|
|
512
|
-
for (;
|
|
513
|
-
const y =
|
|
514
|
-
|
|
524
|
+
const N = /^(#{1,6})\s+(.+)$/gm;
|
|
525
|
+
let v = N.exec(n), b = 0;
|
|
526
|
+
for (; v !== null && b < p.length; ) {
|
|
527
|
+
const y = v[2].trim(), P = ee(y);
|
|
528
|
+
f.push({
|
|
515
529
|
id: P,
|
|
516
|
-
text:
|
|
530
|
+
text: p[b].text,
|
|
517
531
|
// Use localized text for display
|
|
518
|
-
level:
|
|
519
|
-
}), b++,
|
|
532
|
+
level: p[b].level
|
|
533
|
+
}), b++, v = N.exec(n);
|
|
520
534
|
}
|
|
521
|
-
|
|
535
|
+
g(f);
|
|
522
536
|
})();
|
|
523
|
-
}, [t, n]),
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
(
|
|
537
|
+
}, [t, n]), L(() => {
|
|
538
|
+
if (l.length === 0) return;
|
|
539
|
+
const r = setTimeout(() => {
|
|
540
|
+
const o = l.filter(
|
|
541
|
+
(f) => !document.getElementById(f.id)
|
|
528
542
|
);
|
|
529
|
-
|
|
543
|
+
o.length > 0 && console.warn("Some heading elements not found:", o);
|
|
530
544
|
}, 100);
|
|
531
|
-
return () => clearTimeout(
|
|
532
|
-
}, [
|
|
533
|
-
if (
|
|
545
|
+
return () => clearTimeout(r);
|
|
546
|
+
}, [l]), L(() => {
|
|
547
|
+
if (l.length === 0) return;
|
|
534
548
|
a.current && a.current.disconnect();
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
(
|
|
539
|
-
const w =
|
|
549
|
+
const r = setTimeout(() => {
|
|
550
|
+
const o = l.map((f) => document.getElementById(f.id)).filter(Boolean);
|
|
551
|
+
o.length !== 0 && (a.current = new IntersectionObserver(
|
|
552
|
+
(f) => {
|
|
553
|
+
const w = f.filter((p) => p.isIntersecting);
|
|
540
554
|
if (w.length > 0) {
|
|
541
|
-
const
|
|
542
|
-
|
|
555
|
+
const p = w.reduce((N, v) => N.boundingClientRect.top < v.boundingClientRect.top ? N : v);
|
|
556
|
+
i(p.target.id);
|
|
543
557
|
}
|
|
544
558
|
},
|
|
545
559
|
{
|
|
546
560
|
rootMargin: "-80px 0% -80% 0%",
|
|
547
561
|
threshold: 0
|
|
548
562
|
}
|
|
549
|
-
),
|
|
550
|
-
a.current && a.current.observe(
|
|
563
|
+
), o.forEach((f) => {
|
|
564
|
+
a.current && a.current.observe(f);
|
|
551
565
|
}));
|
|
552
566
|
}, 150);
|
|
553
567
|
return () => {
|
|
554
|
-
clearTimeout(
|
|
568
|
+
clearTimeout(r), a.current && a.current.disconnect();
|
|
555
569
|
};
|
|
556
|
-
}, [
|
|
570
|
+
}, [l]), L(() => () => {
|
|
557
571
|
a.current && a.current.disconnect();
|
|
558
572
|
}, []);
|
|
559
|
-
const m = (
|
|
560
|
-
const
|
|
561
|
-
if (
|
|
562
|
-
const
|
|
563
|
-
|
|
564
|
-
`${c.pathname}?${
|
|
573
|
+
const m = (r) => {
|
|
574
|
+
const o = document.getElementById(r);
|
|
575
|
+
if (o) {
|
|
576
|
+
const f = new URLSearchParams(c.search);
|
|
577
|
+
f.set("a", r), h(
|
|
578
|
+
`${c.pathname}?${f.toString()}${c.hash}`,
|
|
565
579
|
{
|
|
566
580
|
replace: !0
|
|
567
581
|
}
|
|
568
582
|
);
|
|
569
|
-
const
|
|
583
|
+
const N = o.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
570
584
|
window.scrollTo({
|
|
571
|
-
top:
|
|
585
|
+
top: N,
|
|
572
586
|
behavior: "smooth"
|
|
573
587
|
});
|
|
574
588
|
}
|
|
575
589
|
};
|
|
576
|
-
return
|
|
590
|
+
return l.length === 0 ? null : /* @__PURE__ */ d("aside", { className: F.tableOfContents, children: [
|
|
577
591
|
/* @__PURE__ */ e("div", { className: F.header, children: /* @__PURE__ */ e("span", { className: F.title, children: s("ui.onThisPage", "On this page") }) }),
|
|
578
|
-
/* @__PURE__ */ e("nav", { className: F.nav, children: /* @__PURE__ */ e("ul", { className: F.list, children:
|
|
592
|
+
/* @__PURE__ */ e("nav", { className: F.nav, children: /* @__PURE__ */ e("ul", { className: F.list, children: l.map((r) => /* @__PURE__ */ e("li", { className: F.item, children: /* @__PURE__ */ e(
|
|
579
593
|
"button",
|
|
580
594
|
{
|
|
581
|
-
className: `${F.link} ${F[`level${
|
|
582
|
-
onClick: () => m(
|
|
595
|
+
className: `${F.link} ${F[`level${r.level}`]} ${u === r.id ? F.active : ""}`,
|
|
596
|
+
onClick: () => m(r.id),
|
|
583
597
|
type: "button",
|
|
584
|
-
children:
|
|
598
|
+
children: r.text
|
|
585
599
|
}
|
|
586
|
-
) },
|
|
600
|
+
) }, r.id)) }) })
|
|
587
601
|
] });
|
|
588
602
|
}
|
|
589
|
-
const
|
|
590
|
-
overlay:
|
|
591
|
-
modal:
|
|
592
|
-
header:
|
|
593
|
-
title:
|
|
594
|
-
closeButton:
|
|
595
|
-
results:
|
|
596
|
-
resultsList:
|
|
597
|
-
resultItem:
|
|
598
|
-
resultTitle:
|
|
599
|
-
resultSlug:
|
|
600
|
-
noResults:
|
|
603
|
+
const rn = "_overlay_1e1d4_1", ln = "_modal_1e1d4_26", dn = "_header_1e1d4_50", un = "_title_1e1d4_58", hn = "_closeButton_1e1d4_65", mn = "_results_1e1d4_86", gn = "_resultsList_1e1d4_94", _n = "_resultItem_1e1d4_100", pn = "_resultTitle_1e1d4_119", vn = "_resultSlug_1e1d4_124", fn = "_noResults_1e1d4_130", H = {
|
|
604
|
+
overlay: rn,
|
|
605
|
+
modal: ln,
|
|
606
|
+
header: dn,
|
|
607
|
+
title: un,
|
|
608
|
+
closeButton: hn,
|
|
609
|
+
results: mn,
|
|
610
|
+
resultsList: gn,
|
|
611
|
+
resultItem: _n,
|
|
612
|
+
resultTitle: pn,
|
|
613
|
+
resultSlug: vn,
|
|
614
|
+
noResults: fn
|
|
601
615
|
};
|
|
602
|
-
function
|
|
616
|
+
function bn({
|
|
603
617
|
tag: t,
|
|
604
618
|
results: n,
|
|
605
619
|
language: s,
|
|
606
620
|
onClose: c
|
|
607
621
|
}) {
|
|
608
|
-
const { t: h } =
|
|
609
|
-
const a =
|
|
610
|
-
|
|
622
|
+
const { t: h } = A(), { config: l } = R(), g = Q(), u = (i) => {
|
|
623
|
+
const a = l.basePath || "";
|
|
624
|
+
g(`${a}/${s}/${i}`), c();
|
|
611
625
|
};
|
|
612
|
-
return
|
|
613
|
-
/* @__PURE__ */ e("div", { className: H.overlay, onClick: c, children: /* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
626
|
+
return ze(
|
|
627
|
+
/* @__PURE__ */ e("div", { className: H.overlay, onClick: c, children: /* @__PURE__ */ d("div", { className: H.modal, onClick: (i) => i.stopPropagation(), children: [
|
|
628
|
+
/* @__PURE__ */ d("div", { className: H.header, children: [
|
|
629
|
+
/* @__PURE__ */ d("h2", { className: H.title, children: [
|
|
616
630
|
h("ui.tagResults"),
|
|
617
631
|
": ",
|
|
618
632
|
t
|
|
@@ -624,96 +638,120 @@ function pn({
|
|
|
624
638
|
className: H.closeButton,
|
|
625
639
|
onClick: c,
|
|
626
640
|
"aria-label": "Close",
|
|
627
|
-
children: /* @__PURE__ */ e(
|
|
641
|
+
children: /* @__PURE__ */ e(fe, {})
|
|
628
642
|
}
|
|
629
643
|
)
|
|
630
644
|
] }),
|
|
631
|
-
/* @__PURE__ */ e("div", { className: H.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: H.noResults, children: h("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: H.resultsList, children: n.map((
|
|
645
|
+
/* @__PURE__ */ e("div", { className: H.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: H.noResults, children: h("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: H.resultsList, children: n.map((i) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
632
646
|
"button",
|
|
633
647
|
{
|
|
634
648
|
type: "button",
|
|
635
649
|
className: H.resultItem,
|
|
636
|
-
onClick: () =>
|
|
650
|
+
onClick: () => u(i.slug),
|
|
637
651
|
children: [
|
|
638
|
-
/* @__PURE__ */ e("div", { className: H.resultTitle, children:
|
|
639
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ e("div", { className: H.resultTitle, children: i.title }),
|
|
653
|
+
/* @__PURE__ */ d("div", { className: H.resultSlug, children: [
|
|
640
654
|
"/",
|
|
641
|
-
|
|
655
|
+
i.slug
|
|
642
656
|
] })
|
|
643
657
|
]
|
|
644
658
|
}
|
|
645
|
-
) },
|
|
659
|
+
) }, i.slug)) }) })
|
|
646
660
|
] }) }),
|
|
647
661
|
document.body
|
|
648
662
|
);
|
|
649
663
|
}
|
|
650
|
-
const
|
|
651
|
-
tags:
|
|
652
|
-
compact:
|
|
653
|
-
tagLabel:
|
|
654
|
-
tagIcon:
|
|
655
|
-
tagList:
|
|
656
|
-
tag:
|
|
664
|
+
const kn = "_tags_11t8a_1", Nn = "_compact_11t8a_9", wn = "_tagLabel_11t8a_15", In = "_tagIcon_11t8a_25", yn = "_tagList_11t8a_30", $n = "_tag_11t8a_1", Z = {
|
|
665
|
+
tags: kn,
|
|
666
|
+
compact: Nn,
|
|
667
|
+
tagLabel: wn,
|
|
668
|
+
tagIcon: In,
|
|
669
|
+
tagList: yn,
|
|
670
|
+
tag: $n
|
|
657
671
|
};
|
|
658
|
-
function
|
|
659
|
-
const { t: c } =
|
|
672
|
+
function Cn({ tags: t, variant: n = "default", onTagClick: s }) {
|
|
673
|
+
const { t: c } = A();
|
|
660
674
|
if (!t || t.length === 0) return null;
|
|
661
|
-
const h = (
|
|
662
|
-
s && s(
|
|
675
|
+
const h = (l) => {
|
|
676
|
+
s && s(l);
|
|
663
677
|
};
|
|
664
|
-
return /* @__PURE__ */
|
|
678
|
+
return /* @__PURE__ */ d(
|
|
665
679
|
"div",
|
|
666
680
|
{
|
|
667
681
|
className: `${Z.tags} ${n === "compact" ? Z.compact : ""}`,
|
|
668
682
|
children: [
|
|
669
|
-
n === "default" && /* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */ e(
|
|
671
|
-
/* @__PURE__ */
|
|
683
|
+
n === "default" && /* @__PURE__ */ d("div", { className: Z.tagLabel, children: [
|
|
684
|
+
/* @__PURE__ */ e(ot, { className: Z.tagIcon, weight: "duotone" }),
|
|
685
|
+
/* @__PURE__ */ d("span", { children: [
|
|
672
686
|
c("ui.tags"),
|
|
673
687
|
":"
|
|
674
688
|
] })
|
|
675
689
|
] }),
|
|
676
|
-
/* @__PURE__ */ e("div", { className: Z.tagList, children: t.map((
|
|
690
|
+
/* @__PURE__ */ e("div", { className: Z.tagList, children: t.map((l) => /* @__PURE__ */ e(
|
|
677
691
|
"button",
|
|
678
692
|
{
|
|
679
693
|
type: "button",
|
|
680
694
|
className: Z.tag,
|
|
681
|
-
onClick: () => h(
|
|
682
|
-
"aria-label": `${c("ui.filterByTag")}: ${
|
|
683
|
-
children:
|
|
695
|
+
onClick: () => h(l),
|
|
696
|
+
"aria-label": `${c("ui.filterByTag")}: ${l}`,
|
|
697
|
+
children: l
|
|
684
698
|
},
|
|
685
|
-
|
|
699
|
+
l
|
|
686
700
|
)) })
|
|
687
701
|
]
|
|
688
702
|
}
|
|
689
703
|
);
|
|
690
704
|
}
|
|
691
|
-
const
|
|
692
|
-
contentPage:
|
|
693
|
-
withMetadata:
|
|
694
|
-
loadingContainer:
|
|
695
|
-
errorContainer:
|
|
696
|
-
skeletonTitle:
|
|
697
|
-
skeletonParagraph:
|
|
698
|
-
skeletonParagraphShort:
|
|
699
|
-
errorText:
|
|
700
|
-
mdxContent:
|
|
701
|
-
codeBlock:
|
|
702
|
-
codeLanguage:
|
|
703
|
-
},
|
|
705
|
+
const Tn = "_contentPage_118jr_1", xn = "_withMetadata_118jr_30", Ln = "_loadingContainer_118jr_64", Sn = "_errorContainer_118jr_65", Pn = "_skeletonTitle_118jr_87", Mn = "_skeletonParagraph_118jr_96", Bn = "_skeletonParagraphShort_118jr_109", jn = "_errorText_118jr_123", En = "_mdxContent_118jr_128", Dn = "_codeBlock_118jr_316", An = "_codeLanguage_118jr_320", D = {
|
|
706
|
+
contentPage: Tn,
|
|
707
|
+
withMetadata: xn,
|
|
708
|
+
loadingContainer: Ln,
|
|
709
|
+
errorContainer: Sn,
|
|
710
|
+
skeletonTitle: Pn,
|
|
711
|
+
skeletonParagraph: Mn,
|
|
712
|
+
skeletonParagraphShort: Bn,
|
|
713
|
+
errorText: jn,
|
|
714
|
+
mdxContent: En,
|
|
715
|
+
codeBlock: Dn,
|
|
716
|
+
codeLanguage: An
|
|
717
|
+
}, Oe = (t) => {
|
|
704
718
|
const n = t.match(/^\s*#\s+(.+)\s*(?:\n+|$)/);
|
|
705
719
|
return n ? {
|
|
706
720
|
title: n[1].trim(),
|
|
707
721
|
content: t.replace(/^\s*#\s+.+\s*(?:\n+|$)/, "")
|
|
708
722
|
} : { title: void 0, content: t };
|
|
723
|
+
}, Rn = (t) => {
|
|
724
|
+
const n = t.lastIndexOf(".");
|
|
725
|
+
if (n === -1) return `${t}-dark`;
|
|
726
|
+
const s = t.substring(0, n), c = t.substring(n);
|
|
727
|
+
return `${s}-dark${c}`;
|
|
709
728
|
};
|
|
710
|
-
function
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
729
|
+
function On({
|
|
730
|
+
src: t,
|
|
731
|
+
alt: n,
|
|
732
|
+
effectiveTheme: s,
|
|
733
|
+
node: c,
|
|
734
|
+
...h
|
|
735
|
+
}) {
|
|
736
|
+
const [l, g] = C(t), [u, i] = C(!1);
|
|
737
|
+
return L(() => {
|
|
738
|
+
if (t)
|
|
739
|
+
if (i(!1), s === "dark") {
|
|
740
|
+
const m = Rn(t);
|
|
741
|
+
g(m);
|
|
742
|
+
} else
|
|
743
|
+
g(t);
|
|
744
|
+
}, [t, s]), /* @__PURE__ */ e("img", { src: l, alt: n, onError: () => {
|
|
745
|
+
s === "dark" && l !== t && !u && (i(!0), g(t));
|
|
746
|
+
}, ...h });
|
|
747
|
+
}
|
|
748
|
+
function qn({ language: t }) {
|
|
749
|
+
var Ie, ye, $e, Ce, Te;
|
|
750
|
+
const { slug: n } = ve(), s = Y(), { config: c, loadContent: h, loadEnglishContent: l, discoverArticles: g } = R(), { effectiveTheme: u } = Qe(), [i, a] = C(""), [m, r] = C(""), [o, f] = C({}), [w, p] = C(!0), [N, v] = C(null), [b, y] = C(!0), [P, k] = C(null), [T, j] = C(""), [W, ue] = C({}), z = G(0), te = G([]), ce = Ye(s.search), V = ce.advanced;
|
|
751
|
+
if (L(() => {
|
|
714
752
|
(async () => {
|
|
715
753
|
if (n) {
|
|
716
|
-
|
|
754
|
+
p(!0), v(null), z.current = 0;
|
|
717
755
|
try {
|
|
718
756
|
let I;
|
|
719
757
|
try {
|
|
@@ -724,119 +762,119 @@ function En({ language: t }) {
|
|
|
724
762
|
else
|
|
725
763
|
throw new Error("Content not found");
|
|
726
764
|
}
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
-
let
|
|
765
|
+
const M = I.frontmatter.showTableOfContents !== !1;
|
|
766
|
+
y(M);
|
|
767
|
+
let x = "";
|
|
730
768
|
try {
|
|
731
|
-
|
|
769
|
+
x = await l(n, V);
|
|
732
770
|
} catch {
|
|
733
|
-
V && (
|
|
771
|
+
V && (x = await l(n, !1));
|
|
734
772
|
}
|
|
735
773
|
const E = typeof I.frontmatter.title == "string" ? I.frontmatter.title : void 0;
|
|
736
|
-
let ne = I.content, J =
|
|
774
|
+
let ne = I.content, J = x, he = "";
|
|
737
775
|
if (E) {
|
|
738
|
-
const ie =
|
|
739
|
-
|
|
776
|
+
const ie = Oe(x), Je = Oe(I.content);
|
|
777
|
+
he = ie.title || "", J = ie.content, ne = Je.content;
|
|
740
778
|
} else
|
|
741
|
-
|
|
742
|
-
const
|
|
743
|
-
let
|
|
779
|
+
he = "";
|
|
780
|
+
const xe = /^(#{1,6})\s+(.+)$/gm, Le = [];
|
|
781
|
+
let me = xe.exec(
|
|
744
782
|
J
|
|
745
783
|
);
|
|
746
|
-
for (;
|
|
747
|
-
const ie =
|
|
748
|
-
Le.push(ie),
|
|
784
|
+
for (; me !== null; ) {
|
|
785
|
+
const ie = me[2].trim();
|
|
786
|
+
Le.push(ie), me = xe.exec(J);
|
|
749
787
|
}
|
|
750
|
-
te.current = Le,
|
|
788
|
+
te.current = Le, j(he), r(J), a(ne), f(I.frontmatter);
|
|
751
789
|
} catch (I) {
|
|
752
|
-
|
|
790
|
+
v(I instanceof Error ? I.message : "Failed to load content");
|
|
753
791
|
} finally {
|
|
754
|
-
|
|
792
|
+
p(!1);
|
|
755
793
|
}
|
|
756
794
|
}
|
|
757
795
|
})();
|
|
758
|
-
}, [n, t, V, h,
|
|
759
|
-
if (!
|
|
760
|
-
const
|
|
761
|
-
|
|
796
|
+
}, [n, t, V, h, l]), L(() => {
|
|
797
|
+
if (!w && ce.anchor) {
|
|
798
|
+
const _ = setTimeout(() => {
|
|
799
|
+
Ae(ce.anchor);
|
|
762
800
|
}, 150);
|
|
763
|
-
return () => clearTimeout(
|
|
801
|
+
return () => clearTimeout(_);
|
|
764
802
|
}
|
|
765
|
-
}, [
|
|
803
|
+
}, [w, ce.anchor]), L(() => {
|
|
766
804
|
(async () => {
|
|
767
805
|
if (!n || !c.showArticleNavigation) {
|
|
768
|
-
|
|
806
|
+
ue({});
|
|
769
807
|
return;
|
|
770
808
|
}
|
|
771
809
|
try {
|
|
772
|
-
const I = await
|
|
773
|
-
|
|
810
|
+
const I = await g(t), M = Ft(n, I);
|
|
811
|
+
ue(M);
|
|
774
812
|
} catch (I) {
|
|
775
|
-
console.error("Failed to calculate adjacent articles:", I),
|
|
813
|
+
console.error("Failed to calculate adjacent articles:", I), ue({});
|
|
776
814
|
}
|
|
777
815
|
})();
|
|
778
|
-
}, [n, t, c.showArticleNavigation,
|
|
779
|
-
return /* @__PURE__ */ e("div", { className:
|
|
780
|
-
/* @__PURE__ */ e("div", { className:
|
|
781
|
-
/* @__PURE__ */ e("div", { className:
|
|
782
|
-
/* @__PURE__ */ e("div", { className:
|
|
783
|
-
/* @__PURE__ */ e("div", { className:
|
|
816
|
+
}, [n, t, c.showArticleNavigation, g]), w)
|
|
817
|
+
return /* @__PURE__ */ e("div", { className: D.contentPage, children: /* @__PURE__ */ d("div", { className: D.loadingContainer, children: [
|
|
818
|
+
/* @__PURE__ */ e("div", { className: D.skeletonTitle }),
|
|
819
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraph }),
|
|
820
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraph }),
|
|
821
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraphShort })
|
|
784
822
|
] }) });
|
|
785
|
-
if (
|
|
786
|
-
return /* @__PURE__ */ e("div", { className:
|
|
823
|
+
if (N)
|
|
824
|
+
return /* @__PURE__ */ e("div", { className: D.contentPage, children: /* @__PURE__ */ e("div", { className: D.errorContainer, children: /* @__PURE__ */ d("div", { className: D.errorText, children: [
|
|
787
825
|
"Error: ",
|
|
788
|
-
|
|
826
|
+
N
|
|
789
827
|
] }) }) });
|
|
790
|
-
const re = typeof o.title == "string" && o.title.trim().length > 0,
|
|
828
|
+
const re = typeof o.title == "string" && o.title.trim().length > 0, Ve = re ? ee(T || o.title) : "", Ne = !!(o.date || o.author);
|
|
791
829
|
z.current = 0;
|
|
792
|
-
let
|
|
793
|
-
const le = (
|
|
794
|
-
|
|
830
|
+
let we = !1;
|
|
831
|
+
const le = (_, I) => {
|
|
832
|
+
_.preventDefault(), Ae(I), vt(I, V);
|
|
795
833
|
};
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
/* @__PURE__ */ e(
|
|
799
|
-
re && /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ d(U, { children: [
|
|
835
|
+
/* @__PURE__ */ d("div", { className: D.contentPage, children: [
|
|
836
|
+
/* @__PURE__ */ e(mt, { hasAdvanced: o.hasAdvanced || !1 }),
|
|
837
|
+
re && /* @__PURE__ */ d(U, { children: [
|
|
800
838
|
/* @__PURE__ */ e(qt, { articleTitle: o.title, language: t }),
|
|
801
839
|
/* @__PURE__ */ e(
|
|
802
840
|
"h1",
|
|
803
841
|
{
|
|
804
|
-
id:
|
|
805
|
-
className:
|
|
842
|
+
id: Ve,
|
|
843
|
+
className: Ne ? D.withMetadata : void 0,
|
|
806
844
|
style: c.articleTitleFont ? { fontFamily: c.articleTitleFont } : void 0,
|
|
807
845
|
children: o.title
|
|
808
846
|
}
|
|
809
847
|
),
|
|
810
|
-
|
|
848
|
+
Ne && /* @__PURE__ */ e(pe, { date: o.date, author: o.author })
|
|
811
849
|
] }),
|
|
812
|
-
/* @__PURE__ */ e("div", { className:
|
|
813
|
-
|
|
850
|
+
/* @__PURE__ */ e("div", { className: D.mdxContent, children: /* @__PURE__ */ e(
|
|
851
|
+
rt,
|
|
814
852
|
{
|
|
815
|
-
remarkPlugins: [
|
|
853
|
+
remarkPlugins: [lt],
|
|
816
854
|
components: {
|
|
817
|
-
h1: ({ children:
|
|
818
|
-
const I = z.current++,
|
|
819
|
-
|
|
855
|
+
h1: ({ children: _ }) => {
|
|
856
|
+
const I = z.current++, M = te.current[I] || "", x = ee(M), E = !we;
|
|
857
|
+
we = !0;
|
|
820
858
|
const ne = o.date || o.author;
|
|
821
|
-
return /* @__PURE__ */
|
|
859
|
+
return /* @__PURE__ */ d(U, { children: [
|
|
822
860
|
/* @__PURE__ */ e(
|
|
823
861
|
"h1",
|
|
824
862
|
{
|
|
825
|
-
id:
|
|
826
|
-
className: E && ne && !re ?
|
|
863
|
+
id: x,
|
|
864
|
+
className: E && ne && !re ? D.withMetadata : void 0,
|
|
827
865
|
children: /* @__PURE__ */ e(
|
|
828
866
|
"a",
|
|
829
867
|
{
|
|
830
|
-
href: `#${
|
|
831
|
-
onClick: (J) => le(J,
|
|
868
|
+
href: `#${x}`,
|
|
869
|
+
onClick: (J) => le(J, x),
|
|
832
870
|
style: { color: "inherit", textDecoration: "none" },
|
|
833
|
-
children:
|
|
871
|
+
children: _
|
|
834
872
|
}
|
|
835
873
|
)
|
|
836
874
|
}
|
|
837
875
|
),
|
|
838
876
|
E && ne && !re && /* @__PURE__ */ e(
|
|
839
|
-
|
|
877
|
+
pe,
|
|
840
878
|
{
|
|
841
879
|
date: o.date,
|
|
842
880
|
author: o.author
|
|
@@ -844,251 +882,261 @@ function En({ language: t }) {
|
|
|
844
882
|
)
|
|
845
883
|
] });
|
|
846
884
|
},
|
|
847
|
-
h2: ({ children:
|
|
848
|
-
const I = z.current++,
|
|
849
|
-
return /* @__PURE__ */ e("h2", { id:
|
|
885
|
+
h2: ({ children: _ }) => {
|
|
886
|
+
const I = z.current++, M = te.current[I] || "", x = ee(M);
|
|
887
|
+
return /* @__PURE__ */ e("h2", { id: x, children: /* @__PURE__ */ e(
|
|
850
888
|
"a",
|
|
851
889
|
{
|
|
852
|
-
href: `#${
|
|
853
|
-
onClick: (E) => le(E,
|
|
890
|
+
href: `#${x}`,
|
|
891
|
+
onClick: (E) => le(E, x),
|
|
854
892
|
style: { color: "inherit", textDecoration: "none" },
|
|
855
|
-
children:
|
|
893
|
+
children: _
|
|
856
894
|
}
|
|
857
895
|
) });
|
|
858
896
|
},
|
|
859
|
-
h3: ({ children:
|
|
860
|
-
const I = z.current++,
|
|
861
|
-
return /* @__PURE__ */ e("h3", { id:
|
|
897
|
+
h3: ({ children: _ }) => {
|
|
898
|
+
const I = z.current++, M = te.current[I] || "", x = ee(M);
|
|
899
|
+
return /* @__PURE__ */ e("h3", { id: x, children: /* @__PURE__ */ e(
|
|
862
900
|
"a",
|
|
863
901
|
{
|
|
864
|
-
href: `#${
|
|
865
|
-
onClick: (E) => le(E,
|
|
902
|
+
href: `#${x}`,
|
|
903
|
+
onClick: (E) => le(E, x),
|
|
866
904
|
style: { color: "inherit", textDecoration: "none" },
|
|
867
|
-
children:
|
|
905
|
+
children: _
|
|
868
906
|
}
|
|
869
907
|
) });
|
|
870
908
|
},
|
|
871
|
-
h4: ({ children:
|
|
872
|
-
const I = z.current++,
|
|
873
|
-
return /* @__PURE__ */ e("h4", { id:
|
|
909
|
+
h4: ({ children: _ }) => {
|
|
910
|
+
const I = z.current++, M = te.current[I] || "", x = ee(M);
|
|
911
|
+
return /* @__PURE__ */ e("h4", { id: x, children: /* @__PURE__ */ e(
|
|
874
912
|
"a",
|
|
875
913
|
{
|
|
876
|
-
href: `#${
|
|
877
|
-
onClick: (E) => le(E,
|
|
914
|
+
href: `#${x}`,
|
|
915
|
+
onClick: (E) => le(E, x),
|
|
878
916
|
style: { color: "inherit", textDecoration: "none" },
|
|
879
|
-
children:
|
|
917
|
+
children: _
|
|
880
918
|
}
|
|
881
919
|
) });
|
|
882
920
|
},
|
|
883
|
-
h5: ({ children:
|
|
921
|
+
h5: ({ children: _ }) => {
|
|
884
922
|
const I = `h5-${z.current++}`;
|
|
885
|
-
return /* @__PURE__ */ e("h5", { id: I, children:
|
|
923
|
+
return /* @__PURE__ */ e("h5", { id: I, children: _ });
|
|
886
924
|
},
|
|
887
|
-
h6: ({ children:
|
|
925
|
+
h6: ({ children: _ }) => {
|
|
888
926
|
const I = `h6-${z.current++}`;
|
|
889
|
-
return /* @__PURE__ */ e("h6", { id: I, children:
|
|
927
|
+
return /* @__PURE__ */ e("h6", { id: I, children: _ });
|
|
890
928
|
},
|
|
891
|
-
p: ({ children:
|
|
892
|
-
ul: ({ children:
|
|
893
|
-
ol: ({ children:
|
|
894
|
-
li: ({ children:
|
|
895
|
-
code: ({ className:
|
|
896
|
-
if (!
|
|
897
|
-
return /* @__PURE__ */ e("code", { ...
|
|
898
|
-
const E = (
|
|
899
|
-
return /* @__PURE__ */
|
|
900
|
-
E && /* @__PURE__ */ e("div", { className:
|
|
901
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className:
|
|
929
|
+
p: ({ children: _ }) => /* @__PURE__ */ e("p", { children: _ }),
|
|
930
|
+
ul: ({ children: _ }) => /* @__PURE__ */ e("ul", { children: _ }),
|
|
931
|
+
ol: ({ children: _ }) => /* @__PURE__ */ e("ol", { children: _ }),
|
|
932
|
+
li: ({ children: _ }) => /* @__PURE__ */ e("li", { children: _ }),
|
|
933
|
+
code: ({ className: _, children: I, ...M }) => {
|
|
934
|
+
if (!_)
|
|
935
|
+
return /* @__PURE__ */ e("code", { ...M, children: I });
|
|
936
|
+
const E = (_ == null ? void 0 : _.replace("language-", "")) || "";
|
|
937
|
+
return /* @__PURE__ */ d("div", { className: D.codeBlock, children: [
|
|
938
|
+
E && /* @__PURE__ */ e("div", { className: D.codeLanguage, children: E }),
|
|
939
|
+
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: _, ...M, children: I }) })
|
|
902
940
|
] });
|
|
903
941
|
},
|
|
904
|
-
pre: ({ children:
|
|
942
|
+
pre: ({ children: _ }) => /* @__PURE__ */ e(U, { children: _ }),
|
|
905
943
|
// Let code component handle pre styling
|
|
906
|
-
blockquote: ({ children:
|
|
907
|
-
a: ({ href:
|
|
908
|
-
if (
|
|
909
|
-
const
|
|
910
|
-
|
|
944
|
+
blockquote: ({ children: _ }) => /* @__PURE__ */ e("blockquote", { children: _ }),
|
|
945
|
+
a: ({ href: _, children: I, ...M }) => {
|
|
946
|
+
if (_ != null && _.startsWith("./")) {
|
|
947
|
+
const x = _.slice(2), E = pt(
|
|
948
|
+
x,
|
|
911
949
|
t,
|
|
912
950
|
c.basePath
|
|
913
951
|
);
|
|
914
|
-
return /* @__PURE__ */ e("a", { href: E, ...
|
|
952
|
+
return /* @__PURE__ */ e("a", { href: E, ...M, children: I });
|
|
915
953
|
}
|
|
916
|
-
return
|
|
954
|
+
return _ != null && _.startsWith("http://") || _ != null && _.startsWith("https://") ? /* @__PURE__ */ e(
|
|
917
955
|
"a",
|
|
918
956
|
{
|
|
919
|
-
href:
|
|
957
|
+
href: _,
|
|
920
958
|
target: "_blank",
|
|
921
959
|
rel: "noopener noreferrer",
|
|
922
|
-
...
|
|
960
|
+
...M,
|
|
923
961
|
children: I
|
|
924
962
|
}
|
|
925
|
-
) : /* @__PURE__ */ e("a", { href:
|
|
963
|
+
) : /* @__PURE__ */ e("a", { href: _, ...M, children: I });
|
|
926
964
|
},
|
|
927
|
-
|
|
928
|
-
|
|
965
|
+
img: ({ src: _, alt: I, ...M }) => /* @__PURE__ */ e(
|
|
966
|
+
On,
|
|
967
|
+
{
|
|
968
|
+
src: _,
|
|
969
|
+
alt: I,
|
|
970
|
+
effectiveTheme: u,
|
|
971
|
+
...M
|
|
972
|
+
},
|
|
973
|
+
`${_}-${u}`
|
|
974
|
+
),
|
|
975
|
+
strong: ({ children: _ }) => /* @__PURE__ */ e("strong", { children: _ }),
|
|
976
|
+
em: ({ children: _ }) => /* @__PURE__ */ e("em", { children: _ })
|
|
929
977
|
},
|
|
930
|
-
children:
|
|
978
|
+
children: i
|
|
931
979
|
}
|
|
932
980
|
) }),
|
|
933
981
|
c.articleCTA && /* @__PURE__ */ e("div", { children: c.articleCTA }),
|
|
934
982
|
o.tags && o.tags.length > 0 && /* @__PURE__ */ e(
|
|
935
|
-
|
|
983
|
+
Cn,
|
|
936
984
|
{
|
|
937
985
|
tags: o.tags,
|
|
938
986
|
variant: "compact",
|
|
939
|
-
onTagClick: (
|
|
987
|
+
onTagClick: (_) => k(_)
|
|
940
988
|
}
|
|
941
989
|
),
|
|
942
990
|
c.showArticleNavigation && /* @__PURE__ */ e(
|
|
943
991
|
Tt,
|
|
944
992
|
{
|
|
945
|
-
prevSlug: (
|
|
946
|
-
prevTitle: (
|
|
947
|
-
nextSlug: (
|
|
948
|
-
nextTitle: (
|
|
993
|
+
prevSlug: (Ie = W.prev) == null ? void 0 : Ie.slug,
|
|
994
|
+
prevTitle: (ye = W.prev) == null ? void 0 : ye.title,
|
|
995
|
+
nextSlug: ($e = W.next) == null ? void 0 : $e.slug,
|
|
996
|
+
nextTitle: (Ce = W.next) == null ? void 0 : Ce.title,
|
|
949
997
|
language: t
|
|
950
998
|
}
|
|
951
999
|
)
|
|
952
1000
|
] }),
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1001
|
+
b && /* @__PURE__ */ e(cn, { content: i, englishContent: m }),
|
|
1002
|
+
P && ((Te = c.tagIndex) == null ? void 0 : Te[t]) && /* @__PURE__ */ e(
|
|
1003
|
+
bn,
|
|
956
1004
|
{
|
|
957
|
-
tag:
|
|
958
|
-
results: c.tagIndex[t][
|
|
1005
|
+
tag: P,
|
|
1006
|
+
results: c.tagIndex[t][P] || [],
|
|
959
1007
|
language: t,
|
|
960
|
-
onClose: () =>
|
|
1008
|
+
onClose: () => k(null)
|
|
961
1009
|
}
|
|
962
1010
|
)
|
|
963
1011
|
] });
|
|
964
1012
|
}
|
|
965
|
-
const
|
|
966
|
-
searchButton:
|
|
967
|
-
searchIcon:
|
|
968
|
-
searchHint:
|
|
969
|
-
kbd:
|
|
970
|
-
searchOverlay:
|
|
971
|
-
searchModal:
|
|
972
|
-
searchHeader:
|
|
973
|
-
searchInput:
|
|
974
|
-
closeButton:
|
|
975
|
-
searchResults:
|
|
976
|
-
resultsList:
|
|
977
|
-
resultItem:
|
|
978
|
-
selected:
|
|
979
|
-
resultTitle:
|
|
980
|
-
resultSlug:
|
|
981
|
-
noResults:
|
|
982
|
-
searchHints:
|
|
983
|
-
hint:
|
|
1013
|
+
const Wn = "_searchButton_1k9sl_1", Hn = "_searchIcon_1k9sl_17", Fn = "_searchHint_1k9sl_23", zn = "_kbd_1k9sl_27", Kn = "_searchOverlay_1k9sl_42", Un = "_searchModal_1k9sl_67", Gn = "_searchHeader_1k9sl_91", Qn = "_searchInput_1k9sl_105", Xn = "_closeButton_1k9sl_123", Yn = "_searchResults_1k9sl_144", Vn = "_resultsList_1k9sl_152", Jn = "_resultItem_1k9sl_158", Zn = "_selected_1k9sl_173", ea = "_resultTitle_1k9sl_176", ta = "_resultSlug_1k9sl_180", na = "_noResults_1k9sl_186", aa = "_searchHints_1k9sl_193", oa = "_hint_1k9sl_210", S = {
|
|
1014
|
+
searchButton: Wn,
|
|
1015
|
+
searchIcon: Hn,
|
|
1016
|
+
searchHint: Fn,
|
|
1017
|
+
kbd: zn,
|
|
1018
|
+
searchOverlay: Kn,
|
|
1019
|
+
searchModal: Un,
|
|
1020
|
+
searchHeader: Gn,
|
|
1021
|
+
searchInput: Qn,
|
|
1022
|
+
closeButton: Xn,
|
|
1023
|
+
searchResults: Yn,
|
|
1024
|
+
resultsList: Vn,
|
|
1025
|
+
resultItem: Jn,
|
|
1026
|
+
selected: Zn,
|
|
1027
|
+
resultTitle: ea,
|
|
1028
|
+
resultSlug: ta,
|
|
1029
|
+
noResults: na,
|
|
1030
|
+
searchHints: aa,
|
|
1031
|
+
hint: oa
|
|
984
1032
|
};
|
|
985
|
-
function
|
|
986
|
-
const { t: n } =
|
|
987
|
-
|
|
1033
|
+
function sa({ language: t }) {
|
|
1034
|
+
const { t: n } = A(), s = Q(), { config: c, discoverArticles: h } = R(), [l, g] = C(!1), [u, i] = C(""), [a, m] = C([]), [r, o] = C(0), [f, w] = C([]), p = G(null), N = G(null), b = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K";
|
|
1035
|
+
L(() => {
|
|
988
1036
|
(async () => {
|
|
989
1037
|
try {
|
|
990
|
-
const
|
|
1038
|
+
const j = (await h(t)).map((W) => ({
|
|
991
1039
|
title: W.title,
|
|
992
1040
|
slug: W.slug,
|
|
993
1041
|
description: W.description
|
|
994
1042
|
}));
|
|
995
|
-
w(
|
|
996
|
-
} catch (
|
|
997
|
-
console.error("Failed to build search index:",
|
|
1043
|
+
w(j);
|
|
1044
|
+
} catch (T) {
|
|
1045
|
+
console.error("Failed to build search index:", T);
|
|
998
1046
|
}
|
|
999
1047
|
})();
|
|
1000
|
-
}, [t, h]),
|
|
1001
|
-
if (!
|
|
1002
|
-
m([]),
|
|
1048
|
+
}, [t, h]), L(() => {
|
|
1049
|
+
if (!u.trim()) {
|
|
1050
|
+
m([]), o(0);
|
|
1003
1051
|
return;
|
|
1004
1052
|
}
|
|
1005
|
-
const
|
|
1006
|
-
(
|
|
1053
|
+
const k = u.toLowerCase(), T = f.filter(
|
|
1054
|
+
(j) => {
|
|
1007
1055
|
var W;
|
|
1008
|
-
return
|
|
1056
|
+
return j.title.toLowerCase().includes(k) || j.slug.toLowerCase().includes(k) || ((W = j.description) == null ? void 0 : W.toLowerCase().includes(k));
|
|
1009
1057
|
}
|
|
1010
1058
|
);
|
|
1011
|
-
m(
|
|
1012
|
-
}, [
|
|
1013
|
-
const
|
|
1014
|
-
(
|
|
1015
|
-
var
|
|
1016
|
-
return (
|
|
1017
|
-
}, 100)),
|
|
1059
|
+
m(T), o(0);
|
|
1060
|
+
}, [u, f]), L(() => {
|
|
1061
|
+
const k = (T) => {
|
|
1062
|
+
(T.metaKey || T.ctrlKey) && T.key === "k" && (T.preventDefault(), g(!0), setTimeout(() => {
|
|
1063
|
+
var j;
|
|
1064
|
+
return (j = p.current) == null ? void 0 : j.focus();
|
|
1065
|
+
}, 100)), T.key === "Escape" && l && (g(!1), i(""));
|
|
1018
1066
|
};
|
|
1019
|
-
return document.addEventListener("keydown",
|
|
1020
|
-
}, [
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
var
|
|
1024
|
-
return (
|
|
1067
|
+
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
1068
|
+
}, [l]), L(() => {
|
|
1069
|
+
const k = () => {
|
|
1070
|
+
g(!0), setTimeout(() => {
|
|
1071
|
+
var j;
|
|
1072
|
+
return (j = p.current) == null ? void 0 : j.focus();
|
|
1025
1073
|
}, 100);
|
|
1026
|
-
},
|
|
1027
|
-
|
|
1074
|
+
}, T = () => {
|
|
1075
|
+
g(!1), i("");
|
|
1028
1076
|
};
|
|
1029
|
-
return window.addEventListener("blog:open-search",
|
|
1030
|
-
window.removeEventListener("blog:open-search",
|
|
1077
|
+
return window.addEventListener("blog:open-search", k), window.addEventListener("blog:close-search", T), () => {
|
|
1078
|
+
window.removeEventListener("blog:open-search", k), window.removeEventListener("blog:close-search", T);
|
|
1031
1079
|
};
|
|
1032
1080
|
}, []);
|
|
1033
|
-
const y = (
|
|
1034
|
-
|
|
1081
|
+
const y = (k) => {
|
|
1082
|
+
k.key === "ArrowDown" ? (k.preventDefault(), o((T) => Math.min(T + 1, a.length - 1))) : k.key === "ArrowUp" ? (k.preventDefault(), o((T) => Math.max(T - 1, 0))) : k.key === "Enter" && a[r] && (k.preventDefault(), P(a[r].slug));
|
|
1035
1083
|
};
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1084
|
+
L(() => {
|
|
1085
|
+
const k = (T) => {
|
|
1086
|
+
N.current && !N.current.contains(T.target) && (g(!1), i(""));
|
|
1039
1087
|
};
|
|
1040
|
-
return
|
|
1041
|
-
}, [
|
|
1042
|
-
const P = (
|
|
1043
|
-
const
|
|
1044
|
-
s(`${
|
|
1088
|
+
return l && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
1089
|
+
}, [l]);
|
|
1090
|
+
const P = (k) => {
|
|
1091
|
+
const T = c.basePath || "";
|
|
1092
|
+
s(`${T}/${t}/${k}`), g(!1), i("");
|
|
1045
1093
|
};
|
|
1046
|
-
return /* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ d(U, { children: [
|
|
1095
|
+
/* @__PURE__ */ d(
|
|
1048
1096
|
"button",
|
|
1049
1097
|
{
|
|
1050
1098
|
type: "button",
|
|
1051
|
-
className:
|
|
1099
|
+
className: S.searchButton,
|
|
1052
1100
|
onClick: () => {
|
|
1053
|
-
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1101
|
+
g(!0), setTimeout(() => {
|
|
1102
|
+
var k;
|
|
1103
|
+
return (k = p.current) == null ? void 0 : k.focus();
|
|
1056
1104
|
}, 100);
|
|
1057
1105
|
},
|
|
1058
1106
|
"aria-label": n("ui.search"),
|
|
1059
1107
|
children: [
|
|
1060
|
-
/* @__PURE__ */ e(
|
|
1061
|
-
/* @__PURE__ */ e("span", { className:
|
|
1062
|
-
/* @__PURE__ */ e("kbd", { className:
|
|
1108
|
+
/* @__PURE__ */ e(Pe, { className: S.searchIcon }),
|
|
1109
|
+
/* @__PURE__ */ e("span", { className: S.searchHint, children: n("ui.search") }),
|
|
1110
|
+
/* @__PURE__ */ e("kbd", { className: S.kbd, children: b })
|
|
1063
1111
|
]
|
|
1064
1112
|
}
|
|
1065
1113
|
),
|
|
1066
|
-
|
|
1114
|
+
l && ze(
|
|
1067
1115
|
/* @__PURE__ */ e(
|
|
1068
1116
|
"div",
|
|
1069
1117
|
{
|
|
1070
|
-
className:
|
|
1118
|
+
className: S.searchOverlay,
|
|
1071
1119
|
onClick: () => {
|
|
1072
|
-
|
|
1120
|
+
g(!1), i("");
|
|
1073
1121
|
},
|
|
1074
|
-
children: /* @__PURE__ */
|
|
1122
|
+
children: /* @__PURE__ */ d(
|
|
1075
1123
|
"div",
|
|
1076
1124
|
{
|
|
1077
|
-
className:
|
|
1078
|
-
ref:
|
|
1079
|
-
onClick: (
|
|
1125
|
+
className: S.searchModal,
|
|
1126
|
+
ref: N,
|
|
1127
|
+
onClick: (k) => k.stopPropagation(),
|
|
1080
1128
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */ e(
|
|
1129
|
+
/* @__PURE__ */ d("div", { className: S.searchHeader, children: [
|
|
1130
|
+
/* @__PURE__ */ e(Pe, { className: S.searchIcon }),
|
|
1083
1131
|
/* @__PURE__ */ e(
|
|
1084
1132
|
"input",
|
|
1085
1133
|
{
|
|
1086
|
-
ref:
|
|
1134
|
+
ref: p,
|
|
1087
1135
|
type: "text",
|
|
1088
|
-
className:
|
|
1136
|
+
className: S.searchInput,
|
|
1089
1137
|
placeholder: n("ui.searchPlaceholder"),
|
|
1090
|
-
value:
|
|
1091
|
-
onChange: (
|
|
1138
|
+
value: u,
|
|
1139
|
+
onChange: (k) => i(k.target.value),
|
|
1092
1140
|
onKeyDown: y
|
|
1093
1141
|
}
|
|
1094
1142
|
),
|
|
@@ -1096,42 +1144,42 @@ function ea({ language: t }) {
|
|
|
1096
1144
|
"button",
|
|
1097
1145
|
{
|
|
1098
1146
|
type: "button",
|
|
1099
|
-
className:
|
|
1147
|
+
className: S.closeButton,
|
|
1100
1148
|
onClick: () => {
|
|
1101
|
-
|
|
1149
|
+
g(!1), i("");
|
|
1102
1150
|
},
|
|
1103
1151
|
"aria-label": "Close search",
|
|
1104
|
-
children: /* @__PURE__ */ e(
|
|
1152
|
+
children: /* @__PURE__ */ e(fe, {})
|
|
1105
1153
|
}
|
|
1106
1154
|
)
|
|
1107
1155
|
] }),
|
|
1108
|
-
|
|
1156
|
+
u && /* @__PURE__ */ e("div", { className: S.searchResults, children: a.length === 0 ? /* @__PURE__ */ e("div", { className: S.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: S.resultsList, children: a.map((k, T) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
1109
1157
|
"button",
|
|
1110
1158
|
{
|
|
1111
1159
|
type: "button",
|
|
1112
|
-
className: `${
|
|
1113
|
-
onClick: () => P(
|
|
1114
|
-
onMouseEnter: () =>
|
|
1160
|
+
className: `${S.resultItem} ${T === r ? S.selected : ""}`,
|
|
1161
|
+
onClick: () => P(k.slug),
|
|
1162
|
+
onMouseEnter: () => o(T),
|
|
1115
1163
|
children: [
|
|
1116
|
-
/* @__PURE__ */ e("div", { className:
|
|
1117
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ e("div", { className: S.resultTitle, children: k.title }),
|
|
1165
|
+
/* @__PURE__ */ d("div", { className: S.resultSlug, children: [
|
|
1118
1166
|
"/",
|
|
1119
|
-
|
|
1167
|
+
k.slug
|
|
1120
1168
|
] })
|
|
1121
1169
|
]
|
|
1122
1170
|
}
|
|
1123
|
-
) },
|
|
1124
|
-
!
|
|
1125
|
-
/* @__PURE__ */
|
|
1171
|
+
) }, k.slug)) }) }),
|
|
1172
|
+
!u && /* @__PURE__ */ d("div", { className: S.searchHints, children: [
|
|
1173
|
+
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
1126
1174
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
1127
1175
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
1128
1176
|
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
1129
1177
|
] }),
|
|
1130
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
1131
1179
|
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
1132
1180
|
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
1133
1181
|
] }),
|
|
1134
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ d("div", { className: S.hint, children: [
|
|
1135
1183
|
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
1136
1184
|
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
1137
1185
|
] })
|
|
@@ -1145,36 +1193,36 @@ function ea({ language: t }) {
|
|
|
1145
1193
|
)
|
|
1146
1194
|
] });
|
|
1147
1195
|
}
|
|
1148
|
-
const
|
|
1149
|
-
header:
|
|
1150
|
-
container:
|
|
1151
|
-
content:
|
|
1152
|
-
leftSection:
|
|
1153
|
-
mobileMenuButton:
|
|
1154
|
-
burgerIcon:
|
|
1155
|
-
logo:
|
|
1156
|
-
nav:
|
|
1157
|
-
navLink:
|
|
1158
|
-
externalIcon:
|
|
1159
|
-
supportDropdown:
|
|
1160
|
-
themeDropdown:
|
|
1161
|
-
themeButton:
|
|
1162
|
-
themeIcon:
|
|
1163
|
-
supportButton:
|
|
1164
|
-
caretIcon:
|
|
1165
|
-
dropdownMenu:
|
|
1166
|
-
dropdownItem:
|
|
1167
|
-
dropdownIcon:
|
|
1196
|
+
const ca = "_header_jrobc_1", ra = "_container_jrobc_24", la = "_content_jrobc_36", ia = "_leftSection_jrobc_43", da = "_mobileMenuButton_jrobc_49", ua = "_burgerIcon_jrobc_87", ha = "_logo_jrobc_92", ma = "_nav_jrobc_98", ga = "_navLink_jrobc_109", _a = "_externalIcon_jrobc_135", pa = "_supportDropdown_jrobc_141", va = "_themeDropdown_jrobc_145", fa = "_themeButton_jrobc_149", ba = "_themeIcon_jrobc_171", ka = "_supportButton_jrobc_177", Na = "_caretIcon_jrobc_198", wa = "_dropdownMenu_jrobc_208", Ia = "_dropdownItem_jrobc_221", ya = "_dropdownIcon_jrobc_244", $ = {
|
|
1197
|
+
header: ca,
|
|
1198
|
+
container: ra,
|
|
1199
|
+
content: la,
|
|
1200
|
+
leftSection: ia,
|
|
1201
|
+
mobileMenuButton: da,
|
|
1202
|
+
burgerIcon: ua,
|
|
1203
|
+
logo: ha,
|
|
1204
|
+
nav: ma,
|
|
1205
|
+
navLink: ga,
|
|
1206
|
+
externalIcon: _a,
|
|
1207
|
+
supportDropdown: pa,
|
|
1208
|
+
themeDropdown: va,
|
|
1209
|
+
themeButton: fa,
|
|
1210
|
+
themeIcon: ba,
|
|
1211
|
+
supportButton: ka,
|
|
1212
|
+
caretIcon: Na,
|
|
1213
|
+
dropdownMenu: wa,
|
|
1214
|
+
dropdownItem: Ia,
|
|
1215
|
+
dropdownIcon: ya
|
|
1168
1216
|
};
|
|
1169
|
-
function
|
|
1170
|
-
const { t: n, i18n: s } =
|
|
1171
|
-
return
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1217
|
+
function $a({ onMobileMenuToggle: t }) {
|
|
1218
|
+
const { t: n, i18n: s } = A(), { config: c } = R(), h = c.header ?? {}, l = h.navLinks ?? [], g = h.dropdownItems ?? [], [u, i] = C(!1), [a, m] = C(!1), { theme: r, setTheme: o } = Qe(), f = G(null), w = G(null);
|
|
1219
|
+
return L(() => {
|
|
1220
|
+
const p = (N) => {
|
|
1221
|
+
f.current && !f.current.contains(N.target) && i(!1), w.current && !w.current.contains(N.target) && m(!1);
|
|
1174
1222
|
};
|
|
1175
|
-
return document.addEventListener("mousedown",
|
|
1176
|
-
}, []), /* @__PURE__ */ e("header", { className: $.header, children: /* @__PURE__ */ e("div", { className: $.container, children: /* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1223
|
+
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
1224
|
+
}, []), /* @__PURE__ */ e("header", { className: $.header, children: /* @__PURE__ */ e("div", { className: $.container, children: /* @__PURE__ */ d("div", { className: $.content, children: [
|
|
1225
|
+
/* @__PURE__ */ d("div", { className: $.leftSection, children: [
|
|
1178
1226
|
/* @__PURE__ */ e(
|
|
1179
1227
|
"button",
|
|
1180
1228
|
{
|
|
@@ -1182,15 +1230,15 @@ function ka({ onMobileMenuToggle: t }) {
|
|
|
1182
1230
|
className: $.mobileMenuButton,
|
|
1183
1231
|
onClick: t,
|
|
1184
1232
|
"aria-label": "Open menu",
|
|
1185
|
-
children: /* @__PURE__ */ e(
|
|
1233
|
+
children: /* @__PURE__ */ e(st, { className: $.burgerIcon })
|
|
1186
1234
|
}
|
|
1187
1235
|
),
|
|
1188
1236
|
/* @__PURE__ */ e("div", { className: $.logo })
|
|
1189
1237
|
] }),
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */ e(
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ d("nav", { className: $.nav, children: [
|
|
1239
|
+
/* @__PURE__ */ e(sa, { language: s.language }),
|
|
1240
|
+
/* @__PURE__ */ d("div", { className: $.themeDropdown, ref: w, children: [
|
|
1241
|
+
/* @__PURE__ */ d(
|
|
1194
1242
|
"button",
|
|
1195
1243
|
{
|
|
1196
1244
|
type: "button",
|
|
@@ -1200,66 +1248,66 @@ function ka({ onMobileMenuToggle: t }) {
|
|
|
1200
1248
|
"aria-haspopup": "true",
|
|
1201
1249
|
"aria-label": n("ui.theme"),
|
|
1202
1250
|
children: [
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1251
|
+
r === "light" && /* @__PURE__ */ e(Me, { className: $.themeIcon }),
|
|
1252
|
+
r === "dark" && /* @__PURE__ */ e(Be, { className: $.themeIcon }),
|
|
1253
|
+
r === "system" && /* @__PURE__ */ e(je, { className: $.themeIcon }),
|
|
1206
1254
|
/* @__PURE__ */ e(_e, { className: $.caretIcon })
|
|
1207
1255
|
]
|
|
1208
1256
|
}
|
|
1209
1257
|
),
|
|
1210
|
-
a && /* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */
|
|
1258
|
+
a && /* @__PURE__ */ d("div", { className: $.dropdownMenu, children: [
|
|
1259
|
+
/* @__PURE__ */ d(
|
|
1212
1260
|
"button",
|
|
1213
1261
|
{
|
|
1214
1262
|
type: "button",
|
|
1215
1263
|
onClick: () => {
|
|
1216
|
-
|
|
1264
|
+
o("light"), m(!1);
|
|
1217
1265
|
},
|
|
1218
1266
|
className: $.dropdownItem,
|
|
1219
1267
|
children: [
|
|
1220
|
-
/* @__PURE__ */ e(
|
|
1268
|
+
/* @__PURE__ */ e(Me, { className: $.dropdownIcon }),
|
|
1221
1269
|
n("ui.light")
|
|
1222
1270
|
]
|
|
1223
1271
|
}
|
|
1224
1272
|
),
|
|
1225
|
-
/* @__PURE__ */
|
|
1273
|
+
/* @__PURE__ */ d(
|
|
1226
1274
|
"button",
|
|
1227
1275
|
{
|
|
1228
1276
|
type: "button",
|
|
1229
1277
|
onClick: () => {
|
|
1230
|
-
|
|
1278
|
+
o("dark"), m(!1);
|
|
1231
1279
|
},
|
|
1232
1280
|
className: $.dropdownItem,
|
|
1233
1281
|
children: [
|
|
1234
|
-
/* @__PURE__ */ e(
|
|
1282
|
+
/* @__PURE__ */ e(Be, { className: $.dropdownIcon }),
|
|
1235
1283
|
n("ui.dark")
|
|
1236
1284
|
]
|
|
1237
1285
|
}
|
|
1238
1286
|
),
|
|
1239
|
-
/* @__PURE__ */
|
|
1287
|
+
/* @__PURE__ */ d(
|
|
1240
1288
|
"button",
|
|
1241
1289
|
{
|
|
1242
1290
|
type: "button",
|
|
1243
1291
|
onClick: () => {
|
|
1244
|
-
|
|
1292
|
+
o("system"), m(!1);
|
|
1245
1293
|
},
|
|
1246
1294
|
className: $.dropdownItem,
|
|
1247
1295
|
children: [
|
|
1248
|
-
/* @__PURE__ */ e(
|
|
1296
|
+
/* @__PURE__ */ e(je, { className: $.dropdownIcon }),
|
|
1249
1297
|
n("ui.system")
|
|
1250
1298
|
]
|
|
1251
1299
|
}
|
|
1252
1300
|
)
|
|
1253
1301
|
] })
|
|
1254
1302
|
] }),
|
|
1255
|
-
|
|
1256
|
-
/* @__PURE__ */
|
|
1303
|
+
g.length > 0 && /* @__PURE__ */ d("div", { className: $.supportDropdown, ref: f, children: [
|
|
1304
|
+
/* @__PURE__ */ d(
|
|
1257
1305
|
"button",
|
|
1258
1306
|
{
|
|
1259
1307
|
type: "button",
|
|
1260
1308
|
className: $.supportButton,
|
|
1261
|
-
onClick: () =>
|
|
1262
|
-
"aria-expanded":
|
|
1309
|
+
onClick: () => i(!u),
|
|
1310
|
+
"aria-expanded": u,
|
|
1263
1311
|
"aria-haspopup": "true",
|
|
1264
1312
|
children: [
|
|
1265
1313
|
n("ui.support"),
|
|
@@ -1267,242 +1315,242 @@ function ka({ onMobileMenuToggle: t }) {
|
|
|
1267
1315
|
]
|
|
1268
1316
|
}
|
|
1269
1317
|
),
|
|
1270
|
-
|
|
1271
|
-
const
|
|
1272
|
-
return /* @__PURE__ */
|
|
1318
|
+
u && /* @__PURE__ */ e("div", { className: $.dropdownMenu, children: g.map((p, N) => {
|
|
1319
|
+
const v = p.target ?? (p.url.startsWith("http") ? "_blank" : "_self"), b = p.rel ?? (v === "_blank" ? "noopener noreferrer" : void 0), y = p.icon;
|
|
1320
|
+
return /* @__PURE__ */ d(
|
|
1273
1321
|
"a",
|
|
1274
1322
|
{
|
|
1275
|
-
href:
|
|
1276
|
-
target:
|
|
1323
|
+
href: p.url,
|
|
1324
|
+
target: v,
|
|
1277
1325
|
rel: b,
|
|
1278
1326
|
className: $.dropdownItem,
|
|
1279
1327
|
children: [
|
|
1280
1328
|
y && /* @__PURE__ */ e(y, { className: $.dropdownIcon }),
|
|
1281
|
-
|
|
1329
|
+
p.label
|
|
1282
1330
|
]
|
|
1283
1331
|
},
|
|
1284
|
-
|
|
1332
|
+
N
|
|
1285
1333
|
);
|
|
1286
1334
|
}) })
|
|
1287
1335
|
] }),
|
|
1288
|
-
|
|
1289
|
-
const
|
|
1290
|
-
return /* @__PURE__ */
|
|
1336
|
+
l.map((p, N) => {
|
|
1337
|
+
const v = p.target ?? (typeof p.url == "string" && p.url.startsWith("http") ? "_blank" : "_self"), b = p.rel ?? (v === "_blank" ? "noopener noreferrer" : void 0), y = p.icon;
|
|
1338
|
+
return /* @__PURE__ */ d(
|
|
1291
1339
|
"a",
|
|
1292
1340
|
{
|
|
1293
|
-
href:
|
|
1294
|
-
target:
|
|
1341
|
+
href: p.url,
|
|
1342
|
+
target: v,
|
|
1295
1343
|
rel: b,
|
|
1296
|
-
className:
|
|
1344
|
+
className: p.className ?? $.navLink,
|
|
1297
1345
|
children: [
|
|
1298
|
-
|
|
1346
|
+
p.label,
|
|
1299
1347
|
y && /* @__PURE__ */ e(y, { className: $.externalIcon })
|
|
1300
1348
|
]
|
|
1301
1349
|
},
|
|
1302
|
-
|
|
1350
|
+
N
|
|
1303
1351
|
);
|
|
1304
1352
|
})
|
|
1305
1353
|
] })
|
|
1306
1354
|
] }) }) });
|
|
1307
1355
|
}
|
|
1308
|
-
function
|
|
1356
|
+
function be({
|
|
1309
1357
|
styles: t,
|
|
1310
1358
|
onLanguageChange: n
|
|
1311
1359
|
}) {
|
|
1312
|
-
const { i18n: s } =
|
|
1313
|
-
const
|
|
1360
|
+
const { i18n: s } = A(), c = Y(), h = Q(), { config: l } = R(), [g, u] = C(!1), i = G(null), a = s.language, m = (o) => {
|
|
1361
|
+
const f = l.basePath || "";
|
|
1314
1362
|
let w = c.pathname;
|
|
1315
|
-
|
|
1316
|
-
const
|
|
1317
|
-
let
|
|
1318
|
-
|
|
1319
|
-
const b =
|
|
1320
|
-
s.changeLanguage(
|
|
1363
|
+
f && w.startsWith(f) && (w = w.slice(f.length));
|
|
1364
|
+
const p = w.split("/").filter(Boolean), N = p[0];
|
|
1365
|
+
let v = "";
|
|
1366
|
+
l.supportedLanguages.includes(N) ? (p[0] = o, v = `${f}/${p.join("/")}`) : v = `${f}/${o}${w}`;
|
|
1367
|
+
const b = v + c.search + c.hash;
|
|
1368
|
+
s.changeLanguage(o), h(b), u(!1), n == null || n();
|
|
1321
1369
|
};
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1370
|
+
L(() => {
|
|
1371
|
+
const o = (f) => {
|
|
1372
|
+
i.current && !i.current.contains(f.target) && u(!1);
|
|
1325
1373
|
};
|
|
1326
|
-
return document.addEventListener("mousedown",
|
|
1374
|
+
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
1327
1375
|
}, []);
|
|
1328
|
-
const
|
|
1329
|
-
return /* @__PURE__ */
|
|
1330
|
-
/* @__PURE__ */
|
|
1376
|
+
const r = (o) => s.getFixedT(o)("language") || o;
|
|
1377
|
+
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref: i, children: [
|
|
1378
|
+
/* @__PURE__ */ d(
|
|
1331
1379
|
"button",
|
|
1332
1380
|
{
|
|
1333
1381
|
type: "button",
|
|
1334
1382
|
className: t.languageButton,
|
|
1335
|
-
onClick: () =>
|
|
1336
|
-
"aria-expanded":
|
|
1383
|
+
onClick: () => u(!g),
|
|
1384
|
+
"aria-expanded": g,
|
|
1337
1385
|
"aria-haspopup": "listbox",
|
|
1338
1386
|
children: [
|
|
1339
|
-
/* @__PURE__ */ e(
|
|
1340
|
-
|
|
1387
|
+
/* @__PURE__ */ e(ct, { className: t.icon }),
|
|
1388
|
+
r(a),
|
|
1341
1389
|
/* @__PURE__ */ e(_e, { className: t.chevron })
|
|
1342
1390
|
]
|
|
1343
1391
|
}
|
|
1344
1392
|
),
|
|
1345
|
-
|
|
1393
|
+
g && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: l.supportedLanguages.map((o) => /* @__PURE__ */ e(
|
|
1346
1394
|
"button",
|
|
1347
1395
|
{
|
|
1348
1396
|
type: "button",
|
|
1349
|
-
className: `${t.languageOption} ${
|
|
1350
|
-
onClick: () => m(
|
|
1397
|
+
className: `${t.languageOption} ${o === a ? t.selected : ""}`,
|
|
1398
|
+
onClick: () => m(o),
|
|
1351
1399
|
role: "option",
|
|
1352
|
-
"aria-selected":
|
|
1353
|
-
children: o
|
|
1400
|
+
"aria-selected": o === a,
|
|
1401
|
+
children: r(o)
|
|
1354
1402
|
},
|
|
1355
|
-
|
|
1403
|
+
o
|
|
1356
1404
|
)) })
|
|
1357
1405
|
] });
|
|
1358
1406
|
}
|
|
1359
|
-
function
|
|
1360
|
-
const { i18n: s } =
|
|
1361
|
-
|
|
1407
|
+
function ke({ styles: t, onLinkClick: n }) {
|
|
1408
|
+
const { i18n: s } = A(), c = Y(), { config: h, loadContent: l } = R(), [g, u] = C([]), [i, a] = C({}), [m, r] = C(!0), o = s.language;
|
|
1409
|
+
L(() => {
|
|
1362
1410
|
(async () => {
|
|
1363
1411
|
if (!h.navigationData) {
|
|
1364
|
-
|
|
1412
|
+
r(!1);
|
|
1365
1413
|
return;
|
|
1366
1414
|
}
|
|
1367
1415
|
try {
|
|
1368
|
-
const b = await
|
|
1416
|
+
const b = await Ht(
|
|
1369
1417
|
h.navigationData,
|
|
1370
|
-
|
|
1371
|
-
|
|
1418
|
+
o,
|
|
1419
|
+
l
|
|
1372
1420
|
), y = b.reduce(
|
|
1373
|
-
(P,
|
|
1374
|
-
if (
|
|
1375
|
-
const
|
|
1376
|
-
P[
|
|
1421
|
+
(P, k, T) => {
|
|
1422
|
+
if (Re(k)) {
|
|
1423
|
+
const j = h.navigationData[T], W = "items" in j && j.defaultOpen === !0;
|
|
1424
|
+
P[k.title] = W;
|
|
1377
1425
|
}
|
|
1378
1426
|
return P;
|
|
1379
1427
|
},
|
|
1380
1428
|
{}
|
|
1381
1429
|
);
|
|
1382
|
-
a(y),
|
|
1430
|
+
a(y), u(b), r(!1);
|
|
1383
1431
|
} catch (b) {
|
|
1384
|
-
console.error("Failed to load navigation data:", b),
|
|
1432
|
+
console.error("Failed to load navigation data:", b), r(!1);
|
|
1385
1433
|
}
|
|
1386
1434
|
})();
|
|
1387
|
-
}, [
|
|
1388
|
-
const
|
|
1435
|
+
}, [o, h.navigationData, l]);
|
|
1436
|
+
const f = (v) => {
|
|
1389
1437
|
a((b) => ({
|
|
1390
1438
|
...b,
|
|
1391
|
-
[
|
|
1439
|
+
[v]: !b[v]
|
|
1392
1440
|
}));
|
|
1393
|
-
}, w = (
|
|
1441
|
+
}, w = (v) => {
|
|
1394
1442
|
const b = h.basePath || "";
|
|
1395
1443
|
let y = c.pathname;
|
|
1396
1444
|
b && y.startsWith(b) && (y = y.slice(b.length));
|
|
1397
1445
|
const P = y.split("/").filter(Boolean);
|
|
1398
|
-
return P[P.length - 1] ===
|
|
1399
|
-
},
|
|
1446
|
+
return P[P.length - 1] === v;
|
|
1447
|
+
}, p = (v) => {
|
|
1400
1448
|
const b = h.basePath || "";
|
|
1401
1449
|
let y = c.pathname;
|
|
1402
1450
|
b && y.startsWith(b) && (y = y.slice(b.length));
|
|
1403
1451
|
const P = y.split("/").filter(Boolean);
|
|
1404
|
-
return P[0] && h.supportedLanguages.includes(P[0]) ? `${b}/${P[0]}/${
|
|
1405
|
-
},
|
|
1452
|
+
return P[0] && h.supportedLanguages.includes(P[0]) ? `${b}/${P[0]}/${v}` : `${b}/${o}/${v}`;
|
|
1453
|
+
}, N = () => {
|
|
1406
1454
|
n == null || n();
|
|
1407
1455
|
};
|
|
1408
|
-
return m ? /* @__PURE__ */
|
|
1409
|
-
/* @__PURE__ */
|
|
1456
|
+
return m ? /* @__PURE__ */ d("div", { className: t.navigation, children: [
|
|
1457
|
+
/* @__PURE__ */ d("div", { className: t.skeletonSection, children: [
|
|
1410
1458
|
/* @__PURE__ */ e("div", { className: t.skeletonSectionTitle }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ d("div", { className: t.skeletonSectionItems, children: [
|
|
1412
1460
|
/* @__PURE__ */ e("div", { className: t.skeletonItem }),
|
|
1413
1461
|
/* @__PURE__ */ e("div", { className: t.skeletonItem })
|
|
1414
1462
|
] })
|
|
1415
1463
|
] }),
|
|
1416
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ d("div", { className: t.skeletonSection, children: [
|
|
1417
1465
|
/* @__PURE__ */ e("div", { className: t.skeletonSectionTitle }),
|
|
1418
|
-
/* @__PURE__ */
|
|
1466
|
+
/* @__PURE__ */ d("div", { className: t.skeletonSectionItems, children: [
|
|
1419
1467
|
/* @__PURE__ */ e("div", { className: t.skeletonItem }),
|
|
1420
1468
|
/* @__PURE__ */ e("div", { className: t.skeletonItem })
|
|
1421
1469
|
] })
|
|
1422
1470
|
] })
|
|
1423
|
-
] }) : /* @__PURE__ */ e("div", { className: t.navigation, children:
|
|
1424
|
-
/* @__PURE__ */
|
|
1471
|
+
] }) : /* @__PURE__ */ e("div", { className: t.navigation, children: g.map((v) => Re(v) ? /* @__PURE__ */ d("div", { className: t.section, children: [
|
|
1472
|
+
/* @__PURE__ */ d(
|
|
1425
1473
|
"button",
|
|
1426
1474
|
{
|
|
1427
1475
|
type: "button",
|
|
1428
|
-
className: `${t.sectionButton} ${
|
|
1429
|
-
onClick: () => v
|
|
1476
|
+
className: `${t.sectionButton} ${i[v.title] ? t.expanded : ""}`,
|
|
1477
|
+
onClick: () => f(v.title),
|
|
1430
1478
|
children: [
|
|
1431
|
-
|
|
1432
|
-
/* @__PURE__ */ e(
|
|
1479
|
+
v.title,
|
|
1480
|
+
/* @__PURE__ */ e(We, { className: t.icon })
|
|
1433
1481
|
]
|
|
1434
1482
|
}
|
|
1435
1483
|
),
|
|
1436
|
-
|
|
1484
|
+
i[v.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: v.items.map((b) => /* @__PURE__ */ e(
|
|
1437
1485
|
de,
|
|
1438
1486
|
{
|
|
1439
|
-
to:
|
|
1487
|
+
to: p(b.slug),
|
|
1440
1488
|
className: `${t.navItem} ${w(b.slug) ? t.active : ""}`,
|
|
1441
|
-
onClick:
|
|
1489
|
+
onClick: N,
|
|
1442
1490
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: b.title }) })
|
|
1443
1491
|
},
|
|
1444
1492
|
b.slug
|
|
1445
1493
|
)) })
|
|
1446
|
-
] },
|
|
1494
|
+
] }, v.title) : /* @__PURE__ */ e(
|
|
1447
1495
|
de,
|
|
1448
1496
|
{
|
|
1449
|
-
to:
|
|
1450
|
-
className: `${t.navItem} ${w(
|
|
1451
|
-
onClick:
|
|
1452
|
-
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children:
|
|
1497
|
+
to: p(v.slug),
|
|
1498
|
+
className: `${t.navItem} ${w(v.slug) ? t.active : ""}`,
|
|
1499
|
+
onClick: N,
|
|
1500
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: v.title }) })
|
|
1453
1501
|
},
|
|
1454
|
-
|
|
1502
|
+
v.slug
|
|
1455
1503
|
)) });
|
|
1456
1504
|
}
|
|
1457
|
-
function
|
|
1505
|
+
function os({
|
|
1458
1506
|
styles: t,
|
|
1459
1507
|
onLinkClick: n,
|
|
1460
1508
|
onLanguageChange: s
|
|
1461
1509
|
}) {
|
|
1462
|
-
return /* @__PURE__ */
|
|
1463
|
-
/* @__PURE__ */ e(
|
|
1464
|
-
/* @__PURE__ */ e(
|
|
1510
|
+
return /* @__PURE__ */ d(U, { children: [
|
|
1511
|
+
/* @__PURE__ */ e(be, { styles: t, onLanguageChange: s }),
|
|
1512
|
+
/* @__PURE__ */ e(ke, { styles: t, onLinkClick: n })
|
|
1465
1513
|
] });
|
|
1466
1514
|
}
|
|
1467
|
-
const
|
|
1468
|
-
backdrop:
|
|
1469
|
-
open:
|
|
1470
|
-
mobileMenu:
|
|
1471
|
-
header:
|
|
1472
|
-
brand:
|
|
1473
|
-
cloudIcon:
|
|
1474
|
-
title:
|
|
1475
|
-
closeButton:
|
|
1476
|
-
closeIcon:
|
|
1477
|
-
languageSection:
|
|
1478
|
-
languageSelect:
|
|
1479
|
-
languageButton:
|
|
1480
|
-
icon:
|
|
1481
|
-
chevron:
|
|
1482
|
-
languageDropdown:
|
|
1483
|
-
languageOption:
|
|
1484
|
-
selected:
|
|
1485
|
-
scrollArea:
|
|
1486
|
-
navigation:
|
|
1487
|
-
section:
|
|
1488
|
-
sectionButton:
|
|
1489
|
-
expanded:
|
|
1490
|
-
sectionItems:
|
|
1491
|
-
navItem:
|
|
1492
|
-
active:
|
|
1493
|
-
navItemContent:
|
|
1494
|
-
navItemTitle:
|
|
1515
|
+
const Ca = "_backdrop_1a7pu_1", Ta = "_open_1a7pu_13", xa = "_mobileMenu_1a7pu_18", La = "_header_1a7pu_37", Sa = "_brand_1a7pu_46", Pa = "_cloudIcon_1a7pu_53", Ma = "_title_1a7pu_62", Ba = "_closeButton_1a7pu_69", ja = "_closeIcon_1a7pu_101", Ea = "_languageSection_1a7pu_106", Da = "_languageSelect_1a7pu_112", Aa = "_languageButton_1a7pu_117", Ra = "_icon_1a7pu_156", Oa = "_chevron_1a7pu_162", qa = "_languageDropdown_1a7pu_172", Wa = "_languageOption_1a7pu_185", Ha = "_selected_1a7pu_226", Fa = "_scrollArea_1a7pu_231", za = "_navigation_1a7pu_237", Ka = "_section_1a7pu_241", Ua = "_sectionButton_1a7pu_245", Ga = "_expanded_1a7pu_285", Qa = "_sectionItems_1a7pu_289", Xa = "_navItem_1a7pu_297", Ya = "_active_1a7pu_310", Va = "_navItemContent_1a7pu_316", Ja = "_navItemTitle_1a7pu_322", q = {
|
|
1516
|
+
backdrop: Ca,
|
|
1517
|
+
open: Ta,
|
|
1518
|
+
mobileMenu: xa,
|
|
1519
|
+
header: La,
|
|
1520
|
+
brand: Sa,
|
|
1521
|
+
cloudIcon: Pa,
|
|
1522
|
+
title: Ma,
|
|
1523
|
+
closeButton: Ba,
|
|
1524
|
+
closeIcon: ja,
|
|
1525
|
+
languageSection: Ea,
|
|
1526
|
+
languageSelect: Da,
|
|
1527
|
+
languageButton: Aa,
|
|
1528
|
+
icon: Ra,
|
|
1529
|
+
chevron: Oa,
|
|
1530
|
+
languageDropdown: qa,
|
|
1531
|
+
languageOption: Wa,
|
|
1532
|
+
selected: Ha,
|
|
1533
|
+
scrollArea: Fa,
|
|
1534
|
+
navigation: za,
|
|
1535
|
+
section: Ka,
|
|
1536
|
+
sectionButton: Ua,
|
|
1537
|
+
expanded: Ga,
|
|
1538
|
+
sectionItems: Qa,
|
|
1539
|
+
navItem: Xa,
|
|
1540
|
+
active: Ya,
|
|
1541
|
+
navItemContent: Va,
|
|
1542
|
+
navItemTitle: Ja
|
|
1495
1543
|
};
|
|
1496
|
-
function
|
|
1544
|
+
function Za({ isOpen: t, onClose: n }) {
|
|
1497
1545
|
const { config: s } = R(), c = s.logo;
|
|
1498
|
-
return
|
|
1546
|
+
return L(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1499
1547
|
document.body.style.overflow = "unset";
|
|
1500
|
-
}), [t]),
|
|
1501
|
-
const h = (
|
|
1502
|
-
|
|
1548
|
+
}), [t]), L(() => {
|
|
1549
|
+
const h = (l) => {
|
|
1550
|
+
l.key === "Escape" && t && n();
|
|
1503
1551
|
};
|
|
1504
1552
|
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
1505
|
-
}, [t, n]), /* @__PURE__ */
|
|
1553
|
+
}, [t, n]), /* @__PURE__ */ d(U, { children: [
|
|
1506
1554
|
/* @__PURE__ */ e(
|
|
1507
1555
|
"div",
|
|
1508
1556
|
{
|
|
@@ -1510,9 +1558,9 @@ function Qa({ isOpen: t, onClose: n }) {
|
|
|
1510
1558
|
onClick: n
|
|
1511
1559
|
}
|
|
1512
1560
|
),
|
|
1513
|
-
/* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */
|
|
1515
|
-
/* @__PURE__ */
|
|
1561
|
+
/* @__PURE__ */ d("div", { className: `${q.mobileMenu} ${t ? q.open : ""}`, children: [
|
|
1562
|
+
/* @__PURE__ */ d("div", { className: q.header, children: [
|
|
1563
|
+
/* @__PURE__ */ d("div", { className: q.brand, children: [
|
|
1516
1564
|
c && /* @__PURE__ */ e(c, { className: q.cloudIcon }),
|
|
1517
1565
|
/* @__PURE__ */ e("h1", { className: q.title, children: s.title })
|
|
1518
1566
|
] }),
|
|
@@ -1523,82 +1571,82 @@ function Qa({ isOpen: t, onClose: n }) {
|
|
|
1523
1571
|
className: q.closeButton,
|
|
1524
1572
|
onClick: n,
|
|
1525
1573
|
"aria-label": "Close menu",
|
|
1526
|
-
children: /* @__PURE__ */ e(
|
|
1574
|
+
children: /* @__PURE__ */ e(fe, { className: q.closeIcon })
|
|
1527
1575
|
}
|
|
1528
1576
|
)
|
|
1529
1577
|
] }),
|
|
1530
|
-
/* @__PURE__ */ e("div", { className: q.languageSection, children: /* @__PURE__ */ e(
|
|
1531
|
-
/* @__PURE__ */ e("div", { className: q.scrollArea, children: /* @__PURE__ */ e(
|
|
1578
|
+
/* @__PURE__ */ e("div", { className: q.languageSection, children: /* @__PURE__ */ e(be, { styles: q, onLanguageChange: n }) }),
|
|
1579
|
+
/* @__PURE__ */ e("div", { className: q.scrollArea, children: /* @__PURE__ */ e(ke, { styles: q, onLinkClick: n }) })
|
|
1532
1580
|
] })
|
|
1533
1581
|
] });
|
|
1534
1582
|
}
|
|
1535
|
-
const
|
|
1536
|
-
sidebar:
|
|
1537
|
-
header:
|
|
1538
|
-
brand:
|
|
1539
|
-
cloudIcon:
|
|
1540
|
-
title:
|
|
1541
|
-
languageSelect:
|
|
1542
|
-
languageButton:
|
|
1543
|
-
icon:
|
|
1544
|
-
chevron:
|
|
1545
|
-
languageDropdown:
|
|
1546
|
-
languageOption:
|
|
1547
|
-
selected:
|
|
1548
|
-
scrollArea:
|
|
1549
|
-
navigation:
|
|
1550
|
-
section:
|
|
1551
|
-
sectionButton:
|
|
1552
|
-
expanded:
|
|
1553
|
-
sectionItems:
|
|
1554
|
-
navItem:
|
|
1555
|
-
active:
|
|
1556
|
-
navItemContent:
|
|
1557
|
-
skeletonSection:
|
|
1558
|
-
skeletonSectionTitle:
|
|
1583
|
+
const eo = "_sidebar_1qgjy_1", to = "_header_1qgjy_17", no = "_brand_1qgjy_29", ao = "_cloudIcon_1qgjy_35", oo = "_title_1qgjy_44", so = "_languageSelect_1qgjy_55", co = "_languageButton_1qgjy_61", ro = "_icon_1qgjy_99", lo = "_chevron_1qgjy_104", io = "_languageDropdown_1qgjy_114", uo = "_languageOption_1qgjy_128", ho = "_selected_1qgjy_147", mo = "_scrollArea_1qgjy_152", go = "_navigation_1qgjy_158", _o = "_section_1qgjy_164", po = "_sectionButton_1qgjy_170", vo = "_expanded_1qgjy_213", fo = "_sectionItems_1qgjy_217", bo = "_navItem_1qgjy_225", ko = "_active_1qgjy_238", No = "_navItemContent_1qgjy_243", wo = "_skeletonSection_1qgjy_267", Io = "_skeletonSectionTitle_1qgjy_274", yo = "_skeleton-loading_1qgjy_1", $o = "_skeletonSectionItems_1qgjy_294", Co = "_skeletonItem_1qgjy_302", K = {
|
|
1584
|
+
sidebar: eo,
|
|
1585
|
+
header: to,
|
|
1586
|
+
brand: no,
|
|
1587
|
+
cloudIcon: ao,
|
|
1588
|
+
title: oo,
|
|
1589
|
+
languageSelect: so,
|
|
1590
|
+
languageButton: co,
|
|
1591
|
+
icon: ro,
|
|
1592
|
+
chevron: lo,
|
|
1593
|
+
languageDropdown: io,
|
|
1594
|
+
languageOption: uo,
|
|
1595
|
+
selected: ho,
|
|
1596
|
+
scrollArea: mo,
|
|
1597
|
+
navigation: go,
|
|
1598
|
+
section: _o,
|
|
1599
|
+
sectionButton: po,
|
|
1600
|
+
expanded: vo,
|
|
1601
|
+
sectionItems: fo,
|
|
1602
|
+
navItem: bo,
|
|
1603
|
+
active: ko,
|
|
1604
|
+
navItemContent: No,
|
|
1605
|
+
skeletonSection: wo,
|
|
1606
|
+
skeletonSectionTitle: Io,
|
|
1559
1607
|
"skeleton-loading": "_skeleton-loading_1qgjy_1",
|
|
1560
|
-
skeletonLoading:
|
|
1561
|
-
skeletonSectionItems:
|
|
1562
|
-
skeletonItem:
|
|
1608
|
+
skeletonLoading: yo,
|
|
1609
|
+
skeletonSectionItems: $o,
|
|
1610
|
+
skeletonItem: Co
|
|
1563
1611
|
};
|
|
1564
|
-
function
|
|
1612
|
+
function To() {
|
|
1565
1613
|
const { config: t } = R(), n = t.logo, s = t.supportedLanguages.length > 1;
|
|
1566
|
-
return /* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1568
|
-
/* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ d("div", { className: K.sidebar, children: [
|
|
1615
|
+
/* @__PURE__ */ d("div", { className: K.header, children: [
|
|
1616
|
+
/* @__PURE__ */ d("div", { className: K.brand, children: [
|
|
1569
1617
|
n && /* @__PURE__ */ e(n, { className: K.cloudIcon }),
|
|
1570
1618
|
/* @__PURE__ */ e("div", { className: K.title, children: t.title })
|
|
1571
1619
|
] }),
|
|
1572
|
-
s && /* @__PURE__ */ e(
|
|
1620
|
+
s && /* @__PURE__ */ e(be, { styles: K })
|
|
1573
1621
|
] }),
|
|
1574
|
-
/* @__PURE__ */ e("div", { className: K.scrollArea, children: /* @__PURE__ */ e(
|
|
1622
|
+
/* @__PURE__ */ e("div", { className: K.scrollArea, children: /* @__PURE__ */ e(ke, { styles: K }) })
|
|
1575
1623
|
] });
|
|
1576
1624
|
}
|
|
1577
|
-
const
|
|
1578
|
-
app:
|
|
1579
|
-
layout:
|
|
1580
|
-
main:
|
|
1581
|
-
fullWidth:
|
|
1582
|
-
contentWrapper:
|
|
1625
|
+
const xo = "_app_b0d4r_1", Lo = "_layout_b0d4r_9", So = "_main_b0d4r_15", Po = "_fullWidth_b0d4r_21", Mo = "_contentWrapper_b0d4r_30", se = {
|
|
1626
|
+
app: xo,
|
|
1627
|
+
layout: Lo,
|
|
1628
|
+
main: So,
|
|
1629
|
+
fullWidth: Po,
|
|
1630
|
+
contentWrapper: Mo
|
|
1583
1631
|
};
|
|
1584
|
-
function
|
|
1585
|
-
const { language: n } =
|
|
1586
|
-
|
|
1632
|
+
function Bo({ children: t }) {
|
|
1633
|
+
const { language: n } = ve(), { i18n: s } = A(), { config: c } = R(), [h, l] = C(!1);
|
|
1634
|
+
L(() => {
|
|
1587
1635
|
n && c.supportedLanguages.includes(n) && s.changeLanguage(n);
|
|
1588
1636
|
}, [n, s, c.supportedLanguages]);
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1591
|
-
},
|
|
1592
|
-
|
|
1637
|
+
const g = () => {
|
|
1638
|
+
l(!h);
|
|
1639
|
+
}, u = () => {
|
|
1640
|
+
l(!1);
|
|
1593
1641
|
};
|
|
1594
1642
|
if (!n || !c.supportedLanguages.includes(n))
|
|
1595
|
-
return /* @__PURE__ */ e(
|
|
1596
|
-
const
|
|
1597
|
-
return /* @__PURE__ */
|
|
1598
|
-
|
|
1599
|
-
/* @__PURE__ */ e(
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
a && /* @__PURE__ */ e(
|
|
1643
|
+
return /* @__PURE__ */ e(qe, { to: "/en/welcome", replace: !0 });
|
|
1644
|
+
const i = !!c.header, a = c.showSideMenu !== !1, m = c.contentMaxWidth ? { width: "100%", maxWidth: c.contentMaxWidth } : void 0;
|
|
1645
|
+
return /* @__PURE__ */ d("div", { className: se.app, children: [
|
|
1646
|
+
i && /* @__PURE__ */ e($a, { onMobileMenuToggle: g }),
|
|
1647
|
+
/* @__PURE__ */ e(Za, { isOpen: h, onClose: u }),
|
|
1648
|
+
/* @__PURE__ */ d("div", { className: se.layout, children: [
|
|
1649
|
+
a && /* @__PURE__ */ e(To, {}),
|
|
1602
1650
|
/* @__PURE__ */ e(
|
|
1603
1651
|
"main",
|
|
1604
1652
|
{
|
|
@@ -1609,81 +1657,81 @@ function Lo({ children: t }) {
|
|
|
1609
1657
|
] })
|
|
1610
1658
|
] });
|
|
1611
1659
|
}
|
|
1612
|
-
const
|
|
1613
|
-
homePage:
|
|
1614
|
-
header:
|
|
1615
|
-
title:
|
|
1616
|
-
articlesList:
|
|
1617
|
-
articleCard:
|
|
1618
|
-
articleTitle:
|
|
1619
|
-
articleDescription:
|
|
1620
|
-
empty:
|
|
1621
|
-
skeletonCard:
|
|
1622
|
-
skeletonTitle:
|
|
1623
|
-
skeletonText:
|
|
1624
|
-
skeletonMetadata:
|
|
1660
|
+
const jo = "_homePage_6lyc6_1", Eo = "_header_6lyc6_20", Do = "_title_6lyc6_24", Ao = "_articlesList_6lyc6_31", Ro = "_articleCard_6lyc6_37", Oo = "_articleTitle_6lyc6_56", qo = "_articleDescription_6lyc6_63", Wo = "_empty_6lyc6_71", Ho = "_skeletonCard_6lyc6_85", Fo = "_skeletonTitle_6lyc6_95", zo = "_skeletonText_6lyc6_104", Ko = "_skeletonMetadata_6lyc6_113", B = {
|
|
1661
|
+
homePage: jo,
|
|
1662
|
+
header: Eo,
|
|
1663
|
+
title: Do,
|
|
1664
|
+
articlesList: Ao,
|
|
1665
|
+
articleCard: Ro,
|
|
1666
|
+
articleTitle: Oo,
|
|
1667
|
+
articleDescription: qo,
|
|
1668
|
+
empty: Wo,
|
|
1669
|
+
skeletonCard: Ho,
|
|
1670
|
+
skeletonTitle: Fo,
|
|
1671
|
+
skeletonText: zo,
|
|
1672
|
+
skeletonMetadata: Ko
|
|
1625
1673
|
};
|
|
1626
|
-
function
|
|
1627
|
-
const { i18n: t, t: n } =
|
|
1628
|
-
|
|
1674
|
+
function Uo() {
|
|
1675
|
+
const { i18n: t, t: n } = A(), { config: s, discoverArticles: c } = R(), h = Q(), [l, g] = C([]), [u, i] = C(!0), a = s.articleTitleFont ? { fontFamily: s.articleTitleFont } : void 0;
|
|
1676
|
+
L(() => {
|
|
1629
1677
|
(async () => {
|
|
1630
1678
|
try {
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1633
|
-
} catch (
|
|
1634
|
-
console.error("Failed to load articles:",
|
|
1679
|
+
const o = await c(t.language);
|
|
1680
|
+
g(o.slice(0, 50));
|
|
1681
|
+
} catch (o) {
|
|
1682
|
+
console.error("Failed to load articles:", o);
|
|
1635
1683
|
} finally {
|
|
1636
|
-
|
|
1684
|
+
i(!1);
|
|
1637
1685
|
}
|
|
1638
1686
|
})();
|
|
1639
1687
|
}, [t.language, c]);
|
|
1640
|
-
const m = (
|
|
1641
|
-
const
|
|
1642
|
-
window.scrollTo({ top: 0, left: 0, behavior: "auto" }), h(`${
|
|
1688
|
+
const m = (r) => {
|
|
1689
|
+
const o = s.basePath || "";
|
|
1690
|
+
window.scrollTo({ top: 0, left: 0, behavior: "auto" }), h(`${o}/${t.language}/${r}`);
|
|
1643
1691
|
};
|
|
1644
|
-
return
|
|
1645
|
-
/* @__PURE__ */ e("div", { className:
|
|
1646
|
-
/* @__PURE__ */ e("div", { className:
|
|
1647
|
-
/* @__PURE__ */ e("div", { className:
|
|
1648
|
-
/* @__PURE__ */ e("div", { className:
|
|
1649
|
-
/* @__PURE__ */ e("div", { className:
|
|
1650
|
-
/* @__PURE__ */ e("div", { className:
|
|
1651
|
-
] },
|
|
1652
|
-
] }) :
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */ e("div", { className:
|
|
1655
|
-
/* @__PURE__ */ e("div", { className:
|
|
1692
|
+
return u ? /* @__PURE__ */ d("div", { className: B.homePage, children: [
|
|
1693
|
+
/* @__PURE__ */ e("div", { className: B.header, children: /* @__PURE__ */ e("h2", { className: B.title, children: n("ui.latestPosts") }) }),
|
|
1694
|
+
/* @__PURE__ */ e("div", { className: B.articlesList, children: [...Array(5)].map((r, o) => /* @__PURE__ */ d("div", { className: B.skeletonCard, children: [
|
|
1695
|
+
/* @__PURE__ */ e("div", { className: B.skeletonTitle }),
|
|
1696
|
+
/* @__PURE__ */ e("div", { className: B.skeletonText }),
|
|
1697
|
+
/* @__PURE__ */ e("div", { className: B.skeletonText }),
|
|
1698
|
+
/* @__PURE__ */ e("div", { className: B.skeletonMetadata })
|
|
1699
|
+
] }, o)) })
|
|
1700
|
+
] }) : l.length === 0 ? /* @__PURE__ */ e("div", { className: B.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ d(U, { children: [
|
|
1701
|
+
/* @__PURE__ */ d("div", { className: B.homePage, children: [
|
|
1702
|
+
/* @__PURE__ */ e("div", { className: B.header, children: /* @__PURE__ */ e("h3", { className: B.title, children: n("ui.latestPosts") }) }),
|
|
1703
|
+
/* @__PURE__ */ e("div", { className: B.articlesList, children: l.map((r) => /* @__PURE__ */ d(
|
|
1656
1704
|
"button",
|
|
1657
1705
|
{
|
|
1658
|
-
className:
|
|
1659
|
-
onClick: () => m(
|
|
1706
|
+
className: B.articleCard,
|
|
1707
|
+
onClick: () => m(r.slug),
|
|
1660
1708
|
type: "button",
|
|
1661
1709
|
children: [
|
|
1662
|
-
/* @__PURE__ */ e("h2", { className:
|
|
1663
|
-
|
|
1664
|
-
/* @__PURE__ */ e(
|
|
1710
|
+
/* @__PURE__ */ e("h2", { className: B.articleTitle, style: a, children: r.title }),
|
|
1711
|
+
r.description && /* @__PURE__ */ e("p", { className: B.articleDescription, children: r.description }),
|
|
1712
|
+
/* @__PURE__ */ e(pe, { date: r.date, author: r.author })
|
|
1665
1713
|
]
|
|
1666
1714
|
},
|
|
1667
|
-
|
|
1715
|
+
r.slug
|
|
1668
1716
|
)) })
|
|
1669
1717
|
] }),
|
|
1670
1718
|
/* @__PURE__ */ e(Bt, {})
|
|
1671
1719
|
] });
|
|
1672
1720
|
}
|
|
1673
|
-
function
|
|
1674
|
-
const { language: t } =
|
|
1675
|
-
return /* @__PURE__ */ e(
|
|
1676
|
-
/* @__PURE__ */ e(
|
|
1721
|
+
function ss() {
|
|
1722
|
+
const { language: t } = ve(), { config: n } = R();
|
|
1723
|
+
return /* @__PURE__ */ e(Bo, { children: /* @__PURE__ */ d(Ze, { children: [
|
|
1724
|
+
/* @__PURE__ */ e(Se, { path: "/:slug", element: /* @__PURE__ */ e(qn, { language: t }) }),
|
|
1677
1725
|
/* @__PURE__ */ e(
|
|
1678
|
-
|
|
1726
|
+
Se,
|
|
1679
1727
|
{
|
|
1680
1728
|
index: !0,
|
|
1681
|
-
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(
|
|
1729
|
+
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Uo, {}) : /* @__PURE__ */ e(qe, { to: `./${n.defaultRoute}`, replace: !0 })
|
|
1682
1730
|
}
|
|
1683
1731
|
)
|
|
1684
1732
|
] }) });
|
|
1685
1733
|
}
|
|
1686
|
-
function
|
|
1734
|
+
function cs() {
|
|
1687
1735
|
return {
|
|
1688
1736
|
openSearchModal: () => {
|
|
1689
1737
|
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
@@ -1693,48 +1741,49 @@ function ts() {
|
|
|
1693
1741
|
}
|
|
1694
1742
|
};
|
|
1695
1743
|
}
|
|
1696
|
-
function
|
|
1697
|
-
const { i18n: t } =
|
|
1744
|
+
function rs() {
|
|
1745
|
+
const { i18n: t } = A(), n = Y(), s = Q(), { config: c } = R();
|
|
1698
1746
|
return (h) => {
|
|
1699
|
-
const
|
|
1700
|
-
let
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1747
|
+
const l = c.basePath || "";
|
|
1748
|
+
let g = n.pathname;
|
|
1749
|
+
l && g.startsWith(l) && (g = g.slice(l.length));
|
|
1750
|
+
const u = g.split("/").filter(Boolean), i = u[0];
|
|
1703
1751
|
let a = "";
|
|
1704
|
-
c.supportedLanguages.includes(
|
|
1752
|
+
c.supportedLanguages.includes(i) ? (u[0] = h, a = `${l}/${u.join("/")}`) : a = `${l}/${h}${g}`;
|
|
1705
1753
|
const m = a + n.search + n.hash;
|
|
1706
1754
|
t.changeLanguage(h), s(m);
|
|
1707
1755
|
};
|
|
1708
1756
|
}
|
|
1709
1757
|
export {
|
|
1710
|
-
|
|
1758
|
+
mt as AdvancedModeToggle,
|
|
1711
1759
|
Tt as ArticleNavigation,
|
|
1712
|
-
|
|
1713
|
-
|
|
1760
|
+
as as BlogProvider,
|
|
1761
|
+
gt as BlogRoot,
|
|
1714
1762
|
Bt as BlogSidebar,
|
|
1715
1763
|
qt as Breadcrumb,
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1764
|
+
qn as ContentPage,
|
|
1765
|
+
Bo as DocumentationLayout,
|
|
1766
|
+
ss as DocumentationRoutes,
|
|
1767
|
+
$a as Header,
|
|
1768
|
+
Uo as HomePage,
|
|
1769
|
+
be as LanguageSelector,
|
|
1770
|
+
pe as Metadata,
|
|
1771
|
+
Za as MobileMenu,
|
|
1772
|
+
os as NavigationContent,
|
|
1773
|
+
ke as NavigationMenu,
|
|
1774
|
+
sa as SearchBar,
|
|
1775
|
+
To as Sidebar,
|
|
1776
|
+
cn as TableOfContents,
|
|
1777
|
+
bn as TagResultsModal,
|
|
1778
|
+
Cn as Tags,
|
|
1779
|
+
_t as ThemeProvider,
|
|
1780
|
+
ns as createBlogUtils,
|
|
1781
|
+
Ke as createContentLoaders,
|
|
1733
1782
|
ee as generateHeadingId,
|
|
1734
|
-
|
|
1735
|
-
|
|
1783
|
+
Ft as getAdjacentArticles,
|
|
1784
|
+
Ht as getNavigationData,
|
|
1736
1785
|
R as useBlogConfig,
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1786
|
+
rs as useLanguageChange,
|
|
1787
|
+
cs as useSearchModal,
|
|
1788
|
+
Qe as useTheme
|
|
1740
1789
|
};
|