zudoku 0.3.0-dev.16 → 0.3.0-dev.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/config/config.d.ts +1 -1
  2. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  3. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  4. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  5. package/dist/vite/dev-server.js +1 -1
  6. package/dist/vite/dev-server.js.map +1 -1
  7. package/dist/vite/plugin-api-keys.js +2 -2
  8. package/dist/vite/plugin-api-keys.js.map +1 -1
  9. package/dist/vite/plugin-api.js +3 -3
  10. package/dist/vite/plugin-api.js.map +1 -1
  11. package/dist/vite/plugin-docs.js +1 -1
  12. package/dist/vite/plugin-docs.js.map +1 -1
  13. package/dist/vite/plugin-redirect.js +2 -2
  14. package/dist/vite/plugin-redirect.js.map +1 -1
  15. package/lib/DevPortalProvider-CRKuwoXc.js +4123 -0
  16. package/lib/Markdown-5LmPZyLV.js +8620 -0
  17. package/lib/MdxComponents-DYD_QPVF.js +3017 -0
  18. package/lib/Select-DR3PiqjV.js +4569 -0
  19. package/lib/Spinner-DjQ2eBxC.js +181 -0
  20. package/lib/_commonjsHelpers-BkfeUUK-.js +28 -0
  21. package/lib/hook-FCY9-FHO.js +24 -0
  22. package/lib/index-By9bEW57.js +411 -0
  23. package/lib/{loglevel-CoH7VSwE.js → loglevel-CA34MiFn.js} +10 -10
  24. package/lib/state-Ds_OxRHP.js +288 -0
  25. package/lib/util-voKLTRDG.js +740 -0
  26. package/lib/zudoku.auth-auth0.js +1 -1
  27. package/lib/zudoku.auth-clerk.js +1 -1
  28. package/lib/zudoku.auth-openid.js +2 -2
  29. package/lib/zudoku.components.js +111 -104
  30. package/lib/zudoku.plugin-api-keys.js +292 -0
  31. package/lib/zudoku.plugin-markdown.js +255 -0
  32. package/lib/zudoku.plugin-openapi.js +6240 -0
  33. package/lib/zudoku.plugin-redirect.js +10 -0
  34. package/package.json +12 -3
  35. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  36. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  37. package/dist/lib/plugins/api-key/index.js.map +0 -1
  38. package/dist/lib/plugins/index.d.ts +0 -4
  39. package/dist/lib/plugins/index.js +0 -5
  40. package/dist/lib/plugins/index.js.map +0 -1
  41. package/lib/Spinner-Cf0Eb7YI.js +0 -8460
  42. package/lib/state-2Hu1renZ.js +0 -313
  43. package/lib/zudoku.plugins.js +0 -19918
  44. package/src/lib/plugins/index.ts +0 -4
  45. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  46. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +0 -0
  47. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  48. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.js +0 -0
  49. /package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +0 -0
  50. /package/dist/lib/plugins/{api-key → api-keys}/index.js +0 -0
  51. /package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +0 -0
  52. /package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +0 -0
  53. /package/src/lib/plugins/{api-key → api-keys}/index.tsx +0 -0
