zudoku 0.1.1-dev.31 → 0.1.1-dev.33

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 (137) hide show
  1. package/dist/app/App.js +8 -1
  2. package/dist/app/App.js.map +1 -1
  3. package/dist/config/config.d.ts +7 -0
  4. package/dist/lib/components/Header.js +1 -1
  5. package/dist/lib/components/Header.js.map +1 -1
  6. package/dist/lib/components/Layout.js +1 -2
  7. package/dist/lib/components/Layout.js.map +1 -1
  8. package/dist/lib/components/SyntaxHighlight.d.ts +1 -0
  9. package/dist/lib/components/SyntaxHighlight.js +1 -1
  10. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  11. package/dist/lib/components/context/DevPortalProvider.js +1 -1
  12. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  13. package/dist/lib/components/navigation/SideNavigation.js +1 -1
  14. package/dist/lib/components/navigation/SideNavigation.js.map +1 -1
  15. package/dist/lib/components/navigation/SideNavigationCategory.js +1 -1
  16. package/dist/lib/components/navigation/SideNavigationCategory.js.map +1 -1
  17. package/dist/lib/components/navigation/SideNavigationItem.d.ts +2 -1
  18. package/dist/lib/components/navigation/SideNavigationItem.js +11 -4
  19. package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -1
  20. package/dist/lib/components/navigation/SideNavigationWrapper.d.ts +3 -0
  21. package/dist/lib/components/navigation/SideNavigationWrapper.js +2 -3
  22. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +1 -1
  23. package/dist/lib/core/DevPortalContext.d.ts +1 -0
  24. package/dist/lib/core/DevPortalContext.js +2 -2
  25. package/dist/lib/core/DevPortalContext.js.map +1 -1
  26. package/dist/lib/core/plugins.d.ts +1 -1
  27. package/dist/lib/core/plugins.js +1 -1
  28. package/dist/lib/core/plugins.js.map +1 -1
  29. package/dist/lib/plugins/api-key/CreateApiKeys.d.ts +5 -0
  30. package/dist/lib/plugins/api-key/CreateApiKeys.js +37 -0
  31. package/dist/lib/plugins/api-key/CreateApiKeys.js.map +1 -0
  32. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +3 -2
  33. package/dist/lib/plugins/api-key/SettingsApiKeys.js +35 -4
  34. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -1
  35. package/dist/lib/plugins/api-key/index.d.ts +19 -21
  36. package/dist/lib/plugins/api-key/index.js +57 -36
  37. package/dist/lib/plugins/api-key/index.js.map +1 -1
  38. package/dist/lib/plugins/index.js +0 -1
  39. package/dist/lib/plugins/index.js.map +1 -1
  40. package/dist/lib/plugins/openapi/MakeRequest.js +27 -12
  41. package/dist/lib/plugins/openapi/MakeRequest.js.map +1 -1
  42. package/dist/lib/plugins/openapi/OperationListItem.js +24 -1
  43. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  44. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -1
  45. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  46. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +2 -2
  47. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  48. package/dist/lib/plugins/openapi/Sidecar.js +13 -13
  49. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  50. package/dist/lib/plugins/openapi/graphql/gql.d.ts +2 -2
  51. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  52. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  53. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
  54. package/dist/lib/plugins/openapi/graphql/graphql.js +4 -0
  55. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  56. package/dist/lib/plugins/openapi/index.js +2 -0
  57. package/dist/lib/plugins/openapi/index.js.map +1 -1
  58. package/dist/lib/plugins/openapi/playground/Headers.js +5 -16
  59. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  60. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +1 -0
  61. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  62. package/dist/lib/plugins/openapi/playground/{UrlParts.d.ts → PathParams.d.ts} +2 -2
  63. package/dist/lib/plugins/openapi/playground/{UrlParts.js → PathParams.js} +4 -4
  64. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -0
  65. package/dist/lib/plugins/openapi/playground/Playground.d.ts +8 -4
  66. package/dist/lib/plugins/openapi/playground/Playground.js +49 -46
  67. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  68. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -6
  69. package/dist/lib/plugins/openapi/playground/QueryParams.js +27 -22
  70. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  71. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +4 -0
  72. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +22 -0
  73. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +1 -0
  74. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +2 -0
  75. package/dist/lib/plugins/openapi/playground/createUrl.js +15 -0
  76. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -0
  77. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  78. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -9
  79. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  80. package/dist/lib/plugins/redirect/index.d.ts +1 -2
  81. package/dist/lib/util/MdxComponents.js +1 -1
  82. package/dist/lib/util/MdxComponents.js.map +1 -1
  83. package/dist/lib/util/createVariantComponent.d.ts +4 -3
  84. package/dist/lib/util/createVariantComponent.js +9 -5
  85. package/dist/lib/util/createVariantComponent.js.map +1 -1
  86. package/dist/vite/plugin-api-keys.d.ts +4 -0
  87. package/dist/vite/plugin-api-keys.js +33 -0
  88. package/dist/vite/plugin-api-keys.js.map +1 -0
  89. package/dist/vite/plugin-mdx.js +1 -1
  90. package/dist/vite/plugin-mdx.js.map +1 -1
  91. package/dist/vite/plugin-redirect.d.ts +4 -0
  92. package/dist/vite/plugin-redirect.js +32 -0
  93. package/dist/vite/plugin-redirect.js.map +1 -0
  94. package/dist/vite/plugin.js +4 -0
  95. package/dist/vite/plugin.js.map +1 -1
  96. package/lib/{urql-B7mLfVog.js → urql-DMlBWUKL.js} +301 -321
  97. package/lib/{DevPortal-Dh66z5c3.js → util-BJVAslZ-.js} +3666 -4913
  98. package/lib/zudoku.components.js +1310 -4
  99. package/lib/zudoku.openapi-worker.js +1 -1
  100. package/lib/zudoku.plugins.js +12876 -12545
  101. package/package.json +1 -1
  102. package/src/app/App.tsx +8 -1
  103. package/src/lib/components/Header.tsx +2 -2
  104. package/src/lib/components/Layout.tsx +10 -6
  105. package/src/lib/components/SyntaxHighlight.tsx +6 -3
  106. package/src/lib/components/context/DevPortalProvider.ts +1 -1
  107. package/src/lib/components/navigation/SideNavigation.tsx +4 -1
  108. package/src/lib/components/navigation/SideNavigationCategory.tsx +3 -1
  109. package/src/lib/components/navigation/SideNavigationItem.tsx +15 -5
  110. package/src/lib/components/navigation/SideNavigationWrapper.tsx +14 -11
  111. package/src/lib/core/DevPortalContext.ts +3 -2
  112. package/src/lib/core/plugins.ts +1 -1
  113. package/src/lib/plugins/api-key/CreateApiKeys.tsx +84 -0
  114. package/src/lib/plugins/api-key/SettingsApiKeys.tsx +111 -11
  115. package/src/lib/plugins/api-key/index.tsx +80 -77
  116. package/src/lib/plugins/index.ts +0 -1
  117. package/src/lib/plugins/openapi/MakeRequest.tsx +38 -29
  118. package/src/lib/plugins/openapi/OperationListItem.tsx +137 -1
  119. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
  120. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +1 -2
  121. package/src/lib/plugins/openapi/Sidecar.tsx +20 -20
  122. package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
  123. package/src/lib/plugins/openapi/graphql/graphql.ts +5 -0
  124. package/src/lib/plugins/openapi/index.tsx +2 -0
  125. package/src/lib/plugins/openapi/playground/Headers.tsx +14 -20
  126. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  127. package/src/lib/plugins/openapi/playground/{UrlParts.tsx → PathParams.tsx} +22 -26
  128. package/src/lib/plugins/openapi/playground/Playground.tsx +205 -155
  129. package/src/lib/plugins/openapi/playground/QueryParams.tsx +89 -57
  130. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +32 -0
  131. package/src/lib/plugins/openapi/playground/createUrl.ts +22 -0
  132. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +24 -9
  133. package/src/lib/plugins/redirect/index.tsx +1 -1
  134. package/src/lib/util/MdxComponents.tsx +1 -0
  135. package/src/lib/util/createVariantComponent.tsx +11 -8
  136. package/dist/lib/plugins/openapi/playground/UrlParts.js.map +0 -1
  137. package/src/lib/plugins/openapi/queries.graphql +0 -6
