@entur-partner/common 11.2.6 → 11.2.8
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/ActionBar.d.ts +4 -4
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +154 -1469
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { assertIsDefined as r, hasAllPermissions as i, hasOneOfPermissions as a, isDate as o, isDateString as s, isFunction as c, isString as l, localeDate as u, localeDateTime as d, splitUrlPath as f } from "@entur-partner/util";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Modal as
|
|
8
|
-
import { Heading6 as
|
|
9
|
-
import { BannerAlertBox as
|
|
10
|
-
import { ExpandablePanel as
|
|
11
|
-
import { SegmentedChoice as
|
|
12
|
-
import { SearchableDropdown as
|
|
13
|
-
import { ChannelsIcon as
|
|
3
|
+
import { Children as p, Component as m, useEffect as h, useRef as g, useState as _ } from "react";
|
|
4
|
+
import { BreadcrumbItem as v, BreadcrumbNavigation as y, Pagination as b } from "@entur/menu";
|
|
5
|
+
import { Link as x, useBlocker as S, useInRouterContext as C } from "react-router-dom";
|
|
6
|
+
import { Button as w, ButtonGroup as T, PrimaryButton as E, SecondaryButton as D } from "@entur/button";
|
|
7
|
+
import { Modal as O } from "@entur/modal";
|
|
8
|
+
import { Heading6 as k, Link as A, Paragraph as j } from "@entur/typography";
|
|
9
|
+
import { BannerAlertBox as M } from "@entur/alert";
|
|
10
|
+
import { ExpandablePanel as N } from "@entur/expand";
|
|
11
|
+
import { SegmentedChoice as P, SegmentedControl as F } from "@entur/form";
|
|
12
|
+
import { SearchableDropdown as I } from "@entur/dropdown";
|
|
13
|
+
import { ChannelsIcon as L, CookieIcon as ee, DownArrowIcon as te, LogOutIcon as ne, NorwayIcon as re, UKIcon as ie, UserIcon as R } from "@entur/icons";
|
|
14
14
|
//#region \0rolldown/runtime.js
|
|
15
|
-
var
|
|
16
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
15
|
+
var ae = Object.create, z = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, se = Object.getOwnPropertyNames, ce = Object.getPrototypeOf, le = Object.prototype.hasOwnProperty, ue = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), de = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = se(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !le.call(e, s) && s !== n && z(e, s, {
|
|
17
17
|
get: ((e) => t[e]).bind(null, s),
|
|
18
|
-
enumerable: !(r =
|
|
18
|
+
enumerable: !(r = oe(t, s)) || r.enumerable
|
|
19
19
|
});
|
|
20
20
|
return e;
|
|
21
|
-
},
|
|
21
|
+
}, fe = (e, t, n) => (n = e == null ? {} : ae(ce(e)), de(t || !e || !e.__esModule ? z(n, "default", {
|
|
22
22
|
value: e,
|
|
23
23
|
enumerable: !0
|
|
24
|
-
}) : n, e)),
|
|
24
|
+
}) : n, e)), pe = ({ children: e }) => /* @__PURE__ */ t("div", {
|
|
25
25
|
className: "eps-action-bar-left",
|
|
26
26
|
children: e
|
|
27
|
-
}),
|
|
27
|
+
}), me = ({ children: e }) => /* @__PURE__ */ t("div", {
|
|
28
28
|
className: "eps-action-bar-right",
|
|
29
29
|
children: e
|
|
30
|
-
}),
|
|
30
|
+
}), he = ({ children: r }) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", { className: "eps-action-bar-padding" }), /* @__PURE__ */ t("div", {
|
|
31
31
|
className: "eps-action-bar",
|
|
32
32
|
children: r
|
|
33
|
-
})] }),
|
|
33
|
+
})] }), B = /* @__PURE__ */ fe((/* @__PURE__ */ ue(((e, t) => {
|
|
34
34
|
(function() {
|
|
35
35
|
var e = {}.hasOwnProperty;
|
|
36
36
|
function n() {
|
|
@@ -56,1411 +56,96 @@ var fe = Object.create, pe = Object.defineProperty, me = Object.getOwnPropertyDe
|
|
|
56
56
|
return n;
|
|
57
57
|
}) : window.classNames = n;
|
|
58
58
|
})();
|
|
59
|
-
})))(), 1),
|
|
59
|
+
})))(), 1), V = ({ date: e, locale: n, as: r = "main", hideTime: i, ...a }) => /* @__PURE__ */ t(r, {
|
|
60
60
|
...a,
|
|
61
61
|
children: i ? u(e, n) : d(e, n)
|
|
62
62
|
});
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/Box.tsx
|
|
65
|
-
function
|
|
65
|
+
function H(e, t) {
|
|
66
66
|
if (Array.isArray(t)) {
|
|
67
67
|
let n = [];
|
|
68
68
|
return t[0] && n.push(e + t[0]), t[1] && n.push(`${e}${t[1]}-lg`), t[2] && n.push(`${e}${t[2]}-xl`), n;
|
|
69
69
|
}
|
|
70
70
|
return [e + t];
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
let
|
|
74
|
-
return r &&
|
|
75
|
-
className: (0,
|
|
76
|
-
...
|
|
72
|
+
var U = ({ as: e = "div", children: n, contrast: r, paddingTop: i, paddingRight: a, paddingBottom: o, paddingLeft: s, paddingX: c, paddingY: l, padding: u, marginTop: d, marginRight: f, marginBottom: p, marginLeft: m, marginX: h, marginY: g, margin: _, display: v, justifyContent: y, alignItems: b, maxWidth: x, width: S, background: C, color: w, flexDirection: T, flexWrap: E, className: D, ...O }) => {
|
|
73
|
+
let k = [], A = i || l || u, j = o || l || u, M = s || c || u, N = a || c || u, P = d || g || _, F = p || g || _, I = m || h || _, L = f || h || _;
|
|
74
|
+
return r && k.push("eds-contrast"), A && k.push(...H("eps-pt-", A)), j && k.push(...H("eps-pb-", j)), M && k.push(...H("eps-pl-", M)), N && k.push(...H("eps-pr-", N)), P && k.push(...H("eps-mt-", P)), F && k.push(...H("eps-mb-", F)), I && k.push(...H("eps-ml-", I)), L && k.push(...H("eps-mr-", L)), v && k.push(...H("eps-", v)), y && k.push(...H("eps-justify-", y)), b && k.push(...H("eps-items-", b)), x && k.push(...H("eps-max-w-", x)), S && k.push(...H("eps-w-", S)), w && k.push(`eps-color-${w}`), C && k.push(`eps-bg-${C}`), T && k.push(...H("eps-flex-", T)), E && k.push(...H("eps-flex-wrap-", E)), /* @__PURE__ */ t(e, {
|
|
75
|
+
className: (0, B.default)(k, D),
|
|
76
|
+
...O,
|
|
77
77
|
children: n
|
|
78
78
|
});
|
|
79
|
-
},
|
|
80
|
-
let a =
|
|
79
|
+
}, W = ({ children: n, space: r, className: i }) => {
|
|
80
|
+
let a = p.toArray(n);
|
|
81
81
|
return a.length <= 1 ? /* @__PURE__ */ t(e, { children: a }) : /* @__PURE__ */ t("div", {
|
|
82
82
|
className: i,
|
|
83
|
-
children: a.map((e, n) => n === a.length - 1 ? /* @__PURE__ */ t("div", { children: e }, n) : /* @__PURE__ */ t(
|
|
83
|
+
children: a.map((e, n) => n === a.length - 1 ? /* @__PURE__ */ t("div", { children: e }, n) : /* @__PURE__ */ t(U, {
|
|
84
84
|
paddingBottom: r,
|
|
85
85
|
children: e
|
|
86
86
|
}, n))
|
|
87
87
|
});
|
|
88
|
-
},
|
|
89
|
-
className: (0,
|
|
88
|
+
}, ge = ({ items: e, locale: r, className: i, ...a }) => /* @__PURE__ */ t("div", {
|
|
89
|
+
className: (0, B.default)("ep-audit-info", i),
|
|
90
90
|
...a,
|
|
91
|
-
children: e.map(({ label: e, value: i }) => /* @__PURE__ */ n(
|
|
91
|
+
children: e.map(({ label: e, value: i }) => /* @__PURE__ */ n(W, {
|
|
92
92
|
space: "small",
|
|
93
93
|
children: [/* @__PURE__ */ t("div", {
|
|
94
94
|
className: "ep-audit-info-label",
|
|
95
95
|
children: e
|
|
96
|
-
}), /* @__PURE__ */ t("div", { children: o(i) || s(i) ? /* @__PURE__ */ t(
|
|
96
|
+
}), /* @__PURE__ */ t("div", { children: o(i) || s(i) ? /* @__PURE__ */ t(V, {
|
|
97
97
|
date: i,
|
|
98
98
|
locale: r
|
|
99
99
|
}) : /* @__PURE__ */ t("span", { children: i }) })]
|
|
100
100
|
}, i.toString()))
|
|
101
|
-
})
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region ../../node_modules/react-router/dist/development/chunk-QFMPRPBF.mjs
|
|
104
|
-
function P(e, t) {
|
|
105
|
-
if (e === !1 || e == null) throw Error(t);
|
|
106
|
-
}
|
|
107
|
-
function F(e, t) {
|
|
108
|
-
if (!e) {
|
|
109
|
-
typeof console < "u" && console.warn(t);
|
|
110
|
-
try {
|
|
111
|
-
throw Error(t);
|
|
112
|
-
} catch {}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
function Ee({ pathname: e = "/", search: t = "", hash: n = "" }) {
|
|
116
|
-
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
117
|
-
}
|
|
118
|
-
function I(e) {
|
|
119
|
-
let t = {};
|
|
120
|
-
if (e) {
|
|
121
|
-
let n = e.indexOf("#");
|
|
122
|
-
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
123
|
-
let r = e.indexOf("?");
|
|
124
|
-
r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
|
|
125
|
-
}
|
|
126
|
-
return t;
|
|
127
|
-
}
|
|
128
|
-
function De(e, t, n = "/") {
|
|
129
|
-
return Oe(e, t, n, !1);
|
|
130
|
-
}
|
|
131
|
-
function Oe(e, t, n, r) {
|
|
132
|
-
let i = L((typeof t == "string" ? I(t) : t).pathname || "/", n);
|
|
133
|
-
if (i == null) return null;
|
|
134
|
-
let a = Ae(e);
|
|
135
|
-
Me(a);
|
|
136
|
-
let o = null;
|
|
137
|
-
for (let e = 0; o == null && e < a.length; ++e) {
|
|
138
|
-
let t = Ge(i);
|
|
139
|
-
o = He(a[e], t, r);
|
|
140
|
-
}
|
|
141
|
-
return o;
|
|
142
|
-
}
|
|
143
|
-
function ke(e, t) {
|
|
144
|
-
let { route: n, pathname: r, params: i } = e;
|
|
145
|
-
return {
|
|
146
|
-
id: n.id,
|
|
147
|
-
pathname: r,
|
|
148
|
-
params: i,
|
|
149
|
-
data: t[n.id],
|
|
150
|
-
loaderData: t[n.id],
|
|
151
|
-
handle: n.handle
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function Ae(e, t = [], n = [], r = "", i = !1) {
|
|
155
|
-
let a = (e, a, o = i, s) => {
|
|
156
|
-
let c = {
|
|
157
|
-
relativePath: s === void 0 ? e.path || "" : s,
|
|
158
|
-
caseSensitive: e.caseSensitive === !0,
|
|
159
|
-
childrenIndex: a,
|
|
160
|
-
route: e
|
|
161
|
-
};
|
|
162
|
-
if (c.relativePath.startsWith("/")) {
|
|
163
|
-
if (!c.relativePath.startsWith(r) && o) return;
|
|
164
|
-
P(c.relativePath.startsWith(r), `Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), c.relativePath = c.relativePath.slice(r.length);
|
|
165
|
-
}
|
|
166
|
-
let l = R([r, c.relativePath]), u = n.concat(c);
|
|
167
|
-
e.children && e.children.length > 0 && (P(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), Ae(e.children, t, u, l, o)), !(e.path == null && !e.index) && t.push({
|
|
168
|
-
path: l,
|
|
169
|
-
score: Be(l, e.index),
|
|
170
|
-
routesMeta: u
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
|
-
return e.forEach((e, t) => {
|
|
174
|
-
if (e.path === "" || !e.path?.includes("?")) a(e, t);
|
|
175
|
-
else for (let n of je(e.path)) a(e, t, !0, n);
|
|
176
|
-
}), t;
|
|
177
|
-
}
|
|
178
|
-
function je(e) {
|
|
179
|
-
let t = e.split("/");
|
|
180
|
-
if (t.length === 0) return [];
|
|
181
|
-
let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
|
|
182
|
-
if (r.length === 0) return i ? [a, ""] : [a];
|
|
183
|
-
let o = je(r.join("/")), s = [];
|
|
184
|
-
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
|
|
185
|
-
}
|
|
186
|
-
function Me(e) {
|
|
187
|
-
e.sort((e, t) => e.score === t.score ? Ve(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
|
|
188
|
-
}
|
|
189
|
-
var Ne = /^:[\w-]+$/, Pe = 3, Fe = 2, Ie = 1, Le = 10, Re = -2, ze = (e) => e === "*";
|
|
190
|
-
function Be(e, t) {
|
|
191
|
-
let n = e.split("/"), r = n.length;
|
|
192
|
-
return n.some(ze) && (r += Re), t && (r += Fe), n.filter((e) => !ze(e)).reduce((e, t) => e + (Ne.test(t) ? Pe : t === "" ? Ie : Le), r);
|
|
193
|
-
}
|
|
194
|
-
function Ve(e, t) {
|
|
195
|
-
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
|
|
196
|
-
}
|
|
197
|
-
function He(e, t, n = !1) {
|
|
198
|
-
let { routesMeta: r } = e, i = {}, a = "/", o = [];
|
|
199
|
-
for (let e = 0; e < r.length; ++e) {
|
|
200
|
-
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = Ue({
|
|
201
|
-
path: s.relativePath,
|
|
202
|
-
caseSensitive: s.caseSensitive,
|
|
203
|
-
end: c
|
|
204
|
-
}, l), d = s.route;
|
|
205
|
-
if (!u && c && n && !r[r.length - 1].route.index && (u = Ue({
|
|
206
|
-
path: s.relativePath,
|
|
207
|
-
caseSensitive: s.caseSensitive,
|
|
208
|
-
end: !1
|
|
209
|
-
}, l)), !u) return null;
|
|
210
|
-
Object.assign(i, u.params), o.push({
|
|
211
|
-
params: i,
|
|
212
|
-
pathname: R([a, u.pathname]),
|
|
213
|
-
pathnameBase: $e(R([a, u.pathnameBase])),
|
|
214
|
-
route: d
|
|
215
|
-
}), u.pathnameBase !== "/" && (a = R([a, u.pathnameBase]));
|
|
216
|
-
}
|
|
217
|
-
return o;
|
|
218
|
-
}
|
|
219
|
-
function Ue(e, t) {
|
|
220
|
-
typeof e == "string" && (e = {
|
|
221
|
-
path: e,
|
|
222
|
-
caseSensitive: !1,
|
|
223
|
-
end: !0
|
|
224
|
-
});
|
|
225
|
-
let [n, r] = We(e.path, e.caseSensitive, e.end), i = t.match(n);
|
|
226
|
-
if (!i) return null;
|
|
227
|
-
let a = i[0], o = a.replace(/(.)\/+$/, "$1"), s = i.slice(1);
|
|
228
|
-
return {
|
|
229
|
-
params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
|
|
230
|
-
if (t === "*") {
|
|
231
|
-
let e = s[r] || "";
|
|
232
|
-
o = a.slice(0, a.length - e.length).replace(/(.)\/+$/, "$1");
|
|
233
|
-
}
|
|
234
|
-
let i = s[r];
|
|
235
|
-
return n && !i ? e[t] = void 0 : e[t] = (i || "").replace(/%2F/g, "/"), e;
|
|
236
|
-
}, {}),
|
|
237
|
-
pathname: a,
|
|
238
|
-
pathnameBase: o,
|
|
239
|
-
pattern: e
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
function We(e, t = !1, n = !0) {
|
|
243
|
-
F(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
|
|
244
|
-
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
|
|
245
|
-
if (r.push({
|
|
246
|
-
paramName: t,
|
|
247
|
-
isOptional: n != null
|
|
248
|
-
}), n) {
|
|
249
|
-
let t = a.charAt(i + e.length);
|
|
250
|
-
return t && t !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
251
|
-
}
|
|
252
|
-
return "/([^\\/]+)";
|
|
253
|
-
}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
254
|
-
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
|
|
255
|
-
}
|
|
256
|
-
function Ge(e) {
|
|
257
|
-
try {
|
|
258
|
-
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
|
|
259
|
-
} catch (t) {
|
|
260
|
-
return F(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
function L(e, t) {
|
|
264
|
-
if (t === "/") return e;
|
|
265
|
-
if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
|
|
266
|
-
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
|
|
267
|
-
return r && r !== "/" ? null : e.slice(n) || "/";
|
|
268
|
-
}
|
|
269
|
-
var Ke = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
270
|
-
function qe(e, t = "/") {
|
|
271
|
-
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? I(e) : e, a;
|
|
272
|
-
return n ? (n = n.replace(/\/\/+/g, "/"), a = n.startsWith("/") ? Je(n.substring(1), "/") : Je(n, t)) : a = t, {
|
|
273
|
-
pathname: a,
|
|
274
|
-
search: et(r),
|
|
275
|
-
hash: tt(i)
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
function Je(e, t) {
|
|
279
|
-
let n = t.replace(/\/+$/, "").split("/");
|
|
280
|
-
return e.split("/").forEach((e) => {
|
|
281
|
-
e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
|
|
282
|
-
}), n.length > 1 ? n.join("/") : "/";
|
|
283
|
-
}
|
|
284
|
-
function Ye(e, t, n, r) {
|
|
285
|
-
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
286
|
-
}
|
|
287
|
-
function Xe(e) {
|
|
288
|
-
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
|
|
289
|
-
}
|
|
290
|
-
function Ze(e) {
|
|
291
|
-
let t = Xe(e);
|
|
292
|
-
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
|
|
293
|
-
}
|
|
294
|
-
function Qe(e, t, n, r = !1) {
|
|
295
|
-
let i;
|
|
296
|
-
typeof e == "string" ? i = I(e) : (i = { ...e }, P(!i.pathname || !i.pathname.includes("?"), Ye("?", "pathname", "search", i)), P(!i.pathname || !i.pathname.includes("#"), Ye("#", "pathname", "hash", i)), P(!i.search || !i.search.includes("#"), Ye("#", "search", "hash", i)));
|
|
297
|
-
let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
|
|
298
|
-
if (o == null) s = n;
|
|
299
|
-
else {
|
|
300
|
-
let e = t.length - 1;
|
|
301
|
-
if (!r && o.startsWith("..")) {
|
|
302
|
-
let t = o.split("/");
|
|
303
|
-
for (; t[0] === "..";) t.shift(), --e;
|
|
304
|
-
i.pathname = t.join("/");
|
|
305
|
-
}
|
|
306
|
-
s = e >= 0 ? t[e] : "/";
|
|
307
|
-
}
|
|
308
|
-
let c = qe(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
|
|
309
|
-
return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
|
|
310
|
-
}
|
|
311
|
-
var R = (e) => e.join("/").replace(/\/\/+/g, "/"), $e = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), et = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, tt = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, nt = class {
|
|
312
|
-
constructor(e, t, n, r = !1) {
|
|
313
|
-
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
function rt(e) {
|
|
317
|
-
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
318
|
-
}
|
|
319
|
-
function it(e) {
|
|
320
|
-
return e.map((e) => e.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
321
|
-
}
|
|
322
|
-
var at = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
323
|
-
function ot(e, t) {
|
|
324
|
-
let n = e;
|
|
325
|
-
if (typeof n != "string" || !Ke.test(n)) return {
|
|
326
|
-
absoluteURL: void 0,
|
|
327
|
-
isExternal: !1,
|
|
328
|
-
to: n
|
|
329
|
-
};
|
|
330
|
-
let r = n, i = !1;
|
|
331
|
-
if (at) try {
|
|
332
|
-
let e = new URL(window.location.href), r = n.startsWith("//") ? new URL(e.protocol + n) : new URL(n), a = L(r.pathname, t);
|
|
333
|
-
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
|
|
334
|
-
} catch {
|
|
335
|
-
F(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
|
|
336
|
-
}
|
|
337
|
-
return {
|
|
338
|
-
absoluteURL: r,
|
|
339
|
-
isExternal: i,
|
|
340
|
-
to: n
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
344
|
-
var st = [
|
|
345
|
-
"POST",
|
|
346
|
-
"PUT",
|
|
347
|
-
"PATCH",
|
|
348
|
-
"DELETE"
|
|
349
|
-
];
|
|
350
|
-
new Set(st);
|
|
351
|
-
var ct = ["GET", ...st];
|
|
352
|
-
new Set(ct);
|
|
353
|
-
var lt = {
|
|
354
|
-
state: "unblocked",
|
|
355
|
-
proceed: void 0,
|
|
356
|
-
reset: void 0,
|
|
357
|
-
location: void 0
|
|
358
|
-
}, z = p.createContext(null);
|
|
359
|
-
z.displayName = "DataRouter";
|
|
360
|
-
var B = p.createContext(null);
|
|
361
|
-
B.displayName = "DataRouterState";
|
|
362
|
-
var ut = p.createContext(!1);
|
|
363
|
-
function dt() {
|
|
364
|
-
return p.useContext(ut);
|
|
365
|
-
}
|
|
366
|
-
var ft = p.createContext({ isTransitioning: !1 });
|
|
367
|
-
ft.displayName = "ViewTransition";
|
|
368
|
-
var pt = p.createContext(/* @__PURE__ */ new Map());
|
|
369
|
-
pt.displayName = "Fetchers";
|
|
370
|
-
var mt = p.createContext(null);
|
|
371
|
-
mt.displayName = "Await";
|
|
372
|
-
var V = p.createContext(null);
|
|
373
|
-
V.displayName = "Navigation";
|
|
374
|
-
var H = p.createContext(null);
|
|
375
|
-
H.displayName = "Location";
|
|
376
|
-
var U = p.createContext({
|
|
377
|
-
outlet: null,
|
|
378
|
-
matches: [],
|
|
379
|
-
isDataRoute: !1
|
|
380
|
-
});
|
|
381
|
-
U.displayName = "Route";
|
|
382
|
-
var ht = p.createContext(null);
|
|
383
|
-
ht.displayName = "RouteError";
|
|
384
|
-
var gt = "REACT_ROUTER_ERROR", _t = "REDIRECT", vt = "ROUTE_ERROR_RESPONSE";
|
|
385
|
-
function yt(e) {
|
|
386
|
-
if (e.startsWith(`${gt}:${_t}:{`)) try {
|
|
387
|
-
let t = JSON.parse(e.slice(28));
|
|
388
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
|
|
389
|
-
} catch {}
|
|
390
|
-
}
|
|
391
|
-
function bt(e) {
|
|
392
|
-
if (e.startsWith(`${gt}:${vt}:{`)) try {
|
|
393
|
-
let t = JSON.parse(e.slice(40));
|
|
394
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new nt(t.status, t.statusText, t.data);
|
|
395
|
-
} catch {}
|
|
396
|
-
}
|
|
397
|
-
function xt(e, { relative: t } = {}) {
|
|
398
|
-
P(W(), "useHref() may be used only in the context of a <Router> component.");
|
|
399
|
-
let { basename: n, navigator: r } = p.useContext(V), { hash: i, pathname: a, search: o } = K(e, { relative: t }), s = a;
|
|
400
|
-
return n !== "/" && (s = a === "/" ? n : R([n, a])), r.createHref({
|
|
401
|
-
pathname: s,
|
|
402
|
-
search: o,
|
|
403
|
-
hash: i
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
function W() {
|
|
407
|
-
return p.useContext(H) != null;
|
|
408
|
-
}
|
|
409
|
-
function G() {
|
|
410
|
-
return P(W(), "useLocation() may be used only in the context of a <Router> component."), p.useContext(H).location;
|
|
411
|
-
}
|
|
412
|
-
var St = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
413
|
-
function Ct(e) {
|
|
414
|
-
p.useContext(V).static || p.useLayoutEffect(e);
|
|
415
|
-
}
|
|
416
|
-
function wt() {
|
|
417
|
-
let { isDataRoute: e } = p.useContext(U);
|
|
418
|
-
return e ? Wt() : Tt();
|
|
419
|
-
}
|
|
420
|
-
function Tt() {
|
|
421
|
-
P(W(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
422
|
-
let e = p.useContext(z), { basename: t, navigator: n } = p.useContext(V), { matches: r } = p.useContext(U), { pathname: i } = G(), a = JSON.stringify(Ze(r)), o = p.useRef(!1);
|
|
423
|
-
return Ct(() => {
|
|
424
|
-
o.current = !0;
|
|
425
|
-
}), p.useCallback((r, s = {}) => {
|
|
426
|
-
if (F(o.current, St), !o.current) return;
|
|
427
|
-
if (typeof r == "number") {
|
|
428
|
-
n.go(r);
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
let c = Qe(r, JSON.parse(a), i, s.relative === "path");
|
|
432
|
-
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : R([t, c.pathname])), (s.replace ? n.replace : n.push)(c, s.state, s);
|
|
433
|
-
}, [
|
|
434
|
-
t,
|
|
435
|
-
n,
|
|
436
|
-
a,
|
|
437
|
-
i,
|
|
438
|
-
e
|
|
439
|
-
]);
|
|
440
|
-
}
|
|
441
|
-
p.createContext(null);
|
|
442
|
-
function K(e, { relative: t } = {}) {
|
|
443
|
-
let { matches: n } = p.useContext(U), { pathname: r } = G(), i = JSON.stringify(Ze(n));
|
|
444
|
-
return p.useMemo(() => Qe(e, JSON.parse(i), r, t === "path"), [
|
|
445
|
-
e,
|
|
446
|
-
i,
|
|
447
|
-
r,
|
|
448
|
-
t
|
|
449
|
-
]);
|
|
450
|
-
}
|
|
451
|
-
function Et(e, t, n) {
|
|
452
|
-
P(W(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
453
|
-
let { navigator: r } = p.useContext(V), { matches: i } = p.useContext(U), a = i[i.length - 1], o = a ? a.params : {}, s = a ? a.pathname : "/", c = a ? a.pathnameBase : "/", l = a && a.route;
|
|
454
|
-
{
|
|
455
|
-
let e = l && l.path || "";
|
|
456
|
-
Kt(s, !l || e.endsWith("*") || e.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
457
|
-
|
|
458
|
-
Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" : `${e}/*`}">.`);
|
|
459
|
-
}
|
|
460
|
-
let u = G(), d;
|
|
461
|
-
if (t) {
|
|
462
|
-
let e = typeof t == "string" ? I(t) : t;
|
|
463
|
-
P(c === "/" || e.pathname?.startsWith(c), `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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`), d = e;
|
|
464
|
-
} else d = u;
|
|
465
|
-
let f = d.pathname || "/", m = f;
|
|
466
|
-
if (c !== "/") {
|
|
467
|
-
let e = c.replace(/^\//, "").split("/");
|
|
468
|
-
m = "/" + f.replace(/^\//, "").split("/").slice(e.length).join("/");
|
|
469
|
-
}
|
|
470
|
-
let h = De(e, { pathname: m });
|
|
471
|
-
F(l || h != null, `No routes matched location "${d.pathname}${d.search}${d.hash}" `), F(h == null || h[h.length - 1].route.element !== void 0 || h[h.length - 1].route.Component !== void 0 || h[h.length - 1].route.lazy !== void 0, `Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
|
|
472
|
-
let g = Nt(h && h.map((e) => Object.assign({}, e, {
|
|
473
|
-
params: Object.assign({}, o, e.params),
|
|
474
|
-
pathname: R([c, r.encodeLocation ? r.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
|
|
475
|
-
pathnameBase: e.pathnameBase === "/" ? c : R([c, r.encodeLocation ? r.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
|
|
476
|
-
})), i, n);
|
|
477
|
-
return t && g ? /* @__PURE__ */ p.createElement(H.Provider, { value: {
|
|
478
|
-
location: {
|
|
479
|
-
pathname: "/",
|
|
480
|
-
search: "",
|
|
481
|
-
hash: "",
|
|
482
|
-
state: null,
|
|
483
|
-
key: "default",
|
|
484
|
-
unstable_mask: void 0,
|
|
485
|
-
...d
|
|
486
|
-
},
|
|
487
|
-
navigationType: "POP"
|
|
488
|
-
} }, g) : g;
|
|
489
|
-
}
|
|
490
|
-
function Dt() {
|
|
491
|
-
let e = Vt(), t = rt(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, r = "rgba(200,200,200, 0.5)", i = {
|
|
492
|
-
padding: "0.5rem",
|
|
493
|
-
backgroundColor: r
|
|
494
|
-
}, a = {
|
|
495
|
-
padding: "2px 4px",
|
|
496
|
-
backgroundColor: r
|
|
497
|
-
}, o = null;
|
|
498
|
-
return console.error("Error handled by React Router default ErrorBoundary:", e), o = /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ p.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ p.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ p.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ p.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ p.createElement("pre", { style: i }, n) : null, o);
|
|
499
|
-
}
|
|
500
|
-
var Ot = /* @__PURE__ */ p.createElement(Dt, null), kt = class extends p.Component {
|
|
501
|
-
constructor(e) {
|
|
502
|
-
super(e), this.state = {
|
|
503
|
-
location: e.location,
|
|
504
|
-
revalidation: e.revalidation,
|
|
505
|
-
error: e.error
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
static getDerivedStateFromError(e) {
|
|
509
|
-
return { error: e };
|
|
510
|
-
}
|
|
511
|
-
static getDerivedStateFromProps(e, t) {
|
|
512
|
-
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
513
|
-
error: e.error,
|
|
514
|
-
location: e.location,
|
|
515
|
-
revalidation: e.revalidation
|
|
516
|
-
} : {
|
|
517
|
-
error: e.error === void 0 ? t.error : e.error,
|
|
518
|
-
location: t.location,
|
|
519
|
-
revalidation: e.revalidation || t.revalidation
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
componentDidCatch(e, t) {
|
|
523
|
-
this.props.onError ? this.props.onError(e, t) : console.error("React Router caught the following error during render", e);
|
|
524
|
-
}
|
|
525
|
-
render() {
|
|
526
|
-
let e = this.state.error;
|
|
527
|
-
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
528
|
-
let t = bt(e.digest);
|
|
529
|
-
t && (e = t);
|
|
530
|
-
}
|
|
531
|
-
let t = e === void 0 ? this.props.children : /* @__PURE__ */ p.createElement(U.Provider, { value: this.props.routeContext }, /* @__PURE__ */ p.createElement(ht.Provider, {
|
|
532
|
-
value: e,
|
|
533
|
-
children: this.props.component
|
|
534
|
-
}));
|
|
535
|
-
return this.context ? /* @__PURE__ */ p.createElement(jt, { error: e }, t) : t;
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
kt.contextType = ut;
|
|
539
|
-
var At = /* @__PURE__ */ new WeakMap();
|
|
540
|
-
function jt({ children: e, error: t }) {
|
|
541
|
-
let { basename: n } = p.useContext(V);
|
|
542
|
-
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
543
|
-
let e = yt(t.digest);
|
|
544
|
-
if (e) {
|
|
545
|
-
let r = At.get(t);
|
|
546
|
-
if (r) throw r;
|
|
547
|
-
let i = ot(e.location, n);
|
|
548
|
-
if (at && !At.get(t)) if (i.isExternal || e.reloadDocument) window.location.href = i.absoluteURL || i.to;
|
|
549
|
-
else {
|
|
550
|
-
let n = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(i.to, { replace: e.replace }));
|
|
551
|
-
throw At.set(t, n), n;
|
|
552
|
-
}
|
|
553
|
-
return /* @__PURE__ */ p.createElement("meta", {
|
|
554
|
-
httpEquiv: "refresh",
|
|
555
|
-
content: `0;url=${i.absoluteURL || i.to}`
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
return e;
|
|
560
|
-
}
|
|
561
|
-
function Mt({ routeContext: e, match: t, children: n }) {
|
|
562
|
-
let r = p.useContext(z);
|
|
563
|
-
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ p.createElement(U.Provider, { value: e }, n);
|
|
564
|
-
}
|
|
565
|
-
function Nt(e, t = [], n) {
|
|
566
|
-
let r = n?.state;
|
|
567
|
-
if (e == null) {
|
|
568
|
-
if (!r) return null;
|
|
569
|
-
if (r.errors) e = r.matches;
|
|
570
|
-
else if (t.length === 0 && !r.initialized && r.matches.length > 0) e = r.matches;
|
|
571
|
-
else return null;
|
|
572
|
-
}
|
|
573
|
-
let i = e, a = r?.errors;
|
|
574
|
-
if (a != null) {
|
|
575
|
-
let e = i.findIndex((e) => e.route.id && a?.[e.route.id] !== void 0);
|
|
576
|
-
P(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`), i = i.slice(0, Math.min(i.length, e + 1));
|
|
577
|
-
}
|
|
578
|
-
let o = !1, s = -1;
|
|
579
|
-
if (n && r) {
|
|
580
|
-
o = r.renderFallback;
|
|
581
|
-
for (let e = 0; e < i.length; e++) {
|
|
582
|
-
let t = i[e];
|
|
583
|
-
if ((t.route.HydrateFallback || t.route.hydrateFallbackElement) && (s = e), t.route.id) {
|
|
584
|
-
let { loaderData: e, errors: a } = r, c = t.route.loader && !e.hasOwnProperty(t.route.id) && (!a || a[t.route.id] === void 0);
|
|
585
|
-
if (t.route.lazy || c) {
|
|
586
|
-
n.isStatic && (o = !0), i = s >= 0 ? i.slice(0, s + 1) : [i[0]];
|
|
587
|
-
break;
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
let c = n?.onError, l = r && c ? (e, t) => {
|
|
593
|
-
c(e, {
|
|
594
|
-
location: r.location,
|
|
595
|
-
params: r.matches?.[0]?.params ?? {},
|
|
596
|
-
unstable_pattern: it(r.matches),
|
|
597
|
-
errorInfo: t
|
|
598
|
-
});
|
|
599
|
-
} : void 0;
|
|
600
|
-
return i.reduceRight((e, n, c) => {
|
|
601
|
-
let u, d = !1, f = null, m = null;
|
|
602
|
-
r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || Ot, o && (s < 0 && c === 0 ? (Kt("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, m = null) : s === c && (d = !0, m = n.route.hydrateFallbackElement || null)));
|
|
603
|
-
let h = t.concat(i.slice(0, c + 1)), g = () => {
|
|
604
|
-
let t;
|
|
605
|
-
return t = u ? f : d ? m : n.route.Component ? /* @__PURE__ */ p.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ p.createElement(Mt, {
|
|
606
|
-
match: n,
|
|
607
|
-
routeContext: {
|
|
608
|
-
outlet: e,
|
|
609
|
-
matches: h,
|
|
610
|
-
isDataRoute: r != null
|
|
611
|
-
},
|
|
612
|
-
children: t
|
|
613
|
-
});
|
|
614
|
-
};
|
|
615
|
-
return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ p.createElement(kt, {
|
|
616
|
-
location: r.location,
|
|
617
|
-
revalidation: r.revalidation,
|
|
618
|
-
component: f,
|
|
619
|
-
error: u,
|
|
620
|
-
children: g(),
|
|
621
|
-
routeContext: {
|
|
622
|
-
outlet: null,
|
|
623
|
-
matches: h,
|
|
624
|
-
isDataRoute: !0
|
|
625
|
-
},
|
|
626
|
-
onError: l
|
|
627
|
-
}) : g();
|
|
628
|
-
}, null);
|
|
629
|
-
}
|
|
630
|
-
function Pt(e) {
|
|
631
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
632
|
-
}
|
|
633
|
-
function Ft(e) {
|
|
634
|
-
let t = p.useContext(z);
|
|
635
|
-
return P(t, Pt(e)), t;
|
|
636
|
-
}
|
|
637
|
-
function q(e) {
|
|
638
|
-
let t = p.useContext(B);
|
|
639
|
-
return P(t, Pt(e)), t;
|
|
640
|
-
}
|
|
641
|
-
function It(e) {
|
|
642
|
-
let t = p.useContext(U);
|
|
643
|
-
return P(t, Pt(e)), t;
|
|
644
|
-
}
|
|
645
|
-
function Lt(e) {
|
|
646
|
-
let t = It(e), n = t.matches[t.matches.length - 1];
|
|
647
|
-
return P(n.route.id, `${e} can only be used on routes that contain a unique "id"`), n.route.id;
|
|
648
|
-
}
|
|
649
|
-
function Rt() {
|
|
650
|
-
return Lt("useRouteId");
|
|
651
|
-
}
|
|
652
|
-
function zt() {
|
|
653
|
-
return q("useNavigation").navigation;
|
|
654
|
-
}
|
|
655
|
-
function Bt() {
|
|
656
|
-
let { matches: e, loaderData: t } = q("useMatches");
|
|
657
|
-
return p.useMemo(() => e.map((e) => ke(e, t)), [e, t]);
|
|
658
|
-
}
|
|
659
|
-
function Vt() {
|
|
660
|
-
let e = p.useContext(ht), t = q("useRouteError"), n = Lt("useRouteError");
|
|
661
|
-
return e === void 0 ? t.errors?.[n] : e;
|
|
662
|
-
}
|
|
663
|
-
var Ht = 0;
|
|
664
|
-
function Ut(e) {
|
|
665
|
-
let { router: t, basename: n } = Ft("useBlocker"), r = q("useBlocker"), [i, a] = p.useState(""), o = p.useCallback((t) => {
|
|
666
|
-
if (typeof e != "function") return !!e;
|
|
667
|
-
if (n === "/") return e(t);
|
|
668
|
-
let { currentLocation: r, nextLocation: i, historyAction: a } = t;
|
|
669
|
-
return e({
|
|
670
|
-
currentLocation: {
|
|
671
|
-
...r,
|
|
672
|
-
pathname: L(r.pathname, n) || r.pathname
|
|
673
|
-
},
|
|
674
|
-
nextLocation: {
|
|
675
|
-
...i,
|
|
676
|
-
pathname: L(i.pathname, n) || i.pathname
|
|
677
|
-
},
|
|
678
|
-
historyAction: a
|
|
679
|
-
});
|
|
680
|
-
}, [n, e]);
|
|
681
|
-
return p.useEffect(() => {
|
|
682
|
-
let e = String(++Ht);
|
|
683
|
-
return a(e), () => t.deleteBlocker(e);
|
|
684
|
-
}, [t]), p.useEffect(() => {
|
|
685
|
-
i !== "" && t.getBlocker(i, o);
|
|
686
|
-
}, [
|
|
687
|
-
t,
|
|
688
|
-
i,
|
|
689
|
-
o
|
|
690
|
-
]), i && r.blockers.has(i) ? r.blockers.get(i) : lt;
|
|
691
|
-
}
|
|
692
|
-
function Wt() {
|
|
693
|
-
let { router: e } = Ft("useNavigate"), t = Lt("useNavigate"), n = p.useRef(!1);
|
|
694
|
-
return Ct(() => {
|
|
695
|
-
n.current = !0;
|
|
696
|
-
}), p.useCallback(async (r, i = {}) => {
|
|
697
|
-
F(n.current, St), n.current && (typeof r == "number" ? await e.navigate(r) : await e.navigate(r, {
|
|
698
|
-
fromRouteId: t,
|
|
699
|
-
...i
|
|
700
|
-
}));
|
|
701
|
-
}, [e, t]);
|
|
702
|
-
}
|
|
703
|
-
var Gt = {};
|
|
704
|
-
function Kt(e, t, n) {
|
|
705
|
-
!t && !Gt[e] && (Gt[e] = !0, F(!1, n));
|
|
706
|
-
}
|
|
707
|
-
p.useOptimistic, p.memo(qt);
|
|
708
|
-
function qt({ routes: e, future: t, state: n, isStatic: r, onError: i }) {
|
|
709
|
-
return Et(e, void 0, {
|
|
710
|
-
state: n,
|
|
711
|
-
isStatic: r,
|
|
712
|
-
onError: i,
|
|
713
|
-
future: t
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
function Jt({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, unstable_useTransitions: o }) {
|
|
717
|
-
P(!W(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
|
|
718
|
-
let s = e.replace(/^\/*/, "/"), c = p.useMemo(() => ({
|
|
719
|
-
basename: s,
|
|
720
|
-
navigator: i,
|
|
721
|
-
static: a,
|
|
722
|
-
unstable_useTransitions: o,
|
|
723
|
-
future: {}
|
|
724
|
-
}), [
|
|
725
|
-
s,
|
|
726
|
-
i,
|
|
727
|
-
a,
|
|
728
|
-
o
|
|
729
|
-
]);
|
|
730
|
-
typeof n == "string" && (n = I(n));
|
|
731
|
-
let { pathname: l = "/", search: u = "", hash: d = "", state: f = null, key: m = "default", unstable_mask: h } = n, g = p.useMemo(() => {
|
|
732
|
-
let e = L(l, s);
|
|
733
|
-
return e == null ? null : {
|
|
734
|
-
location: {
|
|
735
|
-
pathname: e,
|
|
736
|
-
search: u,
|
|
737
|
-
hash: d,
|
|
738
|
-
state: f,
|
|
739
|
-
key: m,
|
|
740
|
-
unstable_mask: h
|
|
741
|
-
},
|
|
742
|
-
navigationType: r
|
|
743
|
-
};
|
|
744
|
-
}, [
|
|
745
|
-
s,
|
|
746
|
-
l,
|
|
747
|
-
u,
|
|
748
|
-
d,
|
|
749
|
-
f,
|
|
750
|
-
m,
|
|
751
|
-
r,
|
|
752
|
-
h
|
|
753
|
-
]);
|
|
754
|
-
return F(g != null, `<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`), g == null ? null : /* @__PURE__ */ p.createElement(V.Provider, { value: c }, /* @__PURE__ */ p.createElement(H.Provider, {
|
|
755
|
-
children: t,
|
|
756
|
-
value: g
|
|
757
|
-
}));
|
|
758
|
-
}
|
|
759
|
-
p.Component;
|
|
760
|
-
var J = "get", Y = "application/x-www-form-urlencoded";
|
|
761
|
-
function Yt(e) {
|
|
762
|
-
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
763
|
-
}
|
|
764
|
-
function Xt(e) {
|
|
765
|
-
return Yt(e) && e.tagName.toLowerCase() === "button";
|
|
766
|
-
}
|
|
767
|
-
function Zt(e) {
|
|
768
|
-
return Yt(e) && e.tagName.toLowerCase() === "form";
|
|
769
|
-
}
|
|
770
|
-
function Qt(e) {
|
|
771
|
-
return Yt(e) && e.tagName.toLowerCase() === "input";
|
|
772
|
-
}
|
|
773
|
-
function $t(e) {
|
|
774
|
-
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
775
|
-
}
|
|
776
|
-
function en(e, t) {
|
|
777
|
-
return e.button === 0 && (!t || t === "_self") && !$t(e);
|
|
778
|
-
}
|
|
779
|
-
var tn = null;
|
|
780
|
-
function nn() {
|
|
781
|
-
if (tn === null) try {
|
|
782
|
-
new FormData(document.createElement("form"), 0), tn = !1;
|
|
783
|
-
} catch {
|
|
784
|
-
tn = !0;
|
|
785
|
-
}
|
|
786
|
-
return tn;
|
|
787
|
-
}
|
|
788
|
-
var rn = /* @__PURE__ */ new Set([
|
|
789
|
-
"application/x-www-form-urlencoded",
|
|
790
|
-
"multipart/form-data",
|
|
791
|
-
"text/plain"
|
|
792
|
-
]);
|
|
793
|
-
function an(e) {
|
|
794
|
-
return e != null && !rn.has(e) ? (F(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Y}"`), null) : e;
|
|
795
|
-
}
|
|
796
|
-
function on(e, t) {
|
|
797
|
-
let n, r, i, a, o;
|
|
798
|
-
if (Zt(e)) {
|
|
799
|
-
let o = e.getAttribute("action");
|
|
800
|
-
r = o ? L(o, t) : null, n = e.getAttribute("method") || J, i = an(e.getAttribute("enctype")) || Y, a = new FormData(e);
|
|
801
|
-
} else if (Xt(e) || Qt(e) && (e.type === "submit" || e.type === "image")) {
|
|
802
|
-
let o = e.form;
|
|
803
|
-
if (o == null) throw Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
804
|
-
let s = e.getAttribute("formaction") || o.getAttribute("action");
|
|
805
|
-
if (r = s ? L(s, t) : null, n = e.getAttribute("formmethod") || o.getAttribute("method") || J, i = an(e.getAttribute("formenctype")) || an(o.getAttribute("enctype")) || Y, a = new FormData(o, e), !nn()) {
|
|
806
|
-
let { name: t, type: n, value: r } = e;
|
|
807
|
-
if (n === "image") {
|
|
808
|
-
let e = t ? `${t}.` : "";
|
|
809
|
-
a.append(`${e}x`, "0"), a.append(`${e}y`, "0");
|
|
810
|
-
} else t && a.append(t, r);
|
|
811
|
-
}
|
|
812
|
-
} else if (Yt(e)) throw Error("Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">");
|
|
813
|
-
else n = J, r = null, i = Y, o = e;
|
|
814
|
-
return a && i === "text/plain" && (o = a, a = void 0), {
|
|
815
|
-
action: r,
|
|
816
|
-
method: n.toLowerCase(),
|
|
817
|
-
encType: i,
|
|
818
|
-
formData: a,
|
|
819
|
-
body: o
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
823
|
-
var sn = {
|
|
824
|
-
"&": "\\u0026",
|
|
825
|
-
">": "\\u003e",
|
|
826
|
-
"<": "\\u003c",
|
|
827
|
-
"\u2028": "\\u2028",
|
|
828
|
-
"\u2029": "\\u2029"
|
|
829
|
-
}, cn = /[&><\u2028\u2029]/g;
|
|
830
|
-
function ln(e) {
|
|
831
|
-
return e.replace(cn, (e) => sn[e]);
|
|
832
|
-
}
|
|
833
|
-
function un(e, t) {
|
|
834
|
-
if (e === !1 || e == null) throw Error(t);
|
|
835
|
-
}
|
|
836
|
-
function dn(e, t, n, r) {
|
|
837
|
-
let i = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
|
|
838
|
-
return n ? i.pathname.endsWith("/") ? i.pathname = `${i.pathname}_.${r}` : i.pathname = `${i.pathname}.${r}` : i.pathname === "/" ? i.pathname = `_root.${r}` : t && L(i.pathname, t) === "/" ? i.pathname = `${t.replace(/\/$/, "")}/_root.${r}` : i.pathname = `${i.pathname.replace(/\/$/, "")}.${r}`, i;
|
|
839
|
-
}
|
|
840
|
-
async function fn(e, t) {
|
|
841
|
-
if (e.id in t) return t[e.id];
|
|
842
|
-
try {
|
|
843
|
-
let n = await import(
|
|
844
|
-
/* @vite-ignore */
|
|
845
|
-
/* webpackIgnore: true */
|
|
846
|
-
e.module
|
|
847
|
-
);
|
|
848
|
-
return t[e.id] = n, n;
|
|
849
|
-
} catch (t) {
|
|
850
|
-
return console.error(`Error loading route module \`${e.module}\`, reloading page...`), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {});
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
function pn(e) {
|
|
854
|
-
return e != null && typeof e.page == "string";
|
|
855
|
-
}
|
|
856
|
-
function mn(e) {
|
|
857
|
-
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
858
|
-
}
|
|
859
|
-
async function hn(e, t, n) {
|
|
860
|
-
return bn((await Promise.all(e.map(async (e) => {
|
|
861
|
-
let r = t.routes[e.route.id];
|
|
862
|
-
if (r) {
|
|
863
|
-
let e = await fn(r, n);
|
|
864
|
-
return e.links ? e.links() : [];
|
|
865
|
-
}
|
|
866
|
-
return [];
|
|
867
|
-
}))).flat(1).filter(mn).filter((e) => e.rel === "stylesheet" || e.rel === "preload").map((e) => e.rel === "stylesheet" ? {
|
|
868
|
-
...e,
|
|
869
|
-
rel: "prefetch",
|
|
870
|
-
as: "style"
|
|
871
|
-
} : {
|
|
872
|
-
...e,
|
|
873
|
-
rel: "prefetch"
|
|
874
|
-
}));
|
|
875
|
-
}
|
|
876
|
-
function gn(e, t, n, r, i, a) {
|
|
877
|
-
let o = (e, t) => n[t] ? e.route.id !== n[t].route.id : !0, s = (e, t) => n[t].pathname !== e.pathname || n[t].route.path?.endsWith("*") && n[t].params["*"] !== e.params["*"];
|
|
878
|
-
return a === "assets" ? t.filter((e, t) => o(e, t) || s(e, t)) : a === "data" ? t.filter((t, a) => {
|
|
879
|
-
let c = r.routes[t.route.id];
|
|
880
|
-
if (!c || !c.hasLoader) return !1;
|
|
881
|
-
if (o(t, a) || s(t, a)) return !0;
|
|
882
|
-
if (t.route.shouldRevalidate) {
|
|
883
|
-
let r = t.route.shouldRevalidate({
|
|
884
|
-
currentUrl: new URL(i.pathname + i.search + i.hash, window.origin),
|
|
885
|
-
currentParams: n[0]?.params || {},
|
|
886
|
-
nextUrl: new URL(e, window.origin),
|
|
887
|
-
nextParams: t.params,
|
|
888
|
-
defaultShouldRevalidate: !0
|
|
889
|
-
});
|
|
890
|
-
if (typeof r == "boolean") return r;
|
|
891
|
-
}
|
|
892
|
-
return !0;
|
|
893
|
-
}) : [];
|
|
894
|
-
}
|
|
895
|
-
function _n(e, t, { includeHydrateFallback: n } = {}) {
|
|
896
|
-
return vn(e.map((e) => {
|
|
897
|
-
let r = t.routes[e.route.id];
|
|
898
|
-
if (!r) return [];
|
|
899
|
-
let i = [r.module];
|
|
900
|
-
return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
|
|
901
|
-
}).flat(1));
|
|
902
|
-
}
|
|
903
|
-
function vn(e) {
|
|
904
|
-
return [...new Set(e)];
|
|
905
|
-
}
|
|
906
|
-
function yn(e) {
|
|
907
|
-
let t = {}, n = Object.keys(e).sort();
|
|
908
|
-
for (let r of n) t[r] = e[r];
|
|
909
|
-
return t;
|
|
910
|
-
}
|
|
911
|
-
function bn(e, t) {
|
|
912
|
-
let n = /* @__PURE__ */ new Set(), r = new Set(t);
|
|
913
|
-
return e.reduce((e, i) => {
|
|
914
|
-
if (t && !pn(i) && i.as === "script" && i.href && r.has(i.href)) return e;
|
|
915
|
-
let a = JSON.stringify(yn(i));
|
|
916
|
-
return n.has(a) || (n.add(a), e.push({
|
|
917
|
-
key: a,
|
|
918
|
-
link: i
|
|
919
|
-
})), e;
|
|
920
|
-
}, []);
|
|
921
|
-
}
|
|
922
|
-
function xn() {
|
|
923
|
-
let e = p.useContext(z);
|
|
924
|
-
return un(e, "You must render this element inside a <DataRouterContext.Provider> element"), e;
|
|
925
|
-
}
|
|
926
|
-
function Sn() {
|
|
927
|
-
let e = p.useContext(B);
|
|
928
|
-
return un(e, "You must render this element inside a <DataRouterStateContext.Provider> element"), e;
|
|
929
|
-
}
|
|
930
|
-
var Cn = p.createContext(void 0);
|
|
931
|
-
Cn.displayName = "FrameworkContext";
|
|
932
|
-
function wn() {
|
|
933
|
-
let e = p.useContext(Cn);
|
|
934
|
-
return un(e, "You must render this element inside a <HydratedRouter> element"), e;
|
|
935
|
-
}
|
|
936
|
-
function Tn(e, t) {
|
|
937
|
-
let n = p.useContext(Cn), [r, i] = p.useState(!1), [a, o] = p.useState(!1), { onFocus: s, onBlur: c, onMouseEnter: l, onMouseLeave: u, onTouchStart: d } = t, f = p.useRef(null);
|
|
938
|
-
p.useEffect(() => {
|
|
939
|
-
if (e === "render" && o(!0), e === "viewport") {
|
|
940
|
-
let e = new IntersectionObserver((e) => {
|
|
941
|
-
e.forEach((e) => {
|
|
942
|
-
o(e.isIntersecting);
|
|
943
|
-
});
|
|
944
|
-
}, { threshold: .5 });
|
|
945
|
-
return f.current && e.observe(f.current), () => {
|
|
946
|
-
e.disconnect();
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
}, [e]), p.useEffect(() => {
|
|
950
|
-
if (r) {
|
|
951
|
-
let e = setTimeout(() => {
|
|
952
|
-
o(!0);
|
|
953
|
-
}, 100);
|
|
954
|
-
return () => {
|
|
955
|
-
clearTimeout(e);
|
|
956
|
-
};
|
|
957
|
-
}
|
|
958
|
-
}, [r]);
|
|
959
|
-
let m = () => {
|
|
960
|
-
i(!0);
|
|
961
|
-
}, h = () => {
|
|
962
|
-
i(!1), o(!1);
|
|
963
|
-
};
|
|
964
|
-
return n ? e === "intent" ? [
|
|
965
|
-
a,
|
|
966
|
-
f,
|
|
967
|
-
{
|
|
968
|
-
onFocus: X(s, m),
|
|
969
|
-
onBlur: X(c, h),
|
|
970
|
-
onMouseEnter: X(l, m),
|
|
971
|
-
onMouseLeave: X(u, h),
|
|
972
|
-
onTouchStart: X(d, m)
|
|
973
|
-
}
|
|
974
|
-
] : [
|
|
975
|
-
a,
|
|
976
|
-
f,
|
|
977
|
-
{}
|
|
978
|
-
] : [
|
|
979
|
-
!1,
|
|
980
|
-
f,
|
|
981
|
-
{}
|
|
982
|
-
];
|
|
983
|
-
}
|
|
984
|
-
function X(e, t) {
|
|
985
|
-
return (n) => {
|
|
986
|
-
e && e(n), n.defaultPrevented || t(n);
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
function En({ page: e, ...t }) {
|
|
990
|
-
let n = dt(), { router: r } = xn(), i = p.useMemo(() => De(r.routes, e, r.basename), [
|
|
991
|
-
r.routes,
|
|
992
|
-
e,
|
|
993
|
-
r.basename
|
|
994
|
-
]);
|
|
995
|
-
return i ? n ? /* @__PURE__ */ p.createElement(On, {
|
|
996
|
-
page: e,
|
|
997
|
-
matches: i,
|
|
998
|
-
...t
|
|
999
|
-
}) : /* @__PURE__ */ p.createElement(kn, {
|
|
1000
|
-
page: e,
|
|
1001
|
-
matches: i,
|
|
1002
|
-
...t
|
|
1003
|
-
}) : null;
|
|
1004
|
-
}
|
|
1005
|
-
function Dn(e) {
|
|
1006
|
-
let { manifest: t, routeModules: n } = wn(), [r, i] = p.useState([]);
|
|
1007
|
-
return p.useEffect(() => {
|
|
1008
|
-
let r = !1;
|
|
1009
|
-
return hn(e, t, n).then((e) => {
|
|
1010
|
-
r || i(e);
|
|
1011
|
-
}), () => {
|
|
1012
|
-
r = !0;
|
|
1013
|
-
};
|
|
1014
|
-
}, [
|
|
1015
|
-
e,
|
|
1016
|
-
t,
|
|
1017
|
-
n
|
|
1018
|
-
]), r;
|
|
1019
|
-
}
|
|
1020
|
-
function On({ page: e, matches: t, ...n }) {
|
|
1021
|
-
let r = G(), { future: i } = wn(), { basename: a } = xn(), o = p.useMemo(() => {
|
|
1022
|
-
if (e === r.pathname + r.search + r.hash) return [];
|
|
1023
|
-
let n = dn(e, a, i.unstable_trailingSlashAwareDataRequests, "rsc"), o = !1, s = [];
|
|
1024
|
-
for (let e of t) typeof e.route.shouldRevalidate == "function" ? o = !0 : s.push(e.route.id);
|
|
1025
|
-
return o && s.length > 0 && n.searchParams.set("_routes", s.join(",")), [n.pathname + n.search];
|
|
1026
|
-
}, [
|
|
1027
|
-
a,
|
|
1028
|
-
i.unstable_trailingSlashAwareDataRequests,
|
|
1029
|
-
e,
|
|
1030
|
-
r,
|
|
1031
|
-
t
|
|
1032
|
-
]);
|
|
1033
|
-
return /* @__PURE__ */ p.createElement(p.Fragment, null, o.map((e) => /* @__PURE__ */ p.createElement("link", {
|
|
1034
|
-
key: e,
|
|
1035
|
-
rel: "prefetch",
|
|
1036
|
-
as: "fetch",
|
|
1037
|
-
href: e,
|
|
1038
|
-
...n
|
|
1039
|
-
})));
|
|
1040
|
-
}
|
|
1041
|
-
function kn({ page: e, matches: t, ...n }) {
|
|
1042
|
-
let r = G(), { future: i, manifest: a, routeModules: o } = wn(), { basename: s } = xn(), { loaderData: c, matches: l } = Sn(), u = p.useMemo(() => gn(e, t, l, a, r, "data"), [
|
|
1043
|
-
e,
|
|
1044
|
-
t,
|
|
1045
|
-
l,
|
|
1046
|
-
a,
|
|
1047
|
-
r
|
|
1048
|
-
]), d = p.useMemo(() => gn(e, t, l, a, r, "assets"), [
|
|
1049
|
-
e,
|
|
1050
|
-
t,
|
|
1051
|
-
l,
|
|
1052
|
-
a,
|
|
1053
|
-
r
|
|
1054
|
-
]), f = p.useMemo(() => {
|
|
1055
|
-
if (e === r.pathname + r.search + r.hash) return [];
|
|
1056
|
-
let n = /* @__PURE__ */ new Set(), l = !1;
|
|
1057
|
-
if (t.forEach((e) => {
|
|
1058
|
-
let t = a.routes[e.route.id];
|
|
1059
|
-
!t || !t.hasLoader || (!u.some((t) => t.route.id === e.route.id) && e.route.id in c && o[e.route.id]?.shouldRevalidate || t.hasClientLoader ? l = !0 : n.add(e.route.id));
|
|
1060
|
-
}), n.size === 0) return [];
|
|
1061
|
-
let d = dn(e, s, i.unstable_trailingSlashAwareDataRequests, "data");
|
|
1062
|
-
return l && n.size > 0 && d.searchParams.set("_routes", t.filter((e) => n.has(e.route.id)).map((e) => e.route.id).join(",")), [d.pathname + d.search];
|
|
1063
|
-
}, [
|
|
1064
|
-
s,
|
|
1065
|
-
i.unstable_trailingSlashAwareDataRequests,
|
|
1066
|
-
c,
|
|
1067
|
-
r,
|
|
1068
|
-
a,
|
|
1069
|
-
u,
|
|
1070
|
-
t,
|
|
1071
|
-
e,
|
|
1072
|
-
o
|
|
1073
|
-
]), m = p.useMemo(() => _n(d, a), [d, a]), h = Dn(d);
|
|
1074
|
-
return /* @__PURE__ */ p.createElement(p.Fragment, null, f.map((e) => /* @__PURE__ */ p.createElement("link", {
|
|
1075
|
-
key: e,
|
|
1076
|
-
rel: "prefetch",
|
|
1077
|
-
as: "fetch",
|
|
1078
|
-
href: e,
|
|
1079
|
-
...n
|
|
1080
|
-
})), m.map((e) => /* @__PURE__ */ p.createElement("link", {
|
|
1081
|
-
key: e,
|
|
1082
|
-
rel: "modulepreload",
|
|
1083
|
-
href: e,
|
|
1084
|
-
...n
|
|
1085
|
-
})), h.map(({ key: e, link: t }) => /* @__PURE__ */ p.createElement("link", {
|
|
1086
|
-
key: e,
|
|
1087
|
-
nonce: n.nonce,
|
|
1088
|
-
...t,
|
|
1089
|
-
crossOrigin: t.crossOrigin ?? n.crossOrigin
|
|
1090
|
-
})));
|
|
1091
|
-
}
|
|
1092
|
-
function An(...e) {
|
|
1093
|
-
return (t) => {
|
|
1094
|
-
e.forEach((e) => {
|
|
1095
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1096
|
-
});
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
|
-
p.Component;
|
|
1100
|
-
var jn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
1101
|
-
try {
|
|
1102
|
-
jn && (window.__reactRouterVersion = "7.14.0");
|
|
1103
|
-
} catch {}
|
|
1104
|
-
function Mn({ basename: e, children: t, history: n, unstable_useTransitions: r }) {
|
|
1105
|
-
let [i, a] = p.useState({
|
|
1106
|
-
action: n.action,
|
|
1107
|
-
location: n.location
|
|
1108
|
-
}), o = p.useCallback((e) => {
|
|
1109
|
-
r === !1 ? a(e) : p.startTransition(() => a(e));
|
|
1110
|
-
}, [r]);
|
|
1111
|
-
return p.useLayoutEffect(() => n.listen(o), [n, o]), /* @__PURE__ */ p.createElement(Jt, {
|
|
1112
|
-
basename: e,
|
|
1113
|
-
children: t,
|
|
1114
|
-
location: i.location,
|
|
1115
|
-
navigationType: i.action,
|
|
1116
|
-
navigator: n,
|
|
1117
|
-
unstable_useTransitions: r
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1120
|
-
Mn.displayName = "unstable_HistoryRouter";
|
|
1121
|
-
var Nn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Pn = p.forwardRef(function({ onClick: e, discover: t = "render", prefetch: n = "none", relative: r, reloadDocument: i, replace: a, unstable_mask: o, state: s, target: c, to: l, preventScrollReset: u, viewTransition: d, unstable_defaultShouldRevalidate: f, ...m }, h) {
|
|
1122
|
-
let { basename: g, navigator: _, unstable_useTransitions: v } = p.useContext(V), y = typeof l == "string" && Nn.test(l), b = ot(l, g);
|
|
1123
|
-
l = b.to;
|
|
1124
|
-
let x = xt(l, { relative: r }), S = G(), C = null;
|
|
1125
|
-
if (o) {
|
|
1126
|
-
let e = Qe(o, [], S.unstable_mask ? S.unstable_mask.pathname : "/", !0);
|
|
1127
|
-
g !== "/" && (e.pathname = e.pathname === "/" ? g : R([g, e.pathname])), C = _.createHref(e);
|
|
1128
|
-
}
|
|
1129
|
-
let [w, T, E] = Tn(n, m), ee = Vn(l, {
|
|
1130
|
-
replace: a,
|
|
1131
|
-
unstable_mask: o,
|
|
1132
|
-
state: s,
|
|
1133
|
-
target: c,
|
|
1134
|
-
preventScrollReset: u,
|
|
1135
|
-
relative: r,
|
|
1136
|
-
viewTransition: d,
|
|
1137
|
-
unstable_defaultShouldRevalidate: f,
|
|
1138
|
-
unstable_useTransitions: v
|
|
1139
|
-
});
|
|
1140
|
-
function D(t) {
|
|
1141
|
-
e && e(t), t.defaultPrevented || ee(t);
|
|
1142
|
-
}
|
|
1143
|
-
let O = !(b.isExternal || i), k = /* @__PURE__ */ p.createElement("a", {
|
|
1144
|
-
...m,
|
|
1145
|
-
...E,
|
|
1146
|
-
href: (O ? C : void 0) || b.absoluteURL || x,
|
|
1147
|
-
onClick: O ? D : e,
|
|
1148
|
-
ref: An(h, T),
|
|
1149
|
-
target: c,
|
|
1150
|
-
"data-discover": !y && t === "render" ? "true" : void 0
|
|
1151
|
-
});
|
|
1152
|
-
return w && !y ? /* @__PURE__ */ p.createElement(p.Fragment, null, k, /* @__PURE__ */ p.createElement(En, { page: x })) : k;
|
|
1153
|
-
});
|
|
1154
|
-
Pn.displayName = "Link";
|
|
1155
|
-
var Fn = p.forwardRef(function({ "aria-current": e = "page", caseSensitive: t = !1, className: n = "", end: r = !1, style: i, to: a, viewTransition: o, children: s, ...c }, l) {
|
|
1156
|
-
let u = K(a, { relative: c.relative }), d = G(), f = p.useContext(B), { navigator: m, basename: h } = p.useContext(V), g = f != null && Xn(u) && o === !0, _ = m.encodeLocation ? m.encodeLocation(u).pathname : u.pathname, v = d.pathname, y = f && f.navigation && f.navigation.location ? f.navigation.location.pathname : null;
|
|
1157
|
-
t || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, _ = _.toLowerCase()), y && h && (y = L(y, h) || y);
|
|
1158
|
-
let b = _ !== "/" && _.endsWith("/") ? _.length - 1 : _.length, x = v === _ || !r && v.startsWith(_) && v.charAt(b) === "/", S = y != null && (y === _ || !r && y.startsWith(_) && y.charAt(_.length) === "/"), C = {
|
|
1159
|
-
isActive: x,
|
|
1160
|
-
isPending: S,
|
|
1161
|
-
isTransitioning: g
|
|
1162
|
-
}, w = x ? e : void 0, T;
|
|
1163
|
-
T = typeof n == "function" ? n(C) : [
|
|
1164
|
-
n,
|
|
1165
|
-
x ? "active" : null,
|
|
1166
|
-
S ? "pending" : null,
|
|
1167
|
-
g ? "transitioning" : null
|
|
1168
|
-
].filter(Boolean).join(" ");
|
|
1169
|
-
let E = typeof i == "function" ? i(C) : i;
|
|
1170
|
-
return /* @__PURE__ */ p.createElement(Pn, {
|
|
1171
|
-
...c,
|
|
1172
|
-
"aria-current": w,
|
|
1173
|
-
className: T,
|
|
1174
|
-
ref: l,
|
|
1175
|
-
style: E,
|
|
1176
|
-
to: a,
|
|
1177
|
-
viewTransition: o
|
|
1178
|
-
}, typeof s == "function" ? s(C) : s);
|
|
1179
|
-
});
|
|
1180
|
-
Fn.displayName = "NavLink";
|
|
1181
|
-
var In = p.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: n, reloadDocument: r, replace: i, state: a, method: o = J, action: s, onSubmit: c, relative: l, preventScrollReset: u, viewTransition: d, unstable_defaultShouldRevalidate: f, ...m }, h) => {
|
|
1182
|
-
let { unstable_useTransitions: g } = p.useContext(V), _ = Wn(), v = Gn(s, { relative: l }), y = o.toLowerCase() === "get" ? "get" : "post", b = typeof s == "string" && Nn.test(s);
|
|
1183
|
-
return /* @__PURE__ */ p.createElement("form", {
|
|
1184
|
-
ref: h,
|
|
1185
|
-
method: y,
|
|
1186
|
-
action: v,
|
|
1187
|
-
onSubmit: r ? c : (e) => {
|
|
1188
|
-
if (c && c(e), e.defaultPrevented) return;
|
|
1189
|
-
e.preventDefault();
|
|
1190
|
-
let r = e.nativeEvent.submitter, s = r?.getAttribute("formmethod") || o, m = () => _(r || e.currentTarget, {
|
|
1191
|
-
fetcherKey: t,
|
|
1192
|
-
method: s,
|
|
1193
|
-
navigate: n,
|
|
1194
|
-
replace: i,
|
|
1195
|
-
state: a,
|
|
1196
|
-
relative: l,
|
|
1197
|
-
preventScrollReset: u,
|
|
1198
|
-
viewTransition: d,
|
|
1199
|
-
unstable_defaultShouldRevalidate: f
|
|
1200
|
-
});
|
|
1201
|
-
g && n !== !1 ? p.startTransition(() => m()) : m();
|
|
1202
|
-
},
|
|
1203
|
-
...m,
|
|
1204
|
-
"data-discover": !b && e === "render" ? "true" : void 0
|
|
1205
|
-
});
|
|
1206
|
-
});
|
|
1207
|
-
In.displayName = "Form";
|
|
1208
|
-
function Ln({ getKey: e, storageKey: t, ...n }) {
|
|
1209
|
-
let r = p.useContext(Cn), { basename: i } = p.useContext(V), a = G(), o = Bt();
|
|
1210
|
-
Jn({
|
|
1211
|
-
getKey: e,
|
|
1212
|
-
storageKey: t
|
|
1213
|
-
});
|
|
1214
|
-
let s = p.useMemo(() => {
|
|
1215
|
-
if (!r || !e) return null;
|
|
1216
|
-
let t = qn(a, o, i, e);
|
|
1217
|
-
return t === a.key ? null : t;
|
|
1218
|
-
}, []);
|
|
1219
|
-
if (!r || r.isSpaMode) return null;
|
|
1220
|
-
let c = ((e, t) => {
|
|
1221
|
-
if (!window.history.state || !window.history.state.key) {
|
|
1222
|
-
let e = Math.random().toString(32).slice(2);
|
|
1223
|
-
window.history.replaceState({ key: e }, "");
|
|
1224
|
-
}
|
|
1225
|
-
try {
|
|
1226
|
-
let n = JSON.parse(sessionStorage.getItem(e) || "{}")[t || window.history.state.key];
|
|
1227
|
-
typeof n == "number" && window.scrollTo(0, n);
|
|
1228
|
-
} catch (t) {
|
|
1229
|
-
console.error(t), sessionStorage.removeItem(e);
|
|
1230
|
-
}
|
|
1231
|
-
}).toString();
|
|
1232
|
-
return /* @__PURE__ */ p.createElement("script", {
|
|
1233
|
-
...n,
|
|
1234
|
-
suppressHydrationWarning: !0,
|
|
1235
|
-
dangerouslySetInnerHTML: { __html: `(${c})(${ln(JSON.stringify(t || Kn))}, ${ln(JSON.stringify(s))})` }
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
Ln.displayName = "ScrollRestoration";
|
|
1239
|
-
function Rn(e) {
|
|
1240
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1241
|
-
}
|
|
1242
|
-
function zn(e) {
|
|
1243
|
-
let t = p.useContext(z);
|
|
1244
|
-
return P(t, Rn(e)), t;
|
|
1245
|
-
}
|
|
1246
|
-
function Bn(e) {
|
|
1247
|
-
let t = p.useContext(B);
|
|
1248
|
-
return P(t, Rn(e)), t;
|
|
1249
|
-
}
|
|
1250
|
-
function Vn(e, { target: t, replace: n, unstable_mask: r, state: i, preventScrollReset: a, relative: o, viewTransition: s, unstable_defaultShouldRevalidate: c, unstable_useTransitions: l } = {}) {
|
|
1251
|
-
let u = wt(), d = G(), f = K(e, { relative: o });
|
|
1252
|
-
return p.useCallback((m) => {
|
|
1253
|
-
if (en(m, t)) {
|
|
1254
|
-
m.preventDefault();
|
|
1255
|
-
let t = n === void 0 ? Ee(d) === Ee(f) : n, h = () => u(e, {
|
|
1256
|
-
replace: t,
|
|
1257
|
-
unstable_mask: r,
|
|
1258
|
-
state: i,
|
|
1259
|
-
preventScrollReset: a,
|
|
1260
|
-
relative: o,
|
|
1261
|
-
viewTransition: s,
|
|
1262
|
-
unstable_defaultShouldRevalidate: c
|
|
1263
|
-
});
|
|
1264
|
-
l ? p.startTransition(() => h()) : h();
|
|
1265
|
-
}
|
|
1266
|
-
}, [
|
|
1267
|
-
d,
|
|
1268
|
-
u,
|
|
1269
|
-
f,
|
|
1270
|
-
n,
|
|
1271
|
-
r,
|
|
1272
|
-
i,
|
|
1273
|
-
t,
|
|
1274
|
-
e,
|
|
1275
|
-
a,
|
|
1276
|
-
o,
|
|
1277
|
-
s,
|
|
1278
|
-
c,
|
|
1279
|
-
l
|
|
1280
|
-
]);
|
|
1281
|
-
}
|
|
1282
|
-
var Hn = 0, Un = () => `__${String(++Hn)}__`;
|
|
1283
|
-
function Wn() {
|
|
1284
|
-
let { router: e } = zn("useSubmit"), { basename: t } = p.useContext(V), n = Rt(), r = e.fetch, i = e.navigate;
|
|
1285
|
-
return p.useCallback(async (e, a = {}) => {
|
|
1286
|
-
let { action: o, method: s, encType: c, formData: l, body: u } = on(e, t);
|
|
1287
|
-
a.navigate === !1 ? await r(a.fetcherKey || Un(), n, a.action || o, {
|
|
1288
|
-
unstable_defaultShouldRevalidate: a.unstable_defaultShouldRevalidate,
|
|
1289
|
-
preventScrollReset: a.preventScrollReset,
|
|
1290
|
-
formData: l,
|
|
1291
|
-
body: u,
|
|
1292
|
-
formMethod: a.method || s,
|
|
1293
|
-
formEncType: a.encType || c,
|
|
1294
|
-
flushSync: a.flushSync
|
|
1295
|
-
}) : await i(a.action || o, {
|
|
1296
|
-
unstable_defaultShouldRevalidate: a.unstable_defaultShouldRevalidate,
|
|
1297
|
-
preventScrollReset: a.preventScrollReset,
|
|
1298
|
-
formData: l,
|
|
1299
|
-
body: u,
|
|
1300
|
-
formMethod: a.method || s,
|
|
1301
|
-
formEncType: a.encType || c,
|
|
1302
|
-
replace: a.replace,
|
|
1303
|
-
state: a.state,
|
|
1304
|
-
fromRouteId: n,
|
|
1305
|
-
flushSync: a.flushSync,
|
|
1306
|
-
viewTransition: a.viewTransition
|
|
1307
|
-
});
|
|
1308
|
-
}, [
|
|
1309
|
-
r,
|
|
1310
|
-
i,
|
|
1311
|
-
t,
|
|
1312
|
-
n
|
|
1313
|
-
]);
|
|
1314
|
-
}
|
|
1315
|
-
function Gn(e, { relative: t } = {}) {
|
|
1316
|
-
let { basename: n } = p.useContext(V), r = p.useContext(U);
|
|
1317
|
-
P(r, "useFormAction must be used inside a RouteContext");
|
|
1318
|
-
let [i] = r.matches.slice(-1), a = { ...K(e || ".", { relative: t }) }, o = G();
|
|
1319
|
-
if (e == null) {
|
|
1320
|
-
a.search = o.search;
|
|
1321
|
-
let e = new URLSearchParams(a.search), t = e.getAll("index");
|
|
1322
|
-
if (t.some((e) => e === "")) {
|
|
1323
|
-
e.delete("index"), t.filter((e) => e).forEach((t) => e.append("index", t));
|
|
1324
|
-
let n = e.toString();
|
|
1325
|
-
a.search = n ? `?${n}` : "";
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
return (!e || e === ".") && i.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : R([n, a.pathname])), Ee(a);
|
|
1329
|
-
}
|
|
1330
|
-
var Kn = "react-router-scroll-positions", Z = {};
|
|
1331
|
-
function qn(e, t, n, r) {
|
|
1332
|
-
let i = null;
|
|
1333
|
-
return r && (i = r(n === "/" ? e : {
|
|
1334
|
-
...e,
|
|
1335
|
-
pathname: L(e.pathname, n) || e.pathname
|
|
1336
|
-
}, t)), i ??= e.key, i;
|
|
1337
|
-
}
|
|
1338
|
-
function Jn({ getKey: e, storageKey: t } = {}) {
|
|
1339
|
-
let { router: n } = zn("useScrollRestoration"), { restoreScrollPosition: r, preventScrollReset: i } = Bn("useScrollRestoration"), { basename: a } = p.useContext(V), o = G(), s = Bt(), c = zt();
|
|
1340
|
-
p.useEffect(() => (window.history.scrollRestoration = "manual", () => {
|
|
1341
|
-
window.history.scrollRestoration = "auto";
|
|
1342
|
-
}), []), Yn(p.useCallback(() => {
|
|
1343
|
-
if (c.state === "idle") {
|
|
1344
|
-
let t = qn(o, s, a, e);
|
|
1345
|
-
Z[t] = window.scrollY;
|
|
1346
|
-
}
|
|
1347
|
-
try {
|
|
1348
|
-
sessionStorage.setItem(t || Kn, JSON.stringify(Z));
|
|
1349
|
-
} catch (e) {
|
|
1350
|
-
F(!1, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`);
|
|
1351
|
-
}
|
|
1352
|
-
window.history.scrollRestoration = "auto";
|
|
1353
|
-
}, [
|
|
1354
|
-
c.state,
|
|
1355
|
-
e,
|
|
1356
|
-
a,
|
|
1357
|
-
o,
|
|
1358
|
-
s,
|
|
1359
|
-
t
|
|
1360
|
-
])), typeof document < "u" && (p.useLayoutEffect(() => {
|
|
1361
|
-
try {
|
|
1362
|
-
let e = sessionStorage.getItem(t || Kn);
|
|
1363
|
-
e && (Z = JSON.parse(e));
|
|
1364
|
-
} catch {}
|
|
1365
|
-
}, [t]), p.useLayoutEffect(() => {
|
|
1366
|
-
let t = n?.enableScrollRestoration(Z, () => window.scrollY, e ? (t, n) => qn(t, n, a, e) : void 0);
|
|
1367
|
-
return () => t && t();
|
|
1368
|
-
}, [
|
|
1369
|
-
n,
|
|
1370
|
-
a,
|
|
1371
|
-
e
|
|
1372
|
-
]), p.useLayoutEffect(() => {
|
|
1373
|
-
if (r !== !1) {
|
|
1374
|
-
if (typeof r == "number") {
|
|
1375
|
-
window.scrollTo(0, r);
|
|
1376
|
-
return;
|
|
1377
|
-
}
|
|
1378
|
-
try {
|
|
1379
|
-
if (o.hash) {
|
|
1380
|
-
let e = document.getElementById(decodeURIComponent(o.hash.slice(1)));
|
|
1381
|
-
if (e) {
|
|
1382
|
-
e.scrollIntoView();
|
|
1383
|
-
return;
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
} catch {
|
|
1387
|
-
F(!1, `"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`);
|
|
1388
|
-
}
|
|
1389
|
-
i !== !0 && window.scrollTo(0, 0);
|
|
1390
|
-
}
|
|
1391
|
-
}, [
|
|
1392
|
-
o,
|
|
1393
|
-
r,
|
|
1394
|
-
i
|
|
1395
|
-
]));
|
|
1396
|
-
}
|
|
1397
|
-
function Yn(e, t) {
|
|
1398
|
-
let { capture: n } = t || {};
|
|
1399
|
-
p.useEffect(() => {
|
|
1400
|
-
let t = n == null ? void 0 : { capture: n };
|
|
1401
|
-
return window.addEventListener("pagehide", e, t), () => {
|
|
1402
|
-
window.removeEventListener("pagehide", e, t);
|
|
1403
|
-
};
|
|
1404
|
-
}, [e, n]);
|
|
1405
|
-
}
|
|
1406
|
-
function Xn(e, { relative: t } = {}) {
|
|
1407
|
-
let n = p.useContext(ft);
|
|
1408
|
-
P(n != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
1409
|
-
let { basename: r } = zn("useViewTransitionState"), i = K(e, { relative: t });
|
|
1410
|
-
if (!n.isTransitioning) return !1;
|
|
1411
|
-
let a = L(n.currentLocation.pathname, r) || n.currentLocation.pathname, o = L(n.nextLocation.pathname, r) || n.nextLocation.pathname;
|
|
1412
|
-
return Ue(i.pathname, o) != null || Ue(i.pathname, a) != null;
|
|
1413
|
-
}
|
|
1414
|
-
//#endregion
|
|
1415
|
-
//#region src/Breadcrumbs.tsx
|
|
1416
|
-
var Zn = ({ prependBreadcrumbItem: e, pathname: n, onBreadcrumbLookup: r }) => {
|
|
101
|
+
}), _e = ({ prependBreadcrumbItem: e, pathname: n, onBreadcrumbLookup: r }) => {
|
|
1417
102
|
let i = f(n).map((e) => ({
|
|
1418
103
|
title: r(e),
|
|
1419
104
|
path: e
|
|
1420
|
-
})).filter(({ title: e }) => e !== void 0), a = i.map(({ title: e, path: n }, r) => r === i.length - 1 ? /* @__PURE__ */ t(
|
|
105
|
+
})).filter(({ title: e }) => e !== void 0), a = i.map(({ title: e, path: n }, r) => r === i.length - 1 ? /* @__PURE__ */ t(v, {
|
|
1421
106
|
as: "span",
|
|
1422
107
|
children: e
|
|
1423
|
-
}, n) : /* @__PURE__ */ t(
|
|
1424
|
-
as:
|
|
108
|
+
}, n) : /* @__PURE__ */ t(v, {
|
|
109
|
+
as: x,
|
|
1425
110
|
to: n,
|
|
1426
111
|
children: e
|
|
1427
112
|
}, n));
|
|
1428
|
-
return e ? /* @__PURE__ */ t(
|
|
1429
|
-
},
|
|
113
|
+
return e ? /* @__PURE__ */ t(y, { children: [e, ...a] }) : /* @__PURE__ */ t(y, { children: a });
|
|
114
|
+
}, G = ({ isOpen: r = !1, children: i, message: a, size: o = "medium", buttons: s, onConfirm: c, messages: u, onClose: d, onDismiss: f, ...p }) => {
|
|
1430
115
|
let m = i || a, h = d || f;
|
|
1431
|
-
return /* @__PURE__ */ n(
|
|
116
|
+
return /* @__PURE__ */ n(O, {
|
|
1432
117
|
size: o,
|
|
1433
118
|
open: r,
|
|
1434
119
|
onDismiss: h,
|
|
1435
120
|
...p,
|
|
1436
|
-
children: [l(m) ? /* @__PURE__ */ t(
|
|
121
|
+
children: [l(m) ? /* @__PURE__ */ t(j, { children: m }) : /* @__PURE__ */ t(U, {
|
|
1437
122
|
paddingBottom: "medium",
|
|
1438
123
|
children: m
|
|
1439
|
-
}), /* @__PURE__ */ t(
|
|
124
|
+
}), /* @__PURE__ */ t(T, { children: c ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(D, {
|
|
1440
125
|
onClick: h,
|
|
1441
126
|
"data-testid": "cancel-modal-button",
|
|
1442
127
|
children: u.cancel
|
|
1443
|
-
}), /* @__PURE__ */ t(
|
|
128
|
+
}), /* @__PURE__ */ t(E, {
|
|
1444
129
|
onClick: c,
|
|
1445
130
|
"data-testid": "confirm-modal-button",
|
|
1446
131
|
children: u.confirm
|
|
1447
132
|
})] }) : s })]
|
|
1448
133
|
});
|
|
1449
|
-
},
|
|
1450
|
-
className: (0,
|
|
134
|
+
}, ve = ({ as: e = "main", className: n, children: r }) => /* @__PURE__ */ t(e, {
|
|
135
|
+
className: (0, B.default)(["eps-content", n]),
|
|
1451
136
|
children: r
|
|
1452
|
-
}),
|
|
137
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
1453
138
|
return e.Local = "local", e.Development = "dev", e.Staging = "staging", e.Production = "prod", e;
|
|
1454
|
-
}({}),
|
|
1455
|
-
[
|
|
1456
|
-
[
|
|
1457
|
-
[
|
|
1458
|
-
},
|
|
1459
|
-
[
|
|
1460
|
-
[
|
|
1461
|
-
[
|
|
1462
|
-
[
|
|
1463
|
-
},
|
|
139
|
+
}({}), ye = {
|
|
140
|
+
[K.Local]: "#B482FB",
|
|
141
|
+
[K.Development]: "#5AC39A",
|
|
142
|
+
[K.Staging]: "#FFCA28"
|
|
143
|
+
}, q = (e) => ye[e], be = {
|
|
144
|
+
[K.Local]: "Local",
|
|
145
|
+
[K.Development]: "Dev",
|
|
146
|
+
[K.Staging]: "Staging",
|
|
147
|
+
[K.Production]: "Prod"
|
|
148
|
+
}, J = (e) => be[e], Y = ({ title: e, accentColor: r = "#FF5959", ...i }) => /* @__PURE__ */ n("svg", {
|
|
1464
149
|
width: 257,
|
|
1465
150
|
height: 37,
|
|
1466
151
|
viewBox: "0 0 257 37",
|
|
@@ -1487,14 +172,14 @@ var Zn = ({ prependBreadcrumbItem: e, pathname: n, onBreadcrumbLookup: r }) => {
|
|
|
1487
172
|
})
|
|
1488
173
|
]
|
|
1489
174
|
})]
|
|
1490
|
-
}),
|
|
1491
|
-
className: (0,
|
|
1492
|
-
children: /* @__PURE__ */ t(
|
|
175
|
+
}), xe = ({ as: e = "nav", className: n, altText: r, environment: i }) => /* @__PURE__ */ t(e, {
|
|
176
|
+
className: (0, B.default)(["eps-logo-wrapper", n]),
|
|
177
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1493
178
|
title: r,
|
|
1494
179
|
className: "logo",
|
|
1495
|
-
accentColor: i !== void 0 && i !==
|
|
180
|
+
accentColor: i !== void 0 && i !== K.Production ? q(i) : void 0
|
|
1496
181
|
})
|
|
1497
|
-
}),
|
|
182
|
+
}), Se = "Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.", Ce = class extends m {
|
|
1498
183
|
constructor(e) {
|
|
1499
184
|
super(e), this.state = { error: null };
|
|
1500
185
|
}
|
|
@@ -1509,23 +194,23 @@ var Zn = ({ prependBreadcrumbItem: e, pathname: n, onBreadcrumbLookup: r }) => {
|
|
|
1509
194
|
return e ? c(n) ? n({
|
|
1510
195
|
retry: () => this.setState({ error: null }),
|
|
1511
196
|
error: e
|
|
1512
|
-
}) : e.name === "NotFoundError" && e.message ===
|
|
197
|
+
}) : e.name === "NotFoundError" && e.message === Se ? /* @__PURE__ */ t(Te, {}) : n : r;
|
|
1513
198
|
}
|
|
1514
|
-
},
|
|
1515
|
-
function
|
|
1516
|
-
let e = localStorage.getItem(
|
|
1517
|
-
return /* @__PURE__ */ t(
|
|
199
|
+
}, we = "EP::locale";
|
|
200
|
+
function Te() {
|
|
201
|
+
let e = localStorage.getItem(we), r = e === "nb" || e === "nb-NO";
|
|
202
|
+
return /* @__PURE__ */ t(U, {
|
|
1518
203
|
maxWidth: "large",
|
|
1519
|
-
children: /* @__PURE__ */ n(
|
|
204
|
+
children: /* @__PURE__ */ n(M, {
|
|
1520
205
|
variant: "info",
|
|
1521
206
|
title: r ? "En ny versjon av nettsiden er tilgjengelig." : "A new version of the website is available.",
|
|
1522
|
-
children: [/* @__PURE__ */ t(
|
|
207
|
+
children: [/* @__PURE__ */ t(U, {
|
|
1523
208
|
paddingBottom: "medium",
|
|
1524
|
-
children: /* @__PURE__ */ t(
|
|
209
|
+
children: /* @__PURE__ */ t(j, {
|
|
1525
210
|
margin: "none",
|
|
1526
211
|
children: r ? "Vennligst oppdater." : "Please refresh."
|
|
1527
212
|
})
|
|
1528
|
-
}), /* @__PURE__ */ t(
|
|
213
|
+
}), /* @__PURE__ */ t(E, {
|
|
1529
214
|
onClick: () => window.location.reload(),
|
|
1530
215
|
children: r ? "Oppdater" : "Refresh"
|
|
1531
216
|
})]
|
|
@@ -1534,12 +219,12 @@ function lr() {
|
|
|
1534
219
|
}
|
|
1535
220
|
//#endregion
|
|
1536
221
|
//#region src/ExpandableMultiLanguageInput.tsx
|
|
1537
|
-
var
|
|
222
|
+
var Ee = ({ title: e, inputComponent: n, languages: r, values: i, onChange: a, name: o, variant: s, feedback: c, ...l }) => {
|
|
1538
223
|
let u = (e, t) => {
|
|
1539
224
|
let n = { ...i };
|
|
1540
225
|
t === "" || !t ? delete n[e] : n[e] = t, a(n);
|
|
1541
226
|
};
|
|
1542
|
-
return /* @__PURE__ */ t(
|
|
227
|
+
return /* @__PURE__ */ t(N, {
|
|
1543
228
|
title: e,
|
|
1544
229
|
defaultOpen: !0,
|
|
1545
230
|
contentStyle: {
|
|
@@ -1547,7 +232,7 @@ var ur = ({ title: e, inputComponent: n, languages: r, values: i, onChange: a, n
|
|
|
1547
232
|
marginTop: "16px",
|
|
1548
233
|
marginBottom: "16px"
|
|
1549
234
|
},
|
|
1550
|
-
children: /* @__PURE__ */ t(
|
|
235
|
+
children: /* @__PURE__ */ t(W, {
|
|
1551
236
|
space: "medium",
|
|
1552
237
|
children: r.map(({ value: r, label: a, required: d }) => /* @__PURE__ */ t(n, {
|
|
1553
238
|
"data-testid": `multi-lang-input-${o}-${r}`,
|
|
@@ -1566,7 +251,7 @@ var ur = ({ title: e, inputComponent: n, languages: r, values: i, onChange: a, n
|
|
|
1566
251
|
};
|
|
1567
252
|
//#endregion
|
|
1568
253
|
//#region src/FeatureToggle.tsx
|
|
1569
|
-
function
|
|
254
|
+
function X(e) {
|
|
1570
255
|
return {
|
|
1571
256
|
BASE_URL: "/",
|
|
1572
257
|
DEV: !1,
|
|
@@ -1575,10 +260,10 @@ function dr(e) {
|
|
|
1575
260
|
SSR: !1
|
|
1576
261
|
}?.[`VITE_APP_${e}`] === "true" || window.localStorage?.getItem(e) === "true" || window.localStorage?.getItem(`VITE_APP_${e}`) === "true";
|
|
1577
262
|
}
|
|
1578
|
-
function
|
|
1579
|
-
return
|
|
263
|
+
function De(e) {
|
|
264
|
+
return X(e);
|
|
1580
265
|
}
|
|
1581
|
-
var
|
|
266
|
+
var Oe = ({ children: n, flag: r }) => X(r) ? /* @__PURE__ */ t(e, { children: n }) : null, ke = ({ amount: e, as: n = "span", ...r }) => {
|
|
1582
267
|
let i = Number(e) || 0, a = new Intl.NumberFormat("nb-NO", {
|
|
1583
268
|
maximumFractionDigits: 2,
|
|
1584
269
|
minimumFractionDigits: 2
|
|
@@ -1587,17 +272,17 @@ var pr = ({ children: n, flag: r }) => dr(r) ? /* @__PURE__ */ t(e, { children:
|
|
|
1587
272
|
...r,
|
|
1588
273
|
children: a
|
|
1589
274
|
});
|
|
1590
|
-
},
|
|
1591
|
-
let c = (0,
|
|
275
|
+
}, Z = ({ language: e, options: i, className: a, onChange: o, ...s }) => {
|
|
276
|
+
let c = (0, B.default)("eps-language-select", a);
|
|
1592
277
|
return /* @__PURE__ */ t("div", {
|
|
1593
278
|
...s,
|
|
1594
279
|
className: c,
|
|
1595
|
-
children: /* @__PURE__ */ t(
|
|
280
|
+
children: /* @__PURE__ */ t(F, {
|
|
1596
281
|
onChange: (e) => {
|
|
1597
282
|
r(e), typeof e == "string" && o(e);
|
|
1598
283
|
},
|
|
1599
284
|
selectedValue: e,
|
|
1600
|
-
children: i.map((e) => /* @__PURE__ */ n(
|
|
285
|
+
children: i.map((e) => /* @__PURE__ */ n(P, {
|
|
1601
286
|
value: e.value,
|
|
1602
287
|
children: [e.label, e.required && /* @__PURE__ */ t("span", {
|
|
1603
288
|
className: "asterisk-margin",
|
|
@@ -1606,24 +291,24 @@ var pr = ({ children: n, flag: r }) => dr(r) ? /* @__PURE__ */ t(e, { children:
|
|
|
1606
291
|
}, e.value))
|
|
1607
292
|
})
|
|
1608
293
|
});
|
|
1609
|
-
},
|
|
294
|
+
}, Ae = (e) => /* @__PURE__ */ t(A, {
|
|
1610
295
|
...e,
|
|
1611
|
-
as:
|
|
296
|
+
as: x,
|
|
1612
297
|
children: e.children
|
|
1613
|
-
}),
|
|
298
|
+
}), je = ({ children: e, className: n, ...r }) => /* @__PURE__ */ t(A, {
|
|
1614
299
|
...r,
|
|
1615
300
|
as: "button",
|
|
1616
|
-
className: (0,
|
|
301
|
+
className: (0, B.default)("eps-link-button", n),
|
|
1617
302
|
children: e
|
|
1618
|
-
}),
|
|
1619
|
-
className: (0,
|
|
303
|
+
}), Me = ({ as: e = "nav", className: n, children: r }) => /* @__PURE__ */ t(e, {
|
|
304
|
+
className: (0, B.default)([
|
|
1620
305
|
"eds-contrast",
|
|
1621
306
|
"eps-menu",
|
|
1622
307
|
n
|
|
1623
308
|
]),
|
|
1624
309
|
children: r
|
|
1625
|
-
}),
|
|
1626
|
-
let [m, h] =
|
|
310
|
+
}), Ne = ({ className: e, inputComponent: r, alertLabel: i, alertLevel: a, name: o, languages: s, values: c, onChange: l, defaultLanguage: u = "nob", label: d = "", onBlur: f = () => {}, ...p }) => {
|
|
311
|
+
let [m, h] = _(u), g = (0, B.default)("multi-language-input", e), v = c[m], y = (e) => {
|
|
1627
312
|
e.persist();
|
|
1628
313
|
let t = e.currentTarget;
|
|
1629
314
|
setTimeout(() => {
|
|
@@ -1640,9 +325,9 @@ var pr = ({ children: n, flag: r }) => dr(r) ? /* @__PURE__ */ t(e, { children:
|
|
|
1640
325
|
tabIndex: 0,
|
|
1641
326
|
onBlur: y,
|
|
1642
327
|
"data-testid": `multi-lang-input-${o}`,
|
|
1643
|
-
children: /* @__PURE__ */ n(
|
|
328
|
+
children: /* @__PURE__ */ n(W, {
|
|
1644
329
|
space: "extraSmall",
|
|
1645
|
-
children: [/* @__PURE__ */ t(
|
|
330
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
1646
331
|
language: m,
|
|
1647
332
|
options: s,
|
|
1648
333
|
onChange: (e) => b(e)
|
|
@@ -1653,16 +338,16 @@ var pr = ({ children: n, flag: r }) => dr(r) ? /* @__PURE__ */ t(e, { children:
|
|
|
1653
338
|
name: o,
|
|
1654
339
|
className: "language-item",
|
|
1655
340
|
onChange: (e) => x(e.target.value),
|
|
1656
|
-
value:
|
|
341
|
+
value: v || "",
|
|
1657
342
|
...p
|
|
1658
343
|
})]
|
|
1659
344
|
})
|
|
1660
345
|
});
|
|
1661
|
-
},
|
|
1662
|
-
let [o, s] =
|
|
1663
|
-
return
|
|
346
|
+
}, Pe = ({ label: e, organisations: n, onChange: r, selectedOrganisationId: i, ...a }) => {
|
|
347
|
+
let [o, s] = _();
|
|
348
|
+
return h(() => {
|
|
1664
349
|
s(n.find((e) => e.organisationId === i));
|
|
1665
|
-
}, [i, n]), /* @__PURE__ */ t(
|
|
350
|
+
}, [i, n]), /* @__PURE__ */ t(I, {
|
|
1666
351
|
label: e,
|
|
1667
352
|
items: [...n.sort((e, t) => e.tradingName.localeCompare(t.tradingName, "nb")).map((e) => ({
|
|
1668
353
|
value: e.organisationId,
|
|
@@ -1678,29 +363,29 @@ var pr = ({ children: n, flag: r }) => dr(r) ? /* @__PURE__ */ t(e, { children:
|
|
|
1678
363
|
clearable: !1,
|
|
1679
364
|
...a
|
|
1680
365
|
});
|
|
1681
|
-
},
|
|
366
|
+
}, Fe = ({ collectionSize: e, pageSize: n, onPageChange: r, currentPage: i }) => /* @__PURE__ */ t(b, {
|
|
1682
367
|
pageCount: Math.ceil(e / n),
|
|
1683
368
|
currentPage: i,
|
|
1684
369
|
onPageChange: (e) => {
|
|
1685
370
|
r(e);
|
|
1686
371
|
}
|
|
1687
|
-
}),
|
|
1688
|
-
|
|
372
|
+
}), Q = ({ title: e, suffix: t }) => {
|
|
373
|
+
h(() => {
|
|
1689
374
|
t ? document.title = `${e}${t}` : document.title = e;
|
|
1690
375
|
}, [e, t]);
|
|
1691
|
-
},
|
|
376
|
+
}, Ie = ({ pathname: e, onBreadcrumbLookup: t, appTitle: n = "Entur Partner" }) => {
|
|
1692
377
|
let r = f(e).map((e) => ({
|
|
1693
378
|
title: t(e),
|
|
1694
379
|
path: e
|
|
1695
380
|
})).filter(({ title: e }) => e !== void 0).map(({ title: e }) => e).reverse().join(" | ");
|
|
1696
|
-
return
|
|
1697
|
-
},
|
|
381
|
+
return Q({ title: r ? `${r} | ${n}` : n }), null;
|
|
382
|
+
}, Le = ({ children: n, fallback: r = null, permissions: o, oneOf: s = [], all: c = [] }) => {
|
|
1698
383
|
let l = i(c, o), u = a(s, o);
|
|
1699
384
|
return /* @__PURE__ */ t(e, { children: l && u ? n : r });
|
|
1700
|
-
},
|
|
1701
|
-
r(
|
|
1702
|
-
let a =
|
|
1703
|
-
return /* @__PURE__ */ t(
|
|
385
|
+
}, Re = ({ children: e, shouldBlockNavigation: n, ...i }) => {
|
|
386
|
+
r(C() ? !0 : void 0, "RouteLeavingGuard must be used within a data router.");
|
|
387
|
+
let a = S(({ currentLocation: e, nextLocation: t }) => e.pathname !== t.pathname && n(t));
|
|
388
|
+
return /* @__PURE__ */ t(G, {
|
|
1704
389
|
onDismiss: () => {
|
|
1705
390
|
a.state === "blocked" && a.reset();
|
|
1706
391
|
},
|
|
@@ -1711,37 +396,37 @@ var pr = ({ children: n, flag: r }) => dr(r) ? /* @__PURE__ */ t(e, { children:
|
|
|
1711
396
|
...i,
|
|
1712
397
|
children: e
|
|
1713
398
|
});
|
|
1714
|
-
},
|
|
1715
|
-
let s = (0,
|
|
399
|
+
}, ze = ({ active: e = !1, label: r = "", aggressiveInactive: i, showBullet: a, center: o }) => {
|
|
400
|
+
let s = (0, B.default)("eps-status-label__bullet", {
|
|
1716
401
|
active: e,
|
|
1717
402
|
aggressive: i
|
|
1718
403
|
});
|
|
1719
404
|
return /* @__PURE__ */ n("div", {
|
|
1720
|
-
className: (0,
|
|
405
|
+
className: (0, B.default)("eps-status-label", { center: o }),
|
|
1721
406
|
children: [a && /* @__PURE__ */ t("div", { className: s }), /* @__PURE__ */ t("div", { children: r })]
|
|
1722
407
|
});
|
|
1723
|
-
},
|
|
408
|
+
}, Be = ({ as: e = "span", children: n, fontSize: r, color: i, lineHeight: a, fontWeight: o, className: s, ...c }) => {
|
|
1724
409
|
let l = [];
|
|
1725
|
-
return r && l.push(...
|
|
410
|
+
return r && l.push(...H("eps-font-size-", r)), a && l.push(...H("eps-line-height-", a)), o && l.push(`eps-font-weight-${o}`), /* @__PURE__ */ t(U, {
|
|
1726
411
|
as: e,
|
|
1727
412
|
color: i,
|
|
1728
|
-
className: (0,
|
|
413
|
+
className: (0, B.default)(l, s),
|
|
1729
414
|
...c,
|
|
1730
415
|
children: n
|
|
1731
416
|
});
|
|
1732
|
-
},
|
|
417
|
+
}, Ve = ({ children: e, className: n, ...r }) => /* @__PURE__ */ t(w, {
|
|
1733
418
|
variant: "primary",
|
|
1734
419
|
...r,
|
|
1735
|
-
className: (0,
|
|
420
|
+
className: (0, B.default)("eps-unbutton", n),
|
|
1736
421
|
children: e
|
|
1737
422
|
});
|
|
1738
423
|
//#endregion
|
|
1739
424
|
//#region src/useEventListener.ts
|
|
1740
|
-
function
|
|
1741
|
-
let r =
|
|
1742
|
-
|
|
425
|
+
function He(e, t, n = window) {
|
|
426
|
+
let r = g(null);
|
|
427
|
+
h(() => {
|
|
1743
428
|
r.current = t;
|
|
1744
|
-
}, [t]),
|
|
429
|
+
}, [t]), h(() => {
|
|
1745
430
|
if (!n?.addEventListener) return;
|
|
1746
431
|
let t = ((e) => r.current?.(e));
|
|
1747
432
|
return n.addEventListener(e, t), () => {
|
|
@@ -1752,15 +437,15 @@ function kr(e, t, n = window) {
|
|
|
1752
437
|
//#endregion
|
|
1753
438
|
//#region src/user-menu/components/CustomOverflowMenuItem.tsx
|
|
1754
439
|
var $ = (e) => /* @__PURE__ */ t("button", {
|
|
1755
|
-
className: (0,
|
|
440
|
+
className: (0, B.default)(e.className, "eps-overflow-menu__item"),
|
|
1756
441
|
role: "menuitem",
|
|
1757
442
|
...e
|
|
1758
|
-
}),
|
|
443
|
+
}), Ue = ({ locale: e, onClick: r }) => /* @__PURE__ */ n($, {
|
|
1759
444
|
onClick: r,
|
|
1760
445
|
className: "eps-overflow-menu__item",
|
|
1761
446
|
children: [/* @__PURE__ */ t("span", {
|
|
1762
447
|
"aria-hidden": !0,
|
|
1763
|
-
children: /* @__PURE__ */ t(
|
|
448
|
+
children: /* @__PURE__ */ t(ee, {
|
|
1764
449
|
size: "1rem",
|
|
1765
450
|
inline: !0
|
|
1766
451
|
})
|
|
@@ -1768,10 +453,10 @@ var $ = (e) => /* @__PURE__ */ t("button", {
|
|
|
1768
453
|
});
|
|
1769
454
|
//#endregion
|
|
1770
455
|
//#region src/user-menu/components/useOutsideClick.ts
|
|
1771
|
-
function
|
|
1772
|
-
|
|
456
|
+
function We(e, t, n) {
|
|
457
|
+
h(() => {
|
|
1773
458
|
let r = (r) => {
|
|
1774
|
-
|
|
459
|
+
Ge(e.current, r) || Ge(t.current, r) || n();
|
|
1775
460
|
};
|
|
1776
461
|
return document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), () => {
|
|
1777
462
|
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
@@ -1782,15 +467,15 @@ function jr(e, t, n) {
|
|
|
1782
467
|
n
|
|
1783
468
|
]);
|
|
1784
469
|
}
|
|
1785
|
-
function
|
|
470
|
+
function Ge(e, t) {
|
|
1786
471
|
return e ? e.contains(t.target) ? !0 : t.composed && t.composedPath ? !!t.composedPath().find((t) => t === window ? !1 : e.contains(t)) : !1 : !1;
|
|
1787
472
|
}
|
|
1788
473
|
//#endregion
|
|
1789
474
|
//#region src/user-menu/components/CustomOverflowMenu.tsx
|
|
1790
|
-
var
|
|
1791
|
-
let l = (0,
|
|
1792
|
-
return
|
|
1793
|
-
className: (0,
|
|
475
|
+
var Ke = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, environment: s, ...c }) => {
|
|
476
|
+
let l = (0, B.default)("eps-overflow-menu__group", { "eps-overflow-menu__group--open": a }), u = g(null), d = g(null);
|
|
477
|
+
return We(u, d, () => o(!1)), /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t(D, {
|
|
478
|
+
className: (0, B.default)("eps-overflow-menu__button", e),
|
|
1794
479
|
onClick: () => o(!a),
|
|
1795
480
|
"aria-haspopup": !0,
|
|
1796
481
|
"aria-expanded": a,
|
|
@@ -1801,24 +486,24 @@ var Nr = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
1801
486
|
children: [
|
|
1802
487
|
/* @__PURE__ */ t("span", {
|
|
1803
488
|
className: "eds-overflow-menu__user-icon",
|
|
1804
|
-
children: /* @__PURE__ */ t(
|
|
489
|
+
children: /* @__PURE__ */ t(R, { inline: !0 })
|
|
1805
490
|
}),
|
|
1806
|
-
/* @__PURE__ */ n(
|
|
491
|
+
/* @__PURE__ */ n(k, {
|
|
1807
492
|
margin: "none",
|
|
1808
493
|
as: "span",
|
|
1809
|
-
children: [i, s !== void 0 && s !==
|
|
1810
|
-
style: { color:
|
|
494
|
+
children: [i, s !== void 0 && s !== K.Production && /* @__PURE__ */ n("span", {
|
|
495
|
+
style: { color: q(s) },
|
|
1811
496
|
children: [
|
|
1812
497
|
" ",
|
|
1813
498
|
"(",
|
|
1814
|
-
|
|
499
|
+
J(s),
|
|
1815
500
|
")"
|
|
1816
501
|
]
|
|
1817
502
|
})]
|
|
1818
503
|
}),
|
|
1819
504
|
/* @__PURE__ */ t("span", {
|
|
1820
505
|
className: "eps-arrow-icon",
|
|
1821
|
-
children: /* @__PURE__ */ t(
|
|
506
|
+
children: /* @__PURE__ */ t(te, { inline: !0 })
|
|
1822
507
|
})
|
|
1823
508
|
]
|
|
1824
509
|
})
|
|
@@ -1828,7 +513,7 @@ var Nr = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
1828
513
|
ref: u,
|
|
1829
514
|
children: r
|
|
1830
515
|
})] });
|
|
1831
|
-
},
|
|
516
|
+
}, qe = ({ locale: r, onLocaleChange: i }) => /* @__PURE__ */ t(e, { children: r === "en-GB" ? /* @__PURE__ */ n($, {
|
|
1832
517
|
onClick: () => {
|
|
1833
518
|
i("nb-NO");
|
|
1834
519
|
},
|
|
@@ -1836,7 +521,7 @@ var Nr = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
1836
521
|
children: [/* @__PURE__ */ t("span", {
|
|
1837
522
|
"aria-hidden": !0,
|
|
1838
523
|
className: "eps-overflow-menu__icon-margin",
|
|
1839
|
-
children: /* @__PURE__ */ t(
|
|
524
|
+
children: /* @__PURE__ */ t(re, {
|
|
1840
525
|
size: "1rem",
|
|
1841
526
|
inline: !0
|
|
1842
527
|
})
|
|
@@ -1849,81 +534,81 @@ var Nr = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
1849
534
|
children: [/* @__PURE__ */ t("span", {
|
|
1850
535
|
"aria-hidden": !0,
|
|
1851
536
|
className: "eps-overflow-menu__icon-margin",
|
|
1852
|
-
children: /* @__PURE__ */ t(
|
|
537
|
+
children: /* @__PURE__ */ t(ie, {
|
|
1853
538
|
size: "1rem",
|
|
1854
539
|
inline: !0
|
|
1855
540
|
})
|
|
1856
541
|
}), "Switch to English"]
|
|
1857
|
-
}) }),
|
|
542
|
+
}) }), Je = ({ onClick: e, locale: r }) => /* @__PURE__ */ n($, {
|
|
1858
543
|
onClick: e,
|
|
1859
544
|
"data-testid": "user-menu-logout",
|
|
1860
545
|
className: "eps-overflow-menu__item",
|
|
1861
546
|
children: [/* @__PURE__ */ t("span", {
|
|
1862
547
|
"aria-hidden": !0,
|
|
1863
|
-
children: /* @__PURE__ */ t(
|
|
548
|
+
children: /* @__PURE__ */ t(ne, {
|
|
1864
549
|
size: "1rem",
|
|
1865
550
|
inline: !0
|
|
1866
551
|
})
|
|
1867
552
|
}), r === "en-GB" ? "Log out " : "Logg ut"]
|
|
1868
|
-
}),
|
|
553
|
+
}), Ye = ({ locale: e, onClick: r }) => /* @__PURE__ */ n($, {
|
|
1869
554
|
onClick: r,
|
|
1870
555
|
className: "eps-overflow-menu__item",
|
|
1871
556
|
children: [/* @__PURE__ */ t("span", {
|
|
1872
557
|
"aria-hidden": !0,
|
|
1873
|
-
children: /* @__PURE__ */ t(
|
|
558
|
+
children: /* @__PURE__ */ t(R, {
|
|
1874
559
|
size: "1rem",
|
|
1875
560
|
inline: !0
|
|
1876
561
|
})
|
|
1877
562
|
}), e === "en-GB" ? "My profile" : "Min profil"]
|
|
1878
|
-
}),
|
|
563
|
+
}), Xe = ({ locale: e, onClick: r }) => /* @__PURE__ */ n($, {
|
|
1879
564
|
onClick: r,
|
|
1880
565
|
className: "eps-overflow-menu__item",
|
|
1881
566
|
children: [/* @__PURE__ */ t("span", {
|
|
1882
567
|
"aria-hidden": !0,
|
|
1883
|
-
children: /* @__PURE__ */ t(
|
|
568
|
+
children: /* @__PURE__ */ t(L, {
|
|
1884
569
|
className: "eps-version-icon",
|
|
1885
570
|
size: "1rem",
|
|
1886
571
|
inline: !0
|
|
1887
572
|
})
|
|
1888
573
|
}), e === "en-GB" ? "Version" : "Versjon"]
|
|
1889
|
-
}),
|
|
1890
|
-
let [m, h] =
|
|
574
|
+
}), Ze = ({ className: e, onLogout: r, onLocaleChange: i, userName: a, locale: o, environment: s, showVersionItem: c, showMyProfileItem: l, showCookieSettingsItem: u, onNavigateToMyProfile: d, onCookieSettingsOpen: f = () => {}, onVersionItemClick: p }) => {
|
|
575
|
+
let [m, h] = _(!1);
|
|
1891
576
|
return /* @__PURE__ */ t("div", {
|
|
1892
577
|
id: "eps-user-menu",
|
|
1893
|
-
children: /* @__PURE__ */ t(
|
|
578
|
+
children: /* @__PURE__ */ t(Ke, {
|
|
1894
579
|
open: m,
|
|
1895
580
|
onOpenChange: h,
|
|
1896
|
-
className: (0,
|
|
581
|
+
className: (0, B.default)(["eps-user-menu__trigger-button", e]),
|
|
1897
582
|
userName: a,
|
|
1898
583
|
environment: s,
|
|
1899
584
|
children: /* @__PURE__ */ n("div", {
|
|
1900
585
|
id: "eps-overflow-menu",
|
|
1901
586
|
children: [
|
|
1902
|
-
/* @__PURE__ */ t(
|
|
587
|
+
/* @__PURE__ */ t(qe, {
|
|
1903
588
|
locale: o,
|
|
1904
589
|
onLocaleChange: (e) => {
|
|
1905
590
|
i(e), h(!1);
|
|
1906
591
|
}
|
|
1907
592
|
}),
|
|
1908
|
-
c && /* @__PURE__ */ t(
|
|
593
|
+
c && /* @__PURE__ */ t(Xe, {
|
|
1909
594
|
locale: o,
|
|
1910
595
|
onClick: () => {
|
|
1911
596
|
p?.(), h(!1);
|
|
1912
597
|
}
|
|
1913
598
|
}),
|
|
1914
|
-
l && /* @__PURE__ */ t(
|
|
599
|
+
l && /* @__PURE__ */ t(Ye, {
|
|
1915
600
|
locale: o,
|
|
1916
601
|
onClick: () => {
|
|
1917
602
|
d(), h(!1);
|
|
1918
603
|
}
|
|
1919
604
|
}),
|
|
1920
|
-
u && /* @__PURE__ */ t(
|
|
605
|
+
u && /* @__PURE__ */ t(Ue, {
|
|
1921
606
|
locale: o,
|
|
1922
607
|
onClick: () => {
|
|
1923
608
|
f(), h(!1);
|
|
1924
609
|
}
|
|
1925
610
|
}),
|
|
1926
|
-
/* @__PURE__ */ t(
|
|
611
|
+
/* @__PURE__ */ t(Je, {
|
|
1927
612
|
locale: o,
|
|
1928
613
|
onClick: () => {
|
|
1929
614
|
r(), h(!1);
|
|
@@ -1935,6 +620,6 @@ var Nr = ({ className: e, children: r, userName: i, open: a, onOpenChange: o, en
|
|
|
1935
620
|
});
|
|
1936
621
|
};
|
|
1937
622
|
//#endregion
|
|
1938
|
-
export {
|
|
623
|
+
export { he as ActionBar, pe as ActionBarLeft, me as ActionBarRight, ge as AuditInfo, U as Box, _e as Breadcrumbs, G as ConfirmModal, ve as Content, xe as EnturPartnerLogo, Y as EnturPartnerLogoSvg, K as Environment, Ce as ErrorBoundary, Ee as ExpandableMultiLanguageInput, Oe as FeatureToggle, ke as FormatCurrencyAmount, V as FormatDateTime, Z as LanguageSelect, Ae as Link, je as LinkButton, Me as Menu, Ne as MultiLanguageInput, Pe as OrganisationDropDown, Ie as PageTitle, Fe as Pager, Le as PermissionCheck, Re as RouteLeavingGuard, W as Stack, ze as StatusLabel, Be as Text, Ve as Unbutton, Ze as UserMenu, X as featureFlag, q as getColorForEnvironment, J as getHumanReadableEnvironment, H as responsiveProp, Q as useDocumentTitle, He as useEventListener, De as useFeatureToggle };
|
|
1939
624
|
|
|
1940
625
|
//# sourceMappingURL=index.mjs.map
|