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