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