fiboui 2.2.0 → 2.2.3
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/README.md +1 -1
- package/dist/{FineGrain-6w615KQw.js → FineGrain-BEvB51B2.js} +1 -1
- package/dist/Link-ElmaMZB8.js +89 -0
- package/dist/{Router-i6Nc6qVs.js → Router-BwbaHooU.js} +139 -127
- package/dist/{builder-KLTu7nAI.js → builder-3Bc2PfP9.js} +597 -558
- package/dist/content.js +3 -3
- package/dist/core.js +46 -43
- package/dist/{index-DhPBYTPt.js → index-BObp1JkM.js} +27 -20
- package/dist/{index-CYnY7jAX.js → index-BlciuWzU.js} +5 -4
- package/dist/{index-ijbJR6lD.js → index-CZQ5erLU.js} +7 -6
- package/dist/{index-BN2z9MuJ.js → index-Cae2Rtx1.js} +12 -12
- package/dist/{index-CdJvNseK.js → index-CxbrZGXa.js} +116 -113
- package/dist/{index-DU2MC5u3.js → index-DbjaknWm.js} +117 -93
- package/dist/{index-CbTvwN9K.js → index-DgRpEUs0.js} +4 -4
- package/dist/index.d.ts +51 -8
- package/dist/index.js +556 -493
- package/dist/interactive.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/mount-D59e1COl.js +358 -0
- package/dist/navigation.js +2 -2
- package/dist/{provider-B0eB-Wy7.js → provider-CihtUuRx.js} +48 -32
- package/dist/structure.js +2 -2
- package/dist/style.css +1 -1
- package/dist/theme.js +1 -1
- package/package.json +2 -1
- package/dist/Link-DDzSPY1Q.js +0 -88
- package/dist/mount-D5gt_GWO.js +0 -331
package/README.md
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as x, useContext as p } from "react";
|
|
4
|
+
const v = x(null);
|
|
5
|
+
function o() {
|
|
6
|
+
const t = p(v);
|
|
7
|
+
if (!t)
|
|
8
|
+
throw new Error("useRouter must be used within a Router");
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
function C() {
|
|
12
|
+
return p(v);
|
|
13
|
+
}
|
|
14
|
+
function R() {
|
|
15
|
+
const { navigate: t } = o();
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
function g() {
|
|
19
|
+
const { params: t } = o();
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function k() {
|
|
23
|
+
const { query: t } = o();
|
|
24
|
+
return t;
|
|
25
|
+
}
|
|
26
|
+
function L() {
|
|
27
|
+
var r;
|
|
28
|
+
const { currentPath: t, query: n, hash: a } = o(), e = ((r = n == null ? void 0 : n.toString) == null ? void 0 : r.call(n)) ?? "";
|
|
29
|
+
return {
|
|
30
|
+
pathname: t,
|
|
31
|
+
search: e ? `?${e}` : "",
|
|
32
|
+
hash: a ?? ""
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const $ = ({
|
|
36
|
+
to: t,
|
|
37
|
+
children: n,
|
|
38
|
+
replace: a = !1,
|
|
39
|
+
state: e,
|
|
40
|
+
className: r,
|
|
41
|
+
style: h,
|
|
42
|
+
onClick: i
|
|
43
|
+
}) => {
|
|
44
|
+
const f = R(), c = C(), u = t.startsWith("http") || t.startsWith("//") || t.startsWith("#") ? t : `${(c == null ? void 0 : c.basename) ?? ""}${t}`;
|
|
45
|
+
return /* @__PURE__ */ m(
|
|
46
|
+
"a",
|
|
47
|
+
{
|
|
48
|
+
href: u,
|
|
49
|
+
onClick: (s) => {
|
|
50
|
+
s.ctrlKey || s.metaKey || s.shiftKey || s.button !== 0 || (s.preventDefault(), i && i(s), f(t, { replace: a, state: e }));
|
|
51
|
+
},
|
|
52
|
+
className: r,
|
|
53
|
+
style: h,
|
|
54
|
+
children: n
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}, N = ({
|
|
58
|
+
to: t,
|
|
59
|
+
children: n,
|
|
60
|
+
className: a = "",
|
|
61
|
+
style: e = {},
|
|
62
|
+
activeClassName: r = "active",
|
|
63
|
+
activeStyle: h = {},
|
|
64
|
+
exact: i = !1,
|
|
65
|
+
...f
|
|
66
|
+
}) => {
|
|
67
|
+
const { currentPath: c } = o(), u = i ? c === t : c.startsWith(t), l = u ? `${a} ${r}`.trim() : a, s = u ? { ...e, ...h } : e;
|
|
68
|
+
return /* @__PURE__ */ m(
|
|
69
|
+
$,
|
|
70
|
+
{
|
|
71
|
+
to: t,
|
|
72
|
+
className: l,
|
|
73
|
+
style: s,
|
|
74
|
+
...f,
|
|
75
|
+
children: n
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
$ as L,
|
|
81
|
+
N,
|
|
82
|
+
v as R,
|
|
83
|
+
R as a,
|
|
84
|
+
g as b,
|
|
85
|
+
L as c,
|
|
86
|
+
k as d,
|
|
87
|
+
C as e,
|
|
88
|
+
o as u
|
|
89
|
+
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { jsxs as
|
|
6
|
-
import
|
|
7
|
-
import { R as
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
2
|
+
var A = Object.defineProperty;
|
|
3
|
+
var D = (e, o, r) => o in e ? A(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r;
|
|
4
|
+
var E = (e, o, r) => D(e, typeof o != "symbol" ? o + "" : o, r);
|
|
5
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
6
|
+
import F, { Component as I, useState as w, useCallback as b, useEffect as U, Suspense as G, createContext as N } from "react";
|
|
7
|
+
import { R as q } from "./Link-ElmaMZB8.js";
|
|
8
|
+
function O(e, o) {
|
|
9
|
+
const r = o.split("/").filter(Boolean), i = e.split("/").filter(Boolean);
|
|
10
|
+
if (r.length !== i.length)
|
|
11
11
|
return { match: !1, params: {} };
|
|
12
|
-
const
|
|
13
|
-
for (let
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
|
|
12
|
+
const n = {};
|
|
13
|
+
for (let a = 0; a < r.length; a++) {
|
|
14
|
+
const f = r[a], m = i[a];
|
|
15
|
+
if (f.startsWith(":")) {
|
|
16
|
+
const y = f.slice(1);
|
|
17
|
+
n[y] = m;
|
|
18
18
|
continue;
|
|
19
19
|
}
|
|
20
|
-
if (
|
|
20
|
+
if (f !== m)
|
|
21
21
|
return { match: !1, params: {} };
|
|
22
22
|
}
|
|
23
|
-
return { match: !0, params:
|
|
23
|
+
return { match: !0, params: n };
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
for (const
|
|
27
|
-
const { match:
|
|
28
|
-
if (
|
|
29
|
-
return { route:
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
25
|
+
function x(e, o) {
|
|
26
|
+
for (const r of e) {
|
|
27
|
+
const { match: i, params: n } = O(o, r.path);
|
|
28
|
+
if (i)
|
|
29
|
+
return { route: r, params: n };
|
|
30
|
+
if (r.children) {
|
|
31
|
+
const a = x(r.children, o);
|
|
32
|
+
if (a.route)
|
|
33
|
+
return a;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return { route: null, params: {} };
|
|
37
37
|
}
|
|
38
|
-
class
|
|
39
|
-
constructor(
|
|
40
|
-
super(
|
|
41
|
-
|
|
38
|
+
class Q extends I {
|
|
39
|
+
constructor(r) {
|
|
40
|
+
super(r);
|
|
41
|
+
E(this, "reset", () => {
|
|
42
42
|
this.setState({
|
|
43
43
|
hasError: !1,
|
|
44
44
|
error: null,
|
|
@@ -51,36 +51,36 @@ class F extends M {
|
|
|
51
51
|
errorInfo: null
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
static getDerivedStateFromError(
|
|
54
|
+
static getDerivedStateFromError(r) {
|
|
55
55
|
return {
|
|
56
56
|
hasError: !0,
|
|
57
|
-
error:
|
|
57
|
+
error: r
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
componentDidCatch(
|
|
61
|
-
var
|
|
62
|
-
console.error("RouteErrorBoundary caught error:",
|
|
63
|
-
errorInfo:
|
|
60
|
+
componentDidCatch(r, i) {
|
|
61
|
+
var n, a;
|
|
62
|
+
console.error("RouteErrorBoundary caught error:", r, i), (a = (n = this.props).onError) == null || a.call(n, r, i), this.setState({
|
|
63
|
+
errorInfo: i
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
67
|
if (this.state.hasError && this.state.error) {
|
|
68
|
-
const { fallback:
|
|
69
|
-
return typeof
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
68
|
+
const { fallback: r } = this.props;
|
|
69
|
+
return typeof r == "function" ? r(this.state.error, this.state.errorInfo) : r || /* @__PURE__ */ p("div", { style: { padding: "2rem", textAlign: "center" }, children: [
|
|
70
|
+
/* @__PURE__ */ t("h1", { children: "Something went wrong" }),
|
|
71
|
+
/* @__PURE__ */ t("p", { children: this.state.error.message })
|
|
72
72
|
] });
|
|
73
73
|
}
|
|
74
74
|
return this.props.children;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
const
|
|
77
|
+
const V = ({ error: e, onReset: o }) => {
|
|
78
|
+
const r = () => {
|
|
79
79
|
window.location.href = "/";
|
|
80
|
-
},
|
|
80
|
+
}, i = () => {
|
|
81
81
|
window.location.reload();
|
|
82
82
|
};
|
|
83
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ t(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
86
|
style: {
|
|
@@ -93,7 +93,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
93
93
|
backgroundColor: "#f9fafb",
|
|
94
94
|
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
95
95
|
},
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ p(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
style: {
|
|
@@ -106,7 +106,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
106
106
|
textAlign: "center"
|
|
107
107
|
},
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ t(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
112
|
style: {
|
|
@@ -119,7 +119,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
119
119
|
alignItems: "center",
|
|
120
120
|
justifyContent: "center"
|
|
121
121
|
},
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ p(
|
|
123
123
|
"svg",
|
|
124
124
|
{
|
|
125
125
|
width: "32",
|
|
@@ -131,15 +131,15 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
131
131
|
strokeLinecap: "round",
|
|
132
132
|
strokeLinejoin: "round",
|
|
133
133
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
135
|
+
/* @__PURE__ */ t("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
136
|
+
/* @__PURE__ */ t("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
137
137
|
]
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ t(
|
|
143
143
|
"h1",
|
|
144
144
|
{
|
|
145
145
|
style: {
|
|
@@ -151,7 +151,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
151
151
|
children: "Oops! Something went wrong"
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
|
|
154
|
+
e && /* @__PURE__ */ t(
|
|
155
155
|
"div",
|
|
156
156
|
{
|
|
157
157
|
style: {
|
|
@@ -161,7 +161,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
161
161
|
borderRadius: "8px",
|
|
162
162
|
border: "1px solid #fecaca"
|
|
163
163
|
},
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ t(
|
|
165
165
|
"p",
|
|
166
166
|
{
|
|
167
167
|
style: {
|
|
@@ -171,12 +171,12 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
171
171
|
margin: 0,
|
|
172
172
|
wordBreak: "break-word"
|
|
173
173
|
},
|
|
174
|
-
children:
|
|
174
|
+
children: e.message
|
|
175
175
|
}
|
|
176
176
|
)
|
|
177
177
|
}
|
|
178
178
|
),
|
|
179
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ t(
|
|
180
180
|
"p",
|
|
181
181
|
{
|
|
182
182
|
style: {
|
|
@@ -188,7 +188,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
188
188
|
children: "We're sorry for the inconvenience. Please try one of the options below."
|
|
189
189
|
}
|
|
190
190
|
),
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ p(
|
|
192
192
|
"div",
|
|
193
193
|
{
|
|
194
194
|
style: {
|
|
@@ -198,10 +198,10 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
198
198
|
flexWrap: "wrap"
|
|
199
199
|
},
|
|
200
200
|
children: [
|
|
201
|
-
|
|
201
|
+
o && /* @__PURE__ */ t(
|
|
202
202
|
"button",
|
|
203
203
|
{
|
|
204
|
-
onClick:
|
|
204
|
+
onClick: o,
|
|
205
205
|
style: {
|
|
206
206
|
padding: "0.75rem 1.5rem",
|
|
207
207
|
backgroundColor: "#3b82f6",
|
|
@@ -213,19 +213,19 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
213
213
|
cursor: "pointer",
|
|
214
214
|
transition: "background-color 0.2s"
|
|
215
215
|
},
|
|
216
|
-
onMouseEnter: (
|
|
217
|
-
|
|
216
|
+
onMouseEnter: (n) => {
|
|
217
|
+
n.currentTarget.style.backgroundColor = "#2563eb";
|
|
218
218
|
},
|
|
219
|
-
onMouseLeave: (
|
|
220
|
-
|
|
219
|
+
onMouseLeave: (n) => {
|
|
220
|
+
n.currentTarget.style.backgroundColor = "#3b82f6";
|
|
221
221
|
},
|
|
222
222
|
children: "Try Again"
|
|
223
223
|
}
|
|
224
224
|
),
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ t(
|
|
226
226
|
"button",
|
|
227
227
|
{
|
|
228
|
-
onClick:
|
|
228
|
+
onClick: i,
|
|
229
229
|
style: {
|
|
230
230
|
padding: "0.75rem 1.5rem",
|
|
231
231
|
backgroundColor: "#6b7280",
|
|
@@ -237,19 +237,19 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
237
237
|
cursor: "pointer",
|
|
238
238
|
transition: "background-color 0.2s"
|
|
239
239
|
},
|
|
240
|
-
onMouseEnter: (
|
|
241
|
-
|
|
240
|
+
onMouseEnter: (n) => {
|
|
241
|
+
n.currentTarget.style.backgroundColor = "#4b5563";
|
|
242
242
|
},
|
|
243
|
-
onMouseLeave: (
|
|
244
|
-
|
|
243
|
+
onMouseLeave: (n) => {
|
|
244
|
+
n.currentTarget.style.backgroundColor = "#6b7280";
|
|
245
245
|
},
|
|
246
246
|
children: "Reload Page"
|
|
247
247
|
}
|
|
248
248
|
),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ t(
|
|
250
250
|
"button",
|
|
251
251
|
{
|
|
252
|
-
onClick:
|
|
252
|
+
onClick: r,
|
|
253
253
|
style: {
|
|
254
254
|
padding: "0.75rem 1.5rem",
|
|
255
255
|
backgroundColor: "white",
|
|
@@ -261,11 +261,11 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
261
261
|
cursor: "pointer",
|
|
262
262
|
transition: "all 0.2s"
|
|
263
263
|
},
|
|
264
|
-
onMouseEnter: (
|
|
265
|
-
|
|
264
|
+
onMouseEnter: (n) => {
|
|
265
|
+
n.currentTarget.style.backgroundColor = "#f9fafb", n.currentTarget.style.borderColor = "#9ca3af";
|
|
266
266
|
},
|
|
267
|
-
onMouseLeave: (
|
|
268
|
-
|
|
267
|
+
onMouseLeave: (n) => {
|
|
268
|
+
n.currentTarget.style.backgroundColor = "white", n.currentTarget.style.borderColor = "#d1d5db";
|
|
269
269
|
},
|
|
270
270
|
children: "Go Home"
|
|
271
271
|
}
|
|
@@ -273,7 +273,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
273
273
|
]
|
|
274
274
|
}
|
|
275
275
|
),
|
|
276
|
-
(
|
|
276
|
+
(e == null ? void 0 : e.stack) && /* @__PURE__ */ p(
|
|
277
277
|
"details",
|
|
278
278
|
{
|
|
279
279
|
style: {
|
|
@@ -281,7 +281,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
281
281
|
textAlign: "left"
|
|
282
282
|
},
|
|
283
283
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ t(
|
|
285
285
|
"summary",
|
|
286
286
|
{
|
|
287
287
|
style: {
|
|
@@ -293,7 +293,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
293
293
|
children: "Stack Trace"
|
|
294
294
|
}
|
|
295
295
|
),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ t(
|
|
297
297
|
"pre",
|
|
298
298
|
{
|
|
299
299
|
style: {
|
|
@@ -306,7 +306,7 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
306
306
|
overflow: "auto",
|
|
307
307
|
maxHeight: "300px"
|
|
308
308
|
},
|
|
309
|
-
children:
|
|
309
|
+
children: e.stack
|
|
310
310
|
}
|
|
311
311
|
)
|
|
312
312
|
]
|
|
@@ -317,70 +317,82 @@ const I = ({ error: o, onReset: n }) => {
|
|
|
317
317
|
)
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
};
|
|
321
|
+
function T(e, o) {
|
|
322
|
+
return o && e.startsWith(o) ? e.slice(o.length) || "/" : e || "/";
|
|
323
|
+
}
|
|
324
|
+
function $(e) {
|
|
325
|
+
return e ? e.startsWith("?") ? e.slice(1) : e : "";
|
|
326
|
+
}
|
|
327
|
+
function J(e) {
|
|
328
|
+
return e ? e.startsWith("#") ? e : `#${e}` : "";
|
|
329
|
+
}
|
|
330
|
+
const K = N(null), ee = ({
|
|
331
|
+
routes: e,
|
|
332
|
+
fallback: o,
|
|
333
|
+
loading: r,
|
|
334
|
+
basename: i = "",
|
|
335
|
+
initialPath: n = "/",
|
|
336
|
+
initialSearch: a = "",
|
|
337
|
+
initialHash: f = "",
|
|
338
|
+
errorBoundary: m,
|
|
339
|
+
onError: y
|
|
327
340
|
}) => {
|
|
328
|
-
const [
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const d = await f.beforeLeave(l, f);
|
|
336
|
-
if (d === !1)
|
|
341
|
+
const [k, C] = w(() => T(n, i)), [W, v] = w(() => new URLSearchParams($(a))), [L, z] = w(() => J(f)), { route: h, params: B } = x(e, k), R = F.useRef(h);
|
|
342
|
+
R.current = h;
|
|
343
|
+
const g = b(async (s, d = {}) => {
|
|
344
|
+
const u = R.current, { route: c } = x(e, s);
|
|
345
|
+
if (u != null && u.beforeLeave && c) {
|
|
346
|
+
const l = await u.beforeLeave(c, u);
|
|
347
|
+
if (l === !1)
|
|
337
348
|
return;
|
|
338
|
-
if (typeof
|
|
339
|
-
return g(
|
|
349
|
+
if (typeof l == "string")
|
|
350
|
+
return g(l, d);
|
|
340
351
|
}
|
|
341
|
-
if (
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
352
|
+
if (c != null && c.beforeEnter) {
|
|
353
|
+
const l = await c.beforeEnter(c, u);
|
|
354
|
+
if (l === !1)
|
|
344
355
|
return;
|
|
345
|
-
typeof
|
|
356
|
+
typeof l == "string" && (s = l);
|
|
346
357
|
}
|
|
347
|
-
const
|
|
348
|
-
typeof window < "u" && (
|
|
349
|
-
}, [
|
|
358
|
+
const P = i + s;
|
|
359
|
+
typeof window < "u" && (d.replace ? window.history.replaceState(d.state || {}, "", P) : window.history.pushState(d.state || {}, "", P), v(new URLSearchParams(window.location.search))), C(s);
|
|
360
|
+
}, [i, e]), M = b(() => {
|
|
350
361
|
typeof window < "u" && window.history.back();
|
|
351
|
-
}, []),
|
|
362
|
+
}, []), j = b((s) => {
|
|
352
363
|
g(s, { replace: !0 });
|
|
353
364
|
}, [g]);
|
|
354
|
-
|
|
365
|
+
U(() => {
|
|
366
|
+
if (typeof window > "u") return;
|
|
355
367
|
const s = () => {
|
|
356
|
-
|
|
357
|
-
h(c), x(new URLSearchParams(window.location.search));
|
|
368
|
+
C(T(window.location.pathname, i)), v(new URLSearchParams(window.location.search)), z(window.location.hash || "");
|
|
358
369
|
};
|
|
359
|
-
return window.addEventListener("popstate", s), () => window.removeEventListener("popstate", s);
|
|
360
|
-
}, [
|
|
361
|
-
const
|
|
362
|
-
currentPath:
|
|
363
|
-
basename:
|
|
370
|
+
return s(), window.addEventListener("popstate", s), () => window.removeEventListener("popstate", s);
|
|
371
|
+
}, [i]);
|
|
372
|
+
const H = {
|
|
373
|
+
currentPath: k,
|
|
374
|
+
basename: i,
|
|
364
375
|
navigate: g,
|
|
365
|
-
goBack:
|
|
366
|
-
replace:
|
|
367
|
-
params:
|
|
368
|
-
query:
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
376
|
+
goBack: M,
|
|
377
|
+
replace: j,
|
|
378
|
+
params: B,
|
|
379
|
+
query: W,
|
|
380
|
+
hash: L
|
|
381
|
+
}, S = () => {
|
|
382
|
+
if (!h)
|
|
383
|
+
return o ? /* @__PURE__ */ t(o, {}) : /* @__PURE__ */ t("div", { children: "404 - Page Not Found" });
|
|
384
|
+
const s = h.component, d = /* @__PURE__ */ t(K.Provider, { value: h, children: /* @__PURE__ */ t(s, {}) });
|
|
385
|
+
return /* @__PURE__ */ t(
|
|
386
|
+
Q,
|
|
375
387
|
{
|
|
376
|
-
fallback:
|
|
377
|
-
onError:
|
|
378
|
-
children:
|
|
388
|
+
fallback: m || /* @__PURE__ */ t(V, {}),
|
|
389
|
+
onError: y,
|
|
390
|
+
children: d
|
|
379
391
|
}
|
|
380
392
|
);
|
|
381
393
|
};
|
|
382
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ t(q.Provider, { value: H, children: r ? /* @__PURE__ */ t(G, { fallback: r, children: S() }) : S() });
|
|
383
395
|
};
|
|
384
396
|
export {
|
|
385
|
-
|
|
397
|
+
ee as R
|
|
386
398
|
};
|