@burdenoff/microfe-devportal 2026.801.1 → 2026.801.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/AdminDevportalRoutes.js +14 -14
- package/dist/devportal/DevportalRoutes.js +115 -115
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/components/SectionNav.js +1 -0
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/components/TelemetryErrorBoundary.js +7 -7
- package/dist/devportal/pages/AnalyticsDashboardPage.js +41 -41
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +27 -27
- package/dist/devportal/pages/ApplicationDetailPage.js +929 -929
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +39 -39
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +55 -55
- package/dist/devportal/pages/EditApplicationPage.js +36 -36
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.js +40 -40
- package/dist/devportal/pages/InvitationDecisionPage.js +25 -25
- package/dist/devportal/pages/ListingPreviewPage.js +36 -36
- package/dist/devportal/pages/OAuthCallbackPage.js +10 -10
- package/dist/devportal/pages/OAuthClientDetailPage.js +27 -27
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +329 -329
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +181 -181
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.js +43 -43
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +65 -65
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +126 -126
- package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
- package/dist/devportal/pages/WebhookDetailPage.js +28 -28
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +47 -47
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/providers/DevportalProvider.js +12 -12
- package/package.json +1 -1
- package/dist/node_modules/react-router/dist/production/lib/components.js +0 -124
- package/dist/node_modules/react-router/dist/production/lib/components.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/context.js +0 -32
- package/dist/node_modules/react-router/dist/production/lib/context.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/dom.js +0 -83
- package/dist/node_modules/react-router/dist/production/lib/dom/dom.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/lib.js +0 -358
- package/dist/node_modules/react-router/dist/production/lib/dom/lib.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/components.js +0 -188
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/components.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/invariant.js +0 -8
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/invariant.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/links.js +0 -75
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/links.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/markup.js +0 -15
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/markup.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/routeModules.js +0 -18
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/routeModules.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/single-fetch.js +0 -10
- package/dist/node_modules/react-router/dist/production/lib/dom/ssr/single-fetch.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/errors.js +0 -19
- package/dist/node_modules/react-router/dist/production/lib/errors.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/hooks.js +0 -296
- package/dist/node_modules/react-router/dist/production/lib/hooks.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/router/history.js +0 -166
- package/dist/node_modules/react-router/dist/production/lib/router/history.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/router/router.js +0 -33
- package/dist/node_modules/react-router/dist/production/lib/router/router.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/router/url.js +0 -9
- package/dist/node_modules/react-router/dist/production/lib/router/url.js.map +0 -1
- package/dist/node_modules/react-router/dist/production/lib/router/utils.js +0 -236
- package/dist/node_modules/react-router/dist/production/lib/router/utils.js.map +0 -1
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { invariant as e, parsePath as t, warning as n } from "./router/history.js";
|
|
2
|
-
import { convertRouteMatchToUiMatch as r, getResolveToMatches as i, getRoutePattern as a, isBrowser as o, isRouteErrorResponse as s, joinPaths as c, matchRoutes as l, parseToInfo as u, resolveTo as d } from "./router/utils.js";
|
|
3
|
-
import { hasInvalidProtocol as f } from "./router/router.js";
|
|
4
|
-
import { DataRouterContext as p, DataRouterStateContext as m, LocationContext as h, NavigationContext as g, RSCRouterContext as _, RouteContext as v, RouteErrorContext as y } from "./context.js";
|
|
5
|
-
import { decodeRedirectErrorDigest as b, decodeRouteErrorResponseDigest as x } from "./errors.js";
|
|
6
|
-
import * as S from "react";
|
|
7
|
-
//#region node_modules/react-router/dist/production/lib/hooks.js
|
|
8
|
-
function C(t, { relative: n } = {}) {
|
|
9
|
-
e(w(), "useHref() may be used only in the context of a <Router> component.");
|
|
10
|
-
let { basename: r, navigator: i } = S.useContext(g), { hash: a, pathname: o, search: s } = M(t, { relative: n }), l = o;
|
|
11
|
-
return r !== "/" && (l = o === "/" ? r : c([r, o])), i.createHref({
|
|
12
|
-
pathname: l,
|
|
13
|
-
search: s,
|
|
14
|
-
hash: a
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function w() {
|
|
18
|
-
return S.useContext(h) != null;
|
|
19
|
-
}
|
|
20
|
-
function T() {
|
|
21
|
-
return e(w(), "useLocation() may be used only in the context of a <Router> component."), S.useContext(h).location;
|
|
22
|
-
}
|
|
23
|
-
var E = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
24
|
-
function D() {
|
|
25
|
-
let { isDataRoute: e } = S.useContext(v);
|
|
26
|
-
return e ? Z() : O();
|
|
27
|
-
}
|
|
28
|
-
function O() {
|
|
29
|
-
e(w(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
30
|
-
let t = S.useContext(p), { basename: r, navigator: a } = S.useContext(g), { matches: o } = S.useContext(v), { pathname: s } = T(), l = JSON.stringify(i(o)), u = S.useRef(!1);
|
|
31
|
-
return S.useLayoutEffect(() => {
|
|
32
|
-
u.current = !0;
|
|
33
|
-
}), S.useCallback((e, i = {}) => {
|
|
34
|
-
if (n(u.current, E), !u.current) return;
|
|
35
|
-
if (typeof e == "number") {
|
|
36
|
-
a.go(e);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
let o = d(e, JSON.parse(l), s, i.relative === "path");
|
|
40
|
-
t == null && r !== "/" && (o.pathname = o.pathname === "/" ? r : c([r, o.pathname])), (i.replace ? a.replace : a.push)(o, i.state, i);
|
|
41
|
-
}, [
|
|
42
|
-
r,
|
|
43
|
-
a,
|
|
44
|
-
l,
|
|
45
|
-
s,
|
|
46
|
-
t
|
|
47
|
-
]);
|
|
48
|
-
}
|
|
49
|
-
var k = S.createContext(null);
|
|
50
|
-
function A(e) {
|
|
51
|
-
let t = S.useContext(v).outlet;
|
|
52
|
-
return S.useMemo(() => t && /* @__PURE__ */ S.createElement(k.Provider, { value: e }, t), [t, e]);
|
|
53
|
-
}
|
|
54
|
-
function j() {
|
|
55
|
-
let { matches: e } = S.useContext(v);
|
|
56
|
-
return e[e.length - 1]?.params ?? {};
|
|
57
|
-
}
|
|
58
|
-
function M(e, { relative: t } = {}) {
|
|
59
|
-
let { matches: n } = S.useContext(v), { pathname: r } = T(), a = JSON.stringify(i(n));
|
|
60
|
-
return S.useMemo(() => d(e, JSON.parse(a), r, t === "path"), [
|
|
61
|
-
e,
|
|
62
|
-
a,
|
|
63
|
-
r,
|
|
64
|
-
t
|
|
65
|
-
]);
|
|
66
|
-
}
|
|
67
|
-
function N(e, t) {
|
|
68
|
-
return P(e, t);
|
|
69
|
-
}
|
|
70
|
-
function P(n, r, i) {
|
|
71
|
-
e(w(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
72
|
-
let { navigator: a } = S.useContext(g), { matches: o } = S.useContext(v), s = o[o.length - 1], u = s ? s.params : {};
|
|
73
|
-
s && s.pathname;
|
|
74
|
-
let d = s ? s.pathnameBase : "/";
|
|
75
|
-
s && s.route;
|
|
76
|
-
let f = T(), p;
|
|
77
|
-
if (r) {
|
|
78
|
-
let n = typeof r == "string" ? t(r) : r;
|
|
79
|
-
e(d === "/" || n.pathname?.startsWith(d), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${n.pathname}" was given in the \`location\` prop.`), p = n;
|
|
80
|
-
} else p = f;
|
|
81
|
-
let m = p.pathname || "/", _ = m;
|
|
82
|
-
if (d !== "/") {
|
|
83
|
-
let e = d.replace(/^\//, "").split("/");
|
|
84
|
-
_ = "/" + m.replace(/^\//, "").split("/").slice(e.length).join("/");
|
|
85
|
-
}
|
|
86
|
-
let y = i && i.state.matches.length ? i.state.matches.map((e) => Object.assign(e, { route: i.manifest[e.route.id] || e.route })) : l(n, { pathname: _ }), b = V(y && y.map((e) => Object.assign({}, e, {
|
|
87
|
-
params: Object.assign({}, u, e.params),
|
|
88
|
-
pathname: c([d, a.encodeLocation ? a.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
|
|
89
|
-
pathnameBase: e.pathnameBase === "/" ? d : c([d, a.encodeLocation ? a.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
|
|
90
|
-
})), o, i);
|
|
91
|
-
return r && b ? /* @__PURE__ */ S.createElement(h.Provider, { value: {
|
|
92
|
-
location: {
|
|
93
|
-
pathname: "/",
|
|
94
|
-
search: "",
|
|
95
|
-
hash: "",
|
|
96
|
-
state: null,
|
|
97
|
-
key: "default",
|
|
98
|
-
mask: void 0,
|
|
99
|
-
...p
|
|
100
|
-
},
|
|
101
|
-
navigationType: "POP"
|
|
102
|
-
} }, b) : b;
|
|
103
|
-
}
|
|
104
|
-
function F() {
|
|
105
|
-
let e = X(), t = s(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
|
|
106
|
-
return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ S.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ S.createElement("pre", { style: {
|
|
107
|
-
padding: "0.5rem",
|
|
108
|
-
backgroundColor: "rgba(200,200,200, 0.5)"
|
|
109
|
-
} }, n) : null, null);
|
|
110
|
-
}
|
|
111
|
-
var I = /* @__PURE__ */ S.createElement(F, null), L = class extends S.Component {
|
|
112
|
-
constructor(e) {
|
|
113
|
-
super(e), this.state = {
|
|
114
|
-
location: e.location,
|
|
115
|
-
revalidation: e.revalidation,
|
|
116
|
-
error: e.error
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
static contextType = _;
|
|
120
|
-
static getDerivedStateFromError(e) {
|
|
121
|
-
return { error: e };
|
|
122
|
-
}
|
|
123
|
-
static getDerivedStateFromProps(e, t) {
|
|
124
|
-
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
125
|
-
error: e.error,
|
|
126
|
-
location: e.location,
|
|
127
|
-
revalidation: e.revalidation
|
|
128
|
-
} : {
|
|
129
|
-
error: e.error === void 0 ? t.error : e.error,
|
|
130
|
-
location: t.location,
|
|
131
|
-
revalidation: e.revalidation || t.revalidation
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
componentDidCatch(e, t) {
|
|
135
|
-
this.props.onError ? this.props.onError(e, t) : console.error("React Router caught the following error during render", e);
|
|
136
|
-
}
|
|
137
|
-
render() {
|
|
138
|
-
let e = this.state.error;
|
|
139
|
-
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
140
|
-
let t = x(e.digest);
|
|
141
|
-
t && (e = t);
|
|
142
|
-
}
|
|
143
|
-
let t = e === void 0 ? this.props.children : /* @__PURE__ */ S.createElement(v.Provider, { value: this.props.routeContext }, /* @__PURE__ */ S.createElement(y.Provider, {
|
|
144
|
-
value: e,
|
|
145
|
-
children: this.props.component
|
|
146
|
-
}));
|
|
147
|
-
return this.context ? /* @__PURE__ */ S.createElement(z, { error: e }, t) : t;
|
|
148
|
-
}
|
|
149
|
-
}, R = /* @__PURE__ */ new WeakMap();
|
|
150
|
-
function z({ children: e, error: t }) {
|
|
151
|
-
let { basename: n } = S.useContext(g);
|
|
152
|
-
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
153
|
-
let e = b(t.digest);
|
|
154
|
-
if (e) {
|
|
155
|
-
let r = R.get(t);
|
|
156
|
-
if (r) throw r;
|
|
157
|
-
let i = u(e.location, n), a = i.absoluteURL || i.to;
|
|
158
|
-
if (f(a)) throw Error("Invalid redirect location");
|
|
159
|
-
if (o && !R.get(t)) if (i.isExternal || e.reloadDocument) window.location.href = a;
|
|
160
|
-
else {
|
|
161
|
-
let n = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(i.to, { replace: e.replace }));
|
|
162
|
-
throw R.set(t, n), n;
|
|
163
|
-
}
|
|
164
|
-
return /* @__PURE__ */ S.createElement("meta", {
|
|
165
|
-
httpEquiv: "refresh",
|
|
166
|
-
content: `0;url=${a}`
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return e;
|
|
171
|
-
}
|
|
172
|
-
function B({ routeContext: e, match: t, children: n }) {
|
|
173
|
-
let r = S.useContext(p);
|
|
174
|
-
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ S.createElement(v.Provider, { value: e }, n);
|
|
175
|
-
}
|
|
176
|
-
function V(t, n = [], r) {
|
|
177
|
-
let i = r?.state;
|
|
178
|
-
if (t == null) {
|
|
179
|
-
if (!i) return null;
|
|
180
|
-
if (i.errors) t = i.matches;
|
|
181
|
-
else if (n.length === 0 && !i.initialized && i.matches.length > 0) t = i.matches;
|
|
182
|
-
else return null;
|
|
183
|
-
}
|
|
184
|
-
let o = t, s = i?.errors;
|
|
185
|
-
if (s != null) {
|
|
186
|
-
let t = o.findIndex((e) => e.route.id && s?.[e.route.id] !== void 0);
|
|
187
|
-
e(t >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`), o = o.slice(0, Math.min(o.length, t + 1));
|
|
188
|
-
}
|
|
189
|
-
let c = !1, l = -1;
|
|
190
|
-
if (r && i) {
|
|
191
|
-
c = i.renderFallback;
|
|
192
|
-
for (let e = 0; e < o.length; e++) {
|
|
193
|
-
let t = o[e];
|
|
194
|
-
if ((t.route.HydrateFallback || t.route.hydrateFallbackElement) && (l = e), t.route.id) {
|
|
195
|
-
let { loaderData: e, errors: n } = i, a = t.route.loader && !e.hasOwnProperty(t.route.id) && (!n || n[t.route.id] === void 0);
|
|
196
|
-
if (t.route.lazy || a) {
|
|
197
|
-
r.isStatic && (c = !0), o = l >= 0 ? o.slice(0, l + 1) : [o[0]];
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
let u = r?.onError, d = i && u ? (e, t) => {
|
|
204
|
-
u(e, {
|
|
205
|
-
location: i.location,
|
|
206
|
-
params: i.matches?.[0]?.params ?? {},
|
|
207
|
-
pattern: a(i.matches),
|
|
208
|
-
errorInfo: t
|
|
209
|
-
});
|
|
210
|
-
} : void 0;
|
|
211
|
-
return o.reduceRight((e, t, r) => {
|
|
212
|
-
let a, u = !1, f = null, p = null;
|
|
213
|
-
i && (a = s && t.route.id ? s[t.route.id] : void 0, f = t.route.errorElement || I, c && (l < 0 && r === 0 ? ($("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), u = !0, p = null) : l === r && (u = !0, p = t.route.hydrateFallbackElement || null)));
|
|
214
|
-
let m = n.concat(o.slice(0, r + 1)), h = () => {
|
|
215
|
-
let n;
|
|
216
|
-
return n = a ? f : u ? p : t.route.Component ? /* @__PURE__ */ S.createElement(t.route.Component, null) : t.route.element ? t.route.element : e, /* @__PURE__ */ S.createElement(B, {
|
|
217
|
-
match: t,
|
|
218
|
-
routeContext: {
|
|
219
|
-
outlet: e,
|
|
220
|
-
matches: m,
|
|
221
|
-
isDataRoute: i != null
|
|
222
|
-
},
|
|
223
|
-
children: n
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
return i && (t.route.ErrorBoundary || t.route.errorElement || r === 0) ? /* @__PURE__ */ S.createElement(L, {
|
|
227
|
-
location: i.location,
|
|
228
|
-
revalidation: i.revalidation,
|
|
229
|
-
component: f,
|
|
230
|
-
error: a,
|
|
231
|
-
children: h(),
|
|
232
|
-
routeContext: {
|
|
233
|
-
outlet: null,
|
|
234
|
-
matches: m,
|
|
235
|
-
isDataRoute: !0
|
|
236
|
-
},
|
|
237
|
-
onError: d
|
|
238
|
-
}) : h();
|
|
239
|
-
}, null);
|
|
240
|
-
}
|
|
241
|
-
function H(e) {
|
|
242
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
243
|
-
}
|
|
244
|
-
function U(t) {
|
|
245
|
-
let n = S.useContext(p);
|
|
246
|
-
return e(n, H(t)), n;
|
|
247
|
-
}
|
|
248
|
-
function W(t) {
|
|
249
|
-
let n = S.useContext(m);
|
|
250
|
-
return e(n, H(t)), n;
|
|
251
|
-
}
|
|
252
|
-
function G(t) {
|
|
253
|
-
let n = S.useContext(v);
|
|
254
|
-
return e(n, H(t)), n;
|
|
255
|
-
}
|
|
256
|
-
function K(t) {
|
|
257
|
-
let n = G(t), r = n.matches[n.matches.length - 1];
|
|
258
|
-
return e(r.route.id, `${t} can only be used on routes that contain a unique "id"`), r.route.id;
|
|
259
|
-
}
|
|
260
|
-
function q() {
|
|
261
|
-
return K("useRouteId");
|
|
262
|
-
}
|
|
263
|
-
function J() {
|
|
264
|
-
let e = W("useNavigation");
|
|
265
|
-
return S.useMemo(() => {
|
|
266
|
-
let { matches: t, historyAction: n, ...r } = e.navigation;
|
|
267
|
-
return r;
|
|
268
|
-
}, [e.navigation]);
|
|
269
|
-
}
|
|
270
|
-
function Y() {
|
|
271
|
-
let { matches: e, loaderData: t } = W("useMatches");
|
|
272
|
-
return S.useMemo(() => e.map((e) => r(e, t)), [e, t]);
|
|
273
|
-
}
|
|
274
|
-
function X() {
|
|
275
|
-
let e = S.useContext(y), t = W("useRouteError"), n = K("useRouteError");
|
|
276
|
-
return e === void 0 ? t.errors?.[n] : e;
|
|
277
|
-
}
|
|
278
|
-
function Z() {
|
|
279
|
-
let { router: e } = U("useNavigate"), t = K("useNavigate"), r = S.useRef(!1);
|
|
280
|
-
return S.useLayoutEffect(() => {
|
|
281
|
-
r.current = !0;
|
|
282
|
-
}), S.useCallback(async (i, a = {}) => {
|
|
283
|
-
n(r.current, E), r.current && (typeof i == "number" ? await e.navigate(i) : await e.navigate(i, {
|
|
284
|
-
fromRouteId: t,
|
|
285
|
-
...a
|
|
286
|
-
}));
|
|
287
|
-
}, [e, t]);
|
|
288
|
-
}
|
|
289
|
-
var Q = {};
|
|
290
|
-
function $(e, t, r) {
|
|
291
|
-
!t && !Q[e] && (Q[e] = !0, n(!1, r));
|
|
292
|
-
}
|
|
293
|
-
//#endregion
|
|
294
|
-
export { C as useHref, w as useInRouterContext, T as useLocation, Y as useMatches, D as useNavigate, J as useNavigation, A as useOutlet, j as useParams, M as useResolvedPath, q as useRouteId, N as useRoutes, P as useRoutesImpl };
|
|
295
|
-
|
|
296
|
-
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","names":[],"sources":["../../../../../../node_modules/react-router/dist/production/lib/hooks.js"],"sourcesContent":["/**\n * react-router v8.3.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { invariant, parsePath, warning } from \"./router/history.js\";\nimport { convertRouteMatchToUiMatch, decodePath, getResolveToMatches, getRoutePattern, isBrowser, isRouteErrorResponse, joinPaths, matchPath, matchRoutes, parseToInfo, resolveTo, stripBasename } from \"./router/utils.js\";\nimport { IDLE_BLOCKER, hasInvalidProtocol } from \"./router/router.js\";\nimport { AwaitContext, DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RSCRouterContext, RouteContext, RouteErrorContext } from \"./context.js\";\nimport { decodeRedirectErrorDigest, decodeRouteErrorResponseDigest } from \"./errors.js\";\nimport * as React$1 from \"react\";\n//#region lib/hooks.tsx\n/**\n* Resolves a URL against the current {@link Location}.\n*\n* @example\n* import { useHref } from \"react-router\";\n*\n* function SomeComponent() {\n* let href = useHref(\"some/where\");\n* // \"/resolved/some/where\"\n* }\n*\n* @public\n* @category Hooks\n* @param to The path to resolve\n* @param options Options\n* @param options.relative Defaults to `\"route\"` so routing is relative to the\n* route tree.\n* Set to `\"path\"` to make relative routing operate against path segments.\n* @returns The resolved href string\n*/\nfunction useHref(to, { relative } = {}) {\n\tinvariant(useInRouterContext(), `useHref() may be used only in the context of a <Router> component.`);\n\tlet { basename, navigator } = React$1.useContext(NavigationContext);\n\tlet { hash, pathname, search } = useResolvedPath(to, { relative });\n\tlet joinedPathname = pathname;\n\tif (basename !== \"/\") joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n\treturn navigator.createHref({\n\t\tpathname: joinedPathname,\n\t\tsearch,\n\t\thash\n\t});\n}\n/**\n* Returns `true` if this component is a descendant of a {@link Router}, useful\n* to ensure a component is used within a {@link Router}.\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns Whether the component is within a {@link Router} context\n*/\nfunction useInRouterContext() {\n\treturn React$1.useContext(LocationContext) != null;\n}\n/**\n* Returns the current {@link Location}. This can be useful if you'd like to\n* perform some side effect whenever it changes.\n*\n* @example\n* import * as React from 'react'\n* import { useLocation } from 'react-router'\n*\n* function SomeComponent() {\n* let location = useLocation()\n*\n* React.useEffect(() => {\n* // Google Analytics\n* ga('send', 'pageview')\n* }, [location]);\n*\n* return (\n* // ...\n* );\n* }\n*\n* @public\n* @category Hooks\n* @returns The current {@link Location} object\n*/\nfunction useLocation() {\n\tinvariant(useInRouterContext(), `useLocation() may be used only in the context of a <Router> component.`);\n\treturn React$1.useContext(LocationContext).location;\n}\n/**\n* Returns the current {@link Navigation} action which describes how the router\n* came to the current {@link Location}, either by a pop, push, or replace on\n* the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack.\n*\n* @public\n* @category Hooks\n* @returns The current {@link NavigationType} (`\"POP\"`, `\"PUSH\"`, or `\"REPLACE\"`)\n*/\nfunction useNavigationType() {\n\treturn React$1.useContext(LocationContext).navigationType;\n}\n/**\n* Returns a {@link PathMatch} object if the given pattern matches the current URL.\n* This is useful for components that need to know \"active\" state, e.g.\n* {@link NavLink | `<NavLink>`}.\n*\n* @public\n* @category Hooks\n* @param pattern The pattern to match against the current {@link Location}\n* @returns The path match object if the pattern matches, `null` otherwise\n*/\nfunction useMatch(pattern) {\n\tinvariant(useInRouterContext(), `useMatch() may be used only in the context of a <Router> component.`);\n\tlet { pathname } = useLocation();\n\treturn React$1.useMemo(() => matchPath(pattern, decodePath(pathname)), [pathname, pattern]);\n}\nconst navigateEffectWarning = \"You should call navigate() in a React.useEffect(), not when your component is first rendered.\";\n/**\n* Returns a function that lets you navigate programmatically in the browser in\n* response to user interactions or effects.\n*\n* It's often better to use {@link redirect} in [`action`](../../start/framework/route-module#action)/[`loader`](../../start/framework/route-module#loader)\n* functions than this hook.\n*\n* The returned function signature is `navigate(to, options?)`/`navigate(delta)` where:\n*\n* * `to` can be a string path, a {@link To} object, or a number (delta)\n* * `options` contains options for modifying the navigation\n* * These options work in all modes (Framework, Data, and Declarative):\n* * `relative`: `\"route\"` or `\"path\"` to control relative routing logic\n* * `replace`: Replace the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack\n* * `state`: Optional [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state) to include with the new {@link Location}\n* * These options only work in Framework and Data modes:\n* * `flushSync`: Wrap the DOM updates in [`ReactDom.flushSync`](https://react.dev/reference/react-dom/flushSync)\n* * `preventScrollReset`: Do not scroll back to the top of the page after navigation\n* * `viewTransition`: Enable [`document.startViewTransition`](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) for this navigation\n*\n* @example\n* import { useNavigate } from \"react-router\";\n*\n* function SomeComponent() {\n* let navigate = useNavigate();\n* return (\n* <button onClick={() => navigate(-1)}>\n* Go Back\n* </button>\n* );\n* }\n*\n* @additionalExamples\n* ### Navigate to another path\n*\n* ```tsx\n* navigate(\"/some/route\");\n* navigate(\"/some/route?search=param\");\n* ```\n*\n* ### Navigate with a {@link To} object\n*\n* All properties are optional.\n*\n* ```tsx\n* navigate(\n* {\n* pathname: \"/some/route\",\n* search: \"?search=param\",\n* hash: \"#hash\",\n* },\n* {\n* state: { some: \"state\" },\n* },\n* );\n* ```\n*\n* If you use `state`, that will be available on the {@link Location} object on\n* the next page. Access it with `useLocation().state` (see {@link useLocation}).\n*\n* ### Navigate back or forward in the history stack\n*\n* ```tsx\n* // back\n* // often used to close modals\n* navigate(-1);\n*\n* // forward\n* // often used in a multistep wizard workflows\n* navigate(1);\n* ```\n*\n* Be cautious with `navigate(number)`. If your application can load up to a\n* route that has a button that tries to navigate forward/back, there may not be\n* a [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* entry to go back or forward to, or it can go somewhere you don't expect\n* (like a different domain).\n*\n* Only use this if you're sure they will have an entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack to navigate to.\n*\n* ### Replace the current entry in the history stack\n*\n* This will remove the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History)\n* stack, replacing it with a new one, similar to a server side redirect.\n*\n* ```tsx\n* navigate(\"/some/route\", { replace: true });\n* ```\n*\n* ### Prevent Scroll Reset\n*\n* [MODES: framework, data]\n*\n* <br/>\n* <br/>\n*\n* To prevent {@link ScrollRestoration | `<ScrollRestoration>`} from resetting\n* the scroll position, use the `preventScrollReset` option.\n*\n* ```tsx\n* navigate(\"?some-tab=1\", { preventScrollReset: true });\n* ```\n*\n* For example, if you have a tab interface connected to search params in the\n* middle of a page, and you don't want it to scroll to the top when a tab is\n* clicked.\n*\n* ### Return Type Augmentation\n*\n* Internally, `useNavigate` uses a separate implementation when you are in\n* Declarative mode versus Data/Framework mode - the primary difference being\n* that the latter is able to return a stable reference that does not change\n* identity across navigations. The implementation in Data/Framework mode also\n* returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n* that resolves when the navigation is completed. This means the return type of\n* `useNavigate` is `void | Promise<void>`. This is accurate, but can lead to\n* some red squigglies based on the union in the return value:\n*\n* - If you're using `typescript-eslint`, you may see errors from\n* [`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises)\n* - In Framework/Data mode, `React.use(navigate())` will show a false-positive\n* `Argument of type 'void | Promise<void>' is not assignable to parameter of\n* type 'Usable<void>'` error\n*\n* The easiest way to work around these issues is to augment the type based on the\n* router you're using:\n*\n* ```ts\n* // If using <BrowserRouter>\n* declare module \"react-router\" {\n* interface NavigateFunction {\n* (to: To, options?: NavigateOptions): void;\n* (delta: number): void;\n* }\n* }\n*\n* // If using <RouterProvider> or Framework mode\n* declare module \"react-router\" {\n* interface NavigateFunction {\n* (to: To, options?: NavigateOptions): Promise<void>;\n* (delta: number): Promise<void>;\n* }\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @returns A navigate function for programmatic navigation\n*/\nfunction useNavigate() {\n\tlet { isDataRoute } = React$1.useContext(RouteContext);\n\treturn isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n\tinvariant(useInRouterContext(), `useNavigate() may be used only in the context of a <Router> component.`);\n\tlet dataRouterContext = React$1.useContext(DataRouterContext);\n\tlet { basename, navigator } = React$1.useContext(NavigationContext);\n\tlet { matches } = React$1.useContext(RouteContext);\n\tlet { pathname: locationPathname } = useLocation();\n\tlet routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n\tlet activeRef = React$1.useRef(false);\n\tReact$1.useLayoutEffect(() => {\n\t\tactiveRef.current = true;\n\t});\n\treturn React$1.useCallback((to, options = {}) => {\n\t\twarning(activeRef.current, navigateEffectWarning);\n\t\tif (!activeRef.current) return;\n\t\tif (typeof to === \"number\") {\n\t\t\tnavigator.go(to);\n\t\t\treturn;\n\t\t}\n\t\tlet path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\");\n\t\tif (dataRouterContext == null && basename !== \"/\") path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n\t\t(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n\t}, [\n\t\tbasename,\n\t\tnavigator,\n\t\troutePathnamesJson,\n\t\tlocationPathname,\n\t\tdataRouterContext\n\t]);\n}\nconst OutletContext = React$1.createContext(null);\n/**\n* Returns the parent route {@link Outlet | `<Outlet context>`}.\n*\n* Often parent routes manage state or other values you want shared with child\n* routes. You can create your own [context provider](https://react.dev/learn/passing-data-deeply-with-context)\n* if you like, but this is such a common situation that it's built-into\n* {@link Outlet | `<Outlet>`}.\n*\n* ```tsx\n* // Parent route\n* function Parent() {\n* const [count, setCount] = React.useState(0);\n* return <Outlet context={[count, setCount]} />;\n* }\n* ```\n*\n* ```tsx\n* // Child route\n* import { useOutletContext } from \"react-router\";\n*\n* function Child() {\n* const [count, setCount] = useOutletContext();\n* const increment = () => setCount((c) => c + 1);\n* return <button onClick={increment}>{count}</button>;\n* }\n* ```\n*\n* If you're using TypeScript, we recommend the parent component provide a\n* custom hook for accessing the context value. This makes it easier for\n* consumers to get nice typings, control consumers, and know who's consuming\n* the context value.\n*\n* Here's a more realistic example:\n*\n* ```tsx filename=src/routes/dashboard.tsx lines=[14,20]\n* import { useState } from \"react\";\n* import { Outlet, useOutletContext } from \"react-router\";\n*\n* import type { User } from \"./types\";\n*\n* type ContextType = { user: User | null };\n*\n* export default function Dashboard() {\n* const [user, setUser] = useState<User | null>(null);\n*\n* return (\n* <div>\n* <h1>Dashboard</h1>\n* <Outlet context={{ user } satisfies ContextType} />\n* </div>\n* );\n* }\n*\n* export function useUser() {\n* return useOutletContext<ContextType>();\n* }\n* ```\n*\n* ```tsx filename=src/routes/dashboard/messages.tsx lines=[1,4]\n* import { useUser } from \"../dashboard\";\n*\n* export default function DashboardMessages() {\n* const { user } = useUser();\n* return (\n* <div>\n* <h2>Messages</h2>\n* <p>Hello, {user.name}!</p>\n* </div>\n* );\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @returns The context value passed to the parent {@link Outlet} component\n*/\nfunction useOutletContext() {\n\treturn React$1.useContext(OutletContext);\n}\n/**\n* Returns the element for the child route at this level of the route\n* hierarchy. Used internally by {@link Outlet | `<Outlet>`} to render child\n* routes.\n*\n* @public\n* @category Hooks\n* @param context The context to pass to the outlet\n* @returns The child route element or `null` if no child routes match\n*/\nfunction useOutlet(context) {\n\tlet outlet = React$1.useContext(RouteContext).outlet;\n\treturn React$1.useMemo(() => outlet && /* @__PURE__ */ React$1.createElement(OutletContext.Provider, { value: context }, outlet), [outlet, context]);\n}\n/**\n* Returns an object of key/value-pairs of the dynamic params from the current\n* URL that were matched by the routes. Child routes inherit all params from\n* their parent routes.\n*\n* Assuming a route pattern like `/posts/:postId` is matched by `/posts/123`\n* then `params.postId` will be `\"123\"`.\n*\n* @example\n* import { useParams } from \"react-router\";\n*\n* function SomeComponent() {\n* let params = useParams();\n* params.postId;\n* }\n*\n* @additionalExamples\n* ### Basic Usage\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* // given a route like:\n* <Route path=\"/posts/:postId\" element={<Post />} />;\n*\n* // or a data route like:\n* createBrowserRouter([\n* {\n* path: \"/posts/:postId\",\n* component: Post,\n* },\n* ]);\n*\n* // or in routes.ts\n* route(\"/posts/:postId\", \"routes/post.tsx\");\n* ```\n*\n* Access the params in a component:\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* export default function Post() {\n* let params = useParams();\n* return <h1>Post: {params.postId}</h1>;\n* }\n* ```\n*\n* ### Multiple Params\n*\n* Patterns can have multiple params:\n*\n* ```tsx\n* \"/posts/:postId/comments/:commentId\";\n* ```\n*\n* All will be available in the params object:\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* export default function Post() {\n* let params = useParams();\n* return (\n* <h1>\n* Post: {params.postId}, Comment: {params.commentId}\n* </h1>\n* );\n* }\n* ```\n*\n* ### Catchall Params\n*\n* Catchall params are defined with `*`:\n*\n* ```tsx\n* \"/files/*\";\n* ```\n*\n* The matched value will be available in the params object as follows:\n*\n* ```tsx\n* import { useParams } from \"react-router\";\n*\n* export default function File() {\n* let params = useParams();\n* let catchall = params[\"*\"];\n* // ...\n* }\n* ```\n*\n* You can destructure the catchall param:\n*\n* ```tsx\n* export default function File() {\n* let { \"*\": catchall } = useParams();\n* console.log(catchall);\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @returns An object containing the dynamic route parameters\n*/\nfunction useParams() {\n\tlet { matches } = React$1.useContext(RouteContext);\n\treturn matches[matches.length - 1]?.params ?? {};\n}\n/**\n* Resolves the pathname of the given `to` value against the current\n* {@link Location}. Similar to {@link useHref}, but returns a\n* {@link Path} instead of a string.\n*\n* @example\n* import { useResolvedPath } from \"react-router\";\n*\n* function SomeComponent() {\n* // if the user is at /dashboard/profile\n* let path = useResolvedPath(\"../accounts\");\n* path.pathname; // \"/dashboard/accounts\"\n* path.search; // \"\"\n* path.hash; // \"\"\n* }\n*\n* @public\n* @category Hooks\n* @param to The path to resolve\n* @param options Options\n* @param options.relative Defaults to `\"route\"` so routing is relative to the route tree.\n* Set to `\"path\"` to make relative routing operate against path segments.\n* @returns The resolved {@link Path} object with `pathname`, `search`, and `hash`\n*/\nfunction useResolvedPath(to, { relative } = {}) {\n\tlet { matches } = React$1.useContext(RouteContext);\n\tlet { pathname: locationPathname } = useLocation();\n\tlet routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n\treturn React$1.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [\n\t\tto,\n\t\troutePathnamesJson,\n\t\tlocationPathname,\n\t\trelative\n\t]);\n}\n/**\n* Hook version of {@link Routes | `<Routes>`} that uses objects instead of\n* components. These objects have the same properties as the component props.\n* The return value of `useRoutes` is either a valid React element you can use\n* to render the route tree, or `null` if nothing matched.\n*\n* @example\n* import { useRoutes } from \"react-router\";\n*\n* function App() {\n* let element = useRoutes([\n* {\n* path: \"/\",\n* element: <Dashboard />,\n* children: [\n* {\n* path: \"messages\",\n* element: <DashboardMessages />,\n* },\n* { path: \"tasks\", element: <DashboardTasks /> },\n* ],\n* },\n* { path: \"team\", element: <AboutPage /> },\n* ]);\n*\n* return element;\n* }\n*\n* @public\n* @category Hooks\n* @param routes An array of {@link RouteObject}s that define the route hierarchy\n* @param locationArg An optional {@link Location} object or pathname string to\n* use instead of the current {@link Location}\n* @returns A React element to render the matched route, or `null` if no routes matched\n*/\nfunction useRoutes(routes, locationArg) {\n\treturn useRoutesImpl(routes, locationArg);\n}\nfunction useRoutesImpl(routes, locationArg, dataRouterOpts) {\n\tinvariant(useInRouterContext(), `useRoutes() may be used only in the context of a <Router> component.`);\n\tlet { navigator } = React$1.useContext(NavigationContext);\n\tlet { matches: parentMatches } = React$1.useContext(RouteContext);\n\tlet routeMatch = parentMatches[parentMatches.length - 1];\n\tlet parentParams = routeMatch ? routeMatch.params : {};\n\trouteMatch && routeMatch.pathname;\n\tlet parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n\trouteMatch && routeMatch.route;\n\tlet locationFromContext = useLocation();\n\tlet location;\n\tif (locationArg) {\n\t\tlet parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n\t\tinvariant(parentPathnameBase === \"/\" || parsedLocationArg.pathname?.startsWith(parentPathnameBase), `When overriding the location using \\`<Routes location>\\` or \\`useRoutes(routes, location)\\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is \"${parentPathnameBase}\" but pathname \"${parsedLocationArg.pathname}\" was given in the \\`location\\` prop.`);\n\t\tlocation = parsedLocationArg;\n\t} else location = locationFromContext;\n\tlet pathname = location.pathname || \"/\";\n\tlet remainingPathname = pathname;\n\tif (parentPathnameBase !== \"/\") {\n\t\tlet parentSegments = parentPathnameBase.replace(/^\\//, \"\").split(\"/\");\n\t\tremainingPathname = \"/\" + pathname.replace(/^\\//, \"\").split(\"/\").slice(parentSegments.length).join(\"/\");\n\t}\n\tlet matches = dataRouterOpts && dataRouterOpts.state.matches.length ? dataRouterOpts.state.matches.map((m) => Object.assign(m, { route: dataRouterOpts.manifest[m.route.id] || m.route })) : matchRoutes(routes, { pathname: remainingPathname });\n\tlet renderedMatches = _renderMatches(matches && matches.map((match) => Object.assign({}, match, {\n\t\tparams: Object.assign({}, parentParams, match.params),\n\t\tpathname: joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/%/g, \"%25\").replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")).pathname : match.pathname]),\n\t\tpathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/%/g, \"%25\").replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")).pathname : match.pathnameBase])\n\t})), parentMatches, dataRouterOpts);\n\tif (locationArg && renderedMatches) return /* @__PURE__ */ React$1.createElement(LocationContext.Provider, { value: {\n\t\tlocation: {\n\t\t\tpathname: \"/\",\n\t\t\tsearch: \"\",\n\t\t\thash: \"\",\n\t\t\tstate: null,\n\t\t\tkey: \"default\",\n\t\t\tmask: void 0,\n\t\t\t...location\n\t\t},\n\t\tnavigationType: \"POP\"\n\t} }, renderedMatches);\n\treturn renderedMatches;\n}\nfunction DefaultErrorComponent() {\n\tlet error = useRouteError();\n\tlet message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);\n\tlet stack = error instanceof Error ? error.stack : null;\n\treturn /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(\"h2\", null, \"Unexpected Application Error!\"), /* @__PURE__ */ React$1.createElement(\"h3\", { style: { fontStyle: \"italic\" } }, message), stack ? /* @__PURE__ */ React$1.createElement(\"pre\", { style: {\n\t\tpadding: \"0.5rem\",\n\t\tbackgroundColor: \"rgba(200,200,200, 0.5)\"\n\t} }, stack) : null, null);\n}\nconst defaultErrorElement = /* @__PURE__ */ React$1.createElement(DefaultErrorComponent, null);\nvar RenderErrorBoundary = class extends React$1.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tlocation: props.location,\n\t\t\trevalidation: props.revalidation,\n\t\t\terror: props.error\n\t\t};\n\t}\n\tstatic contextType = RSCRouterContext;\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tif (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") return {\n\t\t\terror: props.error,\n\t\t\tlocation: props.location,\n\t\t\trevalidation: props.revalidation\n\t\t};\n\t\treturn {\n\t\t\terror: props.error !== void 0 ? props.error : state.error,\n\t\t\tlocation: state.location,\n\t\t\trevalidation: props.revalidation || state.revalidation\n\t\t};\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tif (this.props.onError) this.props.onError(error, errorInfo);\n\t\telse console.error(\"React Router caught the following error during render\", error);\n\t}\n\trender() {\n\t\tlet error = this.state.error;\n\t\tif (this.context && typeof error === \"object\" && error && \"digest\" in error && typeof error.digest === \"string\") {\n\t\t\tconst decoded = decodeRouteErrorResponseDigest(error.digest);\n\t\t\tif (decoded) error = decoded;\n\t\t}\n\t\tlet result = error !== void 0 ? /* @__PURE__ */ React$1.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React$1.createElement(RouteErrorContext.Provider, {\n\t\t\tvalue: error,\n\t\t\tchildren: this.props.component\n\t\t})) : this.props.children;\n\t\tif (this.context) return /* @__PURE__ */ React$1.createElement(RSCErrorHandler, { error }, result);\n\t\treturn result;\n\t}\n};\nconst errorRedirectHandledMap = /* @__PURE__ */ new WeakMap();\nfunction RSCErrorHandler({ children, error }) {\n\tlet { basename } = React$1.useContext(NavigationContext);\n\tif (typeof error === \"object\" && error && \"digest\" in error && typeof error.digest === \"string\") {\n\t\tlet redirect = decodeRedirectErrorDigest(error.digest);\n\t\tif (redirect) {\n\t\t\tlet existingRedirect = errorRedirectHandledMap.get(error);\n\t\t\tif (existingRedirect) throw existingRedirect;\n\t\t\tlet parsed = parseToInfo(redirect.location, basename);\n\t\t\tlet target = parsed.absoluteURL || parsed.to;\n\t\t\tif (hasInvalidProtocol(target)) throw new Error(\"Invalid redirect location\");\n\t\t\tif (isBrowser && !errorRedirectHandledMap.get(error)) if (parsed.isExternal || redirect.reloadDocument) window.location.href = target;\n\t\t\telse {\n\t\t\t\tconst redirectPromise = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(parsed.to, { replace: redirect.replace }));\n\t\t\t\terrorRedirectHandledMap.set(error, redirectPromise);\n\t\t\t\tthrow redirectPromise;\n\t\t\t}\n\t\t\treturn /* @__PURE__ */ React$1.createElement(\"meta\", {\n\t\t\t\thttpEquiv: \"refresh\",\n\t\t\t\tcontent: `0;url=${target}`\n\t\t\t});\n\t\t}\n\t}\n\treturn children;\n}\nfunction RenderedRoute({ routeContext, match, children }) {\n\tlet dataRouterContext = React$1.useContext(DataRouterContext);\n\tif (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n\treturn /* @__PURE__ */ React$1.createElement(RouteContext.Provider, { value: routeContext }, children);\n}\nfunction _renderMatches(matches, parentMatches = [], dataRouterOpts) {\n\tlet dataRouterState = dataRouterOpts?.state;\n\tif (matches == null) {\n\t\tif (!dataRouterState) return null;\n\t\tif (dataRouterState.errors) matches = dataRouterState.matches;\n\t\telse if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) matches = dataRouterState.matches;\n\t\telse return null;\n\t}\n\tlet renderedMatches = matches;\n\tlet errors = dataRouterState?.errors;\n\tif (errors != null) {\n\t\tlet errorIndex = renderedMatches.findIndex((m) => m.route.id && errors?.[m.route.id] !== void 0);\n\t\tinvariant(errorIndex >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(errors).join(\",\")}`);\n\t\trenderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n\t}\n\tlet renderFallback = false;\n\tlet fallbackIndex = -1;\n\tif (dataRouterOpts && dataRouterState) {\n\t\trenderFallback = dataRouterState.renderFallback;\n\t\tfor (let i = 0; i < renderedMatches.length; i++) {\n\t\t\tlet match = renderedMatches[i];\n\t\t\tif (match.route.HydrateFallback || match.route.hydrateFallbackElement) fallbackIndex = i;\n\t\t\tif (match.route.id) {\n\t\t\t\tlet { loaderData, errors } = dataRouterState;\n\t\t\t\tlet needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors || errors[match.route.id] === void 0);\n\t\t\t\tif (match.route.lazy || needsToRunLoader) {\n\t\t\t\t\tif (dataRouterOpts.isStatic) renderFallback = true;\n\t\t\t\t\tif (fallbackIndex >= 0) renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n\t\t\t\t\telse renderedMatches = [renderedMatches[0]];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tlet onErrorHandler = dataRouterOpts?.onError;\n\tlet onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {\n\t\tonErrorHandler(error, {\n\t\t\tlocation: dataRouterState.location,\n\t\t\tparams: dataRouterState.matches?.[0]?.params ?? {},\n\t\t\tpattern: getRoutePattern(dataRouterState.matches),\n\t\t\terrorInfo\n\t\t});\n\t} : void 0;\n\treturn renderedMatches.reduceRight((outlet, match, index) => {\n\t\tlet error;\n\t\tlet shouldRenderHydrateFallback = false;\n\t\tlet errorElement = null;\n\t\tlet hydrateFallbackElement = null;\n\t\tif (dataRouterState) {\n\t\t\terror = errors && match.route.id ? errors[match.route.id] : void 0;\n\t\t\terrorElement = match.route.errorElement || defaultErrorElement;\n\t\t\tif (renderFallback) {\n\t\t\t\tif (fallbackIndex < 0 && index === 0) {\n\t\t\t\t\twarningOnce(\"route-fallback\", false, \"No `HydrateFallback` element provided to render during initial hydration\");\n\t\t\t\t\tshouldRenderHydrateFallback = true;\n\t\t\t\t\thydrateFallbackElement = null;\n\t\t\t\t} else if (fallbackIndex === index) {\n\t\t\t\t\tshouldRenderHydrateFallback = true;\n\t\t\t\t\thydrateFallbackElement = match.route.hydrateFallbackElement || null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlet matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n\t\tlet getChildren = () => {\n\t\t\tlet children;\n\t\t\tif (error) children = errorElement;\n\t\t\telse if (shouldRenderHydrateFallback) children = hydrateFallbackElement;\n\t\t\telse if (match.route.Component) children = /* @__PURE__ */ React$1.createElement(match.route.Component, null);\n\t\t\telse if (match.route.element) children = match.route.element;\n\t\t\telse children = outlet;\n\t\t\treturn /* @__PURE__ */ React$1.createElement(RenderedRoute, {\n\t\t\t\tmatch,\n\t\t\t\trouteContext: {\n\t\t\t\t\toutlet,\n\t\t\t\t\tmatches,\n\t\t\t\t\tisDataRoute: dataRouterState != null\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t});\n\t\t};\n\t\treturn dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React$1.createElement(RenderErrorBoundary, {\n\t\t\tlocation: dataRouterState.location,\n\t\t\trevalidation: dataRouterState.revalidation,\n\t\t\tcomponent: errorElement,\n\t\t\terror,\n\t\t\tchildren: getChildren(),\n\t\t\trouteContext: {\n\t\t\t\toutlet: null,\n\t\t\t\tmatches,\n\t\t\t\tisDataRoute: true\n\t\t\t},\n\t\t\tonError\n\t\t}) : getChildren();\n\t}, null);\n}\nfunction getDataRouterConsoleError(hookName) {\n\treturn `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext(hookName) {\n\tlet ctx = React$1.useContext(DataRouterContext);\n\tinvariant(ctx, getDataRouterConsoleError(hookName));\n\treturn ctx;\n}\nfunction useDataRouterState(hookName) {\n\tlet state = React$1.useContext(DataRouterStateContext);\n\tinvariant(state, getDataRouterConsoleError(hookName));\n\treturn state;\n}\nfunction useRouteContext(hookName) {\n\tlet route = React$1.useContext(RouteContext);\n\tinvariant(route, getDataRouterConsoleError(hookName));\n\treturn route;\n}\nfunction useCurrentRouteId(hookName) {\n\tlet route = useRouteContext(hookName);\n\tlet thisRoute = route.matches[route.matches.length - 1];\n\tinvariant(thisRoute.route.id, `${hookName} can only be used on routes that contain a unique \"id\"`);\n\treturn thisRoute.route.id;\n}\n/**\n* Returns the ID for the nearest contextual route\n*\n* @category Hooks\n* @returns The ID of the nearest contextual route\n*/\nfunction useRouteId() {\n\treturn useCurrentRouteId(\"useRouteId\");\n}\n/**\n* Returns the current {@link Navigation}, defaulting to an \"idle\" navigation\n* when no navigation is in progress. You can use this to render pending UI\n* (like a global spinner) or read [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)\n* from a form navigation.\n*\n* @example\n* import { useNavigation } from \"react-router\";\n*\n* function SomeComponent() {\n* let navigation = useNavigation();\n* navigation.state;\n* navigation.formData;\n* // etc.\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The current {@link Navigation} object\n*/\nfunction useNavigation() {\n\tlet state = useDataRouterState(\"useNavigation\");\n\treturn React$1.useMemo(() => {\n\t\tlet { matches, historyAction, ...rest } = state.navigation;\n\t\treturn rest;\n\t}, [state.navigation]);\n}\n/**\n* Revalidate the data on the page for reasons outside of normal data mutations\n* like [`Window` focus](https://developer.mozilla.org/en-US/docs/Web/API/Window/focus_event)\n* or polling on an interval.\n*\n* Note that page data is already revalidated automatically after actions.\n* If you find yourself using this for normal CRUD operations on your data in\n* response to user interactions, you're probably not taking advantage of the\n* other APIs like {@link useFetcher}, {@link Form}, {@link useSubmit} that do\n* this automatically.\n*\n* @example\n* import { useRevalidator } from \"react-router\";\n*\n* function WindowFocusRevalidator() {\n* const revalidator = useRevalidator();\n*\n* useFakeWindowFocus(() => {\n* revalidator.revalidate();\n* });\n*\n* return (\n* <div hidden={revalidator.state === \"idle\"}>\n* Revalidating...\n* </div>\n* );\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns An object with a `revalidate` function and the current revalidation\n* `state`\n*/\nfunction useRevalidator() {\n\tlet dataRouterContext = useDataRouterContext(\"useRevalidator\");\n\tlet state = useDataRouterState(\"useRevalidator\");\n\tlet revalidate = React$1.useCallback(async () => {\n\t\tawait dataRouterContext.router.revalidate();\n\t}, [dataRouterContext.router]);\n\treturn React$1.useMemo(() => ({\n\t\trevalidate,\n\t\tstate: state.revalidation\n\t}), [revalidate, state.revalidation]);\n}\n/**\n* Returns the active route matches, useful for accessing `loaderData` for\n* parent/child routes or the route [`handle`](../../start/framework/route-module#handle)\n* property\n*\n* Pairing the route `handle` with `useMatches` gets very powerful since you can put\n* whatever you want on a route handle and have access to `useMatches` anywhere.\n* Please see the [handle](../../how-to/using-handle) documentation for an example\n* of breadcrumbs via `useMatches`/`handle`.\n*\n* ```tsx\n* import { useMatches } from \"react-router\";\n*\n* function SomeComponent() {\n* const matches = useMatches();\n* // matches[i].id // route id\n* // matches[i].pathname // the portion of the URL the route matched\n* // matches[i].params // the parsed params from the URL\n* // matches[i].loaderData // the data from the loader\n* // matches[i].handle // the route handle with any app specific data\n* }\n* ```\n*\n* <docs-info>useMatches only works with a data router like `createBrowserRouter`,\n* since they know the full route tree up front and can provide all of the current\n* matches. Additionally, `useMatches` will not match down into any descendant route\n* trees since the router isn't aware of the descendant routes.</docs-info>\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns An array of {@link UIMatch | UI matches} for the current route hierarchy\n*/\nfunction useMatches() {\n\tlet { matches, loaderData } = useDataRouterState(\"useMatches\");\n\treturn React$1.useMemo(() => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);\n}\n/**\n* Returns the data from the closest route\n* [`loader`](../../start/framework/route-module#loader) or\n* [`clientLoader`](../../start/framework/route-module#clientloader).\n*\n* @example\n* import { useLoaderData } from \"react-router\";\n*\n* export async function loader() {\n* return await fakeDb.invoices.findAll();\n* }\n*\n* export default function Invoices() {\n* let invoices = useLoaderData<typeof loader>();\n* // ...\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The data returned from the route's [`loader`](../../start/framework/route-module#loader) or [`clientLoader`](../../start/framework/route-module#clientloader) function\n*/\nfunction useLoaderData() {\n\tlet state = useDataRouterState(\"useLoaderData\");\n\tlet routeId = useCurrentRouteId(\"useLoaderData\");\n\treturn state.loaderData[routeId];\n}\n/**\n* Returns the [`loader`](../../start/framework/route-module#loader) data for a\n* given route by route ID.\n*\n* Route IDs are created automatically. They are simply the path of the route file\n* relative to the app folder without the extension.\n*\n* | Route Filename | Route ID |\n* | ---------------------------- | ---------------------- |\n* | `app/root.tsx` | `\"root\"` |\n* | `app/routes/teams.tsx` | `\"routes/teams\"` |\n* | `app/whatever/teams.$id.tsx` | `\"whatever/teams.$id\"` |\n*\n* @example\n* import { useRouteLoaderData } from \"react-router\";\n*\n* function SomeComponent() {\n* const { user } = useRouteLoaderData(\"root\");\n* }\n*\n* // You can also specify your own route ID's manually in your routes.ts file:\n* route(\"/\", \"containers/app.tsx\", { id: \"app\" })\n* useRouteLoaderData(\"app\");\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param routeId The ID of the route to return loader data from\n* @returns The data returned from the specified route's [`loader`](../../start/framework/route-module#loader)\n* function, or `undefined` if not found\n*/\nfunction useRouteLoaderData(routeId) {\n\treturn useDataRouterState(\"useRouteLoaderData\").loaderData[routeId];\n}\n/**\n* Returns the [`action`](../../start/framework/route-module#action) data from\n* the most recent `POST` navigation form submission or `undefined` if there\n* hasn't been one.\n*\n* @example\n* import { Form, useActionData } from \"react-router\";\n*\n* export async function action({ request }) {\n* const body = await request.formData();\n* const name = body.get(\"visitorsName\");\n* return { message: `Hello, ${name}` };\n* }\n*\n* export default function Invoices() {\n* const data = useActionData();\n* return (\n* <Form method=\"post\">\n* <input type=\"text\" name=\"visitorsName\" />\n* {data ? data.message : \"Waiting...\"}\n* </Form>\n* );\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The data returned from the route's [`action`](../../start/framework/route-module#action)\n* function, or `undefined` if no [`action`](../../start/framework/route-module#action)\n* has been called\n*/\nfunction useActionData() {\n\tlet state = useDataRouterState(\"useActionData\");\n\tlet routeId = useCurrentRouteId(\"useLoaderData\");\n\treturn state.actionData ? state.actionData[routeId] : void 0;\n}\n/**\n* Accesses the error thrown during an\n* [`action`](../../start/framework/route-module#action),\n* [`loader`](../../start/framework/route-module#loader),\n* or component render to be used in a route module\n* [`ErrorBoundary`](../../start/framework/route-module#errorboundary).\n*\n* @example\n* export function ErrorBoundary() {\n* const error = useRouteError();\n* return <div>{error.message}</div>;\n* }\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The error that was thrown during route [loading](../../start/framework/route-module#loader),\n* [`action`](../../start/framework/route-module#action) execution, or rendering\n*/\nfunction useRouteError() {\n\tlet error = React$1.useContext(RouteErrorContext);\n\tlet state = useDataRouterState(\"useRouteError\");\n\tlet routeId = useCurrentRouteId(\"useRouteError\");\n\tif (error !== void 0) return error;\n\treturn state.errors?.[routeId];\n}\n/**\n* Returns the resolved promise value from the closest {@link Await | `<Await>`}.\n*\n* @example\n* function SomeDescendant() {\n* const value = useAsyncValue();\n* // ...\n* }\n*\n* // somewhere in your app\n* <Await resolve={somePromise}>\n* <SomeDescendant />\n* </Await>;\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The resolved value from the nearest {@link Await} component\n*/\nfunction useAsyncValue() {\n\treturn React$1.useContext(AwaitContext)?._data;\n}\n/**\n* Returns the rejection value from the closest {@link Await | `<Await>`}.\n*\n* @example\n* import { Await, useAsyncError } from \"react-router\";\n*\n* function ErrorElement() {\n* const error = useAsyncError();\n* return (\n* <p>Uh Oh, something went wrong! {error.message}</p>\n* );\n* }\n*\n* // somewhere in your app\n* <Await\n* resolve={promiseThatRejects}\n* errorElement={<ErrorElement />}\n* />;\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The error that was thrown in the nearest {@link Await} component\n*/\nfunction useAsyncError() {\n\treturn React$1.useContext(AwaitContext)?._error;\n}\nlet blockerId = 0;\n/**\n* Allow the application to block navigations within the SPA and present the\n* user a confirmation dialog to confirm the navigation. Mostly used to avoid\n* using half-filled form data. This does not handle hard-reloads or\n* cross-origin navigations.\n*\n* The {@link Blocker} object returned by the hook has the following properties:\n*\n* - **`state`**\n* - `unblocked` - the blocker is idle and has not prevented any navigation\n* - `blocked` - the blocker has prevented a navigation\n* - `proceeding` - the blocker is proceeding through from a blocked navigation\n* - **`location`**\n* - When in a `blocked` state, this represents the {@link Location} to which\n* we blocked a navigation. When in a `proceeding` state, this is the\n* location being navigated to after a `blocker.proceed()` call.\n* - **`proceed()`**\n* - When in a `blocked` state, you may call `blocker.proceed()` to proceed to\n* the blocked location.\n* - **`reset()`**\n* - When in a `blocked` state, you may call `blocker.reset()` to return the\n* blocker to an `unblocked` state and leave the user at the current\n* location.\n*\n* @example\n* // Boolean version\n* let blocker = useBlocker(value !== \"\");\n*\n* // Function version\n* let blocker = useBlocker(\n* ({ currentLocation, nextLocation, historyAction }) =>\n* value !== \"\" &&\n* currentLocation.pathname !== nextLocation.pathname\n* );\n*\n* @additionalExamples\n* ```tsx\n* import { useCallback, useState } from \"react\";\n* import { BlockerFunction, useBlocker } from \"react-router\";\n*\n* export function ImportantForm() {\n* const [value, setValue] = useState(\"\");\n*\n* const shouldBlock = useCallback<BlockerFunction>(\n* () => value !== \"\",\n* [value]\n* );\n* const blocker = useBlocker(shouldBlock);\n*\n* return (\n* <form\n* onSubmit={(e) => {\n* e.preventDefault();\n* setValue(\"\");\n* if (blocker.state === \"blocked\") {\n* blocker.proceed();\n* }\n* }}\n* >\n* <input\n* name=\"data\"\n* value={value}\n* onChange={(e) => setValue(e.target.value)}\n* />\n*\n* <button type=\"submit\">Save</button>\n*\n* {blocker.state === \"blocked\" ? (\n* <>\n* <p style={{ color: \"red\" }}>\n* Blocked the last navigation to\n* </p>\n* <button\n* type=\"button\"\n* onClick={() => blocker.proceed()}\n* >\n* Let me through\n* </button>\n* <button\n* type=\"button\"\n* onClick={() => blocker.reset()}\n* >\n* Keep me here\n* </button>\n* </>\n* ) : blocker.state === \"proceeding\" ? (\n* <p style={{ color: \"orange\" }}>\n* Proceeding through blocked navigation\n* </p>\n* ) : (\n* <p style={{ color: \"green\" }}>\n* Blocker is currently unblocked\n* </p>\n* )}\n* </form>\n* );\n* }\n* ```\n*\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @param shouldBlock Either a boolean or a function returning a boolean which\n* indicates whether the navigation should be blocked. The function format\n* receives a single object parameter containing the `currentLocation`,\n* `nextLocation`, and `historyAction` of the potential navigation.\n* @returns A {@link Blocker} object with state and reset functionality\n*/\nfunction useBlocker(shouldBlock) {\n\tlet { router, basename } = useDataRouterContext(\"useBlocker\");\n\tlet state = useDataRouterState(\"useBlocker\");\n\tlet [blockerKey, setBlockerKey] = React$1.useState(\"\");\n\tlet blockerFunction = React$1.useCallback((arg) => {\n\t\tif (typeof shouldBlock !== \"function\") return !!shouldBlock;\n\t\tif (basename === \"/\") return shouldBlock(arg);\n\t\tlet { currentLocation, nextLocation, historyAction } = arg;\n\t\treturn shouldBlock({\n\t\t\tcurrentLocation: {\n\t\t\t\t...currentLocation,\n\t\t\t\tpathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n\t\t\t},\n\t\t\tnextLocation: {\n\t\t\t\t...nextLocation,\n\t\t\t\tpathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n\t\t\t},\n\t\t\thistoryAction\n\t\t});\n\t}, [basename, shouldBlock]);\n\tReact$1.useEffect(() => {\n\t\tlet key = String(++blockerId);\n\t\tsetBlockerKey(key);\n\t\treturn () => router.deleteBlocker(key);\n\t}, [router]);\n\tReact$1.useEffect(() => {\n\t\tif (blockerKey !== \"\") router.getBlocker(blockerKey, blockerFunction);\n\t}, [\n\t\trouter,\n\t\tblockerKey,\n\t\tblockerFunction\n\t]);\n\treturn blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\nfunction useNavigateStable() {\n\tlet { router } = useDataRouterContext(\"useNavigate\");\n\tlet id = useCurrentRouteId(\"useNavigate\");\n\tlet activeRef = React$1.useRef(false);\n\tReact$1.useLayoutEffect(() => {\n\t\tactiveRef.current = true;\n\t});\n\treturn React$1.useCallback(async (to, options = {}) => {\n\t\twarning(activeRef.current, navigateEffectWarning);\n\t\tif (!activeRef.current) return;\n\t\tif (typeof to === \"number\") await router.navigate(to);\n\t\telse await router.navigate(to, {\n\t\t\tfromRouteId: id,\n\t\t\t...options\n\t\t});\n\t}, [router, id]);\n}\nconst alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n\tif (!cond && !alreadyWarned[key]) {\n\t\talreadyWarned[key] = true;\n\t\twarning(false, message);\n\t}\n}\nfunction useRoute(...args) {\n\tconst currentRouteId = useCurrentRouteId(\"useRoute\");\n\tconst id = args[0] ?? currentRouteId;\n\tconst state = useDataRouterState(\"useRoute\");\n\tconst route = state.matches.find(({ route }) => route.id === id);\n\tif (route === void 0) return void 0;\n\treturn {\n\t\thandle: route.route.handle,\n\t\tloaderData: state.loaderData[id],\n\t\tactionData: state.actionData?.[id]\n\t};\n}\nfunction toRouterStateMatch(match) {\n\treturn {\n\t\tid: match.route.id,\n\t\tpathname: match.pathname,\n\t\tparams: match.params,\n\t\thandle: match.route.handle\n\t};\n}\n/**\n* A unified hook for reading router state: current (`active`) and in-flight\n* (`pending`) locations, search params, params, matches, and navigation type.\n*\n* This hook consolidates the information you used to get from {@link useLocation},\n* {@link useSearchParams}, {@link useParams}, {@link useMatches}, {@link useNavigation},\n* and {@link useNavigationType} into a single hook.\n*\n*\n* @example\n* import { unstable_useRouterState as useRouterState } from \"react-router\";\n*\n* let { active, pending } = unstable_useRouterState();\n*\n* // Active is always populated with the current location\n* active.location; // replaces `useLocation()`\n* active.searchParams; // replaces `useSearchParams()[0]`\n* active.params; // replaces `useParams()`\n* active.matches; // replaces `useMatches()`\n* active.type; // replaces `useNavigationType()`\n*\n* // Pending is only populated during a navigation\n* pending.location; // replaces `useNavigation().location`\n* pending.searchParams; // equivalent to `new URLSearchParams(useNavigation().search)`\n* pending.params; // Not directly accessible today\n* pending.matches; // Not directly accessible today\n* pending.type; // Not directly accessible today\n* pending.state; // replaces `useNavigation().state`\n* pending.formMethod; // replaces useNavigation().formMethod\n* pending.formAction; // replaces useNavigation().formAction\n* pending.formEncType; // replaces useNavigation().formEncType\n* pending.formData; // replaces useNavigation().formData\n* pending.json; // replaces useNavigation().json\n* pending.text; // replaces useNavigation().text\n*\n* @name unstable_useRouterState\n* @public\n* @category Hooks\n* @mode framework\n* @mode data\n* @returns The current router state with `active` and `pending` variants\n*/\nfunction useRouterState() {\n\tlet { location, historyAction: type, matches, navigation } = useDataRouterState(\"unstable_useRouterState\");\n\tlet active = React$1.useMemo(() => ({\n\t\ttype,\n\t\tlocation,\n\t\tsearchParams: new URLSearchParams(location.search),\n\t\tparams: matches[matches.length - 1]?.params ?? {},\n\t\tmatches: matches.map((m) => toRouterStateMatch(m))\n\t}), [\n\t\tlocation,\n\t\tmatches,\n\t\ttype\n\t]);\n\tlet pending = React$1.useMemo(() => {\n\t\tif (navigation.state === \"idle\") return null;\n\t\tlet shared = {\n\t\t\ttype: navigation.historyAction,\n\t\t\tlocation: navigation.location,\n\t\t\tsearchParams: new URLSearchParams(navigation.location.search),\n\t\t\tparams: navigation.matches[navigation.matches.length - 1]?.params ?? {},\n\t\t\tmatches: navigation.matches.map((m) => toRouterStateMatch(m))\n\t\t};\n\t\treturn navigation.state === \"loading\" ? {\n\t\t\t...shared,\n\t\t\tstate: \"loading\",\n\t\t\tformMethod: navigation.formMethod,\n\t\t\tformAction: navigation.formAction,\n\t\t\tformEncType: navigation.formEncType,\n\t\t\tformData: navigation.formData,\n\t\t\tjson: navigation.json,\n\t\t\ttext: navigation.text\n\t\t} : {\n\t\t\t...shared,\n\t\t\tstate: \"submitting\",\n\t\t\tformMethod: navigation.formMethod,\n\t\t\tformAction: navigation.formAction,\n\t\t\tformEncType: navigation.formEncType,\n\t\t\tformData: navigation.formData,\n\t\t\tjson: navigation.json,\n\t\t\ttext: navigation.text\n\t\t};\n\t}, [navigation]);\n\treturn React$1.useMemo(() => ({\n\t\tactive,\n\t\tpending\n\t}), [active, pending]);\n}\n//#endregion\nexport { _renderMatches, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRoute, useRouteError, useRouteId, useRouteLoaderData, useRouterState, useRoutes, useRoutesImpl };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAqCA,SAAS,EAAQ,GAAI,EAAE,gBAAa,EAAE,EAAE;AACvC,GAAU,GAAoB,EAAE,qEAAqE;CACrG,IAAI,EAAE,aAAU,iBAAc,EAAQ,WAAW,EAAkB,EAC/D,EAAE,SAAM,aAAU,cAAW,EAAgB,GAAI,EAAE,aAAU,CAAC,EAC9D,IAAiB;AAErB,QADI,MAAa,QAAK,IAAiB,MAAa,MAAM,IAAW,EAAU,CAAC,GAAU,EAAS,CAAC,GAC7F,EAAU,WAAW;EAC3B,UAAU;EACV;EACA;EACA,CAAC;;AAYH,SAAS,IAAqB;AAC7B,QAAO,EAAQ,WAAW,EAAgB,IAAI;;AA2B/C,SAAS,IAAc;AAEtB,QADA,EAAU,GAAoB,EAAE,yEAAyE,EAClG,EAAQ,WAAW,EAAgB,CAAC;;AA6B5C,IAAM,IAAwB;AAuJ9B,SAAS,IAAc;CACtB,IAAI,EAAE,mBAAgB,EAAQ,WAAW,EAAa;AACtD,QAAO,IAAc,GAAmB,GAAG,GAAqB;;AAEjE,SAAS,IAAsB;AAC9B,GAAU,GAAoB,EAAE,yEAAyE;CACzG,IAAI,IAAoB,EAAQ,WAAW,EAAkB,EACzD,EAAE,aAAU,iBAAc,EAAQ,WAAW,EAAkB,EAC/D,EAAE,eAAY,EAAQ,WAAW,EAAa,EAC9C,EAAE,UAAU,MAAqB,GAAa,EAC9C,IAAqB,KAAK,UAAU,EAAoB,EAAQ,CAAC,EACjE,IAAY,EAAQ,OAAO,GAAM;AAIrC,QAHA,EAAQ,sBAAsB;AAC7B,IAAU,UAAU;GACnB,EACK,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EAAQ,cAAc;EAC5B,IAAI,EAAE,YAAS,kBAAe,GAAG,MAAS,EAAM;AAChD,SAAO;IACL,CAAC,EAAM,WAAW,CAAC;;AAkFvB,SAAS,IAAa;CACrB,IAAI,EAAE,YAAS,kBAAe,EAAmB,aAAa;AAC9D,QAAO,EAAQ,cAAc,EAAQ,KAAK,MAAM,EAA2B,GAAG,EAAW,CAAC,EAAE,CAAC,GAAS,EAAW,CAAC;;AA0HnH,SAAS,IAAgB;CACxB,IAAI,IAAQ,EAAQ,WAAW,EAAkB,EAC7C,IAAQ,EAAmB,gBAAgB,EAC3C,IAAU,EAAkB,gBAAgB;AAEhD,QADI,MAAU,KAAK,IACZ,EAAM,SAAS,KADO;;AAsM9B,SAAS,IAAoB;CAC5B,IAAI,EAAE,cAAW,EAAqB,cAAc,EAChD,IAAK,EAAkB,cAAc,EACrC,IAAY,EAAQ,OAAO,GAAM;AAIrC,QAHA,EAAQ,sBAAsB;AAC7B,IAAU,UAAU;GACnB,EACK,EAAQ,YAAY,OAAO,GAAI,IAAU,EAAE,KAAK;AACtD,IAAQ,EAAU,SAAS,EAAsB,EAC5C,EAAU,YACX,OAAO,KAAO,WAAU,MAAM,EAAO,SAAS,EAAG,GAChD,MAAM,EAAO,SAAS,GAAI;GAC9B,aAAa;GACb,GAAG;GACH,CAAC;IACA,CAAC,GAAQ,EAAG,CAAC;;AAEjB,IAAM,IAAgB,EAAE;AACxB,SAAS,EAAY,GAAK,GAAM,GAAS;AACxC,CAAI,CAAC,KAAQ,CAAC,EAAc,OAC3B,EAAc,KAAO,IACrB,EAAQ,IAAO,EAAQ"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { PROTOCOL_RELATIVE_URL_REGEX as e } from "./url.js";
|
|
2
|
-
//#region node_modules/react-router/dist/production/lib/router/history.js
|
|
3
|
-
var t = "popstate";
|
|
4
|
-
function n(e) {
|
|
5
|
-
return typeof e == "object" && !!e && "pathname" in e && "search" in e && "hash" in e && "state" in e && "key" in e;
|
|
6
|
-
}
|
|
7
|
-
function r(e = {}) {
|
|
8
|
-
function t(e, t) {
|
|
9
|
-
let n = t.state?.masked, { pathname: r, search: i, hash: a } = n || e.location;
|
|
10
|
-
return c("", {
|
|
11
|
-
pathname: r,
|
|
12
|
-
search: i,
|
|
13
|
-
hash: a
|
|
14
|
-
}, t.state && t.state.usr || null, t.state && t.state.key || "default", n ? {
|
|
15
|
-
pathname: e.location.pathname,
|
|
16
|
-
search: e.location.search,
|
|
17
|
-
hash: e.location.hash
|
|
18
|
-
} : void 0);
|
|
19
|
-
}
|
|
20
|
-
function n(e, t) {
|
|
21
|
-
return typeof t == "string" ? t : l(t);
|
|
22
|
-
}
|
|
23
|
-
return d(t, n, null, e);
|
|
24
|
-
}
|
|
25
|
-
function i(e, t) {
|
|
26
|
-
if (e === !1 || e == null) throw Error(t);
|
|
27
|
-
}
|
|
28
|
-
function a(e, t) {
|
|
29
|
-
if (!e) {
|
|
30
|
-
typeof console < "u" && console.warn(t);
|
|
31
|
-
try {
|
|
32
|
-
throw Error(t);
|
|
33
|
-
} catch {}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function o() {
|
|
37
|
-
return Math.random().toString(36).substring(2, 10);
|
|
38
|
-
}
|
|
39
|
-
function s(e, t) {
|
|
40
|
-
return {
|
|
41
|
-
usr: e.state,
|
|
42
|
-
key: e.key,
|
|
43
|
-
idx: t,
|
|
44
|
-
masked: e.mask ? {
|
|
45
|
-
pathname: e.pathname,
|
|
46
|
-
search: e.search,
|
|
47
|
-
hash: e.hash
|
|
48
|
-
} : void 0
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function c(e, t, n = null, r, i) {
|
|
52
|
-
return {
|
|
53
|
-
pathname: typeof e == "string" ? e : e.pathname,
|
|
54
|
-
search: "",
|
|
55
|
-
hash: "",
|
|
56
|
-
...typeof t == "string" ? u(t) : t,
|
|
57
|
-
state: n,
|
|
58
|
-
key: t && t.key || r || o(),
|
|
59
|
-
mask: i
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function l({ pathname: e = "/", search: t = "", hash: n = "" }) {
|
|
63
|
-
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
64
|
-
}
|
|
65
|
-
function u(e) {
|
|
66
|
-
let t = {};
|
|
67
|
-
if (e) {
|
|
68
|
-
let n = e.indexOf("#");
|
|
69
|
-
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
70
|
-
let r = e.indexOf("?");
|
|
71
|
-
r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
|
|
72
|
-
}
|
|
73
|
-
return t;
|
|
74
|
-
}
|
|
75
|
-
function d(e, r, i, a = {}) {
|
|
76
|
-
let { window: o = document.defaultView, v5Compat: l = !1 } = a, u = o.history, d = "POP", p = null, m = h();
|
|
77
|
-
m ?? (m = 0, u.replaceState({
|
|
78
|
-
...u.state,
|
|
79
|
-
idx: m
|
|
80
|
-
}, ""));
|
|
81
|
-
function h() {
|
|
82
|
-
return (u.state || { idx: null }).idx;
|
|
83
|
-
}
|
|
84
|
-
function g() {
|
|
85
|
-
d = "POP";
|
|
86
|
-
let e = h(), t = e == null ? null : e - m;
|
|
87
|
-
m = e, p && p({
|
|
88
|
-
action: d,
|
|
89
|
-
location: b.location,
|
|
90
|
-
delta: t
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
function _(e, t) {
|
|
94
|
-
d = "PUSH";
|
|
95
|
-
let r = n(e) ? e : c(b.location, e, t);
|
|
96
|
-
i && i(r, e), m = h() + 1;
|
|
97
|
-
let a = s(r, m), f = b.createHref(r.mask || r);
|
|
98
|
-
try {
|
|
99
|
-
u.pushState(a, "", f);
|
|
100
|
-
} catch (e) {
|
|
101
|
-
if (e instanceof DOMException && e.name === "DataCloneError") throw e;
|
|
102
|
-
o.location.assign(f);
|
|
103
|
-
}
|
|
104
|
-
l && p && p({
|
|
105
|
-
action: d,
|
|
106
|
-
location: b.location,
|
|
107
|
-
delta: 1
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function v(e, t) {
|
|
111
|
-
d = "REPLACE";
|
|
112
|
-
let r = n(e) ? e : c(b.location, e, t);
|
|
113
|
-
i && i(r, e), m = h();
|
|
114
|
-
let a = s(r, m), o = b.createHref(r.mask || r);
|
|
115
|
-
u.replaceState(a, "", o), l && p && p({
|
|
116
|
-
action: d,
|
|
117
|
-
location: b.location,
|
|
118
|
-
delta: 0
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
function y(e) {
|
|
122
|
-
return f(o, e);
|
|
123
|
-
}
|
|
124
|
-
let b = {
|
|
125
|
-
get action() {
|
|
126
|
-
return d;
|
|
127
|
-
},
|
|
128
|
-
get location() {
|
|
129
|
-
return e(o, u);
|
|
130
|
-
},
|
|
131
|
-
listen(e) {
|
|
132
|
-
if (p) throw Error("A history only accepts one active listener");
|
|
133
|
-
return o.addEventListener(t, g), p = e, () => {
|
|
134
|
-
o.removeEventListener(t, g), p = null;
|
|
135
|
-
};
|
|
136
|
-
},
|
|
137
|
-
createHref(e) {
|
|
138
|
-
return r(o, e);
|
|
139
|
-
},
|
|
140
|
-
createURL: y,
|
|
141
|
-
encodeLocation(e) {
|
|
142
|
-
let t = y(e);
|
|
143
|
-
return {
|
|
144
|
-
pathname: t.pathname,
|
|
145
|
-
search: t.search,
|
|
146
|
-
hash: t.hash
|
|
147
|
-
};
|
|
148
|
-
},
|
|
149
|
-
push: _,
|
|
150
|
-
replace: v,
|
|
151
|
-
go(e) {
|
|
152
|
-
return u.go(e);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
return b;
|
|
156
|
-
}
|
|
157
|
-
function f(t, n, r = !1) {
|
|
158
|
-
let a = "http://localhost";
|
|
159
|
-
t && (a = t.location.origin === "null" ? t.location.href : t.location.origin), i(a, "No window.location.(origin|href) available to create URL");
|
|
160
|
-
let o = typeof n == "string" ? n : l(n);
|
|
161
|
-
return o = o.replace(/ $/, "%20"), !r && e.test(o) && (o = a + o), new URL(o, a);
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
export { r as createBrowserHistory, l as createPath, i as invariant, u as parsePath, a as warning };
|
|
165
|
-
|
|
166
|
-
//# sourceMappingURL=history.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"history.js","names":[],"sources":["../../../../../../../node_modules/react-router/dist/production/lib/router/history.js"],"sourcesContent":["/**\n * react-router v8.3.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { PROTOCOL_RELATIVE_URL_REGEX } from \"./url.js\";\n//#region lib/router/history.ts\n/**\n* Actions represent the type of change to a location value.\n*/\nlet Action = /* @__PURE__ */ function(Action) {\n\t/**\n\t* A POP indicates a change to an arbitrary index in the history stack, such\n\t* as a back or forward navigation. It does not describe the direction of the\n\t* navigation, only that the current index changed.\n\t*\n\t* Note: This is the default action for newly created history objects.\n\t*/\n\tAction[\"Pop\"] = \"POP\";\n\t/**\n\t* A PUSH indicates a new entry being added to the history stack, such as when\n\t* a link is clicked and a new page loads. When this happens, all subsequent\n\t* entries in the stack are lost.\n\t*/\n\tAction[\"Push\"] = \"PUSH\";\n\t/**\n\t* A REPLACE indicates the entry at the current index in the history stack\n\t* being replaced by a new one.\n\t*/\n\tAction[\"Replace\"] = \"REPLACE\";\n\treturn Action;\n}({});\nconst PopStateEventType = \"popstate\";\nfunction isLocation(obj) {\n\treturn typeof obj === \"object\" && obj != null && \"pathname\" in obj && \"search\" in obj && \"hash\" in obj && \"state\" in obj && \"key\" in obj;\n}\n/**\n* Memory history stores the current location in memory. It is designed for use\n* in stateful non-browser environments like tests and React Native.\n*/\nfunction createMemoryHistory(options = {}) {\n\tlet { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n\tlet entries;\n\tentries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : void 0, typeof entry === \"string\" ? void 0 : entry.mask));\n\tlet index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n\tlet action = \"POP\";\n\tlet listener = null;\n\tfunction clampIndex(n) {\n\t\treturn Math.min(Math.max(n, 0), entries.length - 1);\n\t}\n\tfunction getCurrentLocation() {\n\t\treturn entries[index];\n\t}\n\tfunction createMemoryLocation(to, state = null, key, mask) {\n\t\tlet location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key, mask);\n\t\twarning(location.pathname.charAt(0) === \"/\", `relative pathnames are not supported in memory history: ${JSON.stringify(to)}`);\n\t\treturn location;\n\t}\n\tfunction createHref(to) {\n\t\treturn typeof to === \"string\" ? to : createPath(to);\n\t}\n\treturn {\n\t\tget index() {\n\t\t\treturn index;\n\t\t},\n\t\tget action() {\n\t\t\treturn action;\n\t\t},\n\t\tget location() {\n\t\t\treturn getCurrentLocation();\n\t\t},\n\t\tcreateHref,\n\t\tcreateURL(to) {\n\t\t\treturn new URL(createHref(to), \"http://localhost\");\n\t\t},\n\t\tencodeLocation(to) {\n\t\t\tlet path = typeof to === \"string\" ? parsePath(to) : to;\n\t\t\treturn {\n\t\t\t\tpathname: path.pathname || \"\",\n\t\t\t\tsearch: path.search || \"\",\n\t\t\t\thash: path.hash || \"\"\n\t\t\t};\n\t\t},\n\t\tpush(to, state) {\n\t\t\taction = \"PUSH\";\n\t\t\tlet nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);\n\t\t\tindex += 1;\n\t\t\tentries.splice(index, entries.length, nextLocation);\n\t\t\tif (v5Compat && listener) listener({\n\t\t\t\taction,\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tdelta: 1\n\t\t\t});\n\t\t},\n\t\treplace(to, state) {\n\t\t\taction = \"REPLACE\";\n\t\t\tlet nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);\n\t\t\tentries[index] = nextLocation;\n\t\t\tif (v5Compat && listener) listener({\n\t\t\t\taction,\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tdelta: 0\n\t\t\t});\n\t\t},\n\t\tgo(delta) {\n\t\t\taction = \"POP\";\n\t\t\tlet nextIndex = clampIndex(index + delta);\n\t\t\tlet nextLocation = entries[nextIndex];\n\t\t\tindex = nextIndex;\n\t\t\tif (listener) listener({\n\t\t\t\taction,\n\t\t\t\tlocation: nextLocation,\n\t\t\t\tdelta\n\t\t\t});\n\t\t},\n\t\tlisten(fn) {\n\t\t\tlistener = fn;\n\t\t\treturn () => {\n\t\t\t\tlistener = null;\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* Browser history stores the location in regular URLs. This is the standard for\n* most web apps, but it requires some configuration on the server to ensure you\n* serve the same app at multiple URLs.\n*\n* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n*/\nfunction createBrowserHistory(options = {}) {\n\tfunction createBrowserLocation(window, globalHistory) {\n\t\tlet maskedLocation = globalHistory.state?.masked;\n\t\tlet { pathname, search, hash } = maskedLocation || window.location;\n\t\treturn createLocation(\"\", {\n\t\t\tpathname,\n\t\t\tsearch,\n\t\t\thash\n\t\t}, globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\", maskedLocation ? {\n\t\t\tpathname: window.location.pathname,\n\t\t\tsearch: window.location.search,\n\t\t\thash: window.location.hash\n\t\t} : void 0);\n\t}\n\tfunction createBrowserHref(window, to) {\n\t\treturn typeof to === \"string\" ? to : createPath(to);\n\t}\n\treturn getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n* Hash history stores the location in window.location.hash. This makes it ideal\n* for situations where you don't want to send the location to the server for\n* some reason, either because you do cannot configure it or the URL space is\n* reserved for something else.\n*\n* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n*/\nfunction createHashHistory(options = {}) {\n\tfunction createHashLocation(window, globalHistory) {\n\t\tlet { pathname = \"/\", search = \"\", hash = \"\" } = parsePath(window.location.hash.substring(1));\n\t\tif (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) pathname = \"/\" + pathname;\n\t\treturn createLocation(\"\", {\n\t\t\tpathname,\n\t\t\tsearch,\n\t\t\thash\n\t\t}, globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n\t}\n\tfunction createHashHref(window, to) {\n\t\tlet base = window.document.querySelector(\"base\");\n\t\tlet href = \"\";\n\t\tif (base && base.getAttribute(\"href\")) {\n\t\t\tlet url = window.location.href;\n\t\t\tlet hashIndex = url.indexOf(\"#\");\n\t\t\thref = hashIndex === -1 ? url : url.slice(0, hashIndex);\n\t\t}\n\t\treturn href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n\t}\n\tfunction validateHashLocation(location, to) {\n\t\twarning(location.pathname.charAt(0) === \"/\", `relative pathnames are not supported in hash history.push(${JSON.stringify(to)})`);\n\t}\n\treturn getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n\tif (value === false || value === null || typeof value === \"undefined\") throw new Error(message);\n}\nfunction warning(cond, message) {\n\tif (!cond) {\n\t\tif (typeof console !== \"undefined\") console.warn(message);\n\t\ttry {\n\t\t\tthrow new Error(message);\n\t\t} catch (e) {}\n\t}\n}\nfunction createKey() {\n\treturn Math.random().toString(36).substring(2, 10);\n}\n/**\n* For browser-based histories, we combine the state and key into an object\n*/\nfunction getHistoryState(location, index) {\n\treturn {\n\t\tusr: location.state,\n\t\tkey: location.key,\n\t\tidx: index,\n\t\tmasked: location.mask ? {\n\t\t\tpathname: location.pathname,\n\t\t\tsearch: location.search,\n\t\t\thash: location.hash\n\t\t} : void 0\n\t};\n}\n/**\n* Creates a Location object with a unique key from the given Path\n*/\nfunction createLocation(current, to, state = null, key, mask) {\n\treturn {\n\t\tpathname: typeof current === \"string\" ? current : current.pathname,\n\t\tsearch: \"\",\n\t\thash: \"\",\n\t\t...typeof to === \"string\" ? parsePath(to) : to,\n\t\tstate,\n\t\tkey: to && to.key || key || createKey(),\n\t\tmask\n\t};\n}\n/**\n* Creates a string URL path from the given pathname, search, and hash components.\n*\n* @public\n* @category Utils\n* @param path The pathname, search, and hash components to combine.\n* @returns The combined URL path.\n*/\nfunction createPath({ pathname = \"/\", search = \"\", hash = \"\" }) {\n\tif (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n\tif (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n\treturn pathname;\n}\n/**\n* Parses a string URL path into its separate pathname, search, and hash components.\n*\n* @public\n* @category Utils\n* @param path The URL path to parse.\n* @returns The parsed pathname, search, and hash components.\n*/\nfunction parsePath(path) {\n\tlet parsedPath = {};\n\tif (path) {\n\t\tlet hashIndex = path.indexOf(\"#\");\n\t\tif (hashIndex >= 0) {\n\t\t\tparsedPath.hash = path.substring(hashIndex);\n\t\t\tpath = path.substring(0, hashIndex);\n\t\t}\n\t\tlet searchIndex = path.indexOf(\"?\");\n\t\tif (searchIndex >= 0) {\n\t\t\tparsedPath.search = path.substring(searchIndex);\n\t\t\tpath = path.substring(0, searchIndex);\n\t\t}\n\t\tif (path) parsedPath.pathname = path;\n\t}\n\treturn parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options = {}) {\n\tlet { window = document.defaultView, v5Compat = false } = options;\n\tlet globalHistory = window.history;\n\tlet action = \"POP\";\n\tlet listener = null;\n\tlet index = getIndex();\n\tif (index == null) {\n\t\tindex = 0;\n\t\tglobalHistory.replaceState({\n\t\t\t...globalHistory.state,\n\t\t\tidx: index\n\t\t}, \"\");\n\t}\n\tfunction getIndex() {\n\t\treturn (globalHistory.state || { idx: null }).idx;\n\t}\n\tfunction handlePop() {\n\t\taction = \"POP\";\n\t\tlet nextIndex = getIndex();\n\t\tlet delta = nextIndex == null ? null : nextIndex - index;\n\t\tindex = nextIndex;\n\t\tif (listener) listener({\n\t\t\taction,\n\t\t\tlocation: history.location,\n\t\t\tdelta\n\t\t});\n\t}\n\tfunction push(to, state) {\n\t\taction = \"PUSH\";\n\t\tlet location = isLocation(to) ? to : createLocation(history.location, to, state);\n\t\tif (validateLocation) validateLocation(location, to);\n\t\tindex = getIndex() + 1;\n\t\tlet historyState = getHistoryState(location, index);\n\t\tlet url = history.createHref(location.mask || location);\n\t\ttry {\n\t\t\tglobalHistory.pushState(historyState, \"\", url);\n\t\t} catch (error) {\n\t\t\tif (error instanceof DOMException && error.name === \"DataCloneError\") throw error;\n\t\t\twindow.location.assign(url);\n\t\t}\n\t\tif (v5Compat && listener) listener({\n\t\t\taction,\n\t\t\tlocation: history.location,\n\t\t\tdelta: 1\n\t\t});\n\t}\n\tfunction replace(to, state) {\n\t\taction = \"REPLACE\";\n\t\tlet location = isLocation(to) ? to : createLocation(history.location, to, state);\n\t\tif (validateLocation) validateLocation(location, to);\n\t\tindex = getIndex();\n\t\tlet historyState = getHistoryState(location, index);\n\t\tlet url = history.createHref(location.mask || location);\n\t\tglobalHistory.replaceState(historyState, \"\", url);\n\t\tif (v5Compat && listener) listener({\n\t\t\taction,\n\t\t\tlocation: history.location,\n\t\t\tdelta: 0\n\t\t});\n\t}\n\tfunction createURL(to) {\n\t\treturn createBrowserURLImpl(window, to);\n\t}\n\tlet history = {\n\t\tget action() {\n\t\t\treturn action;\n\t\t},\n\t\tget location() {\n\t\t\treturn getLocation(window, globalHistory);\n\t\t},\n\t\tlisten(fn) {\n\t\t\tif (listener) throw new Error(\"A history only accepts one active listener\");\n\t\t\twindow.addEventListener(PopStateEventType, handlePop);\n\t\t\tlistener = fn;\n\t\t\treturn () => {\n\t\t\t\twindow.removeEventListener(PopStateEventType, handlePop);\n\t\t\t\tlistener = null;\n\t\t\t};\n\t\t},\n\t\tcreateHref(to) {\n\t\t\treturn createHref(window, to);\n\t\t},\n\t\tcreateURL,\n\t\tencodeLocation(to) {\n\t\t\tlet url = createURL(to);\n\t\t\treturn {\n\t\t\t\tpathname: url.pathname,\n\t\t\t\tsearch: url.search,\n\t\t\t\thash: url.hash\n\t\t\t};\n\t\t},\n\t\tpush,\n\t\treplace,\n\t\tgo(n) {\n\t\t\treturn globalHistory.go(n);\n\t\t}\n\t};\n\treturn history;\n}\nfunction createBrowserURLImpl(windowImpl, to, isAbsolute = false) {\n\tlet base = \"http://localhost\";\n\tif (windowImpl) base = windowImpl.location.origin !== \"null\" ? windowImpl.location.origin : windowImpl.location.href;\n\tinvariant(base, \"No window.location.(origin|href) available to create URL\");\n\tlet href = typeof to === \"string\" ? to : createPath(to);\n\thref = href.replace(/ $/, \"%20\");\n\tif (!isAbsolute && PROTOCOL_RELATIVE_URL_REGEX.test(href)) href = base + href;\n\treturn new URL(href, base);\n}\n//#endregion\nexport { Action, createBrowserHistory, createBrowserURLImpl, createHashHistory, createLocation, createMemoryHistory, createPath, invariant, parsePath, warning };\n"],"x_google_ignoreList":[0],"mappings":";;AAqCA,IAAM,IAAoB;AAC1B,SAAS,EAAW,GAAK;AACxB,QAAO,OAAO,KAAQ,cAAY,KAAe,cAAc,KAAO,YAAY,KAAO,UAAU,KAAO,WAAW,KAAO,SAAS;;AAgGtI,SAAS,EAAqB,IAAU,EAAE,EAAE;CAC3C,SAAS,EAAsB,GAAQ,GAAe;EACrD,IAAI,IAAiB,EAAc,OAAO,QACtC,EAAE,aAAU,WAAQ,YAAS,KAAkB,EAAO;AAC1D,SAAO,EAAe,IAAI;GACzB;GACA;GACA;GACA,EAAE,EAAc,SAAS,EAAc,MAAM,OAAO,MAAM,EAAc,SAAS,EAAc,MAAM,OAAO,WAAW,IAAiB;GACxI,UAAU,EAAO,SAAS;GAC1B,QAAQ,EAAO,SAAS;GACxB,MAAM,EAAO,SAAS;GACtB,GAAG,KAAK,EAAE;;CAEZ,SAAS,EAAkB,GAAQ,GAAI;AACtC,SAAO,OAAO,KAAO,WAAW,IAAK,EAAW,EAAG;;AAEpD,QAAO,EAAmB,GAAuB,GAAmB,MAAM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