zudoku 0.4.4-dev.9 → 0.4.5-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +0 -5
- package/dist/config/validators/validate.d.ts +48 -110
- package/dist/config/validators/validate.js +1 -4
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/Header.js +2 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +5 -3
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.d.ts +1 -0
- package/dist/lib/components/MobileTopNavigation.js +14 -0
- package/dist/lib/components/MobileTopNavigation.js.map +1 -0
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +4 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +2 -2
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +2 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +2 -5
- package/dist/lib/ui/Drawer.d.ts +26 -0
- package/dist/lib/ui/Drawer.js +23 -0
- package/dist/lib/ui/Drawer.js.map +1 -0
- package/dist/vite/plugin-api.js +23 -3
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{Input-DH_IdyOP.js → Input-BtumfhQu.js} +374 -399
- package/lib/Input-BtumfhQu.js.map +1 -0
- package/lib/{MdxPage-DBmhggWT.js → MdxPage-C3VDc6a7.js} +6 -6
- package/lib/{MdxPage-DBmhggWT.js.map → MdxPage-C3VDc6a7.js.map} +1 -1
- package/lib/{OperationList-CTicz0GQ.js → OperationList-CLtN0fiZ.js} +5 -5
- package/lib/{OperationList-CTicz0GQ.js.map → OperationList-CLtN0fiZ.js.map} +1 -1
- package/lib/{Route-12T12Ml-.js → Route-Cfon6vDR.js} +2 -2
- package/lib/{Route-12T12Ml-.js.map → Route-Cfon6vDR.js.map} +1 -1
- package/lib/SidebarBadge-DMBr3H-a.js +498 -0
- package/lib/SidebarBadge-DMBr3H-a.js.map +1 -0
- package/lib/assets/{worker-BsNqC5G3.js → worker-BvD7B6MG.js} +2 -2
- package/lib/assets/{worker-BsNqC5G3.js.map → worker-BvD7B6MG.js.map} +1 -1
- package/lib/{index-0hAwyzGD.js → index-BfLQd6h_.js} +1862 -2087
- package/lib/index-BfLQd6h_.js.map +1 -0
- package/lib/{index-DFSdiG5J.js → index-CvPXovcL.js} +5 -5
- package/lib/{index-DFSdiG5J.js.map → index-CvPXovcL.js.map} +1 -1
- package/lib/{Combination-BDDQcRSU.js → index-KUt-5Yzq.js} +253 -228
- package/lib/index-KUt-5Yzq.js.map +1 -0
- package/lib/zudoku.components.js +1978 -861
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +2 -2
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/package.json +2 -1
- package/src/lib/components/Header.tsx +6 -5
- package/src/lib/components/Layout.tsx +29 -14
- package/src/lib/components/MobileTopNavigation.tsx +52 -0
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +25 -10
- package/src/lib/oas/graphql/index.ts +2 -2
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/graphql.ts +1 -1
- package/src/lib/plugins/openapi/index.tsx +3 -1
- package/src/lib/plugins/openapi/interfaces.ts +1 -4
- package/src/lib/ui/Drawer.tsx +119 -0
- package/lib/Combination-BDDQcRSU.js.map +0 -1
- package/lib/Input-DH_IdyOP.js.map +0 -1
- package/lib/SidebarBadge-YJxJ4aaV.js +0 -266
- package/lib/SidebarBadge-YJxJ4aaV.js.map +0 -1
- package/lib/index-0hAwyzGD.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Oo = Object.defineProperty;
|
|
2
|
+
var ln = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var Io = (e, t, n) => t in e ? Oo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var J = (e, t, n) => Io(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || ln("Cannot " + n);
|
|
7
|
+
var x = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ae = (e, t, n) => t.has(e) ? ln("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
var lt = (e, t, n, r) => ({
|
|
9
9
|
set _(o) {
|
|
10
|
-
|
|
10
|
+
G(e, t, o, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return x(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { H as
|
|
17
|
-
import { d as
|
|
18
|
-
import { E as
|
|
16
|
+
import { H as Dn, a as Ot, M as Ao, u as ko, A as $o, b as Lo } from "./utils-BPHLKjns.js";
|
|
17
|
+
import { d as Fo, a as Ho, R as Uo, N as We, L as It, u as Bo, O as jn, b as zo, c as At } from "./index-ChhUJhLT.js";
|
|
18
|
+
import { E as Nn, S as Te, a as Ko, R as qo } from "./SlotletProvider-CRKX9y2Z.js";
|
|
19
19
|
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
20
|
-
import { M as
|
|
21
|
-
import { c as
|
|
22
|
-
import * as
|
|
23
|
-
import
|
|
24
|
-
import { g as
|
|
25
|
-
import { r as
|
|
26
|
-
import { S as
|
|
27
|
-
import { S as
|
|
28
|
-
import { j as
|
|
29
|
-
import { c as
|
|
30
|
-
import { S as
|
|
20
|
+
import { M as Vo, c as Qo, a as Pn, b as Tn, A as Go, u as Ze, h as Wo, d as I, e as Yo, F as Xo, D as Jo, C as Zo, P as Ue, f as kt, g as ea, i as _n, R as ta, S as na, j as ra, k as oa, l as On, m as aa, n as pt, o as In, V as An, p as un, B as Dt } from "./index-KUt-5Yzq.js";
|
|
21
|
+
import { c as Re, a as A, C as sa, b as kn, u as ia, T as la, M as ca, V as ua, d as $t, e as da, f as fa } from "./Markdown-Bg4SS0au.js";
|
|
22
|
+
import * as h from "react";
|
|
23
|
+
import g, { StrictMode as $n, createContext as Ln, Component as ha, createElement as dn, isValidElement as pa, useLayoutEffect as ma, useEffect as xe, useState as He, useCallback as Fn, Suspense as Hn, memo as Un, useMemo as bt, useContext as ga, Fragment as va, useRef as Lt, forwardRef as wa } from "react";
|
|
24
|
+
import { g as Ft } from "./_commonjsHelpers-BVfed4GL.js";
|
|
25
|
+
import { r as xa } from "./router-BiRCp01d.js";
|
|
26
|
+
import { S as jt, R as ya, T as ba, C as Ma } from "./index-CvPXovcL.js";
|
|
27
|
+
import { S as Bn, h as zn, Q as Sa, n as ee, m as fn, a as hn, b as ve, e as Ea, c as Ca, d as Ra, f as Da, o as pn, r as mn, g as ja, i as gn, p as vn, s as Na, u as et, j as Pa, Z as Ta, k as _a, l as Kn, q as Oa } from "./ZudokuContext-BHNQL3XO.js";
|
|
28
|
+
import { j as Ht } from "./joinPath-B7kNnUX4.js";
|
|
29
|
+
import { c as qn, P as vt, R as Ia, I as Aa, O as ka, C as $a, T as La, a as Fa, b as Ha, d as Ua, D as Ba, e as za, S as Mt } from "./SidebarBadge-DMBr3H-a.js";
|
|
30
|
+
import { S as Ka } from "./Spinner-BJ5wiTiz.js";
|
|
31
31
|
/**
|
|
32
32
|
* @license lucide-react v0.378.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
const
|
|
37
|
+
const Vn = Re("ChevronRight", [
|
|
38
38
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
39
39
|
]);
|
|
40
40
|
/**
|
|
@@ -43,7 +43,7 @@ const qt = ue("ChevronRight", [
|
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
const
|
|
46
|
+
const qa = Re("Dot", [
|
|
47
47
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
|
48
48
|
]);
|
|
49
49
|
/**
|
|
@@ -52,7 +52,7 @@ const fa = ue("Dot", [
|
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
54
|
*/
|
|
55
|
-
const
|
|
55
|
+
const Va = Re("ExternalLink", [
|
|
56
56
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
57
57
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
58
58
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -63,7 +63,18 @@ const pa = ue("ExternalLink", [
|
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
65
|
*/
|
|
66
|
-
const
|
|
66
|
+
const Qa = Re("Menu", [
|
|
67
|
+
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
68
|
+
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
69
|
+
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
70
|
+
]);
|
|
71
|
+
/**
|
|
72
|
+
* @license lucide-react v0.378.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/
|
|
77
|
+
const Ga = Re("MoonStar", [
|
|
67
78
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
68
79
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
69
80
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -74,7 +85,17 @@ const ma = ue("MoonStar", [
|
|
|
74
85
|
* This source code is licensed under the ISC license.
|
|
75
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
87
|
*/
|
|
77
|
-
const
|
|
88
|
+
const Wa = Re("PanelLeft", [
|
|
89
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
90
|
+
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
91
|
+
]);
|
|
92
|
+
/**
|
|
93
|
+
* @license lucide-react v0.378.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/
|
|
98
|
+
const Ya = Re("Search", [
|
|
78
99
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
79
100
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
80
101
|
]);
|
|
@@ -84,7 +105,7 @@ const ga = ue("Search", [
|
|
|
84
105
|
* This source code is licensed under the ISC license.
|
|
85
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
107
|
*/
|
|
87
|
-
const
|
|
108
|
+
const Xa = Re("Sun", [
|
|
88
109
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
89
110
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
90
111
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -95,14 +116,14 @@ const va = ue("Sun", [
|
|
|
95
116
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
96
117
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
97
118
|
]);
|
|
98
|
-
function
|
|
99
|
-
return /* @__PURE__ */ a.jsx(
|
|
119
|
+
function Ja({ error: e }) {
|
|
120
|
+
return /* @__PURE__ */ a.jsx(Nn, { error: e });
|
|
100
121
|
}
|
|
101
|
-
var
|
|
102
|
-
const
|
|
103
|
-
Object.defineProperty(
|
|
104
|
-
var
|
|
105
|
-
function
|
|
122
|
+
var tt = {};
|
|
123
|
+
const Za = /* @__PURE__ */ Ft(xa), es = /* @__PURE__ */ Ft(Fo), ts = /* @__PURE__ */ Ft(Ho);
|
|
124
|
+
Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
125
|
+
var ns = g, fe = Za, Ut = es, we = ts;
|
|
126
|
+
function rs(e) {
|
|
106
127
|
if (e && e.__esModule) return e;
|
|
107
128
|
var t = /* @__PURE__ */ Object.create(null);
|
|
108
129
|
return e && Object.keys(e).forEach(function(n) {
|
|
@@ -117,22 +138,22 @@ function Ca(e) {
|
|
|
117
138
|
}
|
|
118
139
|
}), t.default = e, Object.freeze(t);
|
|
119
140
|
}
|
|
120
|
-
var
|
|
121
|
-
function
|
|
141
|
+
var ue = /* @__PURE__ */ rs(ns);
|
|
142
|
+
function os({
|
|
122
143
|
basename: e,
|
|
123
144
|
children: t,
|
|
124
145
|
location: n = "/",
|
|
125
146
|
future: r
|
|
126
147
|
}) {
|
|
127
|
-
typeof n == "string" && (n =
|
|
128
|
-
let o =
|
|
148
|
+
typeof n == "string" && (n = we.parsePath(n));
|
|
149
|
+
let o = fe.Action.Pop, s = {
|
|
129
150
|
pathname: n.pathname || "/",
|
|
130
151
|
search: n.search || "",
|
|
131
152
|
hash: n.hash || "",
|
|
132
153
|
state: n.state != null ? n.state : null,
|
|
133
154
|
key: n.key || "default"
|
|
134
|
-
}, i =
|
|
135
|
-
return /* @__PURE__ */
|
|
155
|
+
}, i = Qn();
|
|
156
|
+
return /* @__PURE__ */ ue.createElement(we.Router, {
|
|
136
157
|
basename: e,
|
|
137
158
|
children: t,
|
|
138
159
|
location: s,
|
|
@@ -142,55 +163,55 @@ function Sa({
|
|
|
142
163
|
static: !0
|
|
143
164
|
});
|
|
144
165
|
}
|
|
145
|
-
function
|
|
166
|
+
function as({
|
|
146
167
|
context: e,
|
|
147
168
|
router: t,
|
|
148
169
|
hydrate: n = !0,
|
|
149
170
|
nonce: r
|
|
150
171
|
}) {
|
|
151
|
-
t && e || (process.env.NODE_ENV !== "production" ?
|
|
172
|
+
t && e || (process.env.NODE_ENV !== "production" ? fe.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : fe.UNSAFE_invariant(!1));
|
|
152
173
|
let o = {
|
|
153
174
|
router: t,
|
|
154
|
-
navigator:
|
|
175
|
+
navigator: Qn(),
|
|
155
176
|
static: !0,
|
|
156
177
|
staticContext: e,
|
|
157
178
|
basename: e.basename || "/"
|
|
158
179
|
}, s = /* @__PURE__ */ new Map(), i = "";
|
|
159
180
|
if (n !== !1) {
|
|
160
|
-
let
|
|
181
|
+
let u = {
|
|
161
182
|
loaderData: e.loaderData,
|
|
162
183
|
actionData: e.actionData,
|
|
163
|
-
errors:
|
|
184
|
+
errors: is(e.errors)
|
|
164
185
|
};
|
|
165
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
186
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${hs(JSON.stringify(JSON.stringify(u)))});`;
|
|
166
187
|
}
|
|
167
188
|
let {
|
|
168
|
-
state:
|
|
189
|
+
state: l
|
|
169
190
|
} = o.router;
|
|
170
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ ue.createElement(ue.Fragment, null, /* @__PURE__ */ ue.createElement(we.UNSAFE_DataRouterContext.Provider, {
|
|
171
192
|
value: o
|
|
172
|
-
}, /* @__PURE__ */
|
|
173
|
-
value:
|
|
174
|
-
}, /* @__PURE__ */
|
|
193
|
+
}, /* @__PURE__ */ ue.createElement(we.UNSAFE_DataRouterStateContext.Provider, {
|
|
194
|
+
value: l
|
|
195
|
+
}, /* @__PURE__ */ ue.createElement(we.UNSAFE_FetchersContext.Provider, {
|
|
175
196
|
value: s
|
|
176
|
-
}, /* @__PURE__ */
|
|
197
|
+
}, /* @__PURE__ */ ue.createElement(we.UNSAFE_ViewTransitionContext.Provider, {
|
|
177
198
|
value: {
|
|
178
199
|
isTransitioning: !1
|
|
179
200
|
}
|
|
180
|
-
}, /* @__PURE__ */
|
|
201
|
+
}, /* @__PURE__ */ ue.createElement(we.Router, {
|
|
181
202
|
basename: o.basename,
|
|
182
|
-
location:
|
|
183
|
-
navigationType:
|
|
203
|
+
location: l.location,
|
|
204
|
+
navigationType: l.historyAction,
|
|
184
205
|
navigator: o.navigator,
|
|
185
206
|
static: o.static,
|
|
186
207
|
future: {
|
|
187
208
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
188
209
|
}
|
|
189
|
-
}, /* @__PURE__ */
|
|
210
|
+
}, /* @__PURE__ */ ue.createElement(ss, {
|
|
190
211
|
routes: t.routes,
|
|
191
212
|
future: t.future,
|
|
192
|
-
state:
|
|
193
|
-
})))))), i ? /* @__PURE__ */
|
|
213
|
+
state: l
|
|
214
|
+
})))))), i ? /* @__PURE__ */ ue.createElement("script", {
|
|
194
215
|
suppressHydrationWarning: !0,
|
|
195
216
|
nonce: r,
|
|
196
217
|
dangerouslySetInnerHTML: {
|
|
@@ -198,18 +219,18 @@ function ja({
|
|
|
198
219
|
}
|
|
199
220
|
}) : null);
|
|
200
221
|
}
|
|
201
|
-
function
|
|
222
|
+
function ss({
|
|
202
223
|
routes: e,
|
|
203
224
|
future: t,
|
|
204
225
|
state: n
|
|
205
226
|
}) {
|
|
206
|
-
return
|
|
227
|
+
return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
|
|
207
228
|
}
|
|
208
|
-
function
|
|
229
|
+
function is(e) {
|
|
209
230
|
if (!e) return null;
|
|
210
231
|
let t = Object.entries(e), n = {};
|
|
211
232
|
for (let [r, o] of t)
|
|
212
|
-
|
|
233
|
+
fe.isRouteErrorResponse(o) ? n[r] = {
|
|
213
234
|
...o,
|
|
214
235
|
__type: "RouteErrorResponse"
|
|
215
236
|
} : o instanceof Error ? n[r] = {
|
|
@@ -223,10 +244,10 @@ function Ra(e) {
|
|
|
223
244
|
} : n[r] = o;
|
|
224
245
|
return n;
|
|
225
246
|
}
|
|
226
|
-
function
|
|
247
|
+
function Qn() {
|
|
227
248
|
return {
|
|
228
|
-
createHref:
|
|
229
|
-
encodeLocation:
|
|
249
|
+
createHref: Gn,
|
|
250
|
+
encodeLocation: Wn,
|
|
230
251
|
push(e) {
|
|
231
252
|
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(e)})\` somewhere in your app.`);
|
|
232
253
|
},
|
|
@@ -244,45 +265,45 @@ function Gt() {
|
|
|
244
265
|
}
|
|
245
266
|
};
|
|
246
267
|
}
|
|
247
|
-
function
|
|
248
|
-
return
|
|
268
|
+
function ls(e, t) {
|
|
269
|
+
return fe.createStaticHandler(e, {
|
|
249
270
|
...t,
|
|
250
|
-
mapRouteProperties:
|
|
271
|
+
mapRouteProperties: Ut.UNSAFE_mapRouteProperties
|
|
251
272
|
});
|
|
252
273
|
}
|
|
253
|
-
function
|
|
254
|
-
let r = {}, o =
|
|
255
|
-
let
|
|
274
|
+
function cs(e, t, n = {}) {
|
|
275
|
+
let r = {}, o = fe.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
|
|
276
|
+
let u = r[l.route.id] || l.route;
|
|
256
277
|
return {
|
|
257
|
-
...
|
|
258
|
-
route:
|
|
278
|
+
...l,
|
|
279
|
+
route: u
|
|
259
280
|
};
|
|
260
|
-
}), i = (
|
|
281
|
+
}), i = (l) => `You cannot use router.${l}() on the server because it is a stateless environment`;
|
|
261
282
|
return {
|
|
262
283
|
get basename() {
|
|
263
284
|
return t.basename;
|
|
264
285
|
},
|
|
265
286
|
get future() {
|
|
266
|
-
var
|
|
287
|
+
var l, u;
|
|
267
288
|
return {
|
|
268
289
|
v7_fetcherPersist: !1,
|
|
269
290
|
v7_normalizeFormMethod: !1,
|
|
270
|
-
v7_partialHydration: ((
|
|
291
|
+
v7_partialHydration: ((l = n.future) == null ? void 0 : l.v7_partialHydration) === !0,
|
|
271
292
|
v7_prependBasename: !1,
|
|
272
|
-
v7_relativeSplatPath: ((
|
|
293
|
+
v7_relativeSplatPath: ((u = n.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
|
|
273
294
|
v7_skipActionErrorRevalidation: !1
|
|
274
295
|
};
|
|
275
296
|
},
|
|
276
297
|
get state() {
|
|
277
298
|
return {
|
|
278
|
-
historyAction:
|
|
299
|
+
historyAction: fe.Action.Pop,
|
|
279
300
|
location: t.location,
|
|
280
301
|
matches: s,
|
|
281
302
|
loaderData: t.loaderData,
|
|
282
303
|
actionData: t.actionData,
|
|
283
304
|
errors: t.errors,
|
|
284
305
|
initialized: !0,
|
|
285
|
-
navigation:
|
|
306
|
+
navigation: fe.IDLE_NAVIGATION,
|
|
286
307
|
restoreScrollPosition: null,
|
|
287
308
|
preventScrollReset: !1,
|
|
288
309
|
revalidation: "idle",
|
|
@@ -313,10 +334,10 @@ function _a(e, t, n = {}) {
|
|
|
313
334
|
revalidate() {
|
|
314
335
|
throw i("revalidate");
|
|
315
336
|
},
|
|
316
|
-
createHref:
|
|
317
|
-
encodeLocation:
|
|
337
|
+
createHref: Gn,
|
|
338
|
+
encodeLocation: Wn,
|
|
318
339
|
getFetcher() {
|
|
319
|
-
return
|
|
340
|
+
return fe.IDLE_FETCHER;
|
|
320
341
|
},
|
|
321
342
|
deleteFetcher() {
|
|
322
343
|
throw i("deleteFetcher");
|
|
@@ -325,7 +346,7 @@ function _a(e, t, n = {}) {
|
|
|
325
346
|
throw i("dispose");
|
|
326
347
|
},
|
|
327
348
|
getBlocker() {
|
|
328
|
-
return
|
|
349
|
+
return fe.IDLE_BLOCKER;
|
|
329
350
|
},
|
|
330
351
|
deleteBlocker() {
|
|
331
352
|
throw i("deleteBlocker");
|
|
@@ -340,51 +361,51 @@ function _a(e, t, n = {}) {
|
|
|
340
361
|
}
|
|
341
362
|
};
|
|
342
363
|
}
|
|
343
|
-
function
|
|
344
|
-
return typeof e == "string" ? e :
|
|
364
|
+
function Gn(e) {
|
|
365
|
+
return typeof e == "string" ? e : we.createPath(e);
|
|
345
366
|
}
|
|
346
|
-
function
|
|
347
|
-
let t = typeof e == "string" ? e :
|
|
367
|
+
function Wn(e) {
|
|
368
|
+
let t = typeof e == "string" ? e : we.createPath(e);
|
|
348
369
|
t = t.replace(/ $/, "%20");
|
|
349
|
-
let n =
|
|
370
|
+
let n = us.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
350
371
|
return {
|
|
351
372
|
pathname: n.pathname,
|
|
352
373
|
search: n.search,
|
|
353
374
|
hash: n.hash
|
|
354
375
|
};
|
|
355
376
|
}
|
|
356
|
-
const
|
|
377
|
+
const us = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ds = {
|
|
357
378
|
"&": "\\u0026",
|
|
358
379
|
">": "\\u003e",
|
|
359
380
|
"<": "\\u003c",
|
|
360
381
|
"\u2028": "\\u2028",
|
|
361
382
|
"\u2029": "\\u2029"
|
|
362
|
-
},
|
|
363
|
-
function
|
|
364
|
-
return e.replace(
|
|
383
|
+
}, fs = /[&><\u2028\u2029]/g;
|
|
384
|
+
function hs(e) {
|
|
385
|
+
return e.replace(fs, (t) => ds[t]);
|
|
365
386
|
}
|
|
366
|
-
|
|
367
|
-
var
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
const
|
|
387
|
+
tt.StaticRouter = os;
|
|
388
|
+
var ps = tt.StaticRouterProvider = as;
|
|
389
|
+
tt.createStaticHandler = ls;
|
|
390
|
+
tt.createStaticRouter = cs;
|
|
391
|
+
const ms = ({
|
|
371
392
|
router: e,
|
|
372
393
|
hydrate: t = !1
|
|
373
|
-
}) => /* @__PURE__ */ a.jsx(
|
|
394
|
+
}) => /* @__PURE__ */ a.jsx($n, { children: /* @__PURE__ */ a.jsx(Dn, { children: /* @__PURE__ */ a.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Uo, { router: e }) }) }) }), gs = ({
|
|
374
395
|
router: e,
|
|
375
396
|
context: t,
|
|
376
397
|
helmetContext: n
|
|
377
|
-
}) => /* @__PURE__ */ a.jsx(
|
|
378
|
-
var
|
|
398
|
+
}) => /* @__PURE__ */ a.jsx($n, { children: /* @__PURE__ */ a.jsx(Dn, { context: n, children: /* @__PURE__ */ a.jsx(ps, { router: e, context: t }) }) });
|
|
399
|
+
var de, En, vs = (En = class extends Bn {
|
|
379
400
|
constructor(t = {}) {
|
|
380
401
|
super();
|
|
381
|
-
|
|
382
|
-
this.config = t,
|
|
402
|
+
ae(this, de);
|
|
403
|
+
this.config = t, G(this, de, /* @__PURE__ */ new Map());
|
|
383
404
|
}
|
|
384
405
|
build(t, n, r) {
|
|
385
|
-
const o = n.queryKey, s = n.queryHash ??
|
|
406
|
+
const o = n.queryKey, s = n.queryHash ?? zn(o, n);
|
|
386
407
|
let i = this.get(s);
|
|
387
|
-
return i || (i = new
|
|
408
|
+
return i || (i = new Sa({
|
|
388
409
|
cache: this,
|
|
389
410
|
queryKey: o,
|
|
390
411
|
queryHash: s,
|
|
@@ -394,119 +415,119 @@ var T, Ct, Fa = (Ct = class extends Kt {
|
|
|
394
415
|
}), this.add(i)), i;
|
|
395
416
|
}
|
|
396
417
|
add(t) {
|
|
397
|
-
|
|
418
|
+
x(this, de).has(t.queryHash) || (x(this, de).set(t.queryHash, t), this.notify({
|
|
398
419
|
type: "added",
|
|
399
420
|
query: t
|
|
400
421
|
}));
|
|
401
422
|
}
|
|
402
423
|
remove(t) {
|
|
403
|
-
const n =
|
|
404
|
-
n && (t.destroy(), n === t &&
|
|
424
|
+
const n = x(this, de).get(t.queryHash);
|
|
425
|
+
n && (t.destroy(), n === t && x(this, de).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
405
426
|
}
|
|
406
427
|
clear() {
|
|
407
|
-
|
|
428
|
+
ee.batch(() => {
|
|
408
429
|
this.getAll().forEach((t) => {
|
|
409
430
|
this.remove(t);
|
|
410
431
|
});
|
|
411
432
|
});
|
|
412
433
|
}
|
|
413
434
|
get(t) {
|
|
414
|
-
return
|
|
435
|
+
return x(this, de).get(t);
|
|
415
436
|
}
|
|
416
437
|
getAll() {
|
|
417
|
-
return [...
|
|
438
|
+
return [...x(this, de).values()];
|
|
418
439
|
}
|
|
419
440
|
find(t) {
|
|
420
441
|
const n = { exact: !0, ...t };
|
|
421
442
|
return this.getAll().find(
|
|
422
|
-
(r) =>
|
|
443
|
+
(r) => fn(n, r)
|
|
423
444
|
);
|
|
424
445
|
}
|
|
425
446
|
findAll(t = {}) {
|
|
426
447
|
const n = this.getAll();
|
|
427
|
-
return Object.keys(t).length > 0 ? n.filter((r) =>
|
|
448
|
+
return Object.keys(t).length > 0 ? n.filter((r) => fn(t, r)) : n;
|
|
428
449
|
}
|
|
429
450
|
notify(t) {
|
|
430
|
-
|
|
451
|
+
ee.batch(() => {
|
|
431
452
|
this.listeners.forEach((n) => {
|
|
432
453
|
n(t);
|
|
433
454
|
});
|
|
434
455
|
});
|
|
435
456
|
}
|
|
436
457
|
onFocus() {
|
|
437
|
-
|
|
458
|
+
ee.batch(() => {
|
|
438
459
|
this.getAll().forEach((t) => {
|
|
439
460
|
t.onFocus();
|
|
440
461
|
});
|
|
441
462
|
});
|
|
442
463
|
}
|
|
443
464
|
onOnline() {
|
|
444
|
-
|
|
465
|
+
ee.batch(() => {
|
|
445
466
|
this.getAll().forEach((t) => {
|
|
446
467
|
t.onOnline();
|
|
447
468
|
});
|
|
448
469
|
});
|
|
449
470
|
}
|
|
450
|
-
},
|
|
471
|
+
}, de = new WeakMap(), En), Z, Je, Cn, ws = (Cn = class extends Bn {
|
|
451
472
|
constructor(t = {}) {
|
|
452
473
|
super();
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
this.config = t,
|
|
474
|
+
ae(this, Z);
|
|
475
|
+
ae(this, Je);
|
|
476
|
+
this.config = t, G(this, Z, /* @__PURE__ */ new Map()), G(this, Je, Date.now());
|
|
456
477
|
}
|
|
457
478
|
build(t, n, r) {
|
|
458
|
-
const o = new
|
|
479
|
+
const o = new Vo({
|
|
459
480
|
mutationCache: this,
|
|
460
|
-
mutationId: ++
|
|
481
|
+
mutationId: ++lt(this, Je)._,
|
|
461
482
|
options: t.defaultMutationOptions(n),
|
|
462
483
|
state: r
|
|
463
484
|
});
|
|
464
485
|
return this.add(o), o;
|
|
465
486
|
}
|
|
466
487
|
add(t) {
|
|
467
|
-
const n =
|
|
468
|
-
r.push(t),
|
|
488
|
+
const n = ct(t), r = x(this, Z).get(n) ?? [];
|
|
489
|
+
r.push(t), x(this, Z).set(n, r), this.notify({ type: "added", mutation: t });
|
|
469
490
|
}
|
|
470
491
|
remove(t) {
|
|
471
492
|
var r;
|
|
472
|
-
const n =
|
|
473
|
-
if (
|
|
474
|
-
const o = (r =
|
|
475
|
-
o && (o.length === 0 ?
|
|
493
|
+
const n = ct(t);
|
|
494
|
+
if (x(this, Z).has(n)) {
|
|
495
|
+
const o = (r = x(this, Z).get(n)) == null ? void 0 : r.filter((s) => s !== t);
|
|
496
|
+
o && (o.length === 0 ? x(this, Z).delete(n) : x(this, Z).set(n, o));
|
|
476
497
|
}
|
|
477
498
|
this.notify({ type: "removed", mutation: t });
|
|
478
499
|
}
|
|
479
500
|
canRun(t) {
|
|
480
501
|
var r;
|
|
481
|
-
const n = (r =
|
|
502
|
+
const n = (r = x(this, Z).get(ct(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
|
|
482
503
|
return !n || n === t;
|
|
483
504
|
}
|
|
484
505
|
runNext(t) {
|
|
485
506
|
var r;
|
|
486
|
-
const n = (r =
|
|
507
|
+
const n = (r = x(this, Z).get(ct(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
|
|
487
508
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
488
509
|
}
|
|
489
510
|
clear() {
|
|
490
|
-
|
|
511
|
+
ee.batch(() => {
|
|
491
512
|
this.getAll().forEach((t) => {
|
|
492
513
|
this.remove(t);
|
|
493
514
|
});
|
|
494
515
|
});
|
|
495
516
|
}
|
|
496
517
|
getAll() {
|
|
497
|
-
return [...
|
|
518
|
+
return [...x(this, Z).values()].flat();
|
|
498
519
|
}
|
|
499
520
|
find(t) {
|
|
500
521
|
const n = { exact: !0, ...t };
|
|
501
522
|
return this.getAll().find(
|
|
502
|
-
(r) =>
|
|
523
|
+
(r) => hn(n, r)
|
|
503
524
|
);
|
|
504
525
|
}
|
|
505
526
|
findAll(t = {}) {
|
|
506
|
-
return this.getAll().filter((n) =>
|
|
527
|
+
return this.getAll().filter((n) => hn(t, n));
|
|
507
528
|
}
|
|
508
529
|
notify(t) {
|
|
509
|
-
|
|
530
|
+
ee.batch(() => {
|
|
510
531
|
this.listeners.forEach((n) => {
|
|
511
532
|
n(t);
|
|
512
533
|
});
|
|
@@ -514,70 +535,70 @@ var T, Ct, Fa = (Ct = class extends Kt {
|
|
|
514
535
|
}
|
|
515
536
|
resumePausedMutations() {
|
|
516
537
|
const t = this.getAll().filter((n) => n.state.isPaused);
|
|
517
|
-
return
|
|
538
|
+
return ee.batch(
|
|
518
539
|
() => Promise.all(
|
|
519
|
-
t.map((n) => n.continue().catch(
|
|
540
|
+
t.map((n) => n.continue().catch(ve))
|
|
520
541
|
)
|
|
521
542
|
);
|
|
522
543
|
}
|
|
523
|
-
},
|
|
524
|
-
function
|
|
544
|
+
}, Z = new WeakMap(), Je = new WeakMap(), Cn);
|
|
545
|
+
function ct(e) {
|
|
525
546
|
var t;
|
|
526
547
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
527
548
|
}
|
|
528
|
-
function
|
|
549
|
+
function xs(e) {
|
|
529
550
|
return {
|
|
530
551
|
onFetch: (t, n) => {
|
|
531
552
|
const r = async () => {
|
|
532
|
-
var
|
|
533
|
-
const o = t.options, s = (
|
|
553
|
+
var b, R, K, H, Q;
|
|
554
|
+
const o = t.options, s = (K = (R = (b = t.fetchOptions) == null ? void 0 : b.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : K.direction, i = ((H = t.state.data) == null ? void 0 : H.pages) || [], l = ((Q = t.state.data) == null ? void 0 : Q.pageParams) || [], u = { pages: [], pageParams: [] };
|
|
534
555
|
let v = !1;
|
|
535
|
-
const
|
|
536
|
-
Object.defineProperty(
|
|
556
|
+
const m = (y) => {
|
|
557
|
+
Object.defineProperty(y, "signal", {
|
|
537
558
|
enumerable: !0,
|
|
538
559
|
get: () => (t.signal.aborted ? v = !0 : t.signal.addEventListener("abort", () => {
|
|
539
560
|
v = !0;
|
|
540
561
|
}), t.signal)
|
|
541
562
|
});
|
|
542
|
-
},
|
|
563
|
+
}, c = Ea(t.options, t.fetchOptions), d = async (y, p, C) => {
|
|
543
564
|
if (v)
|
|
544
565
|
return Promise.reject();
|
|
545
|
-
if (
|
|
546
|
-
return Promise.resolve(
|
|
547
|
-
const
|
|
566
|
+
if (p == null && y.pages.length)
|
|
567
|
+
return Promise.resolve(y);
|
|
568
|
+
const N = {
|
|
548
569
|
queryKey: t.queryKey,
|
|
549
|
-
pageParam:
|
|
550
|
-
direction:
|
|
570
|
+
pageParam: p,
|
|
571
|
+
direction: C ? "backward" : "forward",
|
|
551
572
|
meta: t.options.meta
|
|
552
573
|
};
|
|
553
|
-
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
), { maxPages:
|
|
574
|
+
m(N);
|
|
575
|
+
const P = await c(
|
|
576
|
+
N
|
|
577
|
+
), { maxPages: _ } = t.options, w = C ? Ca : Ra;
|
|
557
578
|
return {
|
|
558
|
-
pages:
|
|
559
|
-
pageParams:
|
|
579
|
+
pages: w(y.pages, P, _),
|
|
580
|
+
pageParams: w(y.pageParams, p, _)
|
|
560
581
|
};
|
|
561
582
|
};
|
|
562
|
-
let
|
|
583
|
+
let f;
|
|
563
584
|
if (s && i.length) {
|
|
564
|
-
const
|
|
585
|
+
const y = s === "backward", p = y ? ys : wn, C = {
|
|
565
586
|
pages: i,
|
|
566
|
-
pageParams:
|
|
567
|
-
},
|
|
568
|
-
|
|
587
|
+
pageParams: l
|
|
588
|
+
}, N = p(o, C);
|
|
589
|
+
f = await d(C, N, y);
|
|
569
590
|
} else {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
591
|
+
f = await d(
|
|
592
|
+
u,
|
|
593
|
+
l[0] ?? o.initialPageParam
|
|
573
594
|
);
|
|
574
|
-
const
|
|
575
|
-
for (let
|
|
576
|
-
const
|
|
577
|
-
|
|
595
|
+
const y = e ?? i.length;
|
|
596
|
+
for (let p = 1; p < y; p++) {
|
|
597
|
+
const C = wn(o, f);
|
|
598
|
+
f = await d(f, C);
|
|
578
599
|
}
|
|
579
600
|
}
|
|
580
|
-
return
|
|
601
|
+
return f;
|
|
581
602
|
};
|
|
582
603
|
t.options.persister ? t.fetchFn = () => {
|
|
583
604
|
var o, s;
|
|
@@ -595,7 +616,7 @@ function Ka(e) {
|
|
|
595
616
|
}
|
|
596
617
|
};
|
|
597
618
|
}
|
|
598
|
-
function
|
|
619
|
+
function wn(e, { pages: t, pageParams: n }) {
|
|
599
620
|
const r = t.length - 1;
|
|
600
621
|
return e.getNextPageParam(
|
|
601
622
|
t[r],
|
|
@@ -604,7 +625,7 @@ function bt(e, { pages: t, pageParams: n }) {
|
|
|
604
625
|
n
|
|
605
626
|
);
|
|
606
627
|
}
|
|
607
|
-
function
|
|
628
|
+
function ys(e, { pages: t, pageParams: n }) {
|
|
608
629
|
var r;
|
|
609
630
|
return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
|
|
610
631
|
e,
|
|
@@ -614,65 +635,65 @@ function $a(e, { pages: t, pageParams: n }) {
|
|
|
614
635
|
n
|
|
615
636
|
);
|
|
616
637
|
}
|
|
617
|
-
var
|
|
638
|
+
var $, Se, Ee, ke, $e, Ce, Le, Fe, Rn, bs = (Rn = class {
|
|
618
639
|
constructor(e = {}) {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
640
|
+
ae(this, $);
|
|
641
|
+
ae(this, Se);
|
|
642
|
+
ae(this, Ee);
|
|
643
|
+
ae(this, ke);
|
|
644
|
+
ae(this, $e);
|
|
645
|
+
ae(this, Ce);
|
|
646
|
+
ae(this, Le);
|
|
647
|
+
ae(this, Fe);
|
|
648
|
+
G(this, $, e.queryCache || new vs()), G(this, Se, e.mutationCache || new ws()), G(this, Ee, e.defaultOptions || {}), G(this, ke, /* @__PURE__ */ new Map()), G(this, $e, /* @__PURE__ */ new Map()), G(this, Ce, 0);
|
|
628
649
|
}
|
|
629
650
|
mount() {
|
|
630
|
-
|
|
631
|
-
e && (await this.resumePausedMutations(),
|
|
632
|
-
})),
|
|
633
|
-
e && (await this.resumePausedMutations(),
|
|
651
|
+
lt(this, Ce)._++, x(this, Ce) === 1 && (G(this, Le, Da.subscribe(async (e) => {
|
|
652
|
+
e && (await this.resumePausedMutations(), x(this, $).onFocus());
|
|
653
|
+
})), G(this, Fe, pn.subscribe(async (e) => {
|
|
654
|
+
e && (await this.resumePausedMutations(), x(this, $).onOnline());
|
|
634
655
|
})));
|
|
635
656
|
}
|
|
636
657
|
unmount() {
|
|
637
658
|
var e, t;
|
|
638
|
-
|
|
659
|
+
lt(this, Ce)._--, x(this, Ce) === 0 && ((e = x(this, Le)) == null || e.call(this), G(this, Le, void 0), (t = x(this, Fe)) == null || t.call(this), G(this, Fe, void 0));
|
|
639
660
|
}
|
|
640
661
|
isFetching(e) {
|
|
641
|
-
return
|
|
662
|
+
return x(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
642
663
|
}
|
|
643
664
|
isMutating(e) {
|
|
644
|
-
return
|
|
665
|
+
return x(this, Se).findAll({ ...e, status: "pending" }).length;
|
|
645
666
|
}
|
|
646
667
|
getQueryData(e) {
|
|
647
668
|
var n;
|
|
648
669
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
649
|
-
return (n =
|
|
670
|
+
return (n = x(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
|
|
650
671
|
}
|
|
651
672
|
ensureQueryData(e) {
|
|
652
673
|
const t = this.getQueryData(e.queryKey);
|
|
653
674
|
if (t === void 0)
|
|
654
675
|
return this.fetchQuery(e);
|
|
655
676
|
{
|
|
656
|
-
const n = this.defaultQueryOptions(e), r =
|
|
657
|
-
return e.revalidateIfStale && r.isStaleByTime(
|
|
677
|
+
const n = this.defaultQueryOptions(e), r = x(this, $).build(this, n);
|
|
678
|
+
return e.revalidateIfStale && r.isStaleByTime(mn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
|
|
658
679
|
}
|
|
659
680
|
}
|
|
660
681
|
getQueriesData(e) {
|
|
661
|
-
return
|
|
682
|
+
return x(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
|
|
662
683
|
const r = n.data;
|
|
663
684
|
return [t, r];
|
|
664
685
|
});
|
|
665
686
|
}
|
|
666
687
|
setQueryData(e, t, n) {
|
|
667
|
-
const r = this.defaultQueryOptions({ queryKey: e }), o =
|
|
688
|
+
const r = this.defaultQueryOptions({ queryKey: e }), o = x(this, $).get(
|
|
668
689
|
r.queryHash
|
|
669
|
-
), s = o == null ? void 0 : o.state.data, i =
|
|
690
|
+
), s = o == null ? void 0 : o.state.data, i = ja(t, s);
|
|
670
691
|
if (i !== void 0)
|
|
671
|
-
return
|
|
692
|
+
return x(this, $).build(this, r).setData(i, { ...n, manual: !0 });
|
|
672
693
|
}
|
|
673
694
|
setQueriesData(e, t, n) {
|
|
674
|
-
return
|
|
675
|
-
() =>
|
|
695
|
+
return ee.batch(
|
|
696
|
+
() => x(this, $).findAll(e).map(({ queryKey: r }) => [
|
|
676
697
|
r,
|
|
677
698
|
this.setQueryData(r, t, n)
|
|
678
699
|
])
|
|
@@ -681,34 +702,34 @@ var w, G, H, re, ae, U, oe, se, jt, Ba = (jt = class {
|
|
|
681
702
|
getQueryState(e) {
|
|
682
703
|
var n;
|
|
683
704
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
684
|
-
return (n =
|
|
705
|
+
return (n = x(this, $).get(t.queryHash)) == null ? void 0 : n.state;
|
|
685
706
|
}
|
|
686
707
|
removeQueries(e) {
|
|
687
|
-
const t =
|
|
688
|
-
|
|
708
|
+
const t = x(this, $);
|
|
709
|
+
ee.batch(() => {
|
|
689
710
|
t.findAll(e).forEach((n) => {
|
|
690
711
|
t.remove(n);
|
|
691
712
|
});
|
|
692
713
|
});
|
|
693
714
|
}
|
|
694
715
|
resetQueries(e, t) {
|
|
695
|
-
const n =
|
|
716
|
+
const n = x(this, $), r = {
|
|
696
717
|
type: "active",
|
|
697
718
|
...e
|
|
698
719
|
};
|
|
699
|
-
return
|
|
720
|
+
return ee.batch(() => (n.findAll(e).forEach((o) => {
|
|
700
721
|
o.reset();
|
|
701
722
|
}), this.refetchQueries(r, t)));
|
|
702
723
|
}
|
|
703
724
|
cancelQueries(e = {}, t = {}) {
|
|
704
|
-
const n = { revert: !0, ...t }, r =
|
|
705
|
-
() =>
|
|
725
|
+
const n = { revert: !0, ...t }, r = ee.batch(
|
|
726
|
+
() => x(this, $).findAll(e).map((o) => o.cancel(n))
|
|
706
727
|
);
|
|
707
|
-
return Promise.all(r).then(
|
|
728
|
+
return Promise.all(r).then(ve).catch(ve);
|
|
708
729
|
}
|
|
709
730
|
invalidateQueries(e = {}, t = {}) {
|
|
710
|
-
return
|
|
711
|
-
if (
|
|
731
|
+
return ee.batch(() => {
|
|
732
|
+
if (x(this, $).findAll(e).forEach((r) => {
|
|
712
733
|
r.invalidate();
|
|
713
734
|
}), e.refetchType === "none")
|
|
714
735
|
return Promise.resolve();
|
|
@@ -723,105 +744,105 @@ var w, G, H, re, ae, U, oe, se, jt, Ba = (jt = class {
|
|
|
723
744
|
const n = {
|
|
724
745
|
...t,
|
|
725
746
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
726
|
-
}, r =
|
|
727
|
-
() =>
|
|
747
|
+
}, r = ee.batch(
|
|
748
|
+
() => x(this, $).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
|
|
728
749
|
let s = o.fetch(void 0, n);
|
|
729
|
-
return n.throwOnError || (s = s.catch(
|
|
750
|
+
return n.throwOnError || (s = s.catch(ve)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
730
751
|
})
|
|
731
752
|
);
|
|
732
|
-
return Promise.all(r).then(
|
|
753
|
+
return Promise.all(r).then(ve);
|
|
733
754
|
}
|
|
734
755
|
fetchQuery(e) {
|
|
735
756
|
const t = this.defaultQueryOptions(e);
|
|
736
757
|
t.retry === void 0 && (t.retry = !1);
|
|
737
|
-
const n =
|
|
758
|
+
const n = x(this, $).build(this, t);
|
|
738
759
|
return n.isStaleByTime(
|
|
739
|
-
|
|
760
|
+
mn(t.staleTime, n)
|
|
740
761
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
741
762
|
}
|
|
742
763
|
prefetchQuery(e) {
|
|
743
|
-
return this.fetchQuery(e).then(
|
|
764
|
+
return this.fetchQuery(e).then(ve).catch(ve);
|
|
744
765
|
}
|
|
745
766
|
fetchInfiniteQuery(e) {
|
|
746
|
-
return e.behavior =
|
|
767
|
+
return e.behavior = xs(e.pages), this.fetchQuery(e);
|
|
747
768
|
}
|
|
748
769
|
prefetchInfiniteQuery(e) {
|
|
749
|
-
return this.fetchInfiniteQuery(e).then(
|
|
770
|
+
return this.fetchInfiniteQuery(e).then(ve).catch(ve);
|
|
750
771
|
}
|
|
751
772
|
resumePausedMutations() {
|
|
752
|
-
return
|
|
773
|
+
return pn.isOnline() ? x(this, Se).resumePausedMutations() : Promise.resolve();
|
|
753
774
|
}
|
|
754
775
|
getQueryCache() {
|
|
755
|
-
return
|
|
776
|
+
return x(this, $);
|
|
756
777
|
}
|
|
757
778
|
getMutationCache() {
|
|
758
|
-
return
|
|
779
|
+
return x(this, Se);
|
|
759
780
|
}
|
|
760
781
|
getDefaultOptions() {
|
|
761
|
-
return
|
|
782
|
+
return x(this, Ee);
|
|
762
783
|
}
|
|
763
784
|
setDefaultOptions(e) {
|
|
764
|
-
|
|
785
|
+
G(this, Ee, e);
|
|
765
786
|
}
|
|
766
787
|
setQueryDefaults(e, t) {
|
|
767
|
-
|
|
788
|
+
x(this, ke).set(gn(e), {
|
|
768
789
|
queryKey: e,
|
|
769
790
|
defaultOptions: t
|
|
770
791
|
});
|
|
771
792
|
}
|
|
772
793
|
getQueryDefaults(e) {
|
|
773
|
-
const t = [...
|
|
794
|
+
const t = [...x(this, ke).values()];
|
|
774
795
|
let n = {};
|
|
775
796
|
return t.forEach((r) => {
|
|
776
|
-
|
|
797
|
+
vn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
777
798
|
}), n;
|
|
778
799
|
}
|
|
779
800
|
setMutationDefaults(e, t) {
|
|
780
|
-
|
|
801
|
+
x(this, $e).set(gn(e), {
|
|
781
802
|
mutationKey: e,
|
|
782
803
|
defaultOptions: t
|
|
783
804
|
});
|
|
784
805
|
}
|
|
785
806
|
getMutationDefaults(e) {
|
|
786
|
-
const t = [...
|
|
807
|
+
const t = [...x(this, $e).values()];
|
|
787
808
|
let n = {};
|
|
788
809
|
return t.forEach((r) => {
|
|
789
|
-
|
|
810
|
+
vn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
790
811
|
}), n;
|
|
791
812
|
}
|
|
792
813
|
defaultQueryOptions(e) {
|
|
793
814
|
if (e._defaulted)
|
|
794
815
|
return e;
|
|
795
816
|
const t = {
|
|
796
|
-
...
|
|
817
|
+
...x(this, Ee).queries,
|
|
797
818
|
...this.getQueryDefaults(e.queryKey),
|
|
798
819
|
...e,
|
|
799
820
|
_defaulted: !0
|
|
800
821
|
};
|
|
801
|
-
return t.queryHash || (t.queryHash =
|
|
822
|
+
return t.queryHash || (t.queryHash = zn(
|
|
802
823
|
t.queryKey,
|
|
803
824
|
t
|
|
804
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
825
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Na && (t.enabled = !1), t;
|
|
805
826
|
}
|
|
806
827
|
defaultMutationOptions(e) {
|
|
807
828
|
return e != null && e._defaulted ? e : {
|
|
808
|
-
...
|
|
829
|
+
...x(this, Ee).mutations,
|
|
809
830
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
810
831
|
...e,
|
|
811
832
|
_defaulted: !0
|
|
812
833
|
};
|
|
813
834
|
}
|
|
814
835
|
clear() {
|
|
815
|
-
|
|
836
|
+
x(this, $).clear(), x(this, Se).clear();
|
|
816
837
|
}
|
|
817
|
-
},
|
|
818
|
-
const
|
|
838
|
+
}, $ = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), ke = new WeakMap(), $e = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(), Fe = new WeakMap(), Rn);
|
|
839
|
+
const Ms = Ln(null), St = {
|
|
819
840
|
didCatch: !1,
|
|
820
841
|
error: null
|
|
821
842
|
};
|
|
822
|
-
class
|
|
843
|
+
class Ss extends ha {
|
|
823
844
|
constructor(t) {
|
|
824
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
845
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = St;
|
|
825
846
|
}
|
|
826
847
|
static getDerivedStateFromError(t) {
|
|
827
848
|
return {
|
|
@@ -839,7 +860,7 @@ class qa extends Gr {
|
|
|
839
860
|
(n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
|
|
840
861
|
args: s,
|
|
841
862
|
reason: "imperative-api"
|
|
842
|
-
}), this.setState(
|
|
863
|
+
}), this.setState(St);
|
|
843
864
|
}
|
|
844
865
|
}
|
|
845
866
|
componentDidCatch(t, n) {
|
|
@@ -852,13 +873,13 @@ class qa extends Gr {
|
|
|
852
873
|
} = this.state, {
|
|
853
874
|
resetKeys: o
|
|
854
875
|
} = this.props;
|
|
855
|
-
if (r && n.error !== null &&
|
|
876
|
+
if (r && n.error !== null && Es(t.resetKeys, o)) {
|
|
856
877
|
var s, i;
|
|
857
878
|
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
858
879
|
next: o,
|
|
859
880
|
prev: t.resetKeys,
|
|
860
881
|
reason: "keys"
|
|
861
|
-
}), this.setState(
|
|
882
|
+
}), this.setState(St);
|
|
862
883
|
}
|
|
863
884
|
}
|
|
864
885
|
render() {
|
|
@@ -871,114 +892,114 @@ class qa extends Gr {
|
|
|
871
892
|
didCatch: s,
|
|
872
893
|
error: i
|
|
873
894
|
} = this.state;
|
|
874
|
-
let
|
|
895
|
+
let l = t;
|
|
875
896
|
if (s) {
|
|
876
|
-
const
|
|
897
|
+
const u = {
|
|
877
898
|
error: i,
|
|
878
899
|
resetErrorBoundary: this.resetErrorBoundary
|
|
879
900
|
};
|
|
880
901
|
if (typeof n == "function")
|
|
881
|
-
|
|
902
|
+
l = n(u);
|
|
882
903
|
else if (r)
|
|
883
|
-
|
|
884
|
-
else if (o === null ||
|
|
885
|
-
|
|
904
|
+
l = dn(r, u);
|
|
905
|
+
else if (o === null || pa(o))
|
|
906
|
+
l = o;
|
|
886
907
|
else
|
|
887
908
|
throw i;
|
|
888
909
|
}
|
|
889
|
-
return
|
|
910
|
+
return dn(Ms.Provider, {
|
|
890
911
|
value: {
|
|
891
912
|
didCatch: s,
|
|
892
913
|
error: i,
|
|
893
914
|
resetErrorBoundary: this.resetErrorBoundary
|
|
894
915
|
}
|
|
895
|
-
},
|
|
916
|
+
}, l);
|
|
896
917
|
}
|
|
897
918
|
}
|
|
898
|
-
function
|
|
919
|
+
function Es() {
|
|
899
920
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
900
921
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
901
922
|
}
|
|
902
|
-
const
|
|
903
|
-
class
|
|
923
|
+
const Cs = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Rs = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Ds = (e) => "renderSearch" in e && typeof e.renderSearch == "function", js = (e) => "initialize" in e && typeof e.initialize == "function", Ns = (e) => "getHead" in e && typeof e.getHead == "function", Ps = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Ts = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Yn = new bs();
|
|
924
|
+
class _s {
|
|
904
925
|
constructor(t) {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
926
|
+
J(this, "plugins");
|
|
927
|
+
J(this, "sidebars");
|
|
928
|
+
J(this, "topNavigation");
|
|
929
|
+
J(this, "meta");
|
|
930
|
+
J(this, "page");
|
|
931
|
+
J(this, "authentication");
|
|
932
|
+
J(this, "navigationPlugins");
|
|
933
|
+
J(this, "initialize", async () => {
|
|
913
934
|
await Promise.all(
|
|
914
|
-
this.plugins.filter(
|
|
935
|
+
this.plugins.filter(js).map((t) => {
|
|
915
936
|
var n;
|
|
916
937
|
return (n = t.initialize) == null ? void 0 : n.call(t, this);
|
|
917
938
|
})
|
|
918
939
|
);
|
|
919
940
|
});
|
|
920
|
-
|
|
921
|
-
await
|
|
941
|
+
J(this, "invalidateCache", async (t) => {
|
|
942
|
+
await Yn.invalidateQueries({ queryKey: t });
|
|
922
943
|
});
|
|
923
|
-
|
|
924
|
-
this.plugins.filter(
|
|
944
|
+
J(this, "getApiIdentities", async () => (await Promise.all(
|
|
945
|
+
this.plugins.filter(Ts).map((n) => n.getIdentities(this))
|
|
925
946
|
)).flat());
|
|
926
|
-
|
|
947
|
+
J(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
927
948
|
this.navigationPlugins.map(
|
|
928
949
|
(r) => {
|
|
929
950
|
var o;
|
|
930
|
-
return (o = r.getSidebar) == null ? void 0 : o.call(r,
|
|
951
|
+
return (o = r.getSidebar) == null ? void 0 : o.call(r, Ht(t));
|
|
931
952
|
}
|
|
932
953
|
)
|
|
933
954
|
)).flatMap((r) => r ?? []));
|
|
934
|
-
|
|
955
|
+
J(this, "signRequest", async (t) => {
|
|
935
956
|
if (!this.authentication)
|
|
936
957
|
throw new Error("No authentication provider configured");
|
|
937
958
|
const n = await this.authentication.getAccessToken();
|
|
938
959
|
return t.headers.set("Authorization", `Bearer ${n}`), t;
|
|
939
960
|
});
|
|
940
|
-
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
961
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Rs), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
941
962
|
}
|
|
942
963
|
}
|
|
943
|
-
function
|
|
944
|
-
return /* @__PURE__ */ a.jsx(
|
|
964
|
+
function Os({ error: e, resetErrorBoundary: t }) {
|
|
965
|
+
return /* @__PURE__ */ a.jsx(Nn, { error: e });
|
|
945
966
|
}
|
|
946
|
-
const
|
|
947
|
-
(!
|
|
948
|
-
var
|
|
949
|
-
ltr: [...
|
|
950
|
-
rtl: [...
|
|
951
|
-
},
|
|
967
|
+
const ut = globalThis;
|
|
968
|
+
(!ut.requestIdleCallback || !ut.cancelIdleCallback) && (ut.requestIdleCallback = (e) => setTimeout(e, 1), ut.cancelIdleCallback = clearTimeout);
|
|
969
|
+
var Nt = ["Enter", " "], Is = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp", "PageDown", "End"], As = [...Is, ...Xn], ks = {
|
|
970
|
+
ltr: [...Nt, "ArrowRight"],
|
|
971
|
+
rtl: [...Nt, "ArrowLeft"]
|
|
972
|
+
}, $s = {
|
|
952
973
|
ltr: ["ArrowLeft"],
|
|
953
974
|
rtl: ["ArrowRight"]
|
|
954
|
-
},
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
]),
|
|
959
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e,
|
|
960
|
-
return
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
},
|
|
964
|
-
return document.addEventListener("keydown",
|
|
965
|
-
document.removeEventListener("keydown",
|
|
975
|
+
}, nt = "Menu", [Ye, Ls, Fs] = Qo(nt), [_e, Jn] = Pn(nt, [
|
|
976
|
+
Fs,
|
|
977
|
+
Tn,
|
|
978
|
+
qn
|
|
979
|
+
]), rt = Tn(), Zn = qn(), [er, De] = _e(nt), [Hs, ot] = _e(nt), tr = (e) => {
|
|
980
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = rt(t), [u, v] = h.useState(null), m = h.useRef(!1), c = kt(s), d = oa(o);
|
|
981
|
+
return h.useEffect(() => {
|
|
982
|
+
const f = () => {
|
|
983
|
+
m.current = !0, document.addEventListener("pointerdown", b, { capture: !0, once: !0 }), document.addEventListener("pointermove", b, { capture: !0, once: !0 });
|
|
984
|
+
}, b = () => m.current = !1;
|
|
985
|
+
return document.addEventListener("keydown", f, { capture: !0 }), () => {
|
|
986
|
+
document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", b, { capture: !0 }), document.removeEventListener("pointermove", b, { capture: !0 });
|
|
966
987
|
};
|
|
967
|
-
}, []), /* @__PURE__ */ a.jsx(
|
|
968
|
-
|
|
988
|
+
}, []), /* @__PURE__ */ a.jsx(On, { ...l, children: /* @__PURE__ */ a.jsx(
|
|
989
|
+
er,
|
|
969
990
|
{
|
|
970
991
|
scope: t,
|
|
971
992
|
open: n,
|
|
972
|
-
onOpenChange:
|
|
973
|
-
content:
|
|
993
|
+
onOpenChange: c,
|
|
994
|
+
content: u,
|
|
974
995
|
onContentChange: v,
|
|
975
996
|
children: /* @__PURE__ */ a.jsx(
|
|
976
|
-
|
|
997
|
+
Hs,
|
|
977
998
|
{
|
|
978
999
|
scope: t,
|
|
979
|
-
onClose:
|
|
980
|
-
isUsingKeyboardRef:
|
|
981
|
-
dir:
|
|
1000
|
+
onClose: h.useCallback(() => c(!1), [c]),
|
|
1001
|
+
isUsingKeyboardRef: m,
|
|
1002
|
+
dir: d,
|
|
982
1003
|
modal: i,
|
|
983
1004
|
children: r
|
|
984
1005
|
}
|
|
@@ -986,41 +1007,41 @@ var Qe = ["Enter", " "], eo = ["ArrowDown", "PageUp", "Home"], Vt = ["ArrowUp",
|
|
|
986
1007
|
}
|
|
987
1008
|
) });
|
|
988
1009
|
};
|
|
989
|
-
|
|
990
|
-
var
|
|
1010
|
+
tr.displayName = nt;
|
|
1011
|
+
var Us = "MenuAnchor", Bt = h.forwardRef(
|
|
991
1012
|
(e, t) => {
|
|
992
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
993
|
-
return /* @__PURE__ */ a.jsx(
|
|
1013
|
+
const { __scopeMenu: n, ...r } = e, o = rt(n);
|
|
1014
|
+
return /* @__PURE__ */ a.jsx(Go, { ...o, ...r, ref: t });
|
|
994
1015
|
}
|
|
995
1016
|
);
|
|
996
|
-
|
|
997
|
-
var
|
|
1017
|
+
Bt.displayName = Us;
|
|
1018
|
+
var zt = "MenuPortal", [Bs, nr] = _e(zt, {
|
|
998
1019
|
forceMount: void 0
|
|
999
|
-
}),
|
|
1000
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s =
|
|
1001
|
-
return /* @__PURE__ */ a.jsx(
|
|
1020
|
+
}), rr = (e) => {
|
|
1021
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = De(zt, t);
|
|
1022
|
+
return /* @__PURE__ */ a.jsx(Bs, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(aa, { asChild: !0, container: o, children: r }) }) });
|
|
1002
1023
|
};
|
|
1003
|
-
|
|
1004
|
-
var
|
|
1024
|
+
rr.displayName = zt;
|
|
1025
|
+
var se = "MenuContent", [zs, Kt] = _e(se), or = h.forwardRef(
|
|
1005
1026
|
(e, t) => {
|
|
1006
|
-
const n =
|
|
1007
|
-
return /* @__PURE__ */ a.jsx(
|
|
1027
|
+
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu);
|
|
1028
|
+
return /* @__PURE__ */ a.jsx(Ye.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(Ye.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(Ks, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(qs, { ...o, ref: t }) }) }) });
|
|
1008
1029
|
}
|
|
1009
|
-
),
|
|
1030
|
+
), Ks = h.forwardRef(
|
|
1010
1031
|
(e, t) => {
|
|
1011
|
-
const n =
|
|
1012
|
-
return
|
|
1032
|
+
const n = De(se, e.__scopeMenu), r = h.useRef(null), o = Ze(t, r);
|
|
1033
|
+
return h.useEffect(() => {
|
|
1013
1034
|
const s = r.current;
|
|
1014
|
-
if (s) return
|
|
1035
|
+
if (s) return Wo(s);
|
|
1015
1036
|
}, []), /* @__PURE__ */ a.jsx(
|
|
1016
|
-
|
|
1037
|
+
qt,
|
|
1017
1038
|
{
|
|
1018
1039
|
...e,
|
|
1019
1040
|
ref: o,
|
|
1020
1041
|
trapFocus: n.open,
|
|
1021
1042
|
disableOutsidePointerEvents: n.open,
|
|
1022
1043
|
disableOutsideScroll: !0,
|
|
1023
|
-
onFocusOutside:
|
|
1044
|
+
onFocusOutside: I(
|
|
1024
1045
|
e.onFocusOutside,
|
|
1025
1046
|
(s) => s.preventDefault(),
|
|
1026
1047
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -1029,10 +1050,10 @@ var D = "MenuContent", [uo, et] = Z(D), tn = c.forwardRef(
|
|
|
1029
1050
|
}
|
|
1030
1051
|
);
|
|
1031
1052
|
}
|
|
1032
|
-
),
|
|
1033
|
-
const n =
|
|
1053
|
+
), qs = h.forwardRef((e, t) => {
|
|
1054
|
+
const n = De(se, e.__scopeMenu);
|
|
1034
1055
|
return /* @__PURE__ */ a.jsx(
|
|
1035
|
-
|
|
1056
|
+
qt,
|
|
1036
1057
|
{
|
|
1037
1058
|
...e,
|
|
1038
1059
|
ref: t,
|
|
@@ -1042,7 +1063,7 @@ var D = "MenuContent", [uo, et] = Z(D), tn = c.forwardRef(
|
|
|
1042
1063
|
onDismiss: () => n.onOpenChange(!1)
|
|
1043
1064
|
}
|
|
1044
1065
|
);
|
|
1045
|
-
}),
|
|
1066
|
+
}), qt = h.forwardRef(
|
|
1046
1067
|
(e, t) => {
|
|
1047
1068
|
const {
|
|
1048
1069
|
__scopeMenu: n,
|
|
@@ -1050,120 +1071,120 @@ var D = "MenuContent", [uo, et] = Z(D), tn = c.forwardRef(
|
|
|
1050
1071
|
trapFocus: o,
|
|
1051
1072
|
onOpenAutoFocus: s,
|
|
1052
1073
|
onCloseAutoFocus: i,
|
|
1053
|
-
disableOutsidePointerEvents:
|
|
1054
|
-
onEntryFocus:
|
|
1074
|
+
disableOutsidePointerEvents: l,
|
|
1075
|
+
onEntryFocus: u,
|
|
1055
1076
|
onEscapeKeyDown: v,
|
|
1056
|
-
onPointerDownOutside:
|
|
1057
|
-
onFocusOutside:
|
|
1058
|
-
onInteractOutside:
|
|
1059
|
-
onDismiss:
|
|
1060
|
-
disableOutsideScroll:
|
|
1061
|
-
...
|
|
1062
|
-
} = e,
|
|
1063
|
-
var
|
|
1064
|
-
const
|
|
1065
|
-
(function
|
|
1066
|
-
|
|
1067
|
-
})(
|
|
1077
|
+
onPointerDownOutside: m,
|
|
1078
|
+
onFocusOutside: c,
|
|
1079
|
+
onInteractOutside: d,
|
|
1080
|
+
onDismiss: f,
|
|
1081
|
+
disableOutsideScroll: b,
|
|
1082
|
+
...R
|
|
1083
|
+
} = e, K = De(se, n), H = ot(se, n), Q = rt(n), y = Zn(n), p = Ls(n), [C, N] = h.useState(null), P = h.useRef(null), _ = Ze(t, P, K.onContentChange), w = h.useRef(0), L = h.useRef(""), te = h.useRef(0), V = h.useRef(null), q = h.useRef("right"), X = h.useRef(0), Oe = b ? ta : h.Fragment, he = b ? { as: na, allowPinchZoom: !0 } : void 0, Be = (E) => {
|
|
1084
|
+
var le, ge;
|
|
1085
|
+
const U = L.current + E, Y = p().filter((re) => !re.disabled), ne = document.activeElement, je = (le = Y.find((re) => re.ref.current === ne)) == null ? void 0 : le.textValue, pe = Y.map((re) => re.textValue), be = ri(pe, U, je), me = (ge = Y.find((re) => re.textValue === be)) == null ? void 0 : ge.ref.current;
|
|
1086
|
+
(function re(M) {
|
|
1087
|
+
L.current = M, window.clearTimeout(w.current), M !== "" && (w.current = window.setTimeout(() => re(""), 1e3));
|
|
1088
|
+
})(U), me && setTimeout(() => me.focus());
|
|
1068
1089
|
};
|
|
1069
|
-
|
|
1070
|
-
const
|
|
1071
|
-
var
|
|
1072
|
-
return
|
|
1090
|
+
h.useEffect(() => () => window.clearTimeout(w.current), []), Yo();
|
|
1091
|
+
const ye = h.useCallback((E) => {
|
|
1092
|
+
var Y, ne;
|
|
1093
|
+
return q.current === ((Y = V.current) == null ? void 0 : Y.side) && ai(E, (ne = V.current) == null ? void 0 : ne.area);
|
|
1073
1094
|
}, []);
|
|
1074
1095
|
return /* @__PURE__ */ a.jsx(
|
|
1075
|
-
|
|
1096
|
+
zs,
|
|
1076
1097
|
{
|
|
1077
1098
|
scope: n,
|
|
1078
|
-
searchRef:
|
|
1079
|
-
onItemEnter:
|
|
1080
|
-
(
|
|
1081
|
-
|
|
1099
|
+
searchRef: L,
|
|
1100
|
+
onItemEnter: h.useCallback(
|
|
1101
|
+
(E) => {
|
|
1102
|
+
ye(E) && E.preventDefault();
|
|
1082
1103
|
},
|
|
1083
|
-
[
|
|
1104
|
+
[ye]
|
|
1084
1105
|
),
|
|
1085
|
-
onItemLeave:
|
|
1086
|
-
(
|
|
1087
|
-
var
|
|
1088
|
-
|
|
1106
|
+
onItemLeave: h.useCallback(
|
|
1107
|
+
(E) => {
|
|
1108
|
+
var U;
|
|
1109
|
+
ye(E) || ((U = P.current) == null || U.focus(), N(null));
|
|
1089
1110
|
},
|
|
1090
|
-
[
|
|
1111
|
+
[ye]
|
|
1091
1112
|
),
|
|
1092
|
-
onTriggerLeave:
|
|
1093
|
-
(
|
|
1094
|
-
|
|
1113
|
+
onTriggerLeave: h.useCallback(
|
|
1114
|
+
(E) => {
|
|
1115
|
+
ye(E) && E.preventDefault();
|
|
1095
1116
|
},
|
|
1096
|
-
[
|
|
1117
|
+
[ye]
|
|
1097
1118
|
),
|
|
1098
|
-
pointerGraceTimerRef:
|
|
1099
|
-
onPointerGraceIntentChange:
|
|
1100
|
-
|
|
1119
|
+
pointerGraceTimerRef: te,
|
|
1120
|
+
onPointerGraceIntentChange: h.useCallback((E) => {
|
|
1121
|
+
V.current = E;
|
|
1101
1122
|
}, []),
|
|
1102
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1103
|
-
|
|
1123
|
+
children: /* @__PURE__ */ a.jsx(Oe, { ...he, children: /* @__PURE__ */ a.jsx(
|
|
1124
|
+
Xo,
|
|
1104
1125
|
{
|
|
1105
1126
|
asChild: !0,
|
|
1106
1127
|
trapped: o,
|
|
1107
|
-
onMountAutoFocus:
|
|
1108
|
-
var
|
|
1109
|
-
|
|
1128
|
+
onMountAutoFocus: I(s, (E) => {
|
|
1129
|
+
var U;
|
|
1130
|
+
E.preventDefault(), (U = P.current) == null || U.focus({ preventScroll: !0 });
|
|
1110
1131
|
}),
|
|
1111
1132
|
onUnmountAutoFocus: i,
|
|
1112
1133
|
children: /* @__PURE__ */ a.jsx(
|
|
1113
|
-
|
|
1134
|
+
Jo,
|
|
1114
1135
|
{
|
|
1115
1136
|
asChild: !0,
|
|
1116
|
-
disableOutsidePointerEvents:
|
|
1137
|
+
disableOutsidePointerEvents: l,
|
|
1117
1138
|
onEscapeKeyDown: v,
|
|
1118
|
-
onPointerDownOutside:
|
|
1119
|
-
onFocusOutside:
|
|
1120
|
-
onInteractOutside:
|
|
1121
|
-
onDismiss:
|
|
1139
|
+
onPointerDownOutside: m,
|
|
1140
|
+
onFocusOutside: c,
|
|
1141
|
+
onInteractOutside: d,
|
|
1142
|
+
onDismiss: f,
|
|
1122
1143
|
children: /* @__PURE__ */ a.jsx(
|
|
1123
|
-
|
|
1144
|
+
Ia,
|
|
1124
1145
|
{
|
|
1125
1146
|
asChild: !0,
|
|
1126
|
-
...
|
|
1127
|
-
dir:
|
|
1147
|
+
...y,
|
|
1148
|
+
dir: H.dir,
|
|
1128
1149
|
orientation: "vertical",
|
|
1129
1150
|
loop: r,
|
|
1130
|
-
currentTabStopId:
|
|
1131
|
-
onCurrentTabStopIdChange:
|
|
1132
|
-
onEntryFocus:
|
|
1133
|
-
|
|
1151
|
+
currentTabStopId: C,
|
|
1152
|
+
onCurrentTabStopIdChange: N,
|
|
1153
|
+
onEntryFocus: I(u, (E) => {
|
|
1154
|
+
H.isUsingKeyboardRef.current || E.preventDefault();
|
|
1134
1155
|
}),
|
|
1135
1156
|
preventScrollOnEntryFocus: !0,
|
|
1136
1157
|
children: /* @__PURE__ */ a.jsx(
|
|
1137
|
-
|
|
1158
|
+
Zo,
|
|
1138
1159
|
{
|
|
1139
1160
|
role: "menu",
|
|
1140
1161
|
"aria-orientation": "vertical",
|
|
1141
|
-
"data-state":
|
|
1162
|
+
"data-state": br(K.open),
|
|
1142
1163
|
"data-radix-menu-content": "",
|
|
1143
|
-
dir:
|
|
1144
|
-
...
|
|
1145
|
-
...
|
|
1146
|
-
ref:
|
|
1147
|
-
style: { outline: "none", ...
|
|
1148
|
-
onKeyDown:
|
|
1149
|
-
const
|
|
1150
|
-
|
|
1151
|
-
const
|
|
1152
|
-
if (
|
|
1153
|
-
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1164
|
+
dir: H.dir,
|
|
1165
|
+
...Q,
|
|
1166
|
+
...R,
|
|
1167
|
+
ref: _,
|
|
1168
|
+
style: { outline: "none", ...R.style },
|
|
1169
|
+
onKeyDown: I(R.onKeyDown, (E) => {
|
|
1170
|
+
const Y = E.target.closest("[data-radix-menu-content]") === E.currentTarget, ne = E.ctrlKey || E.altKey || E.metaKey, je = E.key.length === 1;
|
|
1171
|
+
Y && (E.key === "Tab" && E.preventDefault(), !ne && je && Be(E.key));
|
|
1172
|
+
const pe = P.current;
|
|
1173
|
+
if (E.target !== pe || !As.includes(E.key)) return;
|
|
1174
|
+
E.preventDefault();
|
|
1175
|
+
const me = p().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1176
|
+
Xn.includes(E.key) && me.reverse(), ti(me);
|
|
1156
1177
|
}),
|
|
1157
|
-
onBlur:
|
|
1158
|
-
|
|
1178
|
+
onBlur: I(e.onBlur, (E) => {
|
|
1179
|
+
E.currentTarget.contains(E.target) || (window.clearTimeout(w.current), L.current = "");
|
|
1159
1180
|
}),
|
|
1160
|
-
onPointerMove:
|
|
1181
|
+
onPointerMove: I(
|
|
1161
1182
|
e.onPointerMove,
|
|
1162
|
-
|
|
1163
|
-
const
|
|
1164
|
-
if (
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1183
|
+
Xe((E) => {
|
|
1184
|
+
const U = E.target, Y = X.current !== E.clientX;
|
|
1185
|
+
if (E.currentTarget.contains(U) && Y) {
|
|
1186
|
+
const ne = E.clientX > X.current ? "right" : "left";
|
|
1187
|
+
q.current = ne, X.current = E.clientX;
|
|
1167
1188
|
}
|
|
1168
1189
|
})
|
|
1169
1190
|
)
|
|
@@ -1179,136 +1200,136 @@ var D = "MenuContent", [uo, et] = Z(D), tn = c.forwardRef(
|
|
|
1179
1200
|
);
|
|
1180
1201
|
}
|
|
1181
1202
|
);
|
|
1182
|
-
|
|
1183
|
-
var
|
|
1203
|
+
or.displayName = se;
|
|
1204
|
+
var Vs = "MenuGroup", Vt = h.forwardRef(
|
|
1184
1205
|
(e, t) => {
|
|
1185
1206
|
const { __scopeMenu: n, ...r } = e;
|
|
1186
|
-
return /* @__PURE__ */ a.jsx(
|
|
1207
|
+
return /* @__PURE__ */ a.jsx(Ue.div, { role: "group", ...r, ref: t });
|
|
1187
1208
|
}
|
|
1188
1209
|
);
|
|
1189
|
-
|
|
1190
|
-
var
|
|
1210
|
+
Vt.displayName = Vs;
|
|
1211
|
+
var Qs = "MenuLabel", ar = h.forwardRef(
|
|
1191
1212
|
(e, t) => {
|
|
1192
1213
|
const { __scopeMenu: n, ...r } = e;
|
|
1193
|
-
return /* @__PURE__ */ a.jsx(
|
|
1214
|
+
return /* @__PURE__ */ a.jsx(Ue.div, { ...r, ref: t });
|
|
1194
1215
|
}
|
|
1195
1216
|
);
|
|
1196
|
-
|
|
1197
|
-
var
|
|
1217
|
+
ar.displayName = Qs;
|
|
1218
|
+
var mt = "MenuItem", xn = "menu.itemSelect", wt = h.forwardRef(
|
|
1198
1219
|
(e, t) => {
|
|
1199
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s =
|
|
1200
|
-
const
|
|
1201
|
-
if (!n &&
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1220
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = ot(mt, e.__scopeMenu), l = Kt(mt, e.__scopeMenu), u = Ze(t, s), v = h.useRef(!1), m = () => {
|
|
1221
|
+
const c = s.current;
|
|
1222
|
+
if (!n && c) {
|
|
1223
|
+
const d = new CustomEvent(xn, { bubbles: !0, cancelable: !0 });
|
|
1224
|
+
c.addEventListener(xn, (f) => r == null ? void 0 : r(f), { once: !0 }), ra(c, d), d.defaultPrevented ? v.current = !1 : i.onClose();
|
|
1204
1225
|
}
|
|
1205
1226
|
};
|
|
1206
1227
|
return /* @__PURE__ */ a.jsx(
|
|
1207
|
-
|
|
1228
|
+
sr,
|
|
1208
1229
|
{
|
|
1209
1230
|
...o,
|
|
1210
|
-
ref:
|
|
1231
|
+
ref: u,
|
|
1211
1232
|
disabled: n,
|
|
1212
|
-
onClick:
|
|
1213
|
-
onPointerDown: (
|
|
1214
|
-
var
|
|
1215
|
-
(
|
|
1233
|
+
onClick: I(e.onClick, m),
|
|
1234
|
+
onPointerDown: (c) => {
|
|
1235
|
+
var d;
|
|
1236
|
+
(d = e.onPointerDown) == null || d.call(e, c), v.current = !0;
|
|
1216
1237
|
},
|
|
1217
|
-
onPointerUp:
|
|
1218
|
-
var
|
|
1219
|
-
v.current || (
|
|
1238
|
+
onPointerUp: I(e.onPointerUp, (c) => {
|
|
1239
|
+
var d;
|
|
1240
|
+
v.current || (d = c.currentTarget) == null || d.click();
|
|
1220
1241
|
}),
|
|
1221
|
-
onKeyDown:
|
|
1222
|
-
const
|
|
1223
|
-
n ||
|
|
1242
|
+
onKeyDown: I(e.onKeyDown, (c) => {
|
|
1243
|
+
const d = l.searchRef.current !== "";
|
|
1244
|
+
n || d && c.key === " " || Nt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1224
1245
|
})
|
|
1225
1246
|
}
|
|
1226
1247
|
);
|
|
1227
1248
|
}
|
|
1228
1249
|
);
|
|
1229
|
-
|
|
1230
|
-
var
|
|
1250
|
+
wt.displayName = mt;
|
|
1251
|
+
var sr = h.forwardRef(
|
|
1231
1252
|
(e, t) => {
|
|
1232
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i =
|
|
1233
|
-
return
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1253
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Kt(mt, n), l = Zn(n), u = h.useRef(null), v = Ze(t, u), [m, c] = h.useState(!1), [d, f] = h.useState("");
|
|
1254
|
+
return h.useEffect(() => {
|
|
1255
|
+
const b = u.current;
|
|
1256
|
+
b && f((b.textContent ?? "").trim());
|
|
1236
1257
|
}, [s.children]), /* @__PURE__ */ a.jsx(
|
|
1237
|
-
|
|
1258
|
+
Ye.ItemSlot,
|
|
1238
1259
|
{
|
|
1239
1260
|
scope: n,
|
|
1240
1261
|
disabled: r,
|
|
1241
|
-
textValue: o ??
|
|
1242
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1243
|
-
|
|
1262
|
+
textValue: o ?? d,
|
|
1263
|
+
children: /* @__PURE__ */ a.jsx(Aa, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
|
|
1264
|
+
Ue.div,
|
|
1244
1265
|
{
|
|
1245
1266
|
role: "menuitem",
|
|
1246
|
-
"data-highlighted":
|
|
1267
|
+
"data-highlighted": m ? "" : void 0,
|
|
1247
1268
|
"aria-disabled": r || void 0,
|
|
1248
1269
|
"data-disabled": r ? "" : void 0,
|
|
1249
1270
|
...s,
|
|
1250
1271
|
ref: v,
|
|
1251
|
-
onPointerMove:
|
|
1272
|
+
onPointerMove: I(
|
|
1252
1273
|
e.onPointerMove,
|
|
1253
|
-
|
|
1254
|
-
r ? i.onItemLeave(
|
|
1274
|
+
Xe((b) => {
|
|
1275
|
+
r ? i.onItemLeave(b) : (i.onItemEnter(b), b.defaultPrevented || b.currentTarget.focus({ preventScroll: !0 }));
|
|
1255
1276
|
})
|
|
1256
1277
|
),
|
|
1257
|
-
onPointerLeave:
|
|
1278
|
+
onPointerLeave: I(
|
|
1258
1279
|
e.onPointerLeave,
|
|
1259
|
-
|
|
1280
|
+
Xe((b) => i.onItemLeave(b))
|
|
1260
1281
|
),
|
|
1261
|
-
onFocus:
|
|
1262
|
-
onBlur:
|
|
1282
|
+
onFocus: I(e.onFocus, () => c(!0)),
|
|
1283
|
+
onBlur: I(e.onBlur, () => c(!1))
|
|
1263
1284
|
}
|
|
1264
1285
|
) })
|
|
1265
1286
|
}
|
|
1266
1287
|
);
|
|
1267
1288
|
}
|
|
1268
|
-
),
|
|
1289
|
+
), Gs = "MenuCheckboxItem", ir = h.forwardRef(
|
|
1269
1290
|
(e, t) => {
|
|
1270
1291
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1271
|
-
return /* @__PURE__ */ a.jsx(
|
|
1272
|
-
|
|
1292
|
+
return /* @__PURE__ */ a.jsx(fr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
|
|
1293
|
+
wt,
|
|
1273
1294
|
{
|
|
1274
1295
|
role: "menuitemcheckbox",
|
|
1275
|
-
"aria-checked":
|
|
1296
|
+
"aria-checked": gt(n) ? "mixed" : n,
|
|
1276
1297
|
...o,
|
|
1277
1298
|
ref: t,
|
|
1278
|
-
"data-state":
|
|
1279
|
-
onSelect:
|
|
1299
|
+
"data-state": Wt(n),
|
|
1300
|
+
onSelect: I(
|
|
1280
1301
|
o.onSelect,
|
|
1281
|
-
() => r == null ? void 0 : r(
|
|
1302
|
+
() => r == null ? void 0 : r(gt(n) ? !0 : !n),
|
|
1282
1303
|
{ checkForDefaultPrevented: !1 }
|
|
1283
1304
|
)
|
|
1284
1305
|
}
|
|
1285
1306
|
) });
|
|
1286
1307
|
}
|
|
1287
1308
|
);
|
|
1288
|
-
|
|
1289
|
-
var
|
|
1290
|
-
|
|
1309
|
+
ir.displayName = Gs;
|
|
1310
|
+
var lr = "MenuRadioGroup", [Ws, Ys] = _e(
|
|
1311
|
+
lr,
|
|
1291
1312
|
{ value: void 0, onValueChange: () => {
|
|
1292
1313
|
} }
|
|
1293
|
-
),
|
|
1314
|
+
), cr = h.forwardRef(
|
|
1294
1315
|
(e, t) => {
|
|
1295
|
-
const { value: n, onValueChange: r, ...o } = e, s =
|
|
1296
|
-
return /* @__PURE__ */ a.jsx(
|
|
1316
|
+
const { value: n, onValueChange: r, ...o } = e, s = kt(r);
|
|
1317
|
+
return /* @__PURE__ */ a.jsx(Ws, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Vt, { ...o, ref: t }) });
|
|
1297
1318
|
}
|
|
1298
1319
|
);
|
|
1299
|
-
|
|
1300
|
-
var
|
|
1320
|
+
cr.displayName = lr;
|
|
1321
|
+
var ur = "MenuRadioItem", dr = h.forwardRef(
|
|
1301
1322
|
(e, t) => {
|
|
1302
|
-
const { value: n, ...r } = e, o =
|
|
1303
|
-
return /* @__PURE__ */ a.jsx(
|
|
1304
|
-
|
|
1323
|
+
const { value: n, ...r } = e, o = Ys(ur, e.__scopeMenu), s = n === o.value;
|
|
1324
|
+
return /* @__PURE__ */ a.jsx(fr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
|
|
1325
|
+
wt,
|
|
1305
1326
|
{
|
|
1306
1327
|
role: "menuitemradio",
|
|
1307
1328
|
"aria-checked": s,
|
|
1308
1329
|
...r,
|
|
1309
1330
|
ref: t,
|
|
1310
|
-
"data-state":
|
|
1311
|
-
onSelect:
|
|
1331
|
+
"data-state": Wt(s),
|
|
1332
|
+
onSelect: I(
|
|
1312
1333
|
r.onSelect,
|
|
1313
1334
|
() => {
|
|
1314
1335
|
var i;
|
|
@@ -1320,35 +1341,35 @@ var cn = "MenuRadioItem", un = c.forwardRef(
|
|
|
1320
1341
|
) });
|
|
1321
1342
|
}
|
|
1322
1343
|
);
|
|
1323
|
-
|
|
1324
|
-
var
|
|
1325
|
-
|
|
1344
|
+
dr.displayName = ur;
|
|
1345
|
+
var Qt = "MenuItemIndicator", [fr, Xs] = _e(
|
|
1346
|
+
Qt,
|
|
1326
1347
|
{ checked: !1 }
|
|
1327
|
-
),
|
|
1348
|
+
), hr = h.forwardRef(
|
|
1328
1349
|
(e, t) => {
|
|
1329
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, s =
|
|
1350
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = Xs(Qt, n);
|
|
1330
1351
|
return /* @__PURE__ */ a.jsx(
|
|
1331
|
-
|
|
1352
|
+
vt,
|
|
1332
1353
|
{
|
|
1333
|
-
present: r ||
|
|
1354
|
+
present: r || gt(s.checked) || s.checked === !0,
|
|
1334
1355
|
children: /* @__PURE__ */ a.jsx(
|
|
1335
|
-
|
|
1356
|
+
Ue.span,
|
|
1336
1357
|
{
|
|
1337
1358
|
...o,
|
|
1338
1359
|
ref: t,
|
|
1339
|
-
"data-state":
|
|
1360
|
+
"data-state": Wt(s.checked)
|
|
1340
1361
|
}
|
|
1341
1362
|
)
|
|
1342
1363
|
}
|
|
1343
1364
|
);
|
|
1344
1365
|
}
|
|
1345
1366
|
);
|
|
1346
|
-
|
|
1347
|
-
var
|
|
1367
|
+
hr.displayName = Qt;
|
|
1368
|
+
var Js = "MenuSeparator", pr = h.forwardRef(
|
|
1348
1369
|
(e, t) => {
|
|
1349
1370
|
const { __scopeMenu: n, ...r } = e;
|
|
1350
1371
|
return /* @__PURE__ */ a.jsx(
|
|
1351
|
-
|
|
1372
|
+
Ue.div,
|
|
1352
1373
|
{
|
|
1353
1374
|
role: "separator",
|
|
1354
1375
|
"aria-orientation": "horizontal",
|
|
@@ -1358,118 +1379,118 @@ var yo = "MenuSeparator", hn = c.forwardRef(
|
|
|
1358
1379
|
);
|
|
1359
1380
|
}
|
|
1360
1381
|
);
|
|
1361
|
-
|
|
1362
|
-
var
|
|
1382
|
+
pr.displayName = Js;
|
|
1383
|
+
var Zs = "MenuArrow", mr = h.forwardRef(
|
|
1363
1384
|
(e, t) => {
|
|
1364
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
1365
|
-
return /* @__PURE__ */ a.jsx(
|
|
1385
|
+
const { __scopeMenu: n, ...r } = e, o = rt(n);
|
|
1386
|
+
return /* @__PURE__ */ a.jsx(ea, { ...o, ...r, ref: t });
|
|
1366
1387
|
}
|
|
1367
1388
|
);
|
|
1368
|
-
|
|
1369
|
-
var
|
|
1370
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s =
|
|
1371
|
-
return
|
|
1372
|
-
|
|
1389
|
+
mr.displayName = Zs;
|
|
1390
|
+
var Gt = "MenuSub", [ei, gr] = _e(Gt), vr = (e) => {
|
|
1391
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = De(Gt, t), i = rt(t), [l, u] = h.useState(null), [v, m] = h.useState(null), c = kt(o);
|
|
1392
|
+
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(On, { ...i, children: /* @__PURE__ */ a.jsx(
|
|
1393
|
+
er,
|
|
1373
1394
|
{
|
|
1374
1395
|
scope: t,
|
|
1375
1396
|
open: r,
|
|
1376
|
-
onOpenChange:
|
|
1397
|
+
onOpenChange: c,
|
|
1377
1398
|
content: v,
|
|
1378
|
-
onContentChange:
|
|
1399
|
+
onContentChange: m,
|
|
1379
1400
|
children: /* @__PURE__ */ a.jsx(
|
|
1380
|
-
|
|
1401
|
+
ei,
|
|
1381
1402
|
{
|
|
1382
1403
|
scope: t,
|
|
1383
|
-
contentId:
|
|
1384
|
-
triggerId:
|
|
1385
|
-
trigger:
|
|
1386
|
-
onTriggerChange:
|
|
1404
|
+
contentId: pt(),
|
|
1405
|
+
triggerId: pt(),
|
|
1406
|
+
trigger: l,
|
|
1407
|
+
onTriggerChange: u,
|
|
1387
1408
|
children: n
|
|
1388
1409
|
}
|
|
1389
1410
|
)
|
|
1390
1411
|
}
|
|
1391
1412
|
) });
|
|
1392
1413
|
};
|
|
1393
|
-
|
|
1394
|
-
var
|
|
1414
|
+
vr.displayName = Gt;
|
|
1415
|
+
var Qe = "MenuSubTrigger", wr = h.forwardRef(
|
|
1395
1416
|
(e, t) => {
|
|
1396
|
-
const n =
|
|
1417
|
+
const n = De(Qe, e.__scopeMenu), r = ot(Qe, e.__scopeMenu), o = gr(Qe, e.__scopeMenu), s = Kt(Qe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, v = { __scopeMenu: e.__scopeMenu }, m = h.useCallback(() => {
|
|
1397
1418
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1398
1419
|
}, []);
|
|
1399
|
-
return
|
|
1400
|
-
const
|
|
1420
|
+
return h.useEffect(() => m, [m]), h.useEffect(() => {
|
|
1421
|
+
const c = l.current;
|
|
1401
1422
|
return () => {
|
|
1402
|
-
window.clearTimeout(
|
|
1423
|
+
window.clearTimeout(c), u(null);
|
|
1403
1424
|
};
|
|
1404
|
-
}, [
|
|
1405
|
-
|
|
1425
|
+
}, [l, u]), /* @__PURE__ */ a.jsx(Bt, { asChild: !0, ...v, children: /* @__PURE__ */ a.jsx(
|
|
1426
|
+
sr,
|
|
1406
1427
|
{
|
|
1407
1428
|
id: o.triggerId,
|
|
1408
1429
|
"aria-haspopup": "menu",
|
|
1409
1430
|
"aria-expanded": n.open,
|
|
1410
1431
|
"aria-controls": o.contentId,
|
|
1411
|
-
"data-state":
|
|
1432
|
+
"data-state": br(n.open),
|
|
1412
1433
|
...e,
|
|
1413
|
-
ref:
|
|
1414
|
-
onClick: (
|
|
1415
|
-
var
|
|
1416
|
-
(
|
|
1434
|
+
ref: _n(t, o.onTriggerChange),
|
|
1435
|
+
onClick: (c) => {
|
|
1436
|
+
var d;
|
|
1437
|
+
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1417
1438
|
},
|
|
1418
|
-
onPointerMove:
|
|
1439
|
+
onPointerMove: I(
|
|
1419
1440
|
e.onPointerMove,
|
|
1420
|
-
|
|
1421
|
-
s.onItemEnter(
|
|
1422
|
-
n.onOpenChange(!0),
|
|
1441
|
+
Xe((c) => {
|
|
1442
|
+
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1443
|
+
n.onOpenChange(!0), m();
|
|
1423
1444
|
}, 100));
|
|
1424
1445
|
})
|
|
1425
1446
|
),
|
|
1426
|
-
onPointerLeave:
|
|
1447
|
+
onPointerLeave: I(
|
|
1427
1448
|
e.onPointerLeave,
|
|
1428
|
-
|
|
1429
|
-
var
|
|
1430
|
-
|
|
1431
|
-
const
|
|
1432
|
-
if (
|
|
1433
|
-
const
|
|
1449
|
+
Xe((c) => {
|
|
1450
|
+
var f, b;
|
|
1451
|
+
m();
|
|
1452
|
+
const d = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
|
|
1453
|
+
if (d) {
|
|
1454
|
+
const R = (b = n.content) == null ? void 0 : b.dataset.side, K = R === "right", H = K ? -5 : 5, Q = d[K ? "left" : "right"], y = d[K ? "right" : "left"];
|
|
1434
1455
|
s.onPointerGraceIntentChange({
|
|
1435
1456
|
area: [
|
|
1436
1457
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1437
1458
|
// consistently within polygon bounds
|
|
1438
|
-
{ x:
|
|
1439
|
-
{ x:
|
|
1440
|
-
{ x:
|
|
1441
|
-
{ x:
|
|
1442
|
-
{ x:
|
|
1459
|
+
{ x: c.clientX + H, y: c.clientY },
|
|
1460
|
+
{ x: Q, y: d.top },
|
|
1461
|
+
{ x: y, y: d.top },
|
|
1462
|
+
{ x: y, y: d.bottom },
|
|
1463
|
+
{ x: Q, y: d.bottom }
|
|
1443
1464
|
],
|
|
1444
|
-
side:
|
|
1445
|
-
}), window.clearTimeout(
|
|
1465
|
+
side: R
|
|
1466
|
+
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
1446
1467
|
() => s.onPointerGraceIntentChange(null),
|
|
1447
1468
|
300
|
|
1448
1469
|
);
|
|
1449
1470
|
} else {
|
|
1450
|
-
if (s.onTriggerLeave(
|
|
1471
|
+
if (s.onTriggerLeave(c), c.defaultPrevented) return;
|
|
1451
1472
|
s.onPointerGraceIntentChange(null);
|
|
1452
1473
|
}
|
|
1453
1474
|
})
|
|
1454
1475
|
),
|
|
1455
|
-
onKeyDown:
|
|
1456
|
-
var
|
|
1457
|
-
const
|
|
1458
|
-
e.disabled ||
|
|
1476
|
+
onKeyDown: I(e.onKeyDown, (c) => {
|
|
1477
|
+
var f;
|
|
1478
|
+
const d = s.searchRef.current !== "";
|
|
1479
|
+
e.disabled || d && c.key === " " || ks[r.dir].includes(c.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), c.preventDefault());
|
|
1459
1480
|
})
|
|
1460
1481
|
}
|
|
1461
1482
|
) });
|
|
1462
1483
|
}
|
|
1463
1484
|
);
|
|
1464
|
-
|
|
1465
|
-
var
|
|
1485
|
+
wr.displayName = Qe;
|
|
1486
|
+
var xr = "MenuSubContent", yr = h.forwardRef(
|
|
1466
1487
|
(e, t) => {
|
|
1467
|
-
const n =
|
|
1468
|
-
return /* @__PURE__ */ a.jsx(
|
|
1469
|
-
|
|
1488
|
+
const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = De(se, e.__scopeMenu), i = ot(se, e.__scopeMenu), l = gr(xr, e.__scopeMenu), u = h.useRef(null), v = Ze(t, u);
|
|
1489
|
+
return /* @__PURE__ */ a.jsx(Ye.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(Ye.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
|
|
1490
|
+
qt,
|
|
1470
1491
|
{
|
|
1471
|
-
id:
|
|
1472
|
-
"aria-labelledby":
|
|
1492
|
+
id: l.contentId,
|
|
1493
|
+
"aria-labelledby": l.triggerId,
|
|
1473
1494
|
...o,
|
|
1474
1495
|
ref: v,
|
|
1475
1496
|
align: "start",
|
|
@@ -1477,74 +1498,74 @@ var vn = "MenuSubContent", xn = c.forwardRef(
|
|
|
1477
1498
|
disableOutsidePointerEvents: !1,
|
|
1478
1499
|
disableOutsideScroll: !1,
|
|
1479
1500
|
trapFocus: !1,
|
|
1480
|
-
onOpenAutoFocus: (
|
|
1481
|
-
var
|
|
1482
|
-
i.isUsingKeyboardRef.current && ((
|
|
1501
|
+
onOpenAutoFocus: (m) => {
|
|
1502
|
+
var c;
|
|
1503
|
+
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), m.preventDefault();
|
|
1483
1504
|
},
|
|
1484
|
-
onCloseAutoFocus: (
|
|
1485
|
-
onFocusOutside:
|
|
1486
|
-
|
|
1505
|
+
onCloseAutoFocus: (m) => m.preventDefault(),
|
|
1506
|
+
onFocusOutside: I(e.onFocusOutside, (m) => {
|
|
1507
|
+
m.target !== l.trigger && s.onOpenChange(!1);
|
|
1487
1508
|
}),
|
|
1488
|
-
onEscapeKeyDown:
|
|
1489
|
-
i.onClose(),
|
|
1509
|
+
onEscapeKeyDown: I(e.onEscapeKeyDown, (m) => {
|
|
1510
|
+
i.onClose(), m.preventDefault();
|
|
1490
1511
|
}),
|
|
1491
|
-
onKeyDown:
|
|
1492
|
-
var
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1512
|
+
onKeyDown: I(e.onKeyDown, (m) => {
|
|
1513
|
+
var f;
|
|
1514
|
+
const c = m.currentTarget.contains(m.target), d = $s[i.dir].includes(m.key);
|
|
1515
|
+
c && d && (s.onOpenChange(!1), (f = l.trigger) == null || f.focus(), m.preventDefault());
|
|
1495
1516
|
})
|
|
1496
1517
|
}
|
|
1497
1518
|
) }) }) });
|
|
1498
1519
|
}
|
|
1499
1520
|
);
|
|
1500
|
-
|
|
1501
|
-
function
|
|
1521
|
+
yr.displayName = xr;
|
|
1522
|
+
function br(e) {
|
|
1502
1523
|
return e ? "open" : "closed";
|
|
1503
1524
|
}
|
|
1504
|
-
function
|
|
1525
|
+
function gt(e) {
|
|
1505
1526
|
return e === "indeterminate";
|
|
1506
1527
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1528
|
+
function Wt(e) {
|
|
1529
|
+
return gt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1509
1530
|
}
|
|
1510
|
-
function
|
|
1531
|
+
function ti(e) {
|
|
1511
1532
|
const t = document.activeElement;
|
|
1512
1533
|
for (const n of e)
|
|
1513
1534
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1514
1535
|
}
|
|
1515
|
-
function
|
|
1536
|
+
function ni(e, t) {
|
|
1516
1537
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1517
1538
|
}
|
|
1518
|
-
function
|
|
1539
|
+
function ri(e, t, n) {
|
|
1519
1540
|
const o = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1520
|
-
let i =
|
|
1541
|
+
let i = ni(e, Math.max(s, 0));
|
|
1521
1542
|
o.length === 1 && (i = i.filter((v) => v !== n));
|
|
1522
|
-
const
|
|
1543
|
+
const u = i.find(
|
|
1523
1544
|
(v) => v.toLowerCase().startsWith(o.toLowerCase())
|
|
1524
1545
|
);
|
|
1525
|
-
return
|
|
1546
|
+
return u !== n ? u : void 0;
|
|
1526
1547
|
}
|
|
1527
|
-
function
|
|
1548
|
+
function oi(e, t) {
|
|
1528
1549
|
const { x: n, y: r } = e;
|
|
1529
1550
|
let o = !1;
|
|
1530
1551
|
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1552
|
+
const l = t[s].x, u = t[s].y, v = t[i].x, m = t[i].y;
|
|
1553
|
+
u > r != m > r && n < (v - l) * (r - u) / (m - u) + l && (o = !o);
|
|
1533
1554
|
}
|
|
1534
1555
|
return o;
|
|
1535
1556
|
}
|
|
1536
|
-
function
|
|
1557
|
+
function ai(e, t) {
|
|
1537
1558
|
if (!t) return !1;
|
|
1538
1559
|
const n = { x: e.clientX, y: e.clientY };
|
|
1539
|
-
return
|
|
1560
|
+
return oi(n, t);
|
|
1540
1561
|
}
|
|
1541
|
-
function
|
|
1562
|
+
function Xe(e) {
|
|
1542
1563
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1543
1564
|
}
|
|
1544
|
-
var
|
|
1545
|
-
|
|
1546
|
-
[
|
|
1547
|
-
),
|
|
1565
|
+
var si = tr, ii = Bt, li = rr, ci = or, ui = Vt, di = ar, fi = wt, hi = ir, pi = cr, mi = dr, gi = hr, vi = pr, wi = mr, xi = vr, yi = wr, bi = yr, Yt = "DropdownMenu", [Mi, Wl] = Pn(
|
|
1566
|
+
Yt,
|
|
1567
|
+
[Jn]
|
|
1568
|
+
), W = Jn(), [Si, Mr] = Mi(Yt), Sr = (e) => {
|
|
1548
1569
|
const {
|
|
1549
1570
|
__scopeDropdownMenu: t,
|
|
1550
1571
|
children: n,
|
|
@@ -1552,33 +1573,33 @@ var Ro = Jt, Eo = Je, _o = en, No = tn, Do = nt, Io = nn, ko = Ie, Ao = an, Oo =
|
|
|
1552
1573
|
open: o,
|
|
1553
1574
|
defaultOpen: s,
|
|
1554
1575
|
onOpenChange: i,
|
|
1555
|
-
modal:
|
|
1556
|
-
} = e,
|
|
1576
|
+
modal: l = !0
|
|
1577
|
+
} = e, u = W(t), v = h.useRef(null), [m = !1, c] = In({
|
|
1557
1578
|
prop: o,
|
|
1558
1579
|
defaultProp: s,
|
|
1559
1580
|
onChange: i
|
|
1560
1581
|
});
|
|
1561
1582
|
return /* @__PURE__ */ a.jsx(
|
|
1562
|
-
|
|
1583
|
+
Si,
|
|
1563
1584
|
{
|
|
1564
1585
|
scope: t,
|
|
1565
|
-
triggerId:
|
|
1586
|
+
triggerId: pt(),
|
|
1566
1587
|
triggerRef: v,
|
|
1567
|
-
contentId:
|
|
1568
|
-
open:
|
|
1569
|
-
onOpenChange:
|
|
1570
|
-
onOpenToggle:
|
|
1571
|
-
modal:
|
|
1572
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1588
|
+
contentId: pt(),
|
|
1589
|
+
open: m,
|
|
1590
|
+
onOpenChange: c,
|
|
1591
|
+
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1592
|
+
modal: l,
|
|
1593
|
+
children: /* @__PURE__ */ a.jsx(si, { ...u, open: m, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1573
1594
|
}
|
|
1574
1595
|
);
|
|
1575
1596
|
};
|
|
1576
|
-
|
|
1577
|
-
var
|
|
1597
|
+
Sr.displayName = Yt;
|
|
1598
|
+
var Er = "DropdownMenuTrigger", Cr = h.forwardRef(
|
|
1578
1599
|
(e, t) => {
|
|
1579
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s =
|
|
1580
|
-
return /* @__PURE__ */ a.jsx(
|
|
1581
|
-
|
|
1600
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Mr(Er, n), i = W(n);
|
|
1601
|
+
return /* @__PURE__ */ a.jsx(ii, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
|
|
1602
|
+
Ue.button,
|
|
1582
1603
|
{
|
|
1583
1604
|
type: "button",
|
|
1584
1605
|
id: s.triggerId,
|
|
@@ -1589,41 +1610,41 @@ var Mn = "DropdownMenuTrigger", Cn = c.forwardRef(
|
|
|
1589
1610
|
"data-disabled": r ? "" : void 0,
|
|
1590
1611
|
disabled: r,
|
|
1591
1612
|
...o,
|
|
1592
|
-
ref:
|
|
1593
|
-
onPointerDown:
|
|
1594
|
-
!r &&
|
|
1613
|
+
ref: _n(t, s.triggerRef),
|
|
1614
|
+
onPointerDown: I(e.onPointerDown, (l) => {
|
|
1615
|
+
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1595
1616
|
}),
|
|
1596
|
-
onKeyDown:
|
|
1597
|
-
r || (["Enter", " "].includes(
|
|
1617
|
+
onKeyDown: I(e.onKeyDown, (l) => {
|
|
1618
|
+
r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
|
|
1598
1619
|
})
|
|
1599
1620
|
}
|
|
1600
1621
|
) });
|
|
1601
1622
|
}
|
|
1602
1623
|
);
|
|
1603
|
-
|
|
1604
|
-
var
|
|
1605
|
-
const { __scopeDropdownMenu: t, ...n } = e, r =
|
|
1606
|
-
return /* @__PURE__ */ a.jsx(
|
|
1624
|
+
Cr.displayName = Er;
|
|
1625
|
+
var Ei = "DropdownMenuPortal", Rr = (e) => {
|
|
1626
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = W(t);
|
|
1627
|
+
return /* @__PURE__ */ a.jsx(li, { ...r, ...n });
|
|
1607
1628
|
};
|
|
1608
|
-
|
|
1609
|
-
var
|
|
1629
|
+
Rr.displayName = Ei;
|
|
1630
|
+
var Dr = "DropdownMenuContent", jr = h.forwardRef(
|
|
1610
1631
|
(e, t) => {
|
|
1611
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1632
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Mr(Dr, n), s = W(n), i = h.useRef(!1);
|
|
1612
1633
|
return /* @__PURE__ */ a.jsx(
|
|
1613
|
-
|
|
1634
|
+
ci,
|
|
1614
1635
|
{
|
|
1615
1636
|
id: o.contentId,
|
|
1616
1637
|
"aria-labelledby": o.triggerId,
|
|
1617
1638
|
...s,
|
|
1618
1639
|
...r,
|
|
1619
1640
|
ref: t,
|
|
1620
|
-
onCloseAutoFocus:
|
|
1621
|
-
var
|
|
1622
|
-
i.current || (
|
|
1641
|
+
onCloseAutoFocus: I(e.onCloseAutoFocus, (l) => {
|
|
1642
|
+
var u;
|
|
1643
|
+
i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1623
1644
|
}),
|
|
1624
|
-
onInteractOutside:
|
|
1625
|
-
const
|
|
1626
|
-
(!o.modal ||
|
|
1645
|
+
onInteractOutside: I(e.onInteractOutside, (l) => {
|
|
1646
|
+
const u = l.detail.originalEvent, v = u.button === 0 && u.ctrlKey === !0, m = u.button === 2 || v;
|
|
1647
|
+
(!o.modal || m) && (i.current = !0);
|
|
1627
1648
|
}),
|
|
1628
1649
|
style: {
|
|
1629
1650
|
...e.style,
|
|
@@ -1637,76 +1658,76 @@ var jn = "DropdownMenuContent", Pn = c.forwardRef(
|
|
|
1637
1658
|
);
|
|
1638
1659
|
}
|
|
1639
1660
|
);
|
|
1640
|
-
|
|
1641
|
-
var
|
|
1661
|
+
jr.displayName = Dr;
|
|
1662
|
+
var Ci = "DropdownMenuGroup", Ri = h.forwardRef(
|
|
1642
1663
|
(e, t) => {
|
|
1643
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1644
|
-
return /* @__PURE__ */ a.jsx(
|
|
1664
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1665
|
+
return /* @__PURE__ */ a.jsx(ui, { ...o, ...r, ref: t });
|
|
1645
1666
|
}
|
|
1646
1667
|
);
|
|
1647
|
-
|
|
1648
|
-
var
|
|
1668
|
+
Ri.displayName = Ci;
|
|
1669
|
+
var Di = "DropdownMenuLabel", Nr = h.forwardRef(
|
|
1649
1670
|
(e, t) => {
|
|
1650
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1651
|
-
return /* @__PURE__ */ a.jsx(
|
|
1671
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1672
|
+
return /* @__PURE__ */ a.jsx(di, { ...o, ...r, ref: t });
|
|
1652
1673
|
}
|
|
1653
1674
|
);
|
|
1654
|
-
|
|
1655
|
-
var
|
|
1675
|
+
Nr.displayName = Di;
|
|
1676
|
+
var ji = "DropdownMenuItem", Pr = h.forwardRef(
|
|
1656
1677
|
(e, t) => {
|
|
1657
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1658
|
-
return /* @__PURE__ */ a.jsx(
|
|
1678
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1679
|
+
return /* @__PURE__ */ a.jsx(fi, { ...o, ...r, ref: t });
|
|
1659
1680
|
}
|
|
1660
1681
|
);
|
|
1661
|
-
|
|
1662
|
-
var
|
|
1663
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1664
|
-
return /* @__PURE__ */ a.jsx(
|
|
1682
|
+
Pr.displayName = ji;
|
|
1683
|
+
var Ni = "DropdownMenuCheckboxItem", Tr = h.forwardRef((e, t) => {
|
|
1684
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1685
|
+
return /* @__PURE__ */ a.jsx(hi, { ...o, ...r, ref: t });
|
|
1665
1686
|
});
|
|
1666
|
-
|
|
1667
|
-
var
|
|
1668
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1669
|
-
return /* @__PURE__ */ a.jsx(
|
|
1687
|
+
Tr.displayName = Ni;
|
|
1688
|
+
var Pi = "DropdownMenuRadioGroup", Ti = h.forwardRef((e, t) => {
|
|
1689
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1690
|
+
return /* @__PURE__ */ a.jsx(pi, { ...o, ...r, ref: t });
|
|
1670
1691
|
});
|
|
1671
|
-
|
|
1672
|
-
var
|
|
1673
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1674
|
-
return /* @__PURE__ */ a.jsx(
|
|
1692
|
+
Ti.displayName = Pi;
|
|
1693
|
+
var _i = "DropdownMenuRadioItem", _r = h.forwardRef((e, t) => {
|
|
1694
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1695
|
+
return /* @__PURE__ */ a.jsx(mi, { ...o, ...r, ref: t });
|
|
1675
1696
|
});
|
|
1676
|
-
|
|
1677
|
-
var
|
|
1678
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1679
|
-
return /* @__PURE__ */ a.jsx(
|
|
1697
|
+
_r.displayName = _i;
|
|
1698
|
+
var Oi = "DropdownMenuItemIndicator", Or = h.forwardRef((e, t) => {
|
|
1699
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1700
|
+
return /* @__PURE__ */ a.jsx(gi, { ...o, ...r, ref: t });
|
|
1680
1701
|
});
|
|
1681
|
-
|
|
1682
|
-
var
|
|
1683
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1684
|
-
return /* @__PURE__ */ a.jsx(
|
|
1702
|
+
Or.displayName = Oi;
|
|
1703
|
+
var Ii = "DropdownMenuSeparator", Ir = h.forwardRef((e, t) => {
|
|
1704
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1705
|
+
return /* @__PURE__ */ a.jsx(vi, { ...o, ...r, ref: t });
|
|
1685
1706
|
});
|
|
1686
|
-
|
|
1687
|
-
var
|
|
1707
|
+
Ir.displayName = Ii;
|
|
1708
|
+
var Ai = "DropdownMenuArrow", ki = h.forwardRef(
|
|
1688
1709
|
(e, t) => {
|
|
1689
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1690
|
-
return /* @__PURE__ */ a.jsx(
|
|
1710
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1711
|
+
return /* @__PURE__ */ a.jsx(wi, { ...o, ...r, ref: t });
|
|
1691
1712
|
}
|
|
1692
1713
|
);
|
|
1693
|
-
|
|
1694
|
-
var
|
|
1695
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i =
|
|
1714
|
+
ki.displayName = Ai;
|
|
1715
|
+
var $i = (e) => {
|
|
1716
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = W(t), [l = !1, u] = In({
|
|
1696
1717
|
prop: r,
|
|
1697
1718
|
defaultProp: s,
|
|
1698
1719
|
onChange: o
|
|
1699
1720
|
});
|
|
1700
|
-
return /* @__PURE__ */ a.jsx(
|
|
1701
|
-
},
|
|
1702
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1703
|
-
return /* @__PURE__ */ a.jsx(
|
|
1721
|
+
return /* @__PURE__ */ a.jsx(xi, { ...i, open: l, onOpenChange: u, children: n });
|
|
1722
|
+
}, Li = "DropdownMenuSubTrigger", Ar = h.forwardRef((e, t) => {
|
|
1723
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1724
|
+
return /* @__PURE__ */ a.jsx(yi, { ...o, ...r, ref: t });
|
|
1704
1725
|
});
|
|
1705
|
-
|
|
1706
|
-
var
|
|
1707
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1726
|
+
Ar.displayName = Li;
|
|
1727
|
+
var Fi = "DropdownMenuSubContent", kr = h.forwardRef((e, t) => {
|
|
1728
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
1708
1729
|
return /* @__PURE__ */ a.jsx(
|
|
1709
|
-
|
|
1730
|
+
bi,
|
|
1710
1731
|
{
|
|
1711
1732
|
...o,
|
|
1712
1733
|
...r,
|
|
@@ -1722,13 +1743,13 @@ var ss = "DropdownMenuSubContent", An = c.forwardRef((e, t) => {
|
|
|
1722
1743
|
}
|
|
1723
1744
|
);
|
|
1724
1745
|
});
|
|
1725
|
-
|
|
1726
|
-
var
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1746
|
+
kr.displayName = Fi;
|
|
1747
|
+
var Hi = Sr, Ui = Cr, $r = Rr, Lr = jr, Fr = Nr, Hr = Pr, Ur = Tr, Br = _r, zr = Or, Kr = Ir, Bi = $i, qr = Ar, Vr = kr;
|
|
1748
|
+
const zi = Hi, Ki = Ui, qi = $r, Vi = Bi, Qr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1749
|
+
qr,
|
|
1729
1750
|
{
|
|
1730
1751
|
ref: o,
|
|
1731
|
-
className:
|
|
1752
|
+
className: A(
|
|
1732
1753
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1733
1754
|
t && "pl-8",
|
|
1734
1755
|
e
|
|
@@ -1736,29 +1757,29 @@ const ls = is, ds = cs, hs = On, fs = us, Hn = c.forwardRef(({ className: e, ins
|
|
|
1736
1757
|
...r,
|
|
1737
1758
|
children: [
|
|
1738
1759
|
n,
|
|
1739
|
-
/* @__PURE__ */ a.jsx(
|
|
1760
|
+
/* @__PURE__ */ a.jsx(Vn, { className: "ml-auto h-4 w-4" })
|
|
1740
1761
|
]
|
|
1741
1762
|
}
|
|
1742
1763
|
));
|
|
1743
|
-
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1764
|
+
Qr.displayName = qr.displayName;
|
|
1765
|
+
const Gr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
1766
|
+
Vr,
|
|
1746
1767
|
{
|
|
1747
1768
|
ref: n,
|
|
1748
|
-
className:
|
|
1769
|
+
className: A(
|
|
1749
1770
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1750
1771
|
e
|
|
1751
1772
|
),
|
|
1752
1773
|
...t
|
|
1753
1774
|
}
|
|
1754
1775
|
));
|
|
1755
|
-
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1776
|
+
Gr.displayName = Vr.displayName;
|
|
1777
|
+
const Wr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx($r, { children: /* @__PURE__ */ a.jsx(
|
|
1778
|
+
Lr,
|
|
1758
1779
|
{
|
|
1759
1780
|
ref: r,
|
|
1760
1781
|
sideOffset: t,
|
|
1761
|
-
className:
|
|
1782
|
+
className: A(
|
|
1762
1783
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1763
1784
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1764
1785
|
e
|
|
@@ -1766,12 +1787,12 @@ const zn = c.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
1766
1787
|
...n
|
|
1767
1788
|
}
|
|
1768
1789
|
) }));
|
|
1769
|
-
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1790
|
+
Wr.displayName = Lr.displayName;
|
|
1791
|
+
const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1792
|
+
Hr,
|
|
1772
1793
|
{
|
|
1773
1794
|
ref: r,
|
|
1774
|
-
className:
|
|
1795
|
+
className: A(
|
|
1775
1796
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1776
1797
|
t && "pl-8",
|
|
1777
1798
|
e
|
|
@@ -1779,45 +1800,45 @@ const Vn = c.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1779
1800
|
...n
|
|
1780
1801
|
}
|
|
1781
1802
|
));
|
|
1782
|
-
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1803
|
+
Yr.displayName = Hr.displayName;
|
|
1804
|
+
const Qi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1805
|
+
Ur,
|
|
1785
1806
|
{
|
|
1786
1807
|
ref: o,
|
|
1787
|
-
className:
|
|
1808
|
+
className: A(
|
|
1788
1809
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1789
1810
|
e
|
|
1790
1811
|
),
|
|
1791
1812
|
checked: n,
|
|
1792
1813
|
...r,
|
|
1793
1814
|
children: [
|
|
1794
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1815
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(zr, { children: /* @__PURE__ */ a.jsx(sa, { className: "h-4 w-4" }) }) }),
|
|
1795
1816
|
t
|
|
1796
1817
|
]
|
|
1797
1818
|
}
|
|
1798
1819
|
));
|
|
1799
|
-
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1820
|
+
Qi.displayName = Ur.displayName;
|
|
1821
|
+
const Gi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
|
|
1822
|
+
Br,
|
|
1802
1823
|
{
|
|
1803
1824
|
ref: r,
|
|
1804
|
-
className:
|
|
1825
|
+
className: A(
|
|
1805
1826
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1806
1827
|
e
|
|
1807
1828
|
),
|
|
1808
1829
|
...n,
|
|
1809
1830
|
children: [
|
|
1810
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1831
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(zr, { children: /* @__PURE__ */ a.jsx(qa, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1811
1832
|
t
|
|
1812
1833
|
]
|
|
1813
1834
|
}
|
|
1814
1835
|
));
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1836
|
+
Gi.displayName = Br.displayName;
|
|
1837
|
+
const Xr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1838
|
+
Fr,
|
|
1818
1839
|
{
|
|
1819
1840
|
ref: r,
|
|
1820
|
-
className:
|
|
1841
|
+
className: A(
|
|
1821
1842
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1822
1843
|
t && "pl-8",
|
|
1823
1844
|
e
|
|
@@ -1825,19 +1846,1088 @@ const Yn = c.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1825
1846
|
...n
|
|
1826
1847
|
}
|
|
1827
1848
|
));
|
|
1828
|
-
|
|
1829
|
-
const
|
|
1830
|
-
|
|
1849
|
+
Xr.displayName = Fr.displayName;
|
|
1850
|
+
const Jr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
1851
|
+
Kr,
|
|
1831
1852
|
{
|
|
1832
1853
|
ref: n,
|
|
1833
|
-
className:
|
|
1854
|
+
className: A("-mx-1 my-1 h-px bg-muted", e),
|
|
1834
1855
|
...t
|
|
1835
1856
|
}
|
|
1836
1857
|
));
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1858
|
+
Jr.displayName = Kr.displayName;
|
|
1859
|
+
function Wi(e) {
|
|
1860
|
+
if (typeof document > "u") return;
|
|
1861
|
+
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1862
|
+
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1863
|
+
}
|
|
1864
|
+
const Zr = g.createContext({
|
|
1865
|
+
drawerRef: {
|
|
1866
|
+
current: null
|
|
1867
|
+
},
|
|
1868
|
+
overlayRef: {
|
|
1869
|
+
current: null
|
|
1870
|
+
},
|
|
1871
|
+
scaleBackground: () => {
|
|
1872
|
+
},
|
|
1873
|
+
onPress: () => {
|
|
1874
|
+
},
|
|
1875
|
+
onRelease: () => {
|
|
1876
|
+
},
|
|
1877
|
+
onDrag: () => {
|
|
1878
|
+
},
|
|
1879
|
+
onNestedDrag: () => {
|
|
1880
|
+
},
|
|
1881
|
+
onNestedOpenChange: () => {
|
|
1882
|
+
},
|
|
1883
|
+
onNestedRelease: () => {
|
|
1884
|
+
},
|
|
1885
|
+
openProp: void 0,
|
|
1886
|
+
dismissible: !1,
|
|
1887
|
+
handleOnly: !1,
|
|
1888
|
+
isOpen: !1,
|
|
1889
|
+
isDragging: !1,
|
|
1890
|
+
keyboardIsOpen: {
|
|
1891
|
+
current: !1
|
|
1892
|
+
},
|
|
1893
|
+
snapPointsOffset: null,
|
|
1894
|
+
snapPoints: null,
|
|
1895
|
+
modal: !1,
|
|
1896
|
+
shouldFade: !1,
|
|
1897
|
+
activeSnapPoint: null,
|
|
1898
|
+
onOpenChange: () => {
|
|
1899
|
+
},
|
|
1900
|
+
setActiveSnapPoint: () => {
|
|
1901
|
+
},
|
|
1902
|
+
visible: !1,
|
|
1903
|
+
closeDrawer: () => {
|
|
1904
|
+
},
|
|
1905
|
+
setVisible: () => {
|
|
1906
|
+
},
|
|
1907
|
+
direction: "bottom"
|
|
1908
|
+
}), xt = () => {
|
|
1909
|
+
const e = g.useContext(Zr);
|
|
1910
|
+
if (!e)
|
|
1911
|
+
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1912
|
+
return e;
|
|
1913
|
+
};
|
|
1914
|
+
Wi("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");
|
|
1915
|
+
const Yi = typeof window < "u" ? ma : xe;
|
|
1916
|
+
function Pt(...e) {
|
|
1917
|
+
return (...t) => {
|
|
1918
|
+
for (let n of e)
|
|
1919
|
+
typeof n == "function" && n(...t);
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
function Xi() {
|
|
1923
|
+
return Xt(/^Mac/);
|
|
1924
|
+
}
|
|
1925
|
+
function Ji() {
|
|
1926
|
+
return Xt(/^iPhone/);
|
|
1927
|
+
}
|
|
1928
|
+
function Zi() {
|
|
1929
|
+
return Xt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1930
|
+
Xi() && navigator.maxTouchPoints > 1;
|
|
1931
|
+
}
|
|
1932
|
+
function eo() {
|
|
1933
|
+
return Ji() || Zi();
|
|
1934
|
+
}
|
|
1935
|
+
function Xt(e) {
|
|
1936
|
+
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1937
|
+
}
|
|
1938
|
+
const Et = typeof document < "u" && window.visualViewport;
|
|
1939
|
+
function yn(e) {
|
|
1940
|
+
let t = window.getComputedStyle(e);
|
|
1941
|
+
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1942
|
+
}
|
|
1943
|
+
function to(e) {
|
|
1944
|
+
for (yn(e) && (e = e.parentElement); e && !yn(e); )
|
|
1945
|
+
e = e.parentElement;
|
|
1946
|
+
return e || document.scrollingElement || document.documentElement;
|
|
1947
|
+
}
|
|
1948
|
+
const el = /* @__PURE__ */ new Set([
|
|
1949
|
+
"checkbox",
|
|
1950
|
+
"radio",
|
|
1951
|
+
"range",
|
|
1952
|
+
"color",
|
|
1953
|
+
"file",
|
|
1954
|
+
"image",
|
|
1955
|
+
"button",
|
|
1956
|
+
"submit",
|
|
1957
|
+
"reset"
|
|
1958
|
+
]);
|
|
1959
|
+
let dt = 0, Ct;
|
|
1960
|
+
function tl(e = {}) {
|
|
1961
|
+
let { isDisabled: t } = e;
|
|
1962
|
+
Yi(() => {
|
|
1963
|
+
if (!t)
|
|
1964
|
+
return dt++, dt === 1 && (eo() ? Ct = rl() : Ct = nl()), () => {
|
|
1965
|
+
dt--, dt === 0 && Ct();
|
|
1966
|
+
};
|
|
1967
|
+
}, [
|
|
1968
|
+
t
|
|
1969
|
+
]);
|
|
1970
|
+
}
|
|
1971
|
+
function nl() {
|
|
1972
|
+
return Pt(no(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1973
|
+
}
|
|
1974
|
+
function rl() {
|
|
1975
|
+
let e, t = 0, n = (c) => {
|
|
1976
|
+
e = to(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
1977
|
+
}, r = (c) => {
|
|
1978
|
+
if (!e || e === document.documentElement || e === document.body) {
|
|
1979
|
+
c.preventDefault();
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
let d = c.changedTouches[0].pageY, f = e.scrollTop, b = e.scrollHeight - e.clientHeight;
|
|
1983
|
+
b !== 0 && ((f <= 0 && d > t || f >= b && d < t) && c.preventDefault(), t = d);
|
|
1984
|
+
}, o = (c) => {
|
|
1985
|
+
let d = c.target;
|
|
1986
|
+
Tt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
1987
|
+
d.style.transform = "";
|
|
1988
|
+
}));
|
|
1989
|
+
}, s = (c) => {
|
|
1990
|
+
let d = c.target;
|
|
1991
|
+
Tt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
1992
|
+
d.style.transform = "", Et && (Et.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
1993
|
+
bn(d);
|
|
1994
|
+
}) : Et.addEventListener("resize", () => bn(d), {
|
|
1995
|
+
once: !0
|
|
1996
|
+
}));
|
|
1997
|
+
}));
|
|
1998
|
+
}, i = () => {
|
|
1999
|
+
window.scrollTo(0, 0);
|
|
2000
|
+
}, l = window.pageXOffset, u = window.pageYOffset, v = Pt(no(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
2001
|
+
window.scrollTo(0, 0);
|
|
2002
|
+
let m = Pt(qe(document, "touchstart", n, {
|
|
2003
|
+
passive: !1,
|
|
2004
|
+
capture: !0
|
|
2005
|
+
}), qe(document, "touchmove", r, {
|
|
2006
|
+
passive: !1,
|
|
2007
|
+
capture: !0
|
|
2008
|
+
}), qe(document, "touchend", o, {
|
|
2009
|
+
passive: !1,
|
|
2010
|
+
capture: !0
|
|
2011
|
+
}), qe(document, "focus", s, !0), qe(window, "scroll", i));
|
|
2012
|
+
return () => {
|
|
2013
|
+
v(), m(), window.scrollTo(l, u);
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
function no(e, t, n) {
|
|
2017
|
+
let r = e.style[t];
|
|
2018
|
+
return e.style[t] = n, () => {
|
|
2019
|
+
e.style[t] = r;
|
|
2020
|
+
};
|
|
2021
|
+
}
|
|
2022
|
+
function qe(e, t, n, r) {
|
|
2023
|
+
return e.addEventListener(t, n, r), () => {
|
|
2024
|
+
e.removeEventListener(t, n, r);
|
|
2025
|
+
};
|
|
2026
|
+
}
|
|
2027
|
+
function bn(e) {
|
|
2028
|
+
let t = document.scrollingElement || document.documentElement;
|
|
2029
|
+
for (; e && e !== t; ) {
|
|
2030
|
+
let n = to(e);
|
|
2031
|
+
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
2032
|
+
let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
|
|
2033
|
+
const i = n.getBoundingClientRect().bottom;
|
|
2034
|
+
s > i && (n.scrollTop += o - r);
|
|
2035
|
+
}
|
|
2036
|
+
e = n.parentElement;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
function Tt(e) {
|
|
2040
|
+
return e instanceof HTMLInputElement && !el.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
2041
|
+
}
|
|
2042
|
+
function ol(e, t) {
|
|
2043
|
+
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
2044
|
+
}
|
|
2045
|
+
function al(...e) {
|
|
2046
|
+
return (t) => e.forEach((n) => ol(n, t));
|
|
2047
|
+
}
|
|
2048
|
+
function ro(...e) {
|
|
2049
|
+
return h.useCallback(al(...e), e);
|
|
2050
|
+
}
|
|
2051
|
+
let Ve = null;
|
|
2052
|
+
function sl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
|
|
2053
|
+
const [i, l] = g.useState(() => typeof window < "u" ? window.location.href : ""), u = g.useRef(0), v = g.useCallback(() => {
|
|
2054
|
+
if (Ve === null && e && !s) {
|
|
2055
|
+
Ve = {
|
|
2056
|
+
position: document.body.style.position,
|
|
2057
|
+
top: document.body.style.top,
|
|
2058
|
+
left: document.body.style.left,
|
|
2059
|
+
height: document.body.style.height,
|
|
2060
|
+
right: "unset"
|
|
2061
|
+
};
|
|
2062
|
+
const { scrollX: c, innerHeight: d } = window;
|
|
2063
|
+
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
2064
|
+
top: `${-u.current}px`,
|
|
2065
|
+
left: `${-c}px`,
|
|
2066
|
+
right: "0px",
|
|
2067
|
+
height: "auto"
|
|
2068
|
+
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
2069
|
+
const f = d - window.innerHeight;
|
|
2070
|
+
f && u.current >= d && (document.body.style.top = `${-(u.current + f)}px`);
|
|
2071
|
+
}), 300);
|
|
2072
|
+
}
|
|
2073
|
+
}, [
|
|
2074
|
+
e
|
|
2075
|
+
]), m = g.useCallback(() => {
|
|
2076
|
+
if (Ve !== null && !s) {
|
|
2077
|
+
const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
|
|
2078
|
+
Object.assign(document.body.style, Ve), window.requestAnimationFrame(() => {
|
|
2079
|
+
if (o && i !== window.location.href) {
|
|
2080
|
+
l(window.location.href);
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
window.scrollTo(d, c);
|
|
2084
|
+
}), Ve = null;
|
|
2085
|
+
}
|
|
2086
|
+
}, [
|
|
2087
|
+
i
|
|
2088
|
+
]);
|
|
2089
|
+
return g.useEffect(() => {
|
|
2090
|
+
function c() {
|
|
2091
|
+
u.current = window.scrollY;
|
|
2092
|
+
}
|
|
2093
|
+
return c(), window.addEventListener("scroll", c), () => {
|
|
2094
|
+
window.removeEventListener("scroll", c);
|
|
2095
|
+
};
|
|
2096
|
+
}, []), g.useEffect(() => {
|
|
2097
|
+
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && v(), t || window.setTimeout(() => {
|
|
2098
|
+
m();
|
|
2099
|
+
}, 500)) : m());
|
|
2100
|
+
}, [
|
|
2101
|
+
e,
|
|
2102
|
+
r,
|
|
2103
|
+
i,
|
|
2104
|
+
t,
|
|
2105
|
+
n,
|
|
2106
|
+
v,
|
|
2107
|
+
m
|
|
2108
|
+
]), {
|
|
2109
|
+
restorePositionSetting: m
|
|
2110
|
+
};
|
|
2111
|
+
}
|
|
2112
|
+
const oo = /* @__PURE__ */ new WeakMap();
|
|
2113
|
+
function O(e, t, n = !1) {
|
|
2114
|
+
if (!e || !(e instanceof HTMLElement)) return;
|
|
2115
|
+
let r = {};
|
|
2116
|
+
Object.entries(t).forEach(([o, s]) => {
|
|
2117
|
+
if (o.startsWith("--")) {
|
|
2118
|
+
e.style.setProperty(o, s);
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2121
|
+
r[o] = e.style[o], e.style[o] = s;
|
|
2122
|
+
}), !n && oo.set(e, r);
|
|
2123
|
+
}
|
|
2124
|
+
function ft(e, t) {
|
|
2125
|
+
if (!e || !(e instanceof HTMLElement)) return;
|
|
2126
|
+
let n = oo.get(e);
|
|
2127
|
+
n && (t ? e.style[t] = n[t] : Object.entries(n).forEach(([r, o]) => {
|
|
2128
|
+
e.style[r] = o;
|
|
2129
|
+
}));
|
|
2130
|
+
}
|
|
2131
|
+
const z = (e) => {
|
|
2132
|
+
switch (e) {
|
|
2133
|
+
case "top":
|
|
2134
|
+
case "bottom":
|
|
2135
|
+
return !0;
|
|
2136
|
+
case "left":
|
|
2137
|
+
case "right":
|
|
2138
|
+
return !1;
|
|
2139
|
+
default:
|
|
2140
|
+
return e;
|
|
2141
|
+
}
|
|
2142
|
+
};
|
|
2143
|
+
function ht(e, t) {
|
|
2144
|
+
if (!e)
|
|
2145
|
+
return null;
|
|
2146
|
+
const n = window.getComputedStyle(e), r = (
|
|
2147
|
+
// @ts-ignore
|
|
2148
|
+
n.transform || n.webkitTransform || n.mozTransform
|
|
2149
|
+
);
|
|
2150
|
+
let o = r.match(/^matrix3d\((.+)\)$/);
|
|
2151
|
+
return o ? parseFloat(o[1].split(", ")[z(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[z(t) ? 5 : 4]) : null);
|
|
2152
|
+
}
|
|
2153
|
+
function il(e) {
|
|
2154
|
+
return 8 * (Math.log(e + 1) - 2);
|
|
2155
|
+
}
|
|
2156
|
+
const T = {
|
|
2157
|
+
DURATION: 0.5,
|
|
2158
|
+
EASE: [
|
|
2159
|
+
0.32,
|
|
2160
|
+
0.72,
|
|
2161
|
+
0,
|
|
2162
|
+
1
|
|
2163
|
+
]
|
|
2164
|
+
}, ao = 0.4;
|
|
2165
|
+
function so(e) {
|
|
2166
|
+
const t = g.useRef(e);
|
|
2167
|
+
return g.useEffect(() => {
|
|
2168
|
+
t.current = e;
|
|
2169
|
+
}), g.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2170
|
+
}
|
|
2171
|
+
function ll({ defaultProp: e, onChange: t }) {
|
|
2172
|
+
const n = g.useState(e), [r] = n, o = g.useRef(r), s = so(t);
|
|
2173
|
+
return g.useEffect(() => {
|
|
2174
|
+
o.current !== r && (s(r), o.current = r);
|
|
2175
|
+
}, [
|
|
2176
|
+
r,
|
|
2177
|
+
o,
|
|
2178
|
+
s
|
|
2179
|
+
]), n;
|
|
2180
|
+
}
|
|
2181
|
+
function cl({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2182
|
+
} }) {
|
|
2183
|
+
const [r, o] = ll({
|
|
2184
|
+
defaultProp: t,
|
|
2185
|
+
onChange: n
|
|
2186
|
+
}), s = e !== void 0, i = s ? e : r, l = so(n), u = g.useCallback((v) => {
|
|
2187
|
+
if (s) {
|
|
2188
|
+
const c = typeof v == "function" ? v(e) : v;
|
|
2189
|
+
c !== e && l(c);
|
|
2190
|
+
} else
|
|
2191
|
+
o(v);
|
|
2192
|
+
}, [
|
|
2193
|
+
s,
|
|
2194
|
+
e,
|
|
2195
|
+
o,
|
|
2196
|
+
l
|
|
2197
|
+
]);
|
|
2198
|
+
return [
|
|
2199
|
+
i,
|
|
2200
|
+
u
|
|
2201
|
+
];
|
|
2202
|
+
}
|
|
2203
|
+
function ul({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom" }) {
|
|
2204
|
+
const [u, v] = cl({
|
|
2205
|
+
prop: e,
|
|
2206
|
+
defaultProp: n == null ? void 0 : n[0],
|
|
2207
|
+
onChange: t
|
|
2208
|
+
}), m = g.useMemo(() => u === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2209
|
+
n,
|
|
2210
|
+
u
|
|
2211
|
+
]), c = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === u || !n, d = g.useMemo(() => n == null ? void 0 : n.findIndex((y) => y === u), [
|
|
2212
|
+
n,
|
|
2213
|
+
u
|
|
2214
|
+
]), f = g.useMemo(() => {
|
|
2215
|
+
var y;
|
|
2216
|
+
return (y = n == null ? void 0 : n.map((p) => {
|
|
2217
|
+
const C = typeof window < "u", N = typeof p == "string";
|
|
2218
|
+
let P = 0;
|
|
2219
|
+
if (N && (P = parseInt(p, 10)), z(l)) {
|
|
2220
|
+
const w = N ? P : C ? p * window.innerHeight : 0;
|
|
2221
|
+
return C ? l === "bottom" ? window.innerHeight - w : -window.innerHeight + w : w;
|
|
2222
|
+
}
|
|
2223
|
+
const _ = N ? P : C ? p * window.innerWidth : 0;
|
|
2224
|
+
return C ? l === "right" ? window.innerWidth - _ : -window.innerWidth + _ : _;
|
|
2225
|
+
})) != null ? y : [];
|
|
2226
|
+
}, [
|
|
2227
|
+
n
|
|
2228
|
+
]), b = g.useMemo(() => d !== null ? f == null ? void 0 : f[d] : null, [
|
|
2229
|
+
f,
|
|
2230
|
+
d
|
|
2231
|
+
]), R = g.useCallback((y) => {
|
|
2232
|
+
var p;
|
|
2233
|
+
const C = (p = f == null ? void 0 : f.findIndex((N) => N === y)) != null ? p : null;
|
|
2234
|
+
i(C), O(r.current, {
|
|
2235
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2236
|
+
transform: z(l) ? `translate3d(0, ${y}px, 0)` : `translate3d(${y}px, 0, 0)`
|
|
2237
|
+
}), f && C !== f.length - 1 && C !== s ? O(o.current, {
|
|
2238
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2239
|
+
opacity: "0"
|
|
2240
|
+
}) : O(o.current, {
|
|
2241
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2242
|
+
opacity: "1"
|
|
2243
|
+
}), v(C !== null ? n == null ? void 0 : n[C] : null);
|
|
2244
|
+
}, [
|
|
2245
|
+
r.current,
|
|
2246
|
+
n,
|
|
2247
|
+
f,
|
|
2248
|
+
s,
|
|
2249
|
+
o,
|
|
2250
|
+
v
|
|
2251
|
+
]);
|
|
2252
|
+
g.useEffect(() => {
|
|
2253
|
+
if (u || e) {
|
|
2254
|
+
var y;
|
|
2255
|
+
const p = (y = n == null ? void 0 : n.findIndex((C) => C === e || C === u)) != null ? y : -1;
|
|
2256
|
+
f && p !== -1 && typeof f[p] == "number" && R(f[p]);
|
|
2257
|
+
}
|
|
2258
|
+
}, [
|
|
2259
|
+
u,
|
|
2260
|
+
e,
|
|
2261
|
+
n,
|
|
2262
|
+
f,
|
|
2263
|
+
R
|
|
2264
|
+
]);
|
|
2265
|
+
function K({ draggedDistance: y, closeDrawer: p, velocity: C, dismissible: N }) {
|
|
2266
|
+
if (s === void 0) return;
|
|
2267
|
+
const P = l === "bottom" || l === "right" ? (b ?? 0) - y : (b ?? 0) + y, _ = d === s - 1, w = d === 0, L = y > 0;
|
|
2268
|
+
if (_ && O(o.current, {
|
|
2269
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2270
|
+
}), C > 2 && !L) {
|
|
2271
|
+
N ? p() : R(f[0]);
|
|
2272
|
+
return;
|
|
2273
|
+
}
|
|
2274
|
+
if (C > 2 && L && f && n) {
|
|
2275
|
+
R(f[n.length - 1]);
|
|
2276
|
+
return;
|
|
2277
|
+
}
|
|
2278
|
+
const te = f == null ? void 0 : f.reduce((q, X) => typeof q != "number" || typeof X != "number" ? q : Math.abs(X - P) < Math.abs(q - P) ? X : q), V = z(l) ? window.innerHeight : window.innerWidth;
|
|
2279
|
+
if (C > ao && Math.abs(y) < V * 0.4) {
|
|
2280
|
+
const q = L ? 1 : -1;
|
|
2281
|
+
if (q > 0 && m) {
|
|
2282
|
+
R(f[n.length - 1]);
|
|
2283
|
+
return;
|
|
2284
|
+
}
|
|
2285
|
+
if (w && q < 0 && N && p(), d === null) return;
|
|
2286
|
+
R(f[d + q]);
|
|
2287
|
+
return;
|
|
2288
|
+
}
|
|
2289
|
+
R(te);
|
|
2290
|
+
}
|
|
2291
|
+
function H({ draggedDistance: y }) {
|
|
2292
|
+
if (b === null) return;
|
|
2293
|
+
const p = l === "bottom" || l === "right" ? b - y : b + y;
|
|
2294
|
+
(l === "bottom" || l === "right") && p < f[f.length - 1] || (l === "top" || l === "left") && p > f[f.length - 1] || O(r.current, {
|
|
2295
|
+
transform: z(l) ? `translate3d(0, ${p}px, 0)` : `translate3d(${p}px, 0, 0)`
|
|
2296
|
+
});
|
|
2297
|
+
}
|
|
2298
|
+
function Q(y, p) {
|
|
2299
|
+
if (!n || typeof d != "number" || !f || s === void 0) return null;
|
|
2300
|
+
const C = d === s - 1;
|
|
2301
|
+
if (d >= s && p)
|
|
2302
|
+
return 0;
|
|
2303
|
+
if (C && !p) return 1;
|
|
2304
|
+
if (!c && !C) return null;
|
|
2305
|
+
const P = C ? d + 1 : d - 1, _ = C ? f[P] - f[P - 1] : f[P + 1] - f[P], w = y / Math.abs(_);
|
|
2306
|
+
return C ? 1 - w : w;
|
|
2307
|
+
}
|
|
2308
|
+
return {
|
|
2309
|
+
isLastSnapPoint: m,
|
|
2310
|
+
activeSnapPoint: u,
|
|
2311
|
+
shouldFade: c,
|
|
2312
|
+
getPercentageDragged: Q,
|
|
2313
|
+
setActiveSnapPoint: v,
|
|
2314
|
+
activeSnapPointIndex: d,
|
|
2315
|
+
onRelease: K,
|
|
2316
|
+
onDrag: H,
|
|
2317
|
+
snapPointsOffset: f
|
|
2318
|
+
};
|
|
2319
|
+
}
|
|
2320
|
+
const dl = 0.25, fl = 100, Mn = 8, Pe = 16, Sn = 26, Rt = "vaul-dragging";
|
|
2321
|
+
function io({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: o, onRelease: s, snapPoints: i, nested: l = !1, setBackgroundColorOnScale: u = !0, closeThreshold: v = dl, scrollLockTimeout: m = fl, dismissible: c = !0, handleOnly: d = !1, fadeFromIndex: f = i && i.length - 1, activeSnapPoint: b, setActiveSnapPoint: R, fixed: K, modal: H = !0, onClose: Q, noBodyStyles: y, direction: p = "bottom", preventScrollRestoration: C = !0, disablePreventScroll: N = !1 }) {
|
|
2322
|
+
var P;
|
|
2323
|
+
const [_ = !1, w] = g.useState(!1), [L, te] = g.useState(!1), [V, q] = g.useState(!1), [X, Oe] = g.useState(!1), [he, Be] = g.useState(!1), [ye, E] = g.useState(!1), U = g.useRef(null), Y = g.useRef(null), ne = g.useRef(null), je = g.useRef(null), pe = g.useRef(null), be = g.useRef(!1), me = g.useRef(null), le = g.useRef(0), ge = g.useRef(!1), re = g.useRef(0), M = g.useRef(null), tn = g.useRef(((P = M.current) == null ? void 0 : P.getBoundingClientRect().height) || 0), yt = g.useRef(0), yo = g.useCallback((S) => {
|
|
2324
|
+
i && S === Ke.length - 1 && (Y.current = /* @__PURE__ */ new Date());
|
|
2325
|
+
}, []), { activeSnapPoint: bo, activeSnapPointIndex: ze, setActiveSnapPoint: nn, onRelease: Mo, snapPointsOffset: Ke, onDrag: So, shouldFade: rn, getPercentageDragged: Eo } = ul({
|
|
2326
|
+
snapPoints: i,
|
|
2327
|
+
activeSnapPointProp: b,
|
|
2328
|
+
setActiveSnapPointProp: R,
|
|
2329
|
+
drawerRef: M,
|
|
2330
|
+
fadeFromIndex: f,
|
|
2331
|
+
overlayRef: U,
|
|
2332
|
+
onSnapPointChange: yo,
|
|
2333
|
+
direction: p
|
|
2334
|
+
});
|
|
2335
|
+
tl({
|
|
2336
|
+
isDisabled: !_ || he || !H || ye || !L || N
|
|
2337
|
+
});
|
|
2338
|
+
const { restorePositionSetting: Co } = sl({
|
|
2339
|
+
isOpen: _,
|
|
2340
|
+
modal: H,
|
|
2341
|
+
nested: l,
|
|
2342
|
+
hasBeenOpened: L,
|
|
2343
|
+
preventScrollRestoration: C,
|
|
2344
|
+
noBodyStyles: y
|
|
2345
|
+
});
|
|
2346
|
+
function Ie() {
|
|
2347
|
+
return (window.innerWidth - Sn) / window.innerWidth;
|
|
2348
|
+
}
|
|
2349
|
+
function Ro(S) {
|
|
2350
|
+
var D;
|
|
2351
|
+
!c && !i || M.current && !M.current.contains(S.target) || (tn.current = ((D = M.current) == null ? void 0 : D.getBoundingClientRect().height) || 0, Be(!0), ne.current = /* @__PURE__ */ new Date(), eo() && window.addEventListener("touchend", () => be.current = !1, {
|
|
2352
|
+
once: !0
|
|
2353
|
+
}), S.target.setPointerCapture(S.pointerId), le.current = z(p) ? S.clientY : S.clientX);
|
|
2354
|
+
}
|
|
2355
|
+
function on(S, D) {
|
|
2356
|
+
var k;
|
|
2357
|
+
let j = S;
|
|
2358
|
+
const F = (k = window.getSelection()) == null ? void 0 : k.toString(), B = M.current ? ht(M.current, p) : null, oe = /* @__PURE__ */ new Date();
|
|
2359
|
+
if (j.hasAttribute("data-vaul-no-drag") || j.closest("[data-vaul-no-drag]"))
|
|
2360
|
+
return !1;
|
|
2361
|
+
if (p === "right" || p === "left")
|
|
2362
|
+
return !0;
|
|
2363
|
+
if (Y.current && oe.getTime() - Y.current.getTime() < 500)
|
|
2364
|
+
return !1;
|
|
2365
|
+
if (B !== null && (p === "bottom" ? B > 0 : B < 0))
|
|
2366
|
+
return !0;
|
|
2367
|
+
if (F && F.length > 0)
|
|
2368
|
+
return !1;
|
|
2369
|
+
if (pe.current && oe.getTime() - pe.current.getTime() < m && B === 0 || D)
|
|
2370
|
+
return pe.current = oe, !1;
|
|
2371
|
+
for (; j; ) {
|
|
2372
|
+
if (j.scrollHeight > j.clientHeight) {
|
|
2373
|
+
if (j.scrollTop !== 0)
|
|
2374
|
+
return pe.current = /* @__PURE__ */ new Date(), !1;
|
|
2375
|
+
if (j.getAttribute("role") === "dialog")
|
|
2376
|
+
return !0;
|
|
2377
|
+
}
|
|
2378
|
+
j = j.parentNode;
|
|
2379
|
+
}
|
|
2380
|
+
return !0;
|
|
2381
|
+
}
|
|
2382
|
+
function Do(S) {
|
|
2383
|
+
if (M.current && he) {
|
|
2384
|
+
const D = p === "bottom" || p === "right" ? 1 : -1, k = (le.current - (z(p) ? S.clientY : S.clientX)) * D, j = k > 0, F = i && !c && !j;
|
|
2385
|
+
if (F && ze === 0) return;
|
|
2386
|
+
const B = Math.abs(k), oe = document.querySelector("[vaul-drawer-wrapper]");
|
|
2387
|
+
let ce = B / tn.current;
|
|
2388
|
+
const Me = Eo(B, j);
|
|
2389
|
+
if (Me !== null && (ce = Me), F && ce >= 1 || !be.current && !on(S.target, j)) return;
|
|
2390
|
+
if (M.current.classList.add(Rt), be.current = !0, O(M.current, {
|
|
2391
|
+
transition: "none"
|
|
2392
|
+
}), O(U.current, {
|
|
2393
|
+
transition: "none"
|
|
2394
|
+
}), i && So({
|
|
2395
|
+
draggedDistance: k
|
|
2396
|
+
}), j && !i) {
|
|
2397
|
+
const Ne = il(k), it = Math.min(Ne * -1, 0) * D;
|
|
2398
|
+
O(M.current, {
|
|
2399
|
+
transform: z(p) ? `translate3d(0, ${it}px, 0)` : `translate3d(${it}px, 0, 0)`
|
|
2400
|
+
});
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
const st = 1 - ce;
|
|
2404
|
+
if ((rn || f && ze === f - 1) && (o == null || o(S, ce), O(U.current, {
|
|
2405
|
+
opacity: `${st}`,
|
|
2406
|
+
transition: "none"
|
|
2407
|
+
}, !0)), oe && U.current && r) {
|
|
2408
|
+
const Ne = Math.min(Ie() + ce * (1 - Ie()), 1), it = 8 - ce * 8, sn = Math.max(0, 14 - ce * 14);
|
|
2409
|
+
O(oe, {
|
|
2410
|
+
borderRadius: `${it}px`,
|
|
2411
|
+
transform: z(p) ? `scale(${Ne}) translate3d(0, ${sn}px, 0)` : `scale(${Ne}) translate3d(${sn}px, 0, 0)`,
|
|
2412
|
+
transition: "none"
|
|
2413
|
+
}, !0);
|
|
2414
|
+
}
|
|
2415
|
+
if (!i) {
|
|
2416
|
+
const Ne = B * D;
|
|
2417
|
+
O(M.current, {
|
|
2418
|
+
transform: z(p) ? `translate3d(0, ${Ne}px, 0)` : `translate3d(${Ne}px, 0, 0)`
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
g.useEffect(() => () => {
|
|
2424
|
+
at(!1), Co();
|
|
2425
|
+
}, []), g.useEffect(() => {
|
|
2426
|
+
var S;
|
|
2427
|
+
function D() {
|
|
2428
|
+
if (!M.current) return;
|
|
2429
|
+
const k = document.activeElement;
|
|
2430
|
+
if (Tt(k) || ge.current) {
|
|
2431
|
+
var j;
|
|
2432
|
+
const F = ((j = window.visualViewport) == null ? void 0 : j.height) || 0;
|
|
2433
|
+
let B = window.innerHeight - F;
|
|
2434
|
+
const oe = M.current.getBoundingClientRect().height || 0;
|
|
2435
|
+
yt.current || (yt.current = oe);
|
|
2436
|
+
const ce = M.current.getBoundingClientRect().top;
|
|
2437
|
+
if (Math.abs(re.current - B) > 60 && (ge.current = !ge.current), i && i.length > 0 && Ke && ze) {
|
|
2438
|
+
const Me = Ke[ze] || 0;
|
|
2439
|
+
B += Me;
|
|
2440
|
+
}
|
|
2441
|
+
if (re.current = B, oe > F || ge.current) {
|
|
2442
|
+
const Me = M.current.getBoundingClientRect().height;
|
|
2443
|
+
let st = Me;
|
|
2444
|
+
Me > F && (st = F - Sn), K ? M.current.style.height = `${Me - Math.max(B, 0)}px` : M.current.style.height = `${Math.max(st, F - ce)}px`;
|
|
2445
|
+
} else
|
|
2446
|
+
M.current.style.height = `${yt.current}px`;
|
|
2447
|
+
i && i.length > 0 && !ge.current ? M.current.style.bottom = "0px" : M.current.style.bottom = `${Math.max(B, 0)}px`;
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
return (S = window.visualViewport) == null || S.addEventListener("resize", D), () => {
|
|
2451
|
+
var k;
|
|
2452
|
+
return (k = window.visualViewport) == null ? void 0 : k.removeEventListener("resize", D);
|
|
2453
|
+
};
|
|
2454
|
+
}, [
|
|
2455
|
+
ze,
|
|
2456
|
+
i,
|
|
2457
|
+
Ke
|
|
2458
|
+
]);
|
|
2459
|
+
function Ae() {
|
|
2460
|
+
M.current && (jo(), Q == null || Q(), O(M.current, {
|
|
2461
|
+
transform: z(p) ? `translate3d(0, ${p === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${p === "right" ? "100%" : "-100%"}, 0, 0)`,
|
|
2462
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2463
|
+
}), O(U.current, {
|
|
2464
|
+
opacity: "0",
|
|
2465
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2466
|
+
}), at(!1), setTimeout(() => {
|
|
2467
|
+
q(!1), w(!1);
|
|
2468
|
+
}, 300), setTimeout(() => {
|
|
2469
|
+
i && nn(i[0]);
|
|
2470
|
+
}, T.DURATION * 1e3));
|
|
2471
|
+
}
|
|
2472
|
+
g.useEffect(() => {
|
|
2473
|
+
if (!_ && r) {
|
|
2474
|
+
const S = setTimeout(() => {
|
|
2475
|
+
ft(document.body);
|
|
2476
|
+
}, 200);
|
|
2477
|
+
return () => clearTimeout(S);
|
|
2478
|
+
}
|
|
2479
|
+
}, [
|
|
2480
|
+
_,
|
|
2481
|
+
r
|
|
2482
|
+
]), g.useLayoutEffect(() => {
|
|
2483
|
+
e ? (w(!0), te(!0)) : Ae();
|
|
2484
|
+
}, [
|
|
2485
|
+
e
|
|
2486
|
+
]), g.useEffect(() => {
|
|
2487
|
+
X && (t == null || t(_));
|
|
2488
|
+
}, [
|
|
2489
|
+
_
|
|
2490
|
+
]), g.useEffect(() => {
|
|
2491
|
+
Oe(!0);
|
|
2492
|
+
}, []);
|
|
2493
|
+
function an() {
|
|
2494
|
+
if (!M.current) return;
|
|
2495
|
+
const S = document.querySelector("[vaul-drawer-wrapper]"), D = ht(M.current, p);
|
|
2496
|
+
O(M.current, {
|
|
2497
|
+
transform: "translate3d(0, 0, 0)",
|
|
2498
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2499
|
+
}), O(U.current, {
|
|
2500
|
+
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2501
|
+
opacity: "1"
|
|
2502
|
+
}), r && D && D > 0 && _ && O(S, {
|
|
2503
|
+
borderRadius: `${Mn}px`,
|
|
2504
|
+
overflow: "hidden",
|
|
2505
|
+
...z(p) ? {
|
|
2506
|
+
transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2507
|
+
transformOrigin: "top"
|
|
2508
|
+
} : {
|
|
2509
|
+
transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2510
|
+
transformOrigin: "left"
|
|
2511
|
+
},
|
|
2512
|
+
transitionProperty: "transform, border-radius",
|
|
2513
|
+
transitionDuration: `${T.DURATION}s`,
|
|
2514
|
+
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2515
|
+
}, !0);
|
|
2516
|
+
}
|
|
2517
|
+
function jo() {
|
|
2518
|
+
!he || !M.current || (M.current.classList.remove(Rt), be.current = !1, Be(!1), je.current = /* @__PURE__ */ new Date());
|
|
2519
|
+
}
|
|
2520
|
+
function No(S) {
|
|
2521
|
+
if (!he || !M.current) return;
|
|
2522
|
+
M.current.classList.remove(Rt), be.current = !1, Be(!1), je.current = /* @__PURE__ */ new Date();
|
|
2523
|
+
const D = ht(M.current, p);
|
|
2524
|
+
if (!on(S.target, !1) || !D || Number.isNaN(D) || ne.current === null) return;
|
|
2525
|
+
const k = je.current.getTime() - ne.current.getTime(), j = le.current - (z(p) ? S.clientY : S.clientX), F = Math.abs(j) / k;
|
|
2526
|
+
if (F > 0.05 && (E(!0), setTimeout(() => {
|
|
2527
|
+
E(!1);
|
|
2528
|
+
}, 200)), i) {
|
|
2529
|
+
Mo({
|
|
2530
|
+
draggedDistance: j * (p === "bottom" || p === "right" ? 1 : -1),
|
|
2531
|
+
closeDrawer: Ae,
|
|
2532
|
+
velocity: F,
|
|
2533
|
+
dismissible: c
|
|
2534
|
+
}), s == null || s(S, !0);
|
|
2535
|
+
return;
|
|
2536
|
+
}
|
|
2537
|
+
if (p === "bottom" || p === "right" ? j > 0 : j < 0) {
|
|
2538
|
+
an(), s == null || s(S, !0);
|
|
2539
|
+
return;
|
|
2540
|
+
}
|
|
2541
|
+
if (F > ao) {
|
|
2542
|
+
Ae(), s == null || s(S, !1);
|
|
2543
|
+
return;
|
|
2544
|
+
}
|
|
2545
|
+
var B;
|
|
2546
|
+
const oe = Math.min((B = M.current.getBoundingClientRect().height) != null ? B : 0, window.innerHeight);
|
|
2547
|
+
if (D >= oe * v) {
|
|
2548
|
+
Ae(), s == null || s(S, !1);
|
|
2549
|
+
return;
|
|
2550
|
+
}
|
|
2551
|
+
s == null || s(S, !0), an();
|
|
2552
|
+
}
|
|
2553
|
+
g.useEffect(() => {
|
|
2554
|
+
_ && (O(document.documentElement, {
|
|
2555
|
+
scrollBehavior: "auto"
|
|
2556
|
+
}), Y.current = /* @__PURE__ */ new Date(), at(!0));
|
|
2557
|
+
}, [
|
|
2558
|
+
_
|
|
2559
|
+
]), g.useEffect(() => {
|
|
2560
|
+
if (M.current && V) {
|
|
2561
|
+
var S;
|
|
2562
|
+
const D = M == null || (S = M.current) == null ? void 0 : S.querySelectorAll("*");
|
|
2563
|
+
D == null || D.forEach((k) => {
|
|
2564
|
+
const j = k;
|
|
2565
|
+
(j.scrollHeight > j.clientHeight || j.scrollWidth > j.clientWidth) && j.classList.add("vaul-scrollable");
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
}, [
|
|
2569
|
+
V
|
|
2570
|
+
]);
|
|
2571
|
+
function at(S) {
|
|
2572
|
+
const D = document.querySelector("[vaul-drawer-wrapper]");
|
|
2573
|
+
!D || !r || (S ? (u && (y || (O(document.body, {
|
|
2574
|
+
background: document.body.style.backgroundColor || document.body.style.background
|
|
2575
|
+
}), O(document.body, {
|
|
2576
|
+
background: "black"
|
|
2577
|
+
}, !0))), O(D, {
|
|
2578
|
+
borderRadius: `${Mn}px`,
|
|
2579
|
+
overflow: "hidden",
|
|
2580
|
+
...z(p) ? {
|
|
2581
|
+
transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2582
|
+
transformOrigin: "top"
|
|
2583
|
+
} : {
|
|
2584
|
+
transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2585
|
+
transformOrigin: "left"
|
|
2586
|
+
},
|
|
2587
|
+
transitionProperty: "transform, border-radius",
|
|
2588
|
+
transitionDuration: `${T.DURATION}s`,
|
|
2589
|
+
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2590
|
+
})) : (ft(D, "overflow"), ft(D, "transform"), ft(D, "borderRadius"), O(D, {
|
|
2591
|
+
transitionProperty: "transform, border-radius",
|
|
2592
|
+
transitionDuration: `${T.DURATION}s`,
|
|
2593
|
+
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2594
|
+
})));
|
|
2595
|
+
}
|
|
2596
|
+
function Po(S) {
|
|
2597
|
+
const D = S ? (window.innerWidth - Pe) / window.innerWidth : 1, k = S ? -Pe : 0;
|
|
2598
|
+
me.current && window.clearTimeout(me.current), O(M.current, {
|
|
2599
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2600
|
+
transform: `scale(${D}) translate3d(0, ${k}px, 0)`
|
|
2601
|
+
}), !S && M.current && (me.current = setTimeout(() => {
|
|
2602
|
+
const j = ht(M.current, p);
|
|
2603
|
+
O(M.current, {
|
|
2604
|
+
transition: "none",
|
|
2605
|
+
transform: z(p) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2606
|
+
});
|
|
2607
|
+
}, 500));
|
|
2608
|
+
}
|
|
2609
|
+
function To(S, D) {
|
|
2610
|
+
if (D < 0) return;
|
|
2611
|
+
const k = z(p) ? window.innerHeight : window.innerWidth, j = (k - Pe) / k, F = j + D * (1 - j), B = -Pe + D * Pe;
|
|
2612
|
+
O(M.current, {
|
|
2613
|
+
transform: z(p) ? `scale(${F}) translate3d(0, ${B}px, 0)` : `scale(${F}) translate3d(${B}px, 0, 0)`,
|
|
2614
|
+
transition: "none"
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
function _o(S, D) {
|
|
2618
|
+
const k = z(p) ? window.innerHeight : window.innerWidth, j = D ? (k - Pe) / k : 1, F = D ? -Pe : 0;
|
|
2619
|
+
D && O(M.current, {
|
|
2620
|
+
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2621
|
+
transform: z(p) ? `scale(${j}) translate3d(0, ${F}px, 0)` : `scale(${j}) translate3d(${F}px, 0, 0)`
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
return /* @__PURE__ */ g.createElement(za, {
|
|
2625
|
+
modal: H,
|
|
2626
|
+
onOpenChange: (S) => {
|
|
2627
|
+
if (e !== void 0) {
|
|
2628
|
+
t == null || t(S);
|
|
2629
|
+
return;
|
|
2630
|
+
}
|
|
2631
|
+
S ? (te(!0), w(S)) : Ae();
|
|
2632
|
+
},
|
|
2633
|
+
open: _
|
|
2634
|
+
}, /* @__PURE__ */ g.createElement(Zr.Provider, {
|
|
2635
|
+
value: {
|
|
2636
|
+
visible: V,
|
|
2637
|
+
activeSnapPoint: bo,
|
|
2638
|
+
snapPoints: i,
|
|
2639
|
+
setActiveSnapPoint: nn,
|
|
2640
|
+
drawerRef: M,
|
|
2641
|
+
overlayRef: U,
|
|
2642
|
+
scaleBackground: at,
|
|
2643
|
+
onOpenChange: t,
|
|
2644
|
+
onPress: Ro,
|
|
2645
|
+
setVisible: q,
|
|
2646
|
+
onRelease: No,
|
|
2647
|
+
onDrag: Do,
|
|
2648
|
+
dismissible: c,
|
|
2649
|
+
handleOnly: d,
|
|
2650
|
+
isOpen: _,
|
|
2651
|
+
isDragging: he,
|
|
2652
|
+
shouldFade: rn,
|
|
2653
|
+
closeDrawer: Ae,
|
|
2654
|
+
onNestedDrag: To,
|
|
2655
|
+
onNestedOpenChange: Po,
|
|
2656
|
+
onNestedRelease: _o,
|
|
2657
|
+
keyboardIsOpen: ge,
|
|
2658
|
+
openProp: e,
|
|
2659
|
+
modal: H,
|
|
2660
|
+
snapPointsOffset: Ke,
|
|
2661
|
+
direction: p
|
|
2662
|
+
}
|
|
2663
|
+
}, n));
|
|
2664
|
+
}
|
|
2665
|
+
const hl = 250, pl = 120, lo = /* @__PURE__ */ g.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2666
|
+
const { visible: o, closeDrawer: s, isDragging: i, snapPoints: l, activeSnapPoint: u, setActiveSnapPoint: v, dismissible: m, handleOnly: c, onPress: d, onDrag: f } = xt(), b = g.useRef(null), R = g.useRef(!1);
|
|
2667
|
+
function K() {
|
|
2668
|
+
if (R.current) {
|
|
2669
|
+
y();
|
|
2670
|
+
return;
|
|
2671
|
+
}
|
|
2672
|
+
window.setTimeout(() => {
|
|
2673
|
+
H();
|
|
2674
|
+
}, pl);
|
|
2675
|
+
}
|
|
2676
|
+
function H() {
|
|
2677
|
+
if (i || e || R.current) {
|
|
2678
|
+
y();
|
|
2679
|
+
return;
|
|
2680
|
+
}
|
|
2681
|
+
if (y(), (!l || l.length === 0) && m) {
|
|
2682
|
+
s();
|
|
2683
|
+
return;
|
|
2684
|
+
}
|
|
2685
|
+
if (u === l[l.length - 1] && m) {
|
|
2686
|
+
s();
|
|
2687
|
+
return;
|
|
2688
|
+
}
|
|
2689
|
+
const C = l.findIndex((P) => P === u);
|
|
2690
|
+
if (C === -1) return;
|
|
2691
|
+
const N = l[C + 1];
|
|
2692
|
+
v(N);
|
|
2693
|
+
}
|
|
2694
|
+
function Q() {
|
|
2695
|
+
b.current = window.setTimeout(() => {
|
|
2696
|
+
R.current = !0;
|
|
2697
|
+
}, hl);
|
|
2698
|
+
}
|
|
2699
|
+
function y() {
|
|
2700
|
+
window.clearTimeout(b.current), R.current = !1;
|
|
2701
|
+
}
|
|
2702
|
+
return /* @__PURE__ */ g.createElement("div", {
|
|
2703
|
+
onClick: K,
|
|
2704
|
+
onDoubleClick: () => {
|
|
2705
|
+
R.current = !0, s();
|
|
2706
|
+
},
|
|
2707
|
+
onPointerCancel: y,
|
|
2708
|
+
onPointerDown: (p) => {
|
|
2709
|
+
c && d(p), Q();
|
|
2710
|
+
},
|
|
2711
|
+
onPointerMove: (p) => {
|
|
2712
|
+
c && f(p);
|
|
2713
|
+
},
|
|
2714
|
+
// onPointerUp is already handled by the content component
|
|
2715
|
+
ref: r,
|
|
2716
|
+
"vaul-drawer-visible": o ? "true" : "false",
|
|
2717
|
+
"vaul-handle": "",
|
|
2718
|
+
"aria-hidden": "true",
|
|
2719
|
+
...n
|
|
2720
|
+
}, /* @__PURE__ */ g.createElement("span", {
|
|
2721
|
+
"vaul-handle-hitarea": "",
|
|
2722
|
+
"aria-hidden": "true"
|
|
2723
|
+
}, t));
|
|
2724
|
+
});
|
|
2725
|
+
lo.displayName = "Drawer.Handle";
|
|
2726
|
+
const co = /* @__PURE__ */ g.forwardRef(function({ children: e, ...t }, n) {
|
|
2727
|
+
const { overlayRef: r, snapPoints: o, onRelease: s, shouldFade: i, isOpen: l, visible: u } = xt(), v = ro(n, r), m = o && o.length > 0;
|
|
2728
|
+
return /* @__PURE__ */ g.createElement(ka, {
|
|
2729
|
+
onMouseUp: s,
|
|
2730
|
+
ref: v,
|
|
2731
|
+
"vaul-drawer-visible": u ? "true" : "false",
|
|
2732
|
+
"vaul-overlay": "",
|
|
2733
|
+
"vaul-snap-points": l && m ? "true" : "false",
|
|
2734
|
+
"vaul-snap-points-overlay": l && i ? "true" : "false",
|
|
2735
|
+
...t
|
|
2736
|
+
});
|
|
2737
|
+
});
|
|
2738
|
+
co.displayName = "Drawer.Overlay";
|
|
2739
|
+
const uo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...o }, s) {
|
|
2740
|
+
const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer: b, modal: R, openProp: K, onOpenChange: H, setVisible: Q, handleOnly: y, direction: p } = xt(), C = ro(s, i), N = g.useRef(null), P = g.useRef(!1), _ = (w, L, te = 0) => {
|
|
2741
|
+
if (P.current) return !0;
|
|
2742
|
+
const V = Math.abs(w.y), q = Math.abs(w.x), X = q > V, Oe = [
|
|
2743
|
+
"bottom",
|
|
2744
|
+
"right"
|
|
2745
|
+
].includes(L) ? 1 : -1;
|
|
2746
|
+
if (L === "left" || L === "right") {
|
|
2747
|
+
if (!(w.x * Oe < 0) && q >= 0 && q <= te)
|
|
2748
|
+
return X;
|
|
2749
|
+
} else if (!(w.y * Oe < 0) && V >= 0 && V <= te)
|
|
2750
|
+
return !X;
|
|
2751
|
+
return P.current = !0, !0;
|
|
2752
|
+
};
|
|
2753
|
+
return g.useEffect(() => {
|
|
2754
|
+
Q(!0);
|
|
2755
|
+
}, []), /* @__PURE__ */ g.createElement($a, {
|
|
2756
|
+
"vaul-drawer": "",
|
|
2757
|
+
"vaul-drawer-direction": p,
|
|
2758
|
+
"vaul-drawer-visible": f ? "true" : "false",
|
|
2759
|
+
...o,
|
|
2760
|
+
ref: C,
|
|
2761
|
+
style: d && d.length > 0 ? {
|
|
2762
|
+
"--snap-point-height": `${d[0]}px`,
|
|
2763
|
+
...r
|
|
2764
|
+
} : r,
|
|
2765
|
+
onOpenAutoFocus: (w) => {
|
|
2766
|
+
if (e)
|
|
2767
|
+
e(w);
|
|
2768
|
+
else {
|
|
2769
|
+
var L;
|
|
2770
|
+
w.preventDefault(), (L = i.current) == null || L.focus();
|
|
2771
|
+
}
|
|
2772
|
+
},
|
|
2773
|
+
onPointerDown: (w) => {
|
|
2774
|
+
y || (o.onPointerDown == null || o.onPointerDown.call(o, w), N.current = {
|
|
2775
|
+
x: w.clientX,
|
|
2776
|
+
y: w.clientY
|
|
2777
|
+
}, l(w));
|
|
2778
|
+
},
|
|
2779
|
+
onPointerDownOutside: (w) => {
|
|
2780
|
+
if (t == null || t(w), !R || w.defaultPrevented) {
|
|
2781
|
+
w.preventDefault();
|
|
2782
|
+
return;
|
|
2783
|
+
}
|
|
2784
|
+
c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) && b();
|
|
2785
|
+
},
|
|
2786
|
+
onFocusOutside: (w) => {
|
|
2787
|
+
if (!R) {
|
|
2788
|
+
w.preventDefault();
|
|
2789
|
+
return;
|
|
2790
|
+
}
|
|
2791
|
+
},
|
|
2792
|
+
onEscapeKeyDown: (w) => {
|
|
2793
|
+
if (!R) {
|
|
2794
|
+
w.preventDefault();
|
|
2795
|
+
return;
|
|
2796
|
+
}
|
|
2797
|
+
},
|
|
2798
|
+
onPointerMove: (w) => {
|
|
2799
|
+
if (y || (o.onPointerMove == null || o.onPointerMove.call(o, w), !N.current)) return;
|
|
2800
|
+
const L = w.clientY - N.current.y, te = w.clientX - N.current.x, V = w.pointerType === "touch" ? 10 : 2;
|
|
2801
|
+
_({
|
|
2802
|
+
x: te,
|
|
2803
|
+
y: L
|
|
2804
|
+
}, p, V) ? v(w) : (Math.abs(te) > V || Math.abs(L) > V) && (N.current = null);
|
|
2805
|
+
},
|
|
2806
|
+
onPointerUp: (w) => {
|
|
2807
|
+
o.onPointerUp == null || o.onPointerUp.call(o, w), N.current = null, P.current = !1, u(w);
|
|
2808
|
+
}
|
|
2809
|
+
});
|
|
2810
|
+
});
|
|
2811
|
+
uo.displayName = "Drawer.Content";
|
|
2812
|
+
function ml({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2813
|
+
const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = xt();
|
|
2814
|
+
if (!r)
|
|
2815
|
+
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
2816
|
+
return /* @__PURE__ */ g.createElement(io, {
|
|
2817
|
+
nested: !0,
|
|
2818
|
+
onClose: () => {
|
|
2819
|
+
o(!1);
|
|
2820
|
+
},
|
|
2821
|
+
onDrag: (i, l) => {
|
|
2822
|
+
r(i, l), e == null || e(i, l);
|
|
2823
|
+
},
|
|
2824
|
+
onOpenChange: (i) => {
|
|
2825
|
+
i && o(i), t == null || t(i);
|
|
2826
|
+
},
|
|
2827
|
+
onRelease: s,
|
|
2828
|
+
...n
|
|
2829
|
+
});
|
|
2830
|
+
}
|
|
2831
|
+
const ie = {
|
|
2832
|
+
Root: io,
|
|
2833
|
+
NestedRoot: ml,
|
|
2834
|
+
Content: uo,
|
|
2835
|
+
Handle: lo,
|
|
2836
|
+
Overlay: co,
|
|
2837
|
+
Trigger: La,
|
|
2838
|
+
Portal: Fa,
|
|
2839
|
+
Close: Ha,
|
|
2840
|
+
Title: Ua,
|
|
2841
|
+
Description: Ba
|
|
2842
|
+
}, Jt = ({
|
|
2843
|
+
shouldScaleBackground: e = !0,
|
|
2844
|
+
...t
|
|
2845
|
+
}) => /* @__PURE__ */ a.jsx(
|
|
2846
|
+
ie.Root,
|
|
2847
|
+
{
|
|
2848
|
+
shouldScaleBackground: e,
|
|
2849
|
+
...t
|
|
2850
|
+
}
|
|
2851
|
+
);
|
|
2852
|
+
Jt.displayName = "Drawer";
|
|
2853
|
+
const fo = ie.Trigger, gl = ie.Portal, vl = ie.Close, ho = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2854
|
+
ie.Overlay,
|
|
2855
|
+
{
|
|
2856
|
+
ref: n,
|
|
2857
|
+
className: A("fixed inset-0 z-50 bg-black/80", e),
|
|
2858
|
+
...t
|
|
2859
|
+
}
|
|
2860
|
+
));
|
|
2861
|
+
ho.displayName = ie.Overlay.displayName;
|
|
2862
|
+
const Zt = h.forwardRef(({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(gl, { children: [
|
|
2863
|
+
/* @__PURE__ */ a.jsx(ho, {}),
|
|
2864
|
+
/* @__PURE__ */ a.jsxs(
|
|
2865
|
+
ie.Content,
|
|
2866
|
+
{
|
|
2867
|
+
ref: o,
|
|
2868
|
+
className: A(
|
|
2869
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2870
|
+
e
|
|
2871
|
+
),
|
|
2872
|
+
...r,
|
|
2873
|
+
children: [
|
|
2874
|
+
!n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2875
|
+
t
|
|
2876
|
+
]
|
|
2877
|
+
}
|
|
2878
|
+
)
|
|
2879
|
+
] }));
|
|
2880
|
+
Zt.displayName = "DrawerContent";
|
|
2881
|
+
const en = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2882
|
+
ie.Title,
|
|
2883
|
+
{
|
|
2884
|
+
ref: n,
|
|
2885
|
+
className: A(
|
|
2886
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
2887
|
+
e
|
|
2888
|
+
),
|
|
2889
|
+
...t
|
|
2890
|
+
}
|
|
2891
|
+
));
|
|
2892
|
+
en.displayName = ie.Title.displayName;
|
|
2893
|
+
const wl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2894
|
+
ie.Description,
|
|
2895
|
+
{
|
|
2896
|
+
ref: n,
|
|
2897
|
+
className: A("text-sm text-muted-foreground", e),
|
|
2898
|
+
...t
|
|
2899
|
+
}
|
|
2900
|
+
));
|
|
2901
|
+
wl.displayName = ie.Description.displayName;
|
|
2902
|
+
const xl = () => {
|
|
2903
|
+
const { topNavigation: e } = et();
|
|
2904
|
+
return /* @__PURE__ */ a.jsxs(Jt, { direction: "right", children: [
|
|
2905
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(fo, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Qa, { size: 22 }) }) }),
|
|
2906
|
+
/* @__PURE__ */ a.jsxs(
|
|
2907
|
+
Zt,
|
|
2908
|
+
{
|
|
2909
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2910
|
+
"aria-describedby": void 0,
|
|
2911
|
+
children: [
|
|
2912
|
+
/* @__PURE__ */ a.jsx(An, { children: /* @__PURE__ */ a.jsx(en, { children: "Navigation" }) }),
|
|
2913
|
+
/* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2914
|
+
We,
|
|
2915
|
+
{
|
|
2916
|
+
className: ({ isActive: n }) => kn(
|
|
2917
|
+
"block font-medium border-b-2",
|
|
2918
|
+
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2919
|
+
),
|
|
2920
|
+
to: t.id,
|
|
2921
|
+
children: /* @__PURE__ */ a.jsx(vl, { children: t.label })
|
|
2922
|
+
}
|
|
2923
|
+
) }, t.label)) })
|
|
2924
|
+
]
|
|
2925
|
+
}
|
|
2926
|
+
)
|
|
2927
|
+
] });
|
|
2928
|
+
}, yl = () => {
|
|
2929
|
+
const e = et(), [t, n] = He(!1), r = Fn(() => n(!1), []);
|
|
2930
|
+
xe(() => {
|
|
1841
2931
|
if (t)
|
|
1842
2932
|
return;
|
|
1843
2933
|
function s(i) {
|
|
@@ -1847,7 +2937,7 @@ const gs = () => {
|
|
|
1847
2937
|
window.removeEventListener("keydown", s);
|
|
1848
2938
|
};
|
|
1849
2939
|
}, [t, n]);
|
|
1850
|
-
const o = e.plugins.find(
|
|
2940
|
+
const o = e.plugins.find(Ds);
|
|
1851
2941
|
return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1852
2942
|
/* @__PURE__ */ a.jsxs(
|
|
1853
2943
|
"button",
|
|
@@ -1857,24 +2947,24 @@ const gs = () => {
|
|
|
1857
2947
|
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72",
|
|
1858
2948
|
children: [
|
|
1859
2949
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
1860
|
-
/* @__PURE__ */ a.jsx(
|
|
2950
|
+
/* @__PURE__ */ a.jsx(Ya, { size: 14 }),
|
|
1861
2951
|
"Search"
|
|
1862
2952
|
] }),
|
|
1863
2953
|
/* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
1864
2954
|
]
|
|
1865
2955
|
}
|
|
1866
2956
|
),
|
|
1867
|
-
/* @__PURE__ */ a.jsx(
|
|
2957
|
+
/* @__PURE__ */ a.jsx(Hn, { fallback: null, children: o.renderSearch({
|
|
1868
2958
|
isOpen: t,
|
|
1869
2959
|
onClose: r
|
|
1870
2960
|
}) })
|
|
1871
2961
|
] }) : null;
|
|
1872
|
-
},
|
|
1873
|
-
const { topNavigation: e } =
|
|
1874
|
-
return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
1875
|
-
|
|
2962
|
+
}, bl = () => {
|
|
2963
|
+
const { topNavigation: e } = et();
|
|
2964
|
+
return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2965
|
+
We,
|
|
1876
2966
|
{
|
|
1877
|
-
className: ({ isActive: n }) =>
|
|
2967
|
+
className: ({ isActive: n }) => kn(
|
|
1878
2968
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
1879
2969
|
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
1880
2970
|
),
|
|
@@ -1882,51 +2972,52 @@ const gs = () => {
|
|
|
1882
2972
|
children: t.label
|
|
1883
2973
|
}
|
|
1884
2974
|
) }, t.label)) }) });
|
|
1885
|
-
},
|
|
1886
|
-
/* @__PURE__ */ a.jsx(
|
|
1887
|
-
/* @__PURE__ */ a.jsx(
|
|
2975
|
+
}, po = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(Vi, { children: [
|
|
2976
|
+
/* @__PURE__ */ a.jsx(Qr, { children: e.label }),
|
|
2977
|
+
/* @__PURE__ */ a.jsx(qi, { children: /* @__PURE__ */ a.jsx(Gr, { children: e.children.map((t, n) => (
|
|
1888
2978
|
// eslint-disable-next-line react/no-array-index-key
|
|
1889
|
-
/* @__PURE__ */ a.jsx(
|
|
2979
|
+
/* @__PURE__ */ a.jsx(po, { item: t }, n)
|
|
1890
2980
|
)) }) })
|
|
1891
|
-
] }, e.label) : /* @__PURE__ */ a.jsx(
|
|
1892
|
-
const t =
|
|
1893
|
-
return /* @__PURE__ */ a.jsx("header", { className: "sticky top-0 z-10 bg-background/80 backdrop-blur w-full", children: /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1894
|
-
/* @__PURE__ */ a.jsxs("div", { className: "grid lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-12 h-[--top-header-height]", children: [
|
|
1895
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(
|
|
1896
|
-
(
|
|
2981
|
+
] }, e.label) : /* @__PURE__ */ a.jsx(It, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(Yr, { children: e.label }, e.label) }), mo = Un(function() {
|
|
2982
|
+
const t = un(), [n, r] = ia(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = un(), l = et(), { page: u, plugins: v } = l, m = v.filter((d) => Cs(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(po, { item: d }, d.label)), c = n ? Ga : Xa;
|
|
2983
|
+
return /* @__PURE__ */ a.jsx("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
2984
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
2985
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(It, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
2986
|
+
(u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1897
2987
|
/* @__PURE__ */ a.jsx(
|
|
1898
2988
|
"img",
|
|
1899
2989
|
{
|
|
1900
|
-
src:
|
|
1901
|
-
alt:
|
|
1902
|
-
style: { width:
|
|
1903
|
-
className:
|
|
2990
|
+
src: u.logo.src.light,
|
|
2991
|
+
alt: u.logo.alt ?? u.pageTitle,
|
|
2992
|
+
style: { width: u.logo.width },
|
|
2993
|
+
className: A("h-10", n && "hidden"),
|
|
1904
2994
|
loading: "lazy"
|
|
1905
2995
|
}
|
|
1906
2996
|
),
|
|
1907
2997
|
/* @__PURE__ */ a.jsx(
|
|
1908
2998
|
"img",
|
|
1909
2999
|
{
|
|
1910
|
-
src:
|
|
1911
|
-
alt:
|
|
1912
|
-
style: { width:
|
|
1913
|
-
className:
|
|
3000
|
+
src: u.logo.src.dark,
|
|
3001
|
+
alt: u.logo.alt ?? u.pageTitle,
|
|
3002
|
+
style: { width: u.logo.width },
|
|
3003
|
+
className: A("h-10", !n && "hidden"),
|
|
1914
3004
|
loading: "lazy"
|
|
1915
3005
|
}
|
|
1916
3006
|
)
|
|
1917
3007
|
] }),
|
|
1918
|
-
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children:
|
|
3008
|
+
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
|
|
1919
3009
|
] }) }) }),
|
|
1920
|
-
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1921
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ a.jsx(
|
|
1922
|
-
/* @__PURE__ */ a.
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
/* @__PURE__ */ a.
|
|
1927
|
-
|
|
1928
|
-
/* @__PURE__ */ a.jsx(
|
|
1929
|
-
|
|
3010
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
3011
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ a.jsx(yl, {}) }),
|
|
3012
|
+
/* @__PURE__ */ a.jsx(xl, {}),
|
|
3013
|
+
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
3014
|
+
/* @__PURE__ */ a.jsx(Te, { name: "head-navigation-start" }),
|
|
3015
|
+
i && !o ? /* @__PURE__ */ a.jsx(Dt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : m.length > 0 && /* @__PURE__ */ a.jsxs(zi, { modal: !1, children: [
|
|
3016
|
+
/* @__PURE__ */ a.jsx(Ki, { asChild: !0, children: /* @__PURE__ */ a.jsx(Dt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
|
|
3017
|
+
/* @__PURE__ */ a.jsxs(Wr, { className: "w-56", children: [
|
|
3018
|
+
/* @__PURE__ */ a.jsx(Xr, { children: "My Account" }),
|
|
3019
|
+
/* @__PURE__ */ a.jsx(Jr, {}),
|
|
3020
|
+
m
|
|
1930
3021
|
] })
|
|
1931
3022
|
] }),
|
|
1932
3023
|
/* @__PURE__ */ a.jsx(
|
|
@@ -1936,89 +3027,89 @@ const gs = () => {
|
|
|
1936
3027
|
"aria-label": n ? "Switch to light mode" : "Switch to dark mode",
|
|
1937
3028
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
1938
3029
|
onClick: r,
|
|
1939
|
-
children: /* @__PURE__ */ a.jsx(
|
|
3030
|
+
children: /* @__PURE__ */ a.jsx(c, { size: 18 })
|
|
1940
3031
|
}
|
|
1941
3032
|
),
|
|
1942
|
-
/* @__PURE__ */ a.jsx(
|
|
3033
|
+
/* @__PURE__ */ a.jsx(Te, { name: "head-navigation-end" })
|
|
1943
3034
|
] })
|
|
1944
3035
|
] })
|
|
1945
3036
|
] }),
|
|
1946
|
-
/* @__PURE__ */ a.jsx(
|
|
3037
|
+
/* @__PURE__ */ a.jsx(bl, {})
|
|
1947
3038
|
] }) });
|
|
1948
|
-
}),
|
|
1949
|
-
Header:
|
|
1950
|
-
},
|
|
1951
|
-
const [t, n] =
|
|
1952
|
-
|
|
1953
|
-
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"),
|
|
1954
|
-
n(
|
|
3039
|
+
}), go = {
|
|
3040
|
+
Header: mo
|
|
3041
|
+
}, Ml = Ln(go), Sl = Ml.Provider, El = (e) => {
|
|
3042
|
+
const [t, n] = He(!1);
|
|
3043
|
+
xe(() => {
|
|
3044
|
+
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
|
|
3045
|
+
n(l);
|
|
1955
3046
|
}, [t]);
|
|
1956
|
-
const r =
|
|
3047
|
+
const r = Fn(() => {
|
|
1957
3048
|
const s = !t;
|
|
1958
3049
|
document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
|
|
1959
3050
|
}, [t]), o = [t, r];
|
|
1960
|
-
return /* @__PURE__ */ a.jsx(
|
|
1961
|
-
},
|
|
3051
|
+
return /* @__PURE__ */ a.jsx(la.Provider, { value: o, ...e });
|
|
3052
|
+
}, Cl = ({
|
|
1962
3053
|
children: e,
|
|
1963
3054
|
context: t
|
|
1964
|
-
}) => (
|
|
3055
|
+
}) => (Pa({
|
|
1965
3056
|
queryFn: async () => (await t.initialize(), !0),
|
|
1966
3057
|
queryKey: ["zudoku-initialize"]
|
|
1967
|
-
}), /* @__PURE__ */ a.jsx(
|
|
3058
|
+
}), /* @__PURE__ */ a.jsx(Ta.Provider, { value: t, children: e })), Rl = ({
|
|
1968
3059
|
children: e,
|
|
1969
3060
|
...t
|
|
1970
3061
|
}) => {
|
|
1971
|
-
var
|
|
1972
|
-
const n =
|
|
1973
|
-
() => ({ ...
|
|
3062
|
+
var c, d;
|
|
3063
|
+
const n = bt(
|
|
3064
|
+
() => ({ ...go, ...t.overrides }),
|
|
1974
3065
|
[t.overrides]
|
|
1975
|
-
), r =
|
|
1976
|
-
var
|
|
3066
|
+
), r = bt(() => {
|
|
3067
|
+
var b;
|
|
1977
3068
|
return {
|
|
1978
|
-
...(t.plugins ?? []).filter(
|
|
1979
|
-
(
|
|
1980
|
-
).reduce((
|
|
1981
|
-
...
|
|
1982
|
-
...(
|
|
3069
|
+
...(t.plugins ?? []).filter(Ps).flatMap(
|
|
3070
|
+
(R) => R.getMdxComponents ? [R.getMdxComponents()] : []
|
|
3071
|
+
).reduce((R, K) => ({ ...R, ...K }), {}),
|
|
3072
|
+
...ca,
|
|
3073
|
+
...(b = t.mdx) == null ? void 0 : b.components
|
|
1983
3074
|
};
|
|
1984
|
-
}, [(
|
|
3075
|
+
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = ga(jt), [s, i] = He(!1), l = bt(
|
|
1985
3076
|
() => s ? { stagger: !0 } : { stagger: o },
|
|
1986
3077
|
[o, s]
|
|
1987
|
-
),
|
|
1988
|
-
|
|
3078
|
+
), u = Bo();
|
|
3079
|
+
xe(() => {
|
|
1989
3080
|
s || i(!0);
|
|
1990
|
-
}, [s,
|
|
1991
|
-
const [v] =
|
|
1992
|
-
var
|
|
1993
|
-
return /* @__PURE__ */ a.jsx(
|
|
3081
|
+
}, [s, u.location]);
|
|
3082
|
+
const [v] = He(() => new _s(t)), m = (d = t.plugins) == null ? void 0 : d.filter(Ns).map((f, b) => {
|
|
3083
|
+
var R;
|
|
3084
|
+
return /* @__PURE__ */ a.jsx(va, { children: (R = f.getHead) == null ? void 0 : R.call(f) }, b);
|
|
1994
3085
|
});
|
|
1995
|
-
return /* @__PURE__ */ a.jsxs(
|
|
1996
|
-
/* @__PURE__ */ a.jsx(
|
|
1997
|
-
/* @__PURE__ */ a.jsx(
|
|
3086
|
+
return /* @__PURE__ */ a.jsxs(_a, { client: Yn, children: [
|
|
3087
|
+
/* @__PURE__ */ a.jsx(Ot, { children: m }),
|
|
3088
|
+
/* @__PURE__ */ a.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(Cl, { context: v, children: /* @__PURE__ */ a.jsx(Ao, { components: r, children: /* @__PURE__ */ a.jsx(El, { children: /* @__PURE__ */ a.jsx(Sl, { value: n, children: /* @__PURE__ */ a.jsx(Ko, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(ua, { children: e ?? /* @__PURE__ */ a.jsx(jn, {}) }) }) }) }) }) }) })
|
|
1998
3089
|
] });
|
|
1999
|
-
},
|
|
2000
|
-
|
|
2001
|
-
const
|
|
3090
|
+
}, Dl = Un(Rl), vo = (e) => /* @__PURE__ */ a.jsx(Ss, { FallbackComponent: Os, children: /* @__PURE__ */ a.jsx(Dl, { ...e }) });
|
|
3091
|
+
vo.displayName = "DevPortal";
|
|
3092
|
+
const jl = ({
|
|
2002
3093
|
category: e,
|
|
2003
3094
|
level: t
|
|
2004
3095
|
}) => {
|
|
2005
|
-
var
|
|
2006
|
-
const n =
|
|
2007
|
-
|
|
2008
|
-
r &&
|
|
3096
|
+
var d;
|
|
3097
|
+
const n = Kn(), r = ko(e), [o, s] = He(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [v, m] = He(u);
|
|
3098
|
+
xe(() => {
|
|
3099
|
+
r && m(!0);
|
|
2009
3100
|
}, [r]);
|
|
2010
|
-
const
|
|
3101
|
+
const c = i && /* @__PURE__ */ a.jsx(
|
|
2011
3102
|
"button",
|
|
2012
3103
|
{
|
|
2013
3104
|
type: "button",
|
|
2014
|
-
onClick: (
|
|
2015
|
-
|
|
3105
|
+
onClick: (f) => {
|
|
3106
|
+
f.preventDefault(), m((b) => !b), s(!0);
|
|
2016
3107
|
},
|
|
2017
3108
|
children: /* @__PURE__ */ a.jsx(
|
|
2018
|
-
|
|
3109
|
+
Vn,
|
|
2019
3110
|
{
|
|
2020
3111
|
size: 16,
|
|
2021
|
-
className:
|
|
3112
|
+
className: A(
|
|
2022
3113
|
o && "transition",
|
|
2023
3114
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
2024
3115
|
)
|
|
@@ -2027,63 +3118,63 @@ const Ss = ({
|
|
|
2027
3118
|
}
|
|
2028
3119
|
);
|
|
2029
3120
|
return /* @__PURE__ */ a.jsxs(
|
|
2030
|
-
|
|
3121
|
+
ya,
|
|
2031
3122
|
{
|
|
2032
|
-
className:
|
|
2033
|
-
defaultOpen:
|
|
3123
|
+
className: A("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
|
|
3124
|
+
defaultOpen: u,
|
|
2034
3125
|
open: v,
|
|
2035
|
-
onOpenChange: () =>
|
|
3126
|
+
onOpenChange: () => m(!0),
|
|
2036
3127
|
children: [
|
|
2037
3128
|
/* @__PURE__ */ a.jsx(
|
|
2038
|
-
|
|
3129
|
+
ba,
|
|
2039
3130
|
{
|
|
2040
|
-
className:
|
|
3131
|
+
className: A(
|
|
2041
3132
|
"group text-start",
|
|
2042
|
-
|
|
3133
|
+
Ge({ isActive: !1, isTopLevel: t === 0 }),
|
|
2043
3134
|
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
2044
3135
|
),
|
|
2045
3136
|
asChild: !0,
|
|
2046
3137
|
disabled: !i,
|
|
2047
|
-
children: ((
|
|
3138
|
+
children: ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ a.jsx(We, { to: Ht(n == null ? void 0 : n.id, e.link.id), children: ({ isActive: f }) => /* @__PURE__ */ a.jsxs(
|
|
2048
3139
|
"div",
|
|
2049
3140
|
{
|
|
2050
|
-
className:
|
|
3141
|
+
className: A(
|
|
2051
3142
|
"flex items-center gap-2 justify-between w-full",
|
|
2052
|
-
|
|
3143
|
+
f ? "text-primary font-medium" : "text-foreground/80"
|
|
2053
3144
|
),
|
|
2054
3145
|
children: [
|
|
2055
3146
|
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
|
|
2056
|
-
|
|
3147
|
+
c
|
|
2057
3148
|
]
|
|
2058
3149
|
}
|
|
2059
3150
|
) }) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
2060
3151
|
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
2061
|
-
|
|
3152
|
+
c
|
|
2062
3153
|
] })
|
|
2063
3154
|
}
|
|
2064
3155
|
),
|
|
2065
3156
|
/* @__PURE__ */ a.jsx(
|
|
2066
|
-
|
|
3157
|
+
Ma,
|
|
2067
3158
|
{
|
|
2068
|
-
className:
|
|
3159
|
+
className: A(
|
|
2069
3160
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
2070
3161
|
o && "CollapsibleContent",
|
|
2071
3162
|
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
2072
3163
|
),
|
|
2073
|
-
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((
|
|
2074
|
-
|
|
3164
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((f) => /* @__PURE__ */ a.jsx(
|
|
3165
|
+
_t,
|
|
2075
3166
|
{
|
|
2076
3167
|
level: t + 1,
|
|
2077
|
-
item:
|
|
3168
|
+
item: f
|
|
2078
3169
|
},
|
|
2079
|
-
("id" in
|
|
3170
|
+
("id" in f ? f.id : "") + ("href" in f ? f.href : "") + f.label
|
|
2080
3171
|
)) })
|
|
2081
3172
|
}
|
|
2082
3173
|
)
|
|
2083
3174
|
]
|
|
2084
3175
|
}
|
|
2085
3176
|
);
|
|
2086
|
-
},
|
|
3177
|
+
}, Ge = da(
|
|
2087
3178
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
2088
3179
|
{
|
|
2089
3180
|
variants: {
|
|
@@ -2100,49 +3191,49 @@ const Ss = ({
|
|
|
2100
3191
|
}
|
|
2101
3192
|
}
|
|
2102
3193
|
}
|
|
2103
|
-
),
|
|
3194
|
+
), wo = "data-anchor", _t = ({
|
|
2104
3195
|
item: e,
|
|
2105
3196
|
level: t = 0
|
|
2106
3197
|
}) => {
|
|
2107
|
-
const n =
|
|
3198
|
+
const n = Kn(), { activeAnchor: r } = $t(), [o] = zo();
|
|
2108
3199
|
switch (e.type) {
|
|
2109
3200
|
case "category":
|
|
2110
|
-
return /* @__PURE__ */ a.jsx(
|
|
3201
|
+
return /* @__PURE__ */ a.jsx(jl, { category: e, level: t });
|
|
2111
3202
|
case "doc":
|
|
2112
3203
|
return /* @__PURE__ */ a.jsx(
|
|
2113
|
-
|
|
3204
|
+
We,
|
|
2114
3205
|
{
|
|
2115
|
-
className: ({ isActive: s }) =>
|
|
2116
|
-
to:
|
|
3206
|
+
className: ({ isActive: s }) => Ge({ isActive: s, isTopLevel: t === 0 }),
|
|
3207
|
+
to: Ht(n == null ? void 0 : n.id, e.id),
|
|
2117
3208
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2118
3209
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
2119
|
-
/* @__PURE__ */ a.jsx(
|
|
3210
|
+
/* @__PURE__ */ a.jsx(Mt, { ...e.badge })
|
|
2120
3211
|
] }) : e.label
|
|
2121
3212
|
}
|
|
2122
3213
|
);
|
|
2123
3214
|
case "link":
|
|
2124
3215
|
return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
2125
|
-
|
|
3216
|
+
$o,
|
|
2126
3217
|
{
|
|
2127
3218
|
to: { hash: e.href, search: o.toString() },
|
|
2128
|
-
[
|
|
2129
|
-
className:
|
|
3219
|
+
[wo]: e.href.slice(1),
|
|
3220
|
+
className: A(
|
|
2130
3221
|
"flex gap-2.5 justify-between",
|
|
2131
3222
|
t === 0 && "-mx-[--padding-nav-item]",
|
|
2132
|
-
|
|
3223
|
+
Ge({
|
|
2133
3224
|
isActive: e.href.slice(1) === r
|
|
2134
3225
|
})
|
|
2135
3226
|
),
|
|
2136
3227
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2137
3228
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
2138
|
-
/* @__PURE__ */ a.jsx(
|
|
3229
|
+
/* @__PURE__ */ a.jsx(Mt, { ...e.badge })
|
|
2139
3230
|
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
|
|
2140
3231
|
}
|
|
2141
3232
|
) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
2142
3233
|
"a",
|
|
2143
3234
|
{
|
|
2144
|
-
className:
|
|
2145
|
-
|
|
3235
|
+
className: A(
|
|
3236
|
+
Ge({ isTopLevel: t === 0 }),
|
|
2146
3237
|
"block"
|
|
2147
3238
|
),
|
|
2148
3239
|
href: e.href,
|
|
@@ -2152,33 +3243,33 @@ const Ss = ({
|
|
|
2152
3243
|
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
2153
3244
|
/* @__PURE__ */ a.jsxs("span", { className: "whitespace-nowrap", children: [
|
|
2154
3245
|
" ",
|
|
2155
|
-
/* @__PURE__ */ a.jsx(
|
|
3246
|
+
/* @__PURE__ */ a.jsx(Va, { className: "inline ml-1", size: 12 })
|
|
2156
3247
|
] })
|
|
2157
3248
|
]
|
|
2158
3249
|
}
|
|
2159
3250
|
) : /* @__PURE__ */ a.jsx(
|
|
2160
|
-
|
|
3251
|
+
We,
|
|
2161
3252
|
{
|
|
2162
|
-
className:
|
|
3253
|
+
className: A("flex gap-2.5 justify-between", Ge()),
|
|
2163
3254
|
to: e.href,
|
|
2164
3255
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2165
3256
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
2166
|
-
/* @__PURE__ */ a.jsx(
|
|
3257
|
+
/* @__PURE__ */ a.jsx(Mt, { ...e.badge })
|
|
2167
3258
|
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
|
|
2168
3259
|
}
|
|
2169
3260
|
);
|
|
2170
3261
|
}
|
|
2171
|
-
},
|
|
3262
|
+
}, Nl = (e, t = { block: "center" }) => {
|
|
2172
3263
|
if (!e) return;
|
|
2173
3264
|
const n = e.getBoundingClientRect();
|
|
2174
3265
|
n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
2175
|
-
},
|
|
2176
|
-
const e =
|
|
2177
|
-
|
|
3266
|
+
}, Pl = () => {
|
|
3267
|
+
const e = At(), { setActiveAnchor: t } = $t();
|
|
3268
|
+
xe(() => {
|
|
2178
3269
|
if (!e.hash) return;
|
|
2179
3270
|
const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
|
|
2180
|
-
const o = document.getElementById(n), s = document.querySelector(`[${
|
|
2181
|
-
return o ? (o.scrollIntoView(),
|
|
3271
|
+
const o = document.getElementById(n), s = document.querySelector(`[${wo}="${n}"]`);
|
|
3272
|
+
return o ? (o.scrollIntoView(), Nl(s), requestIdleCallback(() => t(n)), !0) : !1;
|
|
2182
3273
|
};
|
|
2183
3274
|
if (!r()) {
|
|
2184
3275
|
const o = new MutationObserver((s, i) => {
|
|
@@ -2187,16 +3278,16 @@ const Ss = ({
|
|
|
2187
3278
|
return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
|
|
2188
3279
|
}
|
|
2189
3280
|
}, [e.hash, t]);
|
|
2190
|
-
},
|
|
2191
|
-
const e =
|
|
2192
|
-
|
|
3281
|
+
}, Tl = () => {
|
|
3282
|
+
const e = At(), t = Lt(e.pathname);
|
|
3283
|
+
xe(() => {
|
|
2193
3284
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
2194
3285
|
}, [e.pathname]);
|
|
2195
|
-
},
|
|
3286
|
+
}, xo = wa(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
|
|
2196
3287
|
"nav",
|
|
2197
3288
|
{
|
|
2198
3289
|
"data-navigation": String(n),
|
|
2199
|
-
className:
|
|
3290
|
+
className: A(
|
|
2200
3291
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
2201
3292
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
2202
3293
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
@@ -2206,47 +3297,73 @@ const Ss = ({
|
|
|
2206
3297
|
children: e
|
|
2207
3298
|
}
|
|
2208
3299
|
));
|
|
2209
|
-
|
|
2210
|
-
const
|
|
2211
|
-
const e =
|
|
2212
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
3300
|
+
xo.displayName = "SidebarWrapper";
|
|
3301
|
+
const _l = () => {
|
|
3302
|
+
const e = Lt(null), t = Oa();
|
|
3303
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3304
|
+
/* @__PURE__ */ a.jsxs(
|
|
3305
|
+
xo,
|
|
3306
|
+
{
|
|
3307
|
+
ref: e,
|
|
3308
|
+
pushMainContent: t.data.items.length > 0,
|
|
3309
|
+
children: [
|
|
3310
|
+
/* @__PURE__ */ a.jsx(Te, { name: "zudoku-before-navigation" }),
|
|
3311
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(_t, { item: n }, n.label)),
|
|
3312
|
+
/* @__PURE__ */ a.jsx(Te, { name: "zudoku-after-navigation" })
|
|
3313
|
+
]
|
|
3314
|
+
}
|
|
3315
|
+
),
|
|
3316
|
+
/* @__PURE__ */ a.jsxs(
|
|
3317
|
+
Zt,
|
|
3318
|
+
{
|
|
3319
|
+
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
3320
|
+
"aria-describedby": void 0,
|
|
3321
|
+
children: [
|
|
3322
|
+
/* @__PURE__ */ a.jsx(An, { children: /* @__PURE__ */ a.jsx(en, { children: "Sidebar" }) }),
|
|
3323
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(_t, { item: n }, n.label))
|
|
3324
|
+
]
|
|
3325
|
+
}
|
|
3326
|
+
)
|
|
3327
|
+
] });
|
|
3328
|
+
}, Ol = ({ children: e }) => {
|
|
3329
|
+
const t = At(), { setActiveAnchor: n } = $t(), { meta: r, authentication: o } = et();
|
|
3330
|
+
Pl(), Tl();
|
|
3331
|
+
const s = Lt(t.pathname);
|
|
3332
|
+
return xe(() => {
|
|
2229
3333
|
o != null && o.pageLoad && o.pageLoad();
|
|
2230
|
-
}, [o]),
|
|
3334
|
+
}, [o]), xe(() => {
|
|
2231
3335
|
t.pathname !== s.current && n(""), s.current = t.pathname;
|
|
2232
3336
|
}, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2233
3337
|
!1,
|
|
2234
|
-
/* @__PURE__ */ a.jsxs(
|
|
3338
|
+
/* @__PURE__ */ a.jsxs(Ot, { titleTemplate: r == null ? void 0 : r.title, children: [
|
|
2235
3339
|
(r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
|
|
2236
3340
|
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
|
|
2237
3341
|
] }),
|
|
2238
|
-
/* @__PURE__ */ a.jsx(
|
|
2239
|
-
/* @__PURE__ */ a.jsx(
|
|
2240
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.
|
|
2241
|
-
|
|
3342
|
+
/* @__PURE__ */ a.jsx(Te, { name: "layout-before-head" }),
|
|
3343
|
+
/* @__PURE__ */ a.jsx(mo, {}),
|
|
3344
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
3345
|
+
Hn,
|
|
2242
3346
|
{
|
|
2243
|
-
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-full place-items-center", children: /* @__PURE__ */ a.jsx(
|
|
2244
|
-
children: [
|
|
2245
|
-
/* @__PURE__ */ a.jsx(
|
|
3347
|
+
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-full place-items-center", children: /* @__PURE__ */ a.jsx(Ka, {}) }),
|
|
3348
|
+
children: /* @__PURE__ */ a.jsxs(Jt, { direction: "left", children: [
|
|
3349
|
+
/* @__PURE__ */ a.jsx(_l, {}),
|
|
3350
|
+
/* @__PURE__ */ a.jsx(
|
|
3351
|
+
"div",
|
|
3352
|
+
{
|
|
3353
|
+
className: A(
|
|
3354
|
+
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3355
|
+
"peer-data-[navigation=false]:hidden"
|
|
3356
|
+
),
|
|
3357
|
+
children: /* @__PURE__ */ a.jsxs(fo, { className: "flex items-center gap-2", children: [
|
|
3358
|
+
/* @__PURE__ */ a.jsx(Wa, { size: 16, strokeWidth: 1.5 }),
|
|
3359
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3360
|
+
] })
|
|
3361
|
+
}
|
|
3362
|
+
),
|
|
2246
3363
|
/* @__PURE__ */ a.jsxs(
|
|
2247
3364
|
"main",
|
|
2248
3365
|
{
|
|
2249
|
-
className:
|
|
3366
|
+
className: A(
|
|
2250
3367
|
"h-full dark:border-white/10 translate-x-0",
|
|
2251
3368
|
"lg:overflow-visible",
|
|
2252
3369
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -2254,28 +3371,28 @@ const Es = () => {
|
|
|
2254
3371
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
2255
3372
|
),
|
|
2256
3373
|
children: [
|
|
2257
|
-
/* @__PURE__ */ a.jsx(
|
|
2258
|
-
e ?? /* @__PURE__ */ a.jsx(
|
|
2259
|
-
/* @__PURE__ */ a.jsx(
|
|
3374
|
+
/* @__PURE__ */ a.jsx(Te, { name: "zudoku-before-content" }),
|
|
3375
|
+
e ?? /* @__PURE__ */ a.jsx(jn, {}),
|
|
3376
|
+
/* @__PURE__ */ a.jsx(Te, { name: "zudoku-after-content" })
|
|
2260
3377
|
]
|
|
2261
3378
|
}
|
|
2262
3379
|
)
|
|
2263
|
-
]
|
|
3380
|
+
] })
|
|
2264
3381
|
}
|
|
2265
3382
|
) })
|
|
2266
3383
|
] });
|
|
2267
|
-
},
|
|
3384
|
+
}, Yl = Lo, Xl = fa, Jl = vo, Zl = Ol, ec = It, tc = qo, nc = Ja, rc = ms, oc = gs, ac = Dt, sc = Ot;
|
|
2268
3385
|
export {
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
3386
|
+
rc as Bootstrap,
|
|
3387
|
+
oc as BootstrapStatic,
|
|
3388
|
+
ac as Button,
|
|
3389
|
+
Xl as Callout,
|
|
3390
|
+
Jl as DevPortal,
|
|
3391
|
+
sc as Head,
|
|
3392
|
+
Zl as Layout,
|
|
3393
|
+
ec as Link,
|
|
3394
|
+
tc as RouterError,
|
|
3395
|
+
nc as ServerError,
|
|
3396
|
+
Yl as useMDXComponents
|
|
2280
3397
|
};
|
|
2281
3398
|
//# sourceMappingURL=zudoku.components.js.map
|