@@ -0,0 +1,292 @@
1
+ import { j as e, a as g, O as j, b as v } from "./index-PyGcnQFX.js";
2
+ import { l as b } from "./loglevel-CA34MiFn.js";
3
+ import { u as w } from "./hook-FCY9-FHO.js";
4
+ import { u as N, a as h, S as k, b as K, c as S, d as E, e as A, f as p, B as o } from "./Select-DR3PiqjV.js";
5
+ import { c as l, l as C, u as m, L as x, y as P, z as D } from "./DevPortalProvider-CRKuwoXc.js";
6
+ import * as I from "react";
7
+ import { useState as O } from "react";
8
+ /**
9
+ * @license lucide-react v0.378.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const R = l("EyeOff", [
15
+ ["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }],
16
+ [
17
+ "path",
18
+ {
19
+ d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",
20
+ key: "9wicm4"
21
+ }
22
+ ],
23
+ [
24
+ "path",
25
+ { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61", key: "1jreej" }
26
+ ],
27
+ ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
28
+ ]);
29
+ /**
30
+ * @license lucide-react v0.378.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */
35
+ const q = l("Eye", [
36
+ ["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
37
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
38
+ ]);
39
+ /**
40
+ * @license lucide-react v0.378.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */
45
+ const z = l("RotateCw", [
46
+ ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
47
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
48
+ ]);
49
+ /**
50
+ * @license lucide-react v0.378.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */
55
+ const M = l("Trash", [
56
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
57
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
58
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }]
59
+ ]);
60
+ var L = process.env.NODE_ENV === "production", d = "Invariant failed";
61
+ function u(t, r) {
62
+ if (!t) {
63
+ if (L)
64
+ throw new Error(d);
65
+ var a = typeof r == "function" ? r() : r, n = a ? "".concat(d, ": ").concat(a) : d;
66
+ throw new Error(n);
67
+ }
68
+ }
69
+ const y = I.forwardRef(
70
+ ({ className: t, type: r, ...a }, n) => /* @__PURE__ */ e.jsx(
71
+ "input",
72
+ {
73
+ type: r,
74
+ className: C(
75
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
76
+ t
77
+ ),
78
+ ref: n,
79
+ ...a
80
+ }
81
+ )
82
+ );
83
+ y.displayName = "Input";
84
+ const T = ({ service: t }) => {
85
+ const r = m(), a = g(), n = N({
86
+ defaultValues: {
87
+ expiresOn: "30"
88
+ }
89
+ }), i = h({
90
+ mutationFn: ({ description: s, expiresOn: c }) => {
91
+ if (!t.createKey)
92
+ throw new Error("deleteKey not implemented");
93
+ const f = c !== "never" ? V(Number(c)) : void 0;
94
+ return t.createKey(
95
+ { description: s, expiresOn: f },
96
+ r
97
+ );
98
+ },
99
+ onSuccess: () => a("/settings/api-keys/")
100
+ });
101
+ return t.createKey ? /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg pt-[--padding-content-top] pb-[--padding-content-bottom]", children: [
102
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between mb-4 border-b border-border pb-1", children: /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "New API Key" }) }),
103
+ /* @__PURE__ */ e.jsx(
104
+ "form",
105
+ {
106
+ onSubmit: n.handleSubmit((s) => i.mutate(s)),
107
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col", children: [
108
+ "Note",
109
+ /* @__PURE__ */ e.jsx(y, { ...n.register("description") }),
110
+ "Expiration",
111
+ /* @__PURE__ */ e.jsxs(
112
+ k,
113
+ {
114
+ onValueChange: (s) => n.setValue("expiresOn", s),
115
+ defaultValue: n.getValues("expiresOn"),
116
+ children: [
117
+ /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(S, {}) }),
118
+ /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsxs(A, { children: [
119
+ [7, 30, 60, 90].map((s) => /* @__PURE__ */ e.jsxs(p, { value: String(s), children: [
120
+ s,
121
+ " days"
122
+ ] }, s)),
123
+ /* @__PURE__ */ e.jsx(p, { value: "never", children: "Never" })
124
+ ] }) })
125
+ ]
126
+ }
127
+ ),
128
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
129
+ /* @__PURE__ */ e.jsx(o, { children: "Generate Key" }),
130
+ /* @__PURE__ */ e.jsx(o, { variant: "outline", asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/", children: "Cancel" }) })
131
+ ] })
132
+ ] })
133
+ }
134
+ )
135
+ ] }) : null;
136
+ }, V = (t) => {
137
+ const r = /* @__PURE__ */ new Date();
138
+ return r.setDate(r.getDate() + t), r.toISOString();
139
+ }, F = ({ service: t }) => {
140
+ const r = m(), a = P(), { data: n } = D({
141
+ queryFn: () => t.getKeys(r),
142
+ queryKey: ["api-keys"],
143
+ retry: !1
144
+ }), i = h({
145
+ mutationFn: (s) => {
146
+ if (!t.deleteKey)
147
+ throw new Error("deleteKey not implemented");
148
+ return t.deleteKey(s, r);
149
+ },
150
+ onSuccess: () => {
151
+ a.invalidateQueries({ queryKey: ["api-keys"] });
152
+ }
153
+ });
154
+ return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg h-full pt-[--padding-content-top] pb-[--padding-content-bottom]", children: [
155
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-4 border-b border-border pb-3", children: [
156
+ /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
157
+ t.createKey && /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/new", children: "Create API Key" }) })
158
+ ] }),
159
+ n.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-4 items-center h-1/2 my-8", children: [
160
+ /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
161
+ "No API keys created yet.",
162
+ /* @__PURE__ */ e.jsx("br", {}),
163
+ "Get started and create the first one now"
164
+ ] }),
165
+ t.createKey && /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/new", children: "Create API Key" }) })
166
+ ] }) : /* @__PURE__ */ e.jsx("ul", { className: "grid grid-cols-[minmax(250px,min-content)_1fr_min-content] ", children: n.map((s) => /* @__PURE__ */ e.jsxs(
167
+ "li",
168
+ {
169
+ className: "border-b border-border p-5 grid grid-cols-subgrid col-span-full gap-2 items-center",
170
+ children: [
171
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 text-sm", children: [
172
+ s.description ?? s.id,
173
+ /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
174
+ s.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
175
+ "Created on ",
176
+ new Date(s.createdOn).toLocaleDateString()
177
+ ] }),
178
+ s.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
179
+ "Expires on ",
180
+ new Date(s.expiresOn).toLocaleDateString()
181
+ ] })
182
+ ] })
183
+ ] }),
184
+ /* @__PURE__ */ e.jsx("div", { className: "items-center flex justify-center", children: /* @__PURE__ */ e.jsx(_, { apiKey: s.key }) }),
185
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
186
+ t.rollKey && /* @__PURE__ */ e.jsx(o, { size: "icon", children: /* @__PURE__ */ e.jsx(z, { size: 16 }) }),
187
+ t.deleteKey && /* @__PURE__ */ e.jsx(
188
+ o,
189
+ {
190
+ variant: "ghost",
191
+ size: "icon",
192
+ onClick: () => {
193
+ confirm("Do you want to delete this key?") && i.mutate(s.id);
194
+ },
195
+ disabled: i.isPending,
196
+ children: /* @__PURE__ */ e.jsx(M, { size: 16 })
197
+ }
198
+ )
199
+ ] })
200
+ ]
201
+ },
202
+ s.id
203
+ )) })
204
+ ] });
205
+ }, _ = ({ apiKey: t }) => {
206
+ const [r, a] = O(!1);
207
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm", children: [
208
+ /* @__PURE__ */ e.jsx("code", { className: "border border-border rounded bg-gray-100 dark:bg-gray-950 p-1 font-mono", children: r ? t : "•".repeat(t.length) }),
209
+ /* @__PURE__ */ e.jsx(
210
+ o,
211
+ {
212
+ variant: "outline",
213
+ onClick: () => a((n) => !n),
214
+ size: "icon",
215
+ children: r ? /* @__PURE__ */ e.jsx(R, { size: 16 }) : /* @__PURE__ */ e.jsx(q, { size: 16 })
216
+ }
217
+ )
218
+ ] });
219
+ }, B = "https://zudoku-rewiringamerica-main-ef9c9c0.d2.zuplo.dev", G = (t) => ({
220
+ deleteKey: async (r, a) => {
221
+ const n = new Request(t + `/v1/developer/api-keys/${r}`, {
222
+ method: "DELETE"
223
+ });
224
+ await a.signRequest(n);
225
+ const i = await fetch(n);
226
+ u(i.ok, "Failed to delete API key");
227
+ },
228
+ createKey: async (r, a) => {
229
+ const n = new Request(t + "/v1/developer/api-keys", {
230
+ method: "POST",
231
+ headers: {
232
+ "Content-Type": "application/json"
233
+ },
234
+ body: JSON.stringify(r)
235
+ });
236
+ await a.signRequest(n);
237
+ const i = await fetch(n);
238
+ u(i.ok, "Failed to create API key");
239
+ },
240
+ getKeys: async (r) => {
241
+ const a = new Request(t + "/v1/developer/api-keys");
242
+ await r.signRequest(a);
243
+ const n = await fetch(a);
244
+ return u(n.ok, "Failed to fetch API keys"), await n.json();
245
+ }
246
+ }), Q = () => {
247
+ const t = w();
248
+ return t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(j, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
249
+ "Please login first to view this page",
250
+ /* @__PURE__ */ e.jsx(o, { onClick: () => t.login(), children: "Login" })
251
+ ] });
252
+ }, H = () => {
253
+ const t = v();
254
+ return b.error(String(t)), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
255
+ /* @__PURE__ */ e.jsx("h1", { children: "Something went wrong" }),
256
+ t instanceof Error && /* @__PURE__ */ e.jsx("p", { children: t.message })
257
+ ] });
258
+ }, X = (t) => {
259
+ const r = "endpoint" in t ? t.endpoint : B, a = "getKeys" in t ? t : G(r);
260
+ return {
261
+ getIdentities: async (n) => {
262
+ try {
263
+ return (await a.getKeys(n)).map((s) => ({
264
+ authorizeRequest: (c) => (c.headers.set("Authorization", `Bearer ${s.key}`), c),
265
+ id: s.id,
266
+ label: s.description ?? s.id
267
+ }));
268
+ } catch {
269
+ return [];
270
+ }
271
+ },
272
+ getRoutes: () => [
273
+ {
274
+ element: /* @__PURE__ */ e.jsx(Q, {}),
275
+ errorElement: /* @__PURE__ */ e.jsx(H, {}),
276
+ children: [
277
+ {
278
+ path: "/settings/api-keys",
279
+ element: /* @__PURE__ */ e.jsx(F, { service: a })
280
+ },
281
+ {
282
+ path: "/settings/api-keys/new",
283
+ element: /* @__PURE__ */ e.jsx(T, { service: a })
284
+ }
285
+ ]
286
+ }
287
+ ]
288
+ };
289
+ };
290
+ export {
291
+ X as apiKeyPlugin
292
+ };
@@ -0,0 +1,255 @@
1
+ import { j as e, u as R, N as L } from "./index-PyGcnQFX.js";
2
+ import { c as P, l as j, t as U, L as Y } from "./DevPortalProvider-CRKuwoXc.js";
3
+ import { A as M, t as A, i as E, H as D, u as J } from "./util-voKLTRDG.js";
4
+ import { useRef as G, useState as $, useEffect as Z, useMemo as W } from "react";
5
+ import { P as q, C as F } from "./Markdown-5LmPZyLV.js";
6
+ import { a as _, H as N } from "./MdxComponents-DYD_QPVF.js";
7
+ import { c as B, g as K } from "./_commonjsHelpers-BkfeUUK-.js";
8
+ /**
9
+ * @license lucide-react v0.378.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const V = P("ListTree", [
15
+ ["path", { d: "M21 12h-8", key: "1bmf0i" }],
16
+ ["path", { d: "M21 6H8", key: "1pqkrb" }],
17
+ ["path", { d: "M21 18h-8", key: "1tm79t" }],
18
+ ["path", { d: "M3 6v4c0 1.1.9 2 2 2h3", key: "1ywdgy" }],
19
+ ["path", { d: "M3 10v6c0 1.1.9 2 2 2h3", key: "2wc746" }]
20
+ ]);
21
+ var z = { exports: {} };
22
+ (function(a, t) {
23
+ (function(s, i, n) {
24
+ a.exports = n(), a.exports.default = n();
25
+ })("slugify", B, function() {
26
+ var s = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`), i = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
27
+ function n(o, r) {
28
+ if (typeof o != "string")
29
+ throw new Error("slugify: string argument expected");
30
+ r = typeof r == "string" ? { replacement: r } : r || {};
31
+ var l = i[r.locale] || {}, h = r.replacement === void 0 ? "-" : r.replacement, b = r.trim === void 0 ? !0 : r.trim, c = o.normalize().split("").reduce(function(x, p) {
32
+ var u = l[p];
33
+ return u === void 0 && (u = s[p]), u === void 0 && (u = p), u === h && (u = " "), x + u.replace(r.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
34
+ }, "");
35
+ return r.strict && (c = c.replace(/[^A-Za-z0-9\s]/g, "")), b && (c = c.trim()), c = c.replace(/\s+/g, h), r.lower && (c = c.toLowerCase()), c;
36
+ }
37
+ return n.extend = function(o) {
38
+ Object.assign(s, o);
39
+ }, n;
40
+ });
41
+ })(z);
42
+ var X = z.exports;
43
+ const Q = /* @__PURE__ */ K(X), C = "data-active", H = ({
44
+ item: a,
45
+ children: t,
46
+ className: s,
47
+ isActive: i
48
+ }) => /* @__PURE__ */ e.jsxs(
49
+ "li",
50
+ {
51
+ className: j(
52
+ "truncate",
53
+ i ? "text-primary" : "text-foreground/65 dark:text-foreground/75",
54
+ s
55
+ ),
56
+ title: a.value,
57
+ children: [
58
+ /* @__PURE__ */ e.jsx(
59
+ M,
60
+ {
61
+ to: `#${a.id}`,
62
+ [C]: a.id,
63
+ className: j(
64
+ i ? "text-primary" : "text-foreground/65 dark:text-foreground/75 hover:text-foreground"
65
+ ),
66
+ children: a.value
67
+ }
68
+ ),
69
+ t
70
+ ]
71
+ }
72
+ ), ee = ({ entries: a }) => {
73
+ const { activeAnchor: t } = _(), s = G(null), [i, n] = $({});
74
+ return Z(() => {
75
+ if (!s.current) return;
76
+ const o = s.current.querySelector(
77
+ `[${C}='${t}']`
78
+ );
79
+ if (!o) {
80
+ n({
81
+ "--indicator-top": "0",
82
+ "--indicator-opacity": 0
83
+ });
84
+ return;
85
+ }
86
+ const r = s.current.getBoundingClientRect().top, l = o.getBoundingClientRect().top;
87
+ n({
88
+ "--indicator-top": `${l - r}px`,
89
+ "--indicator-opacity": 1
90
+ });
91
+ }, [t]), /* @__PURE__ */ e.jsxs("aside", { className: "sticky top-[--header-height] h-[calc(100vh-var(--header-height))] pt-[--padding-content-top] pb-[--padding-content-bottom] overflow-y-auto ps-1 text-sm", children: [
92
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 font-medium mb-2", children: [
93
+ /* @__PURE__ */ e.jsx(V, { size: 16 }),
94
+ "On this page"
95
+ ] }),
96
+ /* @__PURE__ */ e.jsx(
97
+ "ul",
98
+ {
99
+ ref: s,
100
+ style: i,
101
+ className: j(
102
+ "relative ms-2 ps-4 font-medium list-none mt-0 space-y-2",
103
+ "before:absolute before:inset-0 before:right-auto before:bg-border before:w-[2px]",
104
+ "after:absolute after:-left-px after:-translate-y-1 after:top-[--indicator-top] after:opacity-[--indicator-opacity] after:h-6 after:bg-primary after:w-[4px] after:rounded after:ease-out after:[transition:top__150ms,opacity_325ms]"
105
+ ),
106
+ children: a.map((o) => /* @__PURE__ */ e.jsx(
107
+ H,
108
+ {
109
+ isActive: o.id === t,
110
+ item: o,
111
+ className: "pl-0",
112
+ children: o.children && /* @__PURE__ */ e.jsx("ul", { className: "list-none pl-4 pt-2 space-y-2", children: o.children.map((r) => /* @__PURE__ */ e.jsx(
113
+ H,
114
+ {
115
+ item: r,
116
+ isActive: r.id === t
117
+ },
118
+ r.id
119
+ )) })
120
+ },
121
+ o.id
122
+ ))
123
+ }
124
+ )
125
+ ] });
126
+ }, te = {
127
+ h2: ({ children: a, id: t }) => /* @__PURE__ */ e.jsx(N, { level: 2, id: t, registerSidebarAnchor: !0, children: a }),
128
+ h3: ({ children: a, id: t }) => /* @__PURE__ */ e.jsxs(N, { level: 3, id: t, registerSidebarAnchor: !0, children: [
129
+ " ",
130
+ a
131
+ ] })
132
+ }, re = ({
133
+ mdxComponent: a,
134
+ frontmatter: t = {},
135
+ defaultOptions: s,
136
+ tableOfContents: i
137
+ }) => {
138
+ var w, k;
139
+ const n = U(), o = R(), r = n ? A(n, (d, y, v) => {
140
+ var m;
141
+ if (y === o.pathname)
142
+ return (m = v.at(0)) == null ? void 0 : m.label;
143
+ }) : void 0, l = t.title, h = t.category ?? r, b = t.toc === !1 || (s == null ? void 0 : s.toc) === !1, c = ((w = i.find((d) => d.depth === 1)) == null ? void 0 : w.value) ?? l, x = t.disablePager ?? (s == null ? void 0 : s.disablePager) ?? !1, p = ((k = i.find((d) => d.depth === 1)) == null ? void 0 : k.children) ?? // if `title` is provided by frontmatter it does not appear in the table of contents
144
+ i.filter((d) => d.depth === 2), u = !b && p.length > 0, { prev: f, next: g } = W(() => {
145
+ let d = { path: "", label: "" }, y = { path: "", label: "" }, v = !1;
146
+ return n ? (A(n, (m, S) => {
147
+ var I, T;
148
+ const O = { path: S, label: m.label };
149
+ if (v && E(m) && !((I = m.children) != null && I.length))
150
+ return y = O, !0;
151
+ S === o.pathname && (v = !0), !v && E(m) && !((T = m.children) != null && T.length) && (d = O);
152
+ }), { prev: d, next: y }) : { prev: d, next: y };
153
+ }, [n, o.pathname]);
154
+ return /* @__PURE__ */ e.jsxs("div", { className: "xl:grid grid-cols-[--sidecar-grid-cols] gap-8 justify-between", children: [
155
+ /* @__PURE__ */ e.jsx(D, { children: /* @__PURE__ */ e.jsx("title", { children: c }) }),
156
+ /* @__PURE__ */ e.jsxs(
157
+ "div",
158
+ {
159
+ className: j(
160
+ q,
161
+ "max-w-full xl:w-full xl:max-w-prose flex-1 flex-shrink pt-[--padding-content-top] pb-[--padding-content-bottom]"
162
+ ),
163
+ children: [
164
+ /* @__PURE__ */ e.jsxs("header", { children: [
165
+ h && /* @__PURE__ */ e.jsx(F, { children: h }),
166
+ l && /* @__PURE__ */ e.jsx(N, { level: 1, id: Q(l, { lower: !0 }), children: l }),
167
+ t.description && /* @__PURE__ */ e.jsx("p", { className: "prose-lg", children: t.description })
168
+ ] }),
169
+ /* @__PURE__ */ e.jsx(
170
+ a,
171
+ {
172
+ components: { ...J(), ...te }
173
+ }
174
+ ),
175
+ !x && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
176
+ /* @__PURE__ */ e.jsx("hr", {}),
177
+ /* @__PURE__ */ e.jsxs("div", { className: "not-prose flex items-center justify-between gap-8", children: [
178
+ f.path ? /* @__PURE__ */ e.jsxs(
179
+ Y,
180
+ {
181
+ to: f.path,
182
+ className: "flex flex-col items-stretch gap-2 flex-1 truncate border border-border rounded px-6 py-4 text-start hover:border-primary/85 transition shadow-sm hover:shadow-md",
183
+ title: typeof f.label == "string" ? f.label : void 0,
184
+ children: [
185
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm text-muted-foreground", children: "← Previous page" }),
186
+ /* @__PURE__ */ e.jsx("div", { className: "text-lg text-primary truncate", children: f.label })
187
+ ]
188
+ }
189
+ ) : /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
190
+ g.path ? /* @__PURE__ */ e.jsxs(
191
+ Y,
192
+ {
193
+ to: g.path,
194
+ className: "flex flex-col items-stretch gap-2 flex-1 truncate border border-border rounded px-6 py-4 text-end hover:border-primary/85 transition shadow-sm hover:shadow-md",
195
+ title: typeof g.label == "string" ? g.label : void 0,
196
+ children: [
197
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm text-muted-foreground", children: "Next page →" }),
198
+ /* @__PURE__ */ e.jsx("div", { className: "text-lg text-primary truncate", children: g.label })
199
+ ]
200
+ }
201
+ ) : /* @__PURE__ */ e.jsx("div", { className: "flex-1" })
202
+ ] })
203
+ ] })
204
+ ]
205
+ }
206
+ ),
207
+ /* @__PURE__ */ e.jsx("div", { className: "hidden xl:block", children: u && /* @__PURE__ */ e.jsx(ee, { entries: p }) })
208
+ ] });
209
+ }, ae = (a, t) => {
210
+ const s = Object.entries(a).flatMap(
211
+ ([n, o]) => {
212
+ const r = n.match(/pages\/(.*).mdx?$/), l = r == null ? void 0 : r.at(1);
213
+ if (!l) return [];
214
+ const h = l.split("/");
215
+ return {
216
+ path: h.at(-1) === "index" ? h.slice(0, -1).join("/") : l,
217
+ lazy: async () => {
218
+ const { default: x, ...p } = await o();
219
+ return {
220
+ element: /* @__PURE__ */ e.jsx(
221
+ re,
222
+ {
223
+ mdxComponent: x,
224
+ ...p,
225
+ defaultOptions: t
226
+ }
227
+ )
228
+ };
229
+ }
230
+ };
231
+ }
232
+ ), i = Array.from(
233
+ new Set(s.map((n) => n.path.split("/").at(0)))
234
+ ).map((n) => ({
235
+ path: `/${n}`,
236
+ element: /* @__PURE__ */ e.jsx(se, {})
237
+ }));
238
+ return [...s, ...i];
239
+ }, se = () => {
240
+ const a = U();
241
+ return a ? A(a, (t, s) => {
242
+ if (!("children" in t || !E(t)))
243
+ return /* @__PURE__ */ e.jsx(L, { to: s, replace: !0 });
244
+ }) : null;
245
+ }, he = ({
246
+ markdownFiles: a,
247
+ defaultOptions: t
248
+ }) => ({
249
+ getRoutes() {
250
+ return ae(a, t);
251
+ }
252
+ });
253
+ export {
254
+ he as markdownPlugin
255
+ };