@x-wave/blog 2.1.7 → 2.2.0

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