zudoku 0.3.0-dev.70 → 0.3.0-dev.72
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/dist/app/main.js +6 -2
- package/dist/app/main.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +6 -2
- package/dist/lib/authentication/components/SignIn.js +6 -2
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +4 -2
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +2 -2
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +14 -8
- package/dist/lib/authentication/providers/openid.js +40 -39
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.js +1 -1
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/DevPortal.js +3 -6
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Header.js +7 -3
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/core/DevPortalContext.js +1 -0
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/lib/{AnchorLink-C_pYhuZi.js → AnchorLink-DwUyvkrL.js} +3 -3
- package/lib/{AnchorLink-C_pYhuZi.js.map → AnchorLink-DwUyvkrL.js.map} +1 -1
- package/lib/AuthenticationPlugin-BuCQtecV.js +55 -0
- package/lib/AuthenticationPlugin-BuCQtecV.js.map +1 -0
- package/lib/{CategoryHeading-D5Q-X6lE.js → CategoryHeading-8saHYD9L.js} +3 -3
- package/lib/{CategoryHeading-D5Q-X6lE.js.map → CategoryHeading-8saHYD9L.js.map} +1 -1
- package/lib/{Combination-Cq0UkOXq.js → Combination-BMJg4xHo.js} +4 -4
- package/lib/{Combination-Cq0UkOXq.js.map → Combination-BMJg4xHo.js.map} +1 -1
- package/lib/{DevPortalProvider-BBhQ8kgI.js → DevPortalProvider-DMrk4yw1.js} +2 -2
- package/lib/{DevPortalProvider-BBhQ8kgI.js.map → DevPortalProvider-DMrk4yw1.js.map} +1 -1
- package/lib/{Input-DdAxw3vC.js → Input-98JuH9ox.js} +5 -5
- package/lib/{Input-DdAxw3vC.js.map → Input-98JuH9ox.js.map} +1 -1
- package/lib/{Markdown-DsCvZnhw.js → Markdown-CSdXDuYx.js} +2914 -3825
- package/lib/Markdown-CSdXDuYx.js.map +1 -0
- package/lib/{MdxPage-B_7x36CA.js → MdxPage-7CszsIct.js} +13 -12
- package/lib/{MdxPage-B_7x36CA.js.map → MdxPage-7CszsIct.js.map} +1 -1
- package/lib/{OperationList-i6FGZUu4.js → OperationList-CzXPfUMy.js} +29 -28
- package/lib/{OperationList-i6FGZUu4.js.map → OperationList-CzXPfUMy.js.map} +1 -1
- package/lib/{Route-Bsrd0acQ.js → Route-CueiECQ0.js} +2 -2
- package/lib/{Route-Bsrd0acQ.js.map → Route-CueiECQ0.js.map} +1 -1
- package/lib/{SlotletProvider-CpNYmq6S.js → SlotletProvider-ibdqvOie.js} +22 -21
- package/lib/{SlotletProvider-CpNYmq6S.js.map → SlotletProvider-ibdqvOie.js.map} +1 -1
- package/lib/{Spinner-BBPlEab_.js → Spinner-D0EmkS4m.js} +4 -4
- package/lib/{Spinner-BBPlEab_.js.map → Spinner-D0EmkS4m.js.map} +1 -1
- package/lib/index-CjHZiWvQ.js +916 -0
- package/lib/index-CjHZiWvQ.js.map +1 -0
- package/lib/{index-DT-cf5tv.js → index-D_ZoO3pi.js} +18 -17
- package/lib/{index-DT-cf5tv.js.map → index-D_ZoO3pi.js.map} +1 -1
- package/lib/{jsx-runtime-BIr0WBt_.js → jsx-runtime-D0NHp7nI.js} +3 -3
- package/lib/{jsx-runtime-BIr0WBt_.js.map → jsx-runtime-D0NHp7nI.js.map} +1 -1
- package/lib/{state-DKdaQzvh.js → state-DsXXkBLH.js} +2 -2
- package/lib/{state-DKdaQzvh.js.map → state-DsXXkBLH.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +26 -20
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +211 -200
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +473 -467
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +17 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +2 -2
- package/lib/zudoku.plugin-markdown.js +3 -3
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/package.json +1 -1
- package/src/app/main.tsx +6 -8
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/SignIn.tsx +6 -2
- package/src/lib/authentication/components/SignOut.tsx +4 -2
- package/src/lib/authentication/providers/auth0.tsx +2 -2
- package/src/lib/authentication/providers/openid.tsx +53 -43
- package/src/lib/authentication/state.ts +1 -1
- package/src/lib/components/DevPortal.tsx +5 -7
- package/src/lib/components/Header.tsx +11 -3
- package/src/lib/core/DevPortalContext.ts +2 -0
- package/lib/AuthenticationPlugin-RvXALgvS.js +0 -52
- package/lib/AuthenticationPlugin-RvXALgvS.js.map +0 -1
- package/lib/Markdown-DsCvZnhw.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ir = Object.defineProperty;
|
|
2
2
|
var dt = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var j = (t, e, n) =>
|
|
7
|
-
var
|
|
5
|
+
var cr = (t, e, n) => e in t ? ir(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var j = (t, e, n) => cr(t, typeof e != "symbol" ? e + "" : e, n), ht = (t, e, n) => e.has(t) || dt("Cannot " + n);
|
|
7
|
+
var h = (t, e, n) => (ht(t, e, "read from private field"), n ? n.call(t) : e.get(t)), N = (t, e, n) => e.has(t) ? dt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), M = (t, e, n, r) => (ht(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
|
|
8
8
|
var be = (t, e, n, r) => ({
|
|
9
9
|
set _(a) {
|
|
10
10
|
M(t, e, a, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return h(t, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { H as _t, a as Ge, M as
|
|
17
|
-
import {
|
|
18
|
-
import { E as Et, u as
|
|
19
|
-
import { j as o, d as
|
|
20
|
-
import { M as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
16
|
+
import { H as _t, a as Ge, M as ur, A as lr, u as dr } from "./AnchorLink-DwUyvkrL.js";
|
|
17
|
+
import { d as hr, R as pr, N as $e, L as Re } from "./index-CjHZiWvQ.js";
|
|
18
|
+
import { E as Et, u as fr, S as mr, a as _e, R as gr } from "./SlotletProvider-ibdqvOie.js";
|
|
19
|
+
import { j as o, d as vr, u as W, a as xr, O as St } from "./jsx-runtime-D0NHp7nI.js";
|
|
20
|
+
import { M as yr, c as wr, a as jt, b as Nt, A as br, u as pe, h as Mr, d as y, e as Cr, F as Pr, D as Rr, C as _r, P as ie, f as qe, g as Er, i as Dt, R as Sr, S as jr, j as Nr, k as Dr, l as It, m as Ir, n as Ee, o as At, B as Be } from "./Combination-BMJg4xHo.js";
|
|
21
|
+
import { c as fe, a as P, C as Ar, b as Or, u as Tr, M as kr, T as Fr, V as Lr, d as He, e as Kr, f as $r } from "./Markdown-CSdXDuYx.js";
|
|
22
|
+
import * as u from "react";
|
|
23
|
+
import Br, { StrictMode as Ot, createContext as Tt, Component as Qr, createElement as pt, isValidElement as Ur, memo as kt, useMemo as Le, useContext as Gr, useState as Se, useEffect as se, Fragment as qr, useRef as De, forwardRef as Hr, Suspense as zr } from "react";
|
|
23
24
|
import { g as ze } from "./_commonjsHelpers-BVfed4GL.js";
|
|
24
25
|
import { r as Vr } from "./router-BiRCp01d.js";
|
|
25
|
-
import { S as Qe, c as
|
|
26
|
-
import { S as
|
|
26
|
+
import { S as Qe, c as Ft, P as Ie, R as Yr, I as Xr, a as Lt, T as Kt, C as $t, b as Wr } from "./Spinner-D0EmkS4m.js";
|
|
27
|
+
import { S as Bt, h as Qt, Q as Jr, n as E, m as ft, a as mt, b as $, e as Zr, c as ea, d as ta, f as na, o as gt, r as vt, g as ra, i as xt, p as yt, s as aa, u as Ve, j as oa, D as sa, k as Ye, l as wt, q as Ut, t as ia, v as ca, w as ua } from "./DevPortalProvider-DMrk4yw1.js";
|
|
27
28
|
/**
|
|
28
29
|
* @license lucide-react v0.378.0 - ISC
|
|
29
30
|
*
|
|
@@ -70,7 +71,7 @@ const ha = fe("MoonStar", [
|
|
|
70
71
|
* This source code is licensed under the ISC license.
|
|
71
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
73
|
*/
|
|
73
|
-
const
|
|
74
|
+
const pa = fe("Sun", [
|
|
74
75
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
75
76
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
76
77
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -81,11 +82,11 @@ const fa = fe("Sun", [
|
|
|
81
82
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
82
83
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
83
84
|
]);
|
|
84
|
-
function
|
|
85
|
+
function fa({ error: t }) {
|
|
85
86
|
return /* @__PURE__ */ o.jsx(Et, { error: t });
|
|
86
87
|
}
|
|
87
88
|
var me = {};
|
|
88
|
-
const ma = /* @__PURE__ */ ze(Vr), ga = /* @__PURE__ */ ze(
|
|
89
|
+
const ma = /* @__PURE__ */ ze(Vr), ga = /* @__PURE__ */ ze(vr), va = /* @__PURE__ */ ze(hr);
|
|
89
90
|
Object.defineProperty(me, "__esModule", { value: !0 });
|
|
90
91
|
var xa = Br, k = ma, We = ga, B = va;
|
|
91
92
|
function ya(t) {
|
|
@@ -117,7 +118,7 @@ function wa({
|
|
|
117
118
|
hash: n.hash || "",
|
|
118
119
|
state: n.state != null ? n.state : null,
|
|
119
120
|
key: n.key || "default"
|
|
120
|
-
}, i =
|
|
121
|
+
}, i = Gt();
|
|
121
122
|
return /* @__PURE__ */ O.createElement(B.Router, {
|
|
122
123
|
basename: t,
|
|
123
124
|
children: e,
|
|
@@ -137,26 +138,26 @@ function ba({
|
|
|
137
138
|
e && t || (process.env.NODE_ENV !== "production" ? k.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : k.UNSAFE_invariant(!1));
|
|
138
139
|
let a = {
|
|
139
140
|
router: e,
|
|
140
|
-
navigator:
|
|
141
|
+
navigator: Gt(),
|
|
141
142
|
static: !0,
|
|
142
143
|
staticContext: t,
|
|
143
144
|
basename: t.basename || "/"
|
|
144
145
|
}, s = /* @__PURE__ */ new Map(), i = "";
|
|
145
146
|
if (n !== !1) {
|
|
146
|
-
let
|
|
147
|
+
let l = {
|
|
147
148
|
loaderData: t.loaderData,
|
|
148
149
|
actionData: t.actionData,
|
|
149
150
|
errors: Ca(t.errors)
|
|
150
151
|
};
|
|
151
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${ja(JSON.stringify(JSON.stringify(
|
|
152
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${ja(JSON.stringify(JSON.stringify(l)))});`;
|
|
152
153
|
}
|
|
153
154
|
let {
|
|
154
|
-
state:
|
|
155
|
+
state: c
|
|
155
156
|
} = a.router;
|
|
156
157
|
return /* @__PURE__ */ O.createElement(O.Fragment, null, /* @__PURE__ */ O.createElement(B.UNSAFE_DataRouterContext.Provider, {
|
|
157
158
|
value: a
|
|
158
159
|
}, /* @__PURE__ */ O.createElement(B.UNSAFE_DataRouterStateContext.Provider, {
|
|
159
|
-
value:
|
|
160
|
+
value: c
|
|
160
161
|
}, /* @__PURE__ */ O.createElement(B.UNSAFE_FetchersContext.Provider, {
|
|
161
162
|
value: s
|
|
162
163
|
}, /* @__PURE__ */ O.createElement(B.UNSAFE_ViewTransitionContext.Provider, {
|
|
@@ -165,8 +166,8 @@ function ba({
|
|
|
165
166
|
}
|
|
166
167
|
}, /* @__PURE__ */ O.createElement(B.Router, {
|
|
167
168
|
basename: a.basename,
|
|
168
|
-
location:
|
|
169
|
-
navigationType:
|
|
169
|
+
location: c.location,
|
|
170
|
+
navigationType: c.historyAction,
|
|
170
171
|
navigator: a.navigator,
|
|
171
172
|
static: a.static,
|
|
172
173
|
future: {
|
|
@@ -175,7 +176,7 @@ function ba({
|
|
|
175
176
|
}, /* @__PURE__ */ O.createElement(Ma, {
|
|
176
177
|
routes: e.routes,
|
|
177
178
|
future: e.future,
|
|
178
|
-
state:
|
|
179
|
+
state: c
|
|
179
180
|
})))))), i ? /* @__PURE__ */ O.createElement("script", {
|
|
180
181
|
suppressHydrationWarning: !0,
|
|
181
182
|
nonce: r,
|
|
@@ -209,10 +210,10 @@ function Ca(t) {
|
|
|
209
210
|
} : n[r] = a;
|
|
210
211
|
return n;
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function Gt() {
|
|
213
214
|
return {
|
|
214
|
-
createHref:
|
|
215
|
-
encodeLocation:
|
|
215
|
+
createHref: qt,
|
|
216
|
+
encodeLocation: Ht,
|
|
216
217
|
push(t) {
|
|
217
218
|
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`);
|
|
218
219
|
},
|
|
@@ -237,25 +238,25 @@ function Pa(t, e) {
|
|
|
237
238
|
});
|
|
238
239
|
}
|
|
239
240
|
function Ra(t, e, n = {}) {
|
|
240
|
-
let r = {}, a = k.UNSAFE_convertRoutesToDataRoutes(t, We.UNSAFE_mapRouteProperties, void 0, r), s = e.matches.map((
|
|
241
|
-
let
|
|
241
|
+
let r = {}, a = k.UNSAFE_convertRoutesToDataRoutes(t, We.UNSAFE_mapRouteProperties, void 0, r), s = e.matches.map((c) => {
|
|
242
|
+
let l = r[c.route.id] || c.route;
|
|
242
243
|
return {
|
|
243
|
-
...
|
|
244
|
-
route:
|
|
244
|
+
...c,
|
|
245
|
+
route: l
|
|
245
246
|
};
|
|
246
|
-
}), i = (
|
|
247
|
+
}), i = (c) => `You cannot use router.${c}() on the server because it is a stateless environment`;
|
|
247
248
|
return {
|
|
248
249
|
get basename() {
|
|
249
250
|
return e.basename;
|
|
250
251
|
},
|
|
251
252
|
get future() {
|
|
252
|
-
var
|
|
253
|
+
var c, l;
|
|
253
254
|
return {
|
|
254
255
|
v7_fetcherPersist: !1,
|
|
255
256
|
v7_normalizeFormMethod: !1,
|
|
256
|
-
v7_partialHydration: ((
|
|
257
|
+
v7_partialHydration: ((c = n.future) == null ? void 0 : c.v7_partialHydration) === !0,
|
|
257
258
|
v7_prependBasename: !1,
|
|
258
|
-
v7_relativeSplatPath: ((
|
|
259
|
+
v7_relativeSplatPath: ((l = n.future) == null ? void 0 : l.v7_relativeSplatPath) === !0,
|
|
259
260
|
v7_skipActionErrorRevalidation: !1
|
|
260
261
|
};
|
|
261
262
|
},
|
|
@@ -299,8 +300,8 @@ function Ra(t, e, n = {}) {
|
|
|
299
300
|
revalidate() {
|
|
300
301
|
throw i("revalidate");
|
|
301
302
|
},
|
|
302
|
-
createHref:
|
|
303
|
-
encodeLocation:
|
|
303
|
+
createHref: qt,
|
|
304
|
+
encodeLocation: Ht,
|
|
304
305
|
getFetcher() {
|
|
305
306
|
return k.IDLE_FETCHER;
|
|
306
307
|
},
|
|
@@ -326,10 +327,10 @@ function Ra(t, e, n = {}) {
|
|
|
326
327
|
}
|
|
327
328
|
};
|
|
328
329
|
}
|
|
329
|
-
function
|
|
330
|
+
function qt(t) {
|
|
330
331
|
return typeof t == "string" ? t : B.createPath(t);
|
|
331
332
|
}
|
|
332
|
-
function
|
|
333
|
+
function Ht(t) {
|
|
333
334
|
let e = typeof t == "string" ? t : B.createPath(t);
|
|
334
335
|
e = e.replace(/ $/, "%20");
|
|
335
336
|
let n = _a.test(e) ? new URL(e) : new URL(e, "http://localhost");
|
|
@@ -356,19 +357,19 @@ me.createStaticRouter = Ra;
|
|
|
356
357
|
const Da = ({
|
|
357
358
|
router: t,
|
|
358
359
|
hydrate: e = !1
|
|
359
|
-
}) => /* @__PURE__ */ o.jsx(
|
|
360
|
+
}) => /* @__PURE__ */ o.jsx(Ot, { children: /* @__PURE__ */ o.jsx(_t, { children: /* @__PURE__ */ o.jsx(Qe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ o.jsx(pr, { router: t }) }) }) }), Ia = ({
|
|
360
361
|
router: t,
|
|
361
362
|
context: e,
|
|
362
363
|
helmetContext: n
|
|
363
|
-
}) => /* @__PURE__ */ o.jsx(
|
|
364
|
-
var T, Ct, Aa = (Ct = class extends
|
|
364
|
+
}) => /* @__PURE__ */ o.jsx(Ot, { children: /* @__PURE__ */ o.jsx(_t, { context: n, children: /* @__PURE__ */ o.jsx(Na, { router: t, context: e }) }) });
|
|
365
|
+
var T, Ct, Aa = (Ct = class extends Bt {
|
|
365
366
|
constructor(e = {}) {
|
|
366
367
|
super();
|
|
367
368
|
N(this, T);
|
|
368
369
|
this.config = e, M(this, T, /* @__PURE__ */ new Map());
|
|
369
370
|
}
|
|
370
371
|
build(e, n, r) {
|
|
371
|
-
const a = n.queryKey, s = n.queryHash ??
|
|
372
|
+
const a = n.queryKey, s = n.queryHash ?? Qt(a, n);
|
|
372
373
|
let i = this.get(s);
|
|
373
374
|
return i || (i = new Jr({
|
|
374
375
|
cache: this,
|
|
@@ -380,14 +381,14 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
380
381
|
}), this.add(i)), i;
|
|
381
382
|
}
|
|
382
383
|
add(e) {
|
|
383
|
-
|
|
384
|
+
h(this, T).has(e.queryHash) || (h(this, T).set(e.queryHash, e), this.notify({
|
|
384
385
|
type: "added",
|
|
385
386
|
query: e
|
|
386
387
|
}));
|
|
387
388
|
}
|
|
388
389
|
remove(e) {
|
|
389
|
-
const n =
|
|
390
|
-
n && (e.destroy(), n === e &&
|
|
390
|
+
const n = h(this, T).get(e.queryHash);
|
|
391
|
+
n && (e.destroy(), n === e && h(this, T).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
391
392
|
}
|
|
392
393
|
clear() {
|
|
393
394
|
E.batch(() => {
|
|
@@ -397,20 +398,20 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
397
398
|
});
|
|
398
399
|
}
|
|
399
400
|
get(e) {
|
|
400
|
-
return
|
|
401
|
+
return h(this, T).get(e);
|
|
401
402
|
}
|
|
402
403
|
getAll() {
|
|
403
|
-
return [...
|
|
404
|
+
return [...h(this, T).values()];
|
|
404
405
|
}
|
|
405
406
|
find(e) {
|
|
406
407
|
const n = { exact: !0, ...e };
|
|
407
408
|
return this.getAll().find(
|
|
408
|
-
(r) =>
|
|
409
|
+
(r) => ft(n, r)
|
|
409
410
|
);
|
|
410
411
|
}
|
|
411
412
|
findAll(e = {}) {
|
|
412
413
|
const n = this.getAll();
|
|
413
|
-
return Object.keys(e).length > 0 ? n.filter((r) =>
|
|
414
|
+
return Object.keys(e).length > 0 ? n.filter((r) => ft(e, r)) : n;
|
|
414
415
|
}
|
|
415
416
|
notify(e) {
|
|
416
417
|
E.batch(() => {
|
|
@@ -433,7 +434,7 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
433
434
|
});
|
|
434
435
|
});
|
|
435
436
|
}
|
|
436
|
-
}, T = new WeakMap(), Ct), _, he, Pt, Oa = (Pt = class extends
|
|
437
|
+
}, T = new WeakMap(), Ct), _, he, Pt, Oa = (Pt = class extends Bt {
|
|
437
438
|
constructor(e = {}) {
|
|
438
439
|
super();
|
|
439
440
|
N(this, _);
|
|
@@ -441,7 +442,7 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
441
442
|
this.config = e, M(this, _, /* @__PURE__ */ new Map()), M(this, he, Date.now());
|
|
442
443
|
}
|
|
443
444
|
build(e, n, r) {
|
|
444
|
-
const a = new
|
|
445
|
+
const a = new yr({
|
|
445
446
|
mutationCache: this,
|
|
446
447
|
mutationId: ++be(this, he)._,
|
|
447
448
|
options: e.defaultMutationOptions(n),
|
|
@@ -450,26 +451,26 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
450
451
|
return this.add(a), a;
|
|
451
452
|
}
|
|
452
453
|
add(e) {
|
|
453
|
-
const n =
|
|
454
|
-
r.push(e),
|
|
454
|
+
const n = Me(e), r = h(this, _).get(n) ?? [];
|
|
455
|
+
r.push(e), h(this, _).set(n, r), this.notify({ type: "added", mutation: e });
|
|
455
456
|
}
|
|
456
457
|
remove(e) {
|
|
457
458
|
var r;
|
|
458
|
-
const n =
|
|
459
|
-
if (
|
|
460
|
-
const a = (r =
|
|
461
|
-
a && (a.length === 0 ?
|
|
459
|
+
const n = Me(e);
|
|
460
|
+
if (h(this, _).has(n)) {
|
|
461
|
+
const a = (r = h(this, _).get(n)) == null ? void 0 : r.filter((s) => s !== e);
|
|
462
|
+
a && (a.length === 0 ? h(this, _).delete(n) : h(this, _).set(n, a));
|
|
462
463
|
}
|
|
463
464
|
this.notify({ type: "removed", mutation: e });
|
|
464
465
|
}
|
|
465
466
|
canRun(e) {
|
|
466
467
|
var r;
|
|
467
|
-
const n = (r =
|
|
468
|
+
const n = (r = h(this, _).get(Me(e))) == null ? void 0 : r.find((a) => a.state.status === "pending");
|
|
468
469
|
return !n || n === e;
|
|
469
470
|
}
|
|
470
471
|
runNext(e) {
|
|
471
472
|
var r;
|
|
472
|
-
const n = (r =
|
|
473
|
+
const n = (r = h(this, _).get(Me(e))) == null ? void 0 : r.find((a) => a !== e && a.state.isPaused);
|
|
473
474
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
474
475
|
}
|
|
475
476
|
clear() {
|
|
@@ -480,7 +481,7 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
480
481
|
});
|
|
481
482
|
}
|
|
482
483
|
getAll() {
|
|
483
|
-
return [...
|
|
484
|
+
return [...h(this, _).values()].flat();
|
|
484
485
|
}
|
|
485
486
|
find(e) {
|
|
486
487
|
const n = { exact: !0, ...e };
|
|
@@ -507,7 +508,7 @@ var T, Ct, Aa = (Ct = class extends $t {
|
|
|
507
508
|
);
|
|
508
509
|
}
|
|
509
510
|
}, _ = new WeakMap(), he = new WeakMap(), Pt);
|
|
510
|
-
function
|
|
511
|
+
function Me(t) {
|
|
511
512
|
var e;
|
|
512
513
|
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
513
514
|
}
|
|
@@ -516,17 +517,17 @@ function Ta(t) {
|
|
|
516
517
|
onFetch: (e, n) => {
|
|
517
518
|
const r = async () => {
|
|
518
519
|
var x, R, F, Q, V;
|
|
519
|
-
const a = e.options, s = (F = (R = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : F.direction, i = ((Q = e.state.data) == null ? void 0 : Q.pages) || [],
|
|
520
|
-
let
|
|
521
|
-
const
|
|
520
|
+
const a = e.options, s = (F = (R = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : F.direction, i = ((Q = e.state.data) == null ? void 0 : Q.pages) || [], c = ((V = e.state.data) == null ? void 0 : V.pageParams) || [], l = { pages: [], pageParams: [] };
|
|
521
|
+
let p = !1;
|
|
522
|
+
const f = (b) => {
|
|
522
523
|
Object.defineProperty(b, "signal", {
|
|
523
524
|
enumerable: !0,
|
|
524
|
-
get: () => (e.signal.aborted ?
|
|
525
|
-
|
|
525
|
+
get: () => (e.signal.aborted ? p = !0 : e.signal.addEventListener("abort", () => {
|
|
526
|
+
p = !0;
|
|
526
527
|
}), e.signal)
|
|
527
528
|
});
|
|
528
|
-
}, d = Zr(e.options, e.fetchOptions),
|
|
529
|
-
if (
|
|
529
|
+
}, d = Zr(e.options, e.fetchOptions), m = async (b, I, L) => {
|
|
530
|
+
if (p)
|
|
530
531
|
return Promise.reject();
|
|
531
532
|
if (I == null && b.pages.length)
|
|
532
533
|
return Promise.resolve(b);
|
|
@@ -536,7 +537,7 @@ function Ta(t) {
|
|
|
536
537
|
direction: L ? "backward" : "forward",
|
|
537
538
|
meta: e.options.meta
|
|
538
539
|
};
|
|
539
|
-
|
|
540
|
+
f(Y);
|
|
540
541
|
const Z = await d(
|
|
541
542
|
Y
|
|
542
543
|
), { maxPages: ye } = e.options, X = L ? ea : ta;
|
|
@@ -549,18 +550,18 @@ function Ta(t) {
|
|
|
549
550
|
if (s && i.length) {
|
|
550
551
|
const b = s === "backward", I = b ? ka : bt, L = {
|
|
551
552
|
pages: i,
|
|
552
|
-
pageParams:
|
|
553
|
+
pageParams: c
|
|
553
554
|
}, Y = I(a, L);
|
|
554
|
-
v = await
|
|
555
|
+
v = await m(L, Y, b);
|
|
555
556
|
} else {
|
|
556
|
-
v = await
|
|
557
|
-
|
|
558
|
-
|
|
557
|
+
v = await m(
|
|
558
|
+
l,
|
|
559
|
+
c[0] ?? a.initialPageParam
|
|
559
560
|
);
|
|
560
561
|
const b = t ?? i.length;
|
|
561
562
|
for (let I = 1; I < b; I++) {
|
|
562
563
|
const L = bt(a, v);
|
|
563
|
-
v = await
|
|
564
|
+
v = await m(v, L);
|
|
564
565
|
}
|
|
565
566
|
}
|
|
566
567
|
return v;
|
|
@@ -613,52 +614,52 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
613
614
|
M(this, w, t.queryCache || new Aa()), M(this, G, t.mutationCache || new Oa()), M(this, q, t.defaultOptions || {}), M(this, ne, /* @__PURE__ */ new Map()), M(this, re, /* @__PURE__ */ new Map()), M(this, H, 0);
|
|
614
615
|
}
|
|
615
616
|
mount() {
|
|
616
|
-
be(this, H)._++,
|
|
617
|
-
t && (await this.resumePausedMutations(),
|
|
617
|
+
be(this, H)._++, h(this, H) === 1 && (M(this, ae, na.subscribe(async (t) => {
|
|
618
|
+
t && (await this.resumePausedMutations(), h(this, w).onFocus());
|
|
618
619
|
})), M(this, oe, gt.subscribe(async (t) => {
|
|
619
|
-
t && (await this.resumePausedMutations(),
|
|
620
|
+
t && (await this.resumePausedMutations(), h(this, w).onOnline());
|
|
620
621
|
})));
|
|
621
622
|
}
|
|
622
623
|
unmount() {
|
|
623
624
|
var t, e;
|
|
624
|
-
be(this, H)._--,
|
|
625
|
+
be(this, H)._--, h(this, H) === 0 && ((t = h(this, ae)) == null || t.call(this), M(this, ae, void 0), (e = h(this, oe)) == null || e.call(this), M(this, oe, void 0));
|
|
625
626
|
}
|
|
626
627
|
isFetching(t) {
|
|
627
|
-
return
|
|
628
|
+
return h(this, w).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
628
629
|
}
|
|
629
630
|
isMutating(t) {
|
|
630
|
-
return
|
|
631
|
+
return h(this, G).findAll({ ...t, status: "pending" }).length;
|
|
631
632
|
}
|
|
632
633
|
getQueryData(t) {
|
|
633
634
|
var n;
|
|
634
635
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
635
|
-
return (n =
|
|
636
|
+
return (n = h(this, w).get(e.queryHash)) == null ? void 0 : n.state.data;
|
|
636
637
|
}
|
|
637
638
|
ensureQueryData(t) {
|
|
638
639
|
const e = this.getQueryData(t.queryKey);
|
|
639
640
|
if (e === void 0)
|
|
640
641
|
return this.fetchQuery(t);
|
|
641
642
|
{
|
|
642
|
-
const n = this.defaultQueryOptions(t), r =
|
|
643
|
+
const n = this.defaultQueryOptions(t), r = h(this, w).build(this, n);
|
|
643
644
|
return t.revalidateIfStale && r.isStaleByTime(vt(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(e);
|
|
644
645
|
}
|
|
645
646
|
}
|
|
646
647
|
getQueriesData(t) {
|
|
647
|
-
return
|
|
648
|
+
return h(this, w).findAll(t).map(({ queryKey: e, state: n }) => {
|
|
648
649
|
const r = n.data;
|
|
649
650
|
return [e, r];
|
|
650
651
|
});
|
|
651
652
|
}
|
|
652
653
|
setQueryData(t, e, n) {
|
|
653
|
-
const r = this.defaultQueryOptions({ queryKey: t }), a =
|
|
654
|
+
const r = this.defaultQueryOptions({ queryKey: t }), a = h(this, w).get(
|
|
654
655
|
r.queryHash
|
|
655
656
|
), s = a == null ? void 0 : a.state.data, i = ra(e, s);
|
|
656
657
|
if (i !== void 0)
|
|
657
|
-
return
|
|
658
|
+
return h(this, w).build(this, r).setData(i, { ...n, manual: !0 });
|
|
658
659
|
}
|
|
659
660
|
setQueriesData(t, e, n) {
|
|
660
661
|
return E.batch(
|
|
661
|
-
() =>
|
|
662
|
+
() => h(this, w).findAll(t).map(({ queryKey: r }) => [
|
|
662
663
|
r,
|
|
663
664
|
this.setQueryData(r, e, n)
|
|
664
665
|
])
|
|
@@ -667,10 +668,10 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
667
668
|
getQueryState(t) {
|
|
668
669
|
var n;
|
|
669
670
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
670
|
-
return (n =
|
|
671
|
+
return (n = h(this, w).get(e.queryHash)) == null ? void 0 : n.state;
|
|
671
672
|
}
|
|
672
673
|
removeQueries(t) {
|
|
673
|
-
const e =
|
|
674
|
+
const e = h(this, w);
|
|
674
675
|
E.batch(() => {
|
|
675
676
|
e.findAll(t).forEach((n) => {
|
|
676
677
|
e.remove(n);
|
|
@@ -678,7 +679,7 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
678
679
|
});
|
|
679
680
|
}
|
|
680
681
|
resetQueries(t, e) {
|
|
681
|
-
const n =
|
|
682
|
+
const n = h(this, w), r = {
|
|
682
683
|
type: "active",
|
|
683
684
|
...t
|
|
684
685
|
};
|
|
@@ -688,13 +689,13 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
688
689
|
}
|
|
689
690
|
cancelQueries(t = {}, e = {}) {
|
|
690
691
|
const n = { revert: !0, ...e }, r = E.batch(
|
|
691
|
-
() =>
|
|
692
|
+
() => h(this, w).findAll(t).map((a) => a.cancel(n))
|
|
692
693
|
);
|
|
693
694
|
return Promise.all(r).then($).catch($);
|
|
694
695
|
}
|
|
695
696
|
invalidateQueries(t = {}, e = {}) {
|
|
696
697
|
return E.batch(() => {
|
|
697
|
-
if (
|
|
698
|
+
if (h(this, w).findAll(t).forEach((r) => {
|
|
698
699
|
r.invalidate();
|
|
699
700
|
}), t.refetchType === "none")
|
|
700
701
|
return Promise.resolve();
|
|
@@ -710,7 +711,7 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
710
711
|
...e,
|
|
711
712
|
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
712
713
|
}, r = E.batch(
|
|
713
|
-
() =>
|
|
714
|
+
() => h(this, w).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
|
|
714
715
|
let s = a.fetch(void 0, n);
|
|
715
716
|
return n.throwOnError || (s = s.catch($)), a.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
716
717
|
})
|
|
@@ -720,7 +721,7 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
720
721
|
fetchQuery(t) {
|
|
721
722
|
const e = this.defaultQueryOptions(t);
|
|
722
723
|
e.retry === void 0 && (e.retry = !1);
|
|
723
|
-
const n =
|
|
724
|
+
const n = h(this, w).build(this, e);
|
|
724
725
|
return n.isStaleByTime(
|
|
725
726
|
vt(e.staleTime, n)
|
|
726
727
|
) ? n.fetch(e) : Promise.resolve(n.state.data);
|
|
@@ -735,41 +736,41 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
735
736
|
return this.fetchInfiniteQuery(t).then($).catch($);
|
|
736
737
|
}
|
|
737
738
|
resumePausedMutations() {
|
|
738
|
-
return gt.isOnline() ?
|
|
739
|
+
return gt.isOnline() ? h(this, G).resumePausedMutations() : Promise.resolve();
|
|
739
740
|
}
|
|
740
741
|
getQueryCache() {
|
|
741
|
-
return
|
|
742
|
+
return h(this, w);
|
|
742
743
|
}
|
|
743
744
|
getMutationCache() {
|
|
744
|
-
return
|
|
745
|
+
return h(this, G);
|
|
745
746
|
}
|
|
746
747
|
getDefaultOptions() {
|
|
747
|
-
return
|
|
748
|
+
return h(this, q);
|
|
748
749
|
}
|
|
749
750
|
setDefaultOptions(t) {
|
|
750
751
|
M(this, q, t);
|
|
751
752
|
}
|
|
752
753
|
setQueryDefaults(t, e) {
|
|
753
|
-
|
|
754
|
+
h(this, ne).set(xt(t), {
|
|
754
755
|
queryKey: t,
|
|
755
756
|
defaultOptions: e
|
|
756
757
|
});
|
|
757
758
|
}
|
|
758
759
|
getQueryDefaults(t) {
|
|
759
|
-
const e = [...
|
|
760
|
+
const e = [...h(this, ne).values()];
|
|
760
761
|
let n = {};
|
|
761
762
|
return e.forEach((r) => {
|
|
762
763
|
yt(t, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
763
764
|
}), n;
|
|
764
765
|
}
|
|
765
766
|
setMutationDefaults(t, e) {
|
|
766
|
-
|
|
767
|
+
h(this, re).set(xt(t), {
|
|
767
768
|
mutationKey: t,
|
|
768
769
|
defaultOptions: e
|
|
769
770
|
});
|
|
770
771
|
}
|
|
771
772
|
getMutationDefaults(t) {
|
|
772
|
-
const e = [...
|
|
773
|
+
const e = [...h(this, re).values()];
|
|
773
774
|
let n = {};
|
|
774
775
|
return e.forEach((r) => {
|
|
775
776
|
yt(t, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
@@ -779,35 +780,35 @@ var w, G, q, ne, re, H, ae, oe, Rt, Fa = (Rt = class {
|
|
|
779
780
|
if (t._defaulted)
|
|
780
781
|
return t;
|
|
781
782
|
const e = {
|
|
782
|
-
...
|
|
783
|
+
...h(this, q).queries,
|
|
783
784
|
...this.getQueryDefaults(t.queryKey),
|
|
784
785
|
...t,
|
|
785
786
|
_defaulted: !0
|
|
786
787
|
};
|
|
787
|
-
return e.queryHash || (e.queryHash =
|
|
788
|
+
return e.queryHash || (e.queryHash = Qt(
|
|
788
789
|
e.queryKey,
|
|
789
790
|
e
|
|
790
791
|
)), 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 === aa && (e.enabled = !1), e;
|
|
791
792
|
}
|
|
792
793
|
defaultMutationOptions(t) {
|
|
793
794
|
return t != null && t._defaulted ? t : {
|
|
794
|
-
...
|
|
795
|
+
...h(this, q).mutations,
|
|
795
796
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
796
797
|
...t,
|
|
797
798
|
_defaulted: !0
|
|
798
799
|
};
|
|
799
800
|
}
|
|
800
801
|
clear() {
|
|
801
|
-
|
|
802
|
+
h(this, w).clear(), h(this, G).clear();
|
|
802
803
|
}
|
|
803
804
|
}, w = new WeakMap(), G = new WeakMap(), q = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), H = new WeakMap(), ae = new WeakMap(), oe = new WeakMap(), Rt);
|
|
804
|
-
const La =
|
|
805
|
+
const La = Tt(null), Ke = {
|
|
805
806
|
didCatch: !1,
|
|
806
807
|
error: null
|
|
807
808
|
};
|
|
808
809
|
class Ka extends Qr {
|
|
809
810
|
constructor(e) {
|
|
810
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
811
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Ke;
|
|
811
812
|
}
|
|
812
813
|
static getDerivedStateFromError(e) {
|
|
813
814
|
return {
|
|
@@ -825,7 +826,7 @@ class Ka extends Qr {
|
|
|
825
826
|
(n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
|
|
826
827
|
args: s,
|
|
827
828
|
reason: "imperative-api"
|
|
828
|
-
}), this.setState(
|
|
829
|
+
}), this.setState(Ke);
|
|
829
830
|
}
|
|
830
831
|
}
|
|
831
832
|
componentDidCatch(e, n) {
|
|
@@ -844,7 +845,7 @@ class Ka extends Qr {
|
|
|
844
845
|
next: a,
|
|
845
846
|
prev: e.resetKeys,
|
|
846
847
|
reason: "keys"
|
|
847
|
-
}), this.setState(
|
|
848
|
+
}), this.setState(Ke);
|
|
848
849
|
}
|
|
849
850
|
}
|
|
850
851
|
render() {
|
|
@@ -857,35 +858,35 @@ class Ka extends Qr {
|
|
|
857
858
|
didCatch: s,
|
|
858
859
|
error: i
|
|
859
860
|
} = this.state;
|
|
860
|
-
let
|
|
861
|
+
let c = e;
|
|
861
862
|
if (s) {
|
|
862
|
-
const
|
|
863
|
+
const l = {
|
|
863
864
|
error: i,
|
|
864
865
|
resetErrorBoundary: this.resetErrorBoundary
|
|
865
866
|
};
|
|
866
867
|
if (typeof n == "function")
|
|
867
|
-
|
|
868
|
+
c = n(l);
|
|
868
869
|
else if (r)
|
|
869
|
-
|
|
870
|
+
c = pt(r, l);
|
|
870
871
|
else if (a === null || Ur(a))
|
|
871
|
-
|
|
872
|
+
c = a;
|
|
872
873
|
else
|
|
873
874
|
throw i;
|
|
874
875
|
}
|
|
875
|
-
return
|
|
876
|
+
return pt(La.Provider, {
|
|
876
877
|
value: {
|
|
877
878
|
didCatch: s,
|
|
878
879
|
error: i,
|
|
879
880
|
resetErrorBoundary: this.resetErrorBoundary
|
|
880
881
|
}
|
|
881
|
-
},
|
|
882
|
+
}, c);
|
|
882
883
|
}
|
|
883
884
|
}
|
|
884
885
|
function $a() {
|
|
885
886
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
886
887
|
return t.length !== e.length || t.some((n, r) => !Object.is(n, e[r]));
|
|
887
888
|
}
|
|
888
|
-
const Ba = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Qa = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Ua = (t) => "initialize" in t && typeof t.initialize == "function", Ga = (t) => "getHead" in t && typeof t.getHead == "function", qa = (t) => "getIdentities" in t && typeof t.getIdentities == "function",
|
|
889
|
+
const Ba = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Qa = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Ua = (t) => "initialize" in t && typeof t.initialize == "function", Ga = (t) => "getHead" in t && typeof t.getHead == "function", qa = (t) => "getIdentities" in t && typeof t.getIdentities == "function", zt = new Fa();
|
|
889
890
|
class Ha {
|
|
890
891
|
constructor(e) {
|
|
891
892
|
j(this, "plugins", []);
|
|
@@ -903,7 +904,7 @@ class Ha {
|
|
|
903
904
|
]);
|
|
904
905
|
});
|
|
905
906
|
j(this, "invalidateCache", async (e) => {
|
|
906
|
-
await
|
|
907
|
+
await zt.invalidateQueries({ queryKey: e });
|
|
907
908
|
});
|
|
908
909
|
j(this, "getApiIdentities", async () => (await Promise.all(
|
|
909
910
|
this.plugins.filter(qa).map((n) => n.getIdentities(this))
|
|
@@ -922,48 +923,48 @@ class Ha {
|
|
|
922
923
|
const n = await this.authentication.getAccessToken();
|
|
923
924
|
return e.headers.set("Authorization", `Bearer ${n}`), e;
|
|
924
925
|
});
|
|
925
|
-
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(Qa), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
|
|
926
|
+
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(Qa), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.initialize();
|
|
926
927
|
}
|
|
927
928
|
}
|
|
928
929
|
function za({ error: t, resetErrorBoundary: e }) {
|
|
929
930
|
return /* @__PURE__ */ o.jsx(Et, { error: t });
|
|
930
931
|
}
|
|
931
|
-
const
|
|
932
|
-
(!
|
|
933
|
-
var Ue = ["Enter", " "], Va = ["ArrowDown", "PageUp", "Home"],
|
|
932
|
+
const Ce = globalThis;
|
|
933
|
+
(!Ce.requestIdleCallback || !Ce.cancelIdleCallback) && (Ce.requestIdleCallback = (t) => setTimeout(t, 1), Ce.cancelIdleCallback = clearTimeout);
|
|
934
|
+
var Ue = ["Enter", " "], Va = ["ArrowDown", "PageUp", "Home"], Vt = ["ArrowUp", "PageDown", "End"], Ya = [...Va, ...Vt], Xa = {
|
|
934
935
|
ltr: [...Ue, "ArrowRight"],
|
|
935
936
|
rtl: [...Ue, "ArrowLeft"]
|
|
936
937
|
}, Wa = {
|
|
937
938
|
ltr: ["ArrowLeft"],
|
|
938
939
|
rtl: ["ArrowRight"]
|
|
939
|
-
}, ge = "Menu", [le, Ja, Za] =
|
|
940
|
+
}, ge = "Menu", [le, Ja, Za] = wr(ge), [J, Yt] = jt(ge, [
|
|
940
941
|
Za,
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
]), ve =
|
|
944
|
-
const { __scopeMenu: e, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = t,
|
|
945
|
-
return
|
|
942
|
+
Nt,
|
|
943
|
+
Ft
|
|
944
|
+
]), ve = Nt(), Xt = Ft(), [Wt, z] = J(ge), [eo, xe] = J(ge), Jt = (t) => {
|
|
945
|
+
const { __scopeMenu: e, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = t, c = ve(e), [l, p] = u.useState(null), f = u.useRef(!1), d = qe(s), m = Dr(a);
|
|
946
|
+
return u.useEffect(() => {
|
|
946
947
|
const v = () => {
|
|
947
|
-
|
|
948
|
-
}, x = () =>
|
|
948
|
+
f.current = !0, document.addEventListener("pointerdown", x, { capture: !0, once: !0 }), document.addEventListener("pointermove", x, { capture: !0, once: !0 });
|
|
949
|
+
}, x = () => f.current = !1;
|
|
949
950
|
return document.addEventListener("keydown", v, { capture: !0 }), () => {
|
|
950
951
|
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", x, { capture: !0 }), document.removeEventListener("pointermove", x, { capture: !0 });
|
|
951
952
|
};
|
|
952
|
-
}, []), /* @__PURE__ */ o.jsx(
|
|
953
|
-
|
|
953
|
+
}, []), /* @__PURE__ */ o.jsx(It, { ...c, children: /* @__PURE__ */ o.jsx(
|
|
954
|
+
Wt,
|
|
954
955
|
{
|
|
955
956
|
scope: e,
|
|
956
957
|
open: n,
|
|
957
958
|
onOpenChange: d,
|
|
958
|
-
content:
|
|
959
|
-
onContentChange:
|
|
959
|
+
content: l,
|
|
960
|
+
onContentChange: p,
|
|
960
961
|
children: /* @__PURE__ */ o.jsx(
|
|
961
962
|
eo,
|
|
962
963
|
{
|
|
963
964
|
scope: e,
|
|
964
|
-
onClose:
|
|
965
|
-
isUsingKeyboardRef:
|
|
966
|
-
dir:
|
|
965
|
+
onClose: u.useCallback(() => d(!1), [d]),
|
|
966
|
+
isUsingKeyboardRef: f,
|
|
967
|
+
dir: m,
|
|
967
968
|
modal: i,
|
|
968
969
|
children: r
|
|
969
970
|
}
|
|
@@ -971,32 +972,32 @@ var Ue = ["Enter", " "], Va = ["ArrowDown", "PageUp", "Home"], zt = ["ArrowUp",
|
|
|
971
972
|
}
|
|
972
973
|
) });
|
|
973
974
|
};
|
|
974
|
-
|
|
975
|
-
var to = "MenuAnchor", Je =
|
|
975
|
+
Jt.displayName = ge;
|
|
976
|
+
var to = "MenuAnchor", Je = u.forwardRef(
|
|
976
977
|
(t, e) => {
|
|
977
978
|
const { __scopeMenu: n, ...r } = t, a = ve(n);
|
|
978
|
-
return /* @__PURE__ */ o.jsx(
|
|
979
|
+
return /* @__PURE__ */ o.jsx(br, { ...a, ...r, ref: e });
|
|
979
980
|
}
|
|
980
981
|
);
|
|
981
982
|
Je.displayName = to;
|
|
982
|
-
var Ze = "MenuPortal", [no,
|
|
983
|
+
var Ze = "MenuPortal", [no, Zt] = J(Ze, {
|
|
983
984
|
forceMount: void 0
|
|
984
|
-
}),
|
|
985
|
+
}), en = (t) => {
|
|
985
986
|
const { __scopeMenu: e, forceMount: n, children: r, container: a } = t, s = z(Ze, e);
|
|
986
|
-
return /* @__PURE__ */ o.jsx(no, { scope: e, forceMount: n, children: /* @__PURE__ */ o.jsx(Ie, { present: n || s.open, children: /* @__PURE__ */ o.jsx(
|
|
987
|
+
return /* @__PURE__ */ o.jsx(no, { scope: e, forceMount: n, children: /* @__PURE__ */ o.jsx(Ie, { present: n || s.open, children: /* @__PURE__ */ o.jsx(Ir, { asChild: !0, container: a, children: r }) }) });
|
|
987
988
|
};
|
|
988
|
-
|
|
989
|
-
var D = "MenuContent", [ro, et] = J(D),
|
|
989
|
+
en.displayName = Ze;
|
|
990
|
+
var D = "MenuContent", [ro, et] = J(D), tn = u.forwardRef(
|
|
990
991
|
(t, e) => {
|
|
991
|
-
const n =
|
|
992
|
+
const n = Zt(D, t.__scopeMenu), { forceMount: r = n.forceMount, ...a } = t, s = z(D, t.__scopeMenu), i = xe(D, t.__scopeMenu);
|
|
992
993
|
return /* @__PURE__ */ o.jsx(le.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(Ie, { present: r || s.open, children: /* @__PURE__ */ o.jsx(le.Slot, { scope: t.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(ao, { ...a, ref: e }) : /* @__PURE__ */ o.jsx(oo, { ...a, ref: e }) }) }) });
|
|
993
994
|
}
|
|
994
|
-
), ao =
|
|
995
|
+
), ao = u.forwardRef(
|
|
995
996
|
(t, e) => {
|
|
996
|
-
const n = z(D, t.__scopeMenu), r =
|
|
997
|
-
return
|
|
997
|
+
const n = z(D, t.__scopeMenu), r = u.useRef(null), a = pe(e, r);
|
|
998
|
+
return u.useEffect(() => {
|
|
998
999
|
const s = r.current;
|
|
999
|
-
if (s) return
|
|
1000
|
+
if (s) return Mr(s);
|
|
1000
1001
|
}, []), /* @__PURE__ */ o.jsx(
|
|
1001
1002
|
tt,
|
|
1002
1003
|
{
|
|
@@ -1014,7 +1015,7 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1014
1015
|
}
|
|
1015
1016
|
);
|
|
1016
1017
|
}
|
|
1017
|
-
), oo =
|
|
1018
|
+
), oo = u.forwardRef((t, e) => {
|
|
1018
1019
|
const n = z(D, t.__scopeMenu);
|
|
1019
1020
|
return /* @__PURE__ */ o.jsx(
|
|
1020
1021
|
tt,
|
|
@@ -1027,7 +1028,7 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1027
1028
|
onDismiss: () => n.onOpenChange(!1)
|
|
1028
1029
|
}
|
|
1029
1030
|
);
|
|
1030
|
-
}), tt =
|
|
1031
|
+
}), tt = u.forwardRef(
|
|
1031
1032
|
(t, e) => {
|
|
1032
1033
|
const {
|
|
1033
1034
|
__scopeMenu: n,
|
|
@@ -1035,24 +1036,24 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1035
1036
|
trapFocus: a,
|
|
1036
1037
|
onOpenAutoFocus: s,
|
|
1037
1038
|
onCloseAutoFocus: i,
|
|
1038
|
-
disableOutsidePointerEvents:
|
|
1039
|
-
onEntryFocus:
|
|
1040
|
-
onEscapeKeyDown:
|
|
1041
|
-
onPointerDownOutside:
|
|
1039
|
+
disableOutsidePointerEvents: c,
|
|
1040
|
+
onEntryFocus: l,
|
|
1041
|
+
onEscapeKeyDown: p,
|
|
1042
|
+
onPointerDownOutside: f,
|
|
1042
1043
|
onFocusOutside: d,
|
|
1043
|
-
onInteractOutside:
|
|
1044
|
+
onInteractOutside: m,
|
|
1044
1045
|
onDismiss: v,
|
|
1045
1046
|
disableOutsideScroll: x,
|
|
1046
1047
|
...R
|
|
1047
|
-
} = t, F = z(D, n), Q = xe(D, n), V = ve(n), b =
|
|
1048
|
+
} = t, F = z(D, n), Q = xe(D, n), V = ve(n), b = Xt(n), I = Ja(n), [L, Y] = u.useState(null), Z = u.useRef(null), ye = pe(e, Z, F.onContentChange), X = u.useRef(0), we = u.useRef(""), rr = u.useRef(0), Oe = u.useRef(null), it = u.useRef("right"), Te = u.useRef(0), ar = x ? Sr : u.Fragment, or = x ? { as: jr, allowPinchZoom: !0 } : void 0, sr = (g) => {
|
|
1048
1049
|
var te, ut;
|
|
1049
1050
|
const S = we.current + g, A = I().filter((K) => !K.disabled), U = document.activeElement, ke = (te = A.find((K) => K.ref.current === U)) == null ? void 0 : te.textValue, Fe = A.map((K) => K.textValue), ct = xo(Fe, S, ke), ce = (ut = A.find((K) => K.textValue === ct)) == null ? void 0 : ut.ref.current;
|
|
1050
1051
|
(function K(lt) {
|
|
1051
1052
|
we.current = lt, window.clearTimeout(X.current), lt !== "" && (X.current = window.setTimeout(() => K(""), 1e3));
|
|
1052
1053
|
})(S), ce && setTimeout(() => ce.focus());
|
|
1053
1054
|
};
|
|
1054
|
-
|
|
1055
|
-
const ee =
|
|
1055
|
+
u.useEffect(() => () => window.clearTimeout(X.current), []), Cr();
|
|
1056
|
+
const ee = u.useCallback((g) => {
|
|
1056
1057
|
var A, U;
|
|
1057
1058
|
return it.current === ((A = Oe.current) == null ? void 0 : A.side) && wo(g, (U = Oe.current) == null ? void 0 : U.area);
|
|
1058
1059
|
}, []);
|
|
@@ -1061,31 +1062,31 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1061
1062
|
{
|
|
1062
1063
|
scope: n,
|
|
1063
1064
|
searchRef: we,
|
|
1064
|
-
onItemEnter:
|
|
1065
|
+
onItemEnter: u.useCallback(
|
|
1065
1066
|
(g) => {
|
|
1066
1067
|
ee(g) && g.preventDefault();
|
|
1067
1068
|
},
|
|
1068
1069
|
[ee]
|
|
1069
1070
|
),
|
|
1070
|
-
onItemLeave:
|
|
1071
|
+
onItemLeave: u.useCallback(
|
|
1071
1072
|
(g) => {
|
|
1072
1073
|
var S;
|
|
1073
1074
|
ee(g) || ((S = Z.current) == null || S.focus(), Y(null));
|
|
1074
1075
|
},
|
|
1075
1076
|
[ee]
|
|
1076
1077
|
),
|
|
1077
|
-
onTriggerLeave:
|
|
1078
|
+
onTriggerLeave: u.useCallback(
|
|
1078
1079
|
(g) => {
|
|
1079
1080
|
ee(g) && g.preventDefault();
|
|
1080
1081
|
},
|
|
1081
1082
|
[ee]
|
|
1082
1083
|
),
|
|
1083
|
-
pointerGraceTimerRef:
|
|
1084
|
-
onPointerGraceIntentChange:
|
|
1084
|
+
pointerGraceTimerRef: rr,
|
|
1085
|
+
onPointerGraceIntentChange: u.useCallback((g) => {
|
|
1085
1086
|
Oe.current = g;
|
|
1086
1087
|
}, []),
|
|
1087
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1088
|
-
|
|
1088
|
+
children: /* @__PURE__ */ o.jsx(ar, { ...or, children: /* @__PURE__ */ o.jsx(
|
|
1089
|
+
Pr,
|
|
1089
1090
|
{
|
|
1090
1091
|
asChild: !0,
|
|
1091
1092
|
trapped: a,
|
|
@@ -1095,14 +1096,14 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1095
1096
|
}),
|
|
1096
1097
|
onUnmountAutoFocus: i,
|
|
1097
1098
|
children: /* @__PURE__ */ o.jsx(
|
|
1098
|
-
|
|
1099
|
+
Rr,
|
|
1099
1100
|
{
|
|
1100
1101
|
asChild: !0,
|
|
1101
|
-
disableOutsidePointerEvents:
|
|
1102
|
-
onEscapeKeyDown:
|
|
1103
|
-
onPointerDownOutside:
|
|
1102
|
+
disableOutsidePointerEvents: c,
|
|
1103
|
+
onEscapeKeyDown: p,
|
|
1104
|
+
onPointerDownOutside: f,
|
|
1104
1105
|
onFocusOutside: d,
|
|
1105
|
-
onInteractOutside:
|
|
1106
|
+
onInteractOutside: m,
|
|
1106
1107
|
onDismiss: v,
|
|
1107
1108
|
children: /* @__PURE__ */ o.jsx(
|
|
1108
1109
|
Yr,
|
|
@@ -1114,16 +1115,16 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1114
1115
|
loop: r,
|
|
1115
1116
|
currentTabStopId: L,
|
|
1116
1117
|
onCurrentTabStopIdChange: Y,
|
|
1117
|
-
onEntryFocus: y(
|
|
1118
|
+
onEntryFocus: y(l, (g) => {
|
|
1118
1119
|
Q.isUsingKeyboardRef.current || g.preventDefault();
|
|
1119
1120
|
}),
|
|
1120
1121
|
preventScrollOnEntryFocus: !0,
|
|
1121
1122
|
children: /* @__PURE__ */ o.jsx(
|
|
1122
|
-
|
|
1123
|
+
_r,
|
|
1123
1124
|
{
|
|
1124
1125
|
role: "menu",
|
|
1125
1126
|
"aria-orientation": "vertical",
|
|
1126
|
-
"data-state":
|
|
1127
|
+
"data-state": yn(F.open),
|
|
1127
1128
|
"data-radix-menu-content": "",
|
|
1128
1129
|
dir: Q.dir,
|
|
1129
1130
|
...V,
|
|
@@ -1132,12 +1133,12 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1132
1133
|
style: { outline: "none", ...R.style },
|
|
1133
1134
|
onKeyDown: y(R.onKeyDown, (g) => {
|
|
1134
1135
|
const A = g.target.closest("[data-radix-menu-content]") === g.currentTarget, U = g.ctrlKey || g.altKey || g.metaKey, ke = g.key.length === 1;
|
|
1135
|
-
A && (g.key === "Tab" && g.preventDefault(), !U && ke &&
|
|
1136
|
+
A && (g.key === "Tab" && g.preventDefault(), !U && ke && sr(g.key));
|
|
1136
1137
|
const Fe = Z.current;
|
|
1137
1138
|
if (g.target !== Fe || !Ya.includes(g.key)) return;
|
|
1138
1139
|
g.preventDefault();
|
|
1139
1140
|
const ce = I().filter((te) => !te.disabled).map((te) => te.ref.current);
|
|
1140
|
-
|
|
1141
|
+
Vt.includes(g.key) && ce.reverse(), go(ce);
|
|
1141
1142
|
}),
|
|
1142
1143
|
onBlur: y(t.onBlur, (g) => {
|
|
1143
1144
|
g.currentTarget.contains(g.target) || (window.clearTimeout(X.current), we.current = "");
|
|
@@ -1164,75 +1165,75 @@ var D = "MenuContent", [ro, et] = J(D), en = c.forwardRef(
|
|
|
1164
1165
|
);
|
|
1165
1166
|
}
|
|
1166
1167
|
);
|
|
1167
|
-
|
|
1168
|
-
var so = "MenuGroup", nt =
|
|
1168
|
+
tn.displayName = D;
|
|
1169
|
+
var so = "MenuGroup", nt = u.forwardRef(
|
|
1169
1170
|
(t, e) => {
|
|
1170
1171
|
const { __scopeMenu: n, ...r } = t;
|
|
1171
1172
|
return /* @__PURE__ */ o.jsx(ie.div, { role: "group", ...r, ref: e });
|
|
1172
1173
|
}
|
|
1173
1174
|
);
|
|
1174
1175
|
nt.displayName = so;
|
|
1175
|
-
var io = "MenuLabel",
|
|
1176
|
+
var io = "MenuLabel", nn = u.forwardRef(
|
|
1176
1177
|
(t, e) => {
|
|
1177
1178
|
const { __scopeMenu: n, ...r } = t;
|
|
1178
1179
|
return /* @__PURE__ */ o.jsx(ie.div, { ...r, ref: e });
|
|
1179
1180
|
}
|
|
1180
1181
|
);
|
|
1181
|
-
|
|
1182
|
-
var je = "MenuItem", Mt = "menu.itemSelect", Ae =
|
|
1182
|
+
nn.displayName = io;
|
|
1183
|
+
var je = "MenuItem", Mt = "menu.itemSelect", Ae = u.forwardRef(
|
|
1183
1184
|
(t, e) => {
|
|
1184
|
-
const { disabled: n = !1, onSelect: r, ...a } = t, s =
|
|
1185
|
+
const { disabled: n = !1, onSelect: r, ...a } = t, s = u.useRef(null), i = xe(je, t.__scopeMenu), c = et(je, t.__scopeMenu), l = pe(e, s), p = u.useRef(!1), f = () => {
|
|
1185
1186
|
const d = s.current;
|
|
1186
1187
|
if (!n && d) {
|
|
1187
|
-
const
|
|
1188
|
-
d.addEventListener(Mt, (v) => r == null ? void 0 : r(v), { once: !0 }),
|
|
1188
|
+
const m = new CustomEvent(Mt, { bubbles: !0, cancelable: !0 });
|
|
1189
|
+
d.addEventListener(Mt, (v) => r == null ? void 0 : r(v), { once: !0 }), Nr(d, m), m.defaultPrevented ? p.current = !1 : i.onClose();
|
|
1189
1190
|
}
|
|
1190
1191
|
};
|
|
1191
1192
|
return /* @__PURE__ */ o.jsx(
|
|
1192
|
-
|
|
1193
|
+
rn,
|
|
1193
1194
|
{
|
|
1194
1195
|
...a,
|
|
1195
|
-
ref:
|
|
1196
|
+
ref: l,
|
|
1196
1197
|
disabled: n,
|
|
1197
|
-
onClick: y(t.onClick,
|
|
1198
|
+
onClick: y(t.onClick, f),
|
|
1198
1199
|
onPointerDown: (d) => {
|
|
1199
|
-
var
|
|
1200
|
-
(
|
|
1200
|
+
var m;
|
|
1201
|
+
(m = t.onPointerDown) == null || m.call(t, d), p.current = !0;
|
|
1201
1202
|
},
|
|
1202
1203
|
onPointerUp: y(t.onPointerUp, (d) => {
|
|
1203
|
-
var
|
|
1204
|
-
|
|
1204
|
+
var m;
|
|
1205
|
+
p.current || (m = d.currentTarget) == null || m.click();
|
|
1205
1206
|
}),
|
|
1206
1207
|
onKeyDown: y(t.onKeyDown, (d) => {
|
|
1207
|
-
const
|
|
1208
|
-
n ||
|
|
1208
|
+
const m = c.searchRef.current !== "";
|
|
1209
|
+
n || m && d.key === " " || Ue.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
|
|
1209
1210
|
})
|
|
1210
1211
|
}
|
|
1211
1212
|
);
|
|
1212
1213
|
}
|
|
1213
1214
|
);
|
|
1214
1215
|
Ae.displayName = je;
|
|
1215
|
-
var
|
|
1216
|
+
var rn = u.forwardRef(
|
|
1216
1217
|
(t, e) => {
|
|
1217
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = t, i = et(je, n),
|
|
1218
|
-
return
|
|
1219
|
-
const x =
|
|
1218
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = t, i = et(je, n), c = Xt(n), l = u.useRef(null), p = pe(e, l), [f, d] = u.useState(!1), [m, v] = u.useState("");
|
|
1219
|
+
return u.useEffect(() => {
|
|
1220
|
+
const x = l.current;
|
|
1220
1221
|
x && v((x.textContent ?? "").trim());
|
|
1221
1222
|
}, [s.children]), /* @__PURE__ */ o.jsx(
|
|
1222
1223
|
le.ItemSlot,
|
|
1223
1224
|
{
|
|
1224
1225
|
scope: n,
|
|
1225
1226
|
disabled: r,
|
|
1226
|
-
textValue: a ??
|
|
1227
|
-
children: /* @__PURE__ */ o.jsx(Xr, { asChild: !0, ...
|
|
1227
|
+
textValue: a ?? m,
|
|
1228
|
+
children: /* @__PURE__ */ o.jsx(Xr, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ o.jsx(
|
|
1228
1229
|
ie.div,
|
|
1229
1230
|
{
|
|
1230
1231
|
role: "menuitem",
|
|
1231
|
-
"data-highlighted":
|
|
1232
|
+
"data-highlighted": f ? "" : void 0,
|
|
1232
1233
|
"aria-disabled": r || void 0,
|
|
1233
1234
|
"data-disabled": r ? "" : void 0,
|
|
1234
1235
|
...s,
|
|
1235
|
-
ref:
|
|
1236
|
+
ref: p,
|
|
1236
1237
|
onPointerMove: y(
|
|
1237
1238
|
t.onPointerMove,
|
|
1238
1239
|
de((x) => {
|
|
@@ -1250,10 +1251,10 @@ var nn = c.forwardRef(
|
|
|
1250
1251
|
}
|
|
1251
1252
|
);
|
|
1252
1253
|
}
|
|
1253
|
-
), co = "MenuCheckboxItem",
|
|
1254
|
+
), co = "MenuCheckboxItem", an = u.forwardRef(
|
|
1254
1255
|
(t, e) => {
|
|
1255
1256
|
const { checked: n = !1, onCheckedChange: r, ...a } = t;
|
|
1256
|
-
return /* @__PURE__ */ o.jsx(
|
|
1257
|
+
return /* @__PURE__ */ o.jsx(ln, { scope: t.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
|
|
1257
1258
|
Ae,
|
|
1258
1259
|
{
|
|
1259
1260
|
role: "menuitemcheckbox",
|
|
@@ -1270,22 +1271,22 @@ var nn = c.forwardRef(
|
|
|
1270
1271
|
) });
|
|
1271
1272
|
}
|
|
1272
1273
|
);
|
|
1273
|
-
|
|
1274
|
-
var
|
|
1275
|
-
|
|
1274
|
+
an.displayName = co;
|
|
1275
|
+
var on = "MenuRadioGroup", [uo, lo] = J(
|
|
1276
|
+
on,
|
|
1276
1277
|
{ value: void 0, onValueChange: () => {
|
|
1277
1278
|
} }
|
|
1278
|
-
),
|
|
1279
|
+
), sn = u.forwardRef(
|
|
1279
1280
|
(t, e) => {
|
|
1280
|
-
const { value: n, onValueChange: r, ...a } = t, s =
|
|
1281
|
+
const { value: n, onValueChange: r, ...a } = t, s = qe(r);
|
|
1281
1282
|
return /* @__PURE__ */ o.jsx(uo, { scope: t.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(nt, { ...a, ref: e }) });
|
|
1282
1283
|
}
|
|
1283
1284
|
);
|
|
1284
|
-
|
|
1285
|
-
var
|
|
1285
|
+
sn.displayName = on;
|
|
1286
|
+
var cn = "MenuRadioItem", un = u.forwardRef(
|
|
1286
1287
|
(t, e) => {
|
|
1287
|
-
const { value: n, ...r } = t, a = lo(
|
|
1288
|
-
return /* @__PURE__ */ o.jsx(
|
|
1288
|
+
const { value: n, ...r } = t, a = lo(cn, t.__scopeMenu), s = n === a.value;
|
|
1289
|
+
return /* @__PURE__ */ o.jsx(ln, { scope: t.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
|
|
1289
1290
|
Ae,
|
|
1290
1291
|
{
|
|
1291
1292
|
role: "menuitemradio",
|
|
@@ -1305,11 +1306,11 @@ var sn = "MenuRadioItem", cn = c.forwardRef(
|
|
|
1305
1306
|
) });
|
|
1306
1307
|
}
|
|
1307
1308
|
);
|
|
1308
|
-
|
|
1309
|
-
var rt = "MenuItemIndicator", [
|
|
1309
|
+
un.displayName = cn;
|
|
1310
|
+
var rt = "MenuItemIndicator", [ln, ho] = J(
|
|
1310
1311
|
rt,
|
|
1311
1312
|
{ checked: !1 }
|
|
1312
|
-
),
|
|
1313
|
+
), dn = u.forwardRef(
|
|
1313
1314
|
(t, e) => {
|
|
1314
1315
|
const { __scopeMenu: n, forceMount: r, ...a } = t, s = ho(rt, n);
|
|
1315
1316
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1328,8 +1329,8 @@ var rt = "MenuItemIndicator", [un, ho] = J(
|
|
|
1328
1329
|
);
|
|
1329
1330
|
}
|
|
1330
1331
|
);
|
|
1331
|
-
|
|
1332
|
-
var
|
|
1332
|
+
dn.displayName = rt;
|
|
1333
|
+
var po = "MenuSeparator", hn = u.forwardRef(
|
|
1333
1334
|
(t, e) => {
|
|
1334
1335
|
const { __scopeMenu: n, ...r } = t;
|
|
1335
1336
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1343,68 +1344,68 @@ var fo = "MenuSeparator", dn = c.forwardRef(
|
|
|
1343
1344
|
);
|
|
1344
1345
|
}
|
|
1345
1346
|
);
|
|
1346
|
-
|
|
1347
|
-
var
|
|
1347
|
+
hn.displayName = po;
|
|
1348
|
+
var fo = "MenuArrow", pn = u.forwardRef(
|
|
1348
1349
|
(t, e) => {
|
|
1349
1350
|
const { __scopeMenu: n, ...r } = t, a = ve(n);
|
|
1350
|
-
return /* @__PURE__ */ o.jsx(
|
|
1351
|
+
return /* @__PURE__ */ o.jsx(Er, { ...a, ...r, ref: e });
|
|
1351
1352
|
}
|
|
1352
1353
|
);
|
|
1353
|
-
|
|
1354
|
-
var at = "MenuSub", [mo, fn] = J(at),
|
|
1355
|
-
const { __scopeMenu: e, children: n, open: r = !1, onOpenChange: a } = t, s = z(at, e), i = ve(e), [
|
|
1356
|
-
return
|
|
1357
|
-
|
|
1354
|
+
pn.displayName = fo;
|
|
1355
|
+
var at = "MenuSub", [mo, fn] = J(at), mn = (t) => {
|
|
1356
|
+
const { __scopeMenu: e, children: n, open: r = !1, onOpenChange: a } = t, s = z(at, e), i = ve(e), [c, l] = u.useState(null), [p, f] = u.useState(null), d = qe(a);
|
|
1357
|
+
return u.useEffect(() => (s.open === !1 && d(!1), () => d(!1)), [s.open, d]), /* @__PURE__ */ o.jsx(It, { ...i, children: /* @__PURE__ */ o.jsx(
|
|
1358
|
+
Wt,
|
|
1358
1359
|
{
|
|
1359
1360
|
scope: e,
|
|
1360
1361
|
open: r,
|
|
1361
1362
|
onOpenChange: d,
|
|
1362
|
-
content:
|
|
1363
|
-
onContentChange:
|
|
1363
|
+
content: p,
|
|
1364
|
+
onContentChange: f,
|
|
1364
1365
|
children: /* @__PURE__ */ o.jsx(
|
|
1365
1366
|
mo,
|
|
1366
1367
|
{
|
|
1367
1368
|
scope: e,
|
|
1368
|
-
contentId:
|
|
1369
|
-
triggerId:
|
|
1370
|
-
trigger:
|
|
1371
|
-
onTriggerChange:
|
|
1369
|
+
contentId: Ee(),
|
|
1370
|
+
triggerId: Ee(),
|
|
1371
|
+
trigger: c,
|
|
1372
|
+
onTriggerChange: l,
|
|
1372
1373
|
children: n
|
|
1373
1374
|
}
|
|
1374
1375
|
)
|
|
1375
1376
|
}
|
|
1376
1377
|
) });
|
|
1377
1378
|
};
|
|
1378
|
-
|
|
1379
|
-
var ue = "MenuSubTrigger",
|
|
1379
|
+
mn.displayName = at;
|
|
1380
|
+
var ue = "MenuSubTrigger", gn = u.forwardRef(
|
|
1380
1381
|
(t, e) => {
|
|
1381
|
-
const n = z(ue, t.__scopeMenu), r = xe(ue, t.__scopeMenu), a = fn(ue, t.__scopeMenu), s = et(ue, t.__scopeMenu), i =
|
|
1382
|
+
const n = z(ue, t.__scopeMenu), r = xe(ue, t.__scopeMenu), a = fn(ue, t.__scopeMenu), s = et(ue, t.__scopeMenu), i = u.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: l } = s, p = { __scopeMenu: t.__scopeMenu }, f = u.useCallback(() => {
|
|
1382
1383
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1383
1384
|
}, []);
|
|
1384
|
-
return
|
|
1385
|
-
const d =
|
|
1385
|
+
return u.useEffect(() => f, [f]), u.useEffect(() => {
|
|
1386
|
+
const d = c.current;
|
|
1386
1387
|
return () => {
|
|
1387
|
-
window.clearTimeout(d),
|
|
1388
|
+
window.clearTimeout(d), l(null);
|
|
1388
1389
|
};
|
|
1389
|
-
}, [
|
|
1390
|
-
|
|
1390
|
+
}, [c, l]), /* @__PURE__ */ o.jsx(Je, { asChild: !0, ...p, children: /* @__PURE__ */ o.jsx(
|
|
1391
|
+
rn,
|
|
1391
1392
|
{
|
|
1392
1393
|
id: a.triggerId,
|
|
1393
1394
|
"aria-haspopup": "menu",
|
|
1394
1395
|
"aria-expanded": n.open,
|
|
1395
1396
|
"aria-controls": a.contentId,
|
|
1396
|
-
"data-state":
|
|
1397
|
+
"data-state": yn(n.open),
|
|
1397
1398
|
...t,
|
|
1398
|
-
ref:
|
|
1399
|
+
ref: Dt(e, a.onTriggerChange),
|
|
1399
1400
|
onClick: (d) => {
|
|
1400
|
-
var
|
|
1401
|
-
(
|
|
1401
|
+
var m;
|
|
1402
|
+
(m = t.onClick) == null || m.call(t, d), !(t.disabled || d.defaultPrevented) && (d.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1402
1403
|
},
|
|
1403
1404
|
onPointerMove: y(
|
|
1404
1405
|
t.onPointerMove,
|
|
1405
1406
|
de((d) => {
|
|
1406
1407
|
s.onItemEnter(d), !d.defaultPrevented && !t.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1407
|
-
n.onOpenChange(!0),
|
|
1408
|
+
n.onOpenChange(!0), f();
|
|
1408
1409
|
}, 100));
|
|
1409
1410
|
})
|
|
1410
1411
|
),
|
|
@@ -1412,22 +1413,22 @@ var ue = "MenuSubTrigger", mn = c.forwardRef(
|
|
|
1412
1413
|
t.onPointerLeave,
|
|
1413
1414
|
de((d) => {
|
|
1414
1415
|
var v, x;
|
|
1415
|
-
|
|
1416
|
-
const
|
|
1417
|
-
if (
|
|
1418
|
-
const R = (x = n.content) == null ? void 0 : x.dataset.side, F = R === "right", Q = F ? -5 : 5, V =
|
|
1416
|
+
f();
|
|
1417
|
+
const m = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
|
|
1418
|
+
if (m) {
|
|
1419
|
+
const R = (x = n.content) == null ? void 0 : x.dataset.side, F = R === "right", Q = F ? -5 : 5, V = m[F ? "left" : "right"], b = m[F ? "right" : "left"];
|
|
1419
1420
|
s.onPointerGraceIntentChange({
|
|
1420
1421
|
area: [
|
|
1421
1422
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1422
1423
|
// consistently within polygon bounds
|
|
1423
1424
|
{ x: d.clientX + Q, y: d.clientY },
|
|
1424
|
-
{ x: V, y:
|
|
1425
|
-
{ x: b, y:
|
|
1426
|
-
{ x: b, y:
|
|
1427
|
-
{ x: V, y:
|
|
1425
|
+
{ x: V, y: m.top },
|
|
1426
|
+
{ x: b, y: m.top },
|
|
1427
|
+
{ x: b, y: m.bottom },
|
|
1428
|
+
{ x: V, y: m.bottom }
|
|
1428
1429
|
],
|
|
1429
1430
|
side: R
|
|
1430
|
-
}), window.clearTimeout(
|
|
1431
|
+
}), window.clearTimeout(c.current), c.current = window.setTimeout(
|
|
1431
1432
|
() => s.onPointerGraceIntentChange(null),
|
|
1432
1433
|
300
|
|
1433
1434
|
);
|
|
@@ -1439,51 +1440,51 @@ var ue = "MenuSubTrigger", mn = c.forwardRef(
|
|
|
1439
1440
|
),
|
|
1440
1441
|
onKeyDown: y(t.onKeyDown, (d) => {
|
|
1441
1442
|
var v;
|
|
1442
|
-
const
|
|
1443
|
-
t.disabled ||
|
|
1443
|
+
const m = s.searchRef.current !== "";
|
|
1444
|
+
t.disabled || m && d.key === " " || Xa[r.dir].includes(d.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), d.preventDefault());
|
|
1444
1445
|
})
|
|
1445
1446
|
}
|
|
1446
1447
|
) });
|
|
1447
1448
|
}
|
|
1448
1449
|
);
|
|
1449
|
-
|
|
1450
|
-
var
|
|
1450
|
+
gn.displayName = ue;
|
|
1451
|
+
var vn = "MenuSubContent", xn = u.forwardRef(
|
|
1451
1452
|
(t, e) => {
|
|
1452
|
-
const n =
|
|
1453
|
+
const n = Zt(D, t.__scopeMenu), { forceMount: r = n.forceMount, ...a } = t, s = z(D, t.__scopeMenu), i = xe(D, t.__scopeMenu), c = fn(vn, t.__scopeMenu), l = u.useRef(null), p = pe(e, l);
|
|
1453
1454
|
return /* @__PURE__ */ o.jsx(le.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(Ie, { present: r || s.open, children: /* @__PURE__ */ o.jsx(le.Slot, { scope: t.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
1454
1455
|
tt,
|
|
1455
1456
|
{
|
|
1456
|
-
id:
|
|
1457
|
-
"aria-labelledby":
|
|
1457
|
+
id: c.contentId,
|
|
1458
|
+
"aria-labelledby": c.triggerId,
|
|
1458
1459
|
...a,
|
|
1459
|
-
ref:
|
|
1460
|
+
ref: p,
|
|
1460
1461
|
align: "start",
|
|
1461
1462
|
side: i.dir === "rtl" ? "left" : "right",
|
|
1462
1463
|
disableOutsidePointerEvents: !1,
|
|
1463
1464
|
disableOutsideScroll: !1,
|
|
1464
1465
|
trapFocus: !1,
|
|
1465
|
-
onOpenAutoFocus: (
|
|
1466
|
+
onOpenAutoFocus: (f) => {
|
|
1466
1467
|
var d;
|
|
1467
|
-
i.isUsingKeyboardRef.current && ((d =
|
|
1468
|
+
i.isUsingKeyboardRef.current && ((d = l.current) == null || d.focus()), f.preventDefault();
|
|
1468
1469
|
},
|
|
1469
|
-
onCloseAutoFocus: (
|
|
1470
|
-
onFocusOutside: y(t.onFocusOutside, (
|
|
1471
|
-
|
|
1470
|
+
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
1471
|
+
onFocusOutside: y(t.onFocusOutside, (f) => {
|
|
1472
|
+
f.target !== c.trigger && s.onOpenChange(!1);
|
|
1472
1473
|
}),
|
|
1473
|
-
onEscapeKeyDown: y(t.onEscapeKeyDown, (
|
|
1474
|
-
i.onClose(),
|
|
1474
|
+
onEscapeKeyDown: y(t.onEscapeKeyDown, (f) => {
|
|
1475
|
+
i.onClose(), f.preventDefault();
|
|
1475
1476
|
}),
|
|
1476
|
-
onKeyDown: y(t.onKeyDown, (
|
|
1477
|
+
onKeyDown: y(t.onKeyDown, (f) => {
|
|
1477
1478
|
var v;
|
|
1478
|
-
const d =
|
|
1479
|
-
d &&
|
|
1479
|
+
const d = f.currentTarget.contains(f.target), m = Wa[i.dir].includes(f.key);
|
|
1480
|
+
d && m && (s.onOpenChange(!1), (v = c.trigger) == null || v.focus(), f.preventDefault());
|
|
1480
1481
|
})
|
|
1481
1482
|
}
|
|
1482
1483
|
) }) }) });
|
|
1483
1484
|
}
|
|
1484
1485
|
);
|
|
1485
|
-
|
|
1486
|
-
function
|
|
1486
|
+
xn.displayName = vn;
|
|
1487
|
+
function yn(t) {
|
|
1487
1488
|
return t ? "open" : "closed";
|
|
1488
1489
|
}
|
|
1489
1490
|
function Ne(t) {
|
|
@@ -1501,20 +1502,20 @@ function vo(t, e) {
|
|
|
1501
1502
|
return t.map((n, r) => t[(e + r) % t.length]);
|
|
1502
1503
|
}
|
|
1503
1504
|
function xo(t, e, n) {
|
|
1504
|
-
const a = e.length > 1 && Array.from(e).every((
|
|
1505
|
+
const a = e.length > 1 && Array.from(e).every((p) => p === e[0]) ? e[0] : e, s = n ? t.indexOf(n) : -1;
|
|
1505
1506
|
let i = vo(t, Math.max(s, 0));
|
|
1506
|
-
a.length === 1 && (i = i.filter((
|
|
1507
|
-
const
|
|
1508
|
-
(
|
|
1507
|
+
a.length === 1 && (i = i.filter((p) => p !== n));
|
|
1508
|
+
const l = i.find(
|
|
1509
|
+
(p) => p.toLowerCase().startsWith(a.toLowerCase())
|
|
1509
1510
|
);
|
|
1510
|
-
return
|
|
1511
|
+
return l !== n ? l : void 0;
|
|
1511
1512
|
}
|
|
1512
1513
|
function yo(t, e) {
|
|
1513
1514
|
const { x: n, y: r } = t;
|
|
1514
1515
|
let a = !1;
|
|
1515
1516
|
for (let s = 0, i = e.length - 1; s < e.length; i = s++) {
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1517
|
+
const c = e[s].x, l = e[s].y, p = e[i].x, f = e[i].y;
|
|
1518
|
+
l > r != f > r && n < (p - c) * (r - l) / (f - l) + c && (a = !a);
|
|
1518
1519
|
}
|
|
1519
1520
|
return a;
|
|
1520
1521
|
}
|
|
@@ -1526,10 +1527,10 @@ function wo(t, e) {
|
|
|
1526
1527
|
function de(t) {
|
|
1527
1528
|
return (e) => e.pointerType === "mouse" ? t(e) : void 0;
|
|
1528
1529
|
}
|
|
1529
|
-
var bo =
|
|
1530
|
+
var bo = Jt, Mo = Je, Co = en, Po = tn, Ro = nt, _o = nn, Eo = Ae, So = an, jo = sn, No = un, Do = dn, Io = hn, Ao = pn, Oo = mn, To = gn, ko = xn, st = "DropdownMenu", [Fo, Os] = jt(
|
|
1530
1531
|
st,
|
|
1531
|
-
[
|
|
1532
|
-
), C =
|
|
1532
|
+
[Yt]
|
|
1533
|
+
), C = Yt(), [Lo, wn] = Fo(st), bn = (t) => {
|
|
1533
1534
|
const {
|
|
1534
1535
|
__scopeDropdownMenu: e,
|
|
1535
1536
|
children: n,
|
|
@@ -1537,8 +1538,8 @@ var bo = Wt, Mo = Je, Co = Zt, Po = en, Ro = nt, _o = tn, Eo = Ae, So = rn, jo =
|
|
|
1537
1538
|
open: a,
|
|
1538
1539
|
defaultOpen: s,
|
|
1539
1540
|
onOpenChange: i,
|
|
1540
|
-
modal:
|
|
1541
|
-
} = t,
|
|
1541
|
+
modal: c = !0
|
|
1542
|
+
} = t, l = C(e), p = u.useRef(null), [f = !1, d] = At({
|
|
1542
1543
|
prop: a,
|
|
1543
1544
|
defaultProp: s,
|
|
1544
1545
|
onChange: i
|
|
@@ -1547,21 +1548,21 @@ var bo = Wt, Mo = Je, Co = Zt, Po = en, Ro = nt, _o = tn, Eo = Ae, So = rn, jo =
|
|
|
1547
1548
|
Lo,
|
|
1548
1549
|
{
|
|
1549
1550
|
scope: e,
|
|
1550
|
-
triggerId:
|
|
1551
|
-
triggerRef:
|
|
1552
|
-
contentId:
|
|
1553
|
-
open:
|
|
1551
|
+
triggerId: Ee(),
|
|
1552
|
+
triggerRef: p,
|
|
1553
|
+
contentId: Ee(),
|
|
1554
|
+
open: f,
|
|
1554
1555
|
onOpenChange: d,
|
|
1555
|
-
onOpenToggle:
|
|
1556
|
-
modal:
|
|
1557
|
-
children: /* @__PURE__ */ o.jsx(bo, { ...
|
|
1556
|
+
onOpenToggle: u.useCallback(() => d((m) => !m), [d]),
|
|
1557
|
+
modal: c,
|
|
1558
|
+
children: /* @__PURE__ */ o.jsx(bo, { ...l, open: f, onOpenChange: d, dir: r, modal: c, children: n })
|
|
1558
1559
|
}
|
|
1559
1560
|
);
|
|
1560
1561
|
};
|
|
1561
|
-
|
|
1562
|
-
var
|
|
1562
|
+
bn.displayName = st;
|
|
1563
|
+
var Mn = "DropdownMenuTrigger", Cn = u.forwardRef(
|
|
1563
1564
|
(t, e) => {
|
|
1564
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = t, s =
|
|
1565
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = t, s = wn(Mn, n), i = C(n);
|
|
1565
1566
|
return /* @__PURE__ */ o.jsx(Mo, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
|
|
1566
1567
|
ie.button,
|
|
1567
1568
|
{
|
|
@@ -1574,26 +1575,26 @@ var bn = "DropdownMenuTrigger", Mn = c.forwardRef(
|
|
|
1574
1575
|
"data-disabled": r ? "" : void 0,
|
|
1575
1576
|
disabled: r,
|
|
1576
1577
|
...a,
|
|
1577
|
-
ref:
|
|
1578
|
-
onPointerDown: y(t.onPointerDown, (
|
|
1579
|
-
!r &&
|
|
1578
|
+
ref: Dt(e, s.triggerRef),
|
|
1579
|
+
onPointerDown: y(t.onPointerDown, (c) => {
|
|
1580
|
+
!r && c.button === 0 && c.ctrlKey === !1 && (s.onOpenToggle(), s.open || c.preventDefault());
|
|
1580
1581
|
}),
|
|
1581
|
-
onKeyDown: y(t.onKeyDown, (
|
|
1582
|
-
r || (["Enter", " "].includes(
|
|
1582
|
+
onKeyDown: y(t.onKeyDown, (c) => {
|
|
1583
|
+
r || (["Enter", " "].includes(c.key) && s.onOpenToggle(), c.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(c.key) && c.preventDefault());
|
|
1583
1584
|
})
|
|
1584
1585
|
}
|
|
1585
1586
|
) });
|
|
1586
1587
|
}
|
|
1587
1588
|
);
|
|
1588
|
-
|
|
1589
|
-
var Ko = "DropdownMenuPortal",
|
|
1589
|
+
Cn.displayName = Mn;
|
|
1590
|
+
var Ko = "DropdownMenuPortal", Pn = (t) => {
|
|
1590
1591
|
const { __scopeDropdownMenu: e, ...n } = t, r = C(e);
|
|
1591
1592
|
return /* @__PURE__ */ o.jsx(Co, { ...r, ...n });
|
|
1592
1593
|
};
|
|
1593
|
-
|
|
1594
|
-
var
|
|
1594
|
+
Pn.displayName = Ko;
|
|
1595
|
+
var Rn = "DropdownMenuContent", _n = u.forwardRef(
|
|
1595
1596
|
(t, e) => {
|
|
1596
|
-
const { __scopeDropdownMenu: n, ...r } = t, a =
|
|
1597
|
+
const { __scopeDropdownMenu: n, ...r } = t, a = wn(Rn, n), s = C(n), i = u.useRef(!1);
|
|
1597
1598
|
return /* @__PURE__ */ o.jsx(
|
|
1598
1599
|
Po,
|
|
1599
1600
|
{
|
|
@@ -1602,13 +1603,13 @@ var Pn = "DropdownMenuContent", Rn = c.forwardRef(
|
|
|
1602
1603
|
...s,
|
|
1603
1604
|
...r,
|
|
1604
1605
|
ref: e,
|
|
1605
|
-
onCloseAutoFocus: y(t.onCloseAutoFocus, (
|
|
1606
|
-
var
|
|
1607
|
-
i.current || (
|
|
1606
|
+
onCloseAutoFocus: y(t.onCloseAutoFocus, (c) => {
|
|
1607
|
+
var l;
|
|
1608
|
+
i.current || (l = a.triggerRef.current) == null || l.focus(), i.current = !1, c.preventDefault();
|
|
1608
1609
|
}),
|
|
1609
|
-
onInteractOutside: y(t.onInteractOutside, (
|
|
1610
|
-
const
|
|
1611
|
-
(!a.modal ||
|
|
1610
|
+
onInteractOutside: y(t.onInteractOutside, (c) => {
|
|
1611
|
+
const l = c.detail.originalEvent, p = l.button === 0 && l.ctrlKey === !0, f = l.button === 2 || p;
|
|
1612
|
+
(!a.modal || f) && (i.current = !0);
|
|
1612
1613
|
}),
|
|
1613
1614
|
style: {
|
|
1614
1615
|
...t.style,
|
|
@@ -1622,54 +1623,54 @@ var Pn = "DropdownMenuContent", Rn = c.forwardRef(
|
|
|
1622
1623
|
);
|
|
1623
1624
|
}
|
|
1624
1625
|
);
|
|
1625
|
-
|
|
1626
|
-
var $o = "DropdownMenuGroup", Bo =
|
|
1626
|
+
_n.displayName = Rn;
|
|
1627
|
+
var $o = "DropdownMenuGroup", Bo = u.forwardRef(
|
|
1627
1628
|
(t, e) => {
|
|
1628
1629
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1629
1630
|
return /* @__PURE__ */ o.jsx(Ro, { ...a, ...r, ref: e });
|
|
1630
1631
|
}
|
|
1631
1632
|
);
|
|
1632
1633
|
Bo.displayName = $o;
|
|
1633
|
-
var Qo = "DropdownMenuLabel",
|
|
1634
|
+
var Qo = "DropdownMenuLabel", En = u.forwardRef(
|
|
1634
1635
|
(t, e) => {
|
|
1635
1636
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1636
1637
|
return /* @__PURE__ */ o.jsx(_o, { ...a, ...r, ref: e });
|
|
1637
1638
|
}
|
|
1638
1639
|
);
|
|
1639
|
-
|
|
1640
|
-
var Uo = "DropdownMenuItem",
|
|
1640
|
+
En.displayName = Qo;
|
|
1641
|
+
var Uo = "DropdownMenuItem", Sn = u.forwardRef(
|
|
1641
1642
|
(t, e) => {
|
|
1642
1643
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1643
1644
|
return /* @__PURE__ */ o.jsx(Eo, { ...a, ...r, ref: e });
|
|
1644
1645
|
}
|
|
1645
1646
|
);
|
|
1646
|
-
|
|
1647
|
-
var Go = "DropdownMenuCheckboxItem",
|
|
1647
|
+
Sn.displayName = Uo;
|
|
1648
|
+
var Go = "DropdownMenuCheckboxItem", jn = u.forwardRef((t, e) => {
|
|
1648
1649
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1649
1650
|
return /* @__PURE__ */ o.jsx(So, { ...a, ...r, ref: e });
|
|
1650
1651
|
});
|
|
1651
|
-
|
|
1652
|
-
var qo = "DropdownMenuRadioGroup", Ho =
|
|
1652
|
+
jn.displayName = Go;
|
|
1653
|
+
var qo = "DropdownMenuRadioGroup", Ho = u.forwardRef((t, e) => {
|
|
1653
1654
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1654
1655
|
return /* @__PURE__ */ o.jsx(jo, { ...a, ...r, ref: e });
|
|
1655
1656
|
});
|
|
1656
1657
|
Ho.displayName = qo;
|
|
1657
|
-
var zo = "DropdownMenuRadioItem",
|
|
1658
|
+
var zo = "DropdownMenuRadioItem", Nn = u.forwardRef((t, e) => {
|
|
1658
1659
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1659
1660
|
return /* @__PURE__ */ o.jsx(No, { ...a, ...r, ref: e });
|
|
1660
1661
|
});
|
|
1661
|
-
|
|
1662
|
-
var Vo = "DropdownMenuItemIndicator",
|
|
1662
|
+
Nn.displayName = zo;
|
|
1663
|
+
var Vo = "DropdownMenuItemIndicator", Dn = u.forwardRef((t, e) => {
|
|
1663
1664
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1664
1665
|
return /* @__PURE__ */ o.jsx(Do, { ...a, ...r, ref: e });
|
|
1665
1666
|
});
|
|
1666
|
-
|
|
1667
|
-
var Yo = "DropdownMenuSeparator",
|
|
1667
|
+
Dn.displayName = Vo;
|
|
1668
|
+
var Yo = "DropdownMenuSeparator", In = u.forwardRef((t, e) => {
|
|
1668
1669
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1669
1670
|
return /* @__PURE__ */ o.jsx(Io, { ...a, ...r, ref: e });
|
|
1670
1671
|
});
|
|
1671
|
-
|
|
1672
|
-
var Xo = "DropdownMenuArrow", Wo =
|
|
1672
|
+
In.displayName = Yo;
|
|
1673
|
+
var Xo = "DropdownMenuArrow", Wo = u.forwardRef(
|
|
1673
1674
|
(t, e) => {
|
|
1674
1675
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1675
1676
|
return /* @__PURE__ */ o.jsx(Ao, { ...a, ...r, ref: e });
|
|
@@ -1677,18 +1678,18 @@ var Xo = "DropdownMenuArrow", Wo = c.forwardRef(
|
|
|
1677
1678
|
);
|
|
1678
1679
|
Wo.displayName = Xo;
|
|
1679
1680
|
var Jo = (t) => {
|
|
1680
|
-
const { __scopeDropdownMenu: e, children: n, open: r, onOpenChange: a, defaultOpen: s } = t, i = C(e), [
|
|
1681
|
+
const { __scopeDropdownMenu: e, children: n, open: r, onOpenChange: a, defaultOpen: s } = t, i = C(e), [c = !1, l] = At({
|
|
1681
1682
|
prop: r,
|
|
1682
1683
|
defaultProp: s,
|
|
1683
1684
|
onChange: a
|
|
1684
1685
|
});
|
|
1685
|
-
return /* @__PURE__ */ o.jsx(Oo, { ...i, open:
|
|
1686
|
-
}, Zo = "DropdownMenuSubTrigger",
|
|
1686
|
+
return /* @__PURE__ */ o.jsx(Oo, { ...i, open: c, onOpenChange: l, children: n });
|
|
1687
|
+
}, Zo = "DropdownMenuSubTrigger", An = u.forwardRef((t, e) => {
|
|
1687
1688
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1688
1689
|
return /* @__PURE__ */ o.jsx(To, { ...a, ...r, ref: e });
|
|
1689
1690
|
});
|
|
1690
|
-
|
|
1691
|
-
var es = "DropdownMenuSubContent",
|
|
1691
|
+
An.displayName = Zo;
|
|
1692
|
+
var es = "DropdownMenuSubContent", On = u.forwardRef((t, e) => {
|
|
1692
1693
|
const { __scopeDropdownMenu: n, ...r } = t, a = C(n);
|
|
1693
1694
|
return /* @__PURE__ */ o.jsx(
|
|
1694
1695
|
ko,
|
|
@@ -1707,10 +1708,10 @@ var es = "DropdownMenuSubContent", An = c.forwardRef((t, e) => {
|
|
|
1707
1708
|
}
|
|
1708
1709
|
);
|
|
1709
1710
|
});
|
|
1710
|
-
|
|
1711
|
-
var ts =
|
|
1712
|
-
const as = ts, os = ns, ss =
|
|
1713
|
-
|
|
1711
|
+
On.displayName = es;
|
|
1712
|
+
var ts = bn, ns = Cn, Tn = Pn, kn = _n, Fn = En, Ln = Sn, Kn = jn, $n = Nn, Bn = Dn, Qn = In, rs = Jo, Un = An, Gn = On;
|
|
1713
|
+
const as = ts, os = ns, ss = Tn, is = rs, qn = u.forwardRef(({ className: t, inset: e, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1714
|
+
Un,
|
|
1714
1715
|
{
|
|
1715
1716
|
ref: a,
|
|
1716
1717
|
className: P(
|
|
@@ -1725,9 +1726,9 @@ const as = ts, os = ns, ss = On, is = rs, Gn = c.forwardRef(({ className: t, ins
|
|
|
1725
1726
|
]
|
|
1726
1727
|
}
|
|
1727
1728
|
));
|
|
1728
|
-
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1729
|
+
qn.displayName = Un.displayName;
|
|
1730
|
+
const Hn = u.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
1731
|
+
Gn,
|
|
1731
1732
|
{
|
|
1732
1733
|
ref: n,
|
|
1733
1734
|
className: P(
|
|
@@ -1737,9 +1738,9 @@ const qn = c.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
|
1737
1738
|
...e
|
|
1738
1739
|
}
|
|
1739
1740
|
));
|
|
1740
|
-
|
|
1741
|
-
const
|
|
1742
|
-
|
|
1741
|
+
Hn.displayName = Gn.displayName;
|
|
1742
|
+
const zn = u.forwardRef(({ className: t, sideOffset: e = 4, ...n }, r) => /* @__PURE__ */ o.jsx(Tn, { children: /* @__PURE__ */ o.jsx(
|
|
1743
|
+
kn,
|
|
1743
1744
|
{
|
|
1744
1745
|
ref: r,
|
|
1745
1746
|
sideOffset: e,
|
|
@@ -1751,9 +1752,9 @@ const Hn = c.forwardRef(({ className: t, sideOffset: e = 4, ...n }, r) => /* @__
|
|
|
1751
1752
|
...n
|
|
1752
1753
|
}
|
|
1753
1754
|
) }));
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1755
|
+
zn.displayName = kn.displayName;
|
|
1756
|
+
const Vn = u.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1757
|
+
Ln,
|
|
1757
1758
|
{
|
|
1758
1759
|
ref: r,
|
|
1759
1760
|
className: P(
|
|
@@ -1764,9 +1765,9 @@ const zn = c.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */
|
|
|
1764
1765
|
...n
|
|
1765
1766
|
}
|
|
1766
1767
|
));
|
|
1767
|
-
|
|
1768
|
-
const cs =
|
|
1769
|
-
|
|
1768
|
+
Vn.displayName = Ln.displayName;
|
|
1769
|
+
const cs = u.forwardRef(({ className: t, children: e, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1770
|
+
Kn,
|
|
1770
1771
|
{
|
|
1771
1772
|
ref: a,
|
|
1772
1773
|
className: P(
|
|
@@ -1776,14 +1777,14 @@ const cs = c.forwardRef(({ className: t, children: e, checked: n, ...r }, a) =>
|
|
|
1776
1777
|
checked: n,
|
|
1777
1778
|
...r,
|
|
1778
1779
|
children: [
|
|
1779
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(
|
|
1780
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(Bn, { children: /* @__PURE__ */ o.jsx(Ar, { className: "h-4 w-4" }) }) }),
|
|
1780
1781
|
e
|
|
1781
1782
|
]
|
|
1782
1783
|
}
|
|
1783
1784
|
));
|
|
1784
|
-
cs.displayName =
|
|
1785
|
-
const us =
|
|
1786
|
-
|
|
1785
|
+
cs.displayName = Kn.displayName;
|
|
1786
|
+
const us = u.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__ */ o.jsxs(
|
|
1787
|
+
$n,
|
|
1787
1788
|
{
|
|
1788
1789
|
ref: r,
|
|
1789
1790
|
className: P(
|
|
@@ -1792,14 +1793,14 @@ const us = c.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__
|
|
|
1792
1793
|
),
|
|
1793
1794
|
...n,
|
|
1794
1795
|
children: [
|
|
1795
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(
|
|
1796
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(Bn, { children: /* @__PURE__ */ o.jsx(la, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1796
1797
|
e
|
|
1797
1798
|
]
|
|
1798
1799
|
}
|
|
1799
1800
|
));
|
|
1800
|
-
us.displayName =
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1801
|
+
us.displayName = $n.displayName;
|
|
1802
|
+
const Yn = u.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1803
|
+
Fn,
|
|
1803
1804
|
{
|
|
1804
1805
|
ref: r,
|
|
1805
1806
|
className: P(
|
|
@@ -1810,22 +1811,22 @@ const Vn = c.forwardRef(({ className: t, inset: e, ...n }, r) => /* @__PURE__ */
|
|
|
1810
1811
|
...n
|
|
1811
1812
|
}
|
|
1812
1813
|
));
|
|
1813
|
-
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1814
|
+
Yn.displayName = Fn.displayName;
|
|
1815
|
+
const Xn = u.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
1816
|
+
Qn,
|
|
1816
1817
|
{
|
|
1817
1818
|
ref: n,
|
|
1818
1819
|
className: P("-mx-1 my-1 h-px bg-muted", t),
|
|
1819
1820
|
...e
|
|
1820
1821
|
}
|
|
1821
1822
|
));
|
|
1822
|
-
|
|
1823
|
+
Xn.displayName = Qn.displayName;
|
|
1823
1824
|
const ls = () => {
|
|
1824
1825
|
const { navigation: t } = Ve();
|
|
1825
1826
|
return t.length <= 1 ? null : /* @__PURE__ */ o.jsx("nav", { className: "border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
1826
|
-
|
|
1827
|
+
$e,
|
|
1827
1828
|
{
|
|
1828
|
-
className: ({ isActive: n }) =>
|
|
1829
|
+
className: ({ isActive: n }) => Or(
|
|
1829
1830
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
1830
1831
|
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
1831
1832
|
),
|
|
@@ -1833,17 +1834,17 @@ const ls = () => {
|
|
|
1833
1834
|
children: e.label
|
|
1834
1835
|
}
|
|
1835
1836
|
) }, e.label)) }) });
|
|
1836
|
-
},
|
|
1837
|
-
/* @__PURE__ */ o.jsx(
|
|
1838
|
-
/* @__PURE__ */ o.jsx(ss, { children: /* @__PURE__ */ o.jsx(
|
|
1837
|
+
}, Wn = ({ item: t }) => t.children ? /* @__PURE__ */ o.jsxs(is, { children: [
|
|
1838
|
+
/* @__PURE__ */ o.jsx(qn, { children: t.label }),
|
|
1839
|
+
/* @__PURE__ */ o.jsx(ss, { children: /* @__PURE__ */ o.jsx(Hn, { children: t.children.map((e, n) => (
|
|
1839
1840
|
// eslint-disable-next-line react/no-array-index-key
|
|
1840
|
-
/* @__PURE__ */ o.jsx(
|
|
1841
|
+
/* @__PURE__ */ o.jsx(Wn, { item: e }, n)
|
|
1841
1842
|
)) }) })
|
|
1842
|
-
] }, t.label) : /* @__PURE__ */ o.jsx(
|
|
1843
|
-
const [e, n] =
|
|
1843
|
+
] }, t.label) : /* @__PURE__ */ o.jsx(Re, { to: t.path ?? "", children: /* @__PURE__ */ o.jsx(Vn, { children: t.label }, t.label) }), Jn = kt(function() {
|
|
1844
|
+
const [e, n] = Tr(), { isAuthenticated: r, profile: a, isAuthEnabled: s } = fr(), { pathname: i } = W(), c = Ve(), { page: l, plugins: p } = c, f = e ? ha : pa;
|
|
1844
1845
|
return /* @__PURE__ */ o.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1845
1846
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-12 h-[--top-header-height]", children: [
|
|
1846
|
-
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(
|
|
1847
|
+
/* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(Re, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
1847
1848
|
(l == null ? void 0 : l.logo) && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1848
1849
|
/* @__PURE__ */ o.jsx(
|
|
1849
1850
|
"img",
|
|
@@ -1871,12 +1872,21 @@ const ls = () => {
|
|
|
1871
1872
|
/* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1872
1873
|
/* @__PURE__ */ o.jsx("div", { className: "w-full max-w-prose" }),
|
|
1873
1874
|
/* @__PURE__ */ o.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex gap-2", children: [
|
|
1874
|
-
s && !r ? /* @__PURE__ */ o.jsx(
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1875
|
+
s && !r ? /* @__PURE__ */ o.jsx(Be, { variant: "ghost", asChild: !0, children: /* @__PURE__ */ o.jsx(
|
|
1876
|
+
Re,
|
|
1877
|
+
{
|
|
1878
|
+
to: {
|
|
1879
|
+
pathname: "/signin",
|
|
1880
|
+
search: `?redirect=${encodeURIComponent(i)}`
|
|
1881
|
+
},
|
|
1882
|
+
children: "Login"
|
|
1883
|
+
}
|
|
1884
|
+
) }) : /* @__PURE__ */ o.jsxs(as, { children: [
|
|
1885
|
+
/* @__PURE__ */ o.jsx(os, { asChild: !0, children: /* @__PURE__ */ o.jsx(Be, { variant: "ghost", children: a != null && a.email ? `${a.email}` : "My Account" }) }),
|
|
1886
|
+
/* @__PURE__ */ o.jsxs(zn, { className: "w-56", children: [
|
|
1887
|
+
/* @__PURE__ */ o.jsx(Yn, { children: "My Account" }),
|
|
1888
|
+
/* @__PURE__ */ o.jsx(Xn, {}),
|
|
1889
|
+
p.filter((d) => Ba(d)).flatMap((d) => d.getProfileMenuItems(c)).map((d) => /* @__PURE__ */ o.jsx(Wn, { item: d }, d.label))
|
|
1880
1890
|
] })
|
|
1881
1891
|
] }),
|
|
1882
1892
|
/* @__PURE__ */ o.jsx(
|
|
@@ -1886,7 +1896,7 @@ const ls = () => {
|
|
|
1886
1896
|
"aria-label": e ? "Switch to light mode" : "Switch to dark mode",
|
|
1887
1897
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
1888
1898
|
onClick: n,
|
|
1889
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1899
|
+
children: /* @__PURE__ */ o.jsx(f, { size: 18 })
|
|
1890
1900
|
}
|
|
1891
1901
|
)
|
|
1892
1902
|
] })
|
|
@@ -1894,46 +1904,42 @@ const ls = () => {
|
|
|
1894
1904
|
] }),
|
|
1895
1905
|
/* @__PURE__ */ o.jsx(ls, {})
|
|
1896
1906
|
] }) });
|
|
1897
|
-
}),
|
|
1898
|
-
Header:
|
|
1899
|
-
}, ds =
|
|
1907
|
+
}), Zn = {
|
|
1908
|
+
Header: Jn
|
|
1909
|
+
}, ds = Tt(Zn), hs = ds.Provider, ps = ({
|
|
1900
1910
|
children: t,
|
|
1901
1911
|
...e
|
|
1902
1912
|
}) => {
|
|
1903
|
-
var d,
|
|
1904
|
-
const n =
|
|
1905
|
-
() => ({ ...
|
|
1913
|
+
var d, m;
|
|
1914
|
+
const n = Le(
|
|
1915
|
+
() => ({ ...Zn, ...e.overrides }),
|
|
1906
1916
|
[e.overrides]
|
|
1907
|
-
), r =
|
|
1917
|
+
), r = Le(
|
|
1908
1918
|
() => {
|
|
1909
1919
|
var v;
|
|
1910
|
-
return { ...
|
|
1920
|
+
return { ...kr, ...(v = e.mdx) == null ? void 0 : v.components };
|
|
1911
1921
|
},
|
|
1912
1922
|
[(d = e.mdx) == null ? void 0 : d.components]
|
|
1913
|
-
), { stagger: a } = Gr(Qe), [s, i] =
|
|
1923
|
+
), { stagger: a } = Gr(Qe), [s, i] = Se(!1), c = Le(
|
|
1914
1924
|
() => s ? { stagger: !0 } : { stagger: a },
|
|
1915
1925
|
[a, s]
|
|
1916
|
-
),
|
|
1917
|
-
|
|
1926
|
+
), l = xr();
|
|
1927
|
+
se(() => {
|
|
1918
1928
|
s || i(!0);
|
|
1919
|
-
}, [s,
|
|
1920
|
-
const
|
|
1921
|
-
W(() => {
|
|
1922
|
-
l.initialize();
|
|
1923
|
-
}, [l]);
|
|
1924
|
-
const m = (p = e.plugins) == null ? void 0 : p.filter(Ga).map((v, x) => {
|
|
1929
|
+
}, [s, l.location]);
|
|
1930
|
+
const [p] = Se(() => new Ha(e)), f = (m = e.plugins) == null ? void 0 : m.filter(Ga).map((v, x) => {
|
|
1925
1931
|
var R;
|
|
1926
1932
|
return /* @__PURE__ */ o.jsx(qr, { children: (R = v.getHead) == null ? void 0 : R.call(v) }, x);
|
|
1927
1933
|
});
|
|
1928
|
-
return /* @__PURE__ */ o.jsxs(oa, { client:
|
|
1929
|
-
/* @__PURE__ */ o.jsx(Ge, { children:
|
|
1930
|
-
/* @__PURE__ */ o.jsx(Qe.Provider, { value:
|
|
1934
|
+
return /* @__PURE__ */ o.jsxs(oa, { client: zt, children: [
|
|
1935
|
+
/* @__PURE__ */ o.jsx(Ge, { children: f }),
|
|
1936
|
+
/* @__PURE__ */ o.jsx(Qe.Provider, { value: c, children: /* @__PURE__ */ o.jsx(sa, { value: p, children: /* @__PURE__ */ o.jsx(ur, { components: r, children: /* @__PURE__ */ o.jsx(Fr, { children: /* @__PURE__ */ o.jsx(hs, { value: n, children: /* @__PURE__ */ o.jsx(mr, { slotlets: e.slotlets, children: /* @__PURE__ */ o.jsx(Lr, { children: t ?? /* @__PURE__ */ o.jsx(St, {}) }) }) }) }) }) }) })
|
|
1931
1937
|
] });
|
|
1932
|
-
},
|
|
1933
|
-
|
|
1938
|
+
}, fs = kt(ps), er = (t) => /* @__PURE__ */ o.jsx(Ka, { FallbackComponent: za, children: /* @__PURE__ */ o.jsx(fs, { ...t }) });
|
|
1939
|
+
er.displayName = "DevPortal";
|
|
1934
1940
|
const ms = () => {
|
|
1935
|
-
const t =
|
|
1936
|
-
|
|
1941
|
+
const t = W(), { setActiveAnchor: e } = He();
|
|
1942
|
+
se(() => {
|
|
1937
1943
|
if (!t.hash) return;
|
|
1938
1944
|
const n = t.hash.split("/")[0].slice(1), r = document.getElementById(decodeURIComponent(n));
|
|
1939
1945
|
if (r) {
|
|
@@ -1943,36 +1949,36 @@ const ms = () => {
|
|
|
1943
1949
|
return;
|
|
1944
1950
|
}
|
|
1945
1951
|
const a = new MutationObserver((s, i) => {
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1952
|
+
const c = document.getElementById(decodeURIComponent(n));
|
|
1953
|
+
c && (c.scrollIntoView(), requestIdleCallback(() => e(n)), i.disconnect());
|
|
1948
1954
|
});
|
|
1949
1955
|
return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
|
|
1950
1956
|
}, [t.hash, e]);
|
|
1951
1957
|
}, gs = () => {
|
|
1952
|
-
const t =
|
|
1953
|
-
|
|
1958
|
+
const t = W(), e = De(t.pathname);
|
|
1959
|
+
se(() => {
|
|
1954
1960
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
1955
1961
|
}, [t.pathname]);
|
|
1956
|
-
},
|
|
1962
|
+
}, tr = ({
|
|
1957
1963
|
item: t,
|
|
1958
1964
|
defaultOpen: e,
|
|
1959
1965
|
path: n
|
|
1960
1966
|
}) => {
|
|
1961
|
-
const [r, a] =
|
|
1962
|
-
|
|
1967
|
+
const [r, a] = Se(e), s = W(), i = De(s.pathname), [c, l] = Se(!1);
|
|
1968
|
+
se(() => {
|
|
1963
1969
|
!r && i.current !== s.pathname && a(Ye(t, s.pathname, n)), i.current = s.pathname;
|
|
1964
1970
|
}, [r, t, n, s.pathname]);
|
|
1965
|
-
const
|
|
1966
|
-
|
|
1971
|
+
const p = () => {
|
|
1972
|
+
l(!0), a((f) => !f);
|
|
1967
1973
|
};
|
|
1968
|
-
return
|
|
1969
|
-
|
|
1974
|
+
return se(() => {
|
|
1975
|
+
l(!1);
|
|
1970
1976
|
}, []), {
|
|
1971
1977
|
open: r,
|
|
1972
|
-
onOpenChange:
|
|
1973
|
-
"data-animate":
|
|
1978
|
+
onOpenChange: p,
|
|
1979
|
+
"data-animate": c
|
|
1974
1980
|
};
|
|
1975
|
-
},
|
|
1981
|
+
}, Pe = Kr(
|
|
1976
1982
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
1977
1983
|
{
|
|
1978
1984
|
variants: {
|
|
@@ -1986,29 +1992,29 @@ const ms = () => {
|
|
|
1986
1992
|
}
|
|
1987
1993
|
}
|
|
1988
1994
|
}
|
|
1989
|
-
), vs = "data-anchor",
|
|
1995
|
+
), vs = "data-anchor", nr = ({
|
|
1990
1996
|
category: t,
|
|
1991
1997
|
item: e,
|
|
1992
1998
|
activeAnchor: n,
|
|
1993
1999
|
currentTopNavItem: r,
|
|
1994
2000
|
basePath: a = ""
|
|
1995
2001
|
}) => {
|
|
1996
|
-
const s = wt(e) ?
|
|
2002
|
+
const s = wt(e) ? Ut(a, e.path) : "", i = W(), c = tr({
|
|
1997
2003
|
item: e,
|
|
1998
2004
|
path: s,
|
|
1999
2005
|
defaultOpen: () => Ye(e, i.pathname, a)
|
|
2000
2006
|
});
|
|
2001
2007
|
if (ia(e)) {
|
|
2002
|
-
const
|
|
2008
|
+
const p = P(
|
|
2003
2009
|
"flex items-center gap-2",
|
|
2004
|
-
|
|
2010
|
+
Pe({
|
|
2005
2011
|
isActive: e.href === i.pathname
|
|
2006
2012
|
})
|
|
2007
2013
|
);
|
|
2008
2014
|
return e.href.startsWith("http") ? /* @__PURE__ */ o.jsxs(
|
|
2009
2015
|
"a",
|
|
2010
2016
|
{
|
|
2011
|
-
className:
|
|
2017
|
+
className: p,
|
|
2012
2018
|
href: e.href,
|
|
2013
2019
|
target: "_blank",
|
|
2014
2020
|
rel: "noopener noreferrer",
|
|
@@ -2017,9 +2023,9 @@ const ms = () => {
|
|
|
2017
2023
|
/* @__PURE__ */ o.jsx(da, { size: 14 })
|
|
2018
2024
|
]
|
|
2019
2025
|
}
|
|
2020
|
-
) : /* @__PURE__ */ o.jsx(
|
|
2026
|
+
) : /* @__PURE__ */ o.jsx($e, { className: p, to: e.href, children: e.label });
|
|
2021
2027
|
}
|
|
2022
|
-
const
|
|
2028
|
+
const l = /* @__PURE__ */ o.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
2023
2029
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
2024
2030
|
e.icon,
|
|
2025
2031
|
typeof e.label != "string" ? e.label : /* @__PURE__ */ o.jsx("span", { className: "truncate", children: e.label })
|
|
@@ -2032,57 +2038,57 @@ const ms = () => {
|
|
|
2032
2038
|
}
|
|
2033
2039
|
)
|
|
2034
2040
|
] });
|
|
2035
|
-
return /* @__PURE__ */ o.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ o.jsxs(
|
|
2041
|
+
return /* @__PURE__ */ o.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ o.jsxs(Lt, { ...c, className: "flex flex-col", children: [
|
|
2036
2042
|
/* @__PURE__ */ o.jsx(
|
|
2037
|
-
|
|
2043
|
+
Kt,
|
|
2038
2044
|
{
|
|
2039
2045
|
className: P(
|
|
2040
2046
|
"group text-start",
|
|
2041
|
-
|
|
2047
|
+
Pe({ isActive: !1 })
|
|
2042
2048
|
),
|
|
2043
|
-
children:
|
|
2049
|
+
children: l
|
|
2044
2050
|
}
|
|
2045
2051
|
),
|
|
2046
|
-
/* @__PURE__ */ o.jsx(
|
|
2047
|
-
|
|
2052
|
+
/* @__PURE__ */ o.jsx($t, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ o.jsx("ul", { className: "mt-1 border-l ps-1.5", children: e.children.map((p) => /* @__PURE__ */ o.jsx(
|
|
2053
|
+
nr,
|
|
2048
2054
|
{
|
|
2049
2055
|
category: t,
|
|
2050
|
-
item:
|
|
2056
|
+
item: p,
|
|
2051
2057
|
activeAnchor: n,
|
|
2052
2058
|
currentTopNavItem: r,
|
|
2053
2059
|
basePath: s
|
|
2054
2060
|
},
|
|
2055
|
-
wt(
|
|
2061
|
+
wt(p) ? p.path : p.href
|
|
2056
2062
|
)) }) })
|
|
2057
2063
|
] }) : e.path.startsWith("#") ? /* @__PURE__ */ o.jsx(
|
|
2058
|
-
|
|
2064
|
+
lr,
|
|
2059
2065
|
{
|
|
2060
2066
|
to: e.path,
|
|
2061
2067
|
[vs]: e.path,
|
|
2062
|
-
className:
|
|
2068
|
+
className: Pe({
|
|
2063
2069
|
isActive: e.path.slice(1) === n,
|
|
2064
2070
|
isMuted: e.muted
|
|
2065
2071
|
}),
|
|
2066
|
-
children:
|
|
2072
|
+
children: l
|
|
2067
2073
|
}
|
|
2068
2074
|
) : /* @__PURE__ */ o.jsx(
|
|
2069
|
-
|
|
2075
|
+
$e,
|
|
2070
2076
|
{
|
|
2071
|
-
className: ({ isActive:
|
|
2077
|
+
className: ({ isActive: p }) => Pe({ isActive: p }),
|
|
2072
2078
|
to: s,
|
|
2073
|
-
children:
|
|
2079
|
+
children: l
|
|
2074
2080
|
}
|
|
2075
2081
|
) });
|
|
2076
2082
|
}, xs = ({
|
|
2077
2083
|
category: t
|
|
2078
2084
|
}) => {
|
|
2079
|
-
const { activeAnchor: e } =
|
|
2085
|
+
const { activeAnchor: e } = He(), n = ca(), r = W(), a = t.collapsible ?? !0, s = tr({
|
|
2080
2086
|
item: t,
|
|
2081
2087
|
path: (n == null ? void 0 : n.path) ?? "",
|
|
2082
2088
|
defaultOpen: () => !a || t.expanded || Ye(t, r.pathname, (n == null ? void 0 : n.path) ?? "")
|
|
2083
2089
|
});
|
|
2084
|
-
return /* @__PURE__ */ o.jsxs(
|
|
2085
|
-
t.label.length > 0 ? /* @__PURE__ */ o.jsx(
|
|
2090
|
+
return /* @__PURE__ */ o.jsxs(Lt, { ...s, children: [
|
|
2091
|
+
t.label.length > 0 ? /* @__PURE__ */ o.jsx(Kt, { asChild: a, disabled: !a, children: /* @__PURE__ */ o.jsxs(
|
|
2086
2092
|
"h5",
|
|
2087
2093
|
{
|
|
2088
2094
|
className: P(
|
|
@@ -2101,16 +2107,16 @@ const ms = () => {
|
|
|
2101
2107
|
]
|
|
2102
2108
|
}
|
|
2103
2109
|
) }) : "Endpoints",
|
|
2104
|
-
/* @__PURE__ */ o.jsx(
|
|
2105
|
-
|
|
2110
|
+
/* @__PURE__ */ o.jsx($t, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ o.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((i, c) => /* @__PURE__ */ o.jsx(
|
|
2111
|
+
nr,
|
|
2106
2112
|
{
|
|
2107
2113
|
category: t,
|
|
2108
2114
|
item: i,
|
|
2109
2115
|
activeAnchor: e,
|
|
2110
2116
|
currentTopNavItem: n,
|
|
2111
|
-
basePath:
|
|
2117
|
+
basePath: Ut(n == null ? void 0 : n.path, t.path)
|
|
2112
2118
|
},
|
|
2113
|
-
|
|
2119
|
+
c
|
|
2114
2120
|
)) }) })
|
|
2115
2121
|
] }, t.label);
|
|
2116
2122
|
}, ys = Hr(function({ children: e, className: n, pushMainContent: r }, a) {
|
|
@@ -2134,24 +2140,24 @@ const ms = () => {
|
|
|
2134
2140
|
ref: t,
|
|
2135
2141
|
pushMainContent: e.data.items.length > 0,
|
|
2136
2142
|
children: [
|
|
2137
|
-
/* @__PURE__ */ o.jsx(
|
|
2143
|
+
/* @__PURE__ */ o.jsx(_e, { name: "zudoku-before-navigation" }),
|
|
2138
2144
|
e.data.items.map((n) => /* @__PURE__ */ o.jsx(xs, { category: n }, n.label)),
|
|
2139
|
-
/* @__PURE__ */ o.jsx(
|
|
2145
|
+
/* @__PURE__ */ o.jsx(_e, { name: "zudoku-after-navigation" })
|
|
2140
2146
|
]
|
|
2141
2147
|
}
|
|
2142
2148
|
);
|
|
2143
2149
|
}, bs = ({ children: t }) => {
|
|
2144
|
-
const e =
|
|
2150
|
+
const e = W(), { setActiveAnchor: n } = He(), { meta: r } = Ve();
|
|
2145
2151
|
ms(), gs();
|
|
2146
2152
|
const a = De(e.pathname);
|
|
2147
|
-
return
|
|
2153
|
+
return se(() => {
|
|
2148
2154
|
e.pathname !== a.current && n(""), a.current = e.pathname;
|
|
2149
2155
|
}, [e.pathname, n]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2150
2156
|
/* @__PURE__ */ o.jsxs(Ge, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
2151
2157
|
(r == null ? void 0 : r.description) && /* @__PURE__ */ o.jsx("meta", { name: "description", content: r.description }),
|
|
2152
2158
|
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ o.jsx("link", { rel: "icon", href: r.favicon })
|
|
2153
2159
|
] }),
|
|
2154
|
-
/* @__PURE__ */ o.jsx(
|
|
2160
|
+
/* @__PURE__ */ o.jsx(Jn, {}),
|
|
2155
2161
|
/* @__PURE__ */ o.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ o.jsxs(
|
|
2156
2162
|
zr,
|
|
2157
2163
|
{
|
|
@@ -2168,9 +2174,9 @@ const ms = () => {
|
|
|
2168
2174
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
2169
2175
|
),
|
|
2170
2176
|
children: [
|
|
2171
|
-
/* @__PURE__ */ o.jsx(
|
|
2172
|
-
t ?? /* @__PURE__ */ o.jsx(
|
|
2173
|
-
/* @__PURE__ */ o.jsx(
|
|
2177
|
+
/* @__PURE__ */ o.jsx(_e, { name: "zudoku-before-content" }),
|
|
2178
|
+
t ?? /* @__PURE__ */ o.jsx(St, {}),
|
|
2179
|
+
/* @__PURE__ */ o.jsx(_e, { name: "zudoku-after-content" })
|
|
2174
2180
|
]
|
|
2175
2181
|
}
|
|
2176
2182
|
)
|
|
@@ -2178,18 +2184,18 @@ const ms = () => {
|
|
|
2178
2184
|
}
|
|
2179
2185
|
) })
|
|
2180
2186
|
] });
|
|
2181
|
-
},
|
|
2187
|
+
}, Ts = dr, ks = $r, Fs = er, Ls = bs, Ks = Re, $s = gr, Bs = fa, Qs = Da, Us = Ia, Gs = Be, qs = Ge;
|
|
2182
2188
|
export {
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2189
|
+
Qs as Bootstrap,
|
|
2190
|
+
Us as BootstrapStatic,
|
|
2191
|
+
Gs as Button,
|
|
2192
|
+
ks as Callout,
|
|
2193
|
+
Fs as DevPortal,
|
|
2194
|
+
qs as Head,
|
|
2195
|
+
Ls as Layout,
|
|
2196
|
+
Ks as Link,
|
|
2197
|
+
$s as RouterError,
|
|
2198
|
+
Bs as ServerError,
|
|
2199
|
+
Ts as useMDXComponents
|
|
2194
2200
|
};
|
|
2195
2201
|
//# sourceMappingURL=zudoku.components.js.map
|