@@ -1,6 +1,1312 @@
1
- import { D as n, a as r, L as s } from "./DevPortal-Dh66z5c3.js";
1
+ var vt = Object.defineProperty;
2
+ var Ce = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var gt = (t, e, n) => e in t ? vt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var j = (t, e, n) => gt(t, typeof e != "symbol" ? e + "" : e, n), je = (t, e, n) => e.has(t) || Ce("Cannot " + n);
7
+ var o = (t, e, n) => (je(t, e, "read from private field"), n ? n.call(t) : e.get(t)), M = (t, e, n) => e.has(t) ? Ce("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), P = (t, e, n, r) => (je(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
8
+ var Y = (t, e, n, r) => ({
9
+ set _(s) {
10
+ P(t, e, s, n);
11
+ },
12
+ get _() {
13
+ return o(t, e, r);
14
+ }
15
+ });
16
+ import { S as Ue, h as Ge, Q as yt, n as D, m as Pe, M as xt, a as Ae, b as I, e as bt, c as St, d as Ot, f as _t, o as Ne, r as Re, g as Et, i as De, p as Me, s as wt, j as Ct, k as X, u as ye, l as a, N as fe, q as jt, t as Pt, v as W, w as xe, x as At, y as Nt, z as Rt, P as be, A as Dt, B as Mt, C as Tt, D as Lt, E as Se, F as pe, G as $e, H as It, I as ne, J as kt, K as qt, L as Qt, O as Vt, R as Ft, T as Ht, U as Kt, V as Bt, W as zt, X as Wt, Y as Ut, Z as Gt, _ as $t, $ as Xt } from "./util-BJVAslZ-.js";
17
+ import { a0 as Yn } from "./util-BJVAslZ-.js";
18
+ import * as T from "react";
19
+ import k, { memo as Xe, createContext as Yt, useEffect as z, useRef as re, useState as Jt, forwardRef as Zt, Suspense as Ye, useMemo as te } from "react";
20
+ const me = {}, Je = k.createContext(me);
21
+ function en(t) {
22
+ const e = k.useContext(Je);
23
+ return k.useMemo(
24
+ function() {
25
+ return typeof t == "function" ? t(e) : { ...e, ...t };
26
+ },
27
+ [e, t]
28
+ );
29
+ }
30
+ function tn(t) {
31
+ let e;
32
+ return t.disableParentContext ? e = typeof t.components == "function" ? t.components(me) : t.components || me : e = en(t.components), k.createElement(
33
+ Je.Provider,
34
+ { value: e },
35
+ t.children
36
+ );
37
+ }
38
+ var L, Be, nn = (Be = class extends Ue {
39
+ constructor(e = {}) {
40
+ super();
41
+ M(this, L);
42
+ this.config = e, P(this, L, /* @__PURE__ */ new Map());
43
+ }
44
+ build(e, n, r) {
45
+ const s = n.queryKey, i = n.queryHash ?? Ge(s, n);
46
+ let c = this.get(i);
47
+ return c || (c = new yt({
48
+ cache: this,
49
+ queryKey: s,
50
+ queryHash: i,
51
+ options: e.defaultQueryOptions(n),
52
+ state: r,
53
+ defaultOptions: e.getQueryDefaults(s)
54
+ }), this.add(c)), c;
55
+ }
56
+ add(e) {
57
+ o(this, L).has(e.queryHash) || (o(this, L).set(e.queryHash, e), this.notify({
58
+ type: "added",
59
+ query: e
60
+ }));
61
+ }
62
+ remove(e) {
63
+ const n = o(this, L).get(e.queryHash);
64
+ n && (e.destroy(), n === e && o(this, L).delete(e.queryHash), this.notify({ type: "removed", query: e }));
65
+ }
66
+ clear() {
67
+ D.batch(() => {
68
+ this.getAll().forEach((e) => {
69
+ this.remove(e);
70
+ });
71
+ });
72
+ }
73
+ get(e) {
74
+ return o(this, L).get(e);
75
+ }
76
+ getAll() {
77
+ return [...o(this, L).values()];
78
+ }
79
+ find(e) {
80
+ const n = { exact: !0, ...e };
81
+ return this.getAll().find(
82
+ (r) => Pe(n, r)
83
+ );
84
+ }
85
+ findAll(e = {}) {
86
+ const n = this.getAll();
87
+ return Object.keys(e).length > 0 ? n.filter((r) => Pe(e, r)) : n;
88
+ }
89
+ notify(e) {
90
+ D.batch(() => {
91
+ this.listeners.forEach((n) => {
92
+ n(e);
93
+ });
94
+ });
95
+ }
96
+ onFocus() {
97
+ D.batch(() => {
98
+ this.getAll().forEach((e) => {
99
+ e.onFocus();
100
+ });
101
+ });
102
+ }
103
+ onOnline() {
104
+ D.batch(() => {
105
+ this.getAll().forEach((e) => {
106
+ e.onOnline();
107
+ });
108
+ });
109
+ }
110
+ }, L = new WeakMap(), Be), R, $, ze, rn = (ze = class extends Ue {
111
+ constructor(e = {}) {
112
+ super();
113
+ M(this, R);
114
+ M(this, $);
115
+ this.config = e, P(this, R, /* @__PURE__ */ new Map()), P(this, $, Date.now());
116
+ }
117
+ build(e, n, r) {
118
+ const s = new xt({
119
+ mutationCache: this,
120
+ mutationId: ++Y(this, $)._,
121
+ options: e.defaultMutationOptions(n),
122
+ state: r
123
+ });
124
+ return this.add(s), s;
125
+ }
126
+ add(e) {
127
+ const n = J(e), r = o(this, R).get(n) ?? [];
128
+ r.push(e), o(this, R).set(n, r), this.notify({ type: "added", mutation: e });
129
+ }
130
+ remove(e) {
131
+ var r;
132
+ const n = J(e);
133
+ if (o(this, R).has(n)) {
134
+ const s = (r = o(this, R).get(n)) == null ? void 0 : r.filter((i) => i !== e);
135
+ s && (s.length === 0 ? o(this, R).delete(n) : o(this, R).set(n, s));
136
+ }
137
+ this.notify({ type: "removed", mutation: e });
138
+ }
139
+ canRun(e) {
140
+ var r;
141
+ const n = (r = o(this, R).get(J(e))) == null ? void 0 : r.find((s) => s.state.status === "pending");
142
+ return !n || n === e;
143
+ }
144
+ runNext(e) {
145
+ var r;
146
+ const n = (r = o(this, R).get(J(e))) == null ? void 0 : r.find((s) => s !== e && s.state.isPaused);
147
+ return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
148
+ }
149
+ clear() {
150
+ D.batch(() => {
151
+ this.getAll().forEach((e) => {
152
+ this.remove(e);
153
+ });
154
+ });
155
+ }
156
+ getAll() {
157
+ return [...o(this, R).values()].flat();
158
+ }
159
+ find(e) {
160
+ const n = { exact: !0, ...e };
161
+ return this.getAll().find(
162
+ (r) => Ae(n, r)
163
+ );
164
+ }
165
+ findAll(e = {}) {
166
+ return this.getAll().filter((n) => Ae(e, n));
167
+ }
168
+ notify(e) {
169
+ D.batch(() => {
170
+ this.listeners.forEach((n) => {
171
+ n(e);
172
+ });
173
+ });
174
+ }
175
+ resumePausedMutations() {
176
+ const e = this.getAll().filter((n) => n.state.isPaused);
177
+ return D.batch(
178
+ () => Promise.all(
179
+ e.map((n) => n.continue().catch(I))
180
+ )
181
+ );
182
+ }
183
+ }, R = new WeakMap(), $ = new WeakMap(), ze);
184
+ function J(t) {
185
+ var e;
186
+ return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
187
+ }
188
+ function sn(t) {
189
+ return {
190
+ onFetch: (e, n) => {
191
+ const r = async () => {
192
+ var x, y, b, A, E;
193
+ const s = e.options, i = (b = (y = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : y.fetchMore) == null ? void 0 : b.direction, c = ((A = e.state.data) == null ? void 0 : A.pages) || [], v = ((E = e.state.data) == null ? void 0 : E.pageParams) || [], _ = { pages: [], pageParams: [] };
194
+ let g = !1;
195
+ const l = (h) => {
196
+ Object.defineProperty(h, "signal", {
197
+ enumerable: !0,
198
+ get: () => (e.signal.aborted ? g = !0 : e.signal.addEventListener("abort", () => {
199
+ g = !0;
200
+ }), e.signal)
201
+ });
202
+ }, d = bt(e.options, e.fetchOptions), f = async (h, u, S) => {
203
+ if (g)
204
+ return Promise.reject();
205
+ if (u == null && h.pages.length)
206
+ return Promise.resolve(h);
207
+ const m = {
208
+ queryKey: e.queryKey,
209
+ pageParam: u,
210
+ direction: S ? "backward" : "forward",
211
+ meta: e.options.meta
212
+ };
213
+ l(m);
214
+ const w = await d(
215
+ m
216
+ ), { maxPages: N } = e.options, C = S ? St : Ot;
217
+ return {
218
+ pages: C(h.pages, w, N),
219
+ pageParams: C(h.pageParams, u, N)
220
+ };
221
+ };
222
+ let p;
223
+ if (i && c.length) {
224
+ const h = i === "backward", u = h ? an : Te, S = {
225
+ pages: c,
226
+ pageParams: v
227
+ }, m = u(s, S);
228
+ p = await f(S, m, h);
229
+ } else {
230
+ p = await f(
231
+ _,
232
+ v[0] ?? s.initialPageParam
233
+ );
234
+ const h = t ?? c.length;
235
+ for (let u = 1; u < h; u++) {
236
+ const S = Te(s, p);
237
+ p = await f(p, S);
238
+ }
239
+ }
240
+ return p;
241
+ };
242
+ e.options.persister ? e.fetchFn = () => {
243
+ var s, i;
244
+ return (i = (s = e.options).persister) == null ? void 0 : i.call(
245
+ s,
246
+ r,
247
+ {
248
+ queryKey: e.queryKey,
249
+ meta: e.options.meta,
250
+ signal: e.signal
251
+ },
252
+ n
253
+ );
254
+ } : e.fetchFn = r;
255
+ }
256
+ };
257
+ }
258
+ function Te(t, { pages: e, pageParams: n }) {
259
+ const r = e.length - 1;
260
+ return t.getNextPageParam(
261
+ e[r],
262
+ e,
263
+ n[r],
264
+ n
265
+ );
266
+ }
267
+ function an(t, { pages: e, pageParams: n }) {
268
+ var r;
269
+ return (r = t.getPreviousPageParam) == null ? void 0 : r.call(
270
+ t,
271
+ e[0],
272
+ e,
273
+ n[0],
274
+ n
275
+ );
276
+ }
277
+ var O, q, Q, F, H, V, K, B, We, on = (We = class {
278
+ constructor(t = {}) {
279
+ M(this, O);
280
+ M(this, q);
281
+ M(this, Q);
282
+ M(this, F);
283
+ M(this, H);
284
+ M(this, V);
285
+ M(this, K);
286
+ M(this, B);
287
+ P(this, O, t.queryCache || new nn()), P(this, q, t.mutationCache || new rn()), P(this, Q, t.defaultOptions || {}), P(this, F, /* @__PURE__ */ new Map()), P(this, H, /* @__PURE__ */ new Map()), P(this, V, 0);
288
+ }
289
+ mount() {
290
+ Y(this, V)._++, o(this, V) === 1 && (P(this, K, _t.subscribe(async (t) => {
291
+ t && (await this.resumePausedMutations(), o(this, O).onFocus());
292
+ })), P(this, B, Ne.subscribe(async (t) => {
293
+ t && (await this.resumePausedMutations(), o(this, O).onOnline());
294
+ })));
295
+ }
296
+ unmount() {
297
+ var t, e;
298
+ Y(this, V)._--, o(this, V) === 0 && ((t = o(this, K)) == null || t.call(this), P(this, K, void 0), (e = o(this, B)) == null || e.call(this), P(this, B, void 0));
299
+ }
300
+ isFetching(t) {
301
+ return o(this, O).findAll({ ...t, fetchStatus: "fetching" }).length;
302
+ }
303
+ isMutating(t) {
304
+ return o(this, q).findAll({ ...t, status: "pending" }).length;
305
+ }
306
+ getQueryData(t) {
307
+ var n;
308
+ const e = this.defaultQueryOptions({ queryKey: t });
309
+ return (n = o(this, O).get(e.queryHash)) == null ? void 0 : n.state.data;
310
+ }
311
+ ensureQueryData(t) {
312
+ const e = this.getQueryData(t.queryKey);
313
+ if (e === void 0)
314
+ return this.fetchQuery(t);
315
+ {
316
+ const n = this.defaultQueryOptions(t), r = o(this, O).build(this, n);
317
+ return t.revalidateIfStale && r.isStaleByTime(Re(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(e);
318
+ }
319
+ }
320
+ getQueriesData(t) {
321
+ return o(this, O).findAll(t).map(({ queryKey: e, state: n }) => {
322
+ const r = n.data;
323
+ return [e, r];
324
+ });
325
+ }
326
+ setQueryData(t, e, n) {
327
+ const r = this.defaultQueryOptions({ queryKey: t }), s = o(this, O).get(
328
+ r.queryHash
329
+ ), i = s == null ? void 0 : s.state.data, c = Et(e, i);
330
+ if (c !== void 0)
331
+ return o(this, O).build(this, r).setData(c, { ...n, manual: !0 });
332
+ }
333
+ setQueriesData(t, e, n) {
334
+ return D.batch(
335
+ () => o(this, O).findAll(t).map(({ queryKey: r }) => [
336
+ r,
337
+ this.setQueryData(r, e, n)
338
+ ])
339
+ );
340
+ }
341
+ getQueryState(t) {
342
+ var n;
343
+ const e = this.defaultQueryOptions({ queryKey: t });
344
+ return (n = o(this, O).get(e.queryHash)) == null ? void 0 : n.state;
345
+ }
346
+ removeQueries(t) {
347
+ const e = o(this, O);
348
+ D.batch(() => {
349
+ e.findAll(t).forEach((n) => {
350
+ e.remove(n);
351
+ });
352
+ });
353
+ }
354
+ resetQueries(t, e) {
355
+ const n = o(this, O), r = {
356
+ type: "active",
357
+ ...t
358
+ };
359
+ return D.batch(() => (n.findAll(t).forEach((s) => {
360
+ s.reset();
361
+ }), this.refetchQueries(r, e)));
362
+ }
363
+ cancelQueries(t = {}, e = {}) {
364
+ const n = { revert: !0, ...e }, r = D.batch(
365
+ () => o(this, O).findAll(t).map((s) => s.cancel(n))
366
+ );
367
+ return Promise.all(r).then(I).catch(I);
368
+ }
369
+ invalidateQueries(t = {}, e = {}) {
370
+ return D.batch(() => {
371
+ if (o(this, O).findAll(t).forEach((r) => {
372
+ r.invalidate();
373
+ }), t.refetchType === "none")
374
+ return Promise.resolve();
375
+ const n = {
376
+ ...t,
377
+ type: t.refetchType ?? t.type ?? "active"
378
+ };
379
+ return this.refetchQueries(n, e);
380
+ });
381
+ }
382
+ refetchQueries(t = {}, e) {
383
+ const n = {
384
+ ...e,
385
+ cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
386
+ }, r = D.batch(
387
+ () => o(this, O).findAll(t).filter((s) => !s.isDisabled()).map((s) => {
388
+ let i = s.fetch(void 0, n);
389
+ return n.throwOnError || (i = i.catch(I)), s.state.fetchStatus === "paused" ? Promise.resolve() : i;
390
+ })
391
+ );
392
+ return Promise.all(r).then(I);
393
+ }
394
+ fetchQuery(t) {
395
+ const e = this.defaultQueryOptions(t);
396
+ e.retry === void 0 && (e.retry = !1);
397
+ const n = o(this, O).build(this, e);
398
+ return n.isStaleByTime(
399
+ Re(e.staleTime, n)
400
+ ) ? n.fetch(e) : Promise.resolve(n.state.data);
401
+ }
402
+ prefetchQuery(t) {
403
+ return this.fetchQuery(t).then(I).catch(I);
404
+ }
405
+ fetchInfiniteQuery(t) {
406
+ return t.behavior = sn(t.pages), this.fetchQuery(t);
407
+ }
408
+ prefetchInfiniteQuery(t) {
409
+ return this.fetchInfiniteQuery(t).then(I).catch(I);
410
+ }
411
+ resumePausedMutations() {
412
+ return Ne.isOnline() ? o(this, q).resumePausedMutations() : Promise.resolve();
413
+ }
414
+ getQueryCache() {
415
+ return o(this, O);
416
+ }
417
+ getMutationCache() {
418
+ return o(this, q);
419
+ }
420
+ getDefaultOptions() {
421
+ return o(this, Q);
422
+ }
423
+ setDefaultOptions(t) {
424
+ P(this, Q, t);
425
+ }
426
+ setQueryDefaults(t, e) {
427
+ o(this, F).set(De(t), {
428
+ queryKey: t,
429
+ defaultOptions: e
430
+ });
431
+ }
432
+ getQueryDefaults(t) {
433
+ const e = [...o(this, F).values()];
434
+ let n = {};
435
+ return e.forEach((r) => {
436
+ Me(t, r.queryKey) && (n = { ...n, ...r.defaultOptions });
437
+ }), n;
438
+ }
439
+ setMutationDefaults(t, e) {
440
+ o(this, H).set(De(t), {
441
+ mutationKey: t,
442
+ defaultOptions: e
443
+ });
444
+ }
445
+ getMutationDefaults(t) {
446
+ const e = [...o(this, H).values()];
447
+ let n = {};
448
+ return e.forEach((r) => {
449
+ Me(t, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
450
+ }), n;
451
+ }
452
+ defaultQueryOptions(t) {
453
+ if (t._defaulted)
454
+ return t;
455
+ const e = {
456
+ ...o(this, Q).queries,
457
+ ...this.getQueryDefaults(t.queryKey),
458
+ ...t,
459
+ _defaulted: !0
460
+ };
461
+ return e.queryHash || (e.queryHash = Ge(
462
+ e.queryKey,
463
+ e
464
+ )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === wt && (e.enabled = !1), e;
465
+ }
466
+ defaultMutationOptions(t) {
467
+ return t != null && t._defaulted ? t : {
468
+ ...o(this, Q).mutations,
469
+ ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
470
+ ...t,
471
+ _defaulted: !0
472
+ };
473
+ }
474
+ clear() {
475
+ o(this, O).clear(), o(this, q).clear();
476
+ }
477
+ }, O = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), F = new WeakMap(), H = new WeakMap(), V = new WeakMap(), K = new WeakMap(), B = new WeakMap(), We), cn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
478
+ const Le = (t) => {
479
+ let e;
480
+ const n = /* @__PURE__ */ new Set(), r = (l, d) => {
481
+ const f = typeof l == "function" ? l(e) : l;
482
+ if (!Object.is(f, e)) {
483
+ const p = e;
484
+ e = d ?? (typeof f != "object" || f === null) ? f : Object.assign({}, e, f), n.forEach((x) => x(e, p));
485
+ }
486
+ }, s = () => e, _ = { setState: r, getState: s, getInitialState: () => g, subscribe: (l) => (n.add(l), () => n.delete(l)), destroy: () => {
487
+ (cn ? "production" : void 0) !== "production" && console.warn(
488
+ "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
489
+ ), n.clear();
490
+ } }, g = e = t(r, s, _);
491
+ return _;
492
+ }, ln = (t) => t ? Le(t) : Le;
493
+ var ve = { exports: {} }, le = {}, Z = { exports: {} }, ue = {};
494
+ /**
495
+ * @license React
496
+ * use-sync-external-store-shim.production.min.js
497
+ *
498
+ * Copyright (c) Facebook, Inc. and its affiliates.
499
+ *
500
+ * This source code is licensed under the MIT license found in the
501
+ * LICENSE file in the root directory of this source tree.
502
+ */
503
+ var Ie;
504
+ function un() {
505
+ if (Ie) return ue;
506
+ Ie = 1;
507
+ var t = k;
508
+ function e(d, f) {
509
+ return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
510
+ }
511
+ var n = typeof Object.is == "function" ? Object.is : e, r = t.useState, s = t.useEffect, i = t.useLayoutEffect, c = t.useDebugValue;
512
+ function v(d, f) {
513
+ var p = f(), x = r({ inst: { value: p, getSnapshot: f } }), y = x[0].inst, b = x[1];
514
+ return i(function() {
515
+ y.value = p, y.getSnapshot = f, _(y) && b({ inst: y });
516
+ }, [d, p, f]), s(function() {
517
+ return _(y) && b({ inst: y }), d(function() {
518
+ _(y) && b({ inst: y });
519
+ });
520
+ }, [d]), c(p), p;
521
+ }
522
+ function _(d) {
523
+ var f = d.getSnapshot;
524
+ d = d.value;
525
+ try {
526
+ var p = f();
527
+ return !n(d, p);
528
+ } catch {
529
+ return !0;
530
+ }
531
+ }
532
+ function g(d, f) {
533
+ return f();
534
+ }
535
+ var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? g : v;
536
+ return ue.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : l, ue;
537
+ }
538
+ var de = {};
539
+ /**
540
+ * @license React
541
+ * use-sync-external-store-shim.development.js
542
+ *
543
+ * Copyright (c) Facebook, Inc. and its affiliates.
544
+ *
545
+ * This source code is licensed under the MIT license found in the
546
+ * LICENSE file in the root directory of this source tree.
547
+ */
548
+ var ke;
549
+ function dn() {
550
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
551
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
552
+ var t = k, e = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
553
+ function n(h) {
554
+ {
555
+ for (var u = arguments.length, S = new Array(u > 1 ? u - 1 : 0), m = 1; m < u; m++)
556
+ S[m - 1] = arguments[m];
557
+ r("error", h, S);
558
+ }
559
+ }
560
+ function r(h, u, S) {
561
+ {
562
+ var m = e.ReactDebugCurrentFrame, w = m.getStackAddendum();
563
+ w !== "" && (u += "%s", S = S.concat([w]));
564
+ var N = S.map(function(C) {
565
+ return String(C);
566
+ });
567
+ N.unshift("Warning: " + u), Function.prototype.apply.call(console[h], console, N);
568
+ }
569
+ }
570
+ function s(h, u) {
571
+ return h === u && (h !== 0 || 1 / h === 1 / u) || h !== h && u !== u;
572
+ }
573
+ var i = typeof Object.is == "function" ? Object.is : s, c = t.useState, v = t.useEffect, _ = t.useLayoutEffect, g = t.useDebugValue, l = !1, d = !1;
574
+ function f(h, u, S) {
575
+ l || t.startTransition !== void 0 && (l = !0, n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
576
+ var m = u();
577
+ if (!d) {
578
+ var w = u();
579
+ i(m, w) || (n("The result of getSnapshot should be cached to avoid an infinite loop"), d = !0);
580
+ }
581
+ var N = c({
582
+ inst: {
583
+ value: m,
584
+ getSnapshot: u
585
+ }
586
+ }), C = N[0].inst, U = N[1];
587
+ return _(function() {
588
+ C.value = m, C.getSnapshot = u, p(C) && U({
589
+ inst: C
590
+ });
591
+ }, [h, m, u]), v(function() {
592
+ p(C) && U({
593
+ inst: C
594
+ });
595
+ var se = function() {
596
+ p(C) && U({
597
+ inst: C
598
+ });
599
+ };
600
+ return h(se);
601
+ }, [h]), g(m), m;
602
+ }
603
+ function p(h) {
604
+ var u = h.getSnapshot, S = h.value;
605
+ try {
606
+ var m = u();
607
+ return !i(S, m);
608
+ } catch {
609
+ return !0;
610
+ }
611
+ }
612
+ function x(h, u, S) {
613
+ return u();
614
+ }
615
+ var y = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", b = !y, A = b ? x : f, E = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : A;
616
+ de.useSyncExternalStore = E, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
617
+ }()), de;
618
+ }
619
+ var qe;
620
+ function Ze() {
621
+ return qe || (qe = 1, process.env.NODE_ENV === "production" ? Z.exports = un() : Z.exports = dn()), Z.exports;
622
+ }
623
+ /**
624
+ * @license React
625
+ * use-sync-external-store-shim/with-selector.production.min.js
626
+ *
627
+ * Copyright (c) Facebook, Inc. and its affiliates.
628
+ *
629
+ * This source code is licensed under the MIT license found in the
630
+ * LICENSE file in the root directory of this source tree.
631
+ */
632
+ var Qe;
633
+ function hn() {
634
+ if (Qe) return le;
635
+ Qe = 1;
636
+ var t = k, e = Ze();
637
+ function n(g, l) {
638
+ return g === l && (g !== 0 || 1 / g === 1 / l) || g !== g && l !== l;
639
+ }
640
+ var r = typeof Object.is == "function" ? Object.is : n, s = e.useSyncExternalStore, i = t.useRef, c = t.useEffect, v = t.useMemo, _ = t.useDebugValue;
641
+ return le.useSyncExternalStoreWithSelector = function(g, l, d, f, p) {
642
+ var x = i(null);
643
+ if (x.current === null) {
644
+ var y = { hasValue: !1, value: null };
645
+ x.current = y;
646
+ } else y = x.current;
647
+ x = v(function() {
648
+ function A(m) {
649
+ if (!E) {
650
+ if (E = !0, h = m, m = f(m), p !== void 0 && y.hasValue) {
651
+ var w = y.value;
652
+ if (p(w, m)) return u = w;
653
+ }
654
+ return u = m;
655
+ }
656
+ if (w = u, r(h, m)) return w;
657
+ var N = f(m);
658
+ return p !== void 0 && p(w, N) ? w : (h = m, u = N);
659
+ }
660
+ var E = !1, h, u, S = d === void 0 ? null : d;
661
+ return [function() {
662
+ return A(l());
663
+ }, S === null ? void 0 : function() {
664
+ return A(S());
665
+ }];
666
+ }, [l, d, f, p]);
667
+ var b = s(g, x[0], x[1]);
668
+ return c(function() {
669
+ y.hasValue = !0, y.value = b;
670
+ }, [b]), _(b), b;
671
+ }, le;
672
+ }
673
+ var he = {};
674
+ /**
675
+ * @license React
676
+ * use-sync-external-store-shim/with-selector.development.js
677
+ *
678
+ * Copyright (c) Facebook, Inc. and its affiliates.
679
+ *
680
+ * This source code is licensed under the MIT license found in the
681
+ * LICENSE file in the root directory of this source tree.
682
+ */
683
+ var Ve;
684
+ function fn() {
685
+ return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
686
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
687
+ var t = k, e = Ze();
688
+ function n(l, d) {
689
+ return l === d && (l !== 0 || 1 / l === 1 / d) || l !== l && d !== d;
690
+ }
691
+ var r = typeof Object.is == "function" ? Object.is : n, s = e.useSyncExternalStore, i = t.useRef, c = t.useEffect, v = t.useMemo, _ = t.useDebugValue;
692
+ function g(l, d, f, p, x) {
693
+ var y = i(null), b;
694
+ y.current === null ? (b = {
695
+ hasValue: !1,
696
+ value: null
697
+ }, y.current = b) : b = y.current;
698
+ var A = v(function() {
699
+ var S = !1, m, w, N = function(G) {
700
+ if (!S) {
701
+ S = !0, m = G;
702
+ var ae = p(G);
703
+ if (x !== void 0 && b.hasValue) {
704
+ var ie = b.value;
705
+ if (x(ie, ae))
706
+ return w = ie, ie;
707
+ }
708
+ return w = ae, ae;
709
+ }
710
+ var mt = m, oe = w;
711
+ if (r(mt, G))
712
+ return oe;
713
+ var ce = p(G);
714
+ return x !== void 0 && x(oe, ce) ? oe : (m = G, w = ce, ce);
715
+ }, C = f === void 0 ? null : f, U = function() {
716
+ return N(d());
717
+ }, se = C === null ? void 0 : function() {
718
+ return N(C());
719
+ };
720
+ return [U, se];
721
+ }, [d, f, p, x]), E = A[0], h = A[1], u = s(l, E, h);
722
+ return c(function() {
723
+ b.hasValue = !0, b.value = u;
724
+ }, [u]), _(u), u;
725
+ }
726
+ he.useSyncExternalStoreWithSelector = g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
727
+ }()), he;
728
+ }
729
+ process.env.NODE_ENV === "production" ? ve.exports = hn() : ve.exports = fn();
730
+ var pn = ve.exports;
731
+ const mn = /* @__PURE__ */ Ct(pn);
732
+ var et = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
733
+ const { useDebugValue: vn } = k, { useSyncExternalStoreWithSelector: gn } = mn;
734
+ let Fe = !1;
735
+ const yn = (t) => t;
736
+ function xn(t, e = yn, n) {
737
+ (et ? "production" : void 0) !== "production" && n && !Fe && (console.warn(
738
+ "[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
739
+ ), Fe = !0);
740
+ const r = gn(
741
+ t.subscribe,
742
+ t.getState,
743
+ t.getServerState || t.getInitialState,
744
+ e,
745
+ n
746
+ );
747
+ return vn(r), r;
748
+ }
749
+ const He = (t) => {
750
+ (et ? "production" : void 0) !== "production" && typeof t != "function" && console.warn(
751
+ "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
752
+ );
753
+ const e = typeof t == "function" ? ln(t) : t, n = (r, s) => xn(e, r, s);
754
+ return Object.assign(n, e), n;
755
+ }, bn = (t) => t ? He(t) : He, tt = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Sn = (t) => "initialize" in t && typeof t.initialize == "function", On = (t) => "getIdentities" in t && typeof t.getIdentities == "function", nt = new on(), ge = bn(
756
+ () => ({
757
+ isLoggedIn: !1
758
+ })
759
+ );
760
+ class _n {
761
+ constructor(e) {
762
+ j(this, "plugins", []);
763
+ j(this, "navigationPlugins");
764
+ j(this, "navigation");
765
+ j(this, "meta");
766
+ j(this, "authentication");
767
+ j(this, "state");
768
+ j(this, "initialize", async () => {
769
+ var e;
770
+ this.plugins.filter(Sn).forEach((n) => n.initialize(this)), (e = this.authentication) == null || e.initialize(this);
771
+ });
772
+ j(this, "setUserProfile", async (e) => ge.setState(e));
773
+ j(this, "invalidateCache", async (e) => {
774
+ nt.invalidateQueries({ queryKey: e });
775
+ });
776
+ j(this, "getApiIdentities", async () => (await Promise.all(
777
+ this.plugins.filter(On).map((n) => n.getIdentities(this))
778
+ )).flat());
779
+ j(this, "login", async () => {
780
+ if (!this.authentication)
781
+ throw new Error("No authentication configured");
782
+ return this.authentication.login(this);
783
+ });
784
+ j(this, "logout", async () => {
785
+ if (!this.authentication)
786
+ throw new Error("No authentication configured");
787
+ return this.authentication.signOut(this);
788
+ });
789
+ j(this, "handleAuthenticationResponse", async (e) => {
790
+ var n, r;
791
+ (r = (n = this.config.authentication) == null ? void 0 : n.handleAuthenticationResponse) == null || r.call(n, e, this);
792
+ });
793
+ j(this, "getNavigation", async (e) => (await Promise.all(
794
+ this.navigationPlugins.map(
795
+ async (r) => {
796
+ var s;
797
+ return (s = r.getNavigation) == null ? void 0 : s.call(r, e);
798
+ }
799
+ )
800
+ )).flatMap((r) => r ?? []));
801
+ j(this, "sessionStorage", {
802
+ get: async (e) => localStorage.getItem(`session-${e}`) ?? "",
803
+ setProfile: async () => {
804
+ },
805
+ set: async (e, n) => localStorage.setItem(`session-${e}`, n)
806
+ });
807
+ this.config = e, this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(tt), this.authentication = e.authentication, this.meta = e.meta, this.state = ge;
808
+ }
809
+ }
810
+ /**
811
+ * @license lucide-react v0.378.0 - ISC
812
+ *
813
+ * This source code is licensed under the ISC license.
814
+ * See the LICENSE file in the root directory of this source tree.
815
+ */
816
+ const rt = X("ChevronRight", [
817
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
818
+ ]);
819
+ /**
820
+ * @license lucide-react v0.378.0 - ISC
821
+ *
822
+ * This source code is licensed under the ISC license.
823
+ * See the LICENSE file in the root directory of this source tree.
824
+ */
825
+ const En = X("ExternalLink", [
826
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
827
+ ["path", { d: "M10 14 21 3", key: "gplh6r" }],
828
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
829
+ ]);
830
+ /**
831
+ * @license lucide-react v0.378.0 - ISC
832
+ *
833
+ * This source code is licensed under the ISC license.
834
+ * See the LICENSE file in the root directory of this source tree.
835
+ */
836
+ const wn = X("MoonStar", [
837
+ ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
838
+ ["path", { d: "M20 3v4", key: "1olli1" }],
839
+ ["path", { d: "M22 5h-4", key: "1gvqau" }]
840
+ ]);
841
+ /**
842
+ * @license lucide-react v0.378.0 - ISC
843
+ *
844
+ * This source code is licensed under the ISC license.
845
+ * See the LICENSE file in the root directory of this source tree.
846
+ */
847
+ const Cn = X("Search", [
848
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
849
+ ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
850
+ ]);
851
+ /**
852
+ * @license lucide-react v0.378.0 - ISC
853
+ *
854
+ * This source code is licensed under the ISC license.
855
+ * See the LICENSE file in the root directory of this source tree.
856
+ */
857
+ const jn = X("Sun", [
858
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
859
+ ["path", { d: "M12 2v2", key: "tus03m" }],
860
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
861
+ ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
862
+ ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
863
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
864
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
865
+ ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
866
+ ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
867
+ ]), Pn = () => {
868
+ const { navigation: t } = ye();
869
+ return /* @__PURE__ */ a.jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
870
+ fe,
871
+ {
872
+ className: ({ isActive: n }) => jt(
873
+ "block py-3.5 font-medium -mb-px border-b-2",
874
+ n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
875
+ ),
876
+ to: e.path,
877
+ children: e.label
878
+ }
879
+ ) }, e.label)) }) });
880
+ }, st = Xe(() => {
881
+ const [t, e] = Pt(), { isLoggedIn: n, email: r } = ge(), { login: s, logout: i, meta: c } = ye(), v = t ? wn : jn;
882
+ return /* @__PURE__ */ a.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
883
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
884
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
885
+ (c == null ? void 0 : c.logo) && /* @__PURE__ */ a.jsx("img", { src: c.logo, alt: "My Dev Portal", className: "h-10" }),
886
+ /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: c == null ? void 0 : c.headerTitle })
887
+ ] }),
888
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
889
+ /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-prose", children: /* @__PURE__ */ a.jsxs("button", { className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72", children: [
890
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
891
+ /* @__PURE__ */ a.jsx(Cn, { size: 14 }),
892
+ "Search"
893
+ ] }),
894
+ /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
895
+ ] }) }),
896
+ /* @__PURE__ */ a.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex", children: [
897
+ n ? /* @__PURE__ */ a.jsxs(
898
+ "button",
899
+ {
900
+ className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap",
901
+ onClick: i,
902
+ children: [
903
+ "Logout ",
904
+ r ? `(${r})` : null
905
+ ]
906
+ }
907
+ ) : /* @__PURE__ */ a.jsx(
908
+ "button",
909
+ {
910
+ className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded",
911
+ onClick: s,
912
+ children: "Login"
913
+ }
914
+ ),
915
+ /* @__PURE__ */ a.jsx(
916
+ "button",
917
+ {
918
+ className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
919
+ onClick: e,
920
+ children: /* @__PURE__ */ a.jsx(v, { size: 18 })
921
+ }
922
+ )
923
+ ] })
924
+ ] })
925
+ ] }),
926
+ /* @__PURE__ */ a.jsx(Pn, {})
927
+ ] }) });
928
+ }), at = {
929
+ Header: st
930
+ }, An = Yt(at), Nn = An.Provider, Rn = () => {
931
+ const t = W(), { setActiveAnchor: e } = xe();
932
+ z(() => {
933
+ if (!t.hash) return;
934
+ const n = t.hash.split("/")[0].slice(1), r = document.getElementById(decodeURIComponent(n));
935
+ if (r) {
936
+ requestAnimationFrame(() => {
937
+ r.scrollIntoView(), requestIdleCallback(() => e(n));
938
+ });
939
+ return;
940
+ }
941
+ const s = new MutationObserver((i, c) => {
942
+ const v = document.getElementById(decodeURIComponent(n));
943
+ v && (v.scrollIntoView(), requestIdleCallback(() => e(n)), c.disconnect());
944
+ });
945
+ return s.observe(document.body, { childList: !0, subtree: !0 }), () => s.disconnect();
946
+ }, [t.hash, e]);
947
+ }, Dn = () => {
948
+ const t = W(), e = re(t.pathname);
949
+ z(() => {
950
+ e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
951
+ }, [t.pathname]);
952
+ };
953
+ var Oe = "Collapsible", [Mn, Gn] = At(Oe), [Tn, _e] = Mn(Oe), it = T.forwardRef(
954
+ (t, e) => {
955
+ const {
956
+ __scopeCollapsible: n,
957
+ open: r,
958
+ defaultOpen: s,
959
+ disabled: i,
960
+ onOpenChange: c,
961
+ ...v
962
+ } = t, [_ = !1, g] = Nt({
963
+ prop: r,
964
+ defaultProp: s,
965
+ onChange: c
966
+ });
967
+ return /* @__PURE__ */ a.jsx(
968
+ Tn,
969
+ {
970
+ scope: n,
971
+ disabled: i,
972
+ contentId: Rt(),
973
+ open: _,
974
+ onOpenToggle: T.useCallback(() => g((l) => !l), [g]),
975
+ children: /* @__PURE__ */ a.jsx(
976
+ be.div,
977
+ {
978
+ "data-state": we(_),
979
+ "data-disabled": i ? "" : void 0,
980
+ ...v,
981
+ ref: e
982
+ }
983
+ )
984
+ }
985
+ );
986
+ }
987
+ );
988
+ it.displayName = Oe;
989
+ var ot = "CollapsibleTrigger", ct = T.forwardRef(
990
+ (t, e) => {
991
+ const { __scopeCollapsible: n, ...r } = t, s = _e(ot, n);
992
+ return /* @__PURE__ */ a.jsx(
993
+ be.button,
994
+ {
995
+ type: "button",
996
+ "aria-controls": s.contentId,
997
+ "aria-expanded": s.open || !1,
998
+ "data-state": we(s.open),
999
+ "data-disabled": s.disabled ? "" : void 0,
1000
+ disabled: s.disabled,
1001
+ ...r,
1002
+ ref: e,
1003
+ onClick: Dt(t.onClick, s.onOpenToggle)
1004
+ }
1005
+ );
1006
+ }
1007
+ );
1008
+ ct.displayName = ot;
1009
+ var Ee = "CollapsibleContent", lt = T.forwardRef(
1010
+ (t, e) => {
1011
+ const { forceMount: n, ...r } = t, s = _e(Ee, t.__scopeCollapsible);
1012
+ return /* @__PURE__ */ a.jsx(Mt, { present: n || s.open, children: ({ present: i }) => /* @__PURE__ */ a.jsx(Ln, { ...r, ref: e, present: i }) });
1013
+ }
1014
+ );
1015
+ lt.displayName = Ee;
1016
+ var Ln = T.forwardRef((t, e) => {
1017
+ const { __scopeCollapsible: n, present: r, children: s, ...i } = t, c = _e(Ee, n), [v, _] = T.useState(r), g = T.useRef(null), l = Tt(e, g), d = T.useRef(0), f = d.current, p = T.useRef(0), x = p.current, y = c.open || v, b = T.useRef(y), A = T.useRef();
1018
+ return T.useEffect(() => {
1019
+ const E = requestAnimationFrame(() => b.current = !1);
1020
+ return () => cancelAnimationFrame(E);
1021
+ }, []), Lt(() => {
1022
+ const E = g.current;
1023
+ if (E) {
1024
+ A.current = A.current || {
1025
+ transitionDuration: E.style.transitionDuration,
1026
+ animationName: E.style.animationName
1027
+ }, E.style.transitionDuration = "0s", E.style.animationName = "none";
1028
+ const h = E.getBoundingClientRect();
1029
+ d.current = h.height, p.current = h.width, b.current || (E.style.transitionDuration = A.current.transitionDuration, E.style.animationName = A.current.animationName), _(r);
1030
+ }
1031
+ }, [c.open, r]), /* @__PURE__ */ a.jsx(
1032
+ be.div,
1033
+ {
1034
+ "data-state": we(c.open),
1035
+ "data-disabled": c.disabled ? "" : void 0,
1036
+ id: c.contentId,
1037
+ hidden: !y,
1038
+ ...i,
1039
+ ref: l,
1040
+ style: {
1041
+ "--radix-collapsible-content-height": f ? `${f}px` : void 0,
1042
+ "--radix-collapsible-content-width": x ? `${x}px` : void 0,
1043
+ ...t.style
1044
+ },
1045
+ children: y && s
1046
+ }
1047
+ );
1048
+ });
1049
+ function we(t) {
1050
+ return t ? "open" : "closed";
1051
+ }
1052
+ var ut = it, dt = ct, ht = lt;
1053
+ function In(t) {
1054
+ return !0;
1055
+ }
1056
+ const kn = (t) => /* @__PURE__ */ a.jsx("div", {}), ft = ({
1057
+ item: t,
1058
+ defaultOpen: e,
1059
+ path: n
1060
+ }) => {
1061
+ const [r, s] = Jt(e), i = W(), c = re(i.pathname);
1062
+ return z(() => {
1063
+ !r && c.current !== i.pathname && s(Se(t, i.pathname, n)), c.current = i.pathname;
1064
+ }, [r, t, n, i.pathname]), [r, s];
1065
+ }, ee = qt(
1066
+ "flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
1067
+ {
1068
+ variants: {
1069
+ isActive: {
1070
+ true: "text-primary font-medium",
1071
+ false: "text-foreground/80"
1072
+ },
1073
+ isMuted: {
1074
+ true: "text-foreground/30",
1075
+ false: ""
1076
+ }
1077
+ }
1078
+ }
1079
+ ), qn = "data-anchor", pt = ({
1080
+ category: t,
1081
+ item: e,
1082
+ activeAnchor: n,
1083
+ currentTopNavItem: r,
1084
+ basePath: s = ""
1085
+ }) => {
1086
+ const i = pe(e) ? $e(s, e.path) : "", c = W(), [v, _] = ft({
1087
+ item: e,
1088
+ path: i,
1089
+ defaultOpen: () => Se(e, c.pathname, i)
1090
+ });
1091
+ if (It(e)) {
1092
+ const l = ne(
1093
+ "flex items-center gap-2",
1094
+ ee({
1095
+ isActive: e.href === c.pathname
1096
+ })
1097
+ );
1098
+ return e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1099
+ "a",
1100
+ {
1101
+ className: l,
1102
+ href: e.href,
1103
+ target: "_blank",
1104
+ rel: "noopener noreferrer",
1105
+ children: [
1106
+ e.label,
1107
+ /* @__PURE__ */ a.jsx(En, { size: 14 })
1108
+ ]
1109
+ }
1110
+ ) : /* @__PURE__ */ a.jsx(fe, { className: l, to: e.href, children: e.label });
1111
+ }
1112
+ const g = /* @__PURE__ */ a.jsxs("div", { className: "flex justify-between w-full", children: [
1113
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
1114
+ In(e.icon) && /* @__PURE__ */ a.jsx(kn, { name: e.icon, size: 16 }),
1115
+ typeof e.label != "string" ? e.label : /* @__PURE__ */ a.jsx("span", { className: "truncate", children: e.label })
1116
+ ] }),
1117
+ e.children && /* @__PURE__ */ a.jsx(
1118
+ rt,
1119
+ {
1120
+ size: 16,
1121
+ className: "transition shrink-0 group-data-[state=open]:rotate-90"
1122
+ }
1123
+ )
1124
+ ] });
1125
+ return /* @__PURE__ */ a.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ a.jsxs(
1126
+ ut,
1127
+ {
1128
+ open: v,
1129
+ onOpenChange: () => _((l) => !l),
1130
+ className: "flex flex-col",
1131
+ children: [
1132
+ /* @__PURE__ */ a.jsx(
1133
+ dt,
1134
+ {
1135
+ className: ne(
1136
+ "group text-start",
1137
+ ee({ isActive: !1 })
1138
+ ),
1139
+ children: g
1140
+ }
1141
+ ),
1142
+ /* @__PURE__ */ a.jsx(ht, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: e.children.map((l) => /* @__PURE__ */ a.jsx(
1143
+ pt,
1144
+ {
1145
+ category: t,
1146
+ item: l,
1147
+ activeAnchor: n,
1148
+ currentTopNavItem: r,
1149
+ basePath: i
1150
+ },
1151
+ pe(l) ? l.path : l.href
1152
+ )) }) })
1153
+ ]
1154
+ }
1155
+ ) : e.path.startsWith("#") ? /* @__PURE__ */ a.jsx(
1156
+ kt,
1157
+ {
1158
+ to: e.path,
1159
+ [qn]: e.path,
1160
+ className: ee({
1161
+ isActive: e.path.slice(1) === n,
1162
+ isMuted: e.muted
1163
+ }),
1164
+ children: g
1165
+ }
1166
+ ) : /* @__PURE__ */ a.jsx(
1167
+ fe,
1168
+ {
1169
+ className: ({ isActive: l }) => ee({ isActive: l }),
1170
+ to: i,
1171
+ children: g
1172
+ }
1173
+ ) });
1174
+ }, Qn = ({
1175
+ category: t
1176
+ }) => {
1177
+ const { activeAnchor: e } = xe(), n = Qt(), r = W(), s = t.collapsible ?? !0, [i, c] = ft({
1178
+ item: t,
1179
+ path: (n == null ? void 0 : n.path) ?? "",
1180
+ defaultOpen: () => !s || t.expanded || Se(t, r.pathname, (n == null ? void 0 : n.path) ?? "")
1181
+ });
1182
+ return /* @__PURE__ */ a.jsxs(
1183
+ ut,
1184
+ {
1185
+ open: i,
1186
+ onOpenChange: () => c((v) => !v),
1187
+ children: [
1188
+ t.label.length > 0 ? /* @__PURE__ */ a.jsx(dt, { asChild: s, disabled: !s, children: /* @__PURE__ */ a.jsxs(
1189
+ "h5",
1190
+ {
1191
+ className: ne(
1192
+ "flex group items-center justify-between cursor-pointer font-semibold text-foreground/90 px-[--padding-nav-item] py-1.5 rounded-lg transition-colors duration-300 -mx-[--padding-nav-item]",
1193
+ s ? "hover:bg-accent" : "cursor-auto"
1194
+ ),
1195
+ children: [
1196
+ t.label,
1197
+ s && /* @__PURE__ */ a.jsx(
1198
+ rt,
1199
+ {
1200
+ className: "group-data-[state=open]:rotate-90 transition",
1201
+ size: 16
1202
+ }
1203
+ )
1204
+ ]
1205
+ }
1206
+ ) }) : "Endpoints",
1207
+ /* @__PURE__ */ a.jsx(ht, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ a.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((v) => /* @__PURE__ */ a.jsx(
1208
+ pt,
1209
+ {
1210
+ category: t,
1211
+ item: v,
1212
+ activeAnchor: e,
1213
+ currentTopNavItem: n,
1214
+ basePath: $e(n == null ? void 0 : n.path, t.path)
1215
+ },
1216
+ pe(v) ? v.path + v.label : v.href
1217
+ )) }) })
1218
+ ]
1219
+ },
1220
+ t.label
1221
+ );
1222
+ }, Vn = Zt(({ children: t, className: e, data: n }, r) => /* @__PURE__ */ a.jsx(
1223
+ "nav",
1224
+ {
1225
+ "data-navigation": n,
1226
+ className: ne(
1227
+ "peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
1228
+ e
1229
+ ),
1230
+ ref: r,
1231
+ children: t
1232
+ }
1233
+ )), Fn = () => {
1234
+ const t = re(null), e = Vt();
1235
+ return /* @__PURE__ */ a.jsx(
1236
+ Vn,
1237
+ {
1238
+ ref: t,
1239
+ data: e.data.items.length > 0 ? "true" : "false",
1240
+ children: e.data.items.map((n) => /* @__PURE__ */ a.jsx(Qn, { category: n }, n.label))
1241
+ }
1242
+ );
1243
+ }, Ke = ({ children: t }) => {
1244
+ const e = W(), { setActiveAnchor: n } = xe(), { meta: r, handleAuthenticationResponse: s } = ye();
1245
+ z(() => {
1246
+ s(e);
1247
+ }, [s, e]), Rn(), Dn();
1248
+ const i = re(e.pathname);
1249
+ return z(() => {
1250
+ e.pathname !== i.current && n(""), i.current = e.pathname;
1251
+ }, [e.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1252
+ /* @__PURE__ */ a.jsxs(Ft, { titleTemplate: r == null ? void 0 : r.pageTitle, children: [
1253
+ /* @__PURE__ */ a.jsx("title", { children: "Home" }),
1254
+ (r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
1255
+ (r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
1256
+ ] }),
1257
+ /* @__PURE__ */ a.jsx(st, {}),
1258
+ /* @__PURE__ */ a.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12", children: /* @__PURE__ */ a.jsxs(Ye, { fallback: /* @__PURE__ */ a.jsx("div", { className: "top-48", children: "Warte kurz..." }), children: [
1259
+ /* @__PURE__ */ a.jsx(Fn, {}),
1260
+ /* @__PURE__ */ a.jsx(
1261
+ "main",
1262
+ {
1263
+ className: `dark:border-white/10 translate-x-0
1264
+ lg:overflow-visible
1265
+ lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]
1266
+ lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12`,
1267
+ children: t ?? /* @__PURE__ */ a.jsx(Ht, {})
1268
+ }
1269
+ )
1270
+ ] }) })
1271
+ ] });
1272
+ };
1273
+ function Hn({ plugins: t }) {
1274
+ const e = te(() => {
1275
+ const n = (t ?? []).flatMap(
1276
+ (r) => tt(r) ? r.getRoutes() : []
1277
+ );
1278
+ return Kt([
1279
+ {
1280
+ path: "/",
1281
+ element: /* @__PURE__ */ a.jsx(Ke, {}),
1282
+ errorElement: /* @__PURE__ */ a.jsx(Ke, { children: /* @__PURE__ */ a.jsx("div", { className: "h-[75vh] flex items-center justify-center", children: "Error, look at the console" }) }),
1283
+ children: n
1284
+ }
1285
+ ]);
1286
+ }, [t]);
1287
+ return /* @__PURE__ */ a.jsx(Bt, { router: e });
1288
+ }
1289
+ const Kn = (t) => {
1290
+ const e = te(
1291
+ () => ({ ...at, ...t.overrides }),
1292
+ [t.overrides]
1293
+ ), n = te(
1294
+ () => ({ ...zt, ...t.mdxComponents }),
1295
+ [t.mdxComponents]
1296
+ ), r = te(() => new _n(t), [t]);
1297
+ return z(() => {
1298
+ r.initialize();
1299
+ }, [r]), /* @__PURE__ */ a.jsx(Wt, { client: nt, children: /* @__PURE__ */ a.jsx(Ut, { children: /* @__PURE__ */ a.jsx(Gt, { value: r, children: /* @__PURE__ */ a.jsx(tn, { components: n, children: /* @__PURE__ */ a.jsx($t, { children: /* @__PURE__ */ a.jsx(Nn, { value: e, children: /* @__PURE__ */ a.jsx(Xt, { children: /* @__PURE__ */ a.jsx(
1300
+ Ye,
1301
+ {
1302
+ fallback: /* @__PURE__ */ a.jsx("div", { className: "grid place-items-center h-full", children: "Loading..." }),
1303
+ children: /* @__PURE__ */ a.jsx(Hn, { plugins: t.plugins })
1304
+ }
1305
+ ) }) }) }) }) }) }) });
1306
+ }, Bn = Xe(Kn);
1307
+ Bn.displayName = "DevPortal";
2
1308
  export {
3
- n as DevPortal,
4
- r as DynamicIcon,
5
- s as Link
1309
+ Bn as DevPortal,
1310
+ kn as DynamicIcon,
1311
+ Yn as Link
6
1312
